123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- var require;
- require = function (require) {
- function uniquelyMapped(symbolicPath) {
- if (require && typeof define !== "undefined" && define.amd) {
- var mappedPath = require.toUrl(symbolicPath),
- basePath = require.toUrl('') + symbolicPath;
- if (resolveViaDOM(mappedPath) !== resolveViaDOM(basePath)) {
- return mappedPath;
- }
- }
- }
- function myTag() {
-
-
-
-
-
-
-
-
-
- var result = uniquelyMapped('amber/amber');
- if (result) {
- return {src: result, hasAttribute: function () { return false; }};
- }
- var me = document.getElementById("amber-path-mapper");
- if (me && me.tagName.toLowerCase() === "script") {
- return me;
- }
- var scripts = document.getElementsByTagName("script");
- return scripts[scripts.length - 1];
- }
- var me = myTag();
- var src = me.src;
-
-
- var amber_home = resolveViaDOM(src).replace(/\/[^\/]+\/[^\/]+$/, "");
-
- var library_home = uniquelyMapped('amber_lib') || me.hasAttribute('data-libs') && me.getAttribute('data-libs');
-
- if (!library_home) {
-
-
-
-
-
-
-
-
- var match = amber_home.match(/^(.*\/bower_components)\//);
- library_home = match ? match[1] : amber_home + '/bower_components';
- }
- function resolveViaDOM(url) {
- var a = document.createElement("a");
- a.href = url;
- return a.href;
- }
- var config = {
- paths: {
- 'amber': amber_home + '/support',
- 'amber_vm': amber_home + '/support',
- 'amber_css': amber_home + '/css',
- 'amber_lib': library_home,
- 'amber_core': amber_home + '/src',
- 'helios': amber_home + '/src',
- 'helios/all': amber_home + '/support/helios/all',
- 'helios/resources': amber_home + '/support/helios',
- 'helios/index': amber_home + '/support/helios/index',
- 'jquery': library_home + '/jquery/jquery.min'
- },
- map: {
- '*': {
- 'css': 'amber_lib/require-css/css'
- }
- },
- shim: {
- 'ensure-console': {
- exports: 'console'
- }
- }
- };
-
-
-
-
-
- if (require) {
- require.config(config);
- return require;
- } else {
- return config;
- }
- }(require);
|