/** * IST: Indented Selector Templating * version 0.6.6 * * Copyright (c) 2012-2014 Nicolas Joyard * Released under the MIT license. * * Author: Nicolas Joyard * http://njoyard.github.com/ist */ (function(global) { var isAMD = typeof global.define === 'function' && global.define.amd, isNode = typeof process !== "undefined" && process.versions && !!process.versions.node, isBrowser = typeof window !== "undefined" && window.navigator && window.document; var previous, istComponents; istComponents = { require: global.require }; /*global define */ istComponents.misc = (function() { return { jsEscape: function (content) { return content.replace(/(['\\])/g, '\\$1') .replace(/[\f]/g, '\\f') .replace(/[\b]/g, '\\b') .replace(/[\t]/g, '\\t') .replace(/[\n]/g, '\\n') .replace(/[\r]/g, '\\r'); }, findScript: function(id) { var i, len, s, found, scripts; try { scripts = document.querySelectorAll('script#' + id); } catch(e) { // DOM exception when selector is invalid - no