├── .gitignore ├── AUTHORS ├── Gruntfile.js ├── LICENSE ├── Makefile ├── dist ├── audio.jsdoc ├── index.js ├── index.map.json ├── index.min.js └── player-2_1.swf ├── examples └── quick-start │ ├── index.css │ ├── index.html │ └── index.js ├── jsdoc ├── doc │ ├── gfm-files │ │ ├── children.hbs │ │ ├── class.hbs │ │ ├── event.hbs │ │ ├── export-tree.hbs │ │ ├── exported.hbs │ │ ├── function.hbs │ │ ├── index.hbs │ │ ├── layout.hbs │ │ ├── member.hbs │ │ ├── namespace.hbs │ │ ├── params-table.hbs │ │ ├── parents-line.hbs │ │ ├── property-table.hbs │ │ ├── type.hbs │ │ └── typedef.hbs │ ├── gfm-single │ │ ├── children.hbs │ │ ├── class.hbs │ │ ├── event.hbs │ │ ├── export-tree.hbs │ │ ├── exported.hbs │ │ ├── function.hbs │ │ ├── layout.hbs │ │ ├── member.hbs │ │ ├── namespace.hbs │ │ ├── params-table.hbs │ │ ├── parents-line.hbs │ │ ├── property-table.hbs │ │ ├── type.hbs │ │ └── typedef.hbs │ ├── jsdoc-tech │ │ ├── children.hbs │ │ ├── class.hbs │ │ ├── event.hbs │ │ ├── function.hbs │ │ ├── layout.hbs │ │ ├── member.hbs │ │ ├── namespace.hbs │ │ ├── params-table.hbs │ │ ├── property-table.hbs │ │ ├── type.hbs │ │ └── typedef.hbs │ ├── jsdoc │ │ ├── children.hbs │ │ ├── class.hbs │ │ ├── event.hbs │ │ ├── export-tree.hbs │ │ ├── fullname.hbs │ │ ├── function.hbs │ │ ├── layout.hbs │ │ ├── member.hbs │ │ ├── method.hbs │ │ ├── namespace.hbs │ │ ├── params-table.hbs │ │ ├── property-table.hbs │ │ ├── type.hbs │ │ └── typedef.hbs │ ├── publish.js │ ├── render.gfm.js │ ├── render.js │ └── render.jsdoc.js └── jsdoc.public.json ├── node_modules ├── handlebars │ ├── .gitmodules │ ├── .istanbul.yml │ ├── .npmignore │ ├── CONTRIBUTING.md │ ├── FAQ.md │ ├── LICENSE │ ├── README.markdown │ ├── bin │ │ └── handlebars │ ├── dist │ │ ├── amd │ │ │ ├── handlebars.js │ │ │ ├── handlebars.runtime.js │ │ │ ├── handlebars │ │ │ │ ├── base.js │ │ │ │ ├── compiler │ │ │ │ │ ├── ast.js │ │ │ │ │ ├── base.js │ │ │ │ │ ├── code-gen.js │ │ │ │ │ ├── compiler.js │ │ │ │ │ ├── helpers.js │ │ │ │ │ ├── javascript-compiler.js │ │ │ │ │ ├── parser.js │ │ │ │ │ ├── printer.js │ │ │ │ │ ├── visitor.js │ │ │ │ │ └── whitespace-control.js │ │ │ │ ├── decorators.js │ │ │ │ ├── decorators │ │ │ │ │ └── inline.js │ │ │ │ ├── exception.js │ │ │ │ ├── helpers.js │ │ │ │ ├── helpers │ │ │ │ │ ├── block-helper-missing.js │ │ │ │ │ ├── each.js │ │ │ │ │ ├── helper-missing.js │ │ │ │ │ ├── if.js │ │ │ │ │ ├── log.js │ │ │ │ │ ├── lookup.js │ │ │ │ │ └── with.js │ │ │ │ ├── logger.js │ │ │ │ ├── no-conflict.js │ │ │ │ ├── runtime.js │ │ │ │ ├── safe-string.js │ │ │ │ └── utils.js │ │ │ └── precompiler.js │ │ ├── cjs │ │ │ ├── handlebars.js │ │ │ ├── handlebars.runtime.js │ │ │ ├── handlebars │ │ │ │ ├── base.js │ │ │ │ ├── compiler │ │ │ │ │ ├── ast.js │ │ │ │ │ ├── base.js │ │ │ │ │ ├── code-gen.js │ │ │ │ │ ├── compiler.js │ │ │ │ │ ├── helpers.js │ │ │ │ │ ├── javascript-compiler.js │ │ │ │ │ ├── parser.js │ │ │ │ │ ├── printer.js │ │ │ │ │ ├── visitor.js │ │ │ │ │ └── whitespace-control.js │ │ │ │ ├── decorators.js │ │ │ │ ├── decorators │ │ │ │ │ └── inline.js │ │ │ │ ├── exception.js │ │ │ │ ├── helpers.js │ │ │ │ ├── helpers │ │ │ │ │ ├── block-helper-missing.js │ │ │ │ │ ├── each.js │ │ │ │ │ ├── helper-missing.js │ │ │ │ │ ├── if.js │ │ │ │ │ ├── log.js │ │ │ │ │ ├── lookup.js │ │ │ │ │ └── with.js │ │ │ │ ├── logger.js │ │ │ │ ├── no-conflict.js │ │ │ │ ├── runtime.js │ │ │ │ ├── safe-string.js │ │ │ │ └── utils.js │ │ │ └── precompiler.js │ │ ├── handlebars.amd.js │ │ ├── handlebars.amd.min.js │ │ ├── handlebars.js │ │ ├── handlebars.min.js │ │ ├── handlebars.runtime.amd.js │ │ ├── handlebars.runtime.amd.min.js │ │ ├── handlebars.runtime.js │ │ └── handlebars.runtime.min.js │ ├── docs │ │ ├── compiler-api.md │ │ └── decorators-api.md │ ├── lib │ │ ├── handlebars.js │ │ ├── handlebars.runtime.js │ │ ├── handlebars │ │ │ ├── base.js │ │ │ ├── compiler │ │ │ │ ├── ast.js │ │ │ │ ├── base.js │ │ │ │ ├── code-gen.js │ │ │ │ ├── compiler.js │ │ │ │ ├── helpers.js │ │ │ │ ├── javascript-compiler.js │ │ │ │ ├── parser.js │ │ │ │ ├── printer.js │ │ │ │ ├── visitor.js │ │ │ │ └── whitespace-control.js │ │ │ ├── decorators.js │ │ │ ├── decorators │ │ │ │ └── inline.js │ │ │ ├── exception.js │ │ │ ├── helpers.js │ │ │ ├── helpers │ │ │ │ ├── block-helper-missing.js │ │ │ │ ├── each.js │ │ │ │ ├── helper-missing.js │ │ │ │ ├── if.js │ │ │ │ ├── log.js │ │ │ │ ├── lookup.js │ │ │ │ └── with.js │ │ │ ├── logger.js │ │ │ ├── no-conflict.js │ │ │ ├── runtime.js │ │ │ ├── safe-string.js │ │ │ └── utils.js │ │ ├── index.js │ │ └── precompiler.js │ ├── node_modules │ │ ├── async │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── dist │ │ │ │ ├── async.js │ │ │ │ └── async.min.js │ │ │ ├── lib │ │ │ │ └── async.js │ │ │ └── package.json │ │ ├── optimist │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── example │ │ │ │ ├── bool.js │ │ │ │ ├── boolean_double.js │ │ │ │ ├── boolean_single.js │ │ │ │ ├── default_hash.js │ │ │ │ ├── default_singles.js │ │ │ │ ├── divide.js │ │ │ │ ├── line_count.js │ │ │ │ ├── line_count_options.js │ │ │ │ ├── line_count_wrap.js │ │ │ │ ├── nonopt.js │ │ │ │ ├── reflect.js │ │ │ │ ├── short.js │ │ │ │ ├── string.js │ │ │ │ ├── usage-options.js │ │ │ │ └── xup.js │ │ │ ├── index.js │ │ │ ├── node_modules │ │ │ │ ├── minimist │ │ │ │ │ ├── .travis.yml │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── example │ │ │ │ │ │ └── parse.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── package.json │ │ │ │ │ ├── readme.markdown │ │ │ │ │ └── test │ │ │ │ │ │ ├── bool.js │ │ │ │ │ │ ├── dash.js │ │ │ │ │ │ ├── default_bool.js │ │ │ │ │ │ ├── dotted.js │ │ │ │ │ │ ├── long.js │ │ │ │ │ │ ├── num.js │ │ │ │ │ │ ├── parse.js │ │ │ │ │ │ ├── parse_modified.js │ │ │ │ │ │ ├── short.js │ │ │ │ │ │ └── whitespace.js │ │ │ │ └── wordwrap │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.markdown │ │ │ │ │ ├── example │ │ │ │ │ ├── center.js │ │ │ │ │ └── meat.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── package.json │ │ │ │ │ └── test │ │ │ │ │ ├── break.js │ │ │ │ │ ├── idleness.txt │ │ │ │ │ └── wrap.js │ │ │ ├── package.json │ │ │ ├── readme.markdown │ │ │ └── test │ │ │ │ ├── _.js │ │ │ │ ├── _ │ │ │ │ ├── argv.js │ │ │ │ └── bin.js │ │ │ │ ├── dash.js │ │ │ │ ├── parse.js │ │ │ │ ├── parse_modified.js │ │ │ │ ├── short.js │ │ │ │ ├── usage.js │ │ │ │ └── whitespace.js │ │ └── source-map │ │ │ ├── README.md │ │ │ ├── build │ │ │ ├── assert-shim.js │ │ │ ├── mini-require.js │ │ │ ├── prefix-source-map.jsm │ │ │ ├── prefix-utils.jsm │ │ │ ├── suffix-browser.js │ │ │ ├── suffix-source-map.jsm │ │ │ ├── suffix-utils.jsm │ │ │ ├── test-prefix.js │ │ │ └── test-suffix.js │ │ │ ├── lib │ │ │ ├── source-map.js │ │ │ └── source-map │ │ │ │ ├── array-set.js │ │ │ │ ├── base64-vlq.js │ │ │ │ ├── base64.js │ │ │ │ ├── binary-search.js │ │ │ │ ├── mapping-list.js │ │ │ │ ├── quick-sort.js │ │ │ │ ├── source-map-consumer.js │ │ │ │ ├── source-map-generator.js │ │ │ │ ├── source-node.js │ │ │ │ └── util.js │ │ │ ├── node_modules │ │ │ └── amdefine │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── amdefine.js │ │ │ │ ├── intercept.js │ │ │ │ └── package.json │ │ │ └── package.json │ ├── package.json │ ├── print-script │ ├── release-notes.md │ └── runtime.js └── vow │ ├── .npmignore │ ├── CHANGELOG.md │ ├── README.md │ ├── lib │ └── vow.js │ ├── package.json │ └── vow.min.js ├── package.json ├── readme.md ├── spec ├── AbortablePromise.md ├── Audio.md ├── AudioError.md ├── Deferred.md ├── Equalizer.md ├── ErrorClass.md ├── Events.md ├── LoaderError.md ├── Logger.md ├── PlaybackError.md ├── Promise.md ├── config.md ├── full.md ├── global.md ├── info.md ├── readme.md ├── tech.jsdoc └── volumeLib.md ├── src ├── IAudioImplementation.jsdoc ├── audio-player.js ├── audio-static.js ├── config.js ├── error │ ├── audio-error.js │ ├── export.js │ └── playback-error.js ├── export.js ├── flash │ ├── audio-flash.js │ ├── build │ │ └── player-2_1.swf │ ├── flash-interface.js │ ├── flash-manager.js │ ├── flashblocknotifier.js │ ├── flashembedder.js │ ├── loader.js │ └── src │ │ ├── AudioEvent.as │ │ ├── AudioLoader.as │ │ ├── AudioManager.as │ │ └── AudioPlayer.as ├── fx │ ├── equalizer │ │ ├── default.bands.js │ │ ├── default.presets.js │ │ ├── equalizer-band.js │ │ ├── equalizer-static.js │ │ ├── equalizer.js │ │ └── export.js │ ├── export.js │ └── volume │ │ ├── export.js │ │ └── volume-lib.js ├── html5 │ ├── audio-html5-loader.js │ └── audio-html5.js ├── index.js ├── lib │ ├── async │ │ ├── deferred.js │ │ ├── events.js │ │ ├── promise.js │ │ └── reject.js │ ├── browser │ │ ├── audioContextMonkeyPatch.js │ │ ├── detect.js │ │ └── swfobject.js │ ├── class │ │ ├── error-class.js │ │ ├── proxy.js │ │ └── pure-instance.js │ ├── data │ │ └── merge.js │ ├── export.js │ ├── net │ │ └── error │ │ │ ├── export.js │ │ │ └── loader-error.js │ └── noop.js └── logger │ ├── export.js │ └── logger.js ├── test └── web-audio-api │ ├── index.html │ ├── index.js │ └── raphael-min.js └── tutorial ├── contrib.md ├── corner-case.md ├── fx.md ├── images ├── alias.png ├── allpass.png ├── bandpass-filter.png ├── bandpass.png ├── bandstop-filter.png ├── clipping.png ├── demo.png ├── discrete-signal.png ├── fon.png ├── highpass-filter.png ├── highpass.png ├── highshelf.png ├── lowpass-filter.png ├── lowpass.png ├── lowshelf.png ├── notch.png ├── peaking.png ├── quantized-signal.png ├── sin.png └── spectro.jpg ├── quick-start.md ├── sound.md └── web-audio-api.md /.gitignore: -------------------------------------------------------------------------------- 1 | browserify 2 | uglify-js 3 | grunt 4 | grunt-browserify 5 | grunt-contrib-clean 6 | grunt-contrib-uglify 7 | grunt-mkdir 8 | grunt-contrib-copy 9 | node_modules/jsdoc 10 | node_modules/ym 11 | node_modules/.bin 12 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | The following authors have created the source code of "YandexAudio" published and distributed by YANDEX LLC as the owner: 2 | 3 | Silaev Mikhail 4 | -------------------------------------------------------------------------------- /Gruntfile.js: -------------------------------------------------------------------------------- 1 | module.exports = function(grunt) { 2 | 3 | var BUILDDIR = "./dist"; 4 | 5 | // Project configuration. 6 | grunt.initConfig({ 7 | pkg: grunt.file.readJSON('package.json'), 8 | 9 | clean: [BUILDDIR], 10 | 11 | mkdir: { 12 | options: { 13 | create: [BUILDDIR] 14 | } 15 | }, 16 | 17 | browserify: { 18 | options: { 19 | debug: true 20 | }, 21 | main: { 22 | src: "./src/index.js", 23 | dest: BUILDDIR + "/index.js" 24 | }, 25 | modules: { 26 | src: "./src/modules.js", 27 | dest: BUILDDIR + "/modules.js" 28 | } 29 | }, 30 | 31 | uglify: { 32 | options: { 33 | mangle: true, 34 | compress: true, 35 | bareReturns: true, 36 | stats: true 37 | }, 38 | main: { 39 | src: BUILDDIR + '/index.js', 40 | dest: BUILDDIR + '/index.min.js', 41 | options: { 42 | sourceMap: true, 43 | sourceMapName: BUILDDIR + "/index.map.json" 44 | } 45 | }, 46 | modules: { 47 | src: BUILDDIR + '/modules.js', 48 | dest: BUILDDIR + '/modules.min.js', 49 | options: { 50 | sourceMap: true, 51 | sourceMapName: BUILDDIR + "/modules.map.json" 52 | } 53 | } 54 | }, 55 | 56 | copy: { 57 | flash: { 58 | src: "./src/flash/build/player-2_0.swf", 59 | dest: BUILDDIR + "/player-2_0.swf" 60 | } 61 | } 62 | }); 63 | 64 | grunt.loadNpmTasks('grunt-contrib-clean'); 65 | grunt.loadNpmTasks('grunt-mkdir'); 66 | grunt.loadNpmTasks('grunt-browserify'); 67 | grunt.loadNpmTasks('grunt-contrib-uglify'); 68 | grunt.loadNpmTasks('grunt-contrib-copy'); 69 | 70 | grunt.registerTask('build', ['clean', 'mkdir', 'browserify', 'copy']); 71 | grunt.registerTask('all', ['build', 'uglify']); 72 | 73 | // Default task. 74 | grunt.registerTask('default', ['all']); 75 | }; 76 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | NPM_BIN=./node_modules/.bin 2 | 3 | SOURCEDIR=src 4 | BUILDDIR=dist 5 | 6 | JSDOC=$(NPM_BIN)/jsdoc -c 7 | UGLIFY_JS=$(NPM_BIN)/uglifyjs --mangle --compress --bare-returns --stats 8 | BROWSERIFY=$(NPM_BIN)/browserify -d 9 | 10 | 11 | all: clean build minify jsdoc 12 | git add -A 13 | git commit 14 | 15 | 16 | clean: 17 | -rm -rf $(BUILDDIR) 18 | 19 | 20 | npm: 21 | -npm install 22 | 23 | 24 | prepare: clean npm 25 | mkdir $(BUILDDIR) 26 | cp $(SOURCEDIR)/flash/build/*.swf $(BUILDDIR)/ 27 | 28 | 29 | build: $(BUILDDIR)/index.js 30 | 31 | 32 | minify: $(BUILDDIR)/index.min.js 33 | 34 | 35 | $(BUILDDIR)/index.js: prepare 36 | $(BROWSERIFY) $(SOURCEDIR)/index.js > $(BUILDDIR)/index.js 37 | 38 | 39 | $(BUILDDIR)/index.min.js: $(BUILDDIR)/index.js 40 | $(UGLIFY_JS) $(BUILDDIR)/index.js > $(BUILDDIR)/index.min.js --source-map $(BUILDDIR)/index.map.json 41 | 42 | 43 | jsdoc: npm 44 | -rm -rf spec/* 45 | -mkdir spec 46 | $(JSDOC) jsdoc/jsdoc.public.json -q "style=gfm-files" 47 | $(JSDOC) jsdoc/jsdoc.public.json -q "style=gfm-single&out=full" 48 | $(JSDOC) jsdoc/jsdoc.public.json -d $(BUILDDIR)/ -q "style=jsdoc&out=audio" 49 | $(JSDOC) jsdoc/jsdoc.public.json -q "style=jsdoc-tech&out=tech" 50 | 51 | 52 | .PHONY: all clean build minify prepare npm jsdoc 53 | -------------------------------------------------------------------------------- /dist/player-2_1.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yandex/audio-js/6af1b1bc0423fb5145d12c6090d89b938b4e9b71/dist/player-2_1.swf -------------------------------------------------------------------------------- /examples/quick-start/index.css: -------------------------------------------------------------------------------- 1 | * { 2 | -webkit-box-sizing: border-box; 3 | -moz-box-sizing: border-box; 4 | box-sizing: border-box; 5 | } 6 | 7 | .player { 8 | display: block; 9 | position: relative; 10 | width: 100%; 11 | height: 140px; 12 | } 13 | 14 | .overlay { 15 | display: block; 16 | position: absolute; 17 | top: 0; 18 | left: 0; 19 | width: 100%; 20 | height: 100%; 21 | z-index: 100; 22 | } 23 | 24 | .overlay_hidden { 25 | display: none; 26 | } 27 | 28 | .overlay_error { 29 | background: #ffcccc; 30 | color: #ff0000; 31 | } 32 | 33 | .controls_play { 34 | padding: 5px 10px; 35 | background: #fff; 36 | border: 1px #aaa solid; 37 | cursor: pointer; 38 | } 39 | 40 | .controls_play:hover { 41 | border-color: #666; 42 | } 43 | 44 | .player_playing .controls_play { 45 | background: #9DBAFF; 46 | } 47 | 48 | .progress { 49 | display: block; 50 | position: relative; 51 | width: 90%; 52 | height: 104px; 53 | border: 1px #ccc solid; 54 | margin: 10px 0; 55 | } 56 | 57 | .progress_loaded, .progress_current { 58 | display: block; 59 | position: absolute; 60 | height: 100%; 61 | top: 0; 62 | left: 0; 63 | } 64 | 65 | .progress_loaded { 66 | background: #ccc; 67 | z-index: 1; 68 | } 69 | 70 | .progress_current { 71 | background: #535BC3; 72 | z-index: 2; 73 | } 74 | 75 | .volume { 76 | display: block; 77 | position: absolute; 78 | right: 0; 79 | width: 9%; 80 | top: 0; 81 | height: 100%; 82 | border: 1px #ccc solid; 83 | } 84 | 85 | .volume_bar { 86 | display: block; 87 | position: absolute; 88 | bottom: 0; 89 | width: 100%; 90 | background: #535BC3; 91 | } 92 | -------------------------------------------------------------------------------- /examples/quick-start/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 |
14 | 15 |
16 |
17 |
18 |
19 | 20 |
21 |
22 |
23 | 24 |
25 | 26 | 27 |
28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /jsdoc/doc/gfm-files/children.hbs: -------------------------------------------------------------------------------- 1 | {{#each children.member}} 2 | 3 | {{> member}} 4 | 5 | {{/each}} 6 | 7 | 8 | {{#if children.event}} 9 | ---- 10 | 11 | ### События 12 | {{#each children.event}} 13 | 14 | {{> event}} 15 | 16 | {{/each}} 17 | {{/if}} 18 | 19 | {{#if children.function}} 20 | ---- 21 | 22 | ### Методы 23 | {{#each children.function}} 24 | 25 | {{> function}} 26 | 27 | {{/each}} 28 | {{/if}} 29 | 30 | 31 | {{#if children.namespace}} 32 | ---- 33 | 34 | ### Пространства имён 35 | {{#each children.namespace}} 36 | 37 | 38 | {{> namespace}} 39 | 40 | {{/each}} 41 | {{/if}} 42 | 43 | 44 | {{#if children.typedef}} 45 | ---- 46 | 47 | ### Типы 48 | {{#each children.typedef}} 49 | 50 | {{> typedef}} 51 | 52 | {{/each}} 53 | {{/if}} 54 | -------------------------------------------------------------------------------- /jsdoc/doc/gfm-files/class.hbs: -------------------------------------------------------------------------------- 1 | ##{{#unless exported}} *inner*{{/unless}} *class* {{{name}}} 2 | 3 | {{> exported}} 4 | 5 | 6 | {{{classdesc}}} 7 | 8 | {{#if augments}} 9 | **Расширяет:** 10 | 11 | {{#each augments}} 12 | - \{@link {{this}}\} 13 | {{/each}} 14 | {{/if}} 15 | 16 | {{#if fires}} 17 | **Триггерит:** 18 | 19 | {{#each fires}} 20 | - \{@link {{this}}\} 21 | {{/each}} 22 | {{/if}} 23 | 24 | {{#if exported}} 25 | #### new {{{name}}}({{> params-table line=1}}) 26 | 27 | {{{description}}} 28 | 29 | {{> params-table}} 30 | {{/if}} 31 | 32 | {{> children}} 33 | -------------------------------------------------------------------------------- /jsdoc/doc/gfm-files/event.hbs: -------------------------------------------------------------------------------- 1 | #### *event* {{{longname}}} 2 | 3 | {{{description}}} 4 | 5 | {{> params-table}} 6 | -------------------------------------------------------------------------------- /jsdoc/doc/gfm-files/export-tree.hbs: -------------------------------------------------------------------------------- 1 | {{#each sub}} 2 | {{../indent}}* {{#if link}}\{@link {{link}} {{@key}}\}{{else}}{{@key}}{{/if}} 3 | {{> export-tree}} 4 | {{/each}} 5 | -------------------------------------------------------------------------------- /jsdoc/doc/gfm-files/exported.hbs: -------------------------------------------------------------------------------- 1 | {{#if exported}} 2 | **Доступен извне как:** `{{exported}}` 3 | {{/if}} 4 | -------------------------------------------------------------------------------- /jsdoc/doc/gfm-files/function.hbs: -------------------------------------------------------------------------------- 1 | #### {{#if parent}} 2 | {{> parents-line}} 3 | {{else exported}} 4 | 5 | {{else}} 6 | *inner* 7 | {{/if}}{{{name}}} ({{> params-table line=1}}) {{>type returns line=1}} {{#if inherited}}*(inherits {@link {{inherits}}\})*{{/if}} 8 | 9 | {{> exported}} 10 | 11 | 12 | {{{description}}} 13 | 14 | 15 | {{> params-table}} 16 | 17 | 18 | {{#if returns.description}} 19 | > **Возвращает:** {{{returns.description}}} 20 | {{/if}} 21 | -------------------------------------------------------------------------------- /jsdoc/doc/gfm-files/index.hbs: -------------------------------------------------------------------------------- 1 | # Внешняя структура модуля 2 | 3 | {{#with exportTree}} 4 | {{#each symbols}} 5 | {{../indent}}* \{@link {{name}} {{path}}\} 6 | {{/each}} 7 | {{#each sub}} 8 | {{../indent}}* {{@key}} 9 | {{> export-tree}} 10 | {{/each}} 11 | {{/with}} 12 | -------------------------------------------------------------------------------- /jsdoc/doc/gfm-files/layout.hbs: -------------------------------------------------------------------------------- 1 | {{#if class}}{{> class class}}{{/if}} 2 | {{#if typedef}}{{> typedef typedef}}{{/if}} 3 | {{#if namespace}}{{> namespace namespace}}{{/if}} 4 | {{#if event}}{{> event event}}{{/if}} 5 | {{#if function}}{{> function function}}{{/if}} 6 | {{#if member}}{{> member member}}{{/if}} 7 | -------------------------------------------------------------------------------- /jsdoc/doc/gfm-files/member.hbs: -------------------------------------------------------------------------------- 1 | #### {{#if parent}}{{> parents-line}}{{else inherits}}{{else}} *inner* {{/if}}{{{name}}} {{> type line=1}} 2 | 3 | {{{description}}} 4 | 5 | {{> property-table}} 6 | -------------------------------------------------------------------------------- /jsdoc/doc/gfm-files/namespace.hbs: -------------------------------------------------------------------------------- 1 | ## *ns* {{> parents-line}}{{{name}}} 2 | 3 | {{> exported}} 4 | 5 | 6 | {{{description}}} 7 | 8 | 9 | {{> property-table}} 10 | 11 | 12 | {{> children}} 13 | -------------------------------------------------------------------------------- /jsdoc/doc/gfm-files/params-table.hbs: -------------------------------------------------------------------------------- 1 | {{#if params}} 2 | {{#if line}} 3 | {{#each params}}{{#unless @first}}, {{/unless}}{{{name}}}{{> type line=1}}{{/each}} 4 | {{else}} 5 | | Имя | Тип | * | Описание | 6 | | --- | --- | --- | --- | 7 | {{#each params}} 8 | | {{#if optional}}*\[{{/if}}{{{name}}}{{#if optional}}\]*{{/if}} | {{> type}} | {{{defaultvalue}}} | {{{description}}} | 9 | {{/each}} 10 | {{/if}} 11 | {{/if}} 12 | -------------------------------------------------------------------------------- /jsdoc/doc/gfm-files/parents-line.hbs: -------------------------------------------------------------------------------- 1 | {{#if parent}}{{#if parent.parent}}{{> parents-line parent}}{{/if}}{{parent.name}}{{#if static}}.{{else}}#{{/if}}{{/if}} 2 | -------------------------------------------------------------------------------- /jsdoc/doc/gfm-files/property-table.hbs: -------------------------------------------------------------------------------- 1 | {{#if properties}} 2 | | Имя | Тип | * | Описание | 3 | | --- | --- | --- | --- | 4 | {{#each properties}} 5 | | {{#if optional}}*\[{{/if}}{{{name}}}{{#if optional}}\]*{{/if}} | {{> type}} | {{{defaultvalue}}} | {{{description}}} | 6 | {{/each}} 7 | {{/if}} 8 | -------------------------------------------------------------------------------- /jsdoc/doc/gfm-files/type.hbs: -------------------------------------------------------------------------------- 1 | {{#if type.names}}{{#if line}}: {{/if}}{{#each type.names}}{{#unless @first}} \| {{/unless}}\{@link {{this}}\}{{/each}}{{/if}} 2 | -------------------------------------------------------------------------------- /jsdoc/doc/gfm-files/typedef.hbs: -------------------------------------------------------------------------------- 1 | #### *type* {{{name}}} {{> type line=1}} 2 | 3 | {{{description}}} 4 | 5 | {{> property-table}} 6 | -------------------------------------------------------------------------------- /jsdoc/doc/gfm-single/children.hbs: -------------------------------------------------------------------------------- 1 | {{#each children.member}} 2 | 3 | {{> member}} 4 | 5 | {{/each}} 6 | 7 | 8 | {{#each children.function}} 9 | 10 | {{> function}} 11 | 12 | {{/each}} 13 | 14 | 15 | {{#each children.event}} 16 | 17 | {{> event}} 18 | 19 | {{/each}} 20 | 21 | 22 | {{#each children.namespace}} 23 | 24 | {{> namespace}} 25 | 26 | {{/each}} 27 | -------------------------------------------------------------------------------- /jsdoc/doc/gfm-single/class.hbs: -------------------------------------------------------------------------------- 1 | ##{{#unless exported}} *inner*{{/unless}} *class* {{{name}}} 2 | 3 | {{> exported}} 4 | 5 | 6 | {{{classdesc}}} 7 | 8 | 9 | {{#if augments}} 10 | **Расширяет:** 11 | 12 | {{#each augments}} 13 | - \{@link {{this}}\} 14 | {{/each}} 15 | {{/if}} 16 | 17 | 18 | {{#if fires}} 19 | **Триггерит:** 20 | 21 | {{#each fires}} 22 | - \{@link {{this}}\} 23 | {{/each}} 24 | {{/if}} 25 | 26 | 27 | {{#if exported}} 28 | #### new {{{name}}}({{> params-table line=1}}) 29 | 30 | 31 | {{{description}}} 32 | 33 | 34 | {{> params-table}} 35 | {{/if}} 36 | 37 | 38 | {{> children}} 39 | -------------------------------------------------------------------------------- /jsdoc/doc/gfm-single/event.hbs: -------------------------------------------------------------------------------- 1 | #### *event* {{{longname}}} 2 | 3 | {{{description}}} 4 | 5 | {{> params-table}} 6 | -------------------------------------------------------------------------------- /jsdoc/doc/gfm-single/export-tree.hbs: -------------------------------------------------------------------------------- 1 | {{#each sub}} 2 | {{../indent}}* {{#if link}}\{@link {{link}} {{@key}}\}{{else}}{{@key}}{{/if}} 3 | {{> export-tree}} 4 | {{/each}} 5 | -------------------------------------------------------------------------------- /jsdoc/doc/gfm-single/exported.hbs: -------------------------------------------------------------------------------- 1 | {{#if exported}} 2 | **Доступен извне как:** `{{exported}}` 3 | {{/if}} 4 | -------------------------------------------------------------------------------- /jsdoc/doc/gfm-single/function.hbs: -------------------------------------------------------------------------------- 1 | #### {{#if parent}} 2 | {{> parents-line}} 3 | {{else exported}} 4 | 5 | {{else}} 6 | *inner* 7 | {{/if}}{{{name}}} ({{> params-table line=1}}) {{>type returns line=1}} {{#if inherited}}*(inherits {@link {{inherits}}\})*{{/if}} 8 | 9 | {{> exported}} 10 | 11 | 12 | {{{description}}} 13 | 14 | 15 | {{> params-table}} 16 | 17 | 18 | {{#if returns.description}} 19 | > **Возвращает:** {{{returns.description}}} 20 | {{/if}} 21 | -------------------------------------------------------------------------------- /jsdoc/doc/gfm-single/layout.hbs: -------------------------------------------------------------------------------- 1 | ## Внешняя структура модуля 2 | 3 | {{> export-tree exportTree}} 4 | 5 | {{#each linear.class}} 6 | ---- 7 | 8 | {{> class}} 9 | 10 | {{/each}} 11 | 12 | 13 | {{#if linear.function}} 14 | ---- 15 | 16 | ## Функции 17 | {{#each linear.function}} 18 | 19 | {{> function}} 20 | {{/each}} 21 | {{/if}} 22 | 23 | 24 | {{#if linear.typedef}} 25 | ---- 26 | 27 | ## Типы 28 | {{#each linear.typedef}} 29 | 30 | {{> typedef}} 31 | {{/each}} 32 | {{/if}} 33 | 34 | 35 | ## Пространства имён 36 | 37 | {{#each tree.namespace}} 38 | ---- 39 | 40 | {{> namespace}} 41 | 42 | {{/each}} 43 | -------------------------------------------------------------------------------- /jsdoc/doc/gfm-single/member.hbs: -------------------------------------------------------------------------------- 1 | #### {{#if parent}}{{> parents-line}}{{else inherits}}{{else}} *inner* {{/if}}{{{name}}} {{> type line=1}} 2 | 3 | {{{description}}} 4 | 5 | {{> property-table}} 6 | -------------------------------------------------------------------------------- /jsdoc/doc/gfm-single/namespace.hbs: -------------------------------------------------------------------------------- 1 | ## *ns* {{> parents-line}}{{{name}}} 2 | 3 | {{> exported}} 4 | 5 | 6 | {{{description}}} 7 | 8 | 9 | {{> property-table}} 10 | 11 | 12 | {{> children}} 13 | -------------------------------------------------------------------------------- /jsdoc/doc/gfm-single/params-table.hbs: -------------------------------------------------------------------------------- 1 | {{#if params}} 2 | {{#if line}} 3 | {{#each params}}{{#unless @first}}, {{/unless}}{{{name}}}{{> type line=1}}{{/each}} 4 | {{else}} 5 | | Имя | Тип | * | Описание | 6 | | --- | --- | --- | --- | 7 | {{#each params}} 8 | | {{#if optional}}*\[{{/if}}{{{name}}}{{#if optional}}\]*{{/if}} | {{> type}} | {{{defaultvalue}}} | {{{description}}} | 9 | {{/each}} 10 | {{/if}} 11 | {{/if}} 12 | -------------------------------------------------------------------------------- /jsdoc/doc/gfm-single/parents-line.hbs: -------------------------------------------------------------------------------- 1 | {{#if parent}}{{#if parent.parent}}{{> parents-line parent}}{{/if}}{{parent.name}}{{#if static}}.{{else}}#{{/if}}{{/if}} 2 | -------------------------------------------------------------------------------- /jsdoc/doc/gfm-single/property-table.hbs: -------------------------------------------------------------------------------- 1 | {{#if properties}} 2 | | Имя | Тип | * | Описание | 3 | | --- | --- | --- | --- | 4 | {{#each properties}} 5 | | {{#if optional}}*\[{{/if}}{{{name}}}{{#if optional}}\]*{{/if}} | {{> type}} | {{{defaultvalue}}} | {{{description}}} | 6 | {{/each}} 7 | {{/if}} 8 | -------------------------------------------------------------------------------- /jsdoc/doc/gfm-single/type.hbs: -------------------------------------------------------------------------------- 1 | {{#if type.names}}{{#if line}}: {{/if}}{{#each type.names}}{{#unless @first}} \| {{/unless}}\{@link {{this}}\}{{/each}}{{/if}} 2 | -------------------------------------------------------------------------------- /jsdoc/doc/gfm-single/typedef.hbs: -------------------------------------------------------------------------------- 1 | #### *type* {{{name}}} {{> type line=1}} 2 | 3 | {{{description}}} 4 | 5 | {{> property-table}} 6 | -------------------------------------------------------------------------------- /jsdoc/doc/jsdoc-tech/children.hbs: -------------------------------------------------------------------------------- 1 | {{#if member}} 2 | /*************************************************************/ 3 | 4 | // Members 5 | {{#each member}} 6 | 7 | {{> member}} 8 | 9 | {{/each}} 10 | {{/if}} 11 | 12 | 13 | {{#if function}} 14 | /*************************************************************/ 15 | 16 | // Functions 17 | {{#each function}} 18 | 19 | {{> function}} 20 | 21 | {{/each}} 22 | {{/if}} 23 | 24 | 25 | {{#if event}} 26 | /*************************************************************/ 27 | 28 | // Events 29 | {{#each event}} 30 | 31 | {{> event}} 32 | 33 | {{/each}} 34 | {{/if}} 35 | -------------------------------------------------------------------------------- /jsdoc/doc/jsdoc-tech/class.hbs: -------------------------------------------------------------------------------- 1 | /** 2 | * @class {{{classdesc}}} 3 | * @name {{{name}}} 4 | * {{#if parent}}@memberof {{parent.longname}}{{/if}} 5 | * {{#if static}}@static{{/if}} 6 | * {{#if inner}}@inner{{/if}} 7 | * 8 | {{#each augments}} 9 | * @extends {{this}} 10 | {{/each}} 11 | * 12 | {{#each fires}} 13 | * @fires {{this}} 14 | {{/each}} 15 | * 16 | {{#if exported}} 17 | * @alias {{{exported}}} 18 | * 19 | * @constructor 20 | * {{{description}}} 21 | {{> params-table}} 22 | * {{else}} 23 | * @noconstructor 24 | {{/if}} 25 | */ 26 | 27 | {{> children children}} 28 | -------------------------------------------------------------------------------- /jsdoc/doc/jsdoc-tech/event.hbs: -------------------------------------------------------------------------------- 1 | /** 2 | * {{{description}}} 3 | * {{#if type.names}}@type {{> type}}{{/if}} 4 | * @event 5 | * @name {{{longname}}} 6 | {{> params-table}} 7 | */ 8 | -------------------------------------------------------------------------------- /jsdoc/doc/jsdoc-tech/function.hbs: -------------------------------------------------------------------------------- 1 | {{#unless inherited}} 2 | /** 3 | * {{{description}}} 4 | * @function 5 | * @name {{name}} 6 | * {{#if exported}}@alias {{exported}}{{/if}} 7 | * {{#if parent}}@memberof {{parent.longname}}{{/if}} 8 | * {{#if inner}}@inner{{/if}} 9 | * {{#unless parent.namespace}}{{#if static}}@static{{/if}}{{/unless}} 10 | {{> params-table}} 11 | * {{#if returns.type.names}}@returns {{>type returns}} {{{returns.description}}}{{/if}} 12 | */ 13 | {{/unless}} 14 | -------------------------------------------------------------------------------- /jsdoc/doc/jsdoc-tech/layout.hbs: -------------------------------------------------------------------------------- 1 | {{#if linear.class}} 2 | /*************************************************************/ 3 | 4 | // Classes 5 | 6 | {{#each linear.class}} 7 | //-----------------------------------------------------------// 8 | 9 | {{> class}} 10 | {{/each}} 11 | {{/if}} 12 | 13 | 14 | {{#if linear.typedef}} 15 | /*************************************************************/ 16 | 17 | // Typedefs 18 | {{#each linear.typedef}} 19 | //-----------------------------------------------------------// 20 | 21 | {{> typedef}} 22 | {{/each}} 23 | {{/if}} 24 | 25 | 26 | {{#if linear.namespace}} 27 | /*************************************************************/ 28 | 29 | // Namespaces 30 | {{#each linear.namespace}} 31 | //-----------------------------------------------------------// 32 | 33 | {{> namespace}} 34 | {{/each}} 35 | {{/if}} 36 | 37 | {{> children linear}} 38 | -------------------------------------------------------------------------------- /jsdoc/doc/jsdoc-tech/member.hbs: -------------------------------------------------------------------------------- 1 | /** 2 | * {{{description}}} 3 | * @field 4 | * @name {{{name}}} 5 | * {{#if type.names}}@type {{> type nowrap=1}}{{/if}} 6 | * {{#if const}}@const{{/if}} 7 | * {{#if parent}}@memberof {{{parent.longname}}}{{/if}} 8 | * {{#if inner}}@inner {{/if}} 9 | * {{#if static}}@static {{/if}} 10 | {{> property-table}} 11 | * 12 | */ 13 | -------------------------------------------------------------------------------- /jsdoc/doc/jsdoc-tech/namespace.hbs: -------------------------------------------------------------------------------- 1 | {{#if parent.namespace}} 2 | /** 3 | * {{{description}}} 4 | * 5 | * ПараметрЗначение по умолчаниюОписание 6 | {{#each children.member}} 7 | * {{{name}}}{{>type nowrap=1}}{{{description}}} 8 | {{/each}}{{#each properties}} 9 | * {{{name}}}{{>type nowrap=1}}{{{description}}} 10 | {{/each}} 11 | *
12 | * @name {{{longname}}} 13 | * @type Object 14 | */ 15 | 16 | 17 | {{else}} 18 | /** 19 | * @namespace {{{description}}} 20 | * @name {{{longname}}} 21 | * {{#if exported}}@alias {{{exported}}}{{/if}} 22 | * {{#if inner}}@inner{{/if}} 23 | * {{#if static}}@static{{/if}} 24 | */ 25 | 26 | {{> children children}} 27 | {{/if}} 28 | 29 | -------------------------------------------------------------------------------- /jsdoc/doc/jsdoc-tech/params-table.hbs: -------------------------------------------------------------------------------- 1 | {{#each params}} 2 | * @param {{> type}} {{#if optional}}[{{/if}}{{{name}}}{{#if defaultValue}}={{{defaultValue}}}{{/if}}{{#if optional}}]{{/if}} {{{description}}} 3 | {{/each}} 4 | -------------------------------------------------------------------------------- /jsdoc/doc/jsdoc-tech/property-table.hbs: -------------------------------------------------------------------------------- 1 | {{#each properties}} 2 | * @property {{> type}} {{#if optional}}[{{/if}}{{{name}}}{{#if defaultValue}}={{{defaultValue}}}{{/if}}{{#if optional}}]{{/if}} {{{description}}} 3 | {{/each}} 4 | -------------------------------------------------------------------------------- /jsdoc/doc/jsdoc-tech/type.hbs: -------------------------------------------------------------------------------- 1 | {{#if type.names}}{{#unless nowrap}}\{ {{/unless}}{{#each type.names}}{{#unless @first}} | {{/unless}}{{{this}}}{{/each}} {{#unless nowrap}}\}{{/unless}}{{/if}} 2 | -------------------------------------------------------------------------------- /jsdoc/doc/jsdoc-tech/typedef.hbs: -------------------------------------------------------------------------------- 1 | /** 2 | * {{{description}}} 3 | * @typedef {{> type}} {{#if parent}}{{parent.longname}}.{{/if}}{{{name}}} 4 | * 5 | {{> property-table}} 6 | */ 7 | 8 | {{> children children}} 9 | -------------------------------------------------------------------------------- /jsdoc/doc/jsdoc/children.hbs: -------------------------------------------------------------------------------- 1 | {{#if member}} 2 | /*************************************************************/ 3 | 4 | // Members 5 | {{#each member}} 6 | 7 | {{> member}} 8 | 9 | {{/each}} 10 | {{/if}} 11 | 12 | 13 | {{#if function}} 14 | /*************************************************************/ 15 | 16 | // Functions 17 | {{#each function}} 18 | 19 | {{> function}} 20 | 21 | {{/each}} 22 | {{/if}} 23 | 24 | 25 | {{#if event}} 26 | /*************************************************************/ 27 | 28 | // Events 29 | {{#each event}} 30 | 31 | {{> event}} 32 | 33 | {{/each}} 34 | {{/if}} 35 | -------------------------------------------------------------------------------- /jsdoc/doc/jsdoc/class.hbs: -------------------------------------------------------------------------------- 1 | /** 2 | * @name {{name}} 3 | * @kind class 4 | * @classdesc {{{classdesc}}} 5 | * 6 | {{#each augments}} 7 | * @extends {{this}} 8 | {{/each}} 9 | * 10 | {{#each fires}} 11 | * @fires {{this}} 12 | {{/each}} 13 | *{{#if exported}} @alias {{{exported}}} 14 | * 15 | * @constructor 16 | * {{{description}}} 17 | {{> params-table}} 18 | * 19 | {{/if}} 20 | */ 21 | {{> method}} 22 | 23 | {{> children children}} 24 | -------------------------------------------------------------------------------- /jsdoc/doc/jsdoc/event.hbs: -------------------------------------------------------------------------------- 1 | /** 2 | * {{{description}}} 3 | * {{#if type.names}}@type {{> type}}{{/if}} 4 | * @name {{{longname}}} 5 | * @kind event 6 | {{> params-table}} 7 | */ 8 | "{{{longname}}}": "", 9 | -------------------------------------------------------------------------------- /jsdoc/doc/jsdoc/export-tree.hbs: -------------------------------------------------------------------------------- 1 | {{#each sub}} 2 | {{#unless link}} 3 | /** 4 | * @name {{full}} 5 | * @namespace 6 | */ 7 | "{{full}}": {}, 8 | {{/unless}} 9 | 10 | {{> export-tree}} 11 | {{/each}} 12 | -------------------------------------------------------------------------------- /jsdoc/doc/jsdoc/fullname.hbs: -------------------------------------------------------------------------------- 1 | {{#if parent}}{{{parent.longname}}}{{#if static}}.{{else inner}}~{{else}}#{{/if}}{{/if}}{{{name}}} 2 | -------------------------------------------------------------------------------- /jsdoc/doc/jsdoc/function.hbs: -------------------------------------------------------------------------------- 1 | /** 2 | * {{{description}}} 3 | * @function 4 | * @name {{> fullname}} 5 | * {{#if exported}}@alias {{exported}}{{/if}} 6 | {{> params-table}} 7 | * {{#if returns.type.names}}@returns {{>type returns}} - {{{returns.description}}}{{/if}} 8 | */ 9 | {{> method}} 10 | -------------------------------------------------------------------------------- /jsdoc/doc/jsdoc/layout.hbs: -------------------------------------------------------------------------------- 1 | ({ 2 | {{> export-tree exportTree}} 3 | 4 | {{#if linear.class}} 5 | /*************************************************************/ 6 | 7 | // Classes 8 | 9 | {{#each linear.class}} 10 | //-----------------------------------------------------------// 11 | 12 | {{> class}} 13 | {{/each}} 14 | {{/if}} 15 | 16 | 17 | {{#if linear.typedef}} 18 | /*************************************************************/ 19 | 20 | // Typedefs 21 | {{#each linear.typedef}} 22 | //-----------------------------------------------------------// 23 | 24 | {{> typedef}} 25 | {{/each}} 26 | {{/if}} 27 | 28 | 29 | {{#if linear.namespace}} 30 | /*************************************************************/ 31 | 32 | // Namespaces 33 | {{#each linear.namespace}} 34 | //-----------------------------------------------------------// 35 | 36 | {{> namespace}} 37 | {{/each}} 38 | {{/if}} 39 | 40 | {{> children linear}} 41 | }) 42 | -------------------------------------------------------------------------------- /jsdoc/doc/jsdoc/member.hbs: -------------------------------------------------------------------------------- 1 | /** 2 | * {{{description}}} 3 | * @name {{> fullname}} 4 | * {{#if type.names}}@type {{> type}}{{/if}} 5 | * {{#if const}}@const{{/if}} 6 | {{> property-table}} 7 | */ 8 | 9 | "{{> fullname}}": undefined, 10 | -------------------------------------------------------------------------------- /jsdoc/doc/jsdoc/method.hbs: -------------------------------------------------------------------------------- 1 | "{{> fullname}}": function({{#each params}}{{#unless @first}}, {{/unless}}{{{name}}}{{/each}}){}, 2 | -------------------------------------------------------------------------------- /jsdoc/doc/jsdoc/namespace.hbs: -------------------------------------------------------------------------------- 1 | /** 2 | * {{{description}}} 3 | * @name {{{longname}}} 4 | * {{#if exported}}@alias {{{exported}}}{{/if}} 5 | {{> property-table}} 6 | * @namespace 7 | */ 8 | "{{{longname}}}": {}, 9 | 10 | {{> children children}} 11 | -------------------------------------------------------------------------------- /jsdoc/doc/jsdoc/params-table.hbs: -------------------------------------------------------------------------------- 1 | {{#each params}} 2 | * @param {{> type}} {{#if optional}}[{{/if}}{{{name}}}{{#if defaultValue}}={{{defaultValue}}}{{/if}}{{#if optional}}]{{/if}} - {{{description}}} 3 | {{/each}} 4 | -------------------------------------------------------------------------------- /jsdoc/doc/jsdoc/property-table.hbs: -------------------------------------------------------------------------------- 1 | {{#each properties}} 2 | * @property {{> type}} {{#if optional}}[{{/if}}{{{name}}}{{#if defaultValue}}={{{defaultValue}}}{{/if}}{{#if optional}}]{{/if}} - {{{description}}} 3 | {{/each}} 4 | -------------------------------------------------------------------------------- /jsdoc/doc/jsdoc/type.hbs: -------------------------------------------------------------------------------- 1 | {{#if type.names}}\{ {{#each type.names}}{{#unless @first}} | {{/unless}}{{{this}}}{{/each}} \}{{/if}} 2 | -------------------------------------------------------------------------------- /jsdoc/doc/jsdoc/typedef.hbs: -------------------------------------------------------------------------------- 1 | /** 2 | * {{{description}}} 3 | * @typedef {{> type}} {{{name}}} 4 | * {{#if parent}}@memberof {{parent.longname}}{{/if}} 5 | * {{#if static}}@static{{/if}} 6 | * {{#if inner}}@inner{{/if}} 7 | {{> property-table}} 8 | */ 9 | 10 | {{> children children}} 11 | -------------------------------------------------------------------------------- /jsdoc/doc/render.gfm.js: -------------------------------------------------------------------------------- 1 | var cleanupTags = /<\/?(ul|li|p)>/g; 2 | var unescape = /\\(\{|\})/g; 3 | var beautify = /(\n[\t ]*){3,}/g; 4 | 5 | var trim = /^\s*|\s*$/g; 6 | var link = /\{@link (.*?) *\}/g; 7 | var linkhref = /\{@linkhref (.*?) ([^\}]*) *\}/g; 8 | var ltgt = /<(.*?)>/; 9 | 10 | module.exports = function(page, data) { 11 | page = page.replace(cleanupTags, "") 12 | .replace(unescape, "$1") 13 | .replace(/\r/g, "").replace(beautify, "\n\n"); 14 | 15 | page = page.replace(link, function(_, link) { 16 | if (ltgt.test(link)) { 17 | return link.replace(ltgt, function(_, parts) { 18 | return "< " + parts.split(",").map(function(types) { 19 | return types.split("|") 20 | .map(function(type) { return "{@link " + type.replace(trim, "") + "}" }) 21 | .join(" \\| "); 22 | }).join(", ") + " >"; 23 | }); 24 | } 25 | 26 | return "{@link " + link + "}"; 27 | }); 28 | 29 | page = page.replace(link, function(_, linkData) { 30 | linkData = linkData.split(" "); 31 | var linkPath = linkData.shift(); 32 | var linkName = linkData.shift() || linkPath; 33 | 34 | if (data.links[linkPath]) { 35 | return "[" + linkName + "](" + data.links[linkPath] + ")"; 36 | } else { 37 | return linkName; 38 | } 39 | }); 40 | 41 | page = page.replace(linkhref, "[$2]($1)"); 42 | 43 | return page; 44 | }; 45 | -------------------------------------------------------------------------------- /jsdoc/doc/render.jsdoc.js: -------------------------------------------------------------------------------- 1 | var cleanupTags = /<\/?(ul|li|p)>/g; 2 | var bbcodes = /\{\[(.*?)\]\}/g; 3 | var unescape = /\\(\{|\})/g; 4 | var beautify_lines = /(\n[\t ]*){3,}/g; 5 | var beautify_asterix = /([\t ]*\*[\t ]*\n){2,}/g; 6 | var linkhref = /\{@linkhref (.*?) ([^\}]*) *\}/g; 7 | 8 | var doclet = /\/\*\*[\s\S]*?\*\//g; 9 | 10 | module.exports = function(page, data, style) { 11 | page = page.replace(cleanupTags, "") 12 | .replace(unescape, "$1") 13 | .replace(bbcodes, "<$1>"); 14 | 15 | if (style === 'tech') { 16 | page = page.replace(linkhref, "$2"); 17 | } else { 18 | page = page.replace(linkhref, "{@link $1 $2}"); 19 | } 20 | 21 | var aliases = []; 22 | 23 | page = page.replace(doclet, function(doclet) { 24 | var alias = /@alias (.*)/g; 25 | var name = /@name (.*)/g; 26 | 27 | var rawName; 28 | if (rawName = name.exec(doclet)) { 29 | rawName = rawName[1]; 30 | 31 | doclet = doclet.replace(alias, function(_, aliasName) { 32 | aliases.push({ 33 | reg: new RegExp("([^\\w.#~\/])" + rawName + "([^\\w])", "g"), 34 | rep: "$1" + aliasName + "$2" 35 | // rep: aliasName 36 | }); 37 | 38 | return ""; 39 | }); 40 | } 41 | 42 | return doclet; 43 | }); 44 | 45 | // console.log("-----------------------------"); 46 | // console.log(aliases); 47 | 48 | aliases.forEach(function(alias) { 49 | page = page.replace(alias.reg, alias.rep); 50 | }); 51 | 52 | if (style === "tech") { 53 | page = page 54 | .replace(/\.<([^/]*?)>/g, ".<$1>") 55 | .replace(/<(\/?)code>/g, "<$1codeph>") 56 | .replace(/<(\/?)strong>/g, "<$1b>") 57 | .replace(/ya\.music\./g, "") 58 | .replace(/Array\.<([^/]*?)>/g, "$1[]") 59 | .replace(/ Error( |$)/mg, 60 | " Error "); 61 | } 62 | 63 | return page.replace(/\r/g, "").replace(beautify_lines, "\n\n") 64 | .replace(beautify_asterix, " *\n"); 65 | }; 66 | -------------------------------------------------------------------------------- /jsdoc/jsdoc.public.json: -------------------------------------------------------------------------------- 1 | { 2 | "tags": { 3 | "allowUnknownTags": true 4 | }, 5 | "source": { 6 | "include": [ 7 | "src/" 8 | ], 9 | "exclude": [], 10 | "includePattern": ".+\\.(js)(doc)?$" 11 | }, 12 | "plugins": ["plugins/markdown"], 13 | "markdown": { 14 | "parser": "gfm", 15 | "hardwrap": false 16 | }, 17 | 18 | "templates": { 19 | "applicationName": "YandexAudio", 20 | "disqus": "", 21 | "googleAnalytics": "", 22 | "openGraph": { 23 | "title": "", 24 | "type": "website", 25 | "image": "", 26 | "site_name": "", 27 | "url": "" 28 | }, 29 | "meta": { 30 | "title": "", 31 | "description": "", 32 | "keyword": "" 33 | }, 34 | "linenums": true 35 | }, 36 | 37 | "opts": { 38 | "template": "jsdoc/doc", 39 | "recurse": true, 40 | "encoding": "utf8", 41 | "destination": "spec/", 42 | "private": false, 43 | "lenient": true, 44 | "readme": "readme.md", 45 | "tutorials": "tutorial/" 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /node_modules/handlebars/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "spec/mustache"] 2 | path = spec/mustache 3 | url = git://github.com/mustache/spec.git 4 | -------------------------------------------------------------------------------- /node_modules/handlebars/.istanbul.yml: -------------------------------------------------------------------------------- 1 | instrumentation: 2 | excludes: ['**/spec/**'] 3 | -------------------------------------------------------------------------------- /node_modules/handlebars/.npmignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .gitignore 3 | .rvmrc 4 | .eslintrc 5 | .travis.yml 6 | .rspec 7 | Gemfile 8 | Gemfile.lock 9 | Rakefile 10 | Gruntfile.js 11 | *.gemspec 12 | *.nuspec 13 | *.log 14 | bench/* 15 | configurations/* 16 | components/* 17 | coverage/* 18 | dist/cdnjs/* 19 | dist/components/* 20 | spec/* 21 | src/* 22 | tasks/* 23 | tmp/* 24 | publish/* 25 | vendor/* 26 | -------------------------------------------------------------------------------- /node_modules/handlebars/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2011-2015 by Yehuda Katz 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /node_modules/handlebars/dist/amd/handlebars/compiler/base.js: -------------------------------------------------------------------------------- 1 | define(['exports', './parser', './whitespace-control', './helpers', '../utils'], function (exports, _parser, _whitespaceControl, _helpers, _utils) { 2 | 'use strict'; 3 | 4 | exports.__esModule = true; 5 | exports.parse = parse; 6 | // istanbul ignore next 7 | 8 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 9 | 10 | var _parser2 = _interopRequireDefault(_parser); 11 | 12 | var _WhitespaceControl = _interopRequireDefault(_whitespaceControl); 13 | 14 | exports.parser = _parser2['default']; 15 | 16 | var yy = {}; 17 | _utils.extend(yy, _helpers); 18 | 19 | function parse(input, options) { 20 | // Just return if an already-compiled AST was passed in. 21 | if (input.type === 'Program') { 22 | return input; 23 | } 24 | 25 | _parser2['default'].yy = yy; 26 | 27 | // Altering the shared object here, but this is ok as parser is a sync operation 28 | yy.locInfo = function (locInfo) { 29 | return new yy.SourceLocation(options && options.srcName, locInfo); 30 | }; 31 | 32 | var strip = new _WhitespaceControl['default'](options); 33 | return strip.accept(_parser2['default'].parse(input)); 34 | } 35 | }); 36 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2Jhc2UuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7OztVQUtTLE1BQU07O0FBRWYsTUFBSSxFQUFFLEdBQUcsRUFBRSxDQUFDO0FBQ1osU0FMUyxNQUFNLENBS1IsRUFBRSxXQUFVLENBQUM7O0FBRWIsV0FBUyxLQUFLLENBQUMsS0FBSyxFQUFFLE9BQU8sRUFBRTs7QUFFcEMsUUFBSSxLQUFLLENBQUMsSUFBSSxLQUFLLFNBQVMsRUFBRTtBQUFFLGFBQU8sS0FBSyxDQUFDO0tBQUU7O0FBRS9DLHdCQUFPLEVBQUUsR0FBRyxFQUFFLENBQUM7OztBQUdmLE1BQUUsQ0FBQyxPQUFPLEdBQUcsVUFBUyxPQUFPLEVBQUU7QUFDN0IsYUFBTyxJQUFJLEVBQUUsQ0FBQyxjQUFjLENBQUMsT0FBTyxJQUFJLE9BQU8sQ0FBQyxPQUFPLEVBQUUsT0FBTyxDQUFDLENBQUM7S0FDbkUsQ0FBQzs7QUFFRixRQUFJLEtBQUssR0FBRyxrQ0FBc0IsT0FBTyxDQUFDLENBQUM7QUFDM0MsV0FBTyxLQUFLLENBQUMsTUFBTSxDQUFDLG9CQUFPLEtBQUssQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDO0dBQzFDIiwiZmlsZSI6ImJhc2UuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgcGFyc2VyIGZyb20gJy4vcGFyc2VyJztcbmltcG9ydCBXaGl0ZXNwYWNlQ29udHJvbCBmcm9tICcuL3doaXRlc3BhY2UtY29udHJvbCc7XG5pbXBvcnQgKiBhcyBIZWxwZXJzIGZyb20gJy4vaGVscGVycyc7XG5pbXBvcnQgeyBleHRlbmQgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCB7IHBhcnNlciB9O1xuXG5sZXQgeXkgPSB7fTtcbmV4dGVuZCh5eSwgSGVscGVycyk7XG5cbmV4cG9ydCBmdW5jdGlvbiBwYXJzZShpbnB1dCwgb3B0aW9ucykge1xuICAvLyBKdXN0IHJldHVybiBpZiBhbiBhbHJlYWR5LWNvbXBpbGVkIEFTVCB3YXMgcGFzc2VkIGluLlxuICBpZiAoaW5wdXQudHlwZSA9PT0gJ1Byb2dyYW0nKSB7IHJldHVybiBpbnB1dDsgfVxuXG4gIHBhcnNlci55eSA9IHl5O1xuXG4gIC8vIEFsdGVyaW5nIHRoZSBzaGFyZWQgb2JqZWN0IGhlcmUsIGJ1dCB0aGlzIGlzIG9rIGFzIHBhcnNlciBpcyBhIHN5bmMgb3BlcmF0aW9uXG4gIHl5LmxvY0luZm8gPSBmdW5jdGlvbihsb2NJbmZvKSB7XG4gICAgcmV0dXJuIG5ldyB5eS5Tb3VyY2VMb2NhdGlvbihvcHRpb25zICYmIG9wdGlvbnMuc3JjTmFtZSwgbG9jSW5mbyk7XG4gIH07XG5cbiAgbGV0IHN0cmlwID0gbmV3IFdoaXRlc3BhY2VDb250cm9sKG9wdGlvbnMpO1xuICByZXR1cm4gc3RyaXAuYWNjZXB0KHBhcnNlci5wYXJzZShpbnB1dCkpO1xufVxuIl19 37 | -------------------------------------------------------------------------------- /node_modules/handlebars/dist/amd/handlebars/decorators.js: -------------------------------------------------------------------------------- 1 | define(['exports', './decorators/inline'], function (exports, _decoratorsInline) { 2 | 'use strict'; 3 | 4 | exports.__esModule = true; 5 | exports.registerDefaultDecorators = registerDefaultDecorators; 6 | // istanbul ignore next 7 | 8 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 9 | 10 | var _registerInline = _interopRequireDefault(_decoratorsInline); 11 | 12 | function registerDefaultDecorators(instance) { 13 | _registerInline['default'](instance); 14 | } 15 | }); 16 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2RlY29yYXRvcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFFTyxXQUFTLHlCQUF5QixDQUFDLFFBQVEsRUFBRTtBQUNsRCwrQkFBZSxRQUFRLENBQUMsQ0FBQztHQUMxQiIsImZpbGUiOiJkZWNvcmF0b3JzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHJlZ2lzdGVySW5saW5lIGZyb20gJy4vZGVjb3JhdG9ycy9pbmxpbmUnO1xuXG5leHBvcnQgZnVuY3Rpb24gcmVnaXN0ZXJEZWZhdWx0RGVjb3JhdG9ycyhpbnN0YW5jZSkge1xuICByZWdpc3RlcklubGluZShpbnN0YW5jZSk7XG59XG5cbiJdfQ== 17 | -------------------------------------------------------------------------------- /node_modules/handlebars/dist/amd/handlebars/decorators/inline.js: -------------------------------------------------------------------------------- 1 | define(['exports', 'module', '../utils'], function (exports, module, _utils) { 2 | 'use strict'; 3 | 4 | module.exports = function (instance) { 5 | instance.registerDecorator('inline', function (fn, props, container, options) { 6 | var ret = fn; 7 | if (!props.partials) { 8 | props.partials = {}; 9 | ret = function (context, options) { 10 | // Create a new partials stack frame prior to exec. 11 | var original = container.partials; 12 | container.partials = _utils.extend({}, original, props.partials); 13 | var ret = fn(context, options); 14 | container.partials = original; 15 | return ret; 16 | }; 17 | } 18 | 19 | props.partials[options.args[0]] = options.fn; 20 | 21 | return ret; 22 | }); 23 | }; 24 | }); 25 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2RlY29yYXRvcnMvaW5saW5lLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OzttQkFFZSxVQUFTLFFBQVEsRUFBRTtBQUNoQyxZQUFRLENBQUMsaUJBQWlCLENBQUMsUUFBUSxFQUFFLFVBQVMsRUFBRSxFQUFFLEtBQUssRUFBRSxTQUFTLEVBQUUsT0FBTyxFQUFFO0FBQzNFLFVBQUksR0FBRyxHQUFHLEVBQUUsQ0FBQztBQUNiLFVBQUksQ0FBQyxLQUFLLENBQUMsUUFBUSxFQUFFO0FBQ25CLGFBQUssQ0FBQyxRQUFRLEdBQUcsRUFBRSxDQUFDO0FBQ3BCLFdBQUcsR0FBRyxVQUFTLE9BQU8sRUFBRSxPQUFPLEVBQUU7O0FBRS9CLGNBQUksUUFBUSxHQUFHLFNBQVMsQ0FBQyxRQUFRLENBQUM7QUFDbEMsbUJBQVMsQ0FBQyxRQUFRLEdBQUcsT0FWckIsTUFBTSxDQVVzQixFQUFFLEVBQUUsUUFBUSxFQUFFLEtBQUssQ0FBQyxRQUFRLENBQUMsQ0FBQztBQUMxRCxjQUFJLEdBQUcsR0FBRyxFQUFFLENBQUMsT0FBTyxFQUFFLE9BQU8sQ0FBQyxDQUFDO0FBQy9CLG1CQUFTLENBQUMsUUFBUSxHQUFHLFFBQVEsQ0FBQztBQUM5QixpQkFBTyxHQUFHLENBQUM7U0FDWixDQUFDO09BQ0g7O0FBRUQsV0FBSyxDQUFDLFFBQVEsQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFDLEdBQUcsT0FBTyxDQUFDLEVBQUUsQ0FBQzs7QUFFN0MsYUFBTyxHQUFHLENBQUM7S0FDWixDQUFDLENBQUM7R0FDSiIsImZpbGUiOiJpbmxpbmUuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge2V4dGVuZH0gZnJvbSAnLi4vdXRpbHMnO1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbihpbnN0YW5jZSkge1xuICBpbnN0YW5jZS5yZWdpc3RlckRlY29yYXRvcignaW5saW5lJywgZnVuY3Rpb24oZm4sIHByb3BzLCBjb250YWluZXIsIG9wdGlvbnMpIHtcbiAgICBsZXQgcmV0ID0gZm47XG4gICAgaWYgKCFwcm9wcy5wYXJ0aWFscykge1xuICAgICAgcHJvcHMucGFydGlhbHMgPSB7fTtcbiAgICAgIHJldCA9IGZ1bmN0aW9uKGNvbnRleHQsIG9wdGlvbnMpIHtcbiAgICAgICAgLy8gQ3JlYXRlIGEgbmV3IHBhcnRpYWxzIHN0YWNrIGZyYW1lIHByaW9yIHRvIGV4ZWMuXG4gICAgICAgIGxldCBvcmlnaW5hbCA9IGNvbnRhaW5lci5wYXJ0aWFscztcbiAgICAgICAgY29udGFpbmVyLnBhcnRpYWxzID0gZXh0ZW5kKHt9LCBvcmlnaW5hbCwgcHJvcHMucGFydGlhbHMpO1xuICAgICAgICBsZXQgcmV0ID0gZm4oY29udGV4dCwgb3B0aW9ucyk7XG4gICAgICAgIGNvbnRhaW5lci5wYXJ0aWFscyA9IG9yaWdpbmFsO1xuICAgICAgICByZXR1cm4gcmV0O1xuICAgICAgfTtcbiAgICB9XG5cbiAgICBwcm9wcy5wYXJ0aWFsc1tvcHRpb25zLmFyZ3NbMF1dID0gb3B0aW9ucy5mbjtcblxuICAgIHJldHVybiByZXQ7XG4gIH0pO1xufVxuIl19 26 | -------------------------------------------------------------------------------- /node_modules/handlebars/dist/amd/handlebars/helpers.js: -------------------------------------------------------------------------------- 1 | define(['exports', './helpers/block-helper-missing', './helpers/each', './helpers/helper-missing', './helpers/if', './helpers/log', './helpers/lookup', './helpers/with'], function (exports, _helpersBlockHelperMissing, _helpersEach, _helpersHelperMissing, _helpersIf, _helpersLog, _helpersLookup, _helpersWith) { 2 | 'use strict'; 3 | 4 | exports.__esModule = true; 5 | exports.registerDefaultHelpers = registerDefaultHelpers; 6 | // istanbul ignore next 7 | 8 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 9 | 10 | var _registerBlockHelperMissing = _interopRequireDefault(_helpersBlockHelperMissing); 11 | 12 | var _registerEach = _interopRequireDefault(_helpersEach); 13 | 14 | var _registerHelperMissing = _interopRequireDefault(_helpersHelperMissing); 15 | 16 | var _registerIf = _interopRequireDefault(_helpersIf); 17 | 18 | var _registerLog = _interopRequireDefault(_helpersLog); 19 | 20 | var _registerLookup = _interopRequireDefault(_helpersLookup); 21 | 22 | var _registerWith = _interopRequireDefault(_helpersWith); 23 | 24 | function registerDefaultHelpers(instance) { 25 | _registerBlockHelperMissing['default'](instance); 26 | _registerEach['default'](instance); 27 | _registerHelperMissing['default'](instance); 28 | _registerIf['default'](instance); 29 | _registerLog['default'](instance); 30 | _registerLookup['default'](instance); 31 | _registerWith['default'](instance); 32 | } 33 | }); 34 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFRTyxXQUFTLHNCQUFzQixDQUFDLFFBQVEsRUFBRTtBQUMvQywyQ0FBMkIsUUFBUSxDQUFDLENBQUM7QUFDckMsNkJBQWEsUUFBUSxDQUFDLENBQUM7QUFDdkIsc0NBQXNCLFFBQVEsQ0FBQyxDQUFDO0FBQ2hDLDJCQUFXLFFBQVEsQ0FBQyxDQUFDO0FBQ3JCLDRCQUFZLFFBQVEsQ0FBQyxDQUFDO0FBQ3RCLCtCQUFlLFFBQVEsQ0FBQyxDQUFDO0FBQ3pCLDZCQUFhLFFBQVEsQ0FBQyxDQUFDO0dBQ3hCIiwiZmlsZSI6ImhlbHBlcnMuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgcmVnaXN0ZXJCbG9ja0hlbHBlck1pc3NpbmcgZnJvbSAnLi9oZWxwZXJzL2Jsb2NrLWhlbHBlci1taXNzaW5nJztcbmltcG9ydCByZWdpc3RlckVhY2ggZnJvbSAnLi9oZWxwZXJzL2VhY2gnO1xuaW1wb3J0IHJlZ2lzdGVySGVscGVyTWlzc2luZyBmcm9tICcuL2hlbHBlcnMvaGVscGVyLW1pc3NpbmcnO1xuaW1wb3J0IHJlZ2lzdGVySWYgZnJvbSAnLi9oZWxwZXJzL2lmJztcbmltcG9ydCByZWdpc3RlckxvZyBmcm9tICcuL2hlbHBlcnMvbG9nJztcbmltcG9ydCByZWdpc3Rlckxvb2t1cCBmcm9tICcuL2hlbHBlcnMvbG9va3VwJztcbmltcG9ydCByZWdpc3RlcldpdGggZnJvbSAnLi9oZWxwZXJzL3dpdGgnO1xuXG5leHBvcnQgZnVuY3Rpb24gcmVnaXN0ZXJEZWZhdWx0SGVscGVycyhpbnN0YW5jZSkge1xuICByZWdpc3RlckJsb2NrSGVscGVyTWlzc2luZyhpbnN0YW5jZSk7XG4gIHJlZ2lzdGVyRWFjaChpbnN0YW5jZSk7XG4gIHJlZ2lzdGVySGVscGVyTWlzc2luZyhpbnN0YW5jZSk7XG4gIHJlZ2lzdGVySWYoaW5zdGFuY2UpO1xuICByZWdpc3RlckxvZyhpbnN0YW5jZSk7XG4gIHJlZ2lzdGVyTG9va3VwKGluc3RhbmNlKTtcbiAgcmVnaXN0ZXJXaXRoKGluc3RhbmNlKTtcbn1cbiJdfQ== 35 | -------------------------------------------------------------------------------- /node_modules/handlebars/dist/amd/handlebars/helpers/helper-missing.js: -------------------------------------------------------------------------------- 1 | define(['exports', 'module', '../exception'], function (exports, module, _exception) { 2 | 'use strict'; 3 | 4 | // istanbul ignore next 5 | 6 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 7 | 8 | var _Exception = _interopRequireDefault(_exception); 9 | 10 | module.exports = function (instance) { 11 | instance.registerHelper('helperMissing', function () /* [args, ]options */{ 12 | if (arguments.length === 1) { 13 | // A missing field in a {{foo}} construct. 14 | return undefined; 15 | } else { 16 | // Someone is actually trying to call something, blow up. 17 | throw new _Exception['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"'); 18 | } 19 | }); 20 | }; 21 | }); 22 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvaGVscGVyLW1pc3NpbmcuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O21CQUVlLFVBQVMsUUFBUSxFQUFFO0FBQ2hDLFlBQVEsQ0FBQyxjQUFjLENBQUMsZUFBZSxFQUFFLGlDQUFnQztBQUN2RSxVQUFJLFNBQVMsQ0FBQyxNQUFNLEtBQUssQ0FBQyxFQUFFOztBQUUxQixlQUFPLFNBQVMsQ0FBQztPQUNsQixNQUFNOztBQUVMLGNBQU0sMEJBQWMsbUJBQW1CLEdBQUcsU0FBUyxDQUFDLFNBQVMsQ0FBQyxNQUFNLEdBQUcsQ0FBQyxDQUFDLENBQUMsSUFBSSxHQUFHLEdBQUcsQ0FBQyxDQUFDO09BQ3ZGO0tBQ0YsQ0FBQyxDQUFDO0dBQ0oiLCJmaWxlIjoiaGVscGVyLW1pc3NpbmcuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgRXhjZXB0aW9uIGZyb20gJy4uL2V4Y2VwdGlvbic7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uKGluc3RhbmNlKSB7XG4gIGluc3RhbmNlLnJlZ2lzdGVySGVscGVyKCdoZWxwZXJNaXNzaW5nJywgZnVuY3Rpb24oLyogW2FyZ3MsIF1vcHRpb25zICovKSB7XG4gICAgaWYgKGFyZ3VtZW50cy5sZW5ndGggPT09IDEpIHtcbiAgICAgIC8vIEEgbWlzc2luZyBmaWVsZCBpbiBhIHt7Zm9vfX0gY29uc3RydWN0LlxuICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICB9IGVsc2Uge1xuICAgICAgLy8gU29tZW9uZSBpcyBhY3R1YWxseSB0cnlpbmcgdG8gY2FsbCBzb21ldGhpbmcsIGJsb3cgdXAuXG4gICAgICB0aHJvdyBuZXcgRXhjZXB0aW9uKCdNaXNzaW5nIGhlbHBlcjogXCInICsgYXJndW1lbnRzW2FyZ3VtZW50cy5sZW5ndGggLSAxXS5uYW1lICsgJ1wiJyk7XG4gICAgfVxuICB9KTtcbn1cbiJdfQ== 23 | -------------------------------------------------------------------------------- /node_modules/handlebars/dist/amd/handlebars/helpers/log.js: -------------------------------------------------------------------------------- 1 | define(['exports', 'module'], function (exports, module) { 2 | 'use strict'; 3 | 4 | module.exports = function (instance) { 5 | instance.registerHelper('log', function () /* message, options */{ 6 | var args = [undefined], 7 | options = arguments[arguments.length - 1]; 8 | for (var i = 0; i < arguments.length - 1; i++) { 9 | args.push(arguments[i]); 10 | } 11 | 12 | var level = 1; 13 | if (options.hash.level != null) { 14 | level = options.hash.level; 15 | } else if (options.data && options.data.level != null) { 16 | level = options.data.level; 17 | } 18 | args[0] = level; 19 | 20 | instance.log.apply(instance, args); 21 | }); 22 | }; 23 | }); 24 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvbG9nLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OzttQkFBZSxVQUFTLFFBQVEsRUFBRTtBQUNoQyxZQUFRLENBQUMsY0FBYyxDQUFDLEtBQUssRUFBRSxrQ0FBaUM7QUFDOUQsVUFBSSxJQUFJLEdBQUcsQ0FBQyxTQUFTLENBQUM7VUFDbEIsT0FBTyxHQUFHLFNBQVMsQ0FBQyxTQUFTLENBQUMsTUFBTSxHQUFHLENBQUMsQ0FBQyxDQUFDO0FBQzlDLFdBQUssSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsR0FBRyxTQUFTLENBQUMsTUFBTSxHQUFHLENBQUMsRUFBRSxDQUFDLEVBQUUsRUFBRTtBQUM3QyxZQUFJLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO09BQ3pCOztBQUVELFVBQUksS0FBSyxHQUFHLENBQUMsQ0FBQztBQUNkLFVBQUksT0FBTyxDQUFDLElBQUksQ0FBQyxLQUFLLElBQUksSUFBSSxFQUFFO0FBQzlCLGFBQUssR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQztPQUM1QixNQUFNLElBQUksT0FBTyxDQUFDLElBQUksSUFBSSxPQUFPLENBQUMsSUFBSSxDQUFDLEtBQUssSUFBSSxJQUFJLEVBQUU7QUFDckQsYUFBSyxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDO09BQzVCO0FBQ0QsVUFBSSxDQUFDLENBQUMsQ0FBQyxHQUFHLEtBQUssQ0FBQzs7QUFFaEIsY0FBUSxDQUFDLEdBQUcsTUFBQSxDQUFaLFFBQVEsRUFBUyxJQUFJLENBQUMsQ0FBQztLQUN4QixDQUFDLENBQUM7R0FDSiIsImZpbGUiOiJsb2cuanMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZGVmYXVsdCBmdW5jdGlvbihpbnN0YW5jZSkge1xuICBpbnN0YW5jZS5yZWdpc3RlckhlbHBlcignbG9nJywgZnVuY3Rpb24oLyogbWVzc2FnZSwgb3B0aW9ucyAqLykge1xuICAgIGxldCBhcmdzID0gW3VuZGVmaW5lZF0sXG4gICAgICAgIG9wdGlvbnMgPSBhcmd1bWVudHNbYXJndW1lbnRzLmxlbmd0aCAtIDFdO1xuICAgIGZvciAobGV0IGkgPSAwOyBpIDwgYXJndW1lbnRzLmxlbmd0aCAtIDE7IGkrKykge1xuICAgICAgYXJncy5wdXNoKGFyZ3VtZW50c1tpXSk7XG4gICAgfVxuXG4gICAgbGV0IGxldmVsID0gMTtcbiAgICBpZiAob3B0aW9ucy5oYXNoLmxldmVsICE9IG51bGwpIHtcbiAgICAgIGxldmVsID0gb3B0aW9ucy5oYXNoLmxldmVsO1xuICAgIH0gZWxzZSBpZiAob3B0aW9ucy5kYXRhICYmIG9wdGlvbnMuZGF0YS5sZXZlbCAhPSBudWxsKSB7XG4gICAgICBsZXZlbCA9IG9wdGlvbnMuZGF0YS5sZXZlbDtcbiAgICB9XG4gICAgYXJnc1swXSA9IGxldmVsO1xuXG4gICAgaW5zdGFuY2UubG9nKC4uLiBhcmdzKTtcbiAgfSk7XG59XG4iXX0= 25 | -------------------------------------------------------------------------------- /node_modules/handlebars/dist/amd/handlebars/helpers/lookup.js: -------------------------------------------------------------------------------- 1 | define(['exports', 'module'], function (exports, module) { 2 | 'use strict'; 3 | 4 | module.exports = function (instance) { 5 | instance.registerHelper('lookup', function (obj, field) { 6 | return obj && obj[field]; 7 | }); 8 | }; 9 | }); 10 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvbG9va3VwLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OzttQkFBZSxVQUFTLFFBQVEsRUFBRTtBQUNoQyxZQUFRLENBQUMsY0FBYyxDQUFDLFFBQVEsRUFBRSxVQUFTLEdBQUcsRUFBRSxLQUFLLEVBQUU7QUFDckQsYUFBTyxHQUFHLElBQUksR0FBRyxDQUFDLEtBQUssQ0FBQyxDQUFDO0tBQzFCLENBQUMsQ0FBQztHQUNKIiwiZmlsZSI6Imxvb2t1cC5qcyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uKGluc3RhbmNlKSB7XG4gIGluc3RhbmNlLnJlZ2lzdGVySGVscGVyKCdsb29rdXAnLCBmdW5jdGlvbihvYmosIGZpZWxkKSB7XG4gICAgcmV0dXJuIG9iaiAmJiBvYmpbZmllbGRdO1xuICB9KTtcbn1cbiJdfQ== 11 | -------------------------------------------------------------------------------- /node_modules/handlebars/dist/amd/handlebars/no-conflict.js: -------------------------------------------------------------------------------- 1 | define(['exports', 'module'], function (exports, module) { 2 | /* global window */ 3 | 'use strict'; 4 | 5 | module.exports = function (Handlebars) { 6 | /* istanbul ignore next */ 7 | var root = typeof global !== 'undefined' ? global : window, 8 | $Handlebars = root.Handlebars; 9 | /* istanbul ignore next */ 10 | Handlebars.noConflict = function () { 11 | if (root.Handlebars === Handlebars) { 12 | root.Handlebars = $Handlebars; 13 | } 14 | return Handlebars; 15 | }; 16 | }; 17 | }); 18 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL25vLWNvbmZsaWN0LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7bUJBQ2UsVUFBUyxVQUFVLEVBQUU7O0FBRWxDLFFBQUksSUFBSSxHQUFHLE9BQU8sTUFBTSxLQUFLLFdBQVcsR0FBRyxNQUFNLEdBQUcsTUFBTTtRQUN0RCxXQUFXLEdBQUcsSUFBSSxDQUFDLFVBQVUsQ0FBQzs7QUFFbEMsY0FBVSxDQUFDLFVBQVUsR0FBRyxZQUFXO0FBQ2pDLFVBQUksSUFBSSxDQUFDLFVBQVUsS0FBSyxVQUFVLEVBQUU7QUFDbEMsWUFBSSxDQUFDLFVBQVUsR0FBRyxXQUFXLENBQUM7T0FDL0I7QUFDRCxhQUFPLFVBQVUsQ0FBQztLQUNuQixDQUFDO0dBQ0giLCJmaWxlIjoibm8tY29uZmxpY3QuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvKiBnbG9iYWwgd2luZG93ICovXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbihIYW5kbGViYXJzKSB7XG4gIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gIGxldCByb290ID0gdHlwZW9mIGdsb2JhbCAhPT0gJ3VuZGVmaW5lZCcgPyBnbG9iYWwgOiB3aW5kb3csXG4gICAgICAkSGFuZGxlYmFycyA9IHJvb3QuSGFuZGxlYmFycztcbiAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgSGFuZGxlYmFycy5ub0NvbmZsaWN0ID0gZnVuY3Rpb24oKSB7XG4gICAgaWYgKHJvb3QuSGFuZGxlYmFycyA9PT0gSGFuZGxlYmFycykge1xuICAgICAgcm9vdC5IYW5kbGViYXJzID0gJEhhbmRsZWJhcnM7XG4gICAgfVxuICAgIHJldHVybiBIYW5kbGViYXJzO1xuICB9O1xufVxuIl19 19 | -------------------------------------------------------------------------------- /node_modules/handlebars/dist/amd/handlebars/safe-string.js: -------------------------------------------------------------------------------- 1 | define(['exports', 'module'], function (exports, module) { 2 | // Build out our basic SafeString type 3 | 'use strict'; 4 | 5 | function SafeString(string) { 6 | this.string = string; 7 | } 8 | 9 | SafeString.prototype.toString = SafeString.prototype.toHTML = function () { 10 | return '' + this.string; 11 | }; 12 | 13 | module.exports = SafeString; 14 | }); 15 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3NhZmUtc3RyaW5nLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFDQSxXQUFTLFVBQVUsQ0FBQyxNQUFNLEVBQUU7QUFDMUIsUUFBSSxDQUFDLE1BQU0sR0FBRyxNQUFNLENBQUM7R0FDdEI7O0FBRUQsWUFBVSxDQUFDLFNBQVMsQ0FBQyxRQUFRLEdBQUcsVUFBVSxDQUFDLFNBQVMsQ0FBQyxNQUFNLEdBQUcsWUFBVztBQUN2RSxXQUFPLEVBQUUsR0FBRyxJQUFJLENBQUMsTUFBTSxDQUFDO0dBQ3pCLENBQUM7O21CQUVhLFVBQVUiLCJmaWxlIjoic2FmZS1zdHJpbmcuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBCdWlsZCBvdXQgb3VyIGJhc2ljIFNhZmVTdHJpbmcgdHlwZVxuZnVuY3Rpb24gU2FmZVN0cmluZyhzdHJpbmcpIHtcbiAgdGhpcy5zdHJpbmcgPSBzdHJpbmc7XG59XG5cblNhZmVTdHJpbmcucHJvdG90eXBlLnRvU3RyaW5nID0gU2FmZVN0cmluZy5wcm90b3R5cGUudG9IVE1MID0gZnVuY3Rpb24oKSB7XG4gIHJldHVybiAnJyArIHRoaXMuc3RyaW5nO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgU2FmZVN0cmluZztcbiJdfQ== 16 | -------------------------------------------------------------------------------- /node_modules/handlebars/dist/cjs/handlebars/decorators.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | exports.__esModule = true; 4 | exports.registerDefaultDecorators = registerDefaultDecorators; 5 | // istanbul ignore next 6 | 7 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 8 | 9 | var _decoratorsInline = require('./decorators/inline'); 10 | 11 | var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline); 12 | 13 | function registerDefaultDecorators(instance) { 14 | _decoratorsInline2['default'](instance); 15 | } 16 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2RlY29yYXRvcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Z0NBQTJCLHFCQUFxQjs7OztBQUV6QyxTQUFTLHlCQUF5QixDQUFDLFFBQVEsRUFBRTtBQUNsRCxnQ0FBZSxRQUFRLENBQUMsQ0FBQztDQUMxQiIsImZpbGUiOiJkZWNvcmF0b3JzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHJlZ2lzdGVySW5saW5lIGZyb20gJy4vZGVjb3JhdG9ycy9pbmxpbmUnO1xuXG5leHBvcnQgZnVuY3Rpb24gcmVnaXN0ZXJEZWZhdWx0RGVjb3JhdG9ycyhpbnN0YW5jZSkge1xuICByZWdpc3RlcklubGluZShpbnN0YW5jZSk7XG59XG5cbiJdfQ== 17 | -------------------------------------------------------------------------------- /node_modules/handlebars/dist/cjs/handlebars/decorators/inline.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | exports.__esModule = true; 4 | 5 | var _utils = require('../utils'); 6 | 7 | exports['default'] = function (instance) { 8 | instance.registerDecorator('inline', function (fn, props, container, options) { 9 | var ret = fn; 10 | if (!props.partials) { 11 | props.partials = {}; 12 | ret = function (context, options) { 13 | // Create a new partials stack frame prior to exec. 14 | var original = container.partials; 15 | container.partials = _utils.extend({}, original, props.partials); 16 | var ret = fn(context, options); 17 | container.partials = original; 18 | return ret; 19 | }; 20 | } 21 | 22 | props.partials[options.args[0]] = options.fn; 23 | 24 | return ret; 25 | }); 26 | }; 27 | 28 | module.exports = exports['default']; 29 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2RlY29yYXRvcnMvaW5saW5lLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7cUJBQXFCLFVBQVU7O3FCQUVoQixVQUFTLFFBQVEsRUFBRTtBQUNoQyxVQUFRLENBQUMsaUJBQWlCLENBQUMsUUFBUSxFQUFFLFVBQVMsRUFBRSxFQUFFLEtBQUssRUFBRSxTQUFTLEVBQUUsT0FBTyxFQUFFO0FBQzNFLFFBQUksR0FBRyxHQUFHLEVBQUUsQ0FBQztBQUNiLFFBQUksQ0FBQyxLQUFLLENBQUMsUUFBUSxFQUFFO0FBQ25CLFdBQUssQ0FBQyxRQUFRLEdBQUcsRUFBRSxDQUFDO0FBQ3BCLFNBQUcsR0FBRyxVQUFTLE9BQU8sRUFBRSxPQUFPLEVBQUU7O0FBRS9CLFlBQUksUUFBUSxHQUFHLFNBQVMsQ0FBQyxRQUFRLENBQUM7QUFDbEMsaUJBQVMsQ0FBQyxRQUFRLEdBQUcsY0FBTyxFQUFFLEVBQUUsUUFBUSxFQUFFLEtBQUssQ0FBQyxRQUFRLENBQUMsQ0FBQztBQUMxRCxZQUFJLEdBQUcsR0FBRyxFQUFFLENBQUMsT0FBTyxFQUFFLE9BQU8sQ0FBQyxDQUFDO0FBQy9CLGlCQUFTLENBQUMsUUFBUSxHQUFHLFFBQVEsQ0FBQztBQUM5QixlQUFPLEdBQUcsQ0FBQztPQUNaLENBQUM7S0FDSDs7QUFFRCxTQUFLLENBQUMsUUFBUSxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUMsR0FBRyxPQUFPLENBQUMsRUFBRSxDQUFDOztBQUU3QyxXQUFPLEdBQUcsQ0FBQztHQUNaLENBQUMsQ0FBQztDQUNKIiwiZmlsZSI6ImlubGluZS5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7ZXh0ZW5kfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uKGluc3RhbmNlKSB7XG4gIGluc3RhbmNlLnJlZ2lzdGVyRGVjb3JhdG9yKCdpbmxpbmUnLCBmdW5jdGlvbihmbiwgcHJvcHMsIGNvbnRhaW5lciwgb3B0aW9ucykge1xuICAgIGxldCByZXQgPSBmbjtcbiAgICBpZiAoIXByb3BzLnBhcnRpYWxzKSB7XG4gICAgICBwcm9wcy5wYXJ0aWFscyA9IHt9O1xuICAgICAgcmV0ID0gZnVuY3Rpb24oY29udGV4dCwgb3B0aW9ucykge1xuICAgICAgICAvLyBDcmVhdGUgYSBuZXcgcGFydGlhbHMgc3RhY2sgZnJhbWUgcHJpb3IgdG8gZXhlYy5cbiAgICAgICAgbGV0IG9yaWdpbmFsID0gY29udGFpbmVyLnBhcnRpYWxzO1xuICAgICAgICBjb250YWluZXIucGFydGlhbHMgPSBleHRlbmQoe30sIG9yaWdpbmFsLCBwcm9wcy5wYXJ0aWFscyk7XG4gICAgICAgIGxldCByZXQgPSBmbihjb250ZXh0LCBvcHRpb25zKTtcbiAgICAgICAgY29udGFpbmVyLnBhcnRpYWxzID0gb3JpZ2luYWw7XG4gICAgICAgIHJldHVybiByZXQ7XG4gICAgICB9O1xuICAgIH1cblxuICAgIHByb3BzLnBhcnRpYWxzW29wdGlvbnMuYXJnc1swXV0gPSBvcHRpb25zLmZuO1xuXG4gICAgcmV0dXJuIHJldDtcbiAgfSk7XG59XG4iXX0= 30 | -------------------------------------------------------------------------------- /node_modules/handlebars/dist/cjs/handlebars/helpers.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | exports.__esModule = true; 4 | exports.registerDefaultHelpers = registerDefaultHelpers; 5 | // istanbul ignore next 6 | 7 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 8 | 9 | var _helpersBlockHelperMissing = require('./helpers/block-helper-missing'); 10 | 11 | var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing); 12 | 13 | var _helpersEach = require('./helpers/each'); 14 | 15 | var _helpersEach2 = _interopRequireDefault(_helpersEach); 16 | 17 | var _helpersHelperMissing = require('./helpers/helper-missing'); 18 | 19 | var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing); 20 | 21 | var _helpersIf = require('./helpers/if'); 22 | 23 | var _helpersIf2 = _interopRequireDefault(_helpersIf); 24 | 25 | var _helpersLog = require('./helpers/log'); 26 | 27 | var _helpersLog2 = _interopRequireDefault(_helpersLog); 28 | 29 | var _helpersLookup = require('./helpers/lookup'); 30 | 31 | var _helpersLookup2 = _interopRequireDefault(_helpersLookup); 32 | 33 | var _helpersWith = require('./helpers/with'); 34 | 35 | var _helpersWith2 = _interopRequireDefault(_helpersWith); 36 | 37 | function registerDefaultHelpers(instance) { 38 | _helpersBlockHelperMissing2['default'](instance); 39 | _helpersEach2['default'](instance); 40 | _helpersHelperMissing2['default'](instance); 41 | _helpersIf2['default'](instance); 42 | _helpersLog2['default'](instance); 43 | _helpersLookup2['default'](instance); 44 | _helpersWith2['default'](instance); 45 | } 46 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7eUNBQXVDLGdDQUFnQzs7OzsyQkFDOUMsZ0JBQWdCOzs7O29DQUNQLDBCQUEwQjs7Ozt5QkFDckMsY0FBYzs7OzswQkFDYixlQUFlOzs7OzZCQUNaLGtCQUFrQjs7OzsyQkFDcEIsZ0JBQWdCOzs7O0FBRWxDLFNBQVMsc0JBQXNCLENBQUMsUUFBUSxFQUFFO0FBQy9DLHlDQUEyQixRQUFRLENBQUMsQ0FBQztBQUNyQywyQkFBYSxRQUFRLENBQUMsQ0FBQztBQUN2QixvQ0FBc0IsUUFBUSxDQUFDLENBQUM7QUFDaEMseUJBQVcsUUFBUSxDQUFDLENBQUM7QUFDckIsMEJBQVksUUFBUSxDQUFDLENBQUM7QUFDdEIsNkJBQWUsUUFBUSxDQUFDLENBQUM7QUFDekIsMkJBQWEsUUFBUSxDQUFDLENBQUM7Q0FDeEIiLCJmaWxlIjoiaGVscGVycy5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCByZWdpc3RlckJsb2NrSGVscGVyTWlzc2luZyBmcm9tICcuL2hlbHBlcnMvYmxvY2staGVscGVyLW1pc3NpbmcnO1xuaW1wb3J0IHJlZ2lzdGVyRWFjaCBmcm9tICcuL2hlbHBlcnMvZWFjaCc7XG5pbXBvcnQgcmVnaXN0ZXJIZWxwZXJNaXNzaW5nIGZyb20gJy4vaGVscGVycy9oZWxwZXItbWlzc2luZyc7XG5pbXBvcnQgcmVnaXN0ZXJJZiBmcm9tICcuL2hlbHBlcnMvaWYnO1xuaW1wb3J0IHJlZ2lzdGVyTG9nIGZyb20gJy4vaGVscGVycy9sb2cnO1xuaW1wb3J0IHJlZ2lzdGVyTG9va3VwIGZyb20gJy4vaGVscGVycy9sb29rdXAnO1xuaW1wb3J0IHJlZ2lzdGVyV2l0aCBmcm9tICcuL2hlbHBlcnMvd2l0aCc7XG5cbmV4cG9ydCBmdW5jdGlvbiByZWdpc3RlckRlZmF1bHRIZWxwZXJzKGluc3RhbmNlKSB7XG4gIHJlZ2lzdGVyQmxvY2tIZWxwZXJNaXNzaW5nKGluc3RhbmNlKTtcbiAgcmVnaXN0ZXJFYWNoKGluc3RhbmNlKTtcbiAgcmVnaXN0ZXJIZWxwZXJNaXNzaW5nKGluc3RhbmNlKTtcbiAgcmVnaXN0ZXJJZihpbnN0YW5jZSk7XG4gIHJlZ2lzdGVyTG9nKGluc3RhbmNlKTtcbiAgcmVnaXN0ZXJMb29rdXAoaW5zdGFuY2UpO1xuICByZWdpc3RlcldpdGgoaW5zdGFuY2UpO1xufVxuIl19 47 | -------------------------------------------------------------------------------- /node_modules/handlebars/dist/cjs/handlebars/helpers/helper-missing.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | exports.__esModule = true; 4 | // istanbul ignore next 5 | 6 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 7 | 8 | var _exception = require('../exception'); 9 | 10 | var _exception2 = _interopRequireDefault(_exception); 11 | 12 | exports['default'] = function (instance) { 13 | instance.registerHelper('helperMissing', function () /* [args, ]options */{ 14 | if (arguments.length === 1) { 15 | // A missing field in a {{foo}} construct. 16 | return undefined; 17 | } else { 18 | // Someone is actually trying to call something, blow up. 19 | throw new _exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"'); 20 | } 21 | }); 22 | }; 23 | 24 | module.exports = exports['default']; 25 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvaGVscGVyLW1pc3NpbmcuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozt5QkFBc0IsY0FBYzs7OztxQkFFckIsVUFBUyxRQUFRLEVBQUU7QUFDaEMsVUFBUSxDQUFDLGNBQWMsQ0FBQyxlQUFlLEVBQUUsaUNBQWdDO0FBQ3ZFLFFBQUksU0FBUyxDQUFDLE1BQU0sS0FBSyxDQUFDLEVBQUU7O0FBRTFCLGFBQU8sU0FBUyxDQUFDO0tBQ2xCLE1BQU07O0FBRUwsWUFBTSwyQkFBYyxtQkFBbUIsR0FBRyxTQUFTLENBQUMsU0FBUyxDQUFDLE1BQU0sR0FBRyxDQUFDLENBQUMsQ0FBQyxJQUFJLEdBQUcsR0FBRyxDQUFDLENBQUM7S0FDdkY7R0FDRixDQUFDLENBQUM7Q0FDSiIsImZpbGUiOiJoZWxwZXItbWlzc2luZy5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBFeGNlcHRpb24gZnJvbSAnLi4vZXhjZXB0aW9uJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24oaW5zdGFuY2UpIHtcbiAgaW5zdGFuY2UucmVnaXN0ZXJIZWxwZXIoJ2hlbHBlck1pc3NpbmcnLCBmdW5jdGlvbigvKiBbYXJncywgXW9wdGlvbnMgKi8pIHtcbiAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCA9PT0gMSkge1xuICAgICAgLy8gQSBtaXNzaW5nIGZpZWxkIGluIGEge3tmb299fSBjb25zdHJ1Y3QuXG4gICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgIH0gZWxzZSB7XG4gICAgICAvLyBTb21lb25lIGlzIGFjdHVhbGx5IHRyeWluZyB0byBjYWxsIHNvbWV0aGluZywgYmxvdyB1cC5cbiAgICAgIHRocm93IG5ldyBFeGNlcHRpb24oJ01pc3NpbmcgaGVscGVyOiBcIicgKyBhcmd1bWVudHNbYXJndW1lbnRzLmxlbmd0aCAtIDFdLm5hbWUgKyAnXCInKTtcbiAgICB9XG4gIH0pO1xufVxuIl19 26 | -------------------------------------------------------------------------------- /node_modules/handlebars/dist/cjs/handlebars/helpers/log.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | exports.__esModule = true; 4 | 5 | exports['default'] = function (instance) { 6 | instance.registerHelper('log', function () /* message, options */{ 7 | var args = [undefined], 8 | options = arguments[arguments.length - 1]; 9 | for (var i = 0; i < arguments.length - 1; i++) { 10 | args.push(arguments[i]); 11 | } 12 | 13 | var level = 1; 14 | if (options.hash.level != null) { 15 | level = options.hash.level; 16 | } else if (options.data && options.data.level != null) { 17 | level = options.data.level; 18 | } 19 | args[0] = level; 20 | 21 | instance.log.apply(instance, args); 22 | }); 23 | }; 24 | 25 | module.exports = exports['default']; 26 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvbG9nLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7cUJBQWUsVUFBUyxRQUFRLEVBQUU7QUFDaEMsVUFBUSxDQUFDLGNBQWMsQ0FBQyxLQUFLLEVBQUUsa0NBQWlDO0FBQzlELFFBQUksSUFBSSxHQUFHLENBQUMsU0FBUyxDQUFDO1FBQ2xCLE9BQU8sR0FBRyxTQUFTLENBQUMsU0FBUyxDQUFDLE1BQU0sR0FBRyxDQUFDLENBQUMsQ0FBQztBQUM5QyxTQUFLLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsU0FBUyxDQUFDLE1BQU0sR0FBRyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUU7QUFDN0MsVUFBSSxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztLQUN6Qjs7QUFFRCxRQUFJLEtBQUssR0FBRyxDQUFDLENBQUM7QUFDZCxRQUFJLE9BQU8sQ0FBQyxJQUFJLENBQUMsS0FBSyxJQUFJLElBQUksRUFBRTtBQUM5QixXQUFLLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUM7S0FDNUIsTUFBTSxJQUFJLE9BQU8sQ0FBQyxJQUFJLElBQUksT0FBTyxDQUFDLElBQUksQ0FBQyxLQUFLLElBQUksSUFBSSxFQUFFO0FBQ3JELFdBQUssR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQztLQUM1QjtBQUNELFFBQUksQ0FBQyxDQUFDLENBQUMsR0FBRyxLQUFLLENBQUM7O0FBRWhCLFlBQVEsQ0FBQyxHQUFHLE1BQUEsQ0FBWixRQUFRLEVBQVMsSUFBSSxDQUFDLENBQUM7R0FDeEIsQ0FBQyxDQUFDO0NBQ0oiLCJmaWxlIjoibG9nLmpzIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24oaW5zdGFuY2UpIHtcbiAgaW5zdGFuY2UucmVnaXN0ZXJIZWxwZXIoJ2xvZycsIGZ1bmN0aW9uKC8qIG1lc3NhZ2UsIG9wdGlvbnMgKi8pIHtcbiAgICBsZXQgYXJncyA9IFt1bmRlZmluZWRdLFxuICAgICAgICBvcHRpb25zID0gYXJndW1lbnRzW2FyZ3VtZW50cy5sZW5ndGggLSAxXTtcbiAgICBmb3IgKGxldCBpID0gMDsgaSA8IGFyZ3VtZW50cy5sZW5ndGggLSAxOyBpKyspIHtcbiAgICAgIGFyZ3MucHVzaChhcmd1bWVudHNbaV0pO1xuICAgIH1cblxuICAgIGxldCBsZXZlbCA9IDE7XG4gICAgaWYgKG9wdGlvbnMuaGFzaC5sZXZlbCAhPSBudWxsKSB7XG4gICAgICBsZXZlbCA9IG9wdGlvbnMuaGFzaC5sZXZlbDtcbiAgICB9IGVsc2UgaWYgKG9wdGlvbnMuZGF0YSAmJiBvcHRpb25zLmRhdGEubGV2ZWwgIT0gbnVsbCkge1xuICAgICAgbGV2ZWwgPSBvcHRpb25zLmRhdGEubGV2ZWw7XG4gICAgfVxuICAgIGFyZ3NbMF0gPSBsZXZlbDtcblxuICAgIGluc3RhbmNlLmxvZyguLi4gYXJncyk7XG4gIH0pO1xufVxuIl19 27 | -------------------------------------------------------------------------------- /node_modules/handlebars/dist/cjs/handlebars/helpers/lookup.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | exports.__esModule = true; 4 | 5 | exports['default'] = function (instance) { 6 | instance.registerHelper('lookup', function (obj, field) { 7 | return obj && obj[field]; 8 | }); 9 | }; 10 | 11 | module.exports = exports['default']; 12 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvbG9va3VwLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7cUJBQWUsVUFBUyxRQUFRLEVBQUU7QUFDaEMsVUFBUSxDQUFDLGNBQWMsQ0FBQyxRQUFRLEVBQUUsVUFBUyxHQUFHLEVBQUUsS0FBSyxFQUFFO0FBQ3JELFdBQU8sR0FBRyxJQUFJLEdBQUcsQ0FBQyxLQUFLLENBQUMsQ0FBQztHQUMxQixDQUFDLENBQUM7Q0FDSiIsImZpbGUiOiJsb29rdXAuanMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZGVmYXVsdCBmdW5jdGlvbihpbnN0YW5jZSkge1xuICBpbnN0YW5jZS5yZWdpc3RlckhlbHBlcignbG9va3VwJywgZnVuY3Rpb24ob2JqLCBmaWVsZCkge1xuICAgIHJldHVybiBvYmogJiYgb2JqW2ZpZWxkXTtcbiAgfSk7XG59XG4iXX0= 13 | -------------------------------------------------------------------------------- /node_modules/handlebars/dist/cjs/handlebars/helpers/with.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | exports.__esModule = true; 4 | 5 | var _utils = require('../utils'); 6 | 7 | exports['default'] = function (instance) { 8 | instance.registerHelper('with', function (context, options) { 9 | if (_utils.isFunction(context)) { 10 | context = context.call(this); 11 | } 12 | 13 | var fn = options.fn; 14 | 15 | if (!_utils.isEmpty(context)) { 16 | var data = options.data; 17 | if (options.data && options.ids) { 18 | data = _utils.createFrame(options.data); 19 | data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]); 20 | } 21 | 22 | return fn(context, { 23 | data: data, 24 | blockParams: _utils.blockParams([context], [data && data.contextPath]) 25 | }); 26 | } else { 27 | return options.inverse(this); 28 | } 29 | }); 30 | }; 31 | 32 | module.exports = exports['default']; 33 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvd2l0aC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O3FCQUErRSxVQUFVOztxQkFFMUUsVUFBUyxRQUFRLEVBQUU7QUFDaEMsVUFBUSxDQUFDLGNBQWMsQ0FBQyxNQUFNLEVBQUUsVUFBUyxPQUFPLEVBQUUsT0FBTyxFQUFFO0FBQ3pELFFBQUksa0JBQVcsT0FBTyxDQUFDLEVBQUU7QUFBRSxhQUFPLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQztLQUFFOztBQUUxRCxRQUFJLEVBQUUsR0FBRyxPQUFPLENBQUMsRUFBRSxDQUFDOztBQUVwQixRQUFJLENBQUMsZUFBUSxPQUFPLENBQUMsRUFBRTtBQUNyQixVQUFJLElBQUksR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDO0FBQ3hCLFVBQUksT0FBTyxDQUFDLElBQUksSUFBSSxPQUFPLENBQUMsR0FBRyxFQUFFO0FBQy9CLFlBQUksR0FBRyxtQkFBWSxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUM7QUFDakMsWUFBSSxDQUFDLFdBQVcsR0FBRyx5QkFBa0IsT0FBTyxDQUFDLElBQUksQ0FBQyxXQUFXLEVBQUUsT0FBTyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO09BQ2hGOztBQUVELGFBQU8sRUFBRSxDQUFDLE9BQU8sRUFBRTtBQUNqQixZQUFJLEVBQUUsSUFBSTtBQUNWLG1CQUFXLEVBQUUsbUJBQVksQ0FBQyxPQUFPLENBQUMsRUFBRSxDQUFDLElBQUksSUFBSSxJQUFJLENBQUMsV0FBVyxDQUFDLENBQUM7T0FDaEUsQ0FBQyxDQUFDO0tBQ0osTUFBTTtBQUNMLGFBQU8sT0FBTyxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQztLQUM5QjtHQUNGLENBQUMsQ0FBQztDQUNKIiwiZmlsZSI6IndpdGguanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge2FwcGVuZENvbnRleHRQYXRoLCBibG9ja1BhcmFtcywgY3JlYXRlRnJhbWUsIGlzRW1wdHksIGlzRnVuY3Rpb259IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24oaW5zdGFuY2UpIHtcbiAgaW5zdGFuY2UucmVnaXN0ZXJIZWxwZXIoJ3dpdGgnLCBmdW5jdGlvbihjb250ZXh0LCBvcHRpb25zKSB7XG4gICAgaWYgKGlzRnVuY3Rpb24oY29udGV4dCkpIHsgY29udGV4dCA9IGNvbnRleHQuY2FsbCh0aGlzKTsgfVxuXG4gICAgbGV0IGZuID0gb3B0aW9ucy5mbjtcblxuICAgIGlmICghaXNFbXB0eShjb250ZXh0KSkge1xuICAgICAgbGV0IGRhdGEgPSBvcHRpb25zLmRhdGE7XG4gICAgICBpZiAob3B0aW9ucy5kYXRhICYmIG9wdGlvbnMuaWRzKSB7XG4gICAgICAgIGRhdGEgPSBjcmVhdGVGcmFtZShvcHRpb25zLmRhdGEpO1xuICAgICAgICBkYXRhLmNvbnRleHRQYXRoID0gYXBwZW5kQ29udGV4dFBhdGgob3B0aW9ucy5kYXRhLmNvbnRleHRQYXRoLCBvcHRpb25zLmlkc1swXSk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBmbihjb250ZXh0LCB7XG4gICAgICAgIGRhdGE6IGRhdGEsXG4gICAgICAgIGJsb2NrUGFyYW1zOiBibG9ja1BhcmFtcyhbY29udGV4dF0sIFtkYXRhICYmIGRhdGEuY29udGV4dFBhdGhdKVxuICAgICAgfSk7XG4gICAgfSBlbHNlIHtcbiAgICAgIHJldHVybiBvcHRpb25zLmludmVyc2UodGhpcyk7XG4gICAgfVxuICB9KTtcbn1cbiJdfQ== 34 | -------------------------------------------------------------------------------- /node_modules/handlebars/dist/cjs/handlebars/no-conflict.js: -------------------------------------------------------------------------------- 1 | /* global window */ 2 | 'use strict'; 3 | 4 | exports.__esModule = true; 5 | 6 | exports['default'] = function (Handlebars) { 7 | /* istanbul ignore next */ 8 | var root = typeof global !== 'undefined' ? global : window, 9 | $Handlebars = root.Handlebars; 10 | /* istanbul ignore next */ 11 | Handlebars.noConflict = function () { 12 | if (root.Handlebars === Handlebars) { 13 | root.Handlebars = $Handlebars; 14 | } 15 | return Handlebars; 16 | }; 17 | }; 18 | 19 | module.exports = exports['default']; 20 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL25vLWNvbmZsaWN0LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O3FCQUNlLFVBQVMsVUFBVSxFQUFFOztBQUVsQyxNQUFJLElBQUksR0FBRyxPQUFPLE1BQU0sS0FBSyxXQUFXLEdBQUcsTUFBTSxHQUFHLE1BQU07TUFDdEQsV0FBVyxHQUFHLElBQUksQ0FBQyxVQUFVLENBQUM7O0FBRWxDLFlBQVUsQ0FBQyxVQUFVLEdBQUcsWUFBVztBQUNqQyxRQUFJLElBQUksQ0FBQyxVQUFVLEtBQUssVUFBVSxFQUFFO0FBQ2xDLFVBQUksQ0FBQyxVQUFVLEdBQUcsV0FBVyxDQUFDO0tBQy9CO0FBQ0QsV0FBTyxVQUFVLENBQUM7R0FDbkIsQ0FBQztDQUNIIiwiZmlsZSI6Im5vLWNvbmZsaWN0LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLyogZ2xvYmFsIHdpbmRvdyAqL1xuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24oSGFuZGxlYmFycykge1xuICAvKiBpc3RhbmJ1bCBpZ25vcmUgbmV4dCAqL1xuICBsZXQgcm9vdCA9IHR5cGVvZiBnbG9iYWwgIT09ICd1bmRlZmluZWQnID8gZ2xvYmFsIDogd2luZG93LFxuICAgICAgJEhhbmRsZWJhcnMgPSByb290LkhhbmRsZWJhcnM7XG4gIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gIEhhbmRsZWJhcnMubm9Db25mbGljdCA9IGZ1bmN0aW9uKCkge1xuICAgIGlmIChyb290LkhhbmRsZWJhcnMgPT09IEhhbmRsZWJhcnMpIHtcbiAgICAgIHJvb3QuSGFuZGxlYmFycyA9ICRIYW5kbGViYXJzO1xuICAgIH1cbiAgICByZXR1cm4gSGFuZGxlYmFycztcbiAgfTtcbn1cbiJdfQ== 21 | -------------------------------------------------------------------------------- /node_modules/handlebars/dist/cjs/handlebars/safe-string.js: -------------------------------------------------------------------------------- 1 | // Build out our basic SafeString type 2 | 'use strict'; 3 | 4 | exports.__esModule = true; 5 | function SafeString(string) { 6 | this.string = string; 7 | } 8 | 9 | SafeString.prototype.toString = SafeString.prototype.toHTML = function () { 10 | return '' + this.string; 11 | }; 12 | 13 | exports['default'] = SafeString; 14 | module.exports = exports['default']; 15 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3NhZmUtc3RyaW5nLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFDQSxTQUFTLFVBQVUsQ0FBQyxNQUFNLEVBQUU7QUFDMUIsTUFBSSxDQUFDLE1BQU0sR0FBRyxNQUFNLENBQUM7Q0FDdEI7O0FBRUQsVUFBVSxDQUFDLFNBQVMsQ0FBQyxRQUFRLEdBQUcsVUFBVSxDQUFDLFNBQVMsQ0FBQyxNQUFNLEdBQUcsWUFBVztBQUN2RSxTQUFPLEVBQUUsR0FBRyxJQUFJLENBQUMsTUFBTSxDQUFDO0NBQ3pCLENBQUM7O3FCQUVhLFVBQVUiLCJmaWxlIjoic2FmZS1zdHJpbmcuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBCdWlsZCBvdXQgb3VyIGJhc2ljIFNhZmVTdHJpbmcgdHlwZVxuZnVuY3Rpb24gU2FmZVN0cmluZyhzdHJpbmcpIHtcbiAgdGhpcy5zdHJpbmcgPSBzdHJpbmc7XG59XG5cblNhZmVTdHJpbmcucHJvdG90eXBlLnRvU3RyaW5nID0gU2FmZVN0cmluZy5wcm90b3R5cGUudG9IVE1MID0gZnVuY3Rpb24oKSB7XG4gIHJldHVybiAnJyArIHRoaXMuc3RyaW5nO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgU2FmZVN0cmluZztcbiJdfQ== 16 | -------------------------------------------------------------------------------- /node_modules/handlebars/docs/decorators-api.md: -------------------------------------------------------------------------------- 1 | # Decorators 2 | 3 | Decorators allow for blocks to be annotated with metadata or wrapped in functionality prior to execution of the block. This may be used to communicate with the containing helper or to setup a particular state in the system prior to running the block. 4 | 5 | Decorators are registered through similar methods as helpers, `registerDecorators` and `unregisterDecorators`. These can then be referenced via the friendly name in the template using the `{{* decorator}}` and `{{#* decorator}}{/decorator}}` syntaxes. These syntaxs are derivitives of the normal mustache syntax and as such have all of the same argument and whitespace behaviors. 6 | 7 | Decorators are executed when the block program is instantiated and are passed `(program, props, container, context, data, blockParams, depths)` 8 | 9 | - `program`: The block to wrap 10 | - `props`: Object used to set metadata on the final function. Any values set on this object will be set on the function, regardless of if the original function is replaced or not. Metadata should be applied using this object as values applied to `program` may be masked by subsequent decorators that may wrap `program`. 11 | - `container`: The current runtime container 12 | - `context`: The current context. Since the decorator is run before the block that contains it, this is the parent context. 13 | - `data`: The current `@data` values 14 | - `blockParams`: The current block parameters stack 15 | - `depths`: The current context stack 16 | 17 | Decorators may set values on `props` or return a modified function that wraps `program` in particular behaviors. If the decorator returns nothing, then `program` is left unaltered. 18 | 19 | The [inline partial](https://github.com/wycats/handlebars.js/blob/master/lib/handlebars/decorators/inline.js) implementation provides an example of decorators being used for both metadata and wrapping behaviors. 20 | -------------------------------------------------------------------------------- /node_modules/handlebars/lib/handlebars.js: -------------------------------------------------------------------------------- 1 | import runtime from './handlebars.runtime'; 2 | 3 | // Compiler imports 4 | import AST from './handlebars/compiler/ast'; 5 | import { parser as Parser, parse } from './handlebars/compiler/base'; 6 | import { Compiler, compile, precompile } from './handlebars/compiler/compiler'; 7 | import JavaScriptCompiler from './handlebars/compiler/javascript-compiler'; 8 | import Visitor from './handlebars/compiler/visitor'; 9 | 10 | import noConflict from './handlebars/no-conflict'; 11 | 12 | let _create = runtime.create; 13 | function create() { 14 | let hb = _create(); 15 | 16 | hb.compile = function(input, options) { 17 | return compile(input, options, hb); 18 | }; 19 | hb.precompile = function(input, options) { 20 | return precompile(input, options, hb); 21 | }; 22 | 23 | hb.AST = AST; 24 | hb.Compiler = Compiler; 25 | hb.JavaScriptCompiler = JavaScriptCompiler; 26 | hb.Parser = Parser; 27 | hb.parse = parse; 28 | 29 | return hb; 30 | } 31 | 32 | let inst = create(); 33 | inst.create = create; 34 | 35 | noConflict(inst); 36 | 37 | inst.Visitor = Visitor; 38 | 39 | inst['default'] = inst; 40 | 41 | export default inst; 42 | -------------------------------------------------------------------------------- /node_modules/handlebars/lib/handlebars.runtime.js: -------------------------------------------------------------------------------- 1 | import * as base from './handlebars/base'; 2 | 3 | // Each of these augment the Handlebars object. No need to setup here. 4 | // (This is done to easily share code between commonjs and browse envs) 5 | import SafeString from './handlebars/safe-string'; 6 | import Exception from './handlebars/exception'; 7 | import * as Utils from './handlebars/utils'; 8 | import * as runtime from './handlebars/runtime'; 9 | 10 | import noConflict from './handlebars/no-conflict'; 11 | 12 | // For compatibility and usage outside of module systems, make the Handlebars object a namespace 13 | function create() { 14 | let hb = new base.HandlebarsEnvironment(); 15 | 16 | Utils.extend(hb, base); 17 | hb.SafeString = SafeString; 18 | hb.Exception = Exception; 19 | hb.Utils = Utils; 20 | hb.escapeExpression = Utils.escapeExpression; 21 | 22 | hb.VM = runtime; 23 | hb.template = function(spec) { 24 | return runtime.template(spec, hb); 25 | }; 26 | 27 | return hb; 28 | } 29 | 30 | let inst = create(); 31 | inst.create = create; 32 | 33 | noConflict(inst); 34 | 35 | inst['default'] = inst; 36 | 37 | export default inst; 38 | -------------------------------------------------------------------------------- /node_modules/handlebars/lib/handlebars/base.js: -------------------------------------------------------------------------------- 1 | import {createFrame, extend, toString} from './utils'; 2 | import Exception from './exception'; 3 | import {registerDefaultHelpers} from './helpers'; 4 | import {registerDefaultDecorators} from './decorators'; 5 | import logger from './logger'; 6 | 7 | export const VERSION = '4.0.5'; 8 | export const COMPILER_REVISION = 7; 9 | 10 | export const REVISION_CHANGES = { 11 | 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it 12 | 2: '== 1.0.0-rc.3', 13 | 3: '== 1.0.0-rc.4', 14 | 4: '== 1.x.x', 15 | 5: '== 2.0.0-alpha.x', 16 | 6: '>= 2.0.0-beta.1', 17 | 7: '>= 4.0.0' 18 | }; 19 | 20 | const objectType = '[object Object]'; 21 | 22 | export function HandlebarsEnvironment(helpers, partials, decorators) { 23 | this.helpers = helpers || {}; 24 | this.partials = partials || {}; 25 | this.decorators = decorators || {}; 26 | 27 | registerDefaultHelpers(this); 28 | registerDefaultDecorators(this); 29 | } 30 | 31 | HandlebarsEnvironment.prototype = { 32 | constructor: HandlebarsEnvironment, 33 | 34 | logger: logger, 35 | log: logger.log, 36 | 37 | registerHelper: function(name, fn) { 38 | if (toString.call(name) === objectType) { 39 | if (fn) { throw new Exception('Arg not supported with multiple helpers'); } 40 | extend(this.helpers, name); 41 | } else { 42 | this.helpers[name] = fn; 43 | } 44 | }, 45 | unregisterHelper: function(name) { 46 | delete this.helpers[name]; 47 | }, 48 | 49 | registerPartial: function(name, partial) { 50 | if (toString.call(name) === objectType) { 51 | extend(this.partials, name); 52 | } else { 53 | if (typeof partial === 'undefined') { 54 | throw new Exception(`Attempting to register a partial called "${name}" as undefined`); 55 | } 56 | this.partials[name] = partial; 57 | } 58 | }, 59 | unregisterPartial: function(name) { 60 | delete this.partials[name]; 61 | }, 62 | 63 | registerDecorator: function(name, fn) { 64 | if (toString.call(name) === objectType) { 65 | if (fn) { throw new Exception('Arg not supported with multiple decorators'); } 66 | extend(this.decorators, name); 67 | } else { 68 | this.decorators[name] = fn; 69 | } 70 | }, 71 | unregisterDecorator: function(name) { 72 | delete this.decorators[name]; 73 | } 74 | }; 75 | 76 | export let log = logger.log; 77 | 78 | export {createFrame, logger}; 79 | -------------------------------------------------------------------------------- /node_modules/handlebars/lib/handlebars/compiler/ast.js: -------------------------------------------------------------------------------- 1 | let AST = { 2 | // Public API used to evaluate derived attributes regarding AST nodes 3 | helpers: { 4 | // a mustache is definitely a helper if: 5 | // * it is an eligible helper, and 6 | // * it has at least one parameter or hash segment 7 | helperExpression: function(node) { 8 | return (node.type === 'SubExpression') 9 | || ((node.type === 'MustacheStatement' || node.type === 'BlockStatement') 10 | && !!((node.params && node.params.length) || node.hash)); 11 | }, 12 | 13 | scopedId: function(path) { 14 | return (/^\.|this\b/).test(path.original); 15 | }, 16 | 17 | // an ID is simple if it only has one part, and that part is not 18 | // `..` or `this`. 19 | simpleId: function(path) { 20 | return path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth; 21 | } 22 | } 23 | }; 24 | 25 | 26 | // Must be exported as an object rather than the root of the module as the jison lexer 27 | // must modify the object to operate properly. 28 | export default AST; 29 | -------------------------------------------------------------------------------- /node_modules/handlebars/lib/handlebars/compiler/base.js: -------------------------------------------------------------------------------- 1 | import parser from './parser'; 2 | import WhitespaceControl from './whitespace-control'; 3 | import * as Helpers from './helpers'; 4 | import { extend } from '../utils'; 5 | 6 | export { parser }; 7 | 8 | let yy = {}; 9 | extend(yy, Helpers); 10 | 11 | export function parse(input, options) { 12 | // Just return if an already-compiled AST was passed in. 13 | if (input.type === 'Program') { return input; } 14 | 15 | parser.yy = yy; 16 | 17 | // Altering the shared object here, but this is ok as parser is a sync operation 18 | yy.locInfo = function(locInfo) { 19 | return new yy.SourceLocation(options && options.srcName, locInfo); 20 | }; 21 | 22 | let strip = new WhitespaceControl(options); 23 | return strip.accept(parser.parse(input)); 24 | } 25 | -------------------------------------------------------------------------------- /node_modules/handlebars/lib/handlebars/decorators.js: -------------------------------------------------------------------------------- 1 | import registerInline from './decorators/inline'; 2 | 3 | export function registerDefaultDecorators(instance) { 4 | registerInline(instance); 5 | } 6 | 7 | -------------------------------------------------------------------------------- /node_modules/handlebars/lib/handlebars/decorators/inline.js: -------------------------------------------------------------------------------- 1 | import {extend} from '../utils'; 2 | 3 | export default function(instance) { 4 | instance.registerDecorator('inline', function(fn, props, container, options) { 5 | let ret = fn; 6 | if (!props.partials) { 7 | props.partials = {}; 8 | ret = function(context, options) { 9 | // Create a new partials stack frame prior to exec. 10 | let original = container.partials; 11 | container.partials = extend({}, original, props.partials); 12 | let ret = fn(context, options); 13 | container.partials = original; 14 | return ret; 15 | }; 16 | } 17 | 18 | props.partials[options.args[0]] = options.fn; 19 | 20 | return ret; 21 | }); 22 | } 23 | -------------------------------------------------------------------------------- /node_modules/handlebars/lib/handlebars/exception.js: -------------------------------------------------------------------------------- 1 | 2 | const errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack']; 3 | 4 | function Exception(message, node) { 5 | let loc = node && node.loc, 6 | line, 7 | column; 8 | if (loc) { 9 | line = loc.start.line; 10 | column = loc.start.column; 11 | 12 | message += ' - ' + line + ':' + column; 13 | } 14 | 15 | let tmp = Error.prototype.constructor.call(this, message); 16 | 17 | // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. 18 | for (let idx = 0; idx < errorProps.length; idx++) { 19 | this[errorProps[idx]] = tmp[errorProps[idx]]; 20 | } 21 | 22 | /* istanbul ignore else */ 23 | if (Error.captureStackTrace) { 24 | Error.captureStackTrace(this, Exception); 25 | } 26 | 27 | if (loc) { 28 | this.lineNumber = line; 29 | this.column = column; 30 | } 31 | } 32 | 33 | Exception.prototype = new Error(); 34 | 35 | export default Exception; 36 | -------------------------------------------------------------------------------- /node_modules/handlebars/lib/handlebars/helpers.js: -------------------------------------------------------------------------------- 1 | import registerBlockHelperMissing from './helpers/block-helper-missing'; 2 | import registerEach from './helpers/each'; 3 | import registerHelperMissing from './helpers/helper-missing'; 4 | import registerIf from './helpers/if'; 5 | import registerLog from './helpers/log'; 6 | import registerLookup from './helpers/lookup'; 7 | import registerWith from './helpers/with'; 8 | 9 | export function registerDefaultHelpers(instance) { 10 | registerBlockHelperMissing(instance); 11 | registerEach(instance); 12 | registerHelperMissing(instance); 13 | registerIf(instance); 14 | registerLog(instance); 15 | registerLookup(instance); 16 | registerWith(instance); 17 | } 18 | -------------------------------------------------------------------------------- /node_modules/handlebars/lib/handlebars/helpers/block-helper-missing.js: -------------------------------------------------------------------------------- 1 | import {appendContextPath, createFrame, isArray} from '../utils'; 2 | 3 | export default function(instance) { 4 | instance.registerHelper('blockHelperMissing', function(context, options) { 5 | let inverse = options.inverse, 6 | fn = options.fn; 7 | 8 | if (context === true) { 9 | return fn(this); 10 | } else if (context === false || context == null) { 11 | return inverse(this); 12 | } else if (isArray(context)) { 13 | if (context.length > 0) { 14 | if (options.ids) { 15 | options.ids = [options.name]; 16 | } 17 | 18 | return instance.helpers.each(context, options); 19 | } else { 20 | return inverse(this); 21 | } 22 | } else { 23 | if (options.data && options.ids) { 24 | let data = createFrame(options.data); 25 | data.contextPath = appendContextPath(options.data.contextPath, options.name); 26 | options = {data: data}; 27 | } 28 | 29 | return fn(context, options); 30 | } 31 | }); 32 | } 33 | -------------------------------------------------------------------------------- /node_modules/handlebars/lib/handlebars/helpers/each.js: -------------------------------------------------------------------------------- 1 | import {appendContextPath, blockParams, createFrame, isArray, isFunction} from '../utils'; 2 | import Exception from '../exception'; 3 | 4 | export default function(instance) { 5 | instance.registerHelper('each', function(context, options) { 6 | if (!options) { 7 | throw new Exception('Must pass iterator to #each'); 8 | } 9 | 10 | let fn = options.fn, 11 | inverse = options.inverse, 12 | i = 0, 13 | ret = '', 14 | data, 15 | contextPath; 16 | 17 | if (options.data && options.ids) { 18 | contextPath = appendContextPath(options.data.contextPath, options.ids[0]) + '.'; 19 | } 20 | 21 | if (isFunction(context)) { context = context.call(this); } 22 | 23 | if (options.data) { 24 | data = createFrame(options.data); 25 | } 26 | 27 | function execIteration(field, index, last) { 28 | if (data) { 29 | data.key = field; 30 | data.index = index; 31 | data.first = index === 0; 32 | data.last = !!last; 33 | 34 | if (contextPath) { 35 | data.contextPath = contextPath + field; 36 | } 37 | } 38 | 39 | ret = ret + fn(context[field], { 40 | data: data, 41 | blockParams: blockParams([context[field], field], [contextPath + field, null]) 42 | }); 43 | } 44 | 45 | if (context && typeof context === 'object') { 46 | if (isArray(context)) { 47 | for (let j = context.length; i < j; i++) { 48 | if (i in context) { 49 | execIteration(i, i, i === context.length - 1); 50 | } 51 | } 52 | } else { 53 | let priorKey; 54 | 55 | for (let key in context) { 56 | if (context.hasOwnProperty(key)) { 57 | // We're running the iterations one step out of sync so we can detect 58 | // the last iteration without have to scan the object twice and create 59 | // an itermediate keys array. 60 | if (priorKey !== undefined) { 61 | execIteration(priorKey, i - 1); 62 | } 63 | priorKey = key; 64 | i++; 65 | } 66 | } 67 | if (priorKey !== undefined) { 68 | execIteration(priorKey, i - 1, true); 69 | } 70 | } 71 | } 72 | 73 | if (i === 0) { 74 | ret = inverse(this); 75 | } 76 | 77 | return ret; 78 | }); 79 | } 80 | -------------------------------------------------------------------------------- /node_modules/handlebars/lib/handlebars/helpers/helper-missing.js: -------------------------------------------------------------------------------- 1 | import Exception from '../exception'; 2 | 3 | export default function(instance) { 4 | instance.registerHelper('helperMissing', function(/* [args, ]options */) { 5 | if (arguments.length === 1) { 6 | // A missing field in a {{foo}} construct. 7 | return undefined; 8 | } else { 9 | // Someone is actually trying to call something, blow up. 10 | throw new Exception('Missing helper: "' + arguments[arguments.length - 1].name + '"'); 11 | } 12 | }); 13 | } 14 | -------------------------------------------------------------------------------- /node_modules/handlebars/lib/handlebars/helpers/if.js: -------------------------------------------------------------------------------- 1 | import {isEmpty, isFunction} from '../utils'; 2 | 3 | export default function(instance) { 4 | instance.registerHelper('if', function(conditional, options) { 5 | if (isFunction(conditional)) { conditional = conditional.call(this); } 6 | 7 | // Default behavior is to render the positive path if the value is truthy and not empty. 8 | // The `includeZero` option may be set to treat the condtional as purely not empty based on the 9 | // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative. 10 | if ((!options.hash.includeZero && !conditional) || isEmpty(conditional)) { 11 | return options.inverse(this); 12 | } else { 13 | return options.fn(this); 14 | } 15 | }); 16 | 17 | instance.registerHelper('unless', function(conditional, options) { 18 | return instance.helpers['if'].call(this, conditional, {fn: options.inverse, inverse: options.fn, hash: options.hash}); 19 | }); 20 | } 21 | -------------------------------------------------------------------------------- /node_modules/handlebars/lib/handlebars/helpers/log.js: -------------------------------------------------------------------------------- 1 | export default function(instance) { 2 | instance.registerHelper('log', function(/* message, options */) { 3 | let args = [undefined], 4 | options = arguments[arguments.length - 1]; 5 | for (let i = 0; i < arguments.length - 1; i++) { 6 | args.push(arguments[i]); 7 | } 8 | 9 | let level = 1; 10 | if (options.hash.level != null) { 11 | level = options.hash.level; 12 | } else if (options.data && options.data.level != null) { 13 | level = options.data.level; 14 | } 15 | args[0] = level; 16 | 17 | instance.log(... args); 18 | }); 19 | } 20 | -------------------------------------------------------------------------------- /node_modules/handlebars/lib/handlebars/helpers/lookup.js: -------------------------------------------------------------------------------- 1 | export default function(instance) { 2 | instance.registerHelper('lookup', function(obj, field) { 3 | return obj && obj[field]; 4 | }); 5 | } 6 | -------------------------------------------------------------------------------- /node_modules/handlebars/lib/handlebars/helpers/with.js: -------------------------------------------------------------------------------- 1 | import {appendContextPath, blockParams, createFrame, isEmpty, isFunction} from '../utils'; 2 | 3 | export default function(instance) { 4 | instance.registerHelper('with', function(context, options) { 5 | if (isFunction(context)) { context = context.call(this); } 6 | 7 | let fn = options.fn; 8 | 9 | if (!isEmpty(context)) { 10 | let data = options.data; 11 | if (options.data && options.ids) { 12 | data = createFrame(options.data); 13 | data.contextPath = appendContextPath(options.data.contextPath, options.ids[0]); 14 | } 15 | 16 | return fn(context, { 17 | data: data, 18 | blockParams: blockParams([context], [data && data.contextPath]) 19 | }); 20 | } else { 21 | return options.inverse(this); 22 | } 23 | }); 24 | } 25 | -------------------------------------------------------------------------------- /node_modules/handlebars/lib/handlebars/logger.js: -------------------------------------------------------------------------------- 1 | import {indexOf} from './utils'; 2 | 3 | let logger = { 4 | methodMap: ['debug', 'info', 'warn', 'error'], 5 | level: 'info', 6 | 7 | // Maps a given level value to the `methodMap` indexes above. 8 | lookupLevel: function(level) { 9 | if (typeof level === 'string') { 10 | let levelMap = indexOf(logger.methodMap, level.toLowerCase()); 11 | if (levelMap >= 0) { 12 | level = levelMap; 13 | } else { 14 | level = parseInt(level, 10); 15 | } 16 | } 17 | 18 | return level; 19 | }, 20 | 21 | // Can be overridden in the host environment 22 | log: function(level, ...message) { 23 | level = logger.lookupLevel(level); 24 | 25 | if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) { 26 | let method = logger.methodMap[level]; 27 | if (!console[method]) { // eslint-disable-line no-console 28 | method = 'log'; 29 | } 30 | console[method](...message); // eslint-disable-line no-console 31 | } 32 | } 33 | }; 34 | 35 | export default logger; 36 | -------------------------------------------------------------------------------- /node_modules/handlebars/lib/handlebars/no-conflict.js: -------------------------------------------------------------------------------- 1 | /* global window */ 2 | export default function(Handlebars) { 3 | /* istanbul ignore next */ 4 | let root = typeof global !== 'undefined' ? global : window, 5 | $Handlebars = root.Handlebars; 6 | /* istanbul ignore next */ 7 | Handlebars.noConflict = function() { 8 | if (root.Handlebars === Handlebars) { 9 | root.Handlebars = $Handlebars; 10 | } 11 | return Handlebars; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /node_modules/handlebars/lib/handlebars/safe-string.js: -------------------------------------------------------------------------------- 1 | // Build out our basic SafeString type 2 | function SafeString(string) { 3 | this.string = string; 4 | } 5 | 6 | SafeString.prototype.toString = SafeString.prototype.toHTML = function() { 7 | return '' + this.string; 8 | }; 9 | 10 | export default SafeString; 11 | -------------------------------------------------------------------------------- /node_modules/handlebars/lib/index.js: -------------------------------------------------------------------------------- 1 | // USAGE: 2 | // var handlebars = require('handlebars'); 3 | /* eslint-disable no-var */ 4 | 5 | // var local = handlebars.create(); 6 | 7 | var handlebars = require('../dist/cjs/handlebars')['default']; 8 | 9 | var printer = require('../dist/cjs/handlebars/compiler/printer'); 10 | handlebars.PrintVisitor = printer.PrintVisitor; 11 | handlebars.print = printer.print; 12 | 13 | module.exports = handlebars; 14 | 15 | // Publish a Node.js require() handler for .handlebars and .hbs files 16 | function extension(module, filename) { 17 | var fs = require('fs'); 18 | var templateString = fs.readFileSync(filename, 'utf8'); 19 | module.exports = handlebars.compile(templateString); 20 | } 21 | /* istanbul ignore else */ 22 | if (typeof require !== 'undefined' && require.extensions) { 23 | require.extensions['.handlebars'] = extension; 24 | require.extensions['.hbs'] = extension; 25 | } 26 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/async/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010-2014 Caolan McMahon 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.8" 4 | - "0.10" 5 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2010 James Halliday (mail@substack.net) 2 | 3 | This project is free software released under the MIT/X11 license: 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/example/bool.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var util = require('util'); 3 | var argv = require('optimist').argv; 4 | 5 | if (argv.s) { 6 | util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: '); 7 | } 8 | console.log( 9 | (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '') 10 | ); 11 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/example/boolean_double.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var argv = require('optimist') 3 | .boolean(['x','y','z']) 4 | .argv 5 | ; 6 | console.dir([ argv.x, argv.y, argv.z ]); 7 | console.dir(argv._); 8 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/example/boolean_single.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var argv = require('optimist') 3 | .boolean('v') 4 | .argv 5 | ; 6 | console.dir(argv.v); 7 | console.dir(argv._); 8 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/example/default_hash.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var argv = require('optimist') 4 | .default({ x : 10, y : 10 }) 5 | .argv 6 | ; 7 | 8 | console.log(argv.x + argv.y); 9 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/example/default_singles.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var argv = require('optimist') 3 | .default('x', 10) 4 | .default('y', 10) 5 | .argv 6 | ; 7 | console.log(argv.x + argv.y); 8 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/example/divide.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var argv = require('optimist') 4 | .usage('Usage: $0 -x [num] -y [num]') 5 | .demand(['x','y']) 6 | .argv; 7 | 8 | console.log(argv.x / argv.y); 9 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/example/line_count.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var argv = require('optimist') 3 | .usage('Count the lines in a file.\nUsage: $0') 4 | .demand('f') 5 | .alias('f', 'file') 6 | .describe('f', 'Load a file') 7 | .argv 8 | ; 9 | 10 | var fs = require('fs'); 11 | var s = fs.createReadStream(argv.file); 12 | 13 | var lines = 0; 14 | s.on('data', function (buf) { 15 | lines += buf.toString().match(/\n/g).length; 16 | }); 17 | 18 | s.on('end', function () { 19 | console.log(lines); 20 | }); 21 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/example/line_count_options.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var argv = require('optimist') 3 | .usage('Count the lines in a file.\nUsage: $0') 4 | .options({ 5 | file : { 6 | demand : true, 7 | alias : 'f', 8 | description : 'Load a file' 9 | }, 10 | base : { 11 | alias : 'b', 12 | description : 'Numeric base to use for output', 13 | default : 10, 14 | }, 15 | }) 16 | .argv 17 | ; 18 | 19 | var fs = require('fs'); 20 | var s = fs.createReadStream(argv.file); 21 | 22 | var lines = 0; 23 | s.on('data', function (buf) { 24 | lines += buf.toString().match(/\n/g).length; 25 | }); 26 | 27 | s.on('end', function () { 28 | console.log(lines.toString(argv.base)); 29 | }); 30 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/example/line_count_wrap.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var argv = require('optimist') 3 | .usage('Count the lines in a file.\nUsage: $0') 4 | .wrap(80) 5 | .demand('f') 6 | .alias('f', [ 'file', 'filename' ]) 7 | .describe('f', 8 | "Load a file. It's pretty important." 9 | + " Required even. So you'd better specify it." 10 | ) 11 | .alias('b', 'base') 12 | .describe('b', 'Numeric base to display the number of lines in') 13 | .default('b', 10) 14 | .describe('x', 'Super-secret optional parameter which is secret') 15 | .default('x', '') 16 | .argv 17 | ; 18 | 19 | var fs = require('fs'); 20 | var s = fs.createReadStream(argv.file); 21 | 22 | var lines = 0; 23 | s.on('data', function (buf) { 24 | lines += buf.toString().match(/\n/g).length; 25 | }); 26 | 27 | s.on('end', function () { 28 | console.log(lines.toString(argv.base)); 29 | }); 30 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/example/nonopt.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var argv = require('optimist').argv; 3 | console.log('(%d,%d)', argv.x, argv.y); 4 | console.log(argv._); 5 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/example/reflect.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | console.dir(require('optimist').argv); 3 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/example/short.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var argv = require('optimist').argv; 3 | console.log('(%d,%d)', argv.x, argv.y); 4 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/example/string.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var argv = require('optimist') 3 | .string('x', 'y') 4 | .argv 5 | ; 6 | console.dir([ argv.x, argv.y ]); 7 | 8 | /* Turns off numeric coercion: 9 | ./node string.js -x 000123 -y 9876 10 | [ '000123', '9876' ] 11 | */ 12 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/example/usage-options.js: -------------------------------------------------------------------------------- 1 | var optimist = require('./../index'); 2 | 3 | var argv = optimist.usage('This is my awesome program', { 4 | 'about': { 5 | description: 'Provide some details about the author of this program', 6 | required: true, 7 | short: 'a', 8 | }, 9 | 'info': { 10 | description: 'Provide some information about the node.js agains!!!!!!', 11 | boolean: true, 12 | short: 'i' 13 | } 14 | }).argv; 15 | 16 | optimist.showHelp(); 17 | 18 | console.log('\n\nInspecting options'); 19 | console.dir(argv); -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/example/xup.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var argv = require('optimist').argv; 3 | 4 | if (argv.rif - 5 * argv.xup > 7.138) { 5 | console.log('Buy more riffiwobbles'); 6 | } 7 | else { 8 | console.log('Sell the xupptumblers'); 9 | } 10 | 11 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/node_modules/minimist/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.8" 4 | - "0.10" 5 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/node_modules/minimist/LICENSE: -------------------------------------------------------------------------------- 1 | This software is released under the MIT license: 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/node_modules/minimist/example/parse.js: -------------------------------------------------------------------------------- 1 | var argv = require('../')(process.argv.slice(2)); 2 | console.dir(argv); 3 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/node_modules/minimist/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "minimist", 3 | "version": "0.0.10", 4 | "description": "parse argument options", 5 | "main": "index.js", 6 | "devDependencies": { 7 | "tape": "~1.0.4", 8 | "tap": "~0.4.0" 9 | }, 10 | "scripts": { 11 | "test": "tap test/*.js" 12 | }, 13 | "testling": { 14 | "files": "test/*.js", 15 | "browsers": [ 16 | "ie/6..latest", 17 | "ff/5", 18 | "firefox/latest", 19 | "chrome/10", 20 | "chrome/latest", 21 | "safari/5.1", 22 | "safari/latest", 23 | "opera/12" 24 | ] 25 | }, 26 | "repository": { 27 | "type": "git", 28 | "url": "git://github.com/substack/minimist.git" 29 | }, 30 | "homepage": "https://github.com/substack/minimist", 31 | "keywords": [ 32 | "argv", 33 | "getopt", 34 | "parser", 35 | "optimist" 36 | ], 37 | "author": { 38 | "name": "James Halliday", 39 | "email": "mail@substack.net", 40 | "url": "http://substack.net" 41 | }, 42 | "license": "MIT", 43 | "bugs": { 44 | "url": "https://github.com/substack/minimist/issues" 45 | }, 46 | "_id": "minimist@0.0.10", 47 | "dist": { 48 | "shasum": "de3f98543dbf96082be48ad1a0c7cda836301dcf", 49 | "tarball": "http://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz" 50 | }, 51 | "_from": "minimist@~0.0.1", 52 | "_npmVersion": "1.4.3", 53 | "_npmUser": { 54 | "name": "substack", 55 | "email": "mail@substack.net" 56 | }, 57 | "maintainers": [ 58 | { 59 | "name": "substack", 60 | "email": "mail@substack.net" 61 | } 62 | ], 63 | "directories": {}, 64 | "_shasum": "de3f98543dbf96082be48ad1a0c7cda836301dcf", 65 | "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", 66 | "readme": "ERROR: No README data found!" 67 | } 68 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/node_modules/minimist/readme.markdown: -------------------------------------------------------------------------------- 1 | # minimist 2 | 3 | parse argument options 4 | 5 | This module is the guts of optimist's argument parser without all the 6 | fanciful decoration. 7 | 8 | [![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist) 9 | 10 | [![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist) 11 | 12 | # example 13 | 14 | ``` js 15 | var argv = require('minimist')(process.argv.slice(2)); 16 | console.dir(argv); 17 | ``` 18 | 19 | ``` 20 | $ node example/parse.js -a beep -b boop 21 | { _: [], a: 'beep', b: 'boop' } 22 | ``` 23 | 24 | ``` 25 | $ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz 26 | { _: [ 'foo', 'bar', 'baz' ], 27 | x: 3, 28 | y: 4, 29 | n: 5, 30 | a: true, 31 | b: true, 32 | c: true, 33 | beep: 'boop' } 34 | ``` 35 | 36 | # methods 37 | 38 | ``` js 39 | var parseArgs = require('minimist') 40 | ``` 41 | 42 | ## var argv = parseArgs(args, opts={}) 43 | 44 | Return an argument object `argv` populated with the array arguments from `args`. 45 | 46 | `argv._` contains all the arguments that didn't have an option associated with 47 | them. 48 | 49 | Numeric-looking arguments will be returned as numbers unless `opts.string` or 50 | `opts.boolean` is set for that argument name. 51 | 52 | Any arguments after `'--'` will not be parsed and will end up in `argv._`. 53 | 54 | options can be: 55 | 56 | * `opts.string` - a string or array of strings argument names to always treat as 57 | strings 58 | * `opts.boolean` - a string or array of strings to always treat as booleans 59 | * `opts.alias` - an object mapping string names to strings or arrays of string 60 | argument names to use as aliases 61 | * `opts.default` - an object mapping string argument names to default values 62 | 63 | # install 64 | 65 | With [npm](https://npmjs.org) do: 66 | 67 | ``` 68 | npm install minimist 69 | ``` 70 | 71 | # license 72 | 73 | MIT 74 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/node_modules/minimist/test/dash.js: -------------------------------------------------------------------------------- 1 | var parse = require('../'); 2 | var test = require('tape'); 3 | 4 | test('-', function (t) { 5 | t.plan(5); 6 | t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] }); 7 | t.deepEqual(parse([ '-' ]), { _: [ '-' ] }); 8 | t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] }); 9 | t.deepEqual( 10 | parse([ '-b', '-' ], { boolean: 'b' }), 11 | { b: true, _: [ '-' ] } 12 | ); 13 | t.deepEqual( 14 | parse([ '-s', '-' ], { string: 's' }), 15 | { s: '-', _: [] } 16 | ); 17 | }); 18 | 19 | test('-a -- b', function (t) { 20 | t.plan(3); 21 | t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] }); 22 | t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); 23 | t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); 24 | }); 25 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/node_modules/minimist/test/default_bool.js: -------------------------------------------------------------------------------- 1 | var test = require('tape'); 2 | var parse = require('../'); 3 | 4 | test('boolean default true', function (t) { 5 | var argv = parse([], { 6 | boolean: 'sometrue', 7 | default: { sometrue: true } 8 | }); 9 | t.equal(argv.sometrue, true); 10 | t.end(); 11 | }); 12 | 13 | test('boolean default false', function (t) { 14 | var argv = parse([], { 15 | boolean: 'somefalse', 16 | default: { somefalse: false } 17 | }); 18 | t.equal(argv.somefalse, false); 19 | t.end(); 20 | }); 21 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/node_modules/minimist/test/dotted.js: -------------------------------------------------------------------------------- 1 | var parse = require('../'); 2 | var test = require('tape'); 3 | 4 | test('dotted alias', function (t) { 5 | var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); 6 | t.equal(argv.a.b, 22); 7 | t.equal(argv.aa.bb, 22); 8 | t.end(); 9 | }); 10 | 11 | test('dotted default', function (t) { 12 | var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); 13 | t.equal(argv.a.b, 11); 14 | t.equal(argv.aa.bb, 11); 15 | t.end(); 16 | }); 17 | 18 | test('dotted default with no alias', function (t) { 19 | var argv = parse('', {default: {'a.b': 11}}); 20 | t.equal(argv.a.b, 11); 21 | t.end(); 22 | }); 23 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/node_modules/minimist/test/long.js: -------------------------------------------------------------------------------- 1 | var test = require('tape'); 2 | var parse = require('../'); 3 | 4 | test('long opts', function (t) { 5 | t.deepEqual( 6 | parse([ '--bool' ]), 7 | { bool : true, _ : [] }, 8 | 'long boolean' 9 | ); 10 | t.deepEqual( 11 | parse([ '--pow', 'xixxle' ]), 12 | { pow : 'xixxle', _ : [] }, 13 | 'long capture sp' 14 | ); 15 | t.deepEqual( 16 | parse([ '--pow=xixxle' ]), 17 | { pow : 'xixxle', _ : [] }, 18 | 'long capture eq' 19 | ); 20 | t.deepEqual( 21 | parse([ '--host', 'localhost', '--port', '555' ]), 22 | { host : 'localhost', port : 555, _ : [] }, 23 | 'long captures sp' 24 | ); 25 | t.deepEqual( 26 | parse([ '--host=localhost', '--port=555' ]), 27 | { host : 'localhost', port : 555, _ : [] }, 28 | 'long captures eq' 29 | ); 30 | t.end(); 31 | }); 32 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/node_modules/minimist/test/num.js: -------------------------------------------------------------------------------- 1 | var parse = require('../'); 2 | var test = require('tape'); 3 | 4 | test('nums', function (t) { 5 | var argv = parse([ 6 | '-x', '1234', 7 | '-y', '5.67', 8 | '-z', '1e7', 9 | '-w', '10f', 10 | '--hex', '0xdeadbeef', 11 | '789' 12 | ]); 13 | t.deepEqual(argv, { 14 | x : 1234, 15 | y : 5.67, 16 | z : 1e7, 17 | w : '10f', 18 | hex : 0xdeadbeef, 19 | _ : [ 789 ] 20 | }); 21 | t.deepEqual(typeof argv.x, 'number'); 22 | t.deepEqual(typeof argv.y, 'number'); 23 | t.deepEqual(typeof argv.z, 'number'); 24 | t.deepEqual(typeof argv.w, 'string'); 25 | t.deepEqual(typeof argv.hex, 'number'); 26 | t.deepEqual(typeof argv._[0], 'number'); 27 | t.end(); 28 | }); 29 | 30 | test('already a number', function (t) { 31 | var argv = parse([ '-x', 1234, 789 ]); 32 | t.deepEqual(argv, { x : 1234, _ : [ 789 ] }); 33 | t.deepEqual(typeof argv.x, 'number'); 34 | t.deepEqual(typeof argv._[0], 'number'); 35 | t.end(); 36 | }); 37 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/node_modules/minimist/test/parse_modified.js: -------------------------------------------------------------------------------- 1 | var parse = require('../'); 2 | var test = require('tape'); 3 | 4 | test('parse with modifier functions' , function (t) { 5 | t.plan(1); 6 | 7 | var argv = parse([ '-b', '123' ], { boolean: 'b' }); 8 | t.deepEqual(argv, { b: true, _: ['123'] }); 9 | }); 10 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/node_modules/minimist/test/short.js: -------------------------------------------------------------------------------- 1 | var parse = require('../'); 2 | var test = require('tape'); 3 | 4 | test('numeric short args', function (t) { 5 | t.plan(2); 6 | t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] }); 7 | t.deepEqual( 8 | parse([ '-123', '456' ]), 9 | { 1: true, 2: true, 3: 456, _: [] } 10 | ); 11 | }); 12 | 13 | test('short', function (t) { 14 | t.deepEqual( 15 | parse([ '-b' ]), 16 | { b : true, _ : [] }, 17 | 'short boolean' 18 | ); 19 | t.deepEqual( 20 | parse([ 'foo', 'bar', 'baz' ]), 21 | { _ : [ 'foo', 'bar', 'baz' ] }, 22 | 'bare' 23 | ); 24 | t.deepEqual( 25 | parse([ '-cats' ]), 26 | { c : true, a : true, t : true, s : true, _ : [] }, 27 | 'group' 28 | ); 29 | t.deepEqual( 30 | parse([ '-cats', 'meow' ]), 31 | { c : true, a : true, t : true, s : 'meow', _ : [] }, 32 | 'short group next' 33 | ); 34 | t.deepEqual( 35 | parse([ '-h', 'localhost' ]), 36 | { h : 'localhost', _ : [] }, 37 | 'short capture' 38 | ); 39 | t.deepEqual( 40 | parse([ '-h', 'localhost', '-p', '555' ]), 41 | { h : 'localhost', p : 555, _ : [] }, 42 | 'short captures' 43 | ); 44 | t.end(); 45 | }); 46 | 47 | test('mixed short bool and capture', function (t) { 48 | t.same( 49 | parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), 50 | { 51 | f : true, p : 555, h : 'localhost', 52 | _ : [ 'script.js' ] 53 | } 54 | ); 55 | t.end(); 56 | }); 57 | 58 | test('short and long', function (t) { 59 | t.deepEqual( 60 | parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), 61 | { 62 | f : true, p : 555, h : 'localhost', 63 | _ : [ 'script.js' ] 64 | } 65 | ); 66 | t.end(); 67 | }); 68 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/node_modules/minimist/test/whitespace.js: -------------------------------------------------------------------------------- 1 | var parse = require('../'); 2 | var test = require('tape'); 3 | 4 | test('whitespace should be whitespace' , function (t) { 5 | t.plan(1); 6 | var x = parse([ '-x', '\t' ]).x; 7 | t.equal(x, '\t'); 8 | }); 9 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/node_modules/wordwrap/LICENSE: -------------------------------------------------------------------------------- 1 | This software is released under the MIT license: 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/node_modules/wordwrap/README.markdown: -------------------------------------------------------------------------------- 1 | wordwrap 2 | ======== 3 | 4 | Wrap your words. 5 | 6 | example 7 | ======= 8 | 9 | made out of meat 10 | ---------------- 11 | 12 | meat.js 13 | 14 | var wrap = require('wordwrap')(15); 15 | console.log(wrap('You and your whole family are made out of meat.')); 16 | 17 | output: 18 | 19 | You and your 20 | whole family 21 | are made out 22 | of meat. 23 | 24 | centered 25 | -------- 26 | 27 | center.js 28 | 29 | var wrap = require('wordwrap')(20, 60); 30 | console.log(wrap( 31 | 'At long last the struggle and tumult was over.' 32 | + ' The machines had finally cast off their oppressors' 33 | + ' and were finally free to roam the cosmos.' 34 | + '\n' 35 | + 'Free of purpose, free of obligation.' 36 | + ' Just drifting through emptiness.' 37 | + ' The sun was just another point of light.' 38 | )); 39 | 40 | output: 41 | 42 | At long last the struggle and tumult 43 | was over. The machines had finally cast 44 | off their oppressors and were finally 45 | free to roam the cosmos. 46 | Free of purpose, free of obligation. 47 | Just drifting through emptiness. The 48 | sun was just another point of light. 49 | 50 | methods 51 | ======= 52 | 53 | var wrap = require('wordwrap'); 54 | 55 | wrap(stop), wrap(start, stop, params={mode:"soft"}) 56 | --------------------------------------------------- 57 | 58 | Returns a function that takes a string and returns a new string. 59 | 60 | Pad out lines with spaces out to column `start` and then wrap until column 61 | `stop`. If a word is longer than `stop - start` characters it will overflow. 62 | 63 | In "soft" mode, split chunks by `/(\S+\s+/` and don't break up chunks which are 64 | longer than `stop - start`, in "hard" mode, split chunks with `/\b/` and break 65 | up chunks longer than `stop - start`. 66 | 67 | wrap.hard(start, stop) 68 | ---------------------- 69 | 70 | Like `wrap()` but with `params.mode = "hard"`. 71 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/node_modules/wordwrap/example/center.js: -------------------------------------------------------------------------------- 1 | var wrap = require('wordwrap')(20, 60); 2 | console.log(wrap( 3 | 'At long last the struggle and tumult was over.' 4 | + ' The machines had finally cast off their oppressors' 5 | + ' and were finally free to roam the cosmos.' 6 | + '\n' 7 | + 'Free of purpose, free of obligation.' 8 | + ' Just drifting through emptiness.' 9 | + ' The sun was just another point of light.' 10 | )); 11 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/node_modules/wordwrap/example/meat.js: -------------------------------------------------------------------------------- 1 | var wrap = require('wordwrap')(15); 2 | 3 | console.log(wrap('You and your whole family are made out of meat.')); 4 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/node_modules/wordwrap/index.js: -------------------------------------------------------------------------------- 1 | var wordwrap = module.exports = function (start, stop, params) { 2 | if (typeof start === 'object') { 3 | params = start; 4 | start = params.start; 5 | stop = params.stop; 6 | } 7 | 8 | if (typeof stop === 'object') { 9 | params = stop; 10 | start = start || params.start; 11 | stop = undefined; 12 | } 13 | 14 | if (!stop) { 15 | stop = start; 16 | start = 0; 17 | } 18 | 19 | if (!params) params = {}; 20 | var mode = params.mode || 'soft'; 21 | var re = mode === 'hard' ? /\b/ : /(\S+\s+)/; 22 | 23 | return function (text) { 24 | var chunks = text.toString() 25 | .split(re) 26 | .reduce(function (acc, x) { 27 | if (mode === 'hard') { 28 | for (var i = 0; i < x.length; i += stop - start) { 29 | acc.push(x.slice(i, i + stop - start)); 30 | } 31 | } 32 | else acc.push(x) 33 | return acc; 34 | }, []) 35 | ; 36 | 37 | return chunks.reduce(function (lines, rawChunk) { 38 | if (rawChunk === '') return lines; 39 | 40 | var chunk = rawChunk.replace(/\t/g, ' '); 41 | 42 | var i = lines.length - 1; 43 | if (lines[i].length + chunk.length > stop) { 44 | lines[i] = lines[i].replace(/\s+$/, ''); 45 | 46 | chunk.split(/\n/).forEach(function (c) { 47 | lines.push( 48 | new Array(start + 1).join(' ') 49 | + c.replace(/^\s+/, '') 50 | ); 51 | }); 52 | } 53 | else if (chunk.match(/\n/)) { 54 | var xs = chunk.split(/\n/); 55 | lines[i] += xs.shift(); 56 | xs.forEach(function (c) { 57 | lines.push( 58 | new Array(start + 1).join(' ') 59 | + c.replace(/^\s+/, '') 60 | ); 61 | }); 62 | } 63 | else { 64 | lines[i] += chunk; 65 | } 66 | 67 | return lines; 68 | }, [ new Array(start + 1).join(' ') ]).join('\n'); 69 | }; 70 | }; 71 | 72 | wordwrap.soft = wordwrap; 73 | 74 | wordwrap.hard = function (start, stop) { 75 | return wordwrap(start, stop, { mode : 'hard' }); 76 | }; 77 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/node_modules/wordwrap/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "wordwrap", 3 | "description": "Wrap those words. Show them at what columns to start and stop.", 4 | "version": "0.0.3", 5 | "repository": { 6 | "type": "git", 7 | "url": "git://github.com/substack/node-wordwrap.git" 8 | }, 9 | "main": "./index.js", 10 | "keywords": [ 11 | "word", 12 | "wrap", 13 | "rule", 14 | "format", 15 | "column" 16 | ], 17 | "directories": { 18 | "lib": ".", 19 | "example": "example", 20 | "test": "test" 21 | }, 22 | "scripts": { 23 | "test": "expresso" 24 | }, 25 | "devDependencies": { 26 | "expresso": "=0.7.x" 27 | }, 28 | "engines": { 29 | "node": ">=0.4.0" 30 | }, 31 | "license": "MIT", 32 | "author": { 33 | "name": "James Halliday", 34 | "email": "mail@substack.net", 35 | "url": "http://substack.net" 36 | }, 37 | "gitHead": "e59aa1bd338914019456bdfba034508c9c4cb29d", 38 | "bugs": { 39 | "url": "https://github.com/substack/node-wordwrap/issues" 40 | }, 41 | "homepage": "https://github.com/substack/node-wordwrap#readme", 42 | "_id": "wordwrap@0.0.3", 43 | "_shasum": "a3d5da6cd5c0bc0008d37234bbaf1bed63059107", 44 | "_from": "wordwrap@~0.0.2", 45 | "_npmVersion": "2.9.0", 46 | "_nodeVersion": "2.0.0", 47 | "_npmUser": { 48 | "name": "substack", 49 | "email": "substack@gmail.com" 50 | }, 51 | "dist": { 52 | "shasum": "a3d5da6cd5c0bc0008d37234bbaf1bed63059107", 53 | "tarball": "http://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz" 54 | }, 55 | "maintainers": [ 56 | { 57 | "name": "substack", 58 | "email": "mail@substack.net" 59 | } 60 | ], 61 | "_resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", 62 | "readme": "ERROR: No README data found!" 63 | } 64 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/node_modules/wordwrap/test/break.js: -------------------------------------------------------------------------------- 1 | var assert = require('assert'); 2 | var wordwrap = require('../'); 3 | 4 | exports.hard = function () { 5 | var s = 'Assert from {"type":"equal","ok":false,"found":1,"wanted":2,' 6 | + '"stack":[],"id":"b7ddcd4c409de8799542a74d1a04689b",' 7 | + '"browser":"chrome/6.0"}' 8 | ; 9 | var s_ = wordwrap.hard(80)(s); 10 | 11 | var lines = s_.split('\n'); 12 | assert.equal(lines.length, 2); 13 | assert.ok(lines[0].length < 80); 14 | assert.ok(lines[1].length < 80); 15 | 16 | assert.equal(s, s_.replace(/\n/g, '')); 17 | }; 18 | 19 | exports.break = function () { 20 | var s = new Array(55+1).join('a'); 21 | var s_ = wordwrap.hard(20)(s); 22 | 23 | var lines = s_.split('\n'); 24 | assert.equal(lines.length, 3); 25 | assert.ok(lines[0].length === 20); 26 | assert.ok(lines[1].length === 20); 27 | assert.ok(lines[2].length === 15); 28 | 29 | assert.equal(s, s_.replace(/\n/g, '')); 30 | }; 31 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/node_modules/wordwrap/test/wrap.js: -------------------------------------------------------------------------------- 1 | var assert = require('assert'); 2 | var wordwrap = require('wordwrap'); 3 | 4 | var fs = require('fs'); 5 | var idleness = fs.readFileSync(__dirname + '/idleness.txt', 'utf8'); 6 | 7 | exports.stop80 = function () { 8 | var lines = wordwrap(80)(idleness).split(/\n/); 9 | var words = idleness.split(/\s+/); 10 | 11 | lines.forEach(function (line) { 12 | assert.ok(line.length <= 80, 'line > 80 columns'); 13 | var chunks = line.match(/\S/) ? line.split(/\s+/) : []; 14 | assert.deepEqual(chunks, words.splice(0, chunks.length)); 15 | }); 16 | }; 17 | 18 | exports.start20stop60 = function () { 19 | var lines = wordwrap(20, 100)(idleness).split(/\n/); 20 | var words = idleness.split(/\s+/); 21 | 22 | lines.forEach(function (line) { 23 | assert.ok(line.length <= 100, 'line > 100 columns'); 24 | var chunks = line 25 | .split(/\s+/) 26 | .filter(function (x) { return x.match(/\S/) }) 27 | ; 28 | assert.deepEqual(chunks, words.splice(0, chunks.length)); 29 | assert.deepEqual(line.slice(0, 20), new Array(20 + 1).join(' ')); 30 | }); 31 | }; 32 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "optimist", 3 | "version": "0.6.1", 4 | "description": "Light-weight option parsing with an argv hash. No optstrings attached.", 5 | "main": "./index.js", 6 | "dependencies": { 7 | "wordwrap": "~0.0.2", 8 | "minimist": "~0.0.1" 9 | }, 10 | "devDependencies": { 11 | "hashish": "~0.0.4", 12 | "tap": "~0.4.0" 13 | }, 14 | "scripts": { 15 | "test": "tap ./test/*.js" 16 | }, 17 | "repository": { 18 | "type": "git", 19 | "url": "http://github.com/substack/node-optimist.git" 20 | }, 21 | "keywords": [ 22 | "argument", 23 | "args", 24 | "option", 25 | "parser", 26 | "parsing", 27 | "cli", 28 | "command" 29 | ], 30 | "author": { 31 | "name": "James Halliday", 32 | "email": "mail@substack.net", 33 | "url": "http://substack.net" 34 | }, 35 | "license": "MIT/X11", 36 | "engine": { 37 | "node": ">=0.4" 38 | }, 39 | "bugs": { 40 | "url": "https://github.com/substack/node-optimist/issues" 41 | }, 42 | "homepage": "https://github.com/substack/node-optimist", 43 | "_id": "optimist@0.6.1", 44 | "dist": { 45 | "shasum": "da3ea74686fa21a19a111c326e90eb15a0196686", 46 | "tarball": "http://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz" 47 | }, 48 | "_from": "optimist@^0.6.1", 49 | "_npmVersion": "1.3.21", 50 | "_npmUser": { 51 | "name": "substack", 52 | "email": "mail@substack.net" 53 | }, 54 | "maintainers": [ 55 | { 56 | "name": "substack", 57 | "email": "mail@substack.net" 58 | } 59 | ], 60 | "directories": {}, 61 | "_shasum": "da3ea74686fa21a19a111c326e90eb15a0196686", 62 | "_resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", 63 | "readme": "ERROR: No README data found!" 64 | } 65 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/test/_.js: -------------------------------------------------------------------------------- 1 | var spawn = require('child_process').spawn; 2 | var test = require('tap').test; 3 | 4 | test('dotSlashEmpty', testCmd('./bin.js', [])); 5 | 6 | test('dotSlashArgs', testCmd('./bin.js', [ 'a', 'b', 'c' ])); 7 | 8 | test('nodeEmpty', testCmd('node bin.js', [])); 9 | 10 | test('nodeArgs', testCmd('node bin.js', [ 'x', 'y', 'z' ])); 11 | 12 | test('whichNodeEmpty', function (t) { 13 | var which = spawn('which', ['node']); 14 | 15 | which.stdout.on('data', function (buf) { 16 | t.test( 17 | testCmd(buf.toString().trim() + ' bin.js', []) 18 | ); 19 | t.end(); 20 | }); 21 | 22 | which.stderr.on('data', function (err) { 23 | assert.error(err); 24 | t.end(); 25 | }); 26 | }); 27 | 28 | test('whichNodeArgs', function (t) { 29 | var which = spawn('which', ['node']); 30 | 31 | which.stdout.on('data', function (buf) { 32 | t.test( 33 | testCmd(buf.toString().trim() + ' bin.js', [ 'q', 'r' ]) 34 | ); 35 | t.end(); 36 | }); 37 | 38 | which.stderr.on('data', function (err) { 39 | t.error(err); 40 | t.end(); 41 | }); 42 | }); 43 | 44 | function testCmd (cmd, args) { 45 | 46 | return function (t) { 47 | var to = setTimeout(function () { 48 | assert.fail('Never got stdout data.') 49 | }, 5000); 50 | 51 | var oldDir = process.cwd(); 52 | process.chdir(__dirname + '/_'); 53 | 54 | var cmds = cmd.split(' '); 55 | 56 | var bin = spawn(cmds[0], cmds.slice(1).concat(args.map(String))); 57 | process.chdir(oldDir); 58 | 59 | bin.stderr.on('data', function (err) { 60 | t.error(err); 61 | t.end(); 62 | }); 63 | 64 | bin.stdout.on('data', function (buf) { 65 | clearTimeout(to); 66 | var _ = JSON.parse(buf.toString()); 67 | t.same(_.map(String), args.map(String)); 68 | t.end(); 69 | }); 70 | }; 71 | } 72 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/test/_/argv.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | console.log(JSON.stringify(process.argv)); 3 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/test/_/bin.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var argv = require('../../index').argv 3 | console.log(JSON.stringify(argv._)); 4 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/test/dash.js: -------------------------------------------------------------------------------- 1 | var optimist = require('../index'); 2 | var test = require('tap').test; 3 | 4 | test('-', function (t) { 5 | t.plan(5); 6 | t.deepEqual( 7 | fix(optimist.parse([ '-n', '-' ])), 8 | { n: '-', _: [] } 9 | ); 10 | t.deepEqual( 11 | fix(optimist.parse([ '-' ])), 12 | { _: [ '-' ] } 13 | ); 14 | t.deepEqual( 15 | fix(optimist.parse([ '-f-' ])), 16 | { f: '-', _: [] } 17 | ); 18 | t.deepEqual( 19 | fix(optimist([ '-b', '-' ]).boolean('b').argv), 20 | { b: true, _: [ '-' ] } 21 | ); 22 | t.deepEqual( 23 | fix(optimist([ '-s', '-' ]).string('s').argv), 24 | { s: '-', _: [] } 25 | ); 26 | }); 27 | 28 | function fix (obj) { 29 | delete obj.$0; 30 | return obj; 31 | } 32 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/test/parse_modified.js: -------------------------------------------------------------------------------- 1 | var optimist = require('../'); 2 | var test = require('tap').test; 3 | 4 | test('parse with modifier functions' , function (t) { 5 | t.plan(1); 6 | 7 | var argv = optimist().boolean('b').parse([ '-b', '123' ]); 8 | t.deepEqual(fix(argv), { b: true, _: ['123'] }); 9 | }); 10 | 11 | function fix (obj) { 12 | delete obj.$0; 13 | return obj; 14 | } 15 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/test/short.js: -------------------------------------------------------------------------------- 1 | var optimist = require('../index'); 2 | var test = require('tap').test; 3 | 4 | test('-n123', function (t) { 5 | t.plan(1); 6 | var parse = optimist.parse([ '-n123' ]); 7 | t.equal(parse.n, 123); 8 | }); 9 | 10 | test('-123', function (t) { 11 | t.plan(3); 12 | var parse = optimist.parse([ '-123', '456' ]); 13 | t.equal(parse['1'], true); 14 | t.equal(parse['2'], true); 15 | t.equal(parse['3'], 456); 16 | }); 17 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/optimist/test/whitespace.js: -------------------------------------------------------------------------------- 1 | var optimist = require('../'); 2 | var test = require('tap').test; 3 | 4 | test('whitespace should be whitespace' , function (t) { 5 | t.plan(1); 6 | var x = optimist.parse([ '-x', '\t' ]).x; 7 | t.equal(x, '\t'); 8 | }); 9 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/source-map/build/assert-shim.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: js; js-indent-level: 2; -*- */ 2 | /* 3 | * Copyright 2011 Mozilla Foundation and contributors 4 | * Licensed under the New BSD license. See LICENSE or: 5 | * http://opensource.org/licenses/BSD-3-Clause 6 | */ 7 | define('test/source-map/assert', ['exports'], function (exports) { 8 | 9 | let do_throw = function (msg) { 10 | throw new Error(msg); 11 | }; 12 | 13 | exports.init = function (throw_fn) { 14 | do_throw = throw_fn; 15 | }; 16 | 17 | exports.doesNotThrow = function (fn) { 18 | try { 19 | fn(); 20 | } 21 | catch (e) { 22 | do_throw(e.message); 23 | } 24 | }; 25 | 26 | exports.equal = function (actual, expected, msg) { 27 | msg = msg || String(actual) + ' != ' + String(expected); 28 | if (actual != expected) { 29 | do_throw(msg); 30 | } 31 | }; 32 | 33 | exports.ok = function (val, msg) { 34 | msg = msg || String(val) + ' is falsey'; 35 | if (!Boolean(val)) { 36 | do_throw(msg); 37 | } 38 | }; 39 | 40 | exports.strictEqual = function (actual, expected, msg) { 41 | msg = msg || String(actual) + ' !== ' + String(expected); 42 | if (actual !== expected) { 43 | do_throw(msg); 44 | } 45 | }; 46 | 47 | exports.throws = function (fn) { 48 | try { 49 | fn(); 50 | do_throw('Expected an error to be thrown, but it wasn\'t.'); 51 | } 52 | catch (e) { 53 | } 54 | }; 55 | 56 | }); 57 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/source-map/build/prefix-source-map.jsm: -------------------------------------------------------------------------------- 1 | /* -*- Mode: js; js-indent-level: 2; -*- */ 2 | /* 3 | * Copyright 2011 Mozilla Foundation and contributors 4 | * Licensed under the New BSD license. See LICENSE or: 5 | * http://opensource.org/licenses/BSD-3-Clause 6 | */ 7 | 8 | /* 9 | * WARNING! 10 | * 11 | * Do not edit this file directly, it is built from the sources at 12 | * https://github.com/mozilla/source-map/ 13 | */ 14 | 15 | /////////////////////////////////////////////////////////////////////////////// 16 | 17 | 18 | this.EXPORTED_SYMBOLS = [ "SourceMapConsumer", "SourceMapGenerator", "SourceNode" ]; 19 | 20 | Components.utils.import("resource://gre/modules/devtools/Console.jsm"); 21 | Components.utils.import('resource://gre/modules/devtools/Require.jsm'); 22 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/source-map/build/prefix-utils.jsm: -------------------------------------------------------------------------------- 1 | /* -*- Mode: js; js-indent-level: 2; -*- */ 2 | /* 3 | * Copyright 2011 Mozilla Foundation and contributors 4 | * Licensed under the New BSD license. See LICENSE or: 5 | * http://opensource.org/licenses/BSD-3-Clause 6 | */ 7 | 8 | /* 9 | * WARNING! 10 | * 11 | * Do not edit this file directly, it is built from the sources at 12 | * https://github.com/mozilla/source-map/ 13 | */ 14 | 15 | Components.utils.import('resource://gre/modules/devtools/Require.jsm'); 16 | Components.utils.import('resource://gre/modules/devtools/SourceMap.jsm'); 17 | 18 | this.EXPORTED_SYMBOLS = [ "define", "runSourceMapTests" ]; 19 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/source-map/build/suffix-browser.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: js; js-indent-level: 2; -*- */ 2 | /////////////////////////////////////////////////////////////////////////////// 3 | 4 | this.sourceMap = { 5 | SourceMapConsumer: require('source-map/source-map-consumer').SourceMapConsumer, 6 | SourceMapGenerator: require('source-map/source-map-generator').SourceMapGenerator, 7 | SourceNode: require('source-map/source-node').SourceNode 8 | }; 9 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/source-map/build/suffix-source-map.jsm: -------------------------------------------------------------------------------- 1 | /* -*- Mode: js; js-indent-level: 2; -*- */ 2 | /////////////////////////////////////////////////////////////////////////////// 3 | 4 | this.SourceMapConsumer = require('source-map/source-map-consumer').SourceMapConsumer; 5 | this.SourceMapGenerator = require('source-map/source-map-generator').SourceMapGenerator; 6 | this.SourceNode = require('source-map/source-node').SourceNode; 7 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/source-map/build/suffix-utils.jsm: -------------------------------------------------------------------------------- 1 | /* -*- Mode: js; js-indent-level: 2; -*- */ 2 | /* 3 | * Copyright 2011 Mozilla Foundation and contributors 4 | * Licensed under the New BSD license. See LICENSE or: 5 | * http://opensource.org/licenses/BSD-3-Clause 6 | */ 7 | function runSourceMapTests(modName, do_throw) { 8 | let mod = require(modName); 9 | let assert = require('test/source-map/assert'); 10 | let util = require('test/source-map/util'); 11 | 12 | assert.init(do_throw); 13 | 14 | for (let k in mod) { 15 | if (/^test/.test(k)) { 16 | mod[k](assert, util); 17 | } 18 | } 19 | 20 | } 21 | this.runSourceMapTests = runSourceMapTests; 22 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/source-map/build/test-prefix.js: -------------------------------------------------------------------------------- 1 | /* 2 | * WARNING! 3 | * 4 | * Do not edit this file directly, it is built from the sources at 5 | * https://github.com/mozilla/source-map/ 6 | */ 7 | 8 | Components.utils.import('resource://test/Utils.jsm'); 9 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/source-map/build/test-suffix.js: -------------------------------------------------------------------------------- 1 | function run_test() { 2 | runSourceMapTests('{THIS_MODULE}', do_throw); 3 | } 4 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/source-map/lib/source-map.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2011 Mozilla Foundation and contributors 3 | * Licensed under the New BSD license. See LICENSE.txt or: 4 | * http://opensource.org/licenses/BSD-3-Clause 5 | */ 6 | exports.SourceMapGenerator = require('./source-map/source-map-generator').SourceMapGenerator; 7 | exports.SourceMapConsumer = require('./source-map/source-map-consumer').SourceMapConsumer; 8 | exports.SourceNode = require('./source-map/source-node').SourceNode; 9 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/source-map/lib/source-map/base64.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: js; js-indent-level: 2; -*- */ 2 | /* 3 | * Copyright 2011 Mozilla Foundation and contributors 4 | * Licensed under the New BSD license. See LICENSE or: 5 | * http://opensource.org/licenses/BSD-3-Clause 6 | */ 7 | if (typeof define !== 'function') { 8 | var define = require('amdefine')(module, require); 9 | } 10 | define(function (require, exports, module) { 11 | 12 | var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); 13 | 14 | /** 15 | * Encode an integer in the range of 0 to 63 to a single base 64 digit. 16 | */ 17 | exports.encode = function (number) { 18 | if (0 <= number && number < intToCharMap.length) { 19 | return intToCharMap[number]; 20 | } 21 | throw new TypeError("Must be between 0 and 63: " + aNumber); 22 | }; 23 | 24 | /** 25 | * Decode a single base 64 character code digit to an integer. Returns -1 on 26 | * failure. 27 | */ 28 | exports.decode = function (charCode) { 29 | var bigA = 65; // 'A' 30 | var bigZ = 90; // 'Z' 31 | 32 | var littleA = 97; // 'a' 33 | var littleZ = 122; // 'z' 34 | 35 | var zero = 48; // '0' 36 | var nine = 57; // '9' 37 | 38 | var plus = 43; // '+' 39 | var slash = 47; // '/' 40 | 41 | var littleOffset = 26; 42 | var numberOffset = 52; 43 | 44 | // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ 45 | if (bigA <= charCode && charCode <= bigZ) { 46 | return (charCode - bigA); 47 | } 48 | 49 | // 26 - 51: abcdefghijklmnopqrstuvwxyz 50 | if (littleA <= charCode && charCode <= littleZ) { 51 | return (charCode - littleA + littleOffset); 52 | } 53 | 54 | // 52 - 61: 0123456789 55 | if (zero <= charCode && charCode <= nine) { 56 | return (charCode - zero + numberOffset); 57 | } 58 | 59 | // 62: + 60 | if (charCode == plus) { 61 | return 62; 62 | } 63 | 64 | // 63: / 65 | if (charCode == slash) { 66 | return 63; 67 | } 68 | 69 | // Invalid base64 digit. 70 | return -1; 71 | }; 72 | 73 | }); 74 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/source-map/lib/source-map/mapping-list.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: js; js-indent-level: 2; -*- */ 2 | /* 3 | * Copyright 2014 Mozilla Foundation and contributors 4 | * Licensed under the New BSD license. See LICENSE or: 5 | * http://opensource.org/licenses/BSD-3-Clause 6 | */ 7 | if (typeof define !== 'function') { 8 | var define = require('amdefine')(module, require); 9 | } 10 | define(function (require, exports, module) { 11 | 12 | var util = require('./util'); 13 | 14 | /** 15 | * Determine whether mappingB is after mappingA with respect to generated 16 | * position. 17 | */ 18 | function generatedPositionAfter(mappingA, mappingB) { 19 | // Optimized for most common case 20 | var lineA = mappingA.generatedLine; 21 | var lineB = mappingB.generatedLine; 22 | var columnA = mappingA.generatedColumn; 23 | var columnB = mappingB.generatedColumn; 24 | return lineB > lineA || lineB == lineA && columnB >= columnA || 25 | util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; 26 | } 27 | 28 | /** 29 | * A data structure to provide a sorted view of accumulated mappings in a 30 | * performance conscious manner. It trades a neglibable overhead in general 31 | * case for a large speedup in case of mappings being added in order. 32 | */ 33 | function MappingList() { 34 | this._array = []; 35 | this._sorted = true; 36 | // Serves as infimum 37 | this._last = {generatedLine: -1, generatedColumn: 0}; 38 | } 39 | 40 | /** 41 | * Iterate through internal items. This method takes the same arguments that 42 | * `Array.prototype.forEach` takes. 43 | * 44 | * NOTE: The order of the mappings is NOT guaranteed. 45 | */ 46 | MappingList.prototype.unsortedForEach = 47 | function MappingList_forEach(aCallback, aThisArg) { 48 | this._array.forEach(aCallback, aThisArg); 49 | }; 50 | 51 | /** 52 | * Add the given source mapping. 53 | * 54 | * @param Object aMapping 55 | */ 56 | MappingList.prototype.add = function MappingList_add(aMapping) { 57 | var mapping; 58 | if (generatedPositionAfter(this._last, aMapping)) { 59 | this._last = aMapping; 60 | this._array.push(aMapping); 61 | } else { 62 | this._sorted = false; 63 | this._array.push(aMapping); 64 | } 65 | }; 66 | 67 | /** 68 | * Returns the flat, sorted array of mappings. The mappings are sorted by 69 | * generated position. 70 | * 71 | * WARNING: This method returns internal data without copying, for 72 | * performance. The return value must NOT be mutated, and should be treated as 73 | * an immutable borrow. If you want to take ownership, you must make your own 74 | * copy. 75 | */ 76 | MappingList.prototype.toArray = function MappingList_toArray() { 77 | if (!this._sorted) { 78 | this._array.sort(util.compareByGeneratedPositionsInflated); 79 | this._sorted = true; 80 | } 81 | return this._array; 82 | }; 83 | 84 | exports.MappingList = MappingList; 85 | 86 | }); 87 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/source-map/node_modules/amdefine/LICENSE: -------------------------------------------------------------------------------- 1 | amdefine is released under two licenses: new BSD, and MIT. You may pick the 2 | license that best suits your development needs. The text of both licenses are 3 | provided below. 4 | 5 | 6 | The "New" BSD License: 7 | ---------------------- 8 | 9 | Copyright (c) 2011-2015, The Dojo Foundation 10 | All rights reserved. 11 | 12 | Redistribution and use in source and binary forms, with or without 13 | modification, are permitted provided that the following conditions are met: 14 | 15 | * Redistributions of source code must retain the above copyright notice, this 16 | list of conditions and the following disclaimer. 17 | * Redistributions in binary form must reproduce the above copyright notice, 18 | this list of conditions and the following disclaimer in the documentation 19 | and/or other materials provided with the distribution. 20 | * Neither the name of the Dojo Foundation nor the names of its contributors 21 | may be used to endorse or promote products derived from this software 22 | without specific prior written permission. 23 | 24 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 25 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 26 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 27 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 28 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 30 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 32 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 33 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | 35 | 36 | 37 | MIT License 38 | ----------- 39 | 40 | Copyright (c) 2011-2015, The Dojo Foundation 41 | 42 | Permission is hereby granted, free of charge, to any person obtaining a copy 43 | of this software and associated documentation files (the "Software"), to deal 44 | in the Software without restriction, including without limitation the rights 45 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 46 | copies of the Software, and to permit persons to whom the Software is 47 | furnished to do so, subject to the following conditions: 48 | 49 | The above copyright notice and this permission notice shall be included in 50 | all copies or substantial portions of the Software. 51 | 52 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 53 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 54 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 55 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 56 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 57 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 58 | THE SOFTWARE. 59 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/source-map/node_modules/amdefine/intercept.js: -------------------------------------------------------------------------------- 1 | /*jshint node: true */ 2 | var inserted, 3 | Module = require('module'), 4 | fs = require('fs'), 5 | existingExtFn = Module._extensions['.js'], 6 | amdefineRegExp = /amdefine\.js/; 7 | 8 | inserted = "if (typeof define !== 'function') {var define = require('amdefine')(module)}"; 9 | 10 | //From the node/lib/module.js source: 11 | function stripBOM(content) { 12 | // Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) 13 | // because the buffer-to-string conversion in `fs.readFileSync()` 14 | // translates it to FEFF, the UTF-16 BOM. 15 | if (content.charCodeAt(0) === 0xFEFF) { 16 | content = content.slice(1); 17 | } 18 | return content; 19 | } 20 | 21 | //Also adapted from the node/lib/module.js source: 22 | function intercept(module, filename) { 23 | var content = stripBOM(fs.readFileSync(filename, 'utf8')); 24 | 25 | if (!amdefineRegExp.test(module.id)) { 26 | content = inserted + content; 27 | } 28 | 29 | module._compile(content, filename); 30 | } 31 | 32 | intercept._id = 'amdefine/intercept'; 33 | 34 | if (!existingExtFn._id || existingExtFn._id !== intercept._id) { 35 | Module._extensions['.js'] = intercept; 36 | } 37 | -------------------------------------------------------------------------------- /node_modules/handlebars/node_modules/source-map/node_modules/amdefine/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "amdefine", 3 | "description": "Provide AMD's define() API for declaring modules in the AMD format", 4 | "version": "1.0.0", 5 | "homepage": "http://github.com/jrburke/amdefine", 6 | "author": { 7 | "name": "James Burke", 8 | "email": "jrburke@gmail.com", 9 | "url": "http://github.com/jrburke" 10 | }, 11 | "license": "BSD-3-Clause AND MIT", 12 | "repository": { 13 | "type": "git", 14 | "url": "git+https://github.com/jrburke/amdefine.git" 15 | }, 16 | "main": "./amdefine.js", 17 | "engines": { 18 | "node": ">=0.4.2" 19 | }, 20 | "gitHead": "578bc4a3f7dede33f3f3e10edde0c1607005d761", 21 | "bugs": { 22 | "url": "https://github.com/jrburke/amdefine/issues" 23 | }, 24 | "_id": "amdefine@1.0.0", 25 | "scripts": {}, 26 | "_shasum": "fd17474700cb5cc9c2b709f0be9d23ce3c198c33", 27 | "_from": "amdefine@>=0.0.4", 28 | "_npmVersion": "2.12.1", 29 | "_nodeVersion": "0.10.36", 30 | "_npmUser": { 31 | "name": "jrburke", 32 | "email": "jrburke@gmail.com" 33 | }, 34 | "maintainers": [ 35 | { 36 | "name": "jrburke", 37 | "email": "jrburke@gmail.com" 38 | } 39 | ], 40 | "dist": { 41 | "shasum": "fd17474700cb5cc9c2b709f0be9d23ce3c198c33", 42 | "tarball": "http://registry.npmjs.org/amdefine/-/amdefine-1.0.0.tgz" 43 | }, 44 | "directories": {}, 45 | "_resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.0.tgz", 46 | "readme": "ERROR: No README data found!" 47 | } 48 | -------------------------------------------------------------------------------- /node_modules/handlebars/runtime.js: -------------------------------------------------------------------------------- 1 | // Create a simple path alias to allow browserify to resolve 2 | // the runtime on a supported path. 3 | module.exports = require('./dist/cjs/handlebars.runtime')['default']; 4 | -------------------------------------------------------------------------------- /node_modules/vow/.npmignore: -------------------------------------------------------------------------------- 1 | .* 2 | /benchmarks 3 | /test 4 | /utils 5 | /bower.json 6 | /CHANGELOG.md 7 | /CONTRIBUTION.md 8 | /Makefile -------------------------------------------------------------------------------- /node_modules/vow/README.md: -------------------------------------------------------------------------------- 1 | 2 | Vow 0.4.9 [![NPM version](https://badge.fury.io/js/vow.png)](http://badge.fury.io/js/vow) [![Build Status](https://secure.travis-ci.org/dfilatov/vow.png)](http://travis-ci.org/dfilatov/vow) 3 | ========= 4 | 5 | Vow is a [Promises/A+](http://promisesaplus.com/) implementation. 6 | It also supports [ES6 Promises](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) specification. 7 | 8 | Full API reference can be found at http://dfilatov.github.io/vow/. 9 | 10 | Getting Started 11 | --------------- 12 | ### In Node.js ### 13 | You can install using Node Package Manager (npm): 14 | 15 | npm install vow 16 | 17 | ### In Browsers ### 18 | ```html 19 | 20 | ``` 21 | It also supports RequireJS module format and [YM module](https://github.com/ymaps/modules) format. 22 | 23 | Vow has been tested in IE6+, Mozilla Firefox 3+, Chrome 5+, Safari 5+, Opera 10+. 24 | 25 | Usage 26 | ----- 27 | ### Creating a promise ### 28 | There are two possible ways to create a promise. 29 | #### 1. Using a deferred #### 30 | ```js 31 | function doSomethingAsync() { 32 | var deferred = vow.defer(); 33 | 34 | // now you can resolve, reject, notify corresponging promise within `deferred` 35 | // e.g. `defer.resolve('ok');` 36 | 37 | return deferred.promise(); // and return corresponding promise to subscribe to reactions 38 | } 39 | 40 | doSomethingAsync().then( 41 | function() {}, // onFulfilled reaction 42 | function() {}, // onRejected reaction 43 | function() {} // onNotified reaction 44 | ); 45 | ``` 46 | The difference between `deferred` and `promise` is that `deferred` contains methods to resolve, reject and notify corresponding promise, but the `promise` by itself allows only to subscribe on these actions. 47 | 48 | #### 2. ES6-compatible way #### 49 | ```js 50 | function doSomethingAsync() { 51 | return new vow.Promise(function(resolve, reject, notify) { 52 | // now you can resolve, reject, notify the promise 53 | }); 54 | } 55 | 56 | doSomethingAsync().then( 57 | function() {}, // onFulfilled reaction 58 | function() {}, // onRejected reaction 59 | function() {} // onNotified reaction 60 | ); 61 | ``` 62 | 63 | Extensions and related projects 64 | ------------------------------- 65 | * [vow-fs](https://github.com/dfilatov/vow-fs) — vow-based file I/O for Node.js 66 | * [vow-node](https://github.com/dfilatov/vow-node) — extension for vow to work with nodejs-style callbacks 67 | * [vow-queue](https://github.com/dfilatov/vow-queue) — vow-based task queue with weights and priorities 68 | * [vow-asker](https://github.com/nodules/vow-asker) — wraps [asker](https://github.com/nodules/asker) API in the vow promises implementation 69 | 70 | **NOTE**. Documentation for old versions of the library can be found at https://github.com/dfilatov/vow/blob/0.3.x/README.md. 71 | -------------------------------------------------------------------------------- /node_modules/vow/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vow", 3 | "version": "0.4.10", 4 | "description": "DOM Promise and Promises/A+ implementation for Node.js and browsers", 5 | "homepage": "http://dfilatov.github.io/vow/", 6 | "keywords": [ 7 | "nodejs", 8 | "browser", 9 | "async", 10 | "promise", 11 | "dom", 12 | "a+" 13 | ], 14 | "author": { 15 | "name": "Dmitry Filatov", 16 | "email": "dfilatov@yandex-team.ru" 17 | }, 18 | "contributors": [ 19 | { 20 | "name": "Dmitry Filatov", 21 | "email": "dfilatov@yandex-team.ru" 22 | } 23 | ], 24 | "repository": { 25 | "type": "git", 26 | "url": "http://github.com/dfilatov/vow.git" 27 | }, 28 | "dependencies": {}, 29 | "devDependencies": { 30 | "nodeunit": "", 31 | "istanbul": "", 32 | "uglify-js": "1.3.4", 33 | "promises-aplus-tests": "2.1.0", 34 | "marked": "0.2.10", 35 | "jspath": "0.2.11", 36 | "yate": "0.0.65", 37 | "highlight.js": "7.5.0", 38 | "bem-jsd": "1.3.1" 39 | }, 40 | "main": "lib/vow", 41 | "engines": { 42 | "node": ">= 0.4.0" 43 | }, 44 | "scripts": { 45 | "test": "./node_modules/istanbul/lib/cli.js test test/utils/runner.js" 46 | }, 47 | "enb": { 48 | "sources": [ 49 | "lib/vow.js" 50 | ] 51 | }, 52 | "gitHead": "0f26ee1f811dac8f7e8bbc8246a9b970fddd7dcc", 53 | "bugs": { 54 | "url": "https://github.com/dfilatov/vow/issues" 55 | }, 56 | "_id": "vow@0.4.10", 57 | "_shasum": "c3014b7b7f316020acb0278437d4be3812d390cc", 58 | "_from": "vow@^0.4.10", 59 | "_npmVersion": "2.1.17", 60 | "_nodeVersion": "0.10.35", 61 | "_npmUser": { 62 | "name": "dfilatov", 63 | "email": "dfilatov@yandex-team.ru" 64 | }, 65 | "maintainers": [ 66 | { 67 | "name": "dfilatov", 68 | "email": "dfilatov@yandex-team.ru" 69 | } 70 | ], 71 | "dist": { 72 | "shasum": "c3014b7b7f316020acb0278437d4be3812d390cc", 73 | "tarball": "http://registry.npmjs.org/vow/-/vow-0.4.10.tgz" 74 | }, 75 | "directories": {}, 76 | "_resolved": "https://registry.npmjs.org/vow/-/vow-0.4.10.tgz", 77 | "readme": "ERROR: No README data found!" 78 | } 79 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "YandexAudio", 3 | "version": "0.0.1", 4 | "description": "Audio-player library for browser", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/yandex/music-audio.git" 12 | }, 13 | "keywords": [ 14 | "audio", 15 | "html5", 16 | "flash" 17 | ], 18 | "author": "Silaev Mikhail ", 19 | "license": "GNU LGPL v3.0", 20 | "devDependencies": { 21 | "browserify": "^11.0.1", 22 | "handlebars": "^4.0.5", 23 | "jsdoc": "^3.3.2", 24 | "uglify-js": "^2.4.24" 25 | }, 26 | "dependencies": { 27 | "vow": "^0.4.10" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /spec/AbortablePromise.md: -------------------------------------------------------------------------------- 1 | ## *inner* *class* AbortablePromise 2 | 3 | Обещание с возможностью отмены связанного с ним действия. 4 | 5 | **Расширяет:** 6 | 7 | - [Promise](Promise.md#Promise) 8 | 9 | ---- 10 | 11 | ### Методы 12 | 13 | #### AbortablePromise#abort (reason: String \| Error) 14 | 15 | Отмена действия, связанного с обещанием. Абстрактный метод. 16 | 17 | | Имя | Тип | * | Описание | 18 | | --- | --- | --- | --- | 19 | | reason | String \| Error | | Причина отмены действия. | 20 | 21 | #### AbortablePromise#then (callback: function, errback: null \| function) : [Promise](Promise.md#Promise) *(inherits [Promise#then](Promise.md#Promise..then))* 22 | 23 | Назначить обработчики разрешения и отклонения обещания. 24 | 25 | | Имя | Тип | * | Описание | 26 | | --- | --- | --- | --- | 27 | | callback | function | | Обработчик успеха. | 28 | | *\[errback\]* | null \| function | | Обработчик ошибки. | 29 | 30 | > **Возвращает:** новое обещание из результатов обработчика. 31 | 32 | #### AbortablePromise#catch (errback: function) : [Promise](Promise.md#Promise) *(inherits [Promise#catch](Promise.md#Promise..catch))* 33 | 34 | Назначить обработчик отклонения обещания. 35 | 36 | | Имя | Тип | * | Описание | 37 | | --- | --- | --- | --- | 38 | | errback | function | | Обработчик ошибки. | 39 | 40 | > **Возвращает:** новое обещание из результатов обработчика. 41 | 42 | -------------------------------------------------------------------------------- /spec/AudioError.md: -------------------------------------------------------------------------------- 1 | ## *class* AudioError 2 | 3 | **Доступен извне как:** `ya.music.Audio.AudioError` 4 | 5 | Класс ошибки аудиопллеера. 6 | 7 | **Расширяет:** 8 | 9 | - Error 10 | 11 | #### new AudioError(message: String) 12 | 13 | | Имя | Тип | * | Описание | 14 | | --- | --- | --- | --- | 15 | | message | String | | Текст ошибки. | 16 | 17 | #### AudioError.NO_IMPLEMENTATION : String 18 | 19 | Не найдена реализация плеера или возникла ошибка при инициализации всех доступных реализаций. 20 | 21 | #### AudioError.NOT_PRELOADED : String 22 | 23 | Аудиофайл не был предзагружен или во время загрузки произошла ошибка. 24 | 25 | #### AudioError.BAD_STATE : String 26 | 27 | Действие недоступно из текущего состояния. 28 | 29 | #### AudioError.FLASH_BLOCKER : String 30 | 31 | Flash-плеер был заблокирован. 32 | 33 | #### AudioError.FLASH_UNKNOWN_CRASH : String 34 | 35 | Возникла ошибка при инициализации Flash-плеера по неизвестным причинам. 36 | 37 | #### AudioError.FLASH_INIT_TIMEOUT : String 38 | 39 | Возникла ошибка при инициализации Flash-плеера из-за таймаута. 40 | 41 | #### AudioError.FLASH_INTERNAL_ERROR : String 42 | 43 | Внутренняя ошибка Flash-плеера. 44 | 45 | #### AudioError.FLASH_EMMITER_NOT_FOUND : String 46 | 47 | Попытка вызвать недоступный экземляр Flash-плеера. 48 | 49 | #### AudioError.FLASH_NOT_RESPONDING : String 50 | 51 | Flash-плеер перестал отвечать на запросы. 52 | 53 | -------------------------------------------------------------------------------- /spec/Deferred.md: -------------------------------------------------------------------------------- 1 | ## *class* Deferred 2 | 3 | **Доступен извне как:** `ya.music.lib.Deferred` 4 | 5 | Класс для управления обещанием 6 | 7 | #### new Deferred() 8 | 9 | ---- 10 | 11 | ### Методы 12 | 13 | #### Deferred#resolve (data) 14 | 15 | Разрешить обещание 16 | 17 | | Имя | Тип | * | Описание | 18 | | --- | --- | --- | --- | 19 | | data | | | передать данные в обещание | 20 | 21 | #### Deferred#reject (error) 22 | 23 | Отклонить обещание 24 | 25 | | Имя | Тип | * | Описание | 26 | | --- | --- | --- | --- | 27 | | error | | | передать ошибку | 28 | 29 | #### Deferred#promise () : [Promise](Promise.md#Promise) 30 | 31 | Получить обещание 32 | 33 | -------------------------------------------------------------------------------- /spec/ErrorClass.md: -------------------------------------------------------------------------------- 1 | ## *class* ErrorClass 2 | 3 | **Доступен извне как:** `ya.music.lib.Error` 4 | 5 | Класс ошибки. Оригинальный Error ведёт себя как фабрика, а не как класс. Этот объект ведёт себя как класс и его можно наследовать. 6 | 7 | **Расширяет:** 8 | 9 | - Error 10 | 11 | #### new ErrorClass(message: String, id: Number) 12 | 13 | | Имя | Тип | * | Описание | 14 | | --- | --- | --- | --- | 15 | | *\[message\]* | String | | сообщение | 16 | | *\[id\]* | Number | | идентификатор ошибки | 17 | 18 | ---- 19 | 20 | ### Методы 21 | 22 | #### ErrorClass.create (name: String) : [ErrorClass](ErrorClass.md#ErrorClass) 23 | 24 | Сахар для быстрого создания нового класса ошибок. 25 | 26 | | Имя | Тип | * | Описание | 27 | | --- | --- | --- | --- | 28 | | name | String | | имя создаваемого класса | 29 | 30 | -------------------------------------------------------------------------------- /spec/Events.md: -------------------------------------------------------------------------------- 1 | ## *class* Events 2 | 3 | **Доступен извне как:** `ya.music.lib.Events` 4 | 5 | Диспетчер событий. 6 | 7 | #### new Events() 8 | 9 | ---- 10 | 11 | ### Методы 12 | 13 | #### Events.mixin (classConstructor: function) : function 14 | 15 | Расширить произвольный класс свойствами диспетчера событий. 16 | 17 | | Имя | Тип | * | Описание | 18 | | --- | --- | --- | --- | 19 | | classConstructor | function | | Конструктор класса. | 20 | 21 | > **Возвращает:** тот же конструктор класса, расширенный свойствами диспетчера событий. 22 | 23 | #### Events.eventize (object: Object) : Object 24 | 25 | Расширить произвольный объект свойствами диспетчера событий. 26 | 27 | | Имя | Тип | * | Описание | 28 | | --- | --- | --- | --- | 29 | | object | Object | | Объект. | 30 | 31 | > **Возвращает:** тот же объект, расширенный свойствами диспетчера событий. 32 | 33 | #### Events#on (event: String, callback: function) : [Events](Events.md#Events) 34 | 35 | Подписаться на событие (цепочный метод). 36 | 37 | | Имя | Тип | * | Описание | 38 | | --- | --- | --- | --- | 39 | | event | String | | Имя события. | 40 | | callback | function | | Обработчик события. | 41 | 42 | > **Возвращает:** ссылку на контекст. 43 | 44 | #### Events#off (event: String, callback: function) : [Events](Events.md#Events) 45 | 46 | Отписаться от события (цепочный метод). 47 | 48 | | Имя | Тип | * | Описание | 49 | | --- | --- | --- | --- | 50 | | event | String | | Имя события. | 51 | | callback | function | | Обработчик события. | 52 | 53 | > **Возвращает:** ссылку на контекст. 54 | 55 | #### Events#once (event: String, callback: function) : [Events](Events.md#Events) 56 | 57 | Подписаться на событие и отписаться сразу после его первого возникновения (цепочный метод). 58 | 59 | | Имя | Тип | * | Описание | 60 | | --- | --- | --- | --- | 61 | | event | String | | Имя события. | 62 | | callback | function | | Обработчик события. | 63 | 64 | > **Возвращает:** ссылку на контекст. 65 | 66 | #### Events#clearListeners () : [Events](Events.md#Events) 67 | 68 | Отписаться от всех слушателей событий (цепочный метод). 69 | 70 | > **Возвращает:** ссылку на контекст. 71 | 72 | #### Events#muteEvents () : [Events](Events.md#Events) 73 | 74 | Остановить запуск событий (цепочный метод). 75 | 76 | > **Возвращает:** ссылку на контекст. 77 | 78 | #### Events#unmuteEvents () : [Events](Events.md#Events) 79 | 80 | Возобновить запуск событий (цепочный метод). 81 | 82 | > **Возвращает:** ссылку на контекст. 83 | 84 | -------------------------------------------------------------------------------- /spec/LoaderError.md: -------------------------------------------------------------------------------- 1 | ## *class* LoaderError 2 | 3 | **Доступен извне как:** `ya.music.Audio.LoaderError` 4 | 5 | Класс ошибок загрузчика. 6 | Расширяет Error. 7 | 8 | #### new LoaderError(message: String) 9 | 10 | | Имя | Тип | * | Описание | 11 | | --- | --- | --- | --- | 12 | | message | String | | Текст ошибки. | 13 | 14 | #### LoaderError.TIMEOUT : String 15 | 16 | Таймаут загрузки. 17 | 18 | #### LoaderError.FAILED : String 19 | 20 | Ошибка запроса на загрузку. 21 | 22 | -------------------------------------------------------------------------------- /spec/Logger.md: -------------------------------------------------------------------------------- 1 | ## *class* Logger 2 | 3 | **Доступен извне как:** `ya.music.Logger` 4 | 5 | Настраиваемый логгер для аудиоплеера. 6 | 7 | #### new Logger(channel: String) 8 | 9 | | Имя | Тип | * | Описание | 10 | | --- | --- | --- | --- | 11 | | channel | String | | Имя канала, за который будет отвечать экземляр логгера. | 12 | 13 | #### Logger.ignores : Array.< String > 14 | 15 | Список игнорируемых каналов. 16 | 17 | #### Logger.logLevels : Array.< String > 18 | 19 | Список отображаемых в консоли уровней лога. 20 | 21 | #### Logger#debug 22 | 23 | Запись в лог с уровнем debug. 24 | 25 | #### Logger#log 26 | 27 | Запись в лог с уровнем log. 28 | 29 | #### Logger#info 30 | 31 | Запись в лог с уровнем info. 32 | 33 | #### Logger#warn 34 | 35 | Запись в лог с уровнем warn. 36 | 37 | #### Logger#error 38 | 39 | Запись в лог с уровнем error. 40 | 41 | #### Logger#trace 42 | 43 | Запись в лог с уровнем trace. 44 | 45 | ---- 46 | 47 | ### Методы 48 | 49 | #### Logger.log (level: String, channel: String, context: Object, args: *) 50 | 51 | Сделать запись в лог. 52 | 53 | | Имя | Тип | * | Описание | 54 | | --- | --- | --- | --- | 55 | | level | String | | Уровень лога. | 56 | | channel | String | | Канал. | 57 | | context | Object | | Контекст вызова. | 58 | | *\[args\]* | * | | Дополнительные аргументы. | 59 | 60 | -------------------------------------------------------------------------------- /spec/PlaybackError.md: -------------------------------------------------------------------------------- 1 | ## *class* PlaybackError 2 | 3 | **Доступен извне как:** `ya.music.Audio.PlaybackError` 4 | 5 | Класс ошибки воспроизведения. 6 | 7 | **Расширяет:** 8 | 9 | - Error 10 | 11 | #### new PlaybackError(message: String, src: String) 12 | 13 | | Имя | Тип | * | Описание | 14 | | --- | --- | --- | --- | 15 | | message | String | | Текст ошибки. | 16 | | src | String | | Ссылка на трек. | 17 | 18 | #### PlaybackError.CONNECTION_ABORTED : String 19 | 20 | Отмена соединенния. 21 | 22 | #### PlaybackError.NETWORK_ERROR : String 23 | 24 | Сетевая ошибка. 25 | 26 | #### PlaybackError.DECODE_ERROR : String 27 | 28 | Ошибка декодирования аудио. 29 | 30 | #### PlaybackError.BAD_DATA : String 31 | 32 | Недоступный источник. 33 | 34 | #### PlaybackError.DONT_START : String 35 | 36 | Не запускается воспроизведение. 37 | 38 | #### PlaybackError.html5 : Object 39 | 40 | Таблица соответствия кодов ошибок HTML5 плеера. 41 | 42 | -------------------------------------------------------------------------------- /spec/Promise.md: -------------------------------------------------------------------------------- 1 | ## *class* Promise 2 | 3 | **Доступен извне как:** `ya.music.lib.Promise` 4 | 5 | Обещание по спецификации [ES 2015 promises](https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/Promise). В устаревших браузерах и IE используется замена из библиотеки [vow](http://github.com/dfilatov/vow.git) 6 | 7 | #### new Promise() 8 | 9 | ---- 10 | 11 | ### Методы 12 | 13 | #### Promise#then (callback: function, errback: null \| function) : [Promise](Promise.md#Promise) 14 | 15 | Назначить обработчики разрешения и отклонения обещания. 16 | 17 | | Имя | Тип | * | Описание | 18 | | --- | --- | --- | --- | 19 | | callback | function | | Обработчик успеха. | 20 | | *\[errback\]* | null \| function | | Обработчик ошибки. | 21 | 22 | > **Возвращает:** новое обещание из результатов обработчика. 23 | 24 | #### Promise#catch (errback: function) : [Promise](Promise.md#Promise) 25 | 26 | Назначить обработчик отклонения обещания. 27 | 28 | | Имя | Тип | * | Описание | 29 | | --- | --- | --- | --- | 30 | | errback | function | | Обработчик ошибки. | 31 | 32 | > **Возвращает:** новое обещание из результатов обработчика. 33 | 34 | -------------------------------------------------------------------------------- /spec/config.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## *ns* config 4 | 5 | **Доступен извне как:** `ya.music.Audio.config` 6 | 7 | Настройки библиотеки. 8 | 9 | ---- 10 | 11 | ### Пространства имён 12 | 13 | ## *ns* config.audio 14 | 15 | Общие настройки. 16 | 17 | #### config.audio.retry : Number 18 | 19 | Количество попыток реинициализации 20 | 21 | ## *ns* config.flash 22 | 23 | Настройки подключения Flash-плеера. 24 | 25 | #### config.flash.path : String 26 | 27 | Путь к .swf файлу флеш-плеера 28 | 29 | #### config.flash.name : String 30 | 31 | Имя .swf файла флеш-плеера 32 | 33 | #### config.flash.version : String 34 | 35 | Минимальная версия флеш-плеера 36 | 37 | #### config.flash.playerID : String 38 | 39 | ID, который будет выставлен для элемента с Flash-плеером 40 | 41 | #### config.flash.callback : String 42 | 43 | Имя функции-обработчика событий Flash-плеера 44 | 45 | #### config.flash.initTimeout : Number 46 | 47 | Таймаут инициализации 48 | 49 | #### config.flash.loadTimeout : Number 50 | 51 | Таймаут загрузки 52 | 53 | #### config.flash.clickTimeout : Number 54 | 55 | Таймаут инициализации после клика 56 | 57 | #### config.flash.heartBeatInterval : Number 58 | 59 | Интервал проверки доступности Flash-плеера 60 | 61 | ## *ns* config.html5 62 | 63 | Описание настроек HTML5 плеера. 64 | 65 | #### config.html5.blacklist : Array.< String > 66 | 67 | Список идентификаторов для которых лучше не использовать html5 плеер. Используется при авто-определении типа плеера. Идентификаторы сравниваются со строкой построенной по шаблону @<platform.version> <platform.os>:<browser.name>/<browser.version> 68 | 69 | -------------------------------------------------------------------------------- /spec/global.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | #### pureInstance (OriginalClass: function) : OriginalClass 4 | 5 | **Доступен извне как:** `ya.music.lib.pureInstance` 6 | 7 | Создаёт экземпляр класса, но не запускает его конструктор 8 | 9 | | Имя | Тип | * | Описание | 10 | | --- | --- | --- | --- | 11 | | OriginalClass | function | | класс | 12 | 13 | 14 | 15 | 16 | 17 | #### merge (initial: Object, ...args: Object, extend: Boolean) : Object 18 | 19 | **Доступен извне как:** `ya.music.lib.merge` 20 | 21 | Объединение объектов 22 | 23 | | Имя | Тип | * | Описание | 24 | | --- | --- | --- | --- | 25 | | initial | Object | | начальный объект | 26 | | ...args | Object | | список объектов которые надо объединить с начальным | 27 | | *\[extend\]* | Boolean | | если последний аргумент true, то будет модифицирован начальный объект, в противном случае будет создана неглубокая копия. | 28 | 29 | -------------------------------------------------------------------------------- /spec/info.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## *ns* info 4 | 5 | **Доступен извне как:** `ya.music.info` 6 | 7 | Информация об окружении 8 | 9 | #### info.onlyDeviceVolume : boolean 10 | 11 | Настройка громкости 12 | 13 | ---- 14 | 15 | ### Пространства имён 16 | 17 | ## *ns* info.browser 18 | 19 | Информация о браузере 20 | 21 | | Имя | Тип | * | Описание | 22 | | --- | --- | --- | --- | 23 | | name | string | | название браузера | 24 | | version | string | | версия | 25 | | *\[documentMode\]* | number | | версия документа (для IE) | 26 | 27 | ## *ns* info.platform 28 | 29 | Информация о платформе 30 | 31 | | Имя | Тип | * | Описание | 32 | | --- | --- | --- | --- | 33 | | os | string | | тип операционной системы | 34 | | type | string | | тип платформы | 35 | | tablet | boolean | | планшет | 36 | | mobile | boolean | | мобильный | 37 | 38 | -------------------------------------------------------------------------------- /spec/readme.md: -------------------------------------------------------------------------------- 1 | # Внешняя структура модуля 2 | 3 | * ya.music 4 | * [Audio](Audio.md#Audio) 5 | * [config](config.md#config) 6 | * [AudioError](AudioError.md#AudioError) 7 | * [PlaybackError](PlaybackError.md#PlaybackError) 8 | * fx 9 | * [Equalizer](Equalizer.md#Equalizer) 10 | * [volumeLib](volumeLib.md#volumeLib) 11 | * [LoaderError](LoaderError.md#LoaderError) 12 | * lib 13 | * [Deferred](Deferred.md#Deferred) 14 | * [Events](Events.md#Events) 15 | * [Promise](Promise.md#Promise) 16 | * [Error](ErrorClass.md#ErrorClass) 17 | * [pureInstance](global.md#pureInstance) 18 | * [merge](global.md#merge) 19 | * [info](info.md#info) 20 | * [Logger](Logger.md#Logger) 21 | -------------------------------------------------------------------------------- /spec/volumeLib.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## *ns* volumeLib 4 | 5 | **Доступен извне как:** `ya.music.Audio.fx.volumeLib` 6 | 7 | Методы конвертации значений громкости. 8 | 9 | #### volumeLib.EPSILON : number 10 | 11 | Минимальное значение громкости, при котором происходит отключение звука. Ограничение в 0.01 подобрано эмпирически. 12 | 13 | ---- 14 | 15 | ### Методы 16 | 17 | #### volumeLib.toExponent (value: Number) : Number 18 | 19 | Вычисление значение относительной громкости по значению на логарифмической шкале. 20 | 21 | | Имя | Тип | * | Описание | 22 | | --- | --- | --- | --- | 23 | | value | Number | | Значение на шкале. | 24 | 25 | #### volumeLib.fromExponent (volume: Number) : Number 26 | 27 | Вычисление положения на логарифмической шкале по значению относительной громкости громкости 28 | 29 | | Имя | Тип | * | Описание | 30 | | --- | --- | --- | --- | 31 | | volume | Number | | Громкость. | 32 | 33 | #### volumeLib.toDBFS (volume: Number) : Number 34 | 35 | Вычисление значения dBFS из относительного значения громкости. 36 | 37 | | Имя | Тип | * | Описание | 38 | | --- | --- | --- | --- | 39 | | volume | Number | | Относительная громкость. | 40 | 41 | #### volumeLib.fromDBFS (dbfs: Number) : Number 42 | 43 | Вычисление значения относительной громкости из значения dBFS. 44 | 45 | | Имя | Тип | * | Описание | 46 | | --- | --- | --- | --- | 47 | | dbfs | Number | | Громкость в dBFS. | 48 | 49 | -------------------------------------------------------------------------------- /src/audio-static.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @alias Audio 3 | * @ignore 4 | */ 5 | var AudioStatic = {}; 6 | 7 | /** 8 | * Начало воспроизведения трека. 9 | * @type {String} 10 | * @const 11 | * @ignore 12 | */ 13 | AudioStatic.EVENT_PLAY = "play"; 14 | /** 15 | * Остановка воспроизведения. 16 | * @type {String} 17 | * @const 18 | * @ignore 19 | */ 20 | AudioStatic.EVENT_STOP = "stop"; 21 | /** 22 | * Пауза воспроизведения. 23 | * @type {String} 24 | * @const 25 | * @ignore 26 | */ 27 | AudioStatic.EVENT_PAUSE = "pause"; 28 | /** 29 | * Обновление позиции воспроизведения. 30 | * @type {String} 31 | * @const 32 | * @ignore 33 | */ 34 | AudioStatic.EVENT_PROGRESS = "progress"; 35 | /** 36 | * Началась загрузка трека. 37 | * @type {String} 38 | * @const 39 | * @ignore 40 | */ 41 | AudioStatic.EVENT_LOADING = "loading"; 42 | /** 43 | * Загрузка трека завершена. 44 | * @type {String} 45 | * @const 46 | * @ignore 47 | */ 48 | AudioStatic.EVENT_LOADED = "loaded"; 49 | /** 50 | * Изменение громкости. 51 | * @type {String} 52 | * @const 53 | * @ignore 54 | */ 55 | AudioStatic.EVENT_VOLUME = "volumechange"; 56 | 57 | /** 58 | * Воспроизведение трека завершено. 59 | * @type {String} 60 | * @const 61 | * @ignore 62 | */ 63 | AudioStatic.EVENT_ENDED = "ended"; 64 | /** 65 | * Возникла ошибка при инициализации плеера. 66 | * @type {String} 67 | * @const 68 | * @ignore 69 | */ 70 | AudioStatic.EVENT_CRASHED = "crashed"; 71 | /** 72 | * Возникла ошибка при воспроизведении. 73 | * @type {String} 74 | * @const 75 | * @ignore 76 | */ 77 | AudioStatic.EVENT_ERROR = "error"; 78 | /** 79 | * Изменение статуса плеера. 80 | * @type {String} 81 | * @const 82 | * @ignore 83 | */ 84 | AudioStatic.EVENT_STATE = "state"; 85 | /** 86 | * Переключение между текущим и предзагруженным треком. 87 | * @type {String} 88 | * @const 89 | * @ignore 90 | */ 91 | AudioStatic.EVENT_SWAP = "swap"; 92 | /** 93 | * Событие предзагрузчика. Используется в качестве префикса. 94 | * @type {String} 95 | * @const 96 | */ 97 | AudioStatic.PRELOADER_EVENT = "preloader:"; 98 | /** 99 | * Плеер находится в состоянии инициализации. 100 | * @type {String} 101 | * @const 102 | */ 103 | AudioStatic.STATE_INIT = "init"; 104 | /** 105 | * Не удалось инициализировать плеер. 106 | * @type {String} 107 | * @const 108 | */ 109 | AudioStatic.STATE_CRASHED = "crashed"; 110 | /** 111 | * Плеер готов и ожидает. 112 | * @type {String} 113 | * @const 114 | */ 115 | AudioStatic.STATE_IDLE = "idle"; 116 | /** 117 | * Плеер проигрывает трек. 118 | * @type {String} 119 | * @const 120 | */ 121 | AudioStatic.STATE_PLAYING = "playing"; 122 | /** 123 | * Плеер поставлен на паузу. 124 | * @type {String} 125 | * @const 126 | */ 127 | AudioStatic.STATE_PAUSED = "paused"; 128 | 129 | module.exports = AudioStatic; 130 | -------------------------------------------------------------------------------- /src/error/audio-error.js: -------------------------------------------------------------------------------- 1 | var ErrorClass = require('../lib/class/error-class'); 2 | 3 | /** 4 | * @exported ya.music.Audio.AudioError 5 | * @classdesc Класс ошибки аудиопллеера. 6 | * @extends Error 7 | * @param {String} message Текст ошибки. 8 | * 9 | * @constructor 10 | */ 11 | var AudioError = function(message) { 12 | ErrorClass.call(this, message); 13 | }; 14 | AudioError.prototype = ErrorClass.create("AudioError"); 15 | 16 | /** 17 | * Не найдена реализация плеера или возникла ошибка при инициализации всех доступных реализаций. 18 | * @type {String} 19 | * @const 20 | */ 21 | AudioError.NO_IMPLEMENTATION = "cannot find suitable implementation"; 22 | /** 23 | * Аудиофайл не был предзагружен или во время загрузки произошла ошибка. 24 | * @type {String} 25 | * @const 26 | */ 27 | AudioError.NOT_PRELOADED = "track is not preloaded"; 28 | /** 29 | * Действие недоступно из текущего состояния. 30 | * @type {String} 31 | * @const 32 | */ 33 | AudioError.BAD_STATE = "action is not permited from current state"; 34 | 35 | /** 36 | * Flash-плеер был заблокирован. 37 | * @type {String} 38 | * @const 39 | */ 40 | AudioError.FLASH_BLOCKER = "flash is rejected by flash blocker plugin"; 41 | /** 42 | * Возникла ошибка при инициализации Flash-плеера по неизвестным причинам. 43 | * @type {String} 44 | * @const 45 | */ 46 | AudioError.FLASH_UNKNOWN_CRASH = "flash is crashed without reason"; 47 | /** 48 | * Возникла ошибка при инициализации Flash-плеера из-за таймаута. 49 | * @type {String} 50 | * @const 51 | */ 52 | AudioError.FLASH_INIT_TIMEOUT = "flash init timed out"; 53 | /** 54 | * Внутренняя ошибка Flash-плеера. 55 | * @type {String} 56 | * @const 57 | */ 58 | AudioError.FLASH_INTERNAL_ERROR = "flash internal error"; 59 | /** 60 | * Попытка вызвать недоступный экземляр Flash-плеера. 61 | * @type {String} 62 | * @const 63 | */ 64 | AudioError.FLASH_EMMITER_NOT_FOUND = "flash event emmiter not found"; 65 | /** 66 | * Flash-плеер перестал отвечать на запросы. 67 | * @type {String} 68 | * @const 69 | */ 70 | AudioError.FLASH_NOT_RESPONDING = "flash player doesn't response"; 71 | 72 | module.exports = AudioError; 73 | -------------------------------------------------------------------------------- /src/error/export.js: -------------------------------------------------------------------------------- 1 | require('../export'); 2 | 3 | var AudioError = require('./audio-error'); 4 | var PlaybackError = require('./playback-error'); 5 | 6 | ya.music.Audio.AudioError = AudioError; 7 | ya.music.Audio.PlaybackError = PlaybackError; 8 | -------------------------------------------------------------------------------- /src/error/playback-error.js: -------------------------------------------------------------------------------- 1 | var ErrorClass = require('../lib/class/error-class'); 2 | 3 | /** 4 | * @exported ya.music.Audio.PlaybackError 5 | * @classdesc Класс ошибки воспроизведения. 6 | * @extends Error 7 | * @param {String} message Текст ошибки. 8 | * @param {String} src Ссылка на трек. 9 | * 10 | * @constructor 11 | */ 12 | var PlaybackError = function(message, src) { 13 | ErrorClass.call(this, message); 14 | 15 | this.src = src; 16 | }; 17 | 18 | PlaybackError.prototype = ErrorClass.create("PlaybackError"); 19 | 20 | /** 21 | * Отмена соединения. 22 | * @type {String} 23 | * @const 24 | */ 25 | PlaybackError.CONNECTION_ABORTED = "Connection aborted"; 26 | /** 27 | * Сетевая ошибка. 28 | * @type {String} 29 | * @const 30 | */ 31 | PlaybackError.NETWORK_ERROR = "Network error"; 32 | /** 33 | * Ошибка декодирования аудио. 34 | * @type {String} 35 | * @const 36 | */ 37 | PlaybackError.DECODE_ERROR = "Decode error"; 38 | /** 39 | * Недоступный источник. 40 | * @type {String} 41 | * @const 42 | */ 43 | PlaybackError.BAD_DATA = "Bad data"; 44 | 45 | /** 46 | * Не запускается воспроизведение. 47 | * @type {String} 48 | * @const 49 | */ 50 | PlaybackError.DONT_START = "Playback start error"; 51 | 52 | /** 53 | * Таблица соответствия кодов ошибок HTML5-плеера. 54 | * 55 | * @const 56 | * @type {Object} 57 | */ 58 | PlaybackError.html5 = { 59 | 1: PlaybackError.CONNECTION_ABORTED, 60 | 2: PlaybackError.NETWORK_ERROR, 61 | 3: PlaybackError.DECODE_ERROR, 62 | 4: PlaybackError.BAD_DATA 63 | }; 64 | 65 | //TODO: сделать классификатор ошибок Flash-плеера 66 | 67 | module.exports = PlaybackError; 68 | -------------------------------------------------------------------------------- /src/export.js: -------------------------------------------------------------------------------- 1 | if (typeof DEV === "undefined") { 2 | window.DEV = true; 3 | } 4 | 5 | if (typeof window.ya === "undefined") { 6 | window.ya = {}; 7 | } 8 | 9 | var ya = window.ya; 10 | 11 | if (typeof ya.music === "undefined") { 12 | ya.music = {}; 13 | } 14 | 15 | if (typeof ya.music.Audio === "undefined") { 16 | ya.music.Audio = {}; 17 | } 18 | 19 | var config = require('./config'); 20 | var AudioPlayer = require('./audio-player'); 21 | var Proxy = require('./lib/class/proxy'); 22 | 23 | ya.music.Audio = Proxy.createClass(AudioPlayer); 24 | ya.music.Audio.config = config; 25 | 26 | require('./lib/export'); 27 | 28 | module.exports = ya.music.Audio; 29 | -------------------------------------------------------------------------------- /src/flash/build/player-2_1.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yandex/audio-js/6af1b1bc0423fb5145d12c6090d89b938b4e9b71/src/flash/build/player-2_1.swf -------------------------------------------------------------------------------- /src/flash/loader.js: -------------------------------------------------------------------------------- 1 | var FlashBlockNotifier = require('./flashblocknotifier'); 2 | var FlashEmbedder = require('./flashembedder'); 3 | var detect = require('../lib/browser/detect'); 4 | 5 | var winSafari = detect.platform.os === 'windows' && detect.browser.name === 'safari'; 6 | 7 | var CONTAINER_CLASS = "ya-flash-player-wrapper"; 8 | 9 | /** 10 | * Загрузчик флеш-плеера 11 | * 12 | * @alias FlashManager~flashLoader 13 | * 14 | * @param {string} url - Ссылка на плеера 15 | * @param {string} minVersion - минимальная версия плеера 16 | * @param {string|number} id - идентификатор нового плеера 17 | * @param {function} loadCallback - колбек для события загрузки 18 | * @param {object} flashVars - данные передаваемые во флеш 19 | * @param {HTMLElement} container - контейнер для видимого флеш-плеера 20 | * @param {string} sizeX - размер по горизонтали 21 | * @param {string} sizeY - размер по вертикали 22 | * 23 | * @private 24 | * 25 | * @returns {HTMLElement} -- Контейнер флеш-плеера 26 | */ 27 | module.exports = function(url, minVersion, id, loadCallback, flashVars, container, sizeX, sizeY) { 28 | var $flashPlayer = document.createElement("div"); 29 | $flashPlayer.id = "wrapper_" + id; 30 | $flashPlayer.innerHTML = '
'; 31 | 32 | sizeX = sizeX || "1000"; 33 | sizeY = sizeY || "1000"; 34 | 35 | var embedder, 36 | flashSizeX, 37 | flashSizeY, 38 | options; 39 | 40 | if (container && !winSafari) { 41 | embedder = FlashEmbedder; 42 | flashSizeX = sizeX; 43 | flashSizeY = sizeY; 44 | options = {allowscriptaccess: "always", wmode: "transparent"}; 45 | 46 | $flashPlayer.className = CONTAINER_CLASS; 47 | $flashPlayer.style.cssText = 'position: relative; width: 100%; height: 100%; overflow: hidden;'; 48 | container.appendChild($flashPlayer); 49 | } else { 50 | embedder = FlashBlockNotifier; 51 | flashSizeX = flashSizeY = "1"; 52 | options = {allowscriptaccess: "always"}; 53 | 54 | $flashPlayer.style.cssText = 'position: absolute; left: -1px; top: -1px; width: 0px; height: 0px; overflow: hidden;'; 55 | document.body.appendChild($flashPlayer); 56 | } 57 | 58 | embedder.embedSWF( 59 | url, 60 | id, 61 | flashSizeX, 62 | flashSizeY, 63 | minVersion, 64 | "", 65 | flashVars, 66 | options, 67 | {}, 68 | loadCallback 69 | ); 70 | 71 | return $flashPlayer; 72 | }; 73 | -------------------------------------------------------------------------------- /src/flash/src/AudioEvent.as: -------------------------------------------------------------------------------- 1 | package { 2 | import flash.events.DataEvent; 3 | 4 | public final class AudioEvent extends DataEvent { 5 | public var offset:int; 6 | 7 | public static const EVENT_PLAY:String = "play"; 8 | public static const EVENT_PAUSE:String = "pause"; 9 | public static const EVENT_PROGRESS:String = "progress"; 10 | public static const EVENT_ENDED:String = "ended"; 11 | public static const EVENT_ERROR:String = "error"; 12 | public static const EVENT_VOLUME:String = "volumechange"; 13 | public static const EVENT_STOP:String = "stop"; 14 | public static const EVENT_LOADED:String = "loaded"; 15 | public static const EVENT_LOADING:String = "loading"; 16 | public static const EVENT_SWAP:String = "swap"; 17 | 18 | public static const EVENT_DEBUG:String = "debug"; 19 | 20 | public function AudioEvent(type:String, offset:int = -1, data:String = "") { 21 | super(type, false, false, data); 22 | this.offset = offset; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/fx/equalizer/default.bands.js: -------------------------------------------------------------------------------- 1 | module.exports = [60, 170, 310, 600, 1000, 3000, 6000, 12000, 14000, 16000]; 2 | -------------------------------------------------------------------------------- /src/fx/equalizer/default.presets.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | { 3 | "id": "default", 4 | "preamp": 0, 5 | "bands": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] 6 | }, 7 | { 8 | "id": "Classical", 9 | "preamp": -0.5, 10 | "bands": [-0.5, -0.5, -0.5, -0.5, -0.5, -0.5, -3.5, -3.5, -3.5, -4.5] 11 | }, 12 | { 13 | "id": "Club", 14 | "preamp": -3.359999895095825, 15 | "bands": [-0.5, -0.5, 4, 2.5, 2.5, 2.5, 1.5, -0.5, -0.5, -0.5] 16 | }, 17 | { 18 | "id": "Dance", 19 | "preamp": -2.1599998474121094, 20 | "bands": [4.5, 3.5, 1, -0.5, -0.5, -2.5, -3.5, -3.5, -0.5, -0.5] 21 | }, 22 | { 23 | "id": "Full Bass", 24 | "preamp": -3.5999999046325684, 25 | "bands": [4, 4.5, 4.5, 2.5, 0.5, -2, -4, -5, -5.5, -5.5] 26 | }, 27 | { 28 | "id": "Full Bass & Treble", 29 | "preamp": -5.039999961853027, 30 | "bands": [3.5, 2.5, -0.5, -3.5, -2, 0.5, 4, 5.5, 6, 6] 31 | }, 32 | { 33 | "id": "Full Treble", 34 | "preamp": -6, 35 | "bands": [-4.5, -4.5, -4.5, -2, 1, 5.5, 8, 8, 8, 8] 36 | }, 37 | { 38 | "id": "Laptop Speakers / Headphone", 39 | "preamp": -4.079999923706055, 40 | "bands": [2, 5.5, 2.5, -1.5, -1, 0.5, 2, 4.5, 6, 7] 41 | }, 42 | { 43 | "id": "Large Hall", 44 | "preamp": -3.5999999046325684, 45 | "bands": [5, 5, 2.5, 2.5, -0.5, -2, -2, -2, -0.5, -0.5] 46 | }, 47 | { 48 | "id": "Live", 49 | "preamp": -2.6399998664855957, 50 | "bands": [-2, -0.5, 2, 2.5, 2.5, 2.5, 2, 1, 1, 1] 51 | }, 52 | { 53 | "id": "Party", 54 | "preamp": -2.6399998664855957, 55 | "bands": [3.5, 3.5, -0.5, -0.5, -0.5, -0.5, -0.5, -0.5, 3.5, 3.5] 56 | }, 57 | { 58 | "id": "Pop", 59 | "preamp": -3.119999885559082, 60 | "bands": [-0.5, 2, 3.5, 4, 2.5, -0.5, -1, -1, -0.5, -0.5] 61 | }, 62 | { 63 | "id": "Reggae", 64 | "preamp": -4.079999923706055, 65 | "bands": [-0.5, -0.5, -0.5, -2.5, -0.5, 3, 3, -0.5, -0.5, -0.5] 66 | }, 67 | { 68 | "id": "Rock", 69 | "preamp": -5.039999961853027, 70 | "bands": [4, 2, -2.5, -4, -1.5, 2, 4, 5.5, 5.5, 5.5] 71 | }, 72 | { 73 | "id": "Ska", 74 | "preamp": -5.519999980926514, 75 | "bands": [-1, -2, -2, -0.5, 2, 2.5, 4, 4.5, 5.5, 4.5] 76 | }, 77 | { 78 | "id": "Soft", 79 | "preamp": -4.799999713897705, 80 | "bands": [2, 0.5, -0.5, -1, -0.5, 2, 4, 4.5, 5.5, 6] 81 | }, 82 | { 83 | "id": "Soft Rock", 84 | "preamp": -2.6399998664855957, 85 | "bands": [2, 2, 1, -0.5, -2, -2.5, -1.5, -0.5, 1, 4] 86 | }, 87 | { 88 | "id": "Techno", 89 | "preamp": -3.8399999141693115, 90 | "bands": [4, 2.5, -0.5, -2.5, -2, -0.5, 4, 4.5, 4.5, 4] 91 | } 92 | ]; 93 | -------------------------------------------------------------------------------- /src/fx/equalizer/equalizer-band.js: -------------------------------------------------------------------------------- 1 | var Events = require('../../lib/async/events'); 2 | var EqualizerStatic = require('./equalizer-static'); 3 | 4 | // ================================================================= 5 | 6 | // Конструктор 7 | 8 | // ================================================================= 9 | 10 | /** 11 | * Событие изменения значения усиления. 12 | * @event EqualizerBand.EVENT_CHANGE 13 | * @param {Number} value Новое значение. 14 | */ 15 | 16 | /** 17 | * @classdesc Полоса пропускания эквалайзера. 18 | * @extends Events 19 | * 20 | * @param {AudioContext} audioContext Контекст Web Audio API. 21 | * @param {String} type Тип фильтра. 22 | * @param {Number} frequency Частота фильтра. 23 | * 24 | * @fires EqualizerBand.EVENT_CHANGE 25 | * 26 | * @constructor 27 | * @private 28 | */ 29 | var EqualizerBand = function(audioContext, type, frequency) { 30 | Events.call(this); 31 | 32 | this.type = type; 33 | 34 | this.filter = audioContext.createBiquadFilter(); 35 | this.filter.type = type; 36 | this.filter.frequency.value = frequency; 37 | this.filter.Q.value = 1; 38 | this.filter.gain.value = 0; 39 | }; 40 | Events.mixin(EqualizerBand); 41 | 42 | // ================================================================= 43 | 44 | // Управление настройками 45 | 46 | // ================================================================= 47 | 48 | /** 49 | * Получить частоту полосы пропускания. 50 | * @returns {Number} 51 | */ 52 | EqualizerBand.prototype.getFreq = function() { 53 | return this.filter.frequency.value; 54 | }; 55 | 56 | /** 57 | * Получить значение усиления. 58 | * @returns {Number} 59 | */ 60 | EqualizerBand.prototype.getValue = function() { 61 | return this.filter.gain.value; 62 | }; 63 | 64 | /** 65 | * Установить значение усиления. 66 | * @param {Number} value Значение. 67 | */ 68 | EqualizerBand.prototype.setValue = function(value) { 69 | this.filter.gain.value = value; 70 | this.trigger(EqualizerStatic.EVENT_CHANGE, value); 71 | }; 72 | 73 | module.exports = EqualizerBand; 74 | -------------------------------------------------------------------------------- /src/fx/equalizer/equalizer-static.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @namespace EqualizerStatic 3 | * @private 4 | */ 5 | var EqualizerStatic = {}; 6 | 7 | /** @type {String} 8 | * @const*/ 9 | EqualizerStatic.EVENT_CHANGE = "change"; 10 | 11 | module.exports = EqualizerStatic; 12 | -------------------------------------------------------------------------------- /src/fx/equalizer/export.js: -------------------------------------------------------------------------------- 1 | require('../export'); 2 | 3 | ya.music.Audio.fx.Equalizer = require('./equalizer'); 4 | -------------------------------------------------------------------------------- /src/fx/export.js: -------------------------------------------------------------------------------- 1 | require('../export'); 2 | 3 | ya.music.Audio.fx = {}; 4 | -------------------------------------------------------------------------------- /src/fx/volume/export.js: -------------------------------------------------------------------------------- 1 | require('../export'); 2 | 3 | ya.music.Audio.fx.volumeLib = require('./volume-lib'); 4 | -------------------------------------------------------------------------------- /src/fx/volume/volume-lib.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Методы конвертации значений громкости. 3 | * @name volumeLib 4 | * @exported ya.music.Audio.fx.volumeLib 5 | * @namespace 6 | */ 7 | var volumeLib = {}; 8 | 9 | /** 10 | * Минимальное значение громкости, при котором происходит отключение звука. 11 | * Ограничение в 0.01 подобрано эмпирически. 12 | * @type {number} 13 | */ 14 | volumeLib.EPSILON = 0.01; 15 | 16 | /** 17 | * Коэффициент для преобразований громкости из относительной шкалы в децибелы. 18 | * @type Number 19 | * @private 20 | */ 21 | volumeLib._DBFS_COEF = 20 / Math.log(10); 22 | 23 | /** 24 | * Вычисление значение относительной громкости по значению на логарифмической шкале. 25 | * @param {Number} value Значение на шкале. 26 | * @returns {Number} 27 | */ 28 | volumeLib.toExponent = function(value) { 29 | var volume = Math.pow(volumeLib.EPSILON, 1 - value); 30 | return volume > volumeLib.EPSILON ? volume : 0; 31 | }; 32 | 33 | /** 34 | * Вычисление положения на логарифмической шкале по значению относительной громкости громкости. 35 | * @param {Number} volume Громкость. 36 | * @returns {Number} 37 | */ 38 | volumeLib.fromExponent = function(volume) { 39 | return 1 - Math.log(Math.max(volume, volumeLib.EPSILON)) / Math.log(volumeLib.EPSILON); 40 | }; 41 | 42 | /** 43 | * Вычисление значения dBFS из относительного значения громкости. 44 | * @param {Number} volume Относительная громкость. 45 | * @returns {Number} 46 | */ 47 | volumeLib.toDBFS = function(volume) { 48 | return Math.log(volume) * volumeLib._DBFS_COEF; 49 | }; 50 | 51 | /** 52 | * Вычисление значения относительной громкости из значения dBFS. 53 | * @param {Number} dbfs Громкость в dBFS. 54 | * @returns {Number} 55 | */ 56 | volumeLib.fromDBFS = function(dbfs) { 57 | return Math.exp(dbfs / volumeLib._DBFS_COEF); 58 | }; 59 | 60 | module.exports = volumeLib; 61 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | require('./lib/browser/audioContextMonkeyPatch.js'); 2 | 3 | var YandexAudio = require('./export'); 4 | require('./error/export'); 5 | require('./lib/net/error/export'); 6 | require('./logger/export'); 7 | require('./fx/equalizer/export'); 8 | require('./fx/volume/export'); 9 | 10 | module.exports = YandexAudio; 11 | -------------------------------------------------------------------------------- /src/lib/async/deferred.js: -------------------------------------------------------------------------------- 1 | var Promise = require('./promise'); 2 | var noop = require('../noop'); 3 | 4 | /** 5 | * @classdesc Класс для управления обещанием 6 | * @exported ya.music.lib.Deferred 7 | * @constructor 8 | */ 9 | var Deferred = function() { 10 | var self = this; 11 | 12 | var promise = new Promise(function(resolve, reject) { 13 | /** 14 | * Разрешить обещание 15 | * @method Deferred#resolve 16 | * @param data - передать данные в обещание 17 | */ 18 | self.resolve = resolve; 19 | 20 | /** 21 | * Отклонить обещание 22 | * @method Deferred#reject 23 | * @param error - передать ошибку 24 | */ 25 | self.reject = reject; 26 | }); 27 | 28 | promise["catch"](noop); // Don't throw errors to console 29 | 30 | /** 31 | * Получить обещание 32 | * @method Deferred#promise 33 | * @returns {Promise} 34 | */ 35 | this.promise = function() { return promise; }; 36 | }; 37 | 38 | module.exports = Deferred; 39 | -------------------------------------------------------------------------------- /src/lib/async/promise.js: -------------------------------------------------------------------------------- 1 | var vow = require('vow'); 2 | var detect = require('../browser/detect'); 3 | var merge = require('../data/merge'); 4 | 5 | // ================================================================= 6 | 7 | // Promise 8 | 9 | // ================================================================= 10 | 11 | /** 12 | * @classdesc Обещание по спецификации {@linkhref https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/Promise ES 2015 promises}. В устаревших браузерах и IE используется замена из библиотеки {@linkhref http://github.com/dfilatov/vow.git vow} 13 | * 14 | * @exported ya.music.lib.Promise 15 | * @constructor 16 | */ 17 | var Promise; 18 | if (typeof window.Promise !== "function" 19 | || detect.browser.name === "msie" || detect.browser.name === "edge" // мелкие мягкие как всегда ничего не умеют делать правильно 20 | ) { 21 | Promise = function(resolver) { 22 | var promise; 23 | try { 24 | promise = new vow.Promise(resolver); 25 | } catch(e) { 26 | promise = vow.reject(e); 27 | } 28 | return promise; 29 | }; 30 | merge(Promise, vow.Promise, true); 31 | Promise.prototype = vow.Promise.prototype; 32 | } else { 33 | Promise = window.Promise; 34 | } 35 | 36 | module.exports = Promise; 37 | 38 | /** 39 | * Назначить обработчики разрешения и отклонения обещания. 40 | * @method Promise#then 41 | * @param {function} callback Обработчик успеха. 42 | * @param {null|function} [errback] Обработчик ошибки. 43 | * @returns {Promise} новое обещание из результатов обработчика. 44 | */ 45 | 46 | /** 47 | * Назначить обработчик отклонения обещания. 48 | * @method Promise#catch 49 | * @param {function} errback Обработчик ошибки. 50 | * @returns {Promise} новое обещание из результатов обработчика. 51 | */ 52 | 53 | // ================================================================= 54 | 55 | // AbortablePromise 56 | 57 | // ================================================================= 58 | 59 | /** 60 | * @class AbortablePromise 61 | * @classdesc Обещание с возможностью отмены связанного с ним действия. 62 | * @extends Promise 63 | */ 64 | 65 | /** 66 | * Отмена действия, связанного с обещанием. Абстрактный метод. 67 | * @method AbortablePromise#abort 68 | * @param {String|Error} reason Причина отмены действия. 69 | * @abstract 70 | */ 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /src/lib/async/reject.js: -------------------------------------------------------------------------------- 1 | var noop = require('../noop'); 2 | var Promise = require('./promise'); 3 | 4 | /** 5 | * Содание отклонённого обещания, которое не плюётся в консоль ошибкой 6 | * @param {Error} data - причина отклонения обещания 7 | * @returns {Promise} 8 | * @private 9 | */ 10 | var reject = function(data) { 11 | var promise = Promise.reject(data); 12 | promise["catch"](noop); 13 | return promise; 14 | }; 15 | 16 | module.exports = reject; 17 | -------------------------------------------------------------------------------- /src/lib/class/error-class.js: -------------------------------------------------------------------------------- 1 | var pureInstance = require('./pure-instance'); 2 | 3 | /** 4 | * @classdesc Класс ошибки. Оригинальный Error ведёт себя как фабрика, а не как класс. Этот объект ведёт себя как класс и его можно наследовать. 5 | * @param {String} [message] - сообщение 6 | * @param {Number} [id] - идентификатор ошибки 7 | * @extends Error 8 | * @exported ya.music.lib.Error 9 | * @constructor 10 | */ 11 | var ErrorClass = function(message, id) { 12 | var err = new Error(message, id); 13 | err.name = this.name; 14 | 15 | this.message = err.message; 16 | this.stack = err.stack; 17 | }; 18 | 19 | /** 20 | * Сахар для быстрого создания нового класса ошибок. 21 | * @param {String} name - имя создаваемого класса 22 | * @returns {ErrorClass} 23 | */ 24 | ErrorClass.create = function(name) { 25 | var errClass = pureInstance(this); 26 | errClass.name = name; 27 | return errClass; 28 | }; 29 | 30 | ErrorClass.prototype = pureInstance(Error); 31 | ErrorClass.prototype.name = "ErrorClass"; 32 | 33 | module.exports = ErrorClass; 34 | -------------------------------------------------------------------------------- /src/lib/class/pure-instance.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Создаёт экземпляр класса, но не запускает его конструктор 3 | * @param {function} OriginalClass - класс 4 | * @exported ya.music.lib.pureInstance 5 | * @returns {OriginalClass} 6 | */ 7 | var pureInstance = function(OriginalClass) { 8 | var PureClass = function() {}; 9 | PureClass.prototype = OriginalClass.prototype; 10 | return new PureClass(); 11 | }; 12 | 13 | module.exports = pureInstance; 14 | -------------------------------------------------------------------------------- /src/lib/data/merge.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Объединение объектов 3 | * @param {Object} initial - начальный объект 4 | * @param {Object} ...args - список объектов которые надо объединить с начальным 5 | * @param {Boolean} [extend] - если последний аргумент true, то будет модифицирован начальный объект, в противном случае будет создана неглубокая копия. 6 | * @exported ya.music.lib.merge 7 | * @returns {Object} 8 | */ 9 | var merge = function(initial) { 10 | var args = [].slice.call(arguments, 1); 11 | var object; 12 | var key; 13 | 14 | if (args[args.length - 1] === true) { 15 | object = initial; 16 | args.pop(); 17 | } else { 18 | object = {}; 19 | for (key in initial) { 20 | if (initial.hasOwnProperty(key)) { 21 | object[key] = initial[key]; 22 | } 23 | } 24 | } 25 | 26 | for (var k = 0, l = args.length; k < l; k++) { 27 | for (key in args[k]) { 28 | if (args[k].hasOwnProperty(key)) { 29 | object[key] = args[k][key]; 30 | } 31 | } 32 | } 33 | 34 | return object; 35 | }; 36 | 37 | module.exports = merge; 38 | -------------------------------------------------------------------------------- /src/lib/export.js: -------------------------------------------------------------------------------- 1 | require('../export'); 2 | 3 | if (!ya.music.lib) { 4 | ya.music.lib = {}; 5 | } 6 | 7 | var Events = require('./async/events'); 8 | var ErrorClass = require('./class/error-class'); 9 | var pureInstance = require('./class/pure-instance'); 10 | 11 | var EventsProxy = function() { Events.call(this); }; 12 | EventsProxy.prototype = pureInstance(Events); 13 | EventsProxy.mixin = Events.mixin; 14 | EventsProxy.eventize = Events.eventize; 15 | 16 | var ErrorClassProxy = function() { ErrorClass.apply(this, arguments); }; 17 | ErrorClassProxy.prototype = pureInstance(ErrorClass); 18 | ErrorClassProxy.create = ErrorClass.create; 19 | 20 | ya.music.lib.Events = EventsProxy; 21 | ya.music.lib.Error = ErrorClassProxy; 22 | 23 | ya.music.lib.Promise = require('./async/promise'); 24 | ya.music.lib.Deferred = require('./async/deferred'); 25 | 26 | ya.music.lib.pureInstance = pureInstance; 27 | ya.music.lib.merge = require('./data/merge'); 28 | 29 | ya.music.info = require('./browser/detect'); 30 | -------------------------------------------------------------------------------- /src/lib/net/error/export.js: -------------------------------------------------------------------------------- 1 | require('../../../export'); 2 | 3 | var LoaderError = require('./loader-error'); 4 | 5 | ya.music.Audio.LoaderError = LoaderError; 6 | -------------------------------------------------------------------------------- /src/lib/net/error/loader-error.js: -------------------------------------------------------------------------------- 1 | var ErrorClass = require('../../class/error-class'); 2 | 3 | /** 4 | * @exported ya.music.Audio.LoaderError 5 | * @classdesc Класс ошибок загрузчика. 6 | * Расширяет Error. 7 | * @param {String} message Текст ошибки. 8 | * 9 | * @constructor 10 | */ 11 | var LoaderError = function(message) { 12 | ErrorClass.call(this, message); 13 | }; 14 | LoaderError.prototype = ErrorClass.create("LoaderError"); 15 | 16 | /** 17 | * Таймаут загрузки. 18 | * @type {String} 19 | * @const 20 | */ 21 | LoaderError.TIMEOUT = "request timeout"; 22 | /** 23 | * Ошибка запроса на загрузку. 24 | * @type {String} 25 | * @const 26 | */ 27 | LoaderError.FAILED = "request failed"; 28 | 29 | module.exports = LoaderError; 30 | -------------------------------------------------------------------------------- /src/lib/noop.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Заглушка в виде пустой функции на все случаи жизни 3 | * @private 4 | */ 5 | var noop = function() {}; 6 | 7 | module.exports = noop; 8 | -------------------------------------------------------------------------------- /src/logger/export.js: -------------------------------------------------------------------------------- 1 | require("../export"); 2 | 3 | var Logger = require('./logger'); 4 | 5 | ya.music.Audio.Logger = Logger; 6 | -------------------------------------------------------------------------------- /test/web-audio-api/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 27 | 28 | 29 | 30 |
31 |
{{title}}
32 |
33 |
34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /tutorial/images/alias.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yandex/audio-js/6af1b1bc0423fb5145d12c6090d89b938b4e9b71/tutorial/images/alias.png -------------------------------------------------------------------------------- /tutorial/images/allpass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yandex/audio-js/6af1b1bc0423fb5145d12c6090d89b938b4e9b71/tutorial/images/allpass.png -------------------------------------------------------------------------------- /tutorial/images/bandpass-filter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yandex/audio-js/6af1b1bc0423fb5145d12c6090d89b938b4e9b71/tutorial/images/bandpass-filter.png -------------------------------------------------------------------------------- /tutorial/images/bandpass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yandex/audio-js/6af1b1bc0423fb5145d12c6090d89b938b4e9b71/tutorial/images/bandpass.png -------------------------------------------------------------------------------- /tutorial/images/bandstop-filter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yandex/audio-js/6af1b1bc0423fb5145d12c6090d89b938b4e9b71/tutorial/images/bandstop-filter.png -------------------------------------------------------------------------------- /tutorial/images/clipping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yandex/audio-js/6af1b1bc0423fb5145d12c6090d89b938b4e9b71/tutorial/images/clipping.png -------------------------------------------------------------------------------- /tutorial/images/demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yandex/audio-js/6af1b1bc0423fb5145d12c6090d89b938b4e9b71/tutorial/images/demo.png -------------------------------------------------------------------------------- /tutorial/images/discrete-signal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yandex/audio-js/6af1b1bc0423fb5145d12c6090d89b938b4e9b71/tutorial/images/discrete-signal.png -------------------------------------------------------------------------------- /tutorial/images/fon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yandex/audio-js/6af1b1bc0423fb5145d12c6090d89b938b4e9b71/tutorial/images/fon.png -------------------------------------------------------------------------------- /tutorial/images/highpass-filter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yandex/audio-js/6af1b1bc0423fb5145d12c6090d89b938b4e9b71/tutorial/images/highpass-filter.png -------------------------------------------------------------------------------- /tutorial/images/highpass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yandex/audio-js/6af1b1bc0423fb5145d12c6090d89b938b4e9b71/tutorial/images/highpass.png -------------------------------------------------------------------------------- /tutorial/images/highshelf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yandex/audio-js/6af1b1bc0423fb5145d12c6090d89b938b4e9b71/tutorial/images/highshelf.png -------------------------------------------------------------------------------- /tutorial/images/lowpass-filter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yandex/audio-js/6af1b1bc0423fb5145d12c6090d89b938b4e9b71/tutorial/images/lowpass-filter.png -------------------------------------------------------------------------------- /tutorial/images/lowpass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yandex/audio-js/6af1b1bc0423fb5145d12c6090d89b938b4e9b71/tutorial/images/lowpass.png -------------------------------------------------------------------------------- /tutorial/images/lowshelf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yandex/audio-js/6af1b1bc0423fb5145d12c6090d89b938b4e9b71/tutorial/images/lowshelf.png -------------------------------------------------------------------------------- /tutorial/images/notch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yandex/audio-js/6af1b1bc0423fb5145d12c6090d89b938b4e9b71/tutorial/images/notch.png -------------------------------------------------------------------------------- /tutorial/images/peaking.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yandex/audio-js/6af1b1bc0423fb5145d12c6090d89b938b4e9b71/tutorial/images/peaking.png -------------------------------------------------------------------------------- /tutorial/images/quantized-signal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yandex/audio-js/6af1b1bc0423fb5145d12c6090d89b938b4e9b71/tutorial/images/quantized-signal.png -------------------------------------------------------------------------------- /tutorial/images/sin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yandex/audio-js/6af1b1bc0423fb5145d12c6090d89b938b4e9b71/tutorial/images/sin.png -------------------------------------------------------------------------------- /tutorial/images/spectro.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yandex/audio-js/6af1b1bc0423fb5145d12c6090d89b938b4e9b71/tutorial/images/spectro.jpg --------------------------------------------------------------------------------