1(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?factory(exports):typeof define==='function'&&define.amd?define(['exports'],factory):(factory((global.loadJsCss={})));}(this,(function(exports){'use strict';function loadList(resources,options){options=options||{};var i=0,delayScripts=options.delayScripts||false,scripts=[],resource;for(;i<resources.length;i+=1){resource=resources[i];switch(resource.type&&resource.type.toLowerCase()){case'js':case'javascript':case'script':if(delayScripts===false){loadJs(resource);}else{scripts.push(resource);} 2break;case'css':case'stylesheet':loadCss(resource);break;default:console.error('Could not determine type of resource: '+JSON.stringify(resource));}} 3if(scripts.length){setTimeout(function(){options.delayScripts=false;loadList(scripts,options);},delayScripts);}} 4function loadJs(options){var script=document.createElement('script'),src=options.src||options.path||options.href,cb=options.callback;script.async=!!options.async||false;script.src=src;if(options.attrs){_setAttributes(script,options.attrs)} 5if(typeof cb==='function'){var onEnd='onload'in script?_stdOnEnd:_ieOnEnd;onEnd(script,cb);if(!script.onload){_stdOnEnd(script,cb);}} 6_getHead().appendChild(script);} 7function loadCss(options){var link=document.createElement('link'),href=options.href||options.path||options.src,cb=options.callback;link.rel='stylesheet';link.href=href;if(options.attrs){_setAttributes(link,options.attrs)} 8_getHead().appendChild(link);if(typeof cb==='function'){var img=document.createElement('img');img.onerror=function(e){cb(e,link);};img.onload=function(){cb(null,link);};img.src=href;}} 9function _setAttributes(element,attributes){for(var attributeName in attributes){if(attributes.hasOwnProperty(attributeName)){element.setAttribute(attributeName,attributes[attributeName]);}}} 10function _stdOnEnd(script,cb){script.onload=function(){this.onerror=this.onload=null;cb(null,script)};script.onerror=function(){this.onerror=this.onload=null;cb(new Error('Failed to load '+this.src),script)}} 11function _ieOnEnd(script,cb){script.onreadystatechange=function(){if(this.readyState!=='complete'&&this.readyState!=='loaded'){return;} 12this.onreadystatechange=null;cb(null,script)}} 13function _getHead(){return document.head||document.getElementsByTagName('head')[0];} 14exports.js=loadJs;exports.css=loadCss;exports.list=loadList;})));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.