1 /** vim: et:ts=4:sw=4:sts=4 |
1 /** vim: et:ts=4:sw=4:sts=4 |
2 * @license RequireJS 2.1.17 Copyright (c) 2010-2015, The Dojo Foundation All Rights Reserved. |
2 * @license RequireJS 2.1.15 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved. |
3 * Available via the MIT or new BSD license. |
3 * Available via the MIT or new BSD license. |
4 * see: http://github.com/jrburke/requirejs for details |
4 * see: http://github.com/jrburke/requirejs for details |
5 */ |
5 */ |
6 //Not using strict: uneven strict support in browsers, #392, and causes |
6 //Not using strict: uneven strict support in browsers, #392, and causes |
7 //problems with requirejs.exec()/transpiler plugins that may not be strict. |
7 //problems with requirejs.exec()/transpiler plugins that may not be strict. |
10 |
10 |
11 var requirejs, require, define; |
11 var requirejs, require, define; |
12 (function (global) { |
12 (function (global) { |
13 var req, s, head, baseElement, dataMain, src, |
13 var req, s, head, baseElement, dataMain, src, |
14 interactiveScript, currentlyAddingScript, mainScript, subPath, |
14 interactiveScript, currentlyAddingScript, mainScript, subPath, |
15 version = '2.1.17', |
15 version = '2.1.15', |
16 commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg, |
16 commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg, |
17 cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g, |
17 cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g, |
18 jsSuffixRegExp = /\.js$/, |
18 jsSuffixRegExp = /\.js$/, |
19 currDirRegExp = /^\.\//, |
19 currDirRegExp = /^\.\//, |
20 op = Object.prototype, |
20 op = Object.prototype, |
242 // If at the start, or previous value is still .., |
242 // If at the start, or previous value is still .., |
243 // keep them so that when converted to a path it may |
243 // keep them so that when converted to a path it may |
244 // still work when converted to a path, even though |
244 // still work when converted to a path, even though |
245 // as an ID it is less than ideal. In larger point |
245 // as an ID it is less than ideal. In larger point |
246 // releases, may be better to just kick out an error. |
246 // releases, may be better to just kick out an error. |
247 if (i === 0 || (i === 1 && ary[2] === '..') || ary[i - 1] === '..') { |
247 if (i === 0 || (i == 1 && ary[2] === '..') || ary[i - 1] === '..') { |
248 continue; |
248 continue; |
249 } else if (i > 0) { |
249 } else if (i > 0) { |
250 ary.splice(i - 1, 2); |
250 ary.splice(i - 1, 2); |
251 i -= 2; |
251 i -= 2; |
252 } |
252 } |
1121 this.check(); |
1121 this.check(); |
1122 })); |
1122 })); |
1123 |
1123 |
1124 if (this.errback) { |
1124 if (this.errback) { |
1125 on(depMap, 'error', bind(this, this.errback)); |
1125 on(depMap, 'error', bind(this, this.errback)); |
1126 } else if (this.events.error) { |
|
1127 // No direct errback on this module, but something |
|
1128 // else is listening for errors, so be sure to |
|
1129 // propagate the error correctly. |
|
1130 on(depMap, 'error', bind(this, function(err) { |
|
1131 this.emit('error', err); |
|
1132 })); |
|
1133 } |
1126 } |
1134 } |
1127 } |
1135 |
1128 |
1136 id = depMap.id; |
1129 id = depMap.id; |
1137 mod = registry[id]; |
1130 mod = registry[id]; |