-
Notifications
You must be signed in to change notification settings - Fork 0
/
runtime.min.js
1 lines (1 loc) · 2.65 KB
/
runtime.min.js
1
(function(e){if("function"==typeof bootstrap)bootstrap("jade",e);else if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else if("undefined"!=typeof ses){if(!ses.ok())return;ses.makeJade=e}else"undefined"!=typeof window?window.jade=e():global.jade=e()})(function(){var define,ses,bootstrap,module,exports;return function(e,t,n){function i(n,s){if(!t[n]){if(!e[n]){var o=typeof require=="function"&&require;if(!s&&o)return o(n,!0);if(r)return r(n,!0);throw new Error("Cannot find module '"+n+"'")}var u=t[n]={exports:{}};e[n][0].call(u.exports,function(t){var r=e[n][1][t];return i(r?r:t)},u,u.exports)}return t[n].exports}var r=typeof require=="function"&&require;for(var s=0;s<n.length;s++)i(n[s]);return i}({1:[function(require,module,exports){if(!Array.isArray){Array.isArray=function(arr){return"[object Array]"==Object.prototype.toString.call(arr)}}if(!Object.keys){Object.keys=function(obj){var arr=[];for(var key in obj){if(obj.hasOwnProperty(key)){arr.push(key)}}return arr}}exports.merge=function merge(a,b){var ac=a["class"];var bc=b["class"];if(ac||bc){ac=ac||[];bc=bc||[];if(!Array.isArray(ac))ac=[ac];if(!Array.isArray(bc))bc=[bc];ac=ac.filter(nulls);bc=bc.filter(nulls);a["class"]=ac.concat(bc).join(" ")}for(var key in b){if(key!="class"){a[key]=b[key]}}return a};function nulls(val){return val!=null}exports.attrs=function attrs(obj,escaped){var buf=[],terse=obj.terse;delete obj.terse;var keys=Object.keys(obj),len=keys.length;if(len){buf.push("");for(var i=0;i<len;++i){var key=keys[i],val=obj[key];if("boolean"==typeof val||null==val){if(val){terse?buf.push(key):buf.push(key+'="'+key+'"')}}else if(0==key.indexOf("data")&&"string"!=typeof val){buf.push(key+"='"+JSON.stringify(val)+"'")}else if("class"==key&&Array.isArray(val)){buf.push(key+'="'+exports.escape(val.join(" "))+'"')}else if(escaped&&escaped[key]){buf.push(key+'="'+exports.escape(val)+'"')}else{buf.push(key+'="'+val+'"')}}}return buf.join(" ")};exports.escape=function escape(html){return String(html).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")};exports.rethrow=function rethrow(err,filename,lineno){if(!filename)throw err;if(typeof window!="undefined")throw err;var context=3,str=require("fs").readFileSync(filename,"utf8"),lines=str.split("\n"),start=Math.max(lineno-context,0),end=Math.min(lines.length,lineno+context);var context=lines.slice(start,end).map(function(line,i){var curr=i+start+1;return(curr==lineno?" > ":" ")+curr+"| "+line}).join("\n");err.path=filename;err.message=(filename||"Jade")+":"+lineno+"\n"+context+"\n\n"+err.message;throw err}},{fs:2}],2:[function(require,module,exports){},{}]},{},[1])(1)});