From 50cf26c83cd85cf81ad192a954a81aa743dcbe1c Mon Sep 17 00:00:00 2001 From: Olivier Combe Date: Mon, 1 Jun 2015 14:21:05 +0200 Subject: [PATCH] chore: bump to 1.0.1 --- CHANGELOG.md | 10 ++++++++++ bower.json | 2 +- dist/ocLazyLoad.js | 2 +- dist/ocLazyLoad.min.js | 2 +- dist/ocLazyLoad.min.js.map | 2 +- dist/ocLazyLoad.require.js | 2 +- dist/ocLazyLoad.require.min.js | 2 +- dist/ocLazyLoad.require.min.js.map | 2 +- package.json | 2 +- 9 files changed, 18 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f605e39..caa58dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ + +# 1.0.1 (2015-06-01) + + +## Bug Fixes + +- don't remove filecache for files that were successfully loaded + ([e2ed37c0](https://github.com/ocombe/ocLazyLoad/commit/e2ed37c0eff32d34419af6851bfc355e7fb6f3ad)) + + # 1.0.0 (2015-05-29) diff --git a/bower.json b/bower.json index d3ddd18..5aa9097 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "oclazyload", - "version": "1.0.0", + "version": "1.0.1", "description": "Load modules on demand (lazy load) with angularJS", "main": "dist/ocLazyLoad.js", "homepage": "https://github.com/ocombe/ocLazyLoad", diff --git a/dist/ocLazyLoad.js b/dist/ocLazyLoad.js index 332a0e5..6aade29 100644 --- a/dist/ocLazyLoad.js +++ b/dist/ocLazyLoad.js @@ -1,6 +1,6 @@ /** * oclazyload - Load modules on demand (lazy load) with angularJS - * @version v1.0.0 + * @version v1.0.1 * @link https://github.com/ocombe/ocLazyLoad * @license MIT * @author Olivier Combe diff --git a/dist/ocLazyLoad.min.js b/dist/ocLazyLoad.min.js index 20ea97b..a6964ab 100644 --- a/dist/ocLazyLoad.min.js +++ b/dist/ocLazyLoad.min.js @@ -1,6 +1,6 @@ /** * oclazyload - Load modules on demand (lazy load) with angularJS - * @version v1.0.0 + * @version v1.0.1 * @link https://github.com/ocombe/ocLazyLoad * @license MIT * @author Olivier Combe diff --git a/dist/ocLazyLoad.min.js.map b/dist/ocLazyLoad.min.js.map index e660d80..0d7f207 100644 --- a/dist/ocLazyLoad.min.js.map +++ b/dist/ocLazyLoad.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["ocLazyLoad.js"],"names":["angular","window","regModules","regInvokes","regConfigs","modulesToLoad","recordDeclarations","broadcast","noop","runBlocks","justLoaded","ocLazyLoad","module","provider","$controllerProvider","$provide","$compileProvider","$filterProvider","$injector","$animateProvider","_register","providers","registerModules","params","k","moduleName","moduleFn","tempRunBlocks","length","isString","getModuleName","indexOf","newModule","ngModuleFct","push","requires","_runBlocks","shift","isDefined","rerun","concat","_invokeQueue","reconfig","_configBlocks","pop","instanceInjector","getInstanceInjector","forEach","fn","invoke","_registerInvokeList","args","signature","data","isArray","hashCode","toString","isObject","stringify","invokeList","type","newInvoke","isUndefined","onInvoke","invokeName","hasOwnProperty","key","queue","i","len","Error","isNew","apply","callInvoke","fct","invoked","isFunction","j","jlen","name","moduleExists","e","test","message","modules","debug","events","moduleCache","value","this","Array","prototype","arguments","config","moduleConfig","_init","element","elements","names","NG_APP_CLASS_REGEXP","append","elm","document","getElementById","replace","querySelectorAll","className","match","exec","attributes","attr","jasmine","mocha","mock","console","error","addReg","mainModule","obj","cache","JSON","str","chr","hash","charCodeAt","$get","$log","$rootElement","$rootScope","$cacheFactory","$q","reject","deferred","defer","promise","filesCache","warn","info","injector","eventName","$broadcast","_broadcast","_$log","_getFilesCache","toggleWatch","watch","getModuleConfig","copy","setModuleConfig","getModules","isLoaded","modulesNames","moduleLoaded","_getModuleName","_getModule","_loadDependencies","localParams","loadedModule","diff","promisesList","self","when","getRequires","requireEntry","files","filter","n","filesLoader","then","all","inject","undefined","_addToLoadList","res","slice","loadNext","resolve","err","requireModule","bootstrapFct","bootstrap","force","configFn","directive","$ocLazyLoad","$compile","$animate","$parse","restrict","terminal","priority","compile","content","innerHTML","html","$scope","$element","$attr","model","$watch","load","enter","contents","nodeType","decorator","$delegate","$window","$interval","uaCssChecked","useCssLoadPatch","anchor","getElementsByTagName","buildElement","path","el","loaded","cacheBuster","url","dc","Date","getTime","substring","get","put","createElement","rel","href","src","remove","onload","onreadystatechange","readyState","onerror","async","serie","insertBeforeElem","lastChild","insertBefore","jQuery","querySelector","parentNode","ua","navigator","userAgent","toLowerCase","platform","v","appVersion","iOSVersion","parseFloat","parseInt","join","androidVersion","versionMatch","tries","interval","sheet","cssRules","cancel","cssFiles","templatesFiles","jsFiles","promises","cachePromise","extend","pushFile","m","file_type","substr","jsLoader","cssDeferred","cssLoader","templatesDeferred","templatesLoader","jsDeferred","originalModule","errText","originalParams","deferredList","template","paths","callback","ocLazyLoadLoader","$templateCache","$http","success","node","nodeName","id","searchElement","fromIndex","TypeError","O","Object","Infinity","Math","abs","max"],"mappings":"CAOA,SAAWA,EAASC,GAChB,YAEA,IAAIC,IAAc,KAAM,eACpBC,KACAC,KACAC,KACAC,KACAC,EAAYP,EAAQQ,KACpBC,KACAC,KAEAC,EAAaX,EAAQY,OAAO,eAAgB,MAEhDD,GAAWE,SAAS,eAAgB,sBAAuB,WAAY,mBAAoB,kBAAmB,YAAa,mBAAoB,SAAUC,EAAqBC,EAAUC,EAAkBC,EAAiBC,EAAWC,GAgJlO,QAASC,GAAUC,EAAWC,EAAiBC,GAC3C,GAAID,EAAiB,CACjB,GAAIE,GACAC,EACAC,EACAC,IACJ,KAAKH,EAAIF,EAAgBM,OAAS,EAAGJ,GAAK,EAAGA,IAKzC,GAJAC,EAAaH,EAAgBE,GACxBxB,EAAQ6B,SAASJ,KAClBA,EAAaK,EAAcL,IAE1BA,GAAiD,KAAnCf,EAAWqB,QAAQN,GAAtC,CAGA,GAAIO,GAA+C,KAAnC9B,EAAW6B,QAAQN,EAOnC,IANAC,EAAWO,EAAYR,GACnBO,IAEA9B,EAAWgC,KAAKT,GAChBL,EAAUC,EAAWK,EAASS,SAAUZ,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OAClBiI,GAASpO,KAAKkG,EAASE,SACvBsJ,EAAM9D,IAAIL,EAAKlM,GAAQsQ,QAAQ,SAAUxO,GACjCrD,EAAQ6B,SAASwB,IAASA,EAAKzB,OAAS,GACxC5B,EAAQ+C,QAAQ/C,EAAQgG,QAAQ3C,GAAO,SAAUyO,GACvB,WAAlBA,EAAKC,UAAuC,qBAAdD,EAAKlO,MACnC+N,EAAe5D,IAAI+D,EAAKE,GAAIF,EAAK7F,aAIzCjM,EAAQ8D,YAAYyE,EAAWuF,IAAIL,KACnClF,EAAWwF,IAAIN,GAAK,GAExBrF,EAAS4C,YACV7D,MAAM,SAAU8D,GACf7C,EAASD,OAAO,GAAI7D,OAAM,iCAAoCmJ,EAAM,MAASxC,QAG9E/C,EAAGuC,IAAI6F,GAAU9F,KAAK,WACzBiH,KACD,SAAUxG,GACTwG,EAASxG,MAGjB4B,EAAUoE,gBAAgBS,kBAAmB,EAEtC7E,SAGhB7M,SAEE0F,MAAMC,UAAU5D,UACb2D,MAAMC,UAAU5D,QAAU,SAAUkQ,EAAeC,GAC3C,GAAI1Q,EAIJ,IAAY,MAARiE,KACI,KAAM,IAAI0M,WAAU,gCAG5B,IAAIC,GAAIC,OAAO5M,MAKXpB,EAAM+N,EAAExQ,SAAW,CAGvB,IAAY,IAARyC,EACI,MAAO,EAKf,IAAIiG,IAAK4H,GAAa,CAOtB,IALoBI,MAAhBC,KAAKC,IAAIlI,KACLA,EAAI,GAIRA,GAAKjG,EACD,MAAO,EASf,KAHA7C,EAAI+Q,KAAKE,IAAInI,GAAK,EAAIA,EAAIjG,EAAMkO,KAAKC,IAAIlI,GAAI,GAGlCjG,EAAJ7C,GAAS,CAaR,GAAIA,IAAK4Q,IAAKA,EAAE5Q,KAAOyQ,EACf,MAAOzQ,EAEfA,KAER,MAAO","file":"ocLazyLoad.min.js","sourcesContent":["/**\n * oclazyload - Load modules on demand (lazy load) with angularJS\n * @version v1.0.0\n * @link https://github.com/ocombe/ocLazyLoad\n * @license MIT\n * @author Olivier Combe \n */\n(function (angular, window) {\n \"use strict\";\n\n var regModules = [\"ng\", \"oc.lazyLoad\"],\n regInvokes = {},\n regConfigs = [],\n modulesToLoad = [],\n recordDeclarations = [],\n broadcast = angular.noop,\n runBlocks = {},\n justLoaded = [];\n\n var ocLazyLoad = angular.module(\"oc.lazyLoad\", [\"ng\"]);\n\n ocLazyLoad.provider(\"$ocLazyLoad\", [\"$controllerProvider\", \"$provide\", \"$compileProvider\", \"$filterProvider\", \"$injector\", \"$animateProvider\", function ($controllerProvider, $provide, $compileProvider, $filterProvider, $injector, $animateProvider) {\n var modules = {},\n providers = {\n $controllerProvider: $controllerProvider,\n $compileProvider: $compileProvider,\n $filterProvider: $filterProvider,\n $provide: $provide, // other things (constant, decorator, provider, factory, service)\n $injector: $injector,\n $animateProvider: $animateProvider\n },\n debug = false,\n events = false,\n moduleCache = [];\n\n moduleCache.push = function (value) {\n if (this.indexOf(value) === -1) {\n Array.prototype.push.apply(this, arguments);\n }\n };\n\n this.config = function (config) {\n // If we want to define modules configs\n if (angular.isDefined(config.modules)) {\n if (angular.isArray(config.modules)) {\n angular.forEach(config.modules, function (moduleConfig) {\n modules[moduleConfig.name] = moduleConfig;\n });\n } else {\n modules[config.modules.name] = config.modules;\n }\n }\n\n if (angular.isDefined(config.debug)) {\n debug = config.debug;\n }\n\n if (angular.isDefined(config.events)) {\n events = config.events;\n }\n };\n\n /**\n * Get the list of existing registered modules\n * @param element\n */\n this._init = function _init(element) {\n // this is probably useless now because we override angular.bootstrap\n if (modulesToLoad.length === 0) {\n var elements = [element],\n names = [\"ng:app\", \"ng-app\", \"x-ng-app\", \"data-ng-app\"],\n NG_APP_CLASS_REGEXP = /\\sng[:\\-]app(:\\s*([\\w\\d_]+);?)?\\s/,\n append = function append(elm) {\n return elm && elements.push(elm);\n };\n\n angular.forEach(names, function (name) {\n names[name] = true;\n append(document.getElementById(name));\n name = name.replace(\":\", \"\\\\:\");\n if (element[0].querySelectorAll) {\n angular.forEach(element[0].querySelectorAll(\".\" + name), append);\n angular.forEach(element[0].querySelectorAll(\".\" + name + \"\\\\:\"), append);\n angular.forEach(element[0].querySelectorAll(\"[\" + name + \"]\"), append);\n }\n });\n\n angular.forEach(elements, function (elm) {\n if (modulesToLoad.length === 0) {\n var className = \" \" + element.className + \" \";\n var match = NG_APP_CLASS_REGEXP.exec(className);\n if (match) {\n modulesToLoad.push((match[2] || \"\").replace(/\\s+/g, \",\"));\n } else {\n angular.forEach(elm.attributes, function (attr) {\n if (modulesToLoad.length === 0 && names[attr.name]) {\n modulesToLoad.push(attr.value);\n }\n });\n }\n }\n });\n }\n\n if (modulesToLoad.length === 0 && !((window.jasmine || window.mocha) && angular.isDefined(angular.mock))) {\n console.error(\"No module found during bootstrap, unable to init ocLazyLoad. You should always use the ng-app directive or angular.boostrap when you use ocLazyLoad.\");\n }\n\n var addReg = function addReg(moduleName) {\n if (regModules.indexOf(moduleName) === -1) {\n // register existing modules\n regModules.push(moduleName);\n var mainModule = angular.module(moduleName);\n\n // register existing components (directives, services, ...)\n _invokeQueue(null, mainModule._invokeQueue, moduleName);\n _invokeQueue(null, mainModule._configBlocks, moduleName); // angular 1.3+\n\n angular.forEach(mainModule.requires, addReg);\n }\n };\n\n angular.forEach(modulesToLoad, function (moduleName) {\n addReg(moduleName);\n });\n\n modulesToLoad = []; // reset for next bootstrap\n recordDeclarations.pop(); // wait for the next lazy load\n };\n\n /**\n * Like JSON.stringify but that doesn't throw on circular references\n * @param obj\n */\n var stringify = function stringify(obj) {\n var cache = [];\n return JSON.stringify(obj, function (key, value) {\n if (angular.isObject(value) && value !== null) {\n if (cache.indexOf(value) !== -1) {\n // Circular reference found, discard key\n return;\n }\n // Store value in our collection\n cache.push(value);\n }\n return value;\n });\n };\n\n var hashCode = function hashCode(str) {\n var hash = 0,\n i,\n chr,\n len;\n if (str.length == 0) {\n return hash;\n }\n for (i = 0, len = str.length; i < len; i++) {\n chr = str.charCodeAt(i);\n hash = (hash << 5) - hash + chr;\n hash |= 0; // Convert to 32bit integer\n }\n return hash;\n };\n\n function _register(providers, registerModules, params) {\n if (registerModules) {\n var k,\n moduleName,\n moduleFn,\n tempRunBlocks = [];\n for (k = registerModules.length - 1; k >= 0; k--) {\n moduleName = registerModules[k];\n if (!angular.isString(moduleName)) {\n moduleName = getModuleName(moduleName);\n }\n if (!moduleName || justLoaded.indexOf(moduleName) !== -1) {\n continue;\n }\n var newModule = regModules.indexOf(moduleName) === -1;\n moduleFn = ngModuleFct(moduleName);\n if (newModule) {\n // new module\n regModules.push(moduleName);\n _register(providers, moduleFn.requires, params);\n }\n if (moduleFn._runBlocks.length > 0) {\n // new run blocks detected! Replace the old ones (if existing)\n runBlocks[moduleName] = [];\n while (moduleFn._runBlocks.length > 0) {\n runBlocks[moduleName].push(moduleFn._runBlocks.shift());\n }\n }\n if (angular.isDefined(runBlocks[moduleName]) && (newModule || params.rerun)) {\n tempRunBlocks = tempRunBlocks.concat(runBlocks[moduleName]);\n }\n _invokeQueue(providers, moduleFn._invokeQueue, moduleName, params.reconfig);\n _invokeQueue(providers, moduleFn._configBlocks, moduleName, params.reconfig); // angular 1.3+\n broadcast(newModule ? \"ocLazyLoad.moduleLoaded\" : \"ocLazyLoad.moduleReloaded\", moduleName);\n registerModules.pop();\n justLoaded.push(moduleName);\n }\n // execute the run blocks at the end\n var instanceInjector = providers.getInstanceInjector();\n angular.forEach(tempRunBlocks, function (fn) {\n instanceInjector.invoke(fn);\n });\n }\n }\n\n function _registerInvokeList(args, moduleName) {\n var invokeList = args[2][0],\n type = args[1],\n newInvoke = false;\n if (angular.isUndefined(regInvokes[moduleName])) {\n regInvokes[moduleName] = {};\n }\n if (angular.isUndefined(regInvokes[moduleName][type])) {\n regInvokes[moduleName][type] = {};\n }\n var onInvoke = function onInvoke(invokeName, signature) {\n if (!regInvokes[moduleName][type].hasOwnProperty(invokeName)) {\n regInvokes[moduleName][type][invokeName] = [];\n }\n if (regInvokes[moduleName][type][invokeName].indexOf(signature) === -1) {\n newInvoke = true;\n regInvokes[moduleName][type][invokeName].push(signature);\n broadcast(\"ocLazyLoad.componentLoaded\", [moduleName, type, invokeName]);\n }\n };\n\n function signature(data) {\n if (angular.isArray(data)) {\n // arrays are objects, we need to test for it first\n return hashCode(data.toString());\n } else if (angular.isObject(data)) {\n // constants & values for example\n return hashCode(stringify(data));\n } else {\n if (angular.isDefined(data) && data !== null) {\n return hashCode(data.toString());\n } else {\n // null & undefined constants\n return data;\n }\n }\n }\n\n if (angular.isString(invokeList)) {\n onInvoke(invokeList, signature(args[2][1]));\n } else if (angular.isObject(invokeList)) {\n angular.forEach(invokeList, function (invoke, key) {\n if (angular.isString(invoke)) {\n // decorators for example\n onInvoke(invoke, signature(invokeList[1]));\n } else {\n // components registered as object lists {\"componentName\": function() {}}\n onInvoke(key, signature(invoke));\n }\n });\n } else {\n return false;\n }\n return newInvoke;\n }\n\n function _invokeQueue(providers, queue, moduleName, reconfig) {\n if (!queue) {\n return;\n }\n\n var i, len, args, provider;\n for (i = 0, len = queue.length; i < len; i++) {\n args = queue[i];\n if (angular.isArray(args)) {\n if (providers !== null) {\n if (providers.hasOwnProperty(args[0])) {\n provider = providers[args[0]];\n } else {\n throw new Error(\"unsupported provider \" + args[0]);\n }\n }\n var isNew = _registerInvokeList(args, moduleName);\n if (args[1] !== \"invoke\") {\n if (isNew && angular.isDefined(provider)) {\n provider[args[1]].apply(provider, args[2]);\n }\n } else {\n // config block\n var callInvoke = function callInvoke(fct) {\n var invoked = regConfigs.indexOf(\"\" + moduleName + \"-\" + fct);\n if (invoked === -1 || reconfig) {\n if (invoked === -1) {\n regConfigs.push(\"\" + moduleName + \"-\" + fct);\n }\n if (angular.isDefined(provider)) {\n provider[args[1]].apply(provider, args[2]);\n }\n }\n };\n if (angular.isFunction(args[2][0])) {\n callInvoke(args[2][0]);\n } else if (angular.isArray(args[2][0])) {\n for (var j = 0, jlen = args[2][0].length; j < jlen; j++) {\n if (angular.isFunction(args[2][0][j])) {\n callInvoke(args[2][0][j]);\n }\n }\n }\n }\n }\n }\n }\n\n function getModuleName(module) {\n var moduleName = null;\n if (angular.isString(module)) {\n moduleName = module;\n } else if (angular.isObject(module) && module.hasOwnProperty(\"name\") && angular.isString(module.name)) {\n moduleName = module.name;\n }\n return moduleName;\n }\n\n function moduleExists(moduleName) {\n if (!angular.isString(moduleName)) {\n return false;\n }\n try {\n return ngModuleFct(moduleName);\n } catch (e) {\n if (/No module/.test(e) || e.message.indexOf(\"$injector:nomod\") > -1) {\n return false;\n }\n }\n }\n\n this.$get = [\"$log\", \"$rootElement\", \"$rootScope\", \"$cacheFactory\", \"$q\", function ($log, $rootElement, $rootScope, $cacheFactory, $q) {\n var instanceInjector,\n filesCache = $cacheFactory(\"ocLazyLoad\");\n\n if (!debug) {\n $log = {};\n $log.error = angular.noop;\n $log.warn = angular.noop;\n $log.info = angular.noop;\n }\n\n // Make this lazy because when $get() is called the instance injector hasn't been assigned to the rootElement yet\n providers.getInstanceInjector = function () {\n return instanceInjector ? instanceInjector : instanceInjector = $rootElement.data(\"$injector\") || angular.injector();\n };\n\n broadcast = function broadcast(eventName, params) {\n if (events) {\n $rootScope.$broadcast(eventName, params);\n }\n if (debug) {\n $log.info(eventName, params);\n }\n };\n\n function reject(e) {\n var deferred = $q.defer();\n $log.error(e.message);\n deferred.reject(e);\n return deferred.promise;\n }\n\n return {\n _broadcast: broadcast,\n\n _$log: $log,\n\n /**\n * Returns the files cache used by the loaders to store the files currently loading\n * @returns {*}\n */\n _getFilesCache: function getFilesCache() {\n return filesCache;\n },\n\n /**\n * Let the service know that it should monitor angular.module because files are loading\n * @param watch boolean\n */\n toggleWatch: function toggleWatch(watch) {\n if (watch) {\n recordDeclarations.push(true);\n } else {\n recordDeclarations.pop();\n }\n },\n\n /**\n * Let you get a module config object\n * @param moduleName String the name of the module\n * @returns {*}\n */\n getModuleConfig: function getModuleConfig(moduleName) {\n if (!angular.isString(moduleName)) {\n throw new Error(\"You need to give the name of the module to get\");\n }\n if (!modules[moduleName]) {\n return null;\n }\n return angular.copy(modules[moduleName]);\n },\n\n /**\n * Let you define a module config object\n * @param moduleConfig Object the module config object\n * @returns {*}\n */\n setModuleConfig: function setModuleConfig(moduleConfig) {\n if (!angular.isObject(moduleConfig)) {\n throw new Error(\"You need to give the module config object to set\");\n }\n modules[moduleConfig.name] = moduleConfig;\n return moduleConfig;\n },\n\n /**\n * Returns the list of loaded modules\n * @returns {string[]}\n */\n getModules: function () {\n return regModules;\n },\n\n /**\n * Let you check if a module has been loaded into Angular or not\n * @param modulesNames String/Object a module name, or a list of module names\n * @returns {boolean}\n */\n isLoaded: function isLoaded(modulesNames) {\n var moduleLoaded = function moduleLoaded(module) {\n var isLoaded = regModules.indexOf(module) > -1;\n if (!isLoaded) {\n isLoaded = !!moduleExists(module);\n }\n return isLoaded;\n };\n if (angular.isString(modulesNames)) {\n modulesNames = [modulesNames];\n }\n if (angular.isArray(modulesNames)) {\n var i, len;\n for (i = 0, len = modulesNames.length; i < len; i++) {\n if (!moduleLoaded(modulesNames[i])) {\n return false;\n }\n }\n return true;\n } else {\n throw new Error(\"You need to define the module(s) name(s)\");\n }\n },\n\n /**\n * Given a module, return its name\n * @param module\n * @returns {String}\n */\n _getModuleName: getModuleName,\n\n /**\n * Returns a module if it exists\n * @param moduleName\n * @returns {module}\n */\n _getModule: function getModule(moduleName) {\n try {\n return ngModuleFct(moduleName);\n } catch (e) {\n // this error message really suxx\n if (/No module/.test(e) || e.message.indexOf(\"$injector:nomod\") > -1) {\n e.message = \"The module \\\"\" + stringify(moduleName) + \"\\\" that you are trying to load does not exist. \" + e.message;\n }\n throw e;\n }\n },\n\n /**\n * Check if a module exists and returns it if it does\n * @param moduleName\n * @returns {boolean}\n */\n moduleExists: moduleExists,\n\n /**\n * Load the dependencies, and might try to load new files depending on the config\n * @param moduleName (String or Array of Strings)\n * @param localParams\n * @returns {*}\n * @private\n */\n _loadDependencies: function _loadDependencies(moduleName, localParams) {\n var loadedModule,\n requires,\n diff,\n promisesList = [],\n self = this;\n\n moduleName = self._getModuleName(moduleName);\n\n if (moduleName === null) {\n return $q.when();\n } else {\n try {\n loadedModule = self._getModule(moduleName);\n } catch (e) {\n return reject(e);\n }\n // get unloaded requires\n requires = self.getRequires(loadedModule);\n }\n\n angular.forEach(requires, function (requireEntry) {\n // If no configuration is provided, try and find one from a previous load.\n // If there isn't one, bail and let the normal flow run\n if (angular.isString(requireEntry)) {\n var config = self.getModuleConfig(requireEntry);\n if (config === null) {\n moduleCache.push(requireEntry); // We don't know about this module, but something else might, so push it anyway.\n return;\n }\n requireEntry = config;\n }\n\n // Check if this dependency has been loaded previously\n if (self.moduleExists(requireEntry.name)) {\n // compare against the already loaded module to see if the new definition adds any new files\n diff = requireEntry.files.filter(function (n) {\n return self.getModuleConfig(requireEntry.name).files.indexOf(n) < 0;\n });\n\n // If the module was redefined, advise via the console\n if (diff.length !== 0) {\n self._$log.warn(\"Module \\\"\", moduleName, \"\\\" attempted to redefine configuration for dependency. \\\"\", requireEntry.name, \"\\\"\\n Additional Files Loaded:\", diff);\n }\n\n // Push everything to the file loader, it will weed out the duplicates.\n if (angular.isDefined(self.filesLoader)) {\n // if a files loader is defined\n promisesList.push(self.filesLoader(requireEntry, localParams).then(function () {\n return self._loadDependencies(requireEntry);\n }));\n } else {\n return reject(new Error(\"Error: New dependencies need to be loaded from external files (\" + requireEntry.files + \"), but no loader has been defined.\"));\n }\n return;\n } else if (angular.isArray(requireEntry)) {\n requireEntry = {\n files: requireEntry\n };\n } else if (angular.isObject(requireEntry)) {\n if (requireEntry.hasOwnProperty(\"name\") && requireEntry.name) {\n // The dependency doesn't exist in the module cache and is a new configuration, so store and push it.\n self.setModuleConfig(requireEntry);\n moduleCache.push(requireEntry.name);\n }\n }\n\n // Check if the dependency has any files that need to be loaded. If there are, push a new promise to the promise list.\n if (angular.isDefined(requireEntry.files) && requireEntry.files.length !== 0) {\n if (angular.isDefined(self.filesLoader)) {\n // if a files loader is defined\n promisesList.push(self.filesLoader(requireEntry, localParams).then(function () {\n return self._loadDependencies(requireEntry);\n }));\n } else {\n return reject(new Error(\"Error: the module \\\"\" + requireEntry.name + \"\\\" is defined in external files (\" + requireEntry.files + \"), but no loader has been defined.\"));\n }\n }\n });\n\n // Create a wrapper promise to watch the promise list and resolve it once everything is done.\n return $q.all(promisesList);\n },\n\n /**\n * Inject new modules into Angular\n * @param moduleName\n * @param localParams\n */\n inject: function inject(moduleName) {\n var localParams = arguments[1] === undefined ? {} : arguments[1];\n\n var self = this,\n deferred = $q.defer();\n if (angular.isDefined(moduleName) && moduleName !== null) {\n if (angular.isArray(moduleName)) {\n var promisesList = [];\n angular.forEach(moduleName, function (module) {\n promisesList.push(self.inject(module));\n });\n return $q.all(promisesList);\n } else {\n self._addToLoadList(self._getModuleName(moduleName), true);\n }\n }\n if (modulesToLoad.length > 0) {\n var res = modulesToLoad.slice(); // clean copy\n var loadNext = function loadNext(moduleName) {\n moduleCache.push(moduleName);\n self._loadDependencies(moduleName, localParams).then(function success() {\n try {\n justLoaded = [];\n _register(providers, moduleCache, localParams);\n } catch (e) {\n self._$log.error(e.message);\n deferred.reject(e);\n return;\n }\n\n if (modulesToLoad.length > 0) {\n loadNext(modulesToLoad.shift()); // load the next in list\n } else {\n deferred.resolve(res); // everything has been loaded, resolve\n }\n }, function error(err) {\n deferred.reject(err);\n });\n };\n\n // load the first in list\n loadNext(modulesToLoad.shift());\n } else {\n deferred.resolve();\n }\n return deferred.promise;\n },\n\n /**\n * Get the list of required modules/services/... for this module\n * @param module\n * @returns {Array}\n */\n getRequires: function getRequires(module) {\n var requires = [];\n angular.forEach(module.requires, function (requireModule) {\n if (regModules.indexOf(requireModule) === -1) {\n requires.push(requireModule);\n }\n });\n return requires;\n },\n\n /**\n * Invoke the new modules & component by their providers\n * @param providers\n * @param queue\n * @param moduleName\n * @param reconfig\n * @private\n */\n _invokeQueue: _invokeQueue,\n\n /**\n * Check if a module has been invoked and registers it if not\n * @param args\n * @param moduleName\n * @returns {boolean} is new\n */\n _registerInvokeList: _registerInvokeList,\n\n /**\n * Register a new module and loads it, executing the run/config blocks if needed\n * @param providers\n * @param registerModules\n * @param params\n * @private\n */\n _register: _register,\n\n /**\n * Add a module name to the list of modules that will be loaded in the next inject\n * @param name\n * @param force\n * @private\n */\n _addToLoadList: _addToLoadList\n };\n }];\n\n // Let's get the list of loaded modules & components\n this._init(angular.element(window.document));\n }]);\n\n var bootstrapFct = angular.bootstrap;\n angular.bootstrap = function (element, modules, config) {\n // we use slice to make a clean copy\n angular.forEach(modules.slice(), function (module) {\n _addToLoadList(module, true);\n });\n return bootstrapFct(element, modules, config);\n };\n\n var _addToLoadList = function _addToLoadList(name, force) {\n if ((recordDeclarations.length > 0 || force) && angular.isString(name) && modulesToLoad.indexOf(name) === -1) {\n modulesToLoad.push(name);\n }\n };\n\n var ngModuleFct = angular.module;\n angular.module = function (name, requires, configFn) {\n _addToLoadList(name);\n return ngModuleFct(name, requires, configFn);\n };\n})(angular, window);\n(function (angular) {\n \"use strict\";\n\n angular.module(\"oc.lazyLoad\").directive(\"ocLazyLoad\", [\"$ocLazyLoad\", \"$compile\", \"$animate\", \"$parse\", function ($ocLazyLoad, $compile, $animate, $parse) {\n return {\n restrict: \"A\",\n terminal: true,\n priority: 1000,\n compile: function compile(element, attrs) {\n // we store the content and remove it before compilation\n var content = element[0].innerHTML;\n element.html(\"\");\n\n return function ($scope, $element, $attr) {\n var model = $parse($attr.ocLazyLoad);\n $scope.$watch(function () {\n return model($scope) || $attr.ocLazyLoad; // it can be a module name (string), an object, an array, or a scope reference to any of this\n }, function (moduleName) {\n if (angular.isDefined(moduleName)) {\n $ocLazyLoad.load(moduleName).then(function () {\n $animate.enter(content, $element);\n var contents = element.contents();\n angular.forEach(contents, function (content) {\n if (content.nodeType !== 3) {\n // 3 is a text node\n $compile(content)($scope);\n }\n });\n });\n }\n }, true);\n };\n }\n };\n }]);\n})(angular);\n(function (angular) {\n \"use strict\";\n\n angular.module(\"oc.lazyLoad\").config([\"$provide\", function ($provide) {\n $provide.decorator(\"$ocLazyLoad\", [\"$delegate\", \"$q\", \"$window\", \"$interval\", function ($delegate, $q, $window, $interval) {\n var uaCssChecked = false,\n useCssLoadPatch = false,\n anchor = $window.document.getElementsByTagName(\"head\")[0] || $window.document.getElementsByTagName(\"body\")[0];\n\n /**\n * Load a js/css file\n * @param type\n * @param path\n * @param params\n * @returns promise\n */\n $delegate.buildElement = function buildElement(type, path, params) {\n var deferred = $q.defer(),\n el,\n loaded,\n filesCache = $delegate._getFilesCache(),\n cacheBuster = function cacheBuster(url) {\n var dc = new Date().getTime();\n if (url.indexOf(\"?\") >= 0) {\n if (url.substring(0, url.length - 1) === \"&\") {\n return \"\" + url + \"_dc=\" + dc;\n }\n return \"\" + url + \"&_dc=\" + dc;\n } else {\n return \"\" + url + \"?_dc=\" + dc;\n }\n };\n\n // Store the promise early so the file load can be detected by other parallel lazy loads\n // (ie: multiple routes on one page) a 'true' value isn't sufficient\n // as it causes false positive load results.\n if (angular.isUndefined(filesCache.get(path))) {\n filesCache.put(path, deferred.promise);\n }\n\n // Switch in case more content types are added later\n switch (type) {\n case \"css\":\n el = $window.document.createElement(\"link\");\n el.type = \"text/css\";\n el.rel = \"stylesheet\";\n el.href = params.cache === false ? cacheBuster(path) : path;\n break;\n case \"js\":\n el = $window.document.createElement(\"script\");\n el.src = params.cache === false ? cacheBuster(path) : path;\n break;\n default:\n filesCache.remove(path);\n deferred.reject(new Error(\"Requested type \\\"\" + type + \"\\\" is not known. Could not inject \\\"\" + path + \"\\\"\"));\n break;\n }\n el.onload = el.onreadystatechange = function (e) {\n if (el.readyState && !/^c|loade/.test(el.readyState) || loaded) return;\n el.onload = el.onreadystatechange = null;\n loaded = 1;\n $delegate._broadcast(\"ocLazyLoad.fileLoaded\", path);\n deferred.resolve();\n };\n el.onerror = function () {\n filesCache.remove(path);\n deferred.reject(new Error(\"Unable to load \" + path));\n };\n el.async = params.serie ? 0 : 1;\n\n var insertBeforeElem = anchor.lastChild;\n if (params.insertBefore) {\n var element = angular.element(angular.isDefined(window.jQuery) ? params.insertBefore : document.querySelector(params.insertBefore));\n if (element && element.length > 0) {\n insertBeforeElem = element[0];\n }\n }\n insertBeforeElem.parentNode.insertBefore(el, insertBeforeElem);\n\n /*\n The event load or readystatechange doesn't fire in:\n - iOS < 6 (default mobile browser)\n - Android < 4.4 (default mobile browser)\n - Safari < 6 (desktop browser)\n */\n if (type == \"css\") {\n if (!uaCssChecked) {\n var ua = $window.navigator.userAgent.toLowerCase();\n\n // iOS < 6\n if (/iP(hone|od|ad)/.test($window.navigator.platform)) {\n var v = $window.navigator.appVersion.match(/OS (\\d+)_(\\d+)_?(\\d+)?/);\n var iOSVersion = parseFloat([parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)].join(\".\"));\n useCssLoadPatch = iOSVersion < 6;\n } else if (ua.indexOf(\"android\") > -1) {\n // Android < 4.4\n var androidVersion = parseFloat(ua.slice(ua.indexOf(\"android\") + 8));\n useCssLoadPatch = androidVersion < 4.4;\n } else if (ua.indexOf(\"safari\") > -1) {\n var versionMatch = ua.match(/version\\/([\\.\\d]+)/i);\n useCssLoadPatch = versionMatch && versionMatch[1] && parseFloat(versionMatch[1]) < 6;\n }\n }\n\n if (useCssLoadPatch) {\n var tries = 1000; // * 20 = 20000 miliseconds\n var interval = $interval(function () {\n try {\n el.sheet.cssRules;\n $interval.cancel(interval);\n el.onload();\n } catch (e) {\n if (--tries <= 0) {\n el.onerror();\n }\n }\n }, 20);\n }\n }\n\n return deferred.promise;\n };\n\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n \"use strict\";\n\n angular.module(\"oc.lazyLoad\").config([\"$provide\", function ($provide) {\n $provide.decorator(\"$ocLazyLoad\", [\"$delegate\", \"$q\", function ($delegate, $q) {\n /**\n * The function that loads new files\n * @param config\n * @param params\n * @returns {*}\n */\n $delegate.filesLoader = function filesLoader(config) {\n var params = arguments[1] === undefined ? {} : arguments[1];\n\n var cssFiles = [],\n templatesFiles = [],\n jsFiles = [],\n promises = [],\n cachePromise = null,\n filesCache = $delegate._getFilesCache();\n\n $delegate.toggleWatch(true); // start watching angular.module calls\n\n angular.extend(params, config);\n\n var pushFile = function pushFile(path) {\n var file_type = null,\n m;\n if (angular.isObject(path)) {\n file_type = path.type;\n path = path.path;\n }\n cachePromise = filesCache.get(path);\n if (angular.isUndefined(cachePromise) || params.cache === false) {\n\n // always check for requirejs syntax just in case\n if ((m = /^(css|less|html|htm|js)?(?=!)/.exec(path)) !== null) {\n // Detect file type using preceding type declaration (ala requireJS)\n file_type = m[1];\n path = path.substr(m[1].length + 1, path.length); // Strip the type from the path\n }\n\n if (!file_type) {\n if ((m = /[.](css|less|html|htm|js)?((\\?|#).*)?$/.exec(path)) !== null) {\n // Detect file type via file extension\n file_type = m[1];\n } else if (!$delegate.jsLoader.hasOwnProperty(\"ocLazyLoadLoader\") && $delegate.jsLoader.hasOwnProperty(\"load\")) {\n // requirejs\n file_type = \"js\";\n } else {\n $delegate._$log.error(\"File type could not be determined. \" + path);\n return;\n }\n }\n\n if ((file_type === \"css\" || file_type === \"less\") && cssFiles.indexOf(path) === -1) {\n cssFiles.push(path);\n } else if ((file_type === \"html\" || file_type === \"htm\") && templatesFiles.indexOf(path) === -1) {\n templatesFiles.push(path);\n } else if (file_type === \"js\" || jsFiles.indexOf(path) === -1) {\n jsFiles.push(path);\n } else {\n $delegate._$log.error(\"File type is not valid. \" + path);\n }\n } else if (cachePromise) {\n promises.push(cachePromise);\n }\n };\n\n if (params.serie) {\n pushFile(params.files.shift());\n } else {\n angular.forEach(params.files, function (path) {\n pushFile(path);\n });\n }\n\n if (cssFiles.length > 0) {\n var cssDeferred = $q.defer();\n $delegate.cssLoader(cssFiles, function (err) {\n if (angular.isDefined(err) && $delegate.cssLoader.hasOwnProperty(\"ocLazyLoadLoader\")) {\n $delegate._$log.error(err);\n cssDeferred.reject(err);\n } else {\n cssDeferred.resolve();\n }\n }, params);\n promises.push(cssDeferred.promise);\n }\n\n if (templatesFiles.length > 0) {\n var templatesDeferred = $q.defer();\n $delegate.templatesLoader(templatesFiles, function (err) {\n if (angular.isDefined(err) && $delegate.templatesLoader.hasOwnProperty(\"ocLazyLoadLoader\")) {\n $delegate._$log.error(err);\n templatesDeferred.reject(err);\n } else {\n templatesDeferred.resolve();\n }\n }, params);\n promises.push(templatesDeferred.promise);\n }\n\n if (jsFiles.length > 0) {\n var jsDeferred = $q.defer();\n $delegate.jsLoader(jsFiles, function (err) {\n if (angular.isDefined(err) && $delegate.jsLoader.hasOwnProperty(\"ocLazyLoadLoader\")) {\n $delegate._$log.error(err);\n jsDeferred.reject(err);\n } else {\n jsDeferred.resolve();\n }\n }, params);\n promises.push(jsDeferred.promise);\n }\n\n if (promises.length === 0) {\n var deferred = $q.defer(),\n err = \"Error: no file to load has been found, if you're trying to load an existing module you should use the 'inject' method instead of 'load'.\";\n $delegate._$log.error(err);\n deferred.reject(err);\n return deferred.promise;\n } else if (params.serie && params.files.length > 0) {\n return $q.all(promises).then(function () {\n return $delegate.filesLoader(config, params);\n });\n } else {\n return $q.all(promises)[\"finally\"](function (res) {\n $delegate.toggleWatch(false); // stop watching angular.module calls\n return res;\n });\n }\n };\n\n /**\n * Load a module or a list of modules into Angular\n * @param module Mixed the name of a predefined module config object, or a module config object, or an array of either\n * @param params Object optional parameters\n * @returns promise\n */\n $delegate.load = function (originalModule) {\n var originalParams = arguments[1] === undefined ? {} : arguments[1];\n\n var self = this,\n config = null,\n deferredList = [],\n deferred = $q.defer(),\n errText;\n\n // clean copy\n var module = angular.copy(originalModule);\n var params = angular.copy(originalParams);\n\n // If module is an array, break it down\n if (angular.isArray(module)) {\n // Resubmit each entry as a single module\n angular.forEach(module, function (m) {\n deferredList.push(self.load(m, params));\n });\n\n // Resolve the promise once everything has loaded\n $q.all(deferredList).then(function (res) {\n deferred.resolve(res);\n }, function (err) {\n deferred.reject(err);\n });\n\n return deferred.promise;\n }\n\n // Get or Set a configuration depending on what was passed in\n if (angular.isString(module)) {\n config = self.getModuleConfig(module);\n if (!config) {\n config = {\n files: [module]\n };\n }\n } else if (angular.isObject(module)) {\n // case {type: 'js', path: lazyLoadUrl + 'testModule.fakejs'}\n if (angular.isDefined(module.path) && angular.isDefined(module.type)) {\n config = {\n files: [module]\n };\n } else {\n config = self.setModuleConfig(module);\n }\n }\n\n if (config === null) {\n var moduleName = self._getModuleName(module);\n errText = \"Module \\\"\" + (moduleName || \"unknown\") + \"\\\" is not configured, cannot load.\";\n $delegate._$log.error(errText);\n deferred.reject(new Error(errText));\n return deferred.promise;\n } else {\n // deprecated\n if (angular.isDefined(config.template)) {\n if (angular.isUndefined(config.files)) {\n config.files = [];\n }\n if (angular.isString(config.template)) {\n config.files.push(config.template);\n } else if (angular.isArray(config.template)) {\n config.files.concat(config.template);\n }\n }\n }\n\n var localParams = angular.extend({}, params, config);\n\n // if someone used an external loader and called the load function with just the module name\n if (angular.isUndefined(config.files) && angular.isDefined(config.name) && $delegate.moduleExists(config.name)) {\n return $delegate.inject(config.name, localParams);\n }\n\n $delegate.filesLoader(config, localParams).then(function () {\n $delegate.inject(null, localParams).then(function (res) {\n deferred.resolve(res);\n }, function (err) {\n deferred.reject(err);\n });\n }, function (err) {\n deferred.reject(err);\n });\n\n return deferred.promise;\n };\n\n // return the patched service\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n \"use strict\";\n\n angular.module(\"oc.lazyLoad\").config([\"$provide\", function ($provide) {\n $provide.decorator(\"$ocLazyLoad\", [\"$delegate\", \"$q\", function ($delegate, $q) {\n /**\r\n * cssLoader function\r\n * @type Function\r\n * @param paths array list of css files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters\r\n * because the user can overwrite cssLoader and it will probably not use promises :(\r\n */\n $delegate.cssLoader = function (paths, callback, params) {\n var promises = [];\n angular.forEach(paths, function (path) {\n promises.push($delegate.buildElement(\"css\", path, params));\n });\n $q.all(promises).then(function () {\n callback();\n }, function (err) {\n callback(err);\n });\n };\n $delegate.cssLoader.ocLazyLoadLoader = true;\n\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n \"use strict\";\n\n angular.module(\"oc.lazyLoad\").config([\"$provide\", function ($provide) {\n $provide.decorator(\"$ocLazyLoad\", [\"$delegate\", \"$q\", function ($delegate, $q) {\n /**\r\n * jsLoader function\r\n * @type Function\r\n * @param paths array list of js files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters\r\n * because the user can overwrite jsLoader and it will probably not use promises :(\r\n */\n $delegate.jsLoader = function (paths, callback, params) {\n var promises = [];\n angular.forEach(paths, function (path) {\n promises.push($delegate.buildElement(\"js\", path, params));\n });\n $q.all(promises).then(function () {\n callback();\n }, function (err) {\n callback(err);\n });\n };\n $delegate.jsLoader.ocLazyLoadLoader = true;\n\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n \"use strict\";\n\n angular.module(\"oc.lazyLoad\").config([\"$provide\", function ($provide) {\n $provide.decorator(\"$ocLazyLoad\", [\"$delegate\", \"$templateCache\", \"$q\", \"$http\", function ($delegate, $templateCache, $q, $http) {\n /**\r\n * templatesLoader function\r\n * @type Function\r\n * @param paths array list of css files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters for $http\r\n * because the user can overwrite templatesLoader and it will probably not use promises :(\r\n */\n $delegate.templatesLoader = function (paths, callback, params) {\n var promises = [],\n filesCache = $delegate._getFilesCache();\n\n angular.forEach(paths, function (url) {\n var deferred = $q.defer();\n promises.push(deferred.promise);\n $http.get(url, params).success(function (data) {\n if (angular.isString(data) && data.length > 0) {\n angular.forEach(angular.element(data), function (node) {\n if (node.nodeName === \"SCRIPT\" && node.type === \"text/ng-template\") {\n $templateCache.put(node.id, node.innerHTML);\n }\n });\n }\n if (angular.isUndefined(filesCache.get(url))) {\n filesCache.put(url, true);\n }\n deferred.resolve();\n }).error(function (err) {\n deferred.reject(new Error(\"Unable to load template file \\\"\" + url + \"\\\": \" + err));\n });\n });\n return $q.all(promises).then(function () {\n callback();\n }, function (err) {\n callback(err);\n });\n };\n $delegate.templatesLoader.ocLazyLoadLoader = true;\n\n return $delegate;\n }]);\n }]);\n})(angular);\n// Array.indexOf polyfill for IE8\nif (!Array.prototype.indexOf) {\n Array.prototype.indexOf = function (searchElement, fromIndex) {\n var k;\n\n // 1. Let O be the result of calling ToObject passing\n // the this value as the argument.\n if (this == null) {\n throw new TypeError(\"\\\"this\\\" is null or not defined\");\n }\n\n var O = Object(this);\n\n // 2. Let lenValue be the result of calling the Get\n // internal method of O with the argument \"length\".\n // 3. Let len be ToUint32(lenValue).\n var len = O.length >>> 0;\n\n // 4. If len is 0, return -1.\n if (len === 0) {\n return -1;\n }\n\n // 5. If argument fromIndex was passed let n be\n // ToInteger(fromIndex); else let n be 0.\n var n = +fromIndex || 0;\n\n if (Math.abs(n) === Infinity) {\n n = 0;\n }\n\n // 6. If n >= len, return -1.\n if (n >= len) {\n return -1;\n }\n\n // 7. If n >= 0, then Let k be n.\n // 8. Else, n<0, Let k be len - abs(n).\n // If k is less than 0, then let k be 0.\n k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\n\n // 9. Repeat, while k < len\n while (k < len) {\n // a. Let Pk be ToString(k).\n // This is implicit for LHS operands of the in operator\n // b. Let kPresent be the result of calling the\n // HasProperty internal method of O with argument Pk.\n // This step can be combined with c\n // c. If kPresent is true, then\n // i. Let elementK be the result of calling the Get\n // internal method of O with the argument ToString(k).\n // ii. Let same be the result of applying the\n // Strict Equality Comparison Algorithm to\n // searchElement and elementK.\n // iii. If same is true, return k.\n if (k in O && O[k] === searchElement) {\n return k;\n }\n k++;\n }\n return -1;\n };\n}\n//# sourceMappingURL=ocLazyLoad.js.map"],"sourceRoot":"/source/"} \ No newline at end of file +{"version":3,"sources":["ocLazyLoad.js"],"names":["angular","window","regModules","regInvokes","regConfigs","modulesToLoad","recordDeclarations","broadcast","noop","runBlocks","justLoaded","ocLazyLoad","module","provider","$controllerProvider","$provide","$compileProvider","$filterProvider","$injector","$animateProvider","_register","providers","registerModules","params","k","moduleName","moduleFn","tempRunBlocks","length","isString","getModuleName","indexOf","newModule","ngModuleFct","push","requires","_runBlocks","shift","isDefined","rerun","concat","_invokeQueue","reconfig","_configBlocks","pop","instanceInjector","getInstanceInjector","forEach","fn","invoke","_registerInvokeList","args","signature","data","isArray","hashCode","toString","isObject","stringify","invokeList","type","newInvoke","isUndefined","onInvoke","invokeName","hasOwnProperty","key","queue","i","len","Error","isNew","apply","callInvoke","fct","invoked","isFunction","j","jlen","name","moduleExists","e","test","message","modules","debug","events","moduleCache","value","this","Array","prototype","arguments","config","moduleConfig","_init","element","elements","names","NG_APP_CLASS_REGEXP","append","elm","document","getElementById","replace","querySelectorAll","className","match","exec","attributes","attr","jasmine","mocha","mock","console","error","addReg","mainModule","obj","cache","JSON","str","chr","hash","charCodeAt","$get","$log","$rootElement","$rootScope","$cacheFactory","$q","reject","deferred","defer","promise","filesCache","warn","info","injector","eventName","$broadcast","_broadcast","_$log","_getFilesCache","toggleWatch","watch","getModuleConfig","copy","setModuleConfig","getModules","isLoaded","modulesNames","moduleLoaded","_getModuleName","_getModule","_loadDependencies","localParams","loadedModule","diff","promisesList","self","when","getRequires","requireEntry","files","filter","n","filesLoader","then","all","inject","undefined","_addToLoadList","res","slice","loadNext","resolve","err","requireModule","bootstrapFct","bootstrap","force","configFn","directive","$ocLazyLoad","$compile","$animate","$parse","restrict","terminal","priority","compile","content","innerHTML","html","$scope","$element","$attr","model","$watch","load","enter","contents","nodeType","decorator","$delegate","$window","$interval","uaCssChecked","useCssLoadPatch","anchor","getElementsByTagName","buildElement","path","el","loaded","cacheBuster","url","dc","Date","getTime","substring","get","put","createElement","rel","href","src","remove","onload","onreadystatechange","readyState","onerror","async","serie","insertBeforeElem","lastChild","insertBefore","jQuery","querySelector","parentNode","ua","navigator","userAgent","toLowerCase","platform","v","appVersion","iOSVersion","parseFloat","parseInt","join","androidVersion","versionMatch","tries","interval","sheet","cssRules","cancel","cssFiles","templatesFiles","jsFiles","promises","cachePromise","extend","pushFile","m","file_type","substr","jsLoader","cssDeferred","cssLoader","templatesDeferred","templatesLoader","jsDeferred","originalModule","errText","originalParams","deferredList","template","paths","callback","ocLazyLoadLoader","$templateCache","$http","success","node","nodeName","id","searchElement","fromIndex","TypeError","O","Object","Infinity","Math","abs","max"],"mappings":"CAOA,SAAWA,EAASC,GAChB,YAEA,IAAIC,IAAc,KAAM,eACpBC,KACAC,KACAC,KACAC,KACAC,EAAYP,EAAQQ,KACpBC,KACAC,KAEAC,EAAaX,EAAQY,OAAO,eAAgB,MAEhDD,GAAWE,SAAS,eAAgB,sBAAuB,WAAY,mBAAoB,kBAAmB,YAAa,mBAAoB,SAAUC,EAAqBC,EAAUC,EAAkBC,EAAiBC,EAAWC,GAgJlO,QAASC,GAAUC,EAAWC,EAAiBC,GAC3C,GAAID,EAAiB,CACjB,GAAIE,GACAC,EACAC,EACAC,IACJ,KAAKH,EAAIF,EAAgBM,OAAS,EAAGJ,GAAK,EAAGA,IAKzC,GAJAC,EAAaH,EAAgBE,GACxBxB,EAAQ6B,SAASJ,KAClBA,EAAaK,EAAcL,IAE1BA,GAAiD,KAAnCf,EAAWqB,QAAQN,GAAtC,CAGA,GAAIO,GAA+C,KAAnC9B,EAAW6B,QAAQN,EAOnC,IANAC,EAAWO,EAAYR,GACnBO,IAEA9B,EAAWgC,KAAKT,GAChBL,EAAUC,EAAWK,EAASS,SAAUZ,IAExCG,EAASU,WAAWR,OAAS,EAG7B,IADAnB,EAAUgB,MACHC,EAASU,WAAWR,OAAS,GAChCnB,EAAUgB,GAAYS,KAAKR,EAASU,WAAWC,QAGnDrC,GAAQsC,UAAU7B,EAAUgB,MAAiBO,GAAaT,EAAOgB,SACjEZ,EAAgBA,EAAca,OAAO/B,EAAUgB,KAEnDgB,EAAapB,EAAWK,EAASe,aAAchB,EAAYF,EAAOmB,UAClED,EAAapB,EAAWK,EAASiB,cAA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Q8D,YAAYyE,EAAWuF,IAAIL,KACnClF,EAAWwF,IAAIN,GAAK,GAExBrF,EAAS4C,YACV7D,MAAM,SAAU8D,GACf7C,EAASD,OAAO,GAAI7D,OAAM,iCAAoCmJ,EAAM,MAASxC,QAG9E/C,EAAGuC,IAAI6F,GAAU9F,KAAK,WACzBiH,KACD,SAAUxG,GACTwG,EAASxG,MAGjB4B,EAAUoE,gBAAgBS,kBAAmB,EAEtC7E,SAGhB7M,SAEE0F,MAAMC,UAAU5D,UACb2D,MAAMC,UAAU5D,QAAU,SAAUkQ,EAAeC,GAC3C,GAAI1Q,EAIJ,IAAY,MAARiE,KACI,KAAM,IAAI0M,WAAU,gCAG5B,IAAIC,GAAIC,OAAO5M,MAKXpB,EAAM+N,EAAExQ,SAAW,CAGvB,IAAY,IAARyC,EACI,MAAO,EAKf,IAAIiG,IAAK4H,GAAa,CAOtB,IALoBI,MAAhBC,KAAKC,IAAIlI,KACLA,EAAI,GAIRA,GAAKjG,EACD,MAAO,EASf,KAHA7C,EAAI+Q,KAAKE,IAAInI,GAAK,EAAIA,EAAIjG,EAAMkO,KAAKC,IAAIlI,GAAI,GAGlCjG,EAAJ7C,GAAS,CAaR,GAAIA,IAAK4Q,IAAKA,EAAE5Q,KAAOyQ,EACf,MAAOzQ,EAEfA,KAER,MAAO","file":"ocLazyLoad.min.js","sourcesContent":["/**\n * oclazyload - Load modules on demand (lazy load) with angularJS\n * @version v1.0.1\n * @link https://github.com/ocombe/ocLazyLoad\n * @license MIT\n * @author Olivier Combe \n */\n(function (angular, window) {\n \"use strict\";\n\n var regModules = [\"ng\", \"oc.lazyLoad\"],\n regInvokes = {},\n regConfigs = [],\n modulesToLoad = [],\n recordDeclarations = [],\n broadcast = angular.noop,\n runBlocks = {},\n justLoaded = [];\n\n var ocLazyLoad = angular.module(\"oc.lazyLoad\", [\"ng\"]);\n\n ocLazyLoad.provider(\"$ocLazyLoad\", [\"$controllerProvider\", \"$provide\", \"$compileProvider\", \"$filterProvider\", \"$injector\", \"$animateProvider\", function ($controllerProvider, $provide, $compileProvider, $filterProvider, $injector, $animateProvider) {\n var modules = {},\n providers = {\n $controllerProvider: $controllerProvider,\n $compileProvider: $compileProvider,\n $filterProvider: $filterProvider,\n $provide: $provide, // other things (constant, decorator, provider, factory, service)\n $injector: $injector,\n $animateProvider: $animateProvider\n },\n debug = false,\n events = false,\n moduleCache = [];\n\n moduleCache.push = function (value) {\n if (this.indexOf(value) === -1) {\n Array.prototype.push.apply(this, arguments);\n }\n };\n\n this.config = function (config) {\n // If we want to define modules configs\n if (angular.isDefined(config.modules)) {\n if (angular.isArray(config.modules)) {\n angular.forEach(config.modules, function (moduleConfig) {\n modules[moduleConfig.name] = moduleConfig;\n });\n } else {\n modules[config.modules.name] = config.modules;\n }\n }\n\n if (angular.isDefined(config.debug)) {\n debug = config.debug;\n }\n\n if (angular.isDefined(config.events)) {\n events = config.events;\n }\n };\n\n /**\n * Get the list of existing registered modules\n * @param element\n */\n this._init = function _init(element) {\n // this is probably useless now because we override angular.bootstrap\n if (modulesToLoad.length === 0) {\n var elements = [element],\n names = [\"ng:app\", \"ng-app\", \"x-ng-app\", \"data-ng-app\"],\n NG_APP_CLASS_REGEXP = /\\sng[:\\-]app(:\\s*([\\w\\d_]+);?)?\\s/,\n append = function append(elm) {\n return elm && elements.push(elm);\n };\n\n angular.forEach(names, function (name) {\n names[name] = true;\n append(document.getElementById(name));\n name = name.replace(\":\", \"\\\\:\");\n if (element[0].querySelectorAll) {\n angular.forEach(element[0].querySelectorAll(\".\" + name), append);\n angular.forEach(element[0].querySelectorAll(\".\" + name + \"\\\\:\"), append);\n angular.forEach(element[0].querySelectorAll(\"[\" + name + \"]\"), append);\n }\n });\n\n angular.forEach(elements, function (elm) {\n if (modulesToLoad.length === 0) {\n var className = \" \" + element.className + \" \";\n var match = NG_APP_CLASS_REGEXP.exec(className);\n if (match) {\n modulesToLoad.push((match[2] || \"\").replace(/\\s+/g, \",\"));\n } else {\n angular.forEach(elm.attributes, function (attr) {\n if (modulesToLoad.length === 0 && names[attr.name]) {\n modulesToLoad.push(attr.value);\n }\n });\n }\n }\n });\n }\n\n if (modulesToLoad.length === 0 && !((window.jasmine || window.mocha) && angular.isDefined(angular.mock))) {\n console.error(\"No module found during bootstrap, unable to init ocLazyLoad. You should always use the ng-app directive or angular.boostrap when you use ocLazyLoad.\");\n }\n\n var addReg = function addReg(moduleName) {\n if (regModules.indexOf(moduleName) === -1) {\n // register existing modules\n regModules.push(moduleName);\n var mainModule = angular.module(moduleName);\n\n // register existing components (directives, services, ...)\n _invokeQueue(null, mainModule._invokeQueue, moduleName);\n _invokeQueue(null, mainModule._configBlocks, moduleName); // angular 1.3+\n\n angular.forEach(mainModule.requires, addReg);\n }\n };\n\n angular.forEach(modulesToLoad, function (moduleName) {\n addReg(moduleName);\n });\n\n modulesToLoad = []; // reset for next bootstrap\n recordDeclarations.pop(); // wait for the next lazy load\n };\n\n /**\n * Like JSON.stringify but that doesn't throw on circular references\n * @param obj\n */\n var stringify = function stringify(obj) {\n var cache = [];\n return JSON.stringify(obj, function (key, value) {\n if (angular.isObject(value) && value !== null) {\n if (cache.indexOf(value) !== -1) {\n // Circular reference found, discard key\n return;\n }\n // Store value in our collection\n cache.push(value);\n }\n return value;\n });\n };\n\n var hashCode = function hashCode(str) {\n var hash = 0,\n i,\n chr,\n len;\n if (str.length == 0) {\n return hash;\n }\n for (i = 0, len = str.length; i < len; i++) {\n chr = str.charCodeAt(i);\n hash = (hash << 5) - hash + chr;\n hash |= 0; // Convert to 32bit integer\n }\n return hash;\n };\n\n function _register(providers, registerModules, params) {\n if (registerModules) {\n var k,\n moduleName,\n moduleFn,\n tempRunBlocks = [];\n for (k = registerModules.length - 1; k >= 0; k--) {\n moduleName = registerModules[k];\n if (!angular.isString(moduleName)) {\n moduleName = getModuleName(moduleName);\n }\n if (!moduleName || justLoaded.indexOf(moduleName) !== -1) {\n continue;\n }\n var newModule = regModules.indexOf(moduleName) === -1;\n moduleFn = ngModuleFct(moduleName);\n if (newModule) {\n // new module\n regModules.push(moduleName);\n _register(providers, moduleFn.requires, params);\n }\n if (moduleFn._runBlocks.length > 0) {\n // new run blocks detected! Replace the old ones (if existing)\n runBlocks[moduleName] = [];\n while (moduleFn._runBlocks.length > 0) {\n runBlocks[moduleName].push(moduleFn._runBlocks.shift());\n }\n }\n if (angular.isDefined(runBlocks[moduleName]) && (newModule || params.rerun)) {\n tempRunBlocks = tempRunBlocks.concat(runBlocks[moduleName]);\n }\n _invokeQueue(providers, moduleFn._invokeQueue, moduleName, params.reconfig);\n _invokeQueue(providers, moduleFn._configBlocks, moduleName, params.reconfig); // angular 1.3+\n broadcast(newModule ? \"ocLazyLoad.moduleLoaded\" : \"ocLazyLoad.moduleReloaded\", moduleName);\n registerModules.pop();\n justLoaded.push(moduleName);\n }\n // execute the run blocks at the end\n var instanceInjector = providers.getInstanceInjector();\n angular.forEach(tempRunBlocks, function (fn) {\n instanceInjector.invoke(fn);\n });\n }\n }\n\n function _registerInvokeList(args, moduleName) {\n var invokeList = args[2][0],\n type = args[1],\n newInvoke = false;\n if (angular.isUndefined(regInvokes[moduleName])) {\n regInvokes[moduleName] = {};\n }\n if (angular.isUndefined(regInvokes[moduleName][type])) {\n regInvokes[moduleName][type] = {};\n }\n var onInvoke = function onInvoke(invokeName, signature) {\n if (!regInvokes[moduleName][type].hasOwnProperty(invokeName)) {\n regInvokes[moduleName][type][invokeName] = [];\n }\n if (regInvokes[moduleName][type][invokeName].indexOf(signature) === -1) {\n newInvoke = true;\n regInvokes[moduleName][type][invokeName].push(signature);\n broadcast(\"ocLazyLoad.componentLoaded\", [moduleName, type, invokeName]);\n }\n };\n\n function signature(data) {\n if (angular.isArray(data)) {\n // arrays are objects, we need to test for it first\n return hashCode(data.toString());\n } else if (angular.isObject(data)) {\n // constants & values for example\n return hashCode(stringify(data));\n } else {\n if (angular.isDefined(data) && data !== null) {\n return hashCode(data.toString());\n } else {\n // null & undefined constants\n return data;\n }\n }\n }\n\n if (angular.isString(invokeList)) {\n onInvoke(invokeList, signature(args[2][1]));\n } else if (angular.isObject(invokeList)) {\n angular.forEach(invokeList, function (invoke, key) {\n if (angular.isString(invoke)) {\n // decorators for example\n onInvoke(invoke, signature(invokeList[1]));\n } else {\n // components registered as object lists {\"componentName\": function() {}}\n onInvoke(key, signature(invoke));\n }\n });\n } else {\n return false;\n }\n return newInvoke;\n }\n\n function _invokeQueue(providers, queue, moduleName, reconfig) {\n if (!queue) {\n return;\n }\n\n var i, len, args, provider;\n for (i = 0, len = queue.length; i < len; i++) {\n args = queue[i];\n if (angular.isArray(args)) {\n if (providers !== null) {\n if (providers.hasOwnProperty(args[0])) {\n provider = providers[args[0]];\n } else {\n throw new Error(\"unsupported provider \" + args[0]);\n }\n }\n var isNew = _registerInvokeList(args, moduleName);\n if (args[1] !== \"invoke\") {\n if (isNew && angular.isDefined(provider)) {\n provider[args[1]].apply(provider, args[2]);\n }\n } else {\n // config block\n var callInvoke = function callInvoke(fct) {\n var invoked = regConfigs.indexOf(\"\" + moduleName + \"-\" + fct);\n if (invoked === -1 || reconfig) {\n if (invoked === -1) {\n regConfigs.push(\"\" + moduleName + \"-\" + fct);\n }\n if (angular.isDefined(provider)) {\n provider[args[1]].apply(provider, args[2]);\n }\n }\n };\n if (angular.isFunction(args[2][0])) {\n callInvoke(args[2][0]);\n } else if (angular.isArray(args[2][0])) {\n for (var j = 0, jlen = args[2][0].length; j < jlen; j++) {\n if (angular.isFunction(args[2][0][j])) {\n callInvoke(args[2][0][j]);\n }\n }\n }\n }\n }\n }\n }\n\n function getModuleName(module) {\n var moduleName = null;\n if (angular.isString(module)) {\n moduleName = module;\n } else if (angular.isObject(module) && module.hasOwnProperty(\"name\") && angular.isString(module.name)) {\n moduleName = module.name;\n }\n return moduleName;\n }\n\n function moduleExists(moduleName) {\n if (!angular.isString(moduleName)) {\n return false;\n }\n try {\n return ngModuleFct(moduleName);\n } catch (e) {\n if (/No module/.test(e) || e.message.indexOf(\"$injector:nomod\") > -1) {\n return false;\n }\n }\n }\n\n this.$get = [\"$log\", \"$rootElement\", \"$rootScope\", \"$cacheFactory\", \"$q\", function ($log, $rootElement, $rootScope, $cacheFactory, $q) {\n var instanceInjector,\n filesCache = $cacheFactory(\"ocLazyLoad\");\n\n if (!debug) {\n $log = {};\n $log.error = angular.noop;\n $log.warn = angular.noop;\n $log.info = angular.noop;\n }\n\n // Make this lazy because when $get() is called the instance injector hasn't been assigned to the rootElement yet\n providers.getInstanceInjector = function () {\n return instanceInjector ? instanceInjector : instanceInjector = $rootElement.data(\"$injector\") || angular.injector();\n };\n\n broadcast = function broadcast(eventName, params) {\n if (events) {\n $rootScope.$broadcast(eventName, params);\n }\n if (debug) {\n $log.info(eventName, params);\n }\n };\n\n function reject(e) {\n var deferred = $q.defer();\n $log.error(e.message);\n deferred.reject(e);\n return deferred.promise;\n }\n\n return {\n _broadcast: broadcast,\n\n _$log: $log,\n\n /**\n * Returns the files cache used by the loaders to store the files currently loading\n * @returns {*}\n */\n _getFilesCache: function getFilesCache() {\n return filesCache;\n },\n\n /**\n * Let the service know that it should monitor angular.module because files are loading\n * @param watch boolean\n */\n toggleWatch: function toggleWatch(watch) {\n if (watch) {\n recordDeclarations.push(true);\n } else {\n recordDeclarations.pop();\n }\n },\n\n /**\n * Let you get a module config object\n * @param moduleName String the name of the module\n * @returns {*}\n */\n getModuleConfig: function getModuleConfig(moduleName) {\n if (!angular.isString(moduleName)) {\n throw new Error(\"You need to give the name of the module to get\");\n }\n if (!modules[moduleName]) {\n return null;\n }\n return angular.copy(modules[moduleName]);\n },\n\n /**\n * Let you define a module config object\n * @param moduleConfig Object the module config object\n * @returns {*}\n */\n setModuleConfig: function setModuleConfig(moduleConfig) {\n if (!angular.isObject(moduleConfig)) {\n throw new Error(\"You need to give the module config object to set\");\n }\n modules[moduleConfig.name] = moduleConfig;\n return moduleConfig;\n },\n\n /**\n * Returns the list of loaded modules\n * @returns {string[]}\n */\n getModules: function () {\n return regModules;\n },\n\n /**\n * Let you check if a module has been loaded into Angular or not\n * @param modulesNames String/Object a module name, or a list of module names\n * @returns {boolean}\n */\n isLoaded: function isLoaded(modulesNames) {\n var moduleLoaded = function moduleLoaded(module) {\n var isLoaded = regModules.indexOf(module) > -1;\n if (!isLoaded) {\n isLoaded = !!moduleExists(module);\n }\n return isLoaded;\n };\n if (angular.isString(modulesNames)) {\n modulesNames = [modulesNames];\n }\n if (angular.isArray(modulesNames)) {\n var i, len;\n for (i = 0, len = modulesNames.length; i < len; i++) {\n if (!moduleLoaded(modulesNames[i])) {\n return false;\n }\n }\n return true;\n } else {\n throw new Error(\"You need to define the module(s) name(s)\");\n }\n },\n\n /**\n * Given a module, return its name\n * @param module\n * @returns {String}\n */\n _getModuleName: getModuleName,\n\n /**\n * Returns a module if it exists\n * @param moduleName\n * @returns {module}\n */\n _getModule: function getModule(moduleName) {\n try {\n return ngModuleFct(moduleName);\n } catch (e) {\n // this error message really suxx\n if (/No module/.test(e) || e.message.indexOf(\"$injector:nomod\") > -1) {\n e.message = \"The module \\\"\" + stringify(moduleName) + \"\\\" that you are trying to load does not exist. \" + e.message;\n }\n throw e;\n }\n },\n\n /**\n * Check if a module exists and returns it if it does\n * @param moduleName\n * @returns {boolean}\n */\n moduleExists: moduleExists,\n\n /**\n * Load the dependencies, and might try to load new files depending on the config\n * @param moduleName (String or Array of Strings)\n * @param localParams\n * @returns {*}\n * @private\n */\n _loadDependencies: function _loadDependencies(moduleName, localParams) {\n var loadedModule,\n requires,\n diff,\n promisesList = [],\n self = this;\n\n moduleName = self._getModuleName(moduleName);\n\n if (moduleName === null) {\n return $q.when();\n } else {\n try {\n loadedModule = self._getModule(moduleName);\n } catch (e) {\n return reject(e);\n }\n // get unloaded requires\n requires = self.getRequires(loadedModule);\n }\n\n angular.forEach(requires, function (requireEntry) {\n // If no configuration is provided, try and find one from a previous load.\n // If there isn't one, bail and let the normal flow run\n if (angular.isString(requireEntry)) {\n var config = self.getModuleConfig(requireEntry);\n if (config === null) {\n moduleCache.push(requireEntry); // We don't know about this module, but something else might, so push it anyway.\n return;\n }\n requireEntry = config;\n }\n\n // Check if this dependency has been loaded previously\n if (self.moduleExists(requireEntry.name)) {\n // compare against the already loaded module to see if the new definition adds any new files\n diff = requireEntry.files.filter(function (n) {\n return self.getModuleConfig(requireEntry.name).files.indexOf(n) < 0;\n });\n\n // If the module was redefined, advise via the console\n if (diff.length !== 0) {\n self._$log.warn(\"Module \\\"\", moduleName, \"\\\" attempted to redefine configuration for dependency. \\\"\", requireEntry.name, \"\\\"\\n Additional Files Loaded:\", diff);\n }\n\n // Push everything to the file loader, it will weed out the duplicates.\n if (angular.isDefined(self.filesLoader)) {\n // if a files loader is defined\n promisesList.push(self.filesLoader(requireEntry, localParams).then(function () {\n return self._loadDependencies(requireEntry);\n }));\n } else {\n return reject(new Error(\"Error: New dependencies need to be loaded from external files (\" + requireEntry.files + \"), but no loader has been defined.\"));\n }\n return;\n } else if (angular.isArray(requireEntry)) {\n requireEntry = {\n files: requireEntry\n };\n } else if (angular.isObject(requireEntry)) {\n if (requireEntry.hasOwnProperty(\"name\") && requireEntry.name) {\n // The dependency doesn't exist in the module cache and is a new configuration, so store and push it.\n self.setModuleConfig(requireEntry);\n moduleCache.push(requireEntry.name);\n }\n }\n\n // Check if the dependency has any files that need to be loaded. If there are, push a new promise to the promise list.\n if (angular.isDefined(requireEntry.files) && requireEntry.files.length !== 0) {\n if (angular.isDefined(self.filesLoader)) {\n // if a files loader is defined\n promisesList.push(self.filesLoader(requireEntry, localParams).then(function () {\n return self._loadDependencies(requireEntry);\n }));\n } else {\n return reject(new Error(\"Error: the module \\\"\" + requireEntry.name + \"\\\" is defined in external files (\" + requireEntry.files + \"), but no loader has been defined.\"));\n }\n }\n });\n\n // Create a wrapper promise to watch the promise list and resolve it once everything is done.\n return $q.all(promisesList);\n },\n\n /**\n * Inject new modules into Angular\n * @param moduleName\n * @param localParams\n */\n inject: function inject(moduleName) {\n var localParams = arguments[1] === undefined ? {} : arguments[1];\n\n var self = this,\n deferred = $q.defer();\n if (angular.isDefined(moduleName) && moduleName !== null) {\n if (angular.isArray(moduleName)) {\n var promisesList = [];\n angular.forEach(moduleName, function (module) {\n promisesList.push(self.inject(module));\n });\n return $q.all(promisesList);\n } else {\n self._addToLoadList(self._getModuleName(moduleName), true);\n }\n }\n if (modulesToLoad.length > 0) {\n var res = modulesToLoad.slice(); // clean copy\n var loadNext = function loadNext(moduleName) {\n moduleCache.push(moduleName);\n self._loadDependencies(moduleName, localParams).then(function success() {\n try {\n justLoaded = [];\n _register(providers, moduleCache, localParams);\n } catch (e) {\n self._$log.error(e.message);\n deferred.reject(e);\n return;\n }\n\n if (modulesToLoad.length > 0) {\n loadNext(modulesToLoad.shift()); // load the next in list\n } else {\n deferred.resolve(res); // everything has been loaded, resolve\n }\n }, function error(err) {\n deferred.reject(err);\n });\n };\n\n // load the first in list\n loadNext(modulesToLoad.shift());\n } else {\n deferred.resolve();\n }\n return deferred.promise;\n },\n\n /**\n * Get the list of required modules/services/... for this module\n * @param module\n * @returns {Array}\n */\n getRequires: function getRequires(module) {\n var requires = [];\n angular.forEach(module.requires, function (requireModule) {\n if (regModules.indexOf(requireModule) === -1) {\n requires.push(requireModule);\n }\n });\n return requires;\n },\n\n /**\n * Invoke the new modules & component by their providers\n * @param providers\n * @param queue\n * @param moduleName\n * @param reconfig\n * @private\n */\n _invokeQueue: _invokeQueue,\n\n /**\n * Check if a module has been invoked and registers it if not\n * @param args\n * @param moduleName\n * @returns {boolean} is new\n */\n _registerInvokeList: _registerInvokeList,\n\n /**\n * Register a new module and loads it, executing the run/config blocks if needed\n * @param providers\n * @param registerModules\n * @param params\n * @private\n */\n _register: _register,\n\n /**\n * Add a module name to the list of modules that will be loaded in the next inject\n * @param name\n * @param force\n * @private\n */\n _addToLoadList: _addToLoadList\n };\n }];\n\n // Let's get the list of loaded modules & components\n this._init(angular.element(window.document));\n }]);\n\n var bootstrapFct = angular.bootstrap;\n angular.bootstrap = function (element, modules, config) {\n // we use slice to make a clean copy\n angular.forEach(modules.slice(), function (module) {\n _addToLoadList(module, true);\n });\n return bootstrapFct(element, modules, config);\n };\n\n var _addToLoadList = function _addToLoadList(name, force) {\n if ((recordDeclarations.length > 0 || force) && angular.isString(name) && modulesToLoad.indexOf(name) === -1) {\n modulesToLoad.push(name);\n }\n };\n\n var ngModuleFct = angular.module;\n angular.module = function (name, requires, configFn) {\n _addToLoadList(name);\n return ngModuleFct(name, requires, configFn);\n };\n})(angular, window);\n(function (angular) {\n \"use strict\";\n\n angular.module(\"oc.lazyLoad\").directive(\"ocLazyLoad\", [\"$ocLazyLoad\", \"$compile\", \"$animate\", \"$parse\", function ($ocLazyLoad, $compile, $animate, $parse) {\n return {\n restrict: \"A\",\n terminal: true,\n priority: 1000,\n compile: function compile(element, attrs) {\n // we store the content and remove it before compilation\n var content = element[0].innerHTML;\n element.html(\"\");\n\n return function ($scope, $element, $attr) {\n var model = $parse($attr.ocLazyLoad);\n $scope.$watch(function () {\n return model($scope) || $attr.ocLazyLoad; // it can be a module name (string), an object, an array, or a scope reference to any of this\n }, function (moduleName) {\n if (angular.isDefined(moduleName)) {\n $ocLazyLoad.load(moduleName).then(function () {\n $animate.enter(content, $element);\n var contents = element.contents();\n angular.forEach(contents, function (content) {\n if (content.nodeType !== 3) {\n // 3 is a text node\n $compile(content)($scope);\n }\n });\n });\n }\n }, true);\n };\n }\n };\n }]);\n})(angular);\n(function (angular) {\n \"use strict\";\n\n angular.module(\"oc.lazyLoad\").config([\"$provide\", function ($provide) {\n $provide.decorator(\"$ocLazyLoad\", [\"$delegate\", \"$q\", \"$window\", \"$interval\", function ($delegate, $q, $window, $interval) {\n var uaCssChecked = false,\n useCssLoadPatch = false,\n anchor = $window.document.getElementsByTagName(\"head\")[0] || $window.document.getElementsByTagName(\"body\")[0];\n\n /**\n * Load a js/css file\n * @param type\n * @param path\n * @param params\n * @returns promise\n */\n $delegate.buildElement = function buildElement(type, path, params) {\n var deferred = $q.defer(),\n el,\n loaded,\n filesCache = $delegate._getFilesCache(),\n cacheBuster = function cacheBuster(url) {\n var dc = new Date().getTime();\n if (url.indexOf(\"?\") >= 0) {\n if (url.substring(0, url.length - 1) === \"&\") {\n return \"\" + url + \"_dc=\" + dc;\n }\n return \"\" + url + \"&_dc=\" + dc;\n } else {\n return \"\" + url + \"?_dc=\" + dc;\n }\n };\n\n // Store the promise early so the file load can be detected by other parallel lazy loads\n // (ie: multiple routes on one page) a 'true' value isn't sufficient\n // as it causes false positive load results.\n if (angular.isUndefined(filesCache.get(path))) {\n filesCache.put(path, deferred.promise);\n }\n\n // Switch in case more content types are added later\n switch (type) {\n case \"css\":\n el = $window.document.createElement(\"link\");\n el.type = \"text/css\";\n el.rel = \"stylesheet\";\n el.href = params.cache === false ? cacheBuster(path) : path;\n break;\n case \"js\":\n el = $window.document.createElement(\"script\");\n el.src = params.cache === false ? cacheBuster(path) : path;\n break;\n default:\n filesCache.remove(path);\n deferred.reject(new Error(\"Requested type \\\"\" + type + \"\\\" is not known. Could not inject \\\"\" + path + \"\\\"\"));\n break;\n }\n el.onload = el.onreadystatechange = function (e) {\n if (el.readyState && !/^c|loade/.test(el.readyState) || loaded) return;\n el.onload = el.onreadystatechange = null;\n loaded = 1;\n $delegate._broadcast(\"ocLazyLoad.fileLoaded\", path);\n deferred.resolve();\n };\n el.onerror = function () {\n filesCache.remove(path);\n deferred.reject(new Error(\"Unable to load \" + path));\n };\n el.async = params.serie ? 0 : 1;\n\n var insertBeforeElem = anchor.lastChild;\n if (params.insertBefore) {\n var element = angular.element(angular.isDefined(window.jQuery) ? params.insertBefore : document.querySelector(params.insertBefore));\n if (element && element.length > 0) {\n insertBeforeElem = element[0];\n }\n }\n insertBeforeElem.parentNode.insertBefore(el, insertBeforeElem);\n\n /*\n The event load or readystatechange doesn't fire in:\n - iOS < 6 (default mobile browser)\n - Android < 4.4 (default mobile browser)\n - Safari < 6 (desktop browser)\n */\n if (type == \"css\") {\n if (!uaCssChecked) {\n var ua = $window.navigator.userAgent.toLowerCase();\n\n // iOS < 6\n if (/iP(hone|od|ad)/.test($window.navigator.platform)) {\n var v = $window.navigator.appVersion.match(/OS (\\d+)_(\\d+)_?(\\d+)?/);\n var iOSVersion = parseFloat([parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)].join(\".\"));\n useCssLoadPatch = iOSVersion < 6;\n } else if (ua.indexOf(\"android\") > -1) {\n // Android < 4.4\n var androidVersion = parseFloat(ua.slice(ua.indexOf(\"android\") + 8));\n useCssLoadPatch = androidVersion < 4.4;\n } else if (ua.indexOf(\"safari\") > -1) {\n var versionMatch = ua.match(/version\\/([\\.\\d]+)/i);\n useCssLoadPatch = versionMatch && versionMatch[1] && parseFloat(versionMatch[1]) < 6;\n }\n }\n\n if (useCssLoadPatch) {\n var tries = 1000; // * 20 = 20000 miliseconds\n var interval = $interval(function () {\n try {\n el.sheet.cssRules;\n $interval.cancel(interval);\n el.onload();\n } catch (e) {\n if (--tries <= 0) {\n el.onerror();\n }\n }\n }, 20);\n }\n }\n\n return deferred.promise;\n };\n\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n \"use strict\";\n\n angular.module(\"oc.lazyLoad\").config([\"$provide\", function ($provide) {\n $provide.decorator(\"$ocLazyLoad\", [\"$delegate\", \"$q\", function ($delegate, $q) {\n /**\n * The function that loads new files\n * @param config\n * @param params\n * @returns {*}\n */\n $delegate.filesLoader = function filesLoader(config) {\n var params = arguments[1] === undefined ? {} : arguments[1];\n\n var cssFiles = [],\n templatesFiles = [],\n jsFiles = [],\n promises = [],\n cachePromise = null,\n filesCache = $delegate._getFilesCache();\n\n $delegate.toggleWatch(true); // start watching angular.module calls\n\n angular.extend(params, config);\n\n var pushFile = function pushFile(path) {\n var file_type = null,\n m;\n if (angular.isObject(path)) {\n file_type = path.type;\n path = path.path;\n }\n cachePromise = filesCache.get(path);\n if (angular.isUndefined(cachePromise) || params.cache === false) {\n\n // always check for requirejs syntax just in case\n if ((m = /^(css|less|html|htm|js)?(?=!)/.exec(path)) !== null) {\n // Detect file type using preceding type declaration (ala requireJS)\n file_type = m[1];\n path = path.substr(m[1].length + 1, path.length); // Strip the type from the path\n }\n\n if (!file_type) {\n if ((m = /[.](css|less|html|htm|js)?((\\?|#).*)?$/.exec(path)) !== null) {\n // Detect file type via file extension\n file_type = m[1];\n } else if (!$delegate.jsLoader.hasOwnProperty(\"ocLazyLoadLoader\") && $delegate.jsLoader.hasOwnProperty(\"load\")) {\n // requirejs\n file_type = \"js\";\n } else {\n $delegate._$log.error(\"File type could not be determined. \" + path);\n return;\n }\n }\n\n if ((file_type === \"css\" || file_type === \"less\") && cssFiles.indexOf(path) === -1) {\n cssFiles.push(path);\n } else if ((file_type === \"html\" || file_type === \"htm\") && templatesFiles.indexOf(path) === -1) {\n templatesFiles.push(path);\n } else if (file_type === \"js\" || jsFiles.indexOf(path) === -1) {\n jsFiles.push(path);\n } else {\n $delegate._$log.error(\"File type is not valid. \" + path);\n }\n } else if (cachePromise) {\n promises.push(cachePromise);\n }\n };\n\n if (params.serie) {\n pushFile(params.files.shift());\n } else {\n angular.forEach(params.files, function (path) {\n pushFile(path);\n });\n }\n\n if (cssFiles.length > 0) {\n var cssDeferred = $q.defer();\n $delegate.cssLoader(cssFiles, function (err) {\n if (angular.isDefined(err) && $delegate.cssLoader.hasOwnProperty(\"ocLazyLoadLoader\")) {\n $delegate._$log.error(err);\n cssDeferred.reject(err);\n } else {\n cssDeferred.resolve();\n }\n }, params);\n promises.push(cssDeferred.promise);\n }\n\n if (templatesFiles.length > 0) {\n var templatesDeferred = $q.defer();\n $delegate.templatesLoader(templatesFiles, function (err) {\n if (angular.isDefined(err) && $delegate.templatesLoader.hasOwnProperty(\"ocLazyLoadLoader\")) {\n $delegate._$log.error(err);\n templatesDeferred.reject(err);\n } else {\n templatesDeferred.resolve();\n }\n }, params);\n promises.push(templatesDeferred.promise);\n }\n\n if (jsFiles.length > 0) {\n var jsDeferred = $q.defer();\n $delegate.jsLoader(jsFiles, function (err) {\n if (angular.isDefined(err) && $delegate.jsLoader.hasOwnProperty(\"ocLazyLoadLoader\")) {\n $delegate._$log.error(err);\n jsDeferred.reject(err);\n } else {\n jsDeferred.resolve();\n }\n }, params);\n promises.push(jsDeferred.promise);\n }\n\n if (promises.length === 0) {\n var deferred = $q.defer(),\n err = \"Error: no file to load has been found, if you're trying to load an existing module you should use the 'inject' method instead of 'load'.\";\n $delegate._$log.error(err);\n deferred.reject(err);\n return deferred.promise;\n } else if (params.serie && params.files.length > 0) {\n return $q.all(promises).then(function () {\n return $delegate.filesLoader(config, params);\n });\n } else {\n return $q.all(promises)[\"finally\"](function (res) {\n $delegate.toggleWatch(false); // stop watching angular.module calls\n return res;\n });\n }\n };\n\n /**\n * Load a module or a list of modules into Angular\n * @param module Mixed the name of a predefined module config object, or a module config object, or an array of either\n * @param params Object optional parameters\n * @returns promise\n */\n $delegate.load = function (originalModule) {\n var originalParams = arguments[1] === undefined ? {} : arguments[1];\n\n var self = this,\n config = null,\n deferredList = [],\n deferred = $q.defer(),\n errText;\n\n // clean copy\n var module = angular.copy(originalModule);\n var params = angular.copy(originalParams);\n\n // If module is an array, break it down\n if (angular.isArray(module)) {\n // Resubmit each entry as a single module\n angular.forEach(module, function (m) {\n deferredList.push(self.load(m, params));\n });\n\n // Resolve the promise once everything has loaded\n $q.all(deferredList).then(function (res) {\n deferred.resolve(res);\n }, function (err) {\n deferred.reject(err);\n });\n\n return deferred.promise;\n }\n\n // Get or Set a configuration depending on what was passed in\n if (angular.isString(module)) {\n config = self.getModuleConfig(module);\n if (!config) {\n config = {\n files: [module]\n };\n }\n } else if (angular.isObject(module)) {\n // case {type: 'js', path: lazyLoadUrl + 'testModule.fakejs'}\n if (angular.isDefined(module.path) && angular.isDefined(module.type)) {\n config = {\n files: [module]\n };\n } else {\n config = self.setModuleConfig(module);\n }\n }\n\n if (config === null) {\n var moduleName = self._getModuleName(module);\n errText = \"Module \\\"\" + (moduleName || \"unknown\") + \"\\\" is not configured, cannot load.\";\n $delegate._$log.error(errText);\n deferred.reject(new Error(errText));\n return deferred.promise;\n } else {\n // deprecated\n if (angular.isDefined(config.template)) {\n if (angular.isUndefined(config.files)) {\n config.files = [];\n }\n if (angular.isString(config.template)) {\n config.files.push(config.template);\n } else if (angular.isArray(config.template)) {\n config.files.concat(config.template);\n }\n }\n }\n\n var localParams = angular.extend({}, params, config);\n\n // if someone used an external loader and called the load function with just the module name\n if (angular.isUndefined(config.files) && angular.isDefined(config.name) && $delegate.moduleExists(config.name)) {\n return $delegate.inject(config.name, localParams);\n }\n\n $delegate.filesLoader(config, localParams).then(function () {\n $delegate.inject(null, localParams).then(function (res) {\n deferred.resolve(res);\n }, function (err) {\n deferred.reject(err);\n });\n }, function (err) {\n deferred.reject(err);\n });\n\n return deferred.promise;\n };\n\n // return the patched service\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n \"use strict\";\n\n angular.module(\"oc.lazyLoad\").config([\"$provide\", function ($provide) {\n $provide.decorator(\"$ocLazyLoad\", [\"$delegate\", \"$q\", function ($delegate, $q) {\n /**\r\n * cssLoader function\r\n * @type Function\r\n * @param paths array list of css files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters\r\n * because the user can overwrite cssLoader and it will probably not use promises :(\r\n */\n $delegate.cssLoader = function (paths, callback, params) {\n var promises = [];\n angular.forEach(paths, function (path) {\n promises.push($delegate.buildElement(\"css\", path, params));\n });\n $q.all(promises).then(function () {\n callback();\n }, function (err) {\n callback(err);\n });\n };\n $delegate.cssLoader.ocLazyLoadLoader = true;\n\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n \"use strict\";\n\n angular.module(\"oc.lazyLoad\").config([\"$provide\", function ($provide) {\n $provide.decorator(\"$ocLazyLoad\", [\"$delegate\", \"$q\", function ($delegate, $q) {\n /**\r\n * jsLoader function\r\n * @type Function\r\n * @param paths array list of js files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters\r\n * because the user can overwrite jsLoader and it will probably not use promises :(\r\n */\n $delegate.jsLoader = function (paths, callback, params) {\n var promises = [];\n angular.forEach(paths, function (path) {\n promises.push($delegate.buildElement(\"js\", path, params));\n });\n $q.all(promises).then(function () {\n callback();\n }, function (err) {\n callback(err);\n });\n };\n $delegate.jsLoader.ocLazyLoadLoader = true;\n\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n \"use strict\";\n\n angular.module(\"oc.lazyLoad\").config([\"$provide\", function ($provide) {\n $provide.decorator(\"$ocLazyLoad\", [\"$delegate\", \"$templateCache\", \"$q\", \"$http\", function ($delegate, $templateCache, $q, $http) {\n /**\r\n * templatesLoader function\r\n * @type Function\r\n * @param paths array list of css files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters for $http\r\n * because the user can overwrite templatesLoader and it will probably not use promises :(\r\n */\n $delegate.templatesLoader = function (paths, callback, params) {\n var promises = [],\n filesCache = $delegate._getFilesCache();\n\n angular.forEach(paths, function (url) {\n var deferred = $q.defer();\n promises.push(deferred.promise);\n $http.get(url, params).success(function (data) {\n if (angular.isString(data) && data.length > 0) {\n angular.forEach(angular.element(data), function (node) {\n if (node.nodeName === \"SCRIPT\" && node.type === \"text/ng-template\") {\n $templateCache.put(node.id, node.innerHTML);\n }\n });\n }\n if (angular.isUndefined(filesCache.get(url))) {\n filesCache.put(url, true);\n }\n deferred.resolve();\n }).error(function (err) {\n deferred.reject(new Error(\"Unable to load template file \\\"\" + url + \"\\\": \" + err));\n });\n });\n return $q.all(promises).then(function () {\n callback();\n }, function (err) {\n callback(err);\n });\n };\n $delegate.templatesLoader.ocLazyLoadLoader = true;\n\n return $delegate;\n }]);\n }]);\n})(angular);\n// Array.indexOf polyfill for IE8\nif (!Array.prototype.indexOf) {\n Array.prototype.indexOf = function (searchElement, fromIndex) {\n var k;\n\n // 1. Let O be the result of calling ToObject passing\n // the this value as the argument.\n if (this == null) {\n throw new TypeError(\"\\\"this\\\" is null or not defined\");\n }\n\n var O = Object(this);\n\n // 2. Let lenValue be the result of calling the Get\n // internal method of O with the argument \"length\".\n // 3. Let len be ToUint32(lenValue).\n var len = O.length >>> 0;\n\n // 4. If len is 0, return -1.\n if (len === 0) {\n return -1;\n }\n\n // 5. If argument fromIndex was passed let n be\n // ToInteger(fromIndex); else let n be 0.\n var n = +fromIndex || 0;\n\n if (Math.abs(n) === Infinity) {\n n = 0;\n }\n\n // 6. If n >= len, return -1.\n if (n >= len) {\n return -1;\n }\n\n // 7. If n >= 0, then Let k be n.\n // 8. Else, n<0, Let k be len - abs(n).\n // If k is less than 0, then let k be 0.\n k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\n\n // 9. Repeat, while k < len\n while (k < len) {\n // a. Let Pk be ToString(k).\n // This is implicit for LHS operands of the in operator\n // b. Let kPresent be the result of calling the\n // HasProperty internal method of O with argument Pk.\n // This step can be combined with c\n // c. If kPresent is true, then\n // i. Let elementK be the result of calling the Get\n // internal method of O with the argument ToString(k).\n // ii. Let same be the result of applying the\n // Strict Equality Comparison Algorithm to\n // searchElement and elementK.\n // iii. If same is true, return k.\n if (k in O && O[k] === searchElement) {\n return k;\n }\n k++;\n }\n return -1;\n };\n}\n//# sourceMappingURL=ocLazyLoad.js.map"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/dist/ocLazyLoad.require.js b/dist/ocLazyLoad.require.js index 5bcf8f0..a837f00 100644 --- a/dist/ocLazyLoad.require.js +++ b/dist/ocLazyLoad.require.js @@ -1,6 +1,6 @@ /** * oclazyload - Load modules on demand (lazy load) with angularJS - * @version v1.0.0 + * @version v1.0.1 * @link https://github.com/ocombe/ocLazyLoad * @license MIT * @author Olivier Combe diff --git a/dist/ocLazyLoad.require.min.js b/dist/ocLazyLoad.require.min.js index 2db997d..9e99ee4 100644 --- a/dist/ocLazyLoad.require.min.js +++ b/dist/ocLazyLoad.require.min.js @@ -1,6 +1,6 @@ /** * oclazyload - Load modules on demand (lazy load) with angularJS - * @version v1.0.0 + * @version v1.0.1 * @link https://github.com/ocombe/ocLazyLoad * @license MIT * @author Olivier Combe diff --git a/dist/ocLazyLoad.require.min.js.map b/dist/ocLazyLoad.require.min.js.map index 766e8a2..ee31f1d 100644 --- a/dist/ocLazyLoad.require.min.js.map +++ b/dist/ocLazyLoad.require.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["ocLazyLoad.require.js"],"names":["angular","window","regModules","regInvokes","regConfigs","modulesToLoad","recordDeclarations","broadcast","noop","runBlocks","justLoaded","ocLazyLoad","module","provider","$controllerProvider","$provide","$compileProvider","$filterProvider","$injector","$animateProvider","_register","providers","registerModules","params","k","moduleName","moduleFn","tempRunBlocks","length","isString","getModuleName","indexOf","newModule","ngModuleFct","push","requires","_runBlocks","shift","isDefined","rerun","concat","_invokeQueue","reconfig","_configBlocks","pop","instanceInjector","getInstanceInjector","forEach","fn","invoke","_registerInvokeList","args","signature","data","isArray","hashCode","toString","isObject","stringify","invokeList","type","newInvoke","isUndefined","onInvoke","invokeName","hasOwnProperty","key","queue","i","len","Error","isNew","apply","callInvoke","fct","invoked","isFunction","j","jlen","name","moduleExists","e","test","message","modules","debug","events","moduleCache","value","this","Array","prototype","arguments","config","moduleConfig","_init","element","elements","names","NG_APP_CLASS_REGEXP","append","elm","document","getElementById","replace","querySelectorAll","className","match","exec","attributes","attr","jasmine","mocha","mock","console","error","addReg","mainModule","obj","cache","JSON","str","chr","hash","charCodeAt","$get","$log","$rootElement","$rootScope","$cacheFactory","$q","reject","deferred","defer","promise","filesCache","warn","info","injector","eventName","$broadcast","_broadcast","_$log","_getFilesCache","toggleWatch","watch","getModuleConfig","copy","setModuleConfig","getModules","isLoaded","modulesNames","moduleLoaded","_getModuleName","_getModule","_loadDependencies","localParams","loadedModule","diff","promisesList","self","when","getRequires","requireEntry","files","filter","n","filesLoader","then","all","inject","undefined","_addToLoadList","res","slice","loadNext","resolve","err","requireModule","bootstrapFct","bootstrap","force","configFn","directive","$ocLazyLoad","$compile","$animate","$parse","restrict","terminal","priority","compile","content","innerHTML","html","$scope","$element","$attr","model","$watch","load","enter","contents","nodeType","decorator","$delegate","$window","$interval","uaCssChecked","useCssLoadPatch","anchor","getElementsByTagName","buildElement","path","el","loaded","cacheBuster","url","dc","Date","getTime","substring","get","put","createElement","rel","href","src","remove","onload","onreadystatechange","readyState","onerror","async","serie","insertBeforeElem","lastChild","insertBefore","jQuery","querySelector","parentNode","ua","navigator","userAgent","toLowerCase","platform","v","appVersion","iOSVersion","parseFloat","parseInt","join","androidVersion","versionMatch","tries","interval","sheet","cssRules","cancel","cssFiles","templatesFiles","jsFiles","promises","cachePromise","extend","pushFile","m","file_type","substr","jsLoader","cssDeferred","cssLoader","templatesDeferred","templatesLoader","jsDeferred","originalModule","errText","originalParams","deferredList","template","paths","callback","ocLazyLoadLoader","require","$templateCache","$http","success","node","nodeName","id","searchElement","fromIndex","TypeError","O","Object","Infinity","Math","abs","max"],"mappings":"CAOA,SAAWA,EAASC,GAChB,YAEA,IAAIC,IAAc,KAAM,eACpBC,KACAC,KACAC,KACAC,KACAC,EAAYP,EAAQQ,KACpBC,KACAC,KAEAC,EAAaX,EAAQY,OAAO,eAAgB,MAEhDD,GAAWE,SAAS,eAAgB,sBAAuB,WAAY,mBAAoB,kBAAmB,YAAa,mBAAoB,SAAUC,EAAqBC,EAAUC,EAAkBC,EAAiBC,EAAWC,GAgJlO,QAASC,GAAUC,EAAWC,EAAiBC,GAC3C,GAAID,EAAiB,CACjB,GAAIE,GACAC,EACAC,EACAC,IACJ,KAAKH,EAAIF,EAAgBM,OAAS,EAAGJ,GAAK,EAAGA,IAKzC,GAJAC,EAAaH,EAAgBE,GACxBxB,EAAQ6B,SAASJ,KAClBA,EAAaK,EAAcL,IAE1BA,GAAiD,KAAnCf,EAAWqB,QAAQN,GAAtC,CAGA,GAAIO,GAA+C,KAAnC9B,EAAW6B,QAAQN,EAOnC,IANAC,EAAWO,EAAYR,GACnBO,IAEA9B,EAAWgC,KAAKT,GA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C,qBAAdD,EAAKnO,MACnCgO,EAAe7D,IAAIgE,EAAKE,GAAIF,EAAK9F,aAIzCjM,EAAQ8D,YAAYyE,EAAWuF,IAAIL,KACnClF,EAAWwF,IAAIN,GAAK,GAExBrF,EAAS4C,YACV7D,MAAM,SAAU8D,GACf7C,EAASD,OAAO,GAAI7D,OAAM,iCAAoCmJ,EAAM,MAASxC,QAG9E/C,EAAGuC,IAAI6F,GAAU9F,KAAK,WACzBiH,KACD,SAAUxG,GACTwG,EAASxG,MAGjB4B,EAAUoE,gBAAgBS,kBAAmB,EAEtC7E,SAGhB7M,SAEE0F,MAAMC,UAAU5D,UACb2D,MAAMC,UAAU5D,QAAU,SAAUmQ,EAAeC,GAC3C,GAAI3Q,EAIJ,IAAY,MAARiE,KACI,KAAM,IAAI2M,WAAU,gCAG5B,IAAIC,GAAIC,OAAO7M,MAKXpB,EAAMgO,EAAEzQ,SAAW,CAGvB,IAAY,IAARyC,EACI,MAAO,EAKf,IAAIiG,IAAK6H,GAAa,CAOtB,IALoBI,MAAhBC,KAAKC,IAAInI,KACLA,EAAI,GAIRA,GAAKjG,EACD,MAAO,EASf,KAHA7C,EAAIgR,KAAKE,IAAIpI,GAAK,EAAIA,EAAIjG,EAAMmO,KAAKC,IAAInI,GAAI,GAGlCjG,EAAJ7C,GAAS,CAaR,GAAIA,IAAK6Q,IAAKA,EAAE7Q,KAAO0Q,EACf,MAAO1Q,EAEfA,KAER,MAAO","file":"ocLazyLoad.require.min.js","sourcesContent":["/**\n * oclazyload - Load modules on demand (lazy load) with angularJS\n * @version v1.0.0\n * @link https://github.com/ocombe/ocLazyLoad\n * @license MIT\n * @author Olivier Combe \n */\n(function (angular, window) {\n \"use strict\";\n\n var regModules = [\"ng\", \"oc.lazyLoad\"],\n regInvokes = {},\n regConfigs = [],\n modulesToLoad = [],\n recordDeclarations = [],\n broadcast = angular.noop,\n runBlocks = {},\n justLoaded = [];\n\n var ocLazyLoad = angular.module(\"oc.lazyLoad\", [\"ng\"]);\n\n ocLazyLoad.provider(\"$ocLazyLoad\", [\"$controllerProvider\", \"$provide\", \"$compileProvider\", \"$filterProvider\", \"$injector\", \"$animateProvider\", function ($controllerProvider, $provide, $compileProvider, $filterProvider, $injector, $animateProvider) {\n var modules = {},\n providers = {\n $controllerProvider: $controllerProvider,\n $compileProvider: $compileProvider,\n $filterProvider: $filterProvider,\n $provide: $provide, // other things (constant, decorator, provider, factory, service)\n $injector: $injector,\n $animateProvider: $animateProvider\n },\n debug = false,\n events = false,\n moduleCache = [];\n\n moduleCache.push = function (value) {\n if (this.indexOf(value) === -1) {\n Array.prototype.push.apply(this, arguments);\n }\n };\n\n this.config = function (config) {\n // If we want to define modules configs\n if (angular.isDefined(config.modules)) {\n if (angular.isArray(config.modules)) {\n angular.forEach(config.modules, function (moduleConfig) {\n modules[moduleConfig.name] = moduleConfig;\n });\n } else {\n modules[config.modules.name] = config.modules;\n }\n }\n\n if (angular.isDefined(config.debug)) {\n debug = config.debug;\n }\n\n if (angular.isDefined(config.events)) {\n events = config.events;\n }\n };\n\n /**\n * Get the list of existing registered modules\n * @param element\n */\n this._init = function _init(element) {\n // this is probably useless now because we override angular.bootstrap\n if (modulesToLoad.length === 0) {\n var elements = [element],\n names = [\"ng:app\", \"ng-app\", \"x-ng-app\", \"data-ng-app\"],\n NG_APP_CLASS_REGEXP = /\\sng[:\\-]app(:\\s*([\\w\\d_]+);?)?\\s/,\n append = function append(elm) {\n return elm && elements.push(elm);\n };\n\n angular.forEach(names, function (name) {\n names[name] = true;\n append(document.getElementById(name));\n name = name.replace(\":\", \"\\\\:\");\n if (element[0].querySelectorAll) {\n angular.forEach(element[0].querySelectorAll(\".\" + name), append);\n angular.forEach(element[0].querySelectorAll(\".\" + name + \"\\\\:\"), append);\n angular.forEach(element[0].querySelectorAll(\"[\" + name + \"]\"), append);\n }\n });\n\n angular.forEach(elements, function (elm) {\n if (modulesToLoad.length === 0) {\n var className = \" \" + element.className + \" \";\n var match = NG_APP_CLASS_REGEXP.exec(className);\n if (match) {\n modulesToLoad.push((match[2] || \"\").replace(/\\s+/g, \",\"));\n } else {\n angular.forEach(elm.attributes, function (attr) {\n if (modulesToLoad.length === 0 && names[attr.name]) {\n modulesToLoad.push(attr.value);\n }\n });\n }\n }\n });\n }\n\n if (modulesToLoad.length === 0 && !((window.jasmine || window.mocha) && angular.isDefined(angular.mock))) {\n console.error(\"No module found during bootstrap, unable to init ocLazyLoad. You should always use the ng-app directive or angular.boostrap when you use ocLazyLoad.\");\n }\n\n var addReg = function addReg(moduleName) {\n if (regModules.indexOf(moduleName) === -1) {\n // register existing modules\n regModules.push(moduleName);\n var mainModule = angular.module(moduleName);\n\n // register existing components (directives, services, ...)\n _invokeQueue(null, mainModule._invokeQueue, moduleName);\n _invokeQueue(null, mainModule._configBlocks, moduleName); // angular 1.3+\n\n angular.forEach(mainModule.requires, addReg);\n }\n };\n\n angular.forEach(modulesToLoad, function (moduleName) {\n addReg(moduleName);\n });\n\n modulesToLoad = []; // reset for next bootstrap\n recordDeclarations.pop(); // wait for the next lazy load\n };\n\n /**\n * Like JSON.stringify but that doesn't throw on circular references\n * @param obj\n */\n var stringify = function stringify(obj) {\n var cache = [];\n return JSON.stringify(obj, function (key, value) {\n if (angular.isObject(value) && value !== null) {\n if (cache.indexOf(value) !== -1) {\n // Circular reference found, discard key\n return;\n }\n // Store value in our collection\n cache.push(value);\n }\n return value;\n });\n };\n\n var hashCode = function hashCode(str) {\n var hash = 0,\n i,\n chr,\n len;\n if (str.length == 0) {\n return hash;\n }\n for (i = 0, len = str.length; i < len; i++) {\n chr = str.charCodeAt(i);\n hash = (hash << 5) - hash + chr;\n hash |= 0; // Convert to 32bit integer\n }\n return hash;\n };\n\n function _register(providers, registerModules, params) {\n if (registerModules) {\n var k,\n moduleName,\n moduleFn,\n tempRunBlocks = [];\n for (k = registerModules.length - 1; k >= 0; k--) {\n moduleName = registerModules[k];\n if (!angular.isString(moduleName)) {\n moduleName = getModuleName(moduleName);\n }\n if (!moduleName || justLoaded.indexOf(moduleName) !== -1) {\n continue;\n }\n var newModule = regModules.indexOf(moduleName) === -1;\n moduleFn = ngModuleFct(moduleName);\n if (newModule) {\n // new module\n regModules.push(moduleName);\n _register(providers, moduleFn.requires, params);\n }\n if (moduleFn._runBlocks.length > 0) {\n // new run blocks detected! Replace the old ones (if existing)\n runBlocks[moduleName] = [];\n while (moduleFn._runBlocks.length > 0) {\n runBlocks[moduleName].push(moduleFn._runBlocks.shift());\n }\n }\n if (angular.isDefined(runBlocks[moduleName]) && (newModule || params.rerun)) {\n tempRunBlocks = tempRunBlocks.concat(runBlocks[moduleName]);\n }\n _invokeQueue(providers, moduleFn._invokeQueue, moduleName, params.reconfig);\n _invokeQueue(providers, moduleFn._configBlocks, moduleName, params.reconfig); // angular 1.3+\n broadcast(newModule ? \"ocLazyLoad.moduleLoaded\" : \"ocLazyLoad.moduleReloaded\", moduleName);\n registerModules.pop();\n justLoaded.push(moduleName);\n }\n // execute the run blocks at the end\n var instanceInjector = providers.getInstanceInjector();\n angular.forEach(tempRunBlocks, function (fn) {\n instanceInjector.invoke(fn);\n });\n }\n }\n\n function _registerInvokeList(args, moduleName) {\n var invokeList = args[2][0],\n type = args[1],\n newInvoke = false;\n if (angular.isUndefined(regInvokes[moduleName])) {\n regInvokes[moduleName] = {};\n }\n if (angular.isUndefined(regInvokes[moduleName][type])) {\n regInvokes[moduleName][type] = {};\n }\n var onInvoke = function onInvoke(invokeName, signature) {\n if (!regInvokes[moduleName][type].hasOwnProperty(invokeName)) {\n regInvokes[moduleName][type][invokeName] = [];\n }\n if (regInvokes[moduleName][type][invokeName].indexOf(signature) === -1) {\n newInvoke = true;\n regInvokes[moduleName][type][invokeName].push(signature);\n broadcast(\"ocLazyLoad.componentLoaded\", [moduleName, type, invokeName]);\n }\n };\n\n function signature(data) {\n if (angular.isArray(data)) {\n // arrays are objects, we need to test for it first\n return hashCode(data.toString());\n } else if (angular.isObject(data)) {\n // constants & values for example\n return hashCode(stringify(data));\n } else {\n if (angular.isDefined(data) && data !== null) {\n return hashCode(data.toString());\n } else {\n // null & undefined constants\n return data;\n }\n }\n }\n\n if (angular.isString(invokeList)) {\n onInvoke(invokeList, signature(args[2][1]));\n } else if (angular.isObject(invokeList)) {\n angular.forEach(invokeList, function (invoke, key) {\n if (angular.isString(invoke)) {\n // decorators for example\n onInvoke(invoke, signature(invokeList[1]));\n } else {\n // components registered as object lists {\"componentName\": function() {}}\n onInvoke(key, signature(invoke));\n }\n });\n } else {\n return false;\n }\n return newInvoke;\n }\n\n function _invokeQueue(providers, queue, moduleName, reconfig) {\n if (!queue) {\n return;\n }\n\n var i, len, args, provider;\n for (i = 0, len = queue.length; i < len; i++) {\n args = queue[i];\n if (angular.isArray(args)) {\n if (providers !== null) {\n if (providers.hasOwnProperty(args[0])) {\n provider = providers[args[0]];\n } else {\n throw new Error(\"unsupported provider \" + args[0]);\n }\n }\n var isNew = _registerInvokeList(args, moduleName);\n if (args[1] !== \"invoke\") {\n if (isNew && angular.isDefined(provider)) {\n provider[args[1]].apply(provider, args[2]);\n }\n } else {\n // config block\n var callInvoke = function callInvoke(fct) {\n var invoked = regConfigs.indexOf(\"\" + moduleName + \"-\" + fct);\n if (invoked === -1 || reconfig) {\n if (invoked === -1) {\n regConfigs.push(\"\" + moduleName + \"-\" + fct);\n }\n if (angular.isDefined(provider)) {\n provider[args[1]].apply(provider, args[2]);\n }\n }\n };\n if (angular.isFunction(args[2][0])) {\n callInvoke(args[2][0]);\n } else if (angular.isArray(args[2][0])) {\n for (var j = 0, jlen = args[2][0].length; j < jlen; j++) {\n if (angular.isFunction(args[2][0][j])) {\n callInvoke(args[2][0][j]);\n }\n }\n }\n }\n }\n }\n }\n\n function getModuleName(module) {\n var moduleName = null;\n if (angular.isString(module)) {\n moduleName = module;\n } else if (angular.isObject(module) && module.hasOwnProperty(\"name\") && angular.isString(module.name)) {\n moduleName = module.name;\n }\n return moduleName;\n }\n\n function moduleExists(moduleName) {\n if (!angular.isString(moduleName)) {\n return false;\n }\n try {\n return ngModuleFct(moduleName);\n } catch (e) {\n if (/No module/.test(e) || e.message.indexOf(\"$injector:nomod\") > -1) {\n return false;\n }\n }\n }\n\n this.$get = [\"$log\", \"$rootElement\", \"$rootScope\", \"$cacheFactory\", \"$q\", function ($log, $rootElement, $rootScope, $cacheFactory, $q) {\n var instanceInjector,\n filesCache = $cacheFactory(\"ocLazyLoad\");\n\n if (!debug) {\n $log = {};\n $log.error = angular.noop;\n $log.warn = angular.noop;\n $log.info = angular.noop;\n }\n\n // Make this lazy because when $get() is called the instance injector hasn't been assigned to the rootElement yet\n providers.getInstanceInjector = function () {\n return instanceInjector ? instanceInjector : instanceInjector = $rootElement.data(\"$injector\") || angular.injector();\n };\n\n broadcast = function broadcast(eventName, params) {\n if (events) {\n $rootScope.$broadcast(eventName, params);\n }\n if (debug) {\n $log.info(eventName, params);\n }\n };\n\n function reject(e) {\n var deferred = $q.defer();\n $log.error(e.message);\n deferred.reject(e);\n return deferred.promise;\n }\n\n return {\n _broadcast: broadcast,\n\n _$log: $log,\n\n /**\n * Returns the files cache used by the loaders to store the files currently loading\n * @returns {*}\n */\n _getFilesCache: function getFilesCache() {\n return filesCache;\n },\n\n /**\n * Let the service know that it should monitor angular.module because files are loading\n * @param watch boolean\n */\n toggleWatch: function toggleWatch(watch) {\n if (watch) {\n recordDeclarations.push(true);\n } else {\n recordDeclarations.pop();\n }\n },\n\n /**\n * Let you get a module config object\n * @param moduleName String the name of the module\n * @returns {*}\n */\n getModuleConfig: function getModuleConfig(moduleName) {\n if (!angular.isString(moduleName)) {\n throw new Error(\"You need to give the name of the module to get\");\n }\n if (!modules[moduleName]) {\n return null;\n }\n return angular.copy(modules[moduleName]);\n },\n\n /**\n * Let you define a module config object\n * @param moduleConfig Object the module config object\n * @returns {*}\n */\n setModuleConfig: function setModuleConfig(moduleConfig) {\n if (!angular.isObject(moduleConfig)) {\n throw new Error(\"You need to give the module config object to set\");\n }\n modules[moduleConfig.name] = moduleConfig;\n return moduleConfig;\n },\n\n /**\n * Returns the list of loaded modules\n * @returns {string[]}\n */\n getModules: function () {\n return regModules;\n },\n\n /**\n * Let you check if a module has been loaded into Angular or not\n * @param modulesNames String/Object a module name, or a list of module names\n * @returns {boolean}\n */\n isLoaded: function isLoaded(modulesNames) {\n var moduleLoaded = function moduleLoaded(module) {\n var isLoaded = regModules.indexOf(module) > -1;\n if (!isLoaded) {\n isLoaded = !!moduleExists(module);\n }\n return isLoaded;\n };\n if (angular.isString(modulesNames)) {\n modulesNames = [modulesNames];\n }\n if (angular.isArray(modulesNames)) {\n var i, len;\n for (i = 0, len = modulesNames.length; i < len; i++) {\n if (!moduleLoaded(modulesNames[i])) {\n return false;\n }\n }\n return true;\n } else {\n throw new Error(\"You need to define the module(s) name(s)\");\n }\n },\n\n /**\n * Given a module, return its name\n * @param module\n * @returns {String}\n */\n _getModuleName: getModuleName,\n\n /**\n * Returns a module if it exists\n * @param moduleName\n * @returns {module}\n */\n _getModule: function getModule(moduleName) {\n try {\n return ngModuleFct(moduleName);\n } catch (e) {\n // this error message really suxx\n if (/No module/.test(e) || e.message.indexOf(\"$injector:nomod\") > -1) {\n e.message = \"The module \\\"\" + stringify(moduleName) + \"\\\" that you are trying to load does not exist. \" + e.message;\n }\n throw e;\n }\n },\n\n /**\n * Check if a module exists and returns it if it does\n * @param moduleName\n * @returns {boolean}\n */\n moduleExists: moduleExists,\n\n /**\n * Load the dependencies, and might try to load new files depending on the config\n * @param moduleName (String or Array of Strings)\n * @param localParams\n * @returns {*}\n * @private\n */\n _loadDependencies: function _loadDependencies(moduleName, localParams) {\n var loadedModule,\n requires,\n diff,\n promisesList = [],\n self = this;\n\n moduleName = self._getModuleName(moduleName);\n\n if (moduleName === null) {\n return $q.when();\n } else {\n try {\n loadedModule = self._getModule(moduleName);\n } catch (e) {\n return reject(e);\n }\n // get unloaded requires\n requires = self.getRequires(loadedModule);\n }\n\n angular.forEach(requires, function (requireEntry) {\n // If no configuration is provided, try and find one from a previous load.\n // If there isn't one, bail and let the normal flow run\n if (angular.isString(requireEntry)) {\n var config = self.getModuleConfig(requireEntry);\n if (config === null) {\n moduleCache.push(requireEntry); // We don't know about this module, but something else might, so push it anyway.\n return;\n }\n requireEntry = config;\n }\n\n // Check if this dependency has been loaded previously\n if (self.moduleExists(requireEntry.name)) {\n // compare against the already loaded module to see if the new definition adds any new files\n diff = requireEntry.files.filter(function (n) {\n return self.getModuleConfig(requireEntry.name).files.indexOf(n) < 0;\n });\n\n // If the module was redefined, advise via the console\n if (diff.length !== 0) {\n self._$log.warn(\"Module \\\"\", moduleName, \"\\\" attempted to redefine configuration for dependency. \\\"\", requireEntry.name, \"\\\"\\n Additional Files Loaded:\", diff);\n }\n\n // Push everything to the file loader, it will weed out the duplicates.\n if (angular.isDefined(self.filesLoader)) {\n // if a files loader is defined\n promisesList.push(self.filesLoader(requireEntry, localParams).then(function () {\n return self._loadDependencies(requireEntry);\n }));\n } else {\n return reject(new Error(\"Error: New dependencies need to be loaded from external files (\" + requireEntry.files + \"), but no loader has been defined.\"));\n }\n return;\n } else if (angular.isArray(requireEntry)) {\n requireEntry = {\n files: requireEntry\n };\n } else if (angular.isObject(requireEntry)) {\n if (requireEntry.hasOwnProperty(\"name\") && requireEntry.name) {\n // The dependency doesn't exist in the module cache and is a new configuration, so store and push it.\n self.setModuleConfig(requireEntry);\n moduleCache.push(requireEntry.name);\n }\n }\n\n // Check if the dependency has any files that need to be loaded. If there are, push a new promise to the promise list.\n if (angular.isDefined(requireEntry.files) && requireEntry.files.length !== 0) {\n if (angular.isDefined(self.filesLoader)) {\n // if a files loader is defined\n promisesList.push(self.filesLoader(requireEntry, localParams).then(function () {\n return self._loadDependencies(requireEntry);\n }));\n } else {\n return reject(new Error(\"Error: the module \\\"\" + requireEntry.name + \"\\\" is defined in external files (\" + requireEntry.files + \"), but no loader has been defined.\"));\n }\n }\n });\n\n // Create a wrapper promise to watch the promise list and resolve it once everything is done.\n return $q.all(promisesList);\n },\n\n /**\n * Inject new modules into Angular\n * @param moduleName\n * @param localParams\n */\n inject: function inject(moduleName) {\n var localParams = arguments[1] === undefined ? {} : arguments[1];\n\n var self = this,\n deferred = $q.defer();\n if (angular.isDefined(moduleName) && moduleName !== null) {\n if (angular.isArray(moduleName)) {\n var promisesList = [];\n angular.forEach(moduleName, function (module) {\n promisesList.push(self.inject(module));\n });\n return $q.all(promisesList);\n } else {\n self._addToLoadList(self._getModuleName(moduleName), true);\n }\n }\n if (modulesToLoad.length > 0) {\n var res = modulesToLoad.slice(); // clean copy\n var loadNext = function loadNext(moduleName) {\n moduleCache.push(moduleName);\n self._loadDependencies(moduleName, localParams).then(function success() {\n try {\n justLoaded = [];\n _register(providers, moduleCache, localParams);\n } catch (e) {\n self._$log.error(e.message);\n deferred.reject(e);\n return;\n }\n\n if (modulesToLoad.length > 0) {\n loadNext(modulesToLoad.shift()); // load the next in list\n } else {\n deferred.resolve(res); // everything has been loaded, resolve\n }\n }, function error(err) {\n deferred.reject(err);\n });\n };\n\n // load the first in list\n loadNext(modulesToLoad.shift());\n } else {\n deferred.resolve();\n }\n return deferred.promise;\n },\n\n /**\n * Get the list of required modules/services/... for this module\n * @param module\n * @returns {Array}\n */\n getRequires: function getRequires(module) {\n var requires = [];\n angular.forEach(module.requires, function (requireModule) {\n if (regModules.indexOf(requireModule) === -1) {\n requires.push(requireModule);\n }\n });\n return requires;\n },\n\n /**\n * Invoke the new modules & component by their providers\n * @param providers\n * @param queue\n * @param moduleName\n * @param reconfig\n * @private\n */\n _invokeQueue: _invokeQueue,\n\n /**\n * Check if a module has been invoked and registers it if not\n * @param args\n * @param moduleName\n * @returns {boolean} is new\n */\n _registerInvokeList: _registerInvokeList,\n\n /**\n * Register a new module and loads it, executing the run/config blocks if needed\n * @param providers\n * @param registerModules\n * @param params\n * @private\n */\n _register: _register,\n\n /**\n * Add a module name to the list of modules that will be loaded in the next inject\n * @param name\n * @param force\n * @private\n */\n _addToLoadList: _addToLoadList\n };\n }];\n\n // Let's get the list of loaded modules & components\n this._init(angular.element(window.document));\n }]);\n\n var bootstrapFct = angular.bootstrap;\n angular.bootstrap = function (element, modules, config) {\n // we use slice to make a clean copy\n angular.forEach(modules.slice(), function (module) {\n _addToLoadList(module, true);\n });\n return bootstrapFct(element, modules, config);\n };\n\n var _addToLoadList = function _addToLoadList(name, force) {\n if ((recordDeclarations.length > 0 || force) && angular.isString(name) && modulesToLoad.indexOf(name) === -1) {\n modulesToLoad.push(name);\n }\n };\n\n var ngModuleFct = angular.module;\n angular.module = function (name, requires, configFn) {\n _addToLoadList(name);\n return ngModuleFct(name, requires, configFn);\n };\n})(angular, window);\n(function (angular) {\n \"use strict\";\n\n angular.module(\"oc.lazyLoad\").directive(\"ocLazyLoad\", [\"$ocLazyLoad\", \"$compile\", \"$animate\", \"$parse\", function ($ocLazyLoad, $compile, $animate, $parse) {\n return {\n restrict: \"A\",\n terminal: true,\n priority: 1000,\n compile: function compile(element, attrs) {\n // we store the content and remove it before compilation\n var content = element[0].innerHTML;\n element.html(\"\");\n\n return function ($scope, $element, $attr) {\n var model = $parse($attr.ocLazyLoad);\n $scope.$watch(function () {\n return model($scope) || $attr.ocLazyLoad; // it can be a module name (string), an object, an array, or a scope reference to any of this\n }, function (moduleName) {\n if (angular.isDefined(moduleName)) {\n $ocLazyLoad.load(moduleName).then(function () {\n $animate.enter(content, $element);\n var contents = element.contents();\n angular.forEach(contents, function (content) {\n if (content.nodeType !== 3) {\n // 3 is a text node\n $compile(content)($scope);\n }\n });\n });\n }\n }, true);\n };\n }\n };\n }]);\n})(angular);\n(function (angular) {\n \"use strict\";\n\n angular.module(\"oc.lazyLoad\").config([\"$provide\", function ($provide) {\n $provide.decorator(\"$ocLazyLoad\", [\"$delegate\", \"$q\", \"$window\", \"$interval\", function ($delegate, $q, $window, $interval) {\n var uaCssChecked = false,\n useCssLoadPatch = false,\n anchor = $window.document.getElementsByTagName(\"head\")[0] || $window.document.getElementsByTagName(\"body\")[0];\n\n /**\n * Load a js/css file\n * @param type\n * @param path\n * @param params\n * @returns promise\n */\n $delegate.buildElement = function buildElement(type, path, params) {\n var deferred = $q.defer(),\n el,\n loaded,\n filesCache = $delegate._getFilesCache(),\n cacheBuster = function cacheBuster(url) {\n var dc = new Date().getTime();\n if (url.indexOf(\"?\") >= 0) {\n if (url.substring(0, url.length - 1) === \"&\") {\n return \"\" + url + \"_dc=\" + dc;\n }\n return \"\" + url + \"&_dc=\" + dc;\n } else {\n return \"\" + url + \"?_dc=\" + dc;\n }\n };\n\n // Store the promise early so the file load can be detected by other parallel lazy loads\n // (ie: multiple routes on one page) a 'true' value isn't sufficient\n // as it causes false positive load results.\n if (angular.isUndefined(filesCache.get(path))) {\n filesCache.put(path, deferred.promise);\n }\n\n // Switch in case more content types are added later\n switch (type) {\n case \"css\":\n el = $window.document.createElement(\"link\");\n el.type = \"text/css\";\n el.rel = \"stylesheet\";\n el.href = params.cache === false ? cacheBuster(path) : path;\n break;\n case \"js\":\n el = $window.document.createElement(\"script\");\n el.src = params.cache === false ? cacheBuster(path) : path;\n break;\n default:\n filesCache.remove(path);\n deferred.reject(new Error(\"Requested type \\\"\" + type + \"\\\" is not known. Could not inject \\\"\" + path + \"\\\"\"));\n break;\n }\n el.onload = el.onreadystatechange = function (e) {\n if (el.readyState && !/^c|loade/.test(el.readyState) || loaded) return;\n el.onload = el.onreadystatechange = null;\n loaded = 1;\n $delegate._broadcast(\"ocLazyLoad.fileLoaded\", path);\n deferred.resolve();\n };\n el.onerror = function () {\n filesCache.remove(path);\n deferred.reject(new Error(\"Unable to load \" + path));\n };\n el.async = params.serie ? 0 : 1;\n\n var insertBeforeElem = anchor.lastChild;\n if (params.insertBefore) {\n var element = angular.element(angular.isDefined(window.jQuery) ? params.insertBefore : document.querySelector(params.insertBefore));\n if (element && element.length > 0) {\n insertBeforeElem = element[0];\n }\n }\n insertBeforeElem.parentNode.insertBefore(el, insertBeforeElem);\n\n /*\n The event load or readystatechange doesn't fire in:\n - iOS < 6 (default mobile browser)\n - Android < 4.4 (default mobile browser)\n - Safari < 6 (desktop browser)\n */\n if (type == \"css\") {\n if (!uaCssChecked) {\n var ua = $window.navigator.userAgent.toLowerCase();\n\n // iOS < 6\n if (/iP(hone|od|ad)/.test($window.navigator.platform)) {\n var v = $window.navigator.appVersion.match(/OS (\\d+)_(\\d+)_?(\\d+)?/);\n var iOSVersion = parseFloat([parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)].join(\".\"));\n useCssLoadPatch = iOSVersion < 6;\n } else if (ua.indexOf(\"android\") > -1) {\n // Android < 4.4\n var androidVersion = parseFloat(ua.slice(ua.indexOf(\"android\") + 8));\n useCssLoadPatch = androidVersion < 4.4;\n } else if (ua.indexOf(\"safari\") > -1) {\n var versionMatch = ua.match(/version\\/([\\.\\d]+)/i);\n useCssLoadPatch = versionMatch && versionMatch[1] && parseFloat(versionMatch[1]) < 6;\n }\n }\n\n if (useCssLoadPatch) {\n var tries = 1000; // * 20 = 20000 miliseconds\n var interval = $interval(function () {\n try {\n el.sheet.cssRules;\n $interval.cancel(interval);\n el.onload();\n } catch (e) {\n if (--tries <= 0) {\n el.onerror();\n }\n }\n }, 20);\n }\n }\n\n return deferred.promise;\n };\n\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n \"use strict\";\n\n angular.module(\"oc.lazyLoad\").config([\"$provide\", function ($provide) {\n $provide.decorator(\"$ocLazyLoad\", [\"$delegate\", \"$q\", function ($delegate, $q) {\n /**\n * The function that loads new files\n * @param config\n * @param params\n * @returns {*}\n */\n $delegate.filesLoader = function filesLoader(config) {\n var params = arguments[1] === undefined ? {} : arguments[1];\n\n var cssFiles = [],\n templatesFiles = [],\n jsFiles = [],\n promises = [],\n cachePromise = null,\n filesCache = $delegate._getFilesCache();\n\n $delegate.toggleWatch(true); // start watching angular.module calls\n\n angular.extend(params, config);\n\n var pushFile = function pushFile(path) {\n var file_type = null,\n m;\n if (angular.isObject(path)) {\n file_type = path.type;\n path = path.path;\n }\n cachePromise = filesCache.get(path);\n if (angular.isUndefined(cachePromise) || params.cache === false) {\n\n // always check for requirejs syntax just in case\n if ((m = /^(css|less|html|htm|js)?(?=!)/.exec(path)) !== null) {\n // Detect file type using preceding type declaration (ala requireJS)\n file_type = m[1];\n path = path.substr(m[1].length + 1, path.length); // Strip the type from the path\n }\n\n if (!file_type) {\n if ((m = /[.](css|less|html|htm|js)?((\\?|#).*)?$/.exec(path)) !== null) {\n // Detect file type via file extension\n file_type = m[1];\n } else if (!$delegate.jsLoader.hasOwnProperty(\"ocLazyLoadLoader\") && $delegate.jsLoader.hasOwnProperty(\"load\")) {\n // requirejs\n file_type = \"js\";\n } else {\n $delegate._$log.error(\"File type could not be determined. \" + path);\n return;\n }\n }\n\n if ((file_type === \"css\" || file_type === \"less\") && cssFiles.indexOf(path) === -1) {\n cssFiles.push(path);\n } else if ((file_type === \"html\" || file_type === \"htm\") && templatesFiles.indexOf(path) === -1) {\n templatesFiles.push(path);\n } else if (file_type === \"js\" || jsFiles.indexOf(path) === -1) {\n jsFiles.push(path);\n } else {\n $delegate._$log.error(\"File type is not valid. \" + path);\n }\n } else if (cachePromise) {\n promises.push(cachePromise);\n }\n };\n\n if (params.serie) {\n pushFile(params.files.shift());\n } else {\n angular.forEach(params.files, function (path) {\n pushFile(path);\n });\n }\n\n if (cssFiles.length > 0) {\n var cssDeferred = $q.defer();\n $delegate.cssLoader(cssFiles, function (err) {\n if (angular.isDefined(err) && $delegate.cssLoader.hasOwnProperty(\"ocLazyLoadLoader\")) {\n $delegate._$log.error(err);\n cssDeferred.reject(err);\n } else {\n cssDeferred.resolve();\n }\n }, params);\n promises.push(cssDeferred.promise);\n }\n\n if (templatesFiles.length > 0) {\n var templatesDeferred = $q.defer();\n $delegate.templatesLoader(templatesFiles, function (err) {\n if (angular.isDefined(err) && $delegate.templatesLoader.hasOwnProperty(\"ocLazyLoadLoader\")) {\n $delegate._$log.error(err);\n templatesDeferred.reject(err);\n } else {\n templatesDeferred.resolve();\n }\n }, params);\n promises.push(templatesDeferred.promise);\n }\n\n if (jsFiles.length > 0) {\n var jsDeferred = $q.defer();\n $delegate.jsLoader(jsFiles, function (err) {\n if (angular.isDefined(err) && $delegate.jsLoader.hasOwnProperty(\"ocLazyLoadLoader\")) {\n $delegate._$log.error(err);\n jsDeferred.reject(err);\n } else {\n jsDeferred.resolve();\n }\n }, params);\n promises.push(jsDeferred.promise);\n }\n\n if (promises.length === 0) {\n var deferred = $q.defer(),\n err = \"Error: no file to load has been found, if you're trying to load an existing module you should use the 'inject' method instead of 'load'.\";\n $delegate._$log.error(err);\n deferred.reject(err);\n return deferred.promise;\n } else if (params.serie && params.files.length > 0) {\n return $q.all(promises).then(function () {\n return $delegate.filesLoader(config, params);\n });\n } else {\n return $q.all(promises)[\"finally\"](function (res) {\n $delegate.toggleWatch(false); // stop watching angular.module calls\n return res;\n });\n }\n };\n\n /**\n * Load a module or a list of modules into Angular\n * @param module Mixed the name of a predefined module config object, or a module config object, or an array of either\n * @param params Object optional parameters\n * @returns promise\n */\n $delegate.load = function (originalModule) {\n var originalParams = arguments[1] === undefined ? {} : arguments[1];\n\n var self = this,\n config = null,\n deferredList = [],\n deferred = $q.defer(),\n errText;\n\n // clean copy\n var module = angular.copy(originalModule);\n var params = angular.copy(originalParams);\n\n // If module is an array, break it down\n if (angular.isArray(module)) {\n // Resubmit each entry as a single module\n angular.forEach(module, function (m) {\n deferredList.push(self.load(m, params));\n });\n\n // Resolve the promise once everything has loaded\n $q.all(deferredList).then(function (res) {\n deferred.resolve(res);\n }, function (err) {\n deferred.reject(err);\n });\n\n return deferred.promise;\n }\n\n // Get or Set a configuration depending on what was passed in\n if (angular.isString(module)) {\n config = self.getModuleConfig(module);\n if (!config) {\n config = {\n files: [module]\n };\n }\n } else if (angular.isObject(module)) {\n // case {type: 'js', path: lazyLoadUrl + 'testModule.fakejs'}\n if (angular.isDefined(module.path) && angular.isDefined(module.type)) {\n config = {\n files: [module]\n };\n } else {\n config = self.setModuleConfig(module);\n }\n }\n\n if (config === null) {\n var moduleName = self._getModuleName(module);\n errText = \"Module \\\"\" + (moduleName || \"unknown\") + \"\\\" is not configured, cannot load.\";\n $delegate._$log.error(errText);\n deferred.reject(new Error(errText));\n return deferred.promise;\n } else {\n // deprecated\n if (angular.isDefined(config.template)) {\n if (angular.isUndefined(config.files)) {\n config.files = [];\n }\n if (angular.isString(config.template)) {\n config.files.push(config.template);\n } else if (angular.isArray(config.template)) {\n config.files.concat(config.template);\n }\n }\n }\n\n var localParams = angular.extend({}, params, config);\n\n // if someone used an external loader and called the load function with just the module name\n if (angular.isUndefined(config.files) && angular.isDefined(config.name) && $delegate.moduleExists(config.name)) {\n return $delegate.inject(config.name, localParams);\n }\n\n $delegate.filesLoader(config, localParams).then(function () {\n $delegate.inject(null, localParams).then(function (res) {\n deferred.resolve(res);\n }, function (err) {\n deferred.reject(err);\n });\n }, function (err) {\n deferred.reject(err);\n });\n\n return deferred.promise;\n };\n\n // return the patched service\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n \"use strict\";\n\n angular.module(\"oc.lazyLoad\").config([\"$provide\", function ($provide) {\n $provide.decorator(\"$ocLazyLoad\", [\"$delegate\", \"$q\", function ($delegate, $q) {\n /**\r\n * cssLoader function\r\n * @type Function\r\n * @param paths array list of css files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters\r\n * because the user can overwrite cssLoader and it will probably not use promises :(\r\n */\n $delegate.cssLoader = function (paths, callback, params) {\n var promises = [];\n angular.forEach(paths, function (path) {\n promises.push($delegate.buildElement(\"css\", path, params));\n });\n $q.all(promises).then(function () {\n callback();\n }, function (err) {\n callback(err);\n });\n };\n $delegate.cssLoader.ocLazyLoadLoader = true;\n\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n \"use strict\";\n\n angular.module(\"oc.lazyLoad\").config([\"$provide\", function ($provide) {\n $provide.decorator(\"$ocLazyLoad\", [\"$delegate\", \"$q\", function ($delegate, $q) {\n /**\r\n * jsLoader function\r\n * @type Function\r\n * @param paths array list of js files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters\r\n * because the user can overwrite jsLoader and it will probably not use promises :(\r\n */\n $delegate.jsLoader = require;\n\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n \"use strict\";\n\n angular.module(\"oc.lazyLoad\").config([\"$provide\", function ($provide) {\n $provide.decorator(\"$ocLazyLoad\", [\"$delegate\", \"$templateCache\", \"$q\", \"$http\", function ($delegate, $templateCache, $q, $http) {\n /**\r\n * templatesLoader function\r\n * @type Function\r\n * @param paths array list of css files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters for $http\r\n * because the user can overwrite templatesLoader and it will probably not use promises :(\r\n */\n $delegate.templatesLoader = function (paths, callback, params) {\n var promises = [],\n filesCache = $delegate._getFilesCache();\n\n angular.forEach(paths, function (url) {\n var deferred = $q.defer();\n promises.push(deferred.promise);\n $http.get(url, params).success(function (data) {\n if (angular.isString(data) && data.length > 0) {\n angular.forEach(angular.element(data), function (node) {\n if (node.nodeName === \"SCRIPT\" && node.type === \"text/ng-template\") {\n $templateCache.put(node.id, node.innerHTML);\n }\n });\n }\n if (angular.isUndefined(filesCache.get(url))) {\n filesCache.put(url, true);\n }\n deferred.resolve();\n }).error(function (err) {\n deferred.reject(new Error(\"Unable to load template file \\\"\" + url + \"\\\": \" + err));\n });\n });\n return $q.all(promises).then(function () {\n callback();\n }, function (err) {\n callback(err);\n });\n };\n $delegate.templatesLoader.ocLazyLoadLoader = true;\n\n return $delegate;\n }]);\n }]);\n})(angular);\n// Array.indexOf polyfill for IE8\nif (!Array.prototype.indexOf) {\n Array.prototype.indexOf = function (searchElement, fromIndex) {\n var k;\n\n // 1. Let O be the result of calling ToObject passing\n // the this value as the argument.\n if (this == null) {\n throw new TypeError(\"\\\"this\\\" is null or not defined\");\n }\n\n var O = Object(this);\n\n // 2. Let lenValue be the result of calling the Get\n // internal method of O with the argument \"length\".\n // 3. Let len be ToUint32(lenValue).\n var len = O.length >>> 0;\n\n // 4. If len is 0, return -1.\n if (len === 0) {\n return -1;\n }\n\n // 5. If argument fromIndex was passed let n be\n // ToInteger(fromIndex); else let n be 0.\n var n = +fromIndex || 0;\n\n if (Math.abs(n) === Infinity) {\n n = 0;\n }\n\n // 6. If n >= len, return -1.\n if (n >= len) {\n return -1;\n }\n\n // 7. If n >= 0, then Let k be n.\n // 8. Else, n<0, Let k be len - abs(n).\n // If k is less than 0, then let k be 0.\n k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\n\n // 9. Repeat, while k < len\n while (k < len) {\n // a. Let Pk be ToString(k).\n // This is implicit for LHS operands of the in operator\n // b. Let kPresent be the result of calling the\n // HasProperty internal method of O with argument Pk.\n // This step can be combined with c\n // c. If kPresent is true, then\n // i. Let elementK be the result of calling the Get\n // internal method of O with the argument ToString(k).\n // ii. Let same be the result of applying the\n // Strict Equality Comparison Algorithm to\n // searchElement and elementK.\n // iii. If same is true, return k.\n if (k in O && O[k] === searchElement) {\n return k;\n }\n k++;\n }\n return -1;\n };\n}\n//# sourceMappingURL=ocLazyLoad.require.js.map"],"sourceRoot":"/source/"} \ No newline at end of file +{"version":3,"sources":["ocLazyLoad.require.js"],"names":["angular","window","regModules","regInvokes","regConfigs","modulesToLoad","recordDeclarations","broadcast","noop","runBlocks","justLoaded","ocLazyLoad","module","provider","$controllerProvider","$provide","$compileProvider","$filterProvider","$injector","$animateProvider","_register","providers","registerModules","params","k","moduleName","moduleFn","tempRunBlocks","length","isString","getModuleName","indexOf","newModule","ngModuleFct","push","requires","_runBlocks","shift","isDefined","rerun","concat","_invokeQueue","reconfig","_configBlocks","pop","instanceInjector","getInstanceInjector","forEach","fn","invoke","_registerInvokeList","args","signature","data","isArray","hashCode","toString","isObject","stringify","invokeList","type","newInvoke","isUndefined","onInvoke","invokeName","hasOwnProperty","key","queue","i","len","Error","isNew","apply","callInvoke","fct","invoked","isFunction","j","jlen","name","moduleExists","e","test","message","modules","debug","events","moduleCache","value","this","Array","prototype","arguments","config","moduleConfig","_init","element","elements","names","NG_APP_CLASS_REGEXP","append","elm","document","getElementById","replace","querySelectorAll","className","match","exec","attributes","attr","jasmine","mocha","mock","console","error","addReg","mainModule","obj","cache","JSON","str","chr","hash","charCodeAt","$get","$log","$rootElement","$rootScope","$cacheFactory","$q","reject","deferred","defer","promise","filesCache","warn","info","injector","eventName","$broadcast","_broadcast","_$log","_getFilesCache","toggleWatch","watch","getModuleConfig","copy","setModuleConfig","getModules","isLoaded","modulesNames","moduleLoaded","_getModuleName","_getModule","_loadDependencies","localParams","loadedModule","diff","promisesList","self","when","getRequires","requireEntry","files","filter","n","filesLoader","then","all","inject","undefined","_addToLoadList","res","slice","loadNext","resolve","err","requireModule","bootstrapFct","bootstrap","force","configFn","directive","$ocLazyLoad","$compile","$animate","$parse","restrict","terminal","priority","compile","content","innerHTML","html","$scope","$element","$attr","model","$watch","load","enter","contents","nodeType","decorator","$delegate","$window","$interval","uaCssChecked","useCssLoadPatch","anchor","getElementsByTagName","buildElement","path","el","loaded","cacheBuster","url","dc","Date","getTime","substring","get","put","createElement","rel","href","src","remove","onload","onreadystatechange","readyState","onerror","async","serie","insertBeforeElem","lastChild","insertBefore","jQuery","querySelector","parentNode","ua","navigator","userAgent","toLowerCase","platform","v","appVersion","iOSVersion","parseFloat","parseInt","join","androidVersion","versionMatch","tries","interval","sheet","cssRules","cancel","cssFiles","templatesFiles","jsFiles","promises","cachePromise","extend","pushFile","m","file_type","substr","jsLoader","cssDeferred","cssLoader","templatesDeferred","templatesLoader","jsDeferred","originalModule","errText","originalParams","deferredList","template","paths","callback","ocLazyLoadLoader","require","$templateCache","$http","success","node","nodeName","id","searchElement","fromIndex","TypeError","O","Object","Infinity","Math","abs","max"],"mappings":"CAOA,SAAWA,EAASC,GAChB,YAEA,IAAIC,IAAc,KAAM,eACpBC,KACAC,KACAC,KACAC,KACAC,EAAYP,EAAQQ,KACpBC,KACAC,KAEAC,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KAHA7C,EAAIgR,KAAKE,IAAIpI,GAAK,EAAIA,EAAIjG,EAAMmO,KAAKC,IAAInI,GAAI,GAGlCjG,EAAJ7C,GAAS,CAaR,GAAIA,IAAK6Q,IAAKA,EAAE7Q,KAAO0Q,EACf,MAAO1Q,EAEfA,KAER,MAAO","file":"ocLazyLoad.require.min.js","sourcesContent":["/**\n * oclazyload - Load modules on demand (lazy load) with angularJS\n * @version v1.0.1\n * @link https://github.com/ocombe/ocLazyLoad\n * @license MIT\n * @author Olivier Combe \n */\n(function (angular, window) {\n \"use strict\";\n\n var regModules = [\"ng\", \"oc.lazyLoad\"],\n regInvokes = {},\n regConfigs = [],\n modulesToLoad = [],\n recordDeclarations = [],\n broadcast = angular.noop,\n runBlocks = {},\n justLoaded = [];\n\n var ocLazyLoad = angular.module(\"oc.lazyLoad\", [\"ng\"]);\n\n ocLazyLoad.provider(\"$ocLazyLoad\", [\"$controllerProvider\", \"$provide\", \"$compileProvider\", \"$filterProvider\", \"$injector\", \"$animateProvider\", function ($controllerProvider, $provide, $compileProvider, $filterProvider, $injector, $animateProvider) {\n var modules = {},\n providers = {\n $controllerProvider: $controllerProvider,\n $compileProvider: $compileProvider,\n $filterProvider: $filterProvider,\n $provide: $provide, // other things (constant, decorator, provider, factory, service)\n $injector: $injector,\n $animateProvider: $animateProvider\n },\n debug = false,\n events = false,\n moduleCache = [];\n\n moduleCache.push = function (value) {\n if (this.indexOf(value) === -1) {\n Array.prototype.push.apply(this, arguments);\n }\n };\n\n this.config = function (config) {\n // If we want to define modules configs\n if (angular.isDefined(config.modules)) {\n if (angular.isArray(config.modules)) {\n angular.forEach(config.modules, function (moduleConfig) {\n modules[moduleConfig.name] = moduleConfig;\n });\n } else {\n modules[config.modules.name] = config.modules;\n }\n }\n\n if (angular.isDefined(config.debug)) {\n debug = config.debug;\n }\n\n if (angular.isDefined(config.events)) {\n events = config.events;\n }\n };\n\n /**\n * Get the list of existing registered modules\n * @param element\n */\n this._init = function _init(element) {\n // this is probably useless now because we override angular.bootstrap\n if (modulesToLoad.length === 0) {\n var elements = [element],\n names = [\"ng:app\", \"ng-app\", \"x-ng-app\", \"data-ng-app\"],\n NG_APP_CLASS_REGEXP = /\\sng[:\\-]app(:\\s*([\\w\\d_]+);?)?\\s/,\n append = function append(elm) {\n return elm && elements.push(elm);\n };\n\n angular.forEach(names, function (name) {\n names[name] = true;\n append(document.getElementById(name));\n name = name.replace(\":\", \"\\\\:\");\n if (element[0].querySelectorAll) {\n angular.forEach(element[0].querySelectorAll(\".\" + name), append);\n angular.forEach(element[0].querySelectorAll(\".\" + name + \"\\\\:\"), append);\n angular.forEach(element[0].querySelectorAll(\"[\" + name + \"]\"), append);\n }\n });\n\n angular.forEach(elements, function (elm) {\n if (modulesToLoad.length === 0) {\n var className = \" \" + element.className + \" \";\n var match = NG_APP_CLASS_REGEXP.exec(className);\n if (match) {\n modulesToLoad.push((match[2] || \"\").replace(/\\s+/g, \",\"));\n } else {\n angular.forEach(elm.attributes, function (attr) {\n if (modulesToLoad.length === 0 && names[attr.name]) {\n modulesToLoad.push(attr.value);\n }\n });\n }\n }\n });\n }\n\n if (modulesToLoad.length === 0 && !((window.jasmine || window.mocha) && angular.isDefined(angular.mock))) {\n console.error(\"No module found during bootstrap, unable to init ocLazyLoad. You should always use the ng-app directive or angular.boostrap when you use ocLazyLoad.\");\n }\n\n var addReg = function addReg(moduleName) {\n if (regModules.indexOf(moduleName) === -1) {\n // register existing modules\n regModules.push(moduleName);\n var mainModule = angular.module(moduleName);\n\n // register existing components (directives, services, ...)\n _invokeQueue(null, mainModule._invokeQueue, moduleName);\n _invokeQueue(null, mainModule._configBlocks, moduleName); // angular 1.3+\n\n angular.forEach(mainModule.requires, addReg);\n }\n };\n\n angular.forEach(modulesToLoad, function (moduleName) {\n addReg(moduleName);\n });\n\n modulesToLoad = []; // reset for next bootstrap\n recordDeclarations.pop(); // wait for the next lazy load\n };\n\n /**\n * Like JSON.stringify but that doesn't throw on circular references\n * @param obj\n */\n var stringify = function stringify(obj) {\n var cache = [];\n return JSON.stringify(obj, function (key, value) {\n if (angular.isObject(value) && value !== null) {\n if (cache.indexOf(value) !== -1) {\n // Circular reference found, discard key\n return;\n }\n // Store value in our collection\n cache.push(value);\n }\n return value;\n });\n };\n\n var hashCode = function hashCode(str) {\n var hash = 0,\n i,\n chr,\n len;\n if (str.length == 0) {\n return hash;\n }\n for (i = 0, len = str.length; i < len; i++) {\n chr = str.charCodeAt(i);\n hash = (hash << 5) - hash + chr;\n hash |= 0; // Convert to 32bit integer\n }\n return hash;\n };\n\n function _register(providers, registerModules, params) {\n if (registerModules) {\n var k,\n moduleName,\n moduleFn,\n tempRunBlocks = [];\n for (k = registerModules.length - 1; k >= 0; k--) {\n moduleName = registerModules[k];\n if (!angular.isString(moduleName)) {\n moduleName = getModuleName(moduleName);\n }\n if (!moduleName || justLoaded.indexOf(moduleName) !== -1) {\n continue;\n }\n var newModule = regModules.indexOf(moduleName) === -1;\n moduleFn = ngModuleFct(moduleName);\n if (newModule) {\n // new module\n regModules.push(moduleName);\n _register(providers, moduleFn.requires, params);\n }\n if (moduleFn._runBlocks.length > 0) {\n // new run blocks detected! Replace the old ones (if existing)\n runBlocks[moduleName] = [];\n while (moduleFn._runBlocks.length > 0) {\n runBlocks[moduleName].push(moduleFn._runBlocks.shift());\n }\n }\n if (angular.isDefined(runBlocks[moduleName]) && (newModule || params.rerun)) {\n tempRunBlocks = tempRunBlocks.concat(runBlocks[moduleName]);\n }\n _invokeQueue(providers, moduleFn._invokeQueue, moduleName, params.reconfig);\n _invokeQueue(providers, moduleFn._configBlocks, moduleName, params.reconfig); // angular 1.3+\n broadcast(newModule ? \"ocLazyLoad.moduleLoaded\" : \"ocLazyLoad.moduleReloaded\", moduleName);\n registerModules.pop();\n justLoaded.push(moduleName);\n }\n // execute the run blocks at the end\n var instanceInjector = providers.getInstanceInjector();\n angular.forEach(tempRunBlocks, function (fn) {\n instanceInjector.invoke(fn);\n });\n }\n }\n\n function _registerInvokeList(args, moduleName) {\n var invokeList = args[2][0],\n type = args[1],\n newInvoke = false;\n if (angular.isUndefined(regInvokes[moduleName])) {\n regInvokes[moduleName] = {};\n }\n if (angular.isUndefined(regInvokes[moduleName][type])) {\n regInvokes[moduleName][type] = {};\n }\n var onInvoke = function onInvoke(invokeName, signature) {\n if (!regInvokes[moduleName][type].hasOwnProperty(invokeName)) {\n regInvokes[moduleName][type][invokeName] = [];\n }\n if (regInvokes[moduleName][type][invokeName].indexOf(signature) === -1) {\n newInvoke = true;\n regInvokes[moduleName][type][invokeName].push(signature);\n broadcast(\"ocLazyLoad.componentLoaded\", [moduleName, type, invokeName]);\n }\n };\n\n function signature(data) {\n if (angular.isArray(data)) {\n // arrays are objects, we need to test for it first\n return hashCode(data.toString());\n } else if (angular.isObject(data)) {\n // constants & values for example\n return hashCode(stringify(data));\n } else {\n if (angular.isDefined(data) && data !== null) {\n return hashCode(data.toString());\n } else {\n // null & undefined constants\n return data;\n }\n }\n }\n\n if (angular.isString(invokeList)) {\n onInvoke(invokeList, signature(args[2][1]));\n } else if (angular.isObject(invokeList)) {\n angular.forEach(invokeList, function (invoke, key) {\n if (angular.isString(invoke)) {\n // decorators for example\n onInvoke(invoke, signature(invokeList[1]));\n } else {\n // components registered as object lists {\"componentName\": function() {}}\n onInvoke(key, signature(invoke));\n }\n });\n } else {\n return false;\n }\n return newInvoke;\n }\n\n function _invokeQueue(providers, queue, moduleName, reconfig) {\n if (!queue) {\n return;\n }\n\n var i, len, args, provider;\n for (i = 0, len = queue.length; i < len; i++) {\n args = queue[i];\n if (angular.isArray(args)) {\n if (providers !== null) {\n if (providers.hasOwnProperty(args[0])) {\n provider = providers[args[0]];\n } else {\n throw new Error(\"unsupported provider \" + args[0]);\n }\n }\n var isNew = _registerInvokeList(args, moduleName);\n if (args[1] !== \"invoke\") {\n if (isNew && angular.isDefined(provider)) {\n provider[args[1]].apply(provider, args[2]);\n }\n } else {\n // config block\n var callInvoke = function callInvoke(fct) {\n var invoked = regConfigs.indexOf(\"\" + moduleName + \"-\" + fct);\n if (invoked === -1 || reconfig) {\n if (invoked === -1) {\n regConfigs.push(\"\" + moduleName + \"-\" + fct);\n }\n if (angular.isDefined(provider)) {\n provider[args[1]].apply(provider, args[2]);\n }\n }\n };\n if (angular.isFunction(args[2][0])) {\n callInvoke(args[2][0]);\n } else if (angular.isArray(args[2][0])) {\n for (var j = 0, jlen = args[2][0].length; j < jlen; j++) {\n if (angular.isFunction(args[2][0][j])) {\n callInvoke(args[2][0][j]);\n }\n }\n }\n }\n }\n }\n }\n\n function getModuleName(module) {\n var moduleName = null;\n if (angular.isString(module)) {\n moduleName = module;\n } else if (angular.isObject(module) && module.hasOwnProperty(\"name\") && angular.isString(module.name)) {\n moduleName = module.name;\n }\n return moduleName;\n }\n\n function moduleExists(moduleName) {\n if (!angular.isString(moduleName)) {\n return false;\n }\n try {\n return ngModuleFct(moduleName);\n } catch (e) {\n if (/No module/.test(e) || e.message.indexOf(\"$injector:nomod\") > -1) {\n return false;\n }\n }\n }\n\n this.$get = [\"$log\", \"$rootElement\", \"$rootScope\", \"$cacheFactory\", \"$q\", function ($log, $rootElement, $rootScope, $cacheFactory, $q) {\n var instanceInjector,\n filesCache = $cacheFactory(\"ocLazyLoad\");\n\n if (!debug) {\n $log = {};\n $log.error = angular.noop;\n $log.warn = angular.noop;\n $log.info = angular.noop;\n }\n\n // Make this lazy because when $get() is called the instance injector hasn't been assigned to the rootElement yet\n providers.getInstanceInjector = function () {\n return instanceInjector ? instanceInjector : instanceInjector = $rootElement.data(\"$injector\") || angular.injector();\n };\n\n broadcast = function broadcast(eventName, params) {\n if (events) {\n $rootScope.$broadcast(eventName, params);\n }\n if (debug) {\n $log.info(eventName, params);\n }\n };\n\n function reject(e) {\n var deferred = $q.defer();\n $log.error(e.message);\n deferred.reject(e);\n return deferred.promise;\n }\n\n return {\n _broadcast: broadcast,\n\n _$log: $log,\n\n /**\n * Returns the files cache used by the loaders to store the files currently loading\n * @returns {*}\n */\n _getFilesCache: function getFilesCache() {\n return filesCache;\n },\n\n /**\n * Let the service know that it should monitor angular.module because files are loading\n * @param watch boolean\n */\n toggleWatch: function toggleWatch(watch) {\n if (watch) {\n recordDeclarations.push(true);\n } else {\n recordDeclarations.pop();\n }\n },\n\n /**\n * Let you get a module config object\n * @param moduleName String the name of the module\n * @returns {*}\n */\n getModuleConfig: function getModuleConfig(moduleName) {\n if (!angular.isString(moduleName)) {\n throw new Error(\"You need to give the name of the module to get\");\n }\n if (!modules[moduleName]) {\n return null;\n }\n return angular.copy(modules[moduleName]);\n },\n\n /**\n * Let you define a module config object\n * @param moduleConfig Object the module config object\n * @returns {*}\n */\n setModuleConfig: function setModuleConfig(moduleConfig) {\n if (!angular.isObject(moduleConfig)) {\n throw new Error(\"You need to give the module config object to set\");\n }\n modules[moduleConfig.name] = moduleConfig;\n return moduleConfig;\n },\n\n /**\n * Returns the list of loaded modules\n * @returns {string[]}\n */\n getModules: function () {\n return regModules;\n },\n\n /**\n * Let you check if a module has been loaded into Angular or not\n * @param modulesNames String/Object a module name, or a list of module names\n * @returns {boolean}\n */\n isLoaded: function isLoaded(modulesNames) {\n var moduleLoaded = function moduleLoaded(module) {\n var isLoaded = regModules.indexOf(module) > -1;\n if (!isLoaded) {\n isLoaded = !!moduleExists(module);\n }\n return isLoaded;\n };\n if (angular.isString(modulesNames)) {\n modulesNames = [modulesNames];\n }\n if (angular.isArray(modulesNames)) {\n var i, len;\n for (i = 0, len = modulesNames.length; i < len; i++) {\n if (!moduleLoaded(modulesNames[i])) {\n return false;\n }\n }\n return true;\n } else {\n throw new Error(\"You need to define the module(s) name(s)\");\n }\n },\n\n /**\n * Given a module, return its name\n * @param module\n * @returns {String}\n */\n _getModuleName: getModuleName,\n\n /**\n * Returns a module if it exists\n * @param moduleName\n * @returns {module}\n */\n _getModule: function getModule(moduleName) {\n try {\n return ngModuleFct(moduleName);\n } catch (e) {\n // this error message really suxx\n if (/No module/.test(e) || e.message.indexOf(\"$injector:nomod\") > -1) {\n e.message = \"The module \\\"\" + stringify(moduleName) + \"\\\" that you are trying to load does not exist. \" + e.message;\n }\n throw e;\n }\n },\n\n /**\n * Check if a module exists and returns it if it does\n * @param moduleName\n * @returns {boolean}\n */\n moduleExists: moduleExists,\n\n /**\n * Load the dependencies, and might try to load new files depending on the config\n * @param moduleName (String or Array of Strings)\n * @param localParams\n * @returns {*}\n * @private\n */\n _loadDependencies: function _loadDependencies(moduleName, localParams) {\n var loadedModule,\n requires,\n diff,\n promisesList = [],\n self = this;\n\n moduleName = self._getModuleName(moduleName);\n\n if (moduleName === null) {\n return $q.when();\n } else {\n try {\n loadedModule = self._getModule(moduleName);\n } catch (e) {\n return reject(e);\n }\n // get unloaded requires\n requires = self.getRequires(loadedModule);\n }\n\n angular.forEach(requires, function (requireEntry) {\n // If no configuration is provided, try and find one from a previous load.\n // If there isn't one, bail and let the normal flow run\n if (angular.isString(requireEntry)) {\n var config = self.getModuleConfig(requireEntry);\n if (config === null) {\n moduleCache.push(requireEntry); // We don't know about this module, but something else might, so push it anyway.\n return;\n }\n requireEntry = config;\n }\n\n // Check if this dependency has been loaded previously\n if (self.moduleExists(requireEntry.name)) {\n // compare against the already loaded module to see if the new definition adds any new files\n diff = requireEntry.files.filter(function (n) {\n return self.getModuleConfig(requireEntry.name).files.indexOf(n) < 0;\n });\n\n // If the module was redefined, advise via the console\n if (diff.length !== 0) {\n self._$log.warn(\"Module \\\"\", moduleName, \"\\\" attempted to redefine configuration for dependency. \\\"\", requireEntry.name, \"\\\"\\n Additional Files Loaded:\", diff);\n }\n\n // Push everything to the file loader, it will weed out the duplicates.\n if (angular.isDefined(self.filesLoader)) {\n // if a files loader is defined\n promisesList.push(self.filesLoader(requireEntry, localParams).then(function () {\n return self._loadDependencies(requireEntry);\n }));\n } else {\n return reject(new Error(\"Error: New dependencies need to be loaded from external files (\" + requireEntry.files + \"), but no loader has been defined.\"));\n }\n return;\n } else if (angular.isArray(requireEntry)) {\n requireEntry = {\n files: requireEntry\n };\n } else if (angular.isObject(requireEntry)) {\n if (requireEntry.hasOwnProperty(\"name\") && requireEntry.name) {\n // The dependency doesn't exist in the module cache and is a new configuration, so store and push it.\n self.setModuleConfig(requireEntry);\n moduleCache.push(requireEntry.name);\n }\n }\n\n // Check if the dependency has any files that need to be loaded. If there are, push a new promise to the promise list.\n if (angular.isDefined(requireEntry.files) && requireEntry.files.length !== 0) {\n if (angular.isDefined(self.filesLoader)) {\n // if a files loader is defined\n promisesList.push(self.filesLoader(requireEntry, localParams).then(function () {\n return self._loadDependencies(requireEntry);\n }));\n } else {\n return reject(new Error(\"Error: the module \\\"\" + requireEntry.name + \"\\\" is defined in external files (\" + requireEntry.files + \"), but no loader has been defined.\"));\n }\n }\n });\n\n // Create a wrapper promise to watch the promise list and resolve it once everything is done.\n return $q.all(promisesList);\n },\n\n /**\n * Inject new modules into Angular\n * @param moduleName\n * @param localParams\n */\n inject: function inject(moduleName) {\n var localParams = arguments[1] === undefined ? {} : arguments[1];\n\n var self = this,\n deferred = $q.defer();\n if (angular.isDefined(moduleName) && moduleName !== null) {\n if (angular.isArray(moduleName)) {\n var promisesList = [];\n angular.forEach(moduleName, function (module) {\n promisesList.push(self.inject(module));\n });\n return $q.all(promisesList);\n } else {\n self._addToLoadList(self._getModuleName(moduleName), true);\n }\n }\n if (modulesToLoad.length > 0) {\n var res = modulesToLoad.slice(); // clean copy\n var loadNext = function loadNext(moduleName) {\n moduleCache.push(moduleName);\n self._loadDependencies(moduleName, localParams).then(function success() {\n try {\n justLoaded = [];\n _register(providers, moduleCache, localParams);\n } catch (e) {\n self._$log.error(e.message);\n deferred.reject(e);\n return;\n }\n\n if (modulesToLoad.length > 0) {\n loadNext(modulesToLoad.shift()); // load the next in list\n } else {\n deferred.resolve(res); // everything has been loaded, resolve\n }\n }, function error(err) {\n deferred.reject(err);\n });\n };\n\n // load the first in list\n loadNext(modulesToLoad.shift());\n } else {\n deferred.resolve();\n }\n return deferred.promise;\n },\n\n /**\n * Get the list of required modules/services/... for this module\n * @param module\n * @returns {Array}\n */\n getRequires: function getRequires(module) {\n var requires = [];\n angular.forEach(module.requires, function (requireModule) {\n if (regModules.indexOf(requireModule) === -1) {\n requires.push(requireModule);\n }\n });\n return requires;\n },\n\n /**\n * Invoke the new modules & component by their providers\n * @param providers\n * @param queue\n * @param moduleName\n * @param reconfig\n * @private\n */\n _invokeQueue: _invokeQueue,\n\n /**\n * Check if a module has been invoked and registers it if not\n * @param args\n * @param moduleName\n * @returns {boolean} is new\n */\n _registerInvokeList: _registerInvokeList,\n\n /**\n * Register a new module and loads it, executing the run/config blocks if needed\n * @param providers\n * @param registerModules\n * @param params\n * @private\n */\n _register: _register,\n\n /**\n * Add a module name to the list of modules that will be loaded in the next inject\n * @param name\n * @param force\n * @private\n */\n _addToLoadList: _addToLoadList\n };\n }];\n\n // Let's get the list of loaded modules & components\n this._init(angular.element(window.document));\n }]);\n\n var bootstrapFct = angular.bootstrap;\n angular.bootstrap = function (element, modules, config) {\n // we use slice to make a clean copy\n angular.forEach(modules.slice(), function (module) {\n _addToLoadList(module, true);\n });\n return bootstrapFct(element, modules, config);\n };\n\n var _addToLoadList = function _addToLoadList(name, force) {\n if ((recordDeclarations.length > 0 || force) && angular.isString(name) && modulesToLoad.indexOf(name) === -1) {\n modulesToLoad.push(name);\n }\n };\n\n var ngModuleFct = angular.module;\n angular.module = function (name, requires, configFn) {\n _addToLoadList(name);\n return ngModuleFct(name, requires, configFn);\n };\n})(angular, window);\n(function (angular) {\n \"use strict\";\n\n angular.module(\"oc.lazyLoad\").directive(\"ocLazyLoad\", [\"$ocLazyLoad\", \"$compile\", \"$animate\", \"$parse\", function ($ocLazyLoad, $compile, $animate, $parse) {\n return {\n restrict: \"A\",\n terminal: true,\n priority: 1000,\n compile: function compile(element, attrs) {\n // we store the content and remove it before compilation\n var content = element[0].innerHTML;\n element.html(\"\");\n\n return function ($scope, $element, $attr) {\n var model = $parse($attr.ocLazyLoad);\n $scope.$watch(function () {\n return model($scope) || $attr.ocLazyLoad; // it can be a module name (string), an object, an array, or a scope reference to any of this\n }, function (moduleName) {\n if (angular.isDefined(moduleName)) {\n $ocLazyLoad.load(moduleName).then(function () {\n $animate.enter(content, $element);\n var contents = element.contents();\n angular.forEach(contents, function (content) {\n if (content.nodeType !== 3) {\n // 3 is a text node\n $compile(content)($scope);\n }\n });\n });\n }\n }, true);\n };\n }\n };\n }]);\n})(angular);\n(function (angular) {\n \"use strict\";\n\n angular.module(\"oc.lazyLoad\").config([\"$provide\", function ($provide) {\n $provide.decorator(\"$ocLazyLoad\", [\"$delegate\", \"$q\", \"$window\", \"$interval\", function ($delegate, $q, $window, $interval) {\n var uaCssChecked = false,\n useCssLoadPatch = false,\n anchor = $window.document.getElementsByTagName(\"head\")[0] || $window.document.getElementsByTagName(\"body\")[0];\n\n /**\n * Load a js/css file\n * @param type\n * @param path\n * @param params\n * @returns promise\n */\n $delegate.buildElement = function buildElement(type, path, params) {\n var deferred = $q.defer(),\n el,\n loaded,\n filesCache = $delegate._getFilesCache(),\n cacheBuster = function cacheBuster(url) {\n var dc = new Date().getTime();\n if (url.indexOf(\"?\") >= 0) {\n if (url.substring(0, url.length - 1) === \"&\") {\n return \"\" + url + \"_dc=\" + dc;\n }\n return \"\" + url + \"&_dc=\" + dc;\n } else {\n return \"\" + url + \"?_dc=\" + dc;\n }\n };\n\n // Store the promise early so the file load can be detected by other parallel lazy loads\n // (ie: multiple routes on one page) a 'true' value isn't sufficient\n // as it causes false positive load results.\n if (angular.isUndefined(filesCache.get(path))) {\n filesCache.put(path, deferred.promise);\n }\n\n // Switch in case more content types are added later\n switch (type) {\n case \"css\":\n el = $window.document.createElement(\"link\");\n el.type = \"text/css\";\n el.rel = \"stylesheet\";\n el.href = params.cache === false ? cacheBuster(path) : path;\n break;\n case \"js\":\n el = $window.document.createElement(\"script\");\n el.src = params.cache === false ? cacheBuster(path) : path;\n break;\n default:\n filesCache.remove(path);\n deferred.reject(new Error(\"Requested type \\\"\" + type + \"\\\" is not known. Could not inject \\\"\" + path + \"\\\"\"));\n break;\n }\n el.onload = el.onreadystatechange = function (e) {\n if (el.readyState && !/^c|loade/.test(el.readyState) || loaded) return;\n el.onload = el.onreadystatechange = null;\n loaded = 1;\n $delegate._broadcast(\"ocLazyLoad.fileLoaded\", path);\n deferred.resolve();\n };\n el.onerror = function () {\n filesCache.remove(path);\n deferred.reject(new Error(\"Unable to load \" + path));\n };\n el.async = params.serie ? 0 : 1;\n\n var insertBeforeElem = anchor.lastChild;\n if (params.insertBefore) {\n var element = angular.element(angular.isDefined(window.jQuery) ? params.insertBefore : document.querySelector(params.insertBefore));\n if (element && element.length > 0) {\n insertBeforeElem = element[0];\n }\n }\n insertBeforeElem.parentNode.insertBefore(el, insertBeforeElem);\n\n /*\n The event load or readystatechange doesn't fire in:\n - iOS < 6 (default mobile browser)\n - Android < 4.4 (default mobile browser)\n - Safari < 6 (desktop browser)\n */\n if (type == \"css\") {\n if (!uaCssChecked) {\n var ua = $window.navigator.userAgent.toLowerCase();\n\n // iOS < 6\n if (/iP(hone|od|ad)/.test($window.navigator.platform)) {\n var v = $window.navigator.appVersion.match(/OS (\\d+)_(\\d+)_?(\\d+)?/);\n var iOSVersion = parseFloat([parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)].join(\".\"));\n useCssLoadPatch = iOSVersion < 6;\n } else if (ua.indexOf(\"android\") > -1) {\n // Android < 4.4\n var androidVersion = parseFloat(ua.slice(ua.indexOf(\"android\") + 8));\n useCssLoadPatch = androidVersion < 4.4;\n } else if (ua.indexOf(\"safari\") > -1) {\n var versionMatch = ua.match(/version\\/([\\.\\d]+)/i);\n useCssLoadPatch = versionMatch && versionMatch[1] && parseFloat(versionMatch[1]) < 6;\n }\n }\n\n if (useCssLoadPatch) {\n var tries = 1000; // * 20 = 20000 miliseconds\n var interval = $interval(function () {\n try {\n el.sheet.cssRules;\n $interval.cancel(interval);\n el.onload();\n } catch (e) {\n if (--tries <= 0) {\n el.onerror();\n }\n }\n }, 20);\n }\n }\n\n return deferred.promise;\n };\n\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n \"use strict\";\n\n angular.module(\"oc.lazyLoad\").config([\"$provide\", function ($provide) {\n $provide.decorator(\"$ocLazyLoad\", [\"$delegate\", \"$q\", function ($delegate, $q) {\n /**\n * The function that loads new files\n * @param config\n * @param params\n * @returns {*}\n */\n $delegate.filesLoader = function filesLoader(config) {\n var params = arguments[1] === undefined ? {} : arguments[1];\n\n var cssFiles = [],\n templatesFiles = [],\n jsFiles = [],\n promises = [],\n cachePromise = null,\n filesCache = $delegate._getFilesCache();\n\n $delegate.toggleWatch(true); // start watching angular.module calls\n\n angular.extend(params, config);\n\n var pushFile = function pushFile(path) {\n var file_type = null,\n m;\n if (angular.isObject(path)) {\n file_type = path.type;\n path = path.path;\n }\n cachePromise = filesCache.get(path);\n if (angular.isUndefined(cachePromise) || params.cache === false) {\n\n // always check for requirejs syntax just in case\n if ((m = /^(css|less|html|htm|js)?(?=!)/.exec(path)) !== null) {\n // Detect file type using preceding type declaration (ala requireJS)\n file_type = m[1];\n path = path.substr(m[1].length + 1, path.length); // Strip the type from the path\n }\n\n if (!file_type) {\n if ((m = /[.](css|less|html|htm|js)?((\\?|#).*)?$/.exec(path)) !== null) {\n // Detect file type via file extension\n file_type = m[1];\n } else if (!$delegate.jsLoader.hasOwnProperty(\"ocLazyLoadLoader\") && $delegate.jsLoader.hasOwnProperty(\"load\")) {\n // requirejs\n file_type = \"js\";\n } else {\n $delegate._$log.error(\"File type could not be determined. \" + path);\n return;\n }\n }\n\n if ((file_type === \"css\" || file_type === \"less\") && cssFiles.indexOf(path) === -1) {\n cssFiles.push(path);\n } else if ((file_type === \"html\" || file_type === \"htm\") && templatesFiles.indexOf(path) === -1) {\n templatesFiles.push(path);\n } else if (file_type === \"js\" || jsFiles.indexOf(path) === -1) {\n jsFiles.push(path);\n } else {\n $delegate._$log.error(\"File type is not valid. \" + path);\n }\n } else if (cachePromise) {\n promises.push(cachePromise);\n }\n };\n\n if (params.serie) {\n pushFile(params.files.shift());\n } else {\n angular.forEach(params.files, function (path) {\n pushFile(path);\n });\n }\n\n if (cssFiles.length > 0) {\n var cssDeferred = $q.defer();\n $delegate.cssLoader(cssFiles, function (err) {\n if (angular.isDefined(err) && $delegate.cssLoader.hasOwnProperty(\"ocLazyLoadLoader\")) {\n $delegate._$log.error(err);\n cssDeferred.reject(err);\n } else {\n cssDeferred.resolve();\n }\n }, params);\n promises.push(cssDeferred.promise);\n }\n\n if (templatesFiles.length > 0) {\n var templatesDeferred = $q.defer();\n $delegate.templatesLoader(templatesFiles, function (err) {\n if (angular.isDefined(err) && $delegate.templatesLoader.hasOwnProperty(\"ocLazyLoadLoader\")) {\n $delegate._$log.error(err);\n templatesDeferred.reject(err);\n } else {\n templatesDeferred.resolve();\n }\n }, params);\n promises.push(templatesDeferred.promise);\n }\n\n if (jsFiles.length > 0) {\n var jsDeferred = $q.defer();\n $delegate.jsLoader(jsFiles, function (err) {\n if (angular.isDefined(err) && $delegate.jsLoader.hasOwnProperty(\"ocLazyLoadLoader\")) {\n $delegate._$log.error(err);\n jsDeferred.reject(err);\n } else {\n jsDeferred.resolve();\n }\n }, params);\n promises.push(jsDeferred.promise);\n }\n\n if (promises.length === 0) {\n var deferred = $q.defer(),\n err = \"Error: no file to load has been found, if you're trying to load an existing module you should use the 'inject' method instead of 'load'.\";\n $delegate._$log.error(err);\n deferred.reject(err);\n return deferred.promise;\n } else if (params.serie && params.files.length > 0) {\n return $q.all(promises).then(function () {\n return $delegate.filesLoader(config, params);\n });\n } else {\n return $q.all(promises)[\"finally\"](function (res) {\n $delegate.toggleWatch(false); // stop watching angular.module calls\n return res;\n });\n }\n };\n\n /**\n * Load a module or a list of modules into Angular\n * @param module Mixed the name of a predefined module config object, or a module config object, or an array of either\n * @param params Object optional parameters\n * @returns promise\n */\n $delegate.load = function (originalModule) {\n var originalParams = arguments[1] === undefined ? {} : arguments[1];\n\n var self = this,\n config = null,\n deferredList = [],\n deferred = $q.defer(),\n errText;\n\n // clean copy\n var module = angular.copy(originalModule);\n var params = angular.copy(originalParams);\n\n // If module is an array, break it down\n if (angular.isArray(module)) {\n // Resubmit each entry as a single module\n angular.forEach(module, function (m) {\n deferredList.push(self.load(m, params));\n });\n\n // Resolve the promise once everything has loaded\n $q.all(deferredList).then(function (res) {\n deferred.resolve(res);\n }, function (err) {\n deferred.reject(err);\n });\n\n return deferred.promise;\n }\n\n // Get or Set a configuration depending on what was passed in\n if (angular.isString(module)) {\n config = self.getModuleConfig(module);\n if (!config) {\n config = {\n files: [module]\n };\n }\n } else if (angular.isObject(module)) {\n // case {type: 'js', path: lazyLoadUrl + 'testModule.fakejs'}\n if (angular.isDefined(module.path) && angular.isDefined(module.type)) {\n config = {\n files: [module]\n };\n } else {\n config = self.setModuleConfig(module);\n }\n }\n\n if (config === null) {\n var moduleName = self._getModuleName(module);\n errText = \"Module \\\"\" + (moduleName || \"unknown\") + \"\\\" is not configured, cannot load.\";\n $delegate._$log.error(errText);\n deferred.reject(new Error(errText));\n return deferred.promise;\n } else {\n // deprecated\n if (angular.isDefined(config.template)) {\n if (angular.isUndefined(config.files)) {\n config.files = [];\n }\n if (angular.isString(config.template)) {\n config.files.push(config.template);\n } else if (angular.isArray(config.template)) {\n config.files.concat(config.template);\n }\n }\n }\n\n var localParams = angular.extend({}, params, config);\n\n // if someone used an external loader and called the load function with just the module name\n if (angular.isUndefined(config.files) && angular.isDefined(config.name) && $delegate.moduleExists(config.name)) {\n return $delegate.inject(config.name, localParams);\n }\n\n $delegate.filesLoader(config, localParams).then(function () {\n $delegate.inject(null, localParams).then(function (res) {\n deferred.resolve(res);\n }, function (err) {\n deferred.reject(err);\n });\n }, function (err) {\n deferred.reject(err);\n });\n\n return deferred.promise;\n };\n\n // return the patched service\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n \"use strict\";\n\n angular.module(\"oc.lazyLoad\").config([\"$provide\", function ($provide) {\n $provide.decorator(\"$ocLazyLoad\", [\"$delegate\", \"$q\", function ($delegate, $q) {\n /**\r\n * cssLoader function\r\n * @type Function\r\n * @param paths array list of css files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters\r\n * because the user can overwrite cssLoader and it will probably not use promises :(\r\n */\n $delegate.cssLoader = function (paths, callback, params) {\n var promises = [];\n angular.forEach(paths, function (path) {\n promises.push($delegate.buildElement(\"css\", path, params));\n });\n $q.all(promises).then(function () {\n callback();\n }, function (err) {\n callback(err);\n });\n };\n $delegate.cssLoader.ocLazyLoadLoader = true;\n\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n \"use strict\";\n\n angular.module(\"oc.lazyLoad\").config([\"$provide\", function ($provide) {\n $provide.decorator(\"$ocLazyLoad\", [\"$delegate\", \"$q\", function ($delegate, $q) {\n /**\r\n * jsLoader function\r\n * @type Function\r\n * @param paths array list of js files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters\r\n * because the user can overwrite jsLoader and it will probably not use promises :(\r\n */\n $delegate.jsLoader = require;\n\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n \"use strict\";\n\n angular.module(\"oc.lazyLoad\").config([\"$provide\", function ($provide) {\n $provide.decorator(\"$ocLazyLoad\", [\"$delegate\", \"$templateCache\", \"$q\", \"$http\", function ($delegate, $templateCache, $q, $http) {\n /**\r\n * templatesLoader function\r\n * @type Function\r\n * @param paths array list of css files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters for $http\r\n * because the user can overwrite templatesLoader and it will probably not use promises :(\r\n */\n $delegate.templatesLoader = function (paths, callback, params) {\n var promises = [],\n filesCache = $delegate._getFilesCache();\n\n angular.forEach(paths, function (url) {\n var deferred = $q.defer();\n promises.push(deferred.promise);\n $http.get(url, params).success(function (data) {\n if (angular.isString(data) && data.length > 0) {\n angular.forEach(angular.element(data), function (node) {\n if (node.nodeName === \"SCRIPT\" && node.type === \"text/ng-template\") {\n $templateCache.put(node.id, node.innerHTML);\n }\n });\n }\n if (angular.isUndefined(filesCache.get(url))) {\n filesCache.put(url, true);\n }\n deferred.resolve();\n }).error(function (err) {\n deferred.reject(new Error(\"Unable to load template file \\\"\" + url + \"\\\": \" + err));\n });\n });\n return $q.all(promises).then(function () {\n callback();\n }, function (err) {\n callback(err);\n });\n };\n $delegate.templatesLoader.ocLazyLoadLoader = true;\n\n return $delegate;\n }]);\n }]);\n})(angular);\n// Array.indexOf polyfill for IE8\nif (!Array.prototype.indexOf) {\n Array.prototype.indexOf = function (searchElement, fromIndex) {\n var k;\n\n // 1. Let O be the result of calling ToObject passing\n // the this value as the argument.\n if (this == null) {\n throw new TypeError(\"\\\"this\\\" is null or not defined\");\n }\n\n var O = Object(this);\n\n // 2. Let lenValue be the result of calling the Get\n // internal method of O with the argument \"length\".\n // 3. Let len be ToUint32(lenValue).\n var len = O.length >>> 0;\n\n // 4. If len is 0, return -1.\n if (len === 0) {\n return -1;\n }\n\n // 5. If argument fromIndex was passed let n be\n // ToInteger(fromIndex); else let n be 0.\n var n = +fromIndex || 0;\n\n if (Math.abs(n) === Infinity) {\n n = 0;\n }\n\n // 6. If n >= len, return -1.\n if (n >= len) {\n return -1;\n }\n\n // 7. If n >= 0, then Let k be n.\n // 8. Else, n<0, Let k be len - abs(n).\n // If k is less than 0, then let k be 0.\n k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\n\n // 9. Repeat, while k < len\n while (k < len) {\n // a. Let Pk be ToString(k).\n // This is implicit for LHS operands of the in operator\n // b. Let kPresent be the result of calling the\n // HasProperty internal method of O with argument Pk.\n // This step can be combined with c\n // c. If kPresent is true, then\n // i. Let elementK be the result of calling the Get\n // internal method of O with the argument ToString(k).\n // ii. Let same be the result of applying the\n // Strict Equality Comparison Algorithm to\n // searchElement and elementK.\n // iii. If same is true, return k.\n if (k in O && O[k] === searchElement) {\n return k;\n }\n k++;\n }\n return -1;\n };\n}\n//# sourceMappingURL=ocLazyLoad.require.js.map"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/package.json b/package.json index 247d719..72c2ab5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "oclazyload", - "version": "1.0.0", + "version": "1.0.1", "description": "Load modules on demand (lazy load) with angularJS", "main": "dist/ocLazyLoad.js", "author": "Olivier Combe ",