mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 08:38:00 +00:00
moving deps to node_modules
This commit is contained in:
parent
b26b025237
commit
7a27da3c98
13 changed files with 121 additions and 13820 deletions
112
package-lock.json
generated
112
package-lock.json
generated
|
@ -4,6 +4,16 @@
|
|||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@babel/polyfill": {
|
||||
"version": "7.0.0-beta.47",
|
||||
"resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.0.0-beta.47.tgz",
|
||||
"integrity": "sha512-jDKBjX1K/fUNrPGo3wDKEWIXDHZEgpsKTRo3B4Ox5cq5Hxcp219ez/oGofDjNMUJAUI+gfsQfRarMkC5f3uiYw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"core-js": "^2.5.3",
|
||||
"regenerator-runtime": "^0.11.1"
|
||||
}
|
||||
},
|
||||
"@mrmlnc/readdir-enhanced": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz",
|
||||
|
@ -255,6 +265,12 @@
|
|||
"negotiator": "0.6.1"
|
||||
}
|
||||
},
|
||||
"accidental-value": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/accidental-value/-/accidental-value-1.0.0.tgz",
|
||||
"integrity": "sha1-nQh1Oozl+KfgtJFXnvXB4BiJ6A8=",
|
||||
"dev": true
|
||||
},
|
||||
"acorn": {
|
||||
"version": "5.5.3",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz",
|
||||
|
@ -845,6 +861,12 @@
|
|||
"integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=",
|
||||
"dev": true
|
||||
},
|
||||
"audiobuffer-to-wav": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/audiobuffer-to-wav/-/audiobuffer-to-wav-1.0.0.tgz",
|
||||
"integrity": "sha1-1bQyJxRV5/7laxEc0PjWINf54QU=",
|
||||
"dev": true
|
||||
},
|
||||
"aws-sign2": {
|
||||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz",
|
||||
|
@ -1926,6 +1948,12 @@
|
|||
"integrity": "sha512-XBaoWE9RW8pPdPQNibZsW2zh8TW6gcarXp1FZPwT8Uop8ScSNldJEWf2k9l3HeTqdrEwsOsFcq74RiJECW34yA==",
|
||||
"dev": true
|
||||
},
|
||||
"bit-twiddle": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/bit-twiddle/-/bit-twiddle-1.0.2.tgz",
|
||||
"integrity": "sha1-DGwfq+KyPRcXPZpht7cJPrnhdp4=",
|
||||
"dev": true
|
||||
},
|
||||
"bitsyntax": {
|
||||
"version": "0.0.4",
|
||||
"resolved": "https://registry.npmjs.org/bitsyntax/-/bitsyntax-0.0.4.tgz",
|
||||
|
@ -3141,6 +3169,12 @@
|
|||
"es5-ext": "^0.10.9"
|
||||
}
|
||||
},
|
||||
"daccord": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/daccord/-/daccord-1.1.0.tgz",
|
||||
"integrity": "sha1-NvDzmrH1dfdwndl9Nv/m2It40bQ=",
|
||||
"dev": true
|
||||
},
|
||||
"dargs": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/dargs/-/dargs-5.1.0.tgz",
|
||||
|
@ -4523,6 +4557,27 @@
|
|||
"integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=",
|
||||
"dev": true
|
||||
},
|
||||
"fft-js": {
|
||||
"version": "0.0.11",
|
||||
"resolved": "https://registry.npmjs.org/fft-js/-/fft-js-0.0.11.tgz",
|
||||
"integrity": "sha1-NONcNlCIFaobhvNAoOeshbjKa9U=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bit-twiddle": "~1.0.2",
|
||||
"commander": "~2.7.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"commander": {
|
||||
"version": "2.7.1",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.7.1.tgz",
|
||||
"integrity": "sha1-XUGaK77Swy7j5Nypu0Wrg+zDBlo=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"graceful-readlink": ">= 1.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"figures": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz",
|
||||
|
@ -5824,6 +5879,12 @@
|
|||
"integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=",
|
||||
"dev": true
|
||||
},
|
||||
"graceful-readlink": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz",
|
||||
"integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=",
|
||||
"dev": true
|
||||
},
|
||||
"grouped-queue": {
|
||||
"version": "0.3.3",
|
||||
"resolved": "https://registry.npmjs.org/grouped-queue/-/grouped-queue-0.3.3.tgz",
|
||||
|
@ -6349,6 +6410,16 @@
|
|||
"integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=",
|
||||
"dev": true
|
||||
},
|
||||
"helmholtz": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/helmholtz/-/helmholtz-2.0.2.tgz",
|
||||
"integrity": "sha1-VGMGIb2HV1sMK9kUcIenmo/jCBE=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"accidental-value": "^1.0.0",
|
||||
"notecoord": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"hipchat-notifier": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/hipchat-notifier/-/hipchat-notifier-1.1.0.tgz",
|
||||
|
@ -6775,6 +6846,12 @@
|
|||
"integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=",
|
||||
"dev": true
|
||||
},
|
||||
"interval-coords": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/interval-coords/-/interval-coords-1.1.1.tgz",
|
||||
"integrity": "sha1-SoOkAhRtlaTbBiwSm3nLNKfs3ck=",
|
||||
"dev": true
|
||||
},
|
||||
"into-stream": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/into-stream/-/into-stream-3.1.0.tgz",
|
||||
|
@ -9504,6 +9581,12 @@
|
|||
"sort-keys": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"notecoord": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/notecoord/-/notecoord-1.1.0.tgz",
|
||||
"integrity": "sha1-icQqt7tXlqKfPH+t6YJcUJ2PHtE=",
|
||||
"dev": true
|
||||
},
|
||||
"now-and-later": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.0.tgz",
|
||||
|
@ -10216,6 +10299,12 @@
|
|||
"pinkie": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"pitch-fq": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pitch-fq/-/pitch-fq-1.0.0.tgz",
|
||||
"integrity": "sha1-ZRs+iFL2W5VV86KPeulvEeNTNBY=",
|
||||
"dev": true
|
||||
},
|
||||
"pkg-dir": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz",
|
||||
|
@ -11205,6 +11294,16 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"scientific-notation": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/scientific-notation/-/scientific-notation-1.0.2.tgz",
|
||||
"integrity": "sha1-zOo5VP4ql502QcljrNmeVzNjkYI=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"accidental-value": "^1.0.0",
|
||||
"notecoord": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"scoped-regex": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/scoped-regex/-/scoped-regex-1.0.0.tgz",
|
||||
|
@ -12080,6 +12179,19 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"teoria": {
|
||||
"version": "2.5.0",
|
||||
"resolved": "https://registry.npmjs.org/teoria/-/teoria-2.5.0.tgz",
|
||||
"integrity": "sha512-LdnDG2PKkYAdBWGBgqZS3POuwq3Kzwj4PBR4PzEsEQ8T/tGqwEoa++SLDxSx7mvsfYA2VirfJWSXhMcpuhquaQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"daccord": "^1.0.1",
|
||||
"helmholtz": "^2.0.1",
|
||||
"interval-coords": "^1.1.1",
|
||||
"pitch-fq": "^1.0.0",
|
||||
"scientific-notation": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"text-table": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
|
||||
|
|
|
@ -46,9 +46,12 @@
|
|||
"url": "https://github.com/Tonejs/Tone.js/issues"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/polyfill": "^7.0.0-beta.47",
|
||||
"audiobuffer-to-wav": "^1.0.0",
|
||||
"chai": "^1.9.1",
|
||||
"concurrently": "^3.5.1",
|
||||
"eslint": "^4.19.1",
|
||||
"fft-js": "0.0.11",
|
||||
"glob": "^7.1.2",
|
||||
"gulp": "^4.0.0",
|
||||
"gulp-coveralls": "^0.1.4",
|
||||
|
@ -66,6 +69,7 @@
|
|||
"karma-webpack": "^3.0.0",
|
||||
"mocha": "^5.1.1",
|
||||
"semver": "^5.5.0",
|
||||
"teoria": "^2.5.0",
|
||||
"webpack": "^4.6.0",
|
||||
"webpack-cli": "^2.1.2"
|
||||
}
|
||||
|
|
|
@ -1,99 +0,0 @@
|
|||
/**
|
||||
* The MIT License (MIT) Copyright (c) 2015 Jam3
|
||||
*/
|
||||
define(function(){
|
||||
function audioBufferToWav(buffer, opt) {
|
||||
opt = opt || {};
|
||||
|
||||
var numChannels = buffer.numberOfChannels;
|
||||
var sampleRate = buffer.sampleRate;
|
||||
var format = opt.float32 ? 3 : 1;
|
||||
var bitDepth = format === 3 ? 32 : 16;
|
||||
|
||||
var result;
|
||||
if (numChannels === 2) {
|
||||
result = interleave(buffer.getChannelData(0), buffer.getChannelData(1));
|
||||
} else {
|
||||
result = buffer.getChannelData(0);
|
||||
}
|
||||
|
||||
return encodeWAV(result, format, sampleRate, numChannels, bitDepth);
|
||||
}
|
||||
|
||||
function encodeWAV(samples, format, sampleRate, numChannels, bitDepth) {
|
||||
var bytesPerSample = bitDepth / 8;
|
||||
var blockAlign = numChannels * bytesPerSample;
|
||||
|
||||
var buffer = new ArrayBuffer(44 + samples.length * bytesPerSample);
|
||||
var view = new DataView(buffer);
|
||||
|
||||
/* RIFF identifier */
|
||||
writeString(view, 0, "RIFF");
|
||||
/* RIFF chunk length */
|
||||
view.setUint32(4, 36 + samples.length * bytesPerSample, true);
|
||||
/* RIFF type */
|
||||
writeString(view, 8, "WAVE");
|
||||
/* format chunk identifier */
|
||||
writeString(view, 12, "fmt ");
|
||||
/* format chunk length */
|
||||
view.setUint32(16, 16, true);
|
||||
/* sample format (raw) */
|
||||
view.setUint16(20, format, true);
|
||||
/* channel count */
|
||||
view.setUint16(22, numChannels, true);
|
||||
/* sample rate */
|
||||
view.setUint32(24, sampleRate, true);
|
||||
/* byte rate (sample rate * block align) */
|
||||
view.setUint32(28, sampleRate * blockAlign, true);
|
||||
/* block align (channel count * bytes per sample) */
|
||||
view.setUint16(32, blockAlign, true);
|
||||
/* bits per sample */
|
||||
view.setUint16(34, bitDepth, true);
|
||||
/* data chunk identifier */
|
||||
writeString(view, 36, "data");
|
||||
/* data chunk length */
|
||||
view.setUint32(40, samples.length * bytesPerSample, true);
|
||||
if (format === 1) { // Raw PCM
|
||||
floatTo16BitPCM(view, 44, samples);
|
||||
} else {
|
||||
writeFloat32(view, 44, samples);
|
||||
}
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
function interleave(inputL, inputR) {
|
||||
var length = inputL.length + inputR.length;
|
||||
var result = new Float32Array(length);
|
||||
|
||||
var index = 0;
|
||||
var inputIndex = 0;
|
||||
|
||||
while (index < length) {
|
||||
result[index++] = inputL[inputIndex];
|
||||
result[index++] = inputR[inputIndex];
|
||||
inputIndex++;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function writeFloat32(output, offset, input) {
|
||||
for (var i = 0; i < input.length; i++, offset += 4) {
|
||||
output.setFloat32(offset, input[i], true);
|
||||
}
|
||||
}
|
||||
|
||||
function floatTo16BitPCM(output, offset, input) {
|
||||
for (var i = 0; i < input.length; i++, offset += 2) {
|
||||
var s = Math.max(-1, Math.min(1, input[i]));
|
||||
output.setInt16(offset, s < 0 ? s * 0x8000 : s * 0x7FFF, true);
|
||||
}
|
||||
}
|
||||
|
||||
function writeString(view, offset, string) {
|
||||
for (var i = 0; i < string.length; i++) {
|
||||
view.setUint8(offset + i, string.charCodeAt(i));
|
||||
}
|
||||
}
|
||||
return audioBufferToWav;
|
||||
});
|
4896
test/deps/chai.js
4896
test/deps/chai.js
File diff suppressed because it is too large
Load diff
540
test/deps/fft.js
540
test/deps/fft.js
|
@ -1,540 +0,0 @@
|
|||
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.FFT = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
||||
/*===========================================================================*\
|
||||
* Fast Fourier Transform (Cooley-Tukey Method)
|
||||
*
|
||||
* (c) Vail Systems. Joshua Jung and Ben Bryan. 2015
|
||||
*
|
||||
* This code is not designed to be highly optimized but as an educational
|
||||
* tool to understand the Fast Fourier Transform.
|
||||
\*===========================================================================*/
|
||||
module.exports = {
|
||||
fft: require('./src/fft').fft,
|
||||
ifft: require('./src/ifft').ifft,
|
||||
fftInPlace: require('./src/fft').fftInPlace,
|
||||
util: require('./src/fftutil'),
|
||||
dft: require('./src/dft')
|
||||
};
|
||||
|
||||
},{"./src/dft":4,"./src/fft":5,"./src/fftutil":6,"./src/ifft":7}],2:[function(require,module,exports){
|
||||
/**
|
||||
* Bit twiddling hacks for JavaScript.
|
||||
*
|
||||
* Author: Mikola Lysenko
|
||||
*
|
||||
* Ported from Stanford bit twiddling hack library:
|
||||
* http://graphics.stanford.edu/~seander/bithacks.html
|
||||
*/
|
||||
|
||||
"use strict"; "use restrict";
|
||||
|
||||
//Number of bits in an integer
|
||||
var INT_BITS = 32;
|
||||
|
||||
//Constants
|
||||
exports.INT_BITS = INT_BITS;
|
||||
exports.INT_MAX = 0x7fffffff;
|
||||
exports.INT_MIN = -1<<(INT_BITS-1);
|
||||
|
||||
//Returns -1, 0, +1 depending on sign of x
|
||||
exports.sign = function(v) {
|
||||
return (v > 0) - (v < 0);
|
||||
}
|
||||
|
||||
//Computes absolute value of integer
|
||||
exports.abs = function(v) {
|
||||
var mask = v >> (INT_BITS-1);
|
||||
return (v ^ mask) - mask;
|
||||
}
|
||||
|
||||
//Computes minimum of integers x and y
|
||||
exports.min = function(x, y) {
|
||||
return y ^ ((x ^ y) & -(x < y));
|
||||
}
|
||||
|
||||
//Computes maximum of integers x and y
|
||||
exports.max = function(x, y) {
|
||||
return x ^ ((x ^ y) & -(x < y));
|
||||
}
|
||||
|
||||
//Checks if a number is a power of two
|
||||
exports.isPow2 = function(v) {
|
||||
return !(v & (v-1)) && (!!v);
|
||||
}
|
||||
|
||||
//Computes log base 2 of v
|
||||
exports.log2 = function(v) {
|
||||
var r, shift;
|
||||
r = (v > 0xFFFF) << 4; v >>>= r;
|
||||
shift = (v > 0xFF ) << 3; v >>>= shift; r |= shift;
|
||||
shift = (v > 0xF ) << 2; v >>>= shift; r |= shift;
|
||||
shift = (v > 0x3 ) << 1; v >>>= shift; r |= shift;
|
||||
return r | (v >> 1);
|
||||
}
|
||||
|
||||
//Computes log base 10 of v
|
||||
exports.log10 = function(v) {
|
||||
return (v >= 1000000000) ? 9 : (v >= 100000000) ? 8 : (v >= 10000000) ? 7 :
|
||||
(v >= 1000000) ? 6 : (v >= 100000) ? 5 : (v >= 10000) ? 4 :
|
||||
(v >= 1000) ? 3 : (v >= 100) ? 2 : (v >= 10) ? 1 : 0;
|
||||
}
|
||||
|
||||
//Counts number of bits
|
||||
exports.popCount = function(v) {
|
||||
v = v - ((v >>> 1) & 0x55555555);
|
||||
v = (v & 0x33333333) + ((v >>> 2) & 0x33333333);
|
||||
return ((v + (v >>> 4) & 0xF0F0F0F) * 0x1010101) >>> 24;
|
||||
}
|
||||
|
||||
//Counts number of trailing zeros
|
||||
function countTrailingZeros(v) {
|
||||
var c = 32;
|
||||
v &= -v;
|
||||
if (v) c--;
|
||||
if (v & 0x0000FFFF) c -= 16;
|
||||
if (v & 0x00FF00FF) c -= 8;
|
||||
if (v & 0x0F0F0F0F) c -= 4;
|
||||
if (v & 0x33333333) c -= 2;
|
||||
if (v & 0x55555555) c -= 1;
|
||||
return c;
|
||||
}
|
||||
exports.countTrailingZeros = countTrailingZeros;
|
||||
|
||||
//Rounds to next power of 2
|
||||
exports.nextPow2 = function(v) {
|
||||
v += v === 0;
|
||||
--v;
|
||||
v |= v >>> 1;
|
||||
v |= v >>> 2;
|
||||
v |= v >>> 4;
|
||||
v |= v >>> 8;
|
||||
v |= v >>> 16;
|
||||
return v + 1;
|
||||
}
|
||||
|
||||
//Rounds down to previous power of 2
|
||||
exports.prevPow2 = function(v) {
|
||||
v |= v >>> 1;
|
||||
v |= v >>> 2;
|
||||
v |= v >>> 4;
|
||||
v |= v >>> 8;
|
||||
v |= v >>> 16;
|
||||
return v - (v>>>1);
|
||||
}
|
||||
|
||||
//Computes parity of word
|
||||
exports.parity = function(v) {
|
||||
v ^= v >>> 16;
|
||||
v ^= v >>> 8;
|
||||
v ^= v >>> 4;
|
||||
v &= 0xf;
|
||||
return (0x6996 >>> v) & 1;
|
||||
}
|
||||
|
||||
var REVERSE_TABLE = new Array(256);
|
||||
|
||||
(function(tab) {
|
||||
for(var i=0; i<256; ++i) {
|
||||
var v = i, r = i, s = 7;
|
||||
for (v >>>= 1; v; v >>>= 1) {
|
||||
r <<= 1;
|
||||
r |= v & 1;
|
||||
--s;
|
||||
}
|
||||
tab[i] = (r << s) & 0xff;
|
||||
}
|
||||
})(REVERSE_TABLE);
|
||||
|
||||
//Reverse bits in a 32 bit word
|
||||
exports.reverse = function(v) {
|
||||
return (REVERSE_TABLE[ v & 0xff] << 24) |
|
||||
(REVERSE_TABLE[(v >>> 8) & 0xff] << 16) |
|
||||
(REVERSE_TABLE[(v >>> 16) & 0xff] << 8) |
|
||||
REVERSE_TABLE[(v >>> 24) & 0xff];
|
||||
}
|
||||
|
||||
//Interleave bits of 2 coordinates with 16 bits. Useful for fast quadtree codes
|
||||
exports.interleave2 = function(x, y) {
|
||||
x &= 0xFFFF;
|
||||
x = (x | (x << 8)) & 0x00FF00FF;
|
||||
x = (x | (x << 4)) & 0x0F0F0F0F;
|
||||
x = (x | (x << 2)) & 0x33333333;
|
||||
x = (x | (x << 1)) & 0x55555555;
|
||||
|
||||
y &= 0xFFFF;
|
||||
y = (y | (y << 8)) & 0x00FF00FF;
|
||||
y = (y | (y << 4)) & 0x0F0F0F0F;
|
||||
y = (y | (y << 2)) & 0x33333333;
|
||||
y = (y | (y << 1)) & 0x55555555;
|
||||
|
||||
return x | (y << 1);
|
||||
}
|
||||
|
||||
//Extracts the nth interleaved component
|
||||
exports.deinterleave2 = function(v, n) {
|
||||
v = (v >>> n) & 0x55555555;
|
||||
v = (v | (v >>> 1)) & 0x33333333;
|
||||
v = (v | (v >>> 2)) & 0x0F0F0F0F;
|
||||
v = (v | (v >>> 4)) & 0x00FF00FF;
|
||||
v = (v | (v >>> 16)) & 0x000FFFF;
|
||||
return (v << 16) >> 16;
|
||||
}
|
||||
|
||||
|
||||
//Interleave bits of 3 coordinates, each with 10 bits. Useful for fast octree codes
|
||||
exports.interleave3 = function(x, y, z) {
|
||||
x &= 0x3FF;
|
||||
x = (x | (x<<16)) & 4278190335;
|
||||
x = (x | (x<<8)) & 251719695;
|
||||
x = (x | (x<<4)) & 3272356035;
|
||||
x = (x | (x<<2)) & 1227133513;
|
||||
|
||||
y &= 0x3FF;
|
||||
y = (y | (y<<16)) & 4278190335;
|
||||
y = (y | (y<<8)) & 251719695;
|
||||
y = (y | (y<<4)) & 3272356035;
|
||||
y = (y | (y<<2)) & 1227133513;
|
||||
x |= (y << 1);
|
||||
|
||||
z &= 0x3FF;
|
||||
z = (z | (z<<16)) & 4278190335;
|
||||
z = (z | (z<<8)) & 251719695;
|
||||
z = (z | (z<<4)) & 3272356035;
|
||||
z = (z | (z<<2)) & 1227133513;
|
||||
|
||||
return x | (z << 2);
|
||||
}
|
||||
|
||||
//Extracts nth interleaved component of a 3-tuple
|
||||
exports.deinterleave3 = function(v, n) {
|
||||
v = (v >>> n) & 1227133513;
|
||||
v = (v | (v>>>2)) & 3272356035;
|
||||
v = (v | (v>>>4)) & 251719695;
|
||||
v = (v | (v>>>8)) & 4278190335;
|
||||
v = (v | (v>>>16)) & 0x3FF;
|
||||
return (v<<22)>>22;
|
||||
}
|
||||
|
||||
//Computes next combination in colexicographic order (this is mistakenly called nextPermutation on the bit twiddling hacks page)
|
||||
exports.nextCombination = function(v) {
|
||||
var t = v | (v - 1);
|
||||
return (t + 1) | (((~t & -~t) - 1) >>> (countTrailingZeros(v) + 1));
|
||||
}
|
||||
|
||||
|
||||
},{}],3:[function(require,module,exports){
|
||||
//-------------------------------------------------
|
||||
// Add two complex numbers
|
||||
//-------------------------------------------------
|
||||
var complexAdd = function (a, b)
|
||||
{
|
||||
return [a[0] + b[0], a[1] + b[1]];
|
||||
};
|
||||
|
||||
//-------------------------------------------------
|
||||
// Subtract two complex numbers
|
||||
//-------------------------------------------------
|
||||
var complexSubtract = function (a, b)
|
||||
{
|
||||
return [a[0] - b[0], a[1] - b[1]];
|
||||
};
|
||||
|
||||
//-------------------------------------------------
|
||||
// Multiply two complex numbers
|
||||
//
|
||||
// (a + bi) * (c + di) = (ac - bd) + (ad + bc)i
|
||||
//-------------------------------------------------
|
||||
var complexMultiply = function (a, b)
|
||||
{
|
||||
return [(a[0] * b[0] - a[1] * b[1]),
|
||||
(a[0] * b[1] + a[1] * b[0])];
|
||||
};
|
||||
|
||||
//-------------------------------------------------
|
||||
// Calculate |a + bi|
|
||||
//
|
||||
// sqrt(a*a + b*b)
|
||||
//-------------------------------------------------
|
||||
var complexMagnitude = function (c)
|
||||
{
|
||||
return Math.sqrt(c[0]*c[0] + c[1]*c[1]);
|
||||
};
|
||||
|
||||
//-------------------------------------------------
|
||||
// Exports
|
||||
//-------------------------------------------------
|
||||
module.exports = {
|
||||
add: complexAdd,
|
||||
subtract: complexSubtract,
|
||||
multiply: complexMultiply,
|
||||
magnitude: complexMagnitude
|
||||
};
|
||||
|
||||
},{}],4:[function(require,module,exports){
|
||||
/*===========================================================================*\
|
||||
* Discrete Fourier Transform (O(n^2) brute-force method)
|
||||
*
|
||||
* (c) Vail Systems. Joshua Jung and Ben Bryan. 2015
|
||||
*
|
||||
* This code is not designed to be highly optimized but as an educational
|
||||
* tool to understand the Fast Fourier Transform.
|
||||
\*===========================================================================*/
|
||||
|
||||
//------------------------------------------------
|
||||
// Note: this code is not optimized and is
|
||||
// primarily designed as an educational and testing
|
||||
// tool.
|
||||
//------------------------------------------------
|
||||
var complex = require('./complex');
|
||||
var fftUtil = require('./fftutil');
|
||||
|
||||
//-------------------------------------------------
|
||||
// Calculate brute-force O(n^2) DFT for vector.
|
||||
//-------------------------------------------------
|
||||
var dft = function(vector) {
|
||||
var X = [],
|
||||
N = vector.length;
|
||||
|
||||
for (var k = 0; k < N; k++) {
|
||||
X[k] = [0, 0]; //Initialize to a 0-valued complex number.
|
||||
|
||||
for (var i = 0; i < N; i++) {
|
||||
var exp = fftUtil.exponent(k * i, N);
|
||||
var term = complex.multiply([vector[i], 0], exp); //Complex mult of the signal with the exponential term.
|
||||
X[k] = complex.add(X[k], term); //Complex summation of X[k] and exponential
|
||||
}
|
||||
}
|
||||
|
||||
return X;
|
||||
};
|
||||
|
||||
module.exports = dft;
|
||||
},{"./complex":3,"./fftutil":6}],5:[function(require,module,exports){
|
||||
/*===========================================================================*\
|
||||
* Fast Fourier Transform (Cooley-Tukey Method)
|
||||
*
|
||||
* (c) Vail Systems. Joshua Jung and Ben Bryan. 2015
|
||||
*
|
||||
* This code is not designed to be highly optimized but as an educational
|
||||
* tool to understand the Fast Fourier Transform.
|
||||
\*===========================================================================*/
|
||||
|
||||
//------------------------------------------------
|
||||
// Note: Some of this code is not optimized and is
|
||||
// primarily designed as an educational and testing
|
||||
// tool.
|
||||
// To get high performace would require transforming
|
||||
// the recursive calls into a loop and then loop
|
||||
// unrolling. All of this is best accomplished
|
||||
// in C or assembly.
|
||||
//-------------------------------------------------
|
||||
|
||||
//-------------------------------------------------
|
||||
// The following code assumes a complex number is
|
||||
// an array: [real, imaginary]
|
||||
//-------------------------------------------------
|
||||
var complex = require('./complex'),
|
||||
fftUtil = require('./fftutil'),
|
||||
twiddle = require('bit-twiddle');
|
||||
|
||||
module.exports = {
|
||||
//-------------------------------------------------
|
||||
// Calculate FFT for vector where vector.length
|
||||
// is assumed to be a power of 2.
|
||||
//-------------------------------------------------
|
||||
fft: function fft(vector) {
|
||||
var X = [],
|
||||
N = vector.length;
|
||||
|
||||
// Base case is X = x + 0i since our input is assumed to be real only.
|
||||
if (N == 1) {
|
||||
if (Array.isArray(vector[0])) //If input vector contains complex numbers
|
||||
return [[vector[0][0], vector[0][1]]];
|
||||
else
|
||||
return [[vector[0], 0]];
|
||||
}
|
||||
|
||||
// Recurse: all even samples
|
||||
var X_evens = fft(vector.filter(even)),
|
||||
|
||||
// Recurse: all odd samples
|
||||
X_odds = fft(vector.filter(odd));
|
||||
|
||||
// Now, perform N/2 operations!
|
||||
for (var k = 0; k < N / 2; k++) {
|
||||
// t is a complex number!
|
||||
var t = X_evens[k],
|
||||
e = complex.multiply(fftUtil.exponent(k, N), X_odds[k]);
|
||||
|
||||
X[k] = complex.add(t, e);
|
||||
X[k + (N / 2)] = complex.subtract(t, e);
|
||||
}
|
||||
|
||||
function even(__, ix) {
|
||||
return ix % 2 == 0;
|
||||
}
|
||||
|
||||
function odd(__, ix) {
|
||||
return ix % 2 == 1;
|
||||
}
|
||||
|
||||
return X;
|
||||
},
|
||||
//-------------------------------------------------
|
||||
// Calculate FFT for vector where vector.length
|
||||
// is assumed to be a power of 2. This is the in-
|
||||
// place implementation, to avoid the memory
|
||||
// footprint used by recursion.
|
||||
//-------------------------------------------------
|
||||
fftInPlace: function(vector) {
|
||||
var N = vector.length;
|
||||
|
||||
var trailingZeros = twiddle.countTrailingZeros(N); //Once reversed, this will be leading zeros
|
||||
|
||||
// Reverse bits
|
||||
for (var k = 0; k < N; k++) {
|
||||
var p = twiddle.reverse(k) >>> (twiddle.INT_BITS - trailingZeros);
|
||||
if (p > k) {
|
||||
var complexTemp = [vector[k], 0];
|
||||
vector[k] = vector[p];
|
||||
vector[p] = complexTemp;
|
||||
} else {
|
||||
vector[p] = [vector[p], 0];
|
||||
}
|
||||
}
|
||||
|
||||
//Do the DIT now in-place
|
||||
for (var len = 2; len <= N; len += len) {
|
||||
for (var i = 0; i < len / 2; i++) {
|
||||
var w = fftUtil.exponent(i, len);
|
||||
for (var j = 0; j < N / len; j++) {
|
||||
var t = complex.multiply(w, vector[j * len + i + len / 2]);
|
||||
vector[j * len + i + len / 2] = complex.subtract(vector[j * len + i], t);
|
||||
vector[j * len + i] = complex.add(vector[j * len + i], t);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
},{"./complex":3,"./fftutil":6,"bit-twiddle":2}],6:[function(require,module,exports){
|
||||
/*===========================================================================*\
|
||||
* Fast Fourier Transform Frequency/Magnitude passes
|
||||
*
|
||||
* (c) Vail Systems. Joshua Jung and Ben Bryan. 2015
|
||||
*
|
||||
* This code is not designed to be highly optimized but as an educational
|
||||
* tool to understand the Fast Fourier Transform.
|
||||
\*===========================================================================*/
|
||||
|
||||
//-------------------------------------------------
|
||||
// The following code assumes a complex number is
|
||||
// an array: [real, imaginary]
|
||||
//-------------------------------------------------
|
||||
var complex = require('./complex');
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// By Eulers Formula:
|
||||
//
|
||||
// e^(i*x) = cos(x) + i*sin(x)
|
||||
//
|
||||
// and in DFT:
|
||||
//
|
||||
// x = -2*PI*(k/N)
|
||||
//-------------------------------------------------
|
||||
var mapExponent = {},
|
||||
exponent = function (k, N) {
|
||||
var x = -2 * Math.PI * (k / N);
|
||||
|
||||
mapExponent[N] = mapExponent[N] || {};
|
||||
mapExponent[N][k] = mapExponent[N][k] || [Math.cos(x), Math.sin(x)];// [Real, Imaginary]
|
||||
|
||||
return mapExponent[N][k];
|
||||
};
|
||||
|
||||
//-------------------------------------------------
|
||||
// Calculate FFT Magnitude for complex numbers.
|
||||
//-------------------------------------------------
|
||||
var fftMag = function (fftBins) {
|
||||
var ret = fftBins.map(complex.magnitude);
|
||||
return ret.slice(0, ret.length / 2);
|
||||
};
|
||||
|
||||
//-------------------------------------------------
|
||||
// Calculate Frequency Bins
|
||||
//
|
||||
// Returns an array of the frequencies (in hertz) of
|
||||
// each FFT bin provided, assuming the sampleRate is
|
||||
// samples taken per second.
|
||||
//-------------------------------------------------
|
||||
var fftFreq = function (fftBins, sampleRate) {
|
||||
var stepFreq = sampleRate / (fftBins.length);
|
||||
var ret = fftBins.slice(0, fftBins.length / 2);
|
||||
|
||||
return ret.map(function (__, ix) {
|
||||
return ix * stepFreq;
|
||||
});
|
||||
};
|
||||
|
||||
//-------------------------------------------------
|
||||
// Exports
|
||||
//-------------------------------------------------
|
||||
module.exports = {
|
||||
fftMag: fftMag,
|
||||
fftFreq: fftFreq,
|
||||
exponent: exponent
|
||||
};
|
||||
|
||||
},{"./complex":3}],7:[function(require,module,exports){
|
||||
/*===========================================================================*\
|
||||
* Inverse Fast Fourier Transform (Cooley-Tukey Method)
|
||||
*
|
||||
* (c) Maximilian Bügler. 2016
|
||||
*
|
||||
* Based on and using the code by
|
||||
* (c) Vail Systems. Joshua Jung and Ben Bryan. 2015
|
||||
*
|
||||
* This code is not designed to be highly optimized but as an educational
|
||||
* tool to understand the Fast Fourier Transform.
|
||||
\*===========================================================================*/
|
||||
|
||||
//------------------------------------------------
|
||||
// Note: Some of this code is not optimized and is
|
||||
// primarily designed as an educational and testing
|
||||
// tool.
|
||||
// To get high performace would require transforming
|
||||
// the recursive calls into a loop and then loop
|
||||
// unrolling. All of this is best accomplished
|
||||
// in C or assembly.
|
||||
//-------------------------------------------------
|
||||
|
||||
//-------------------------------------------------
|
||||
// The following code assumes a complex number is
|
||||
// an array: [real, imaginary]
|
||||
//-------------------------------------------------
|
||||
|
||||
var fft = require('./fft').fft;
|
||||
|
||||
|
||||
module.exports = {
|
||||
ifft: function ifft(signal){
|
||||
//Interchange real and imaginary parts
|
||||
var csignal=[];
|
||||
for(var i=0; i<signal.length; i++){
|
||||
csignal[i]=[signal[i][1], signal[i][0]];
|
||||
}
|
||||
|
||||
//Apply fft
|
||||
var ps=fft(csignal);
|
||||
|
||||
//Interchange real and imaginary parts and normalize
|
||||
var res=[];
|
||||
for(var j=0; j<ps.length; j++){
|
||||
res[j]=[ps[j][1]/ps.length, ps[j][0]/ps.length];
|
||||
}
|
||||
return res;
|
||||
}
|
||||
};
|
||||
|
||||
},{"./fft":5}]},{},[1])(1)
|
||||
});
|
|
@ -1,270 +0,0 @@
|
|||
@charset "utf-8";
|
||||
|
||||
body {
|
||||
margin:0;
|
||||
}
|
||||
|
||||
#mocha {
|
||||
font: 20px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
margin: 60px 50px;
|
||||
}
|
||||
|
||||
#mocha ul,
|
||||
#mocha li {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#mocha ul {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
#mocha h1,
|
||||
#mocha h2 {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#mocha h1 {
|
||||
margin-top: 15px;
|
||||
font-size: 1em;
|
||||
font-weight: 200;
|
||||
}
|
||||
|
||||
#mocha h1 a {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
#mocha h1 a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#mocha .suite .suite h1 {
|
||||
margin-top: 0;
|
||||
font-size: .8em;
|
||||
}
|
||||
|
||||
#mocha .hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#mocha h2 {
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#mocha .suite {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
#mocha .test {
|
||||
margin-left: 15px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#mocha .test.pending:hover h2::after {
|
||||
content: '(pending)';
|
||||
font-family: arial, sans-serif;
|
||||
}
|
||||
|
||||
#mocha .test.pass.medium .duration {
|
||||
background: #c09853;
|
||||
}
|
||||
|
||||
#mocha .test.pass.slow .duration {
|
||||
background: #b94a48;
|
||||
}
|
||||
|
||||
#mocha .test.pass::before {
|
||||
content: '✓';
|
||||
font-size: 12px;
|
||||
display: block;
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
color: #00d6b2;
|
||||
}
|
||||
|
||||
#mocha .test.pass .duration {
|
||||
font-size: 9px;
|
||||
margin-left: 5px;
|
||||
padding: 2px 5px;
|
||||
color: #fff;
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.2);
|
||||
-moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.2);
|
||||
box-shadow: inset 0 1px 1px rgba(0,0,0,.2);
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
-ms-border-radius: 5px;
|
||||
-o-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
#mocha .test.pass.fast .duration {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#mocha .test.pending {
|
||||
color: #0b97c4;
|
||||
}
|
||||
|
||||
#mocha .test.pending::before {
|
||||
content: '◦';
|
||||
color: #0b97c4;
|
||||
}
|
||||
|
||||
#mocha .test.fail {
|
||||
color: #c00;
|
||||
}
|
||||
|
||||
#mocha .test.fail pre {
|
||||
color: black;
|
||||
}
|
||||
|
||||
#mocha .test.fail::before {
|
||||
content: '✖';
|
||||
font-size: 12px;
|
||||
display: block;
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
color: #c00;
|
||||
}
|
||||
|
||||
#mocha .test pre.error {
|
||||
color: #c00;
|
||||
max-height: 300px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* (1): approximate for browsers not supporting calc
|
||||
* (2): 42 = 2*15 + 2*10 + 2*1 (padding + margin + border)
|
||||
* ^^ seriously
|
||||
*/
|
||||
#mocha .test pre {
|
||||
display: block;
|
||||
float: left;
|
||||
clear: left;
|
||||
font: 12px/1.5 monaco, monospace;
|
||||
margin: 5px;
|
||||
padding: 15px;
|
||||
border: 1px solid #eee;
|
||||
max-width: 85%; /*(1)*/
|
||||
max-width: calc(100% - 42px); /*(2)*/
|
||||
word-wrap: break-word;
|
||||
border-bottom-color: #ddd;
|
||||
-webkit-border-radius: 3px;
|
||||
-webkit-box-shadow: 0 1px 3px #eee;
|
||||
-moz-border-radius: 3px;
|
||||
-moz-box-shadow: 0 1px 3px #eee;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
#mocha .test h2 {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#mocha .test a.replay {
|
||||
position: absolute;
|
||||
top: 3px;
|
||||
right: 0;
|
||||
text-decoration: none;
|
||||
vertical-align: middle;
|
||||
display: block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
line-height: 15px;
|
||||
text-align: center;
|
||||
background: #eee;
|
||||
font-size: 15px;
|
||||
-moz-border-radius: 15px;
|
||||
border-radius: 15px;
|
||||
-webkit-transition: opacity 200ms;
|
||||
-moz-transition: opacity 200ms;
|
||||
transition: opacity 200ms;
|
||||
opacity: 0.3;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
#mocha .test:hover a.replay {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#mocha-report.pass .test.fail {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#mocha-report.fail .test.pass {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#mocha-report.pending .test.pass,
|
||||
#mocha-report.pending .test.fail {
|
||||
display: none;
|
||||
}
|
||||
#mocha-report.pending .test.pass.pending {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#mocha-error {
|
||||
color: #c00;
|
||||
font-size: 1.5em;
|
||||
font-weight: 100;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
#mocha-stats {
|
||||
position: fixed;
|
||||
top: 15px;
|
||||
right: 10px;
|
||||
font-size: 12px;
|
||||
margin: 0;
|
||||
color: #888;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
#mocha-stats .progress {
|
||||
float: right;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
#mocha-stats em {
|
||||
color: black;
|
||||
}
|
||||
|
||||
#mocha-stats a {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
#mocha-stats a:hover {
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
#mocha-stats li {
|
||||
display: inline-block;
|
||||
margin: 0 5px;
|
||||
list-style: none;
|
||||
padding-top: 11px;
|
||||
}
|
||||
|
||||
#mocha-stats canvas {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
#mocha code .comment { color: #ddd; }
|
||||
#mocha code .init { color: #2f6fad; }
|
||||
#mocha code .string { color: #5890ad; }
|
||||
#mocha code .keyword { color: #8a6343; }
|
||||
#mocha code .number { color: #2f6fad; }
|
||||
|
||||
@media screen and (max-device-width: 480px) {
|
||||
#mocha {
|
||||
margin: 60px 0px;
|
||||
}
|
||||
|
||||
#mocha #stats {
|
||||
position: absolute;
|
||||
}
|
||||
}
|
6115
test/deps/mocha.js
6115
test/deps/mocha.js
File diff suppressed because it is too large
Load diff
|
@ -1,444 +0,0 @@
|
|||
/*
|
||||
RequireJS 2.1.11 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.
|
||||
Available via the MIT or new BSD license.
|
||||
see: http://github.com/jrburke/requirejs for details
|
||||
*/
|
||||
var requirejs,require,define;
|
||||
(function(ca){
|
||||
function G(b){
|
||||
return"[object Function]"===M.call(b);
|
||||
}function H(b){
|
||||
return"[object Array]"===M.call(b);
|
||||
}function v(b,c){
|
||||
if(b){
|
||||
var d;for(d=0;d<b.length&&(!b[d]||!c(b[d],d,b));d+=1){}
|
||||
}
|
||||
}function U(b,c){
|
||||
if(b){
|
||||
var d;for(d=b.length-1;-1<d&&(!b[d]||!c(b[d],d,b));d-=1){}
|
||||
}
|
||||
}function s(b,c){
|
||||
return ga.call(b,c);
|
||||
}function j(b,c){
|
||||
return s(b,c)&&b[c];
|
||||
}function B(b,c){
|
||||
for(var d in b){
|
||||
if(s(b,d)&&c(b[d],d)){
|
||||
break;
|
||||
}
|
||||
}
|
||||
}function V(b,c,d,g){
|
||||
c&&B(c,function(c,h){
|
||||
if(d||!s(b,h)){
|
||||
g&&"object"===typeof c&&c&&!H(c)&&!G(c)&&!(c instanceof
|
||||
RegExp)?(b[h]||(b[h]={}),V(b[h],c,d,g)):b[h]=c;
|
||||
}
|
||||
});return b;
|
||||
}function t(b,c){
|
||||
return function(){
|
||||
return c.apply(b,arguments);
|
||||
};
|
||||
}function da(b){
|
||||
throw b;
|
||||
}function ea(b){
|
||||
if(!b){
|
||||
return b;
|
||||
}var c=ca;v(b.split("."),function(b){
|
||||
c=c[b];
|
||||
});return c;
|
||||
}function C(b,c,d,g){
|
||||
c=Error(c+"\nhttp://requirejs.org/docs/errors.html#"+b);c.requireType=b;c.requireModules=g;d&&(c.originalError=d);return c;
|
||||
}function ha(b){
|
||||
function c(a,e,b){
|
||||
var f,n,c,d,g,h,i,I=e&&e.split("/");n=I;var m=l.map,k=m&&m["*"];if(a&&"."===a.charAt(0)){
|
||||
if(e){
|
||||
n=
|
||||
I.slice(0,I.length-1);a=a.split("/");e=a.length-1;l.nodeIdCompat&&R.test(a[e])&&(a[e]=a[e].replace(R,""));n=a=n.concat(a);d=n.length;for(e=0;e<d;e++){
|
||||
if(c=n[e],"."===c){
|
||||
n.splice(e,1),e-=1;
|
||||
}else if(".."===c){
|
||||
if(1===e&&(".."===n[2]||".."===n[0])){
|
||||
break;
|
||||
}else {
|
||||
0<e&&(n.splice(e-1,2),e-=2);
|
||||
}
|
||||
}
|
||||
}a=a.join("/");
|
||||
}else {
|
||||
0===a.indexOf("./")&&(a=a.substring(2));
|
||||
}
|
||||
}if(b&&m&&(I||k)){
|
||||
n=a.split("/");e=n.length;a:for(;0<e;e-=1){
|
||||
d=n.slice(0,e).join("/");if(I){
|
||||
for(c=I.length;0<c;c-=1){
|
||||
if(b=j(m,I.slice(0,c).join("/"))){
|
||||
if(b=j(b,d)){
|
||||
f=b;
|
||||
g=e;break a;
|
||||
}
|
||||
}
|
||||
}
|
||||
}!h&&(k&&j(k,d))&&(h=j(k,d),i=e);
|
||||
}!f&&h&&(f=h,g=i);f&&(n.splice(0,g,f),a=n.join("/"));
|
||||
}return(f=j(l.pkgs,a))?f:a;
|
||||
}function d(a){
|
||||
z&&v(document.getElementsByTagName("script"),function(e){
|
||||
if(e.getAttribute("data-requiremodule")===a&&e.getAttribute("data-requirecontext")===i.contextName){
|
||||
return e.parentNode.removeChild(e),!0;
|
||||
}
|
||||
});
|
||||
}function g(a){
|
||||
var e=j(l.paths,a);if(e&&H(e)&&1<e.length){
|
||||
return e.shift(),i.require.undef(a),i.require([a]),!0;
|
||||
}
|
||||
}function u(a){
|
||||
var e,b=a?a.indexOf("!"):-1;-1<b&&(e=a.substring(0,
|
||||
b),a=a.substring(b+1,a.length));return[e,a];
|
||||
}function m(a,e,b,f){
|
||||
var n,d,g=null,h=e?e.name:null,l=a,m=!0,k="";a||(m=!1,a="_@r"+(M+=1));a=u(a);g=a[0];a=a[1];g&&(g=c(g,h,f),d=j(p,g));a&&(g?k=d&&d.normalize?d.normalize(a,function(a){
|
||||
return c(a,h,f);
|
||||
}):c(a,h,f):(k=c(a,h,f),a=u(k),g=a[0],k=a[1],b=!0,n=i.nameToUrl(k)));b=g&&!d&&!b?"_unnormalized"+(Q+=1):"";return{ prefix : g,name : k,parentMap : e,unnormalized : !!b,url : n,originalName : l,isDefine : m,id : (g?g+"!"+k:k)+b };
|
||||
}function q(a){
|
||||
var e=a.id,b=j(k,e);b||(b=k[e]=new i.Module(a));
|
||||
return b;
|
||||
}function r(a,e,b){
|
||||
var f=a.id,n=j(k,f);if(s(p,f)&&(!n||n.defineEmitComplete)){
|
||||
"defined"===e&&b(p[f]);
|
||||
}else if(n=q(a),n.error&&"error"===e){
|
||||
b(n.error);
|
||||
}else {
|
||||
n.on(e,b);
|
||||
}
|
||||
}function w(a,e){
|
||||
var b=a.requireModules,f=!1;if(e){
|
||||
e(a);
|
||||
}else if(v(b,function(e){
|
||||
if(e=j(k,e)){
|
||||
e.error=a,e.events.error&&(f=!0,e.emit("error",a));
|
||||
}
|
||||
}),!f){
|
||||
h.onError(a);
|
||||
}
|
||||
}function x(){
|
||||
S.length&&(ia.apply(A,[A.length,0].concat(S)),S=[]);
|
||||
}function y(a){
|
||||
delete k[a];delete W[a];
|
||||
}function F(a,e,b){
|
||||
var f=a.map.id;a.error?a.emit("error",a.error):(e[f]=
|
||||
!0,v(a.depMaps,function(f,c){
|
||||
var d=f.id,g=j(k,d);g&&(!a.depMatched[c]&&!b[d])&&(j(e,d)?(a.defineDep(c,p[d]),a.check()):F(g,e,b));
|
||||
}),b[f]=!0);
|
||||
}function D(){
|
||||
var a,e,b=(a=1E3*l.waitSeconds)&&i.startTime+a<(new Date).getTime(),f=[],c=[],h=!1,k=!0;if(!X){
|
||||
X=!0;B(W,function(a){
|
||||
var i=a.map,m=i.id;if(a.enabled&&(i.isDefine||c.push(a),!a.error)){
|
||||
if(!a.inited&&b){
|
||||
g(m)?h=e=!0:(f.push(m),d(m));
|
||||
}else if(!a.inited&&(a.fetched&&i.isDefine)&&(h=!0,!i.prefix)){
|
||||
return k=!1;
|
||||
}
|
||||
}
|
||||
});if(b&&f.length){
|
||||
return a=C("timeout","Load timeout for modules: "+
|
||||
f,null,f),a.contextName=i.contextName,w(a);
|
||||
}k&&v(c,function(a){
|
||||
F(a,{},{});
|
||||
});if((!b||e)&&h){
|
||||
if((z||fa)&&!Y){
|
||||
Y=setTimeout(function(){
|
||||
Y=0;D();
|
||||
},50);
|
||||
}
|
||||
}X=!1;
|
||||
}
|
||||
}function E(a){
|
||||
s(p,a[0])||q(m(a[0],null,!0)).init(a[1],a[2]);
|
||||
}function K(a){
|
||||
var a=a.currentTarget||a.srcElement,e=i.onScriptLoad;a.detachEvent&&!Z?a.detachEvent("onreadystatechange",e):a.removeEventListener("load",e,!1);e=i.onScriptError;(!a.detachEvent||Z)&&a.removeEventListener("error",e,!1);return{ node : a,id : a&&a.getAttribute("data-requiremodule") };
|
||||
}function L(){
|
||||
var a;
|
||||
for(x();A.length;){
|
||||
a=A.shift();if(null===a[0]){
|
||||
return w(C("mismatch","Mismatched anonymous define() module: "+a[a.length-1]));
|
||||
}E(a);
|
||||
}
|
||||
}var X,$,i,N,Y,l={ waitSeconds : 7,baseUrl : "./",paths : {},bundles : {},pkgs : {},shim : {},config : {} },k={},W={},aa={},A=[],p={},T={},ba={},M=1,Q=1;N={ require : function(a){
|
||||
return a.require?a.require:a.require=i.makeRequire(a.map);
|
||||
},exports : function(a){
|
||||
a.usingExports=!0;if(a.map.isDefine){
|
||||
return a.exports?p[a.map.id]=a.exports:a.exports=p[a.map.id]={};
|
||||
}
|
||||
},module : function(a){
|
||||
return a.module?
|
||||
a.module:a.module={ id : a.map.id,uri : a.map.url,config : function(){
|
||||
return j(l.config,a.map.id)||{};
|
||||
},exports : a.exports||(a.exports={}) };
|
||||
} };$=function(a){
|
||||
this.events=j(aa,a.id)||{};this.map=a;this.shim=j(l.shim,a.id);this.depExports=[];this.depMaps=[];this.depMatched=[];this.pluginMaps={};this.depCount=0;
|
||||
};$.prototype={ init : function(a,e,b,f){
|
||||
f=f||{};if(!this.inited){
|
||||
this.factory=e;if(b){
|
||||
this.on("error",b);
|
||||
}else {
|
||||
this.events.error&&(b=t(this,function(a){
|
||||
this.emit("error",a);
|
||||
}));
|
||||
}this.depMaps=a&&a.slice(0);this.errback=
|
||||
b;this.inited=!0;this.ignore=f.ignore;f.enabled||this.enabled?this.enable():this.check();
|
||||
}
|
||||
},defineDep : function(a,e){
|
||||
this.depMatched[a]||(this.depMatched[a]=!0,this.depCount-=1,this.depExports[a]=e);
|
||||
},fetch : function(){
|
||||
if(!this.fetched){
|
||||
this.fetched=!0;i.startTime=(new Date).getTime();var a=this.map;if(this.shim){
|
||||
i.makeRequire(this.map,{ enableBuildCallback : !0 })(this.shim.deps||[],t(this,function(){
|
||||
return a.prefix?this.callPlugin():this.load();
|
||||
}));
|
||||
}else {
|
||||
return a.prefix?this.callPlugin():this.load();
|
||||
}
|
||||
}
|
||||
},load : function(){
|
||||
var a=
|
||||
this.map.url;T[a]||(T[a]=!0,i.load(this.map.id,a));
|
||||
},check : function(){
|
||||
if(this.enabled&&!this.enabling){
|
||||
var a,e,b=this.map.id;e=this.depExports;var f=this.exports,c=this.factory;if(this.inited){
|
||||
if(this.error){
|
||||
this.emit("error",this.error);
|
||||
}else if(!this.defining){
|
||||
this.defining=!0;if(1>this.depCount&&!this.defined){
|
||||
if(G(c)){
|
||||
if(this.events.error&&this.map.isDefine||h.onError!==da){
|
||||
try{
|
||||
f=i.execCb(b,c,e,f);
|
||||
}catch(d){
|
||||
a=d;
|
||||
}
|
||||
}else {
|
||||
f=i.execCb(b,c,e,f);
|
||||
}this.map.isDefine&&void 0===f&&((e=this.module)?f=e.exports:this.usingExports&&
|
||||
(f=this.exports));if(a){
|
||||
return a.requireMap=this.map,a.requireModules=this.map.isDefine?[this.map.id]:null,a.requireType=this.map.isDefine?"define":"require",w(this.error=a);
|
||||
}
|
||||
}else {
|
||||
f=c;
|
||||
}this.exports=f;if(this.map.isDefine&&!this.ignore&&(p[b]=f,h.onResourceLoad)){
|
||||
h.onResourceLoad(i,this.map,this.depMaps);
|
||||
}y(b);this.defined=!0;
|
||||
}this.defining=!1;this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0);
|
||||
}
|
||||
}else {
|
||||
this.fetch();
|
||||
}
|
||||
}
|
||||
},callPlugin : function(){
|
||||
var a=
|
||||
this.map,b=a.id,d=m(a.prefix);this.depMaps.push(d);r(d,"defined",t(this,function(f){
|
||||
var d,g;g=j(ba,this.map.id);var J=this.map.name,u=this.map.parentMap?this.map.parentMap.name:null,p=i.makeRequire(a.parentMap,{ enableBuildCallback : !0 });if(this.map.unnormalized){
|
||||
if(f.normalize&&(J=f.normalize(J,function(a){
|
||||
return c(a,u,!0);
|
||||
})||""),f=m(a.prefix+"!"+J,this.map.parentMap),r(f,"defined",t(this,function(a){
|
||||
this.init([],function(){
|
||||
return a;
|
||||
},null,{ enabled : !0,ignore : !0 });
|
||||
})),g=j(k,f.id)){
|
||||
this.depMaps.push(f);
|
||||
if(this.events.error){
|
||||
g.on("error",t(this,function(a){
|
||||
this.emit("error",a);
|
||||
}));
|
||||
}g.enable();
|
||||
}
|
||||
}else {
|
||||
g?(this.map.url=i.nameToUrl(g),this.load()):(d=t(this,function(a){
|
||||
this.init([],function(){
|
||||
return a;
|
||||
},null,{ enabled : !0 });
|
||||
}),d.error=t(this,function(a){
|
||||
this.inited=!0;this.error=a;a.requireModules=[b];B(k,function(a){
|
||||
0===a.map.id.indexOf(b+"_unnormalized")&&y(a.map.id);
|
||||
});w(a);
|
||||
}),d.fromText=t(this,function(f,c){
|
||||
var g=a.name,J=m(g),k=O;c&&(f=c);k&&(O=!1);q(J);s(l.config,b)&&(l.config[g]=l.config[b]);try{
|
||||
h.exec(f);
|
||||
}catch(j){
|
||||
return w(C("fromtexteval",
|
||||
"fromText eval for "+b+" failed: "+j,j,[b]));
|
||||
}k&&(O=!0);this.depMaps.push(J);i.completeLoad(g);p([g],d);
|
||||
}),f.load(a.name,p,d,l));
|
||||
}
|
||||
}));i.enable(d,this);this.pluginMaps[d.id]=d;
|
||||
},enable : function(){
|
||||
W[this.map.id]=this;this.enabling=this.enabled=!0;v(this.depMaps,t(this,function(a,b){
|
||||
var c,f;if("string"===typeof a){
|
||||
a=m(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap);this.depMaps[b]=a;if(c=j(N,a.id)){
|
||||
this.depExports[b]=c(this);return;
|
||||
}this.depCount+=1;r(a,"defined",t(this,function(a){
|
||||
this.defineDep(b,
|
||||
a);this.check();
|
||||
}));this.errback&&r(a,"error",t(this,this.errback));
|
||||
}c=a.id;f=k[c];!s(N,c)&&(f&&!f.enabled)&&i.enable(a,this);
|
||||
}));B(this.pluginMaps,t(this,function(a){
|
||||
var b=j(k,a.id);b&&!b.enabled&&i.enable(a,this);
|
||||
}));this.enabling=!1;this.check();
|
||||
},on : function(a,b){
|
||||
var c=this.events[a];c||(c=this.events[a]=[]);c.push(b);
|
||||
},emit : function(a,b){
|
||||
v(this.events[a],function(a){
|
||||
a(b);
|
||||
});"error"===a&&delete this.events[a];
|
||||
} };i={ config : l,contextName : b,registry : k,defined : p,urlFetched : T,defQueue : A,Module : $,makeModuleMap : m,
|
||||
nextTick : h.nextTick,onError : w,configure : function(a){
|
||||
a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");var b=l.shim,c={ paths : !0,bundles : !0,config : !0,map : !0 };B(a,function(a,b){
|
||||
c[b]?(l[b]||(l[b]={}),V(l[b],a,!0,!0)):l[b]=a;
|
||||
});a.bundles&&B(a.bundles,function(a,b){
|
||||
v(a,function(a){
|
||||
a!==b&&(ba[a]=b);
|
||||
});
|
||||
});a.shim&&(B(a.shim,function(a,c){
|
||||
H(a)&&(a={ deps : a });if((a.exports||a.init)&&!a.exportsFn){
|
||||
a.exportsFn=i.makeShimExports(a);
|
||||
}b[c]=a;
|
||||
}),l.shim=b);a.packages&&v(a.packages,function(a){
|
||||
var b,
|
||||
a="string"===typeof a?{ name : a }:a;b=a.name;a.location&&(l.paths[b]=a.location);l.pkgs[b]=a.name+"/"+(a.main||"main").replace(ja,"").replace(R,"");
|
||||
});B(k,function(a,b){
|
||||
!a.inited&&!a.map.unnormalized&&(a.map=m(b));
|
||||
});if(a.deps||a.callback){
|
||||
i.require(a.deps||[],a.callback);
|
||||
}
|
||||
},makeShimExports : function(a){
|
||||
return function(){
|
||||
var b;a.init&&(b=a.init.apply(ca,arguments));return b||a.exports&&ea(a.exports);
|
||||
};
|
||||
},makeRequire : function(a,e){
|
||||
function g(f,c,d){
|
||||
var j,l;e.enableBuildCallback&&(c&&G(c))&&(c.__requireJsBuild=
|
||||
!0);if("string"===typeof f){
|
||||
if(G(c)){
|
||||
return w(C("requireargs","Invalid require call"),d);
|
||||
}if(a&&s(N,f)){
|
||||
return N[f](k[a.id]);
|
||||
}if(h.get){
|
||||
return h.get(i,f,a,g);
|
||||
}j=m(f,a,!1,!0);j=j.id;return!s(p,j)?w(C("notloaded","Module name \""+j+"\" has not been loaded yet for context: "+b+(a?"":". Use require([])"))):p[j];
|
||||
}L();i.nextTick(function(){
|
||||
L();l=q(m(null,a));l.skipMap=e.skipMap;l.init(f,c,d,{ enabled : !0 });D();
|
||||
});return g;
|
||||
}e=e||{};V(g,{ isBrowser : z,toUrl : function(b){
|
||||
var e,d=b.lastIndexOf("."),g=b.split("/")[0];if(-1!==
|
||||
d&&(!("."===g||".."===g)||1<d)){
|
||||
e=b.substring(d,b.length),b=b.substring(0,d);
|
||||
}return i.nameToUrl(c(b,a&&a.id,!0),e,!0);
|
||||
},defined : function(b){
|
||||
return s(p,m(b,a,!1,!0).id);
|
||||
},specified : function(b){
|
||||
b=m(b,a,!1,!0).id;return s(p,b)||s(k,b);
|
||||
} });a||(g.undef=function(b){
|
||||
x();var c=m(b,a,!0),e=j(k,b);d(b);delete p[b];delete T[c.url];delete aa[b];U(A,function(a,c){
|
||||
a[0]===b&&A.splice(c,1);
|
||||
});e&&(e.events.defined&&(aa[b]=e.events),y(b));
|
||||
});return g;
|
||||
},enable : function(a){
|
||||
j(k,a.id)&&q(a).enable();
|
||||
},completeLoad : function(a){
|
||||
var b,
|
||||
c,f=j(l.shim,a)||{},d=f.exports;for(x();A.length;){
|
||||
c=A.shift();if(null===c[0]){
|
||||
c[0]=a;if(b){
|
||||
break;
|
||||
}b=!0;
|
||||
}else {
|
||||
c[0]===a&&(b=!0);
|
||||
}E(c);
|
||||
}c=j(k,a);if(!b&&!s(p,a)&&c&&!c.inited){
|
||||
if(l.enforceDefine&&(!d||!ea(d))){
|
||||
return g(a)?void 0:w(C("nodefine","No define call for "+a,null,[a]));
|
||||
}E([a,f.deps||[],f.exportsFn]);
|
||||
}D();
|
||||
},nameToUrl : function(a,b,c){
|
||||
var f,d,g;(f=j(l.pkgs,a))&&(a=f);if(f=j(ba,a)){
|
||||
return i.nameToUrl(f,b,c);
|
||||
}if(h.jsExtRegExp.test(a)){
|
||||
f=a+(b||"");
|
||||
}else{
|
||||
f=l.paths;a=a.split("/");for(d=a.length;0<d;d-=1){
|
||||
if(g=a.slice(0,
|
||||
d).join("/"),g=j(f,g)){
|
||||
H(g)&&(g=g[0]);a.splice(0,d,g);break;
|
||||
}
|
||||
}f=a.join("/");f+=b||(/^data\:|\?/.test(f)||c?"":".js");f=("/"===f.charAt(0)||f.match(/^[\w\+\.\-]+:/)?"":l.baseUrl)+f;
|
||||
}return l.urlArgs?f+((-1===f.indexOf("?")?"?":"&")+l.urlArgs):f;
|
||||
},load : function(a,b){
|
||||
h.load(i,a,b);
|
||||
},execCb : function(a,b,c,d){
|
||||
return b.apply(d,c);
|
||||
},onScriptLoad : function(a){
|
||||
if("load"===a.type||ka.test((a.currentTarget||a.srcElement).readyState)){
|
||||
P=null,a=K(a),i.completeLoad(a.id);
|
||||
}
|
||||
},onScriptError : function(a){
|
||||
var b=K(a);if(!g(b.id)){
|
||||
return w(C("scripterror",
|
||||
"Script error for: "+b.id,a,[b.id]));
|
||||
}
|
||||
} };i.require=i.makeRequire();return i;
|
||||
}var h,x,y,D,K,E,P,L,q,Q,la=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,ma=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,R=/\.js$/,ja=/^\.\//;x=Object.prototype;var M=x.toString,ga=x.hasOwnProperty,ia=Array.prototype.splice,z=!!("undefined"!==typeof window&&"undefined"!==typeof navigator&&window.document),fa=!z&&"undefined"!==typeof importScripts,ka=z&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,
|
||||
Z="undefined"!==typeof opera&&"[object Opera]"===opera.toString(),F={},r={},S=[],O=!1;if("undefined"===typeof define){
|
||||
if("undefined"!==typeof requirejs){
|
||||
if(G(requirejs)){
|
||||
return;
|
||||
}r=requirejs;requirejs=void 0;
|
||||
}"undefined"!==typeof require&&!G(require)&&(r=require,require=void 0);h=requirejs=function(b,c,d,g){
|
||||
var u,m="_";!H(b)&&"string"!==typeof b&&(u=b,H(c)?(b=c,c=d,d=g):b=[]);u&&u.context&&(m=u.context);(g=j(F,m))||(g=F[m]=h.s.newContext(m));u&&g.configure(u);return g.require(b,c,d);
|
||||
};h.config=function(b){
|
||||
return h(b);
|
||||
};
|
||||
h.nextTick="undefined"!==typeof setTimeout?function(b){
|
||||
setTimeout(b,4);
|
||||
}:function(b){
|
||||
b();
|
||||
};require||(require=h);h.version="2.1.11";h.jsExtRegExp=/^\/|:|\?|\.js$/;h.isBrowser=z;x=h.s={ contexts : F,newContext : ha };h({});v(["toUrl","undef","defined","specified"],function(b){
|
||||
h[b]=function(){
|
||||
var c=F._;return c.require[b].apply(c,arguments);
|
||||
};
|
||||
});if(z&&(y=x.head=document.getElementsByTagName("head")[0],D=document.getElementsByTagName("base")[0])){
|
||||
y=x.head=D.parentNode;
|
||||
}h.onError=da;h.createNode=function(b){
|
||||
var c=
|
||||
b.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");c.type=b.scriptType||"text/javascript";c.charset="utf-8";c.async=!0;return c;
|
||||
};h.load=function(b,c,d){
|
||||
var g=b&&b.config||{};if(z){
|
||||
return g=h.createNode(g,c,d),g.setAttribute("data-requirecontext",b.contextName),g.setAttribute("data-requiremodule",c),g.attachEvent&&!(g.attachEvent.toString&&0>g.attachEvent.toString().indexOf("[native code"))&&!Z?(O=!0,g.attachEvent("onreadystatechange",b.onScriptLoad)):
|
||||
(g.addEventListener("load",b.onScriptLoad,!1),g.addEventListener("error",b.onScriptError,!1)),g.src=d,L=g,D?y.insertBefore(g,D):y.appendChild(g),L=null,g;
|
||||
}if(fa){
|
||||
try{
|
||||
importScripts(d),b.completeLoad(c);
|
||||
}catch(j){
|
||||
b.onError(C("importscripts","importScripts failed for "+c+" at "+d,j,[c]));
|
||||
}
|
||||
}
|
||||
};z&&!r.skipDataMain&&U(document.getElementsByTagName("script"),function(b){
|
||||
y||(y=b.parentNode);if(K=b.getAttribute("data-main")){
|
||||
return q=K,r.baseUrl||(E=q.split("/"),q=E.pop(),Q=E.length?E.join("/")+"/":"./",r.baseUrl=
|
||||
Q),q=q.replace(R,""),h.jsExtRegExp.test(q)&&(q=K),r.deps=r.deps?r.deps.concat(q):[q],!0;
|
||||
}
|
||||
});define=function(b,c,d){
|
||||
var g,h;"string"!==typeof b&&(d=c,c=b,b=null);H(c)||(d=c,c=null);!c&&G(d)&&(c=[],d.length&&(d.toString().replace(la,"").replace(ma,function(b,d){
|
||||
c.push(d);
|
||||
}),c=(1===d.length?["require"]:["require","exports","module"]).concat(c)));if(O){
|
||||
if(!(g=L)){
|
||||
P&&"interactive"===P.readyState||U(document.getElementsByTagName("script"),function(b){
|
||||
if("interactive"===b.readyState){
|
||||
return P=b;
|
||||
}
|
||||
}),g=P;
|
||||
}g&&(b||
|
||||
(b=g.getAttribute("data-requiremodule")),h=F[g.getAttribute("data-requirecontext")]);
|
||||
}(h?h.defQueue:S).push([b,c,d]);
|
||||
};define.amd={ jQuery : !0 };h.exec=function(b){
|
||||
return eval(b);
|
||||
};h(r);
|
||||
}
|
||||
})(this);
|
1451
test/deps/teoria.js
1451
test/deps/teoria.js
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,5 @@
|
|||
define(["Tone/effect/AutoFilter", "helper/Basic", "helper/EffectTests", "deps/teoria", "helper/Offline"],
|
||||
function (AutoFilter, Basic, EffectTests, teoria, Offline) {
|
||||
define(["Tone/effect/AutoFilter", "helper/Basic", "helper/EffectTests", "teoria", "helper/Offline"],
|
||||
function(AutoFilter, Basic, EffectTests, teoria, Offline){
|
||||
|
||||
describe("AutoFilter", function(){
|
||||
Basic(AutoFilter);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(["helper/Offline", "Tone/core/Buffer", "deps/audiobuffer-to-wav", "deps/fft"], function(Offline, Buffer, audioBufferToWav, FFT){
|
||||
define(["helper/Offline", "Tone/core/Buffer", "audiobuffer-to-wav", "fft-js"], function(Offline, Buffer, audioBufferToWav, FFT){
|
||||
|
||||
return function(callback, url, threshold, RENDER_NEW){
|
||||
if (!RENDER_NEW){
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define(["helper/Basic", "helper/Test", "Tone/type/Frequency", "Tone/core/Tone",
|
||||
"deps/teoria", "helper/Offline", "Tone/type/Time", "Tone/type/TransportTime",
|
||||
"teoria", "helper/Offline", "Tone/type/Time", "Tone/type/TransportTime",
|
||||
"Tone/type/Ticks", "Tone/type/Midi"], function(Basic, Test, Frequency, Tone, teoria, Offline, Time, TransportTime, Ticks, Midi){
|
||||
|
||||
describe("Frequency", function(){
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define(["helper/Basic", "helper/Test", "Tone/type/Midi", "Tone/core/Tone",
|
||||
"deps/teoria", "helper/Offline", "Tone/type/Time", "Tone/type/TransportTime",
|
||||
"teoria", "helper/Offline", "Tone/type/Time", "Tone/type/TransportTime",
|
||||
"Tone/type/Ticks", "Tone/type/Frequency"], function(Basic, Test, Midi, Tone, teoria, Offline, Time, TransportTime, Ticks, Frequency){
|
||||
|
||||
describe("Midi", function(){
|
||||
|
|
Loading…
Reference in a new issue