haml-coffee
Advanced tools
Comparing version 1.10.0 to 1.10.1
# Haml Coffee Changelog | ||
## Master | ||
* [#56](https://github.com/netzpirat/haml-coffee/issues/56): Detect HTML-style attribute without value. | ||
## Version 1.10.0, February 15, 2013 | ||
@@ -4,0 +8,0 @@ |
@@ -1,1 +0,1 @@ | ||
var require=function(a,b){var c=require.resolve(a,b||"/"),d=require.modules[c];if(!d)throw new Error("Failed to resolve module "+a+", tried "+c);var e=d._cached?d._cached:d();return e};require.paths=[],require.modules={},require.extensions=[".js",".coffee"],require._core={assert:!0,events:!0,fs:!0,path:!0,vm:!0},require.resolve=function(){return function(a,b){function g(a){if(require.modules[a])return a;for(var b=0;b<require.extensions.length;b++){var c=require.extensions[b];if(require.modules[a+c])return a+c}}function h(a){a=a.replace(/\/+$/,"");var b=a+"/package.json";if(require.modules[b]){var d=require.modules[b](),e=d.browserify;if(typeof e=="object"&&e.main){var f=g(c.resolve(a,e.main));if(f)return f}else if(typeof e=="string"){var f=g(c.resolve(a,e));if(f)return f}else if(d.main){var f=g(c.resolve(a,d.main));if(f)return f}}return g(a+"/index")}function i(a,b){var c=j(b);for(var d=0;d<c.length;d++){var e=c[d],f=g(e+"/"+a);if(f)return f;var i=h(e+"/"+a);if(i)return i}var f=g(a);if(f)return f}function j(a){var b;a==="/"?b=[""]:b=c.normalize(a).split("/");var d=[];for(var e=b.length-1;e>=0;e--){if(b[e]==="node_modules")continue;var f=b.slice(0,e+1).join("/")+"/node_modules";d.push(f)}return d}b||(b="/");if(require._core[a])return a;var c=require.modules.path();b=c.resolve("/",b);var d=b||"/";if(a.match(/^(?:\.\.?\/|\/)/)){var e=g(c.resolve(d,a))||h(c.resolve(d,a));if(e)return e}var f=i(a,d);if(f)return f;throw new Error("Cannot find module '"+a+"'")}}(),require.alias=function(a,b){var c=require.modules.path(),d=null;try{d=require.resolve(a+"/package.json","/")}catch(e){d=require.resolve(a,"/")}var f=c.dirname(d),g=(Object.keys||function(a){var b=[];for(var c in a)b.push(c);return b})(require.modules);for(var h=0;h<g.length;h++){var i=g[h];if(i.slice(0,f.length+1)===f+"/"){var j=i.slice(f.length);require.modules[b+j]=require.modules[f+j]}else i===f&&(require.modules[b]=require.modules[f])}},require.define=function(a,b){var c=require._core[a]?"":require.modules.path().dirname(a),d=function(a){return require(a,c)};d.resolve=function(a){return require.resolve(a,c)},d.modules=require.modules,d.define=require.define;var e={exports:{}};require.modules[a]=function(){return require.modules[a]._cached=e.exports,b.call(e.exports,d,e,e.exports,c,a),require.modules[a]._cached=e.exports,e.exports}},typeof process=="undefined"&&(process={}),process.nextTick||(process.nextTick=function(){var a=[],b=typeof window!="undefined"&&window.postMessage&&window.addEventListener;return b&&window.addEventListener("message",function(b){if(b.source===window&&b.data==="browserify-tick"){b.stopPropagation();if(a.length>0){var c=a.shift();c()}}},!0),function(c){b?(a.push(c),window.postMessage("browserify-tick","*")):setTimeout(c,0)}}()),process.title||(process.title="browser"),process.binding||(process.binding=function(a){if(a==="evals")return require("vm");throw new Error("No such module")}),process.cwd||(process.cwd=function(){return"."}),require.define("path",function(a,b,c,d,e){function f(a,b){var c=[];for(var d=0;d<a.length;d++)b(a[d],d,a)&&c.push(a[d]);return c}function g(a,b){var c=0;for(var d=a.length;d>=0;d--){var e=a[d];e=="."?a.splice(d,1):e===".."?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c--;c)a.unshift("..");return a}var h=/^(.+\/(?!$)|\/)?((?:.+?)?(\.[^.]*)?)$/;c.resolve=function(){var a="",b=!1;for(var c=arguments.length;c>=-1&&!b;c--){var d=c>=0?arguments[c]:process.cwd();if(typeof d!="string"||!d)continue;a=d+"/"+a,b=d.charAt(0)==="/"}return a=g(f(a.split("/"),function(a){return!!a}),!b).join("/"),(b?"/":"")+a||"."},c.normalize=function(a){var b=a.charAt(0)==="/",c=a.slice(-1)==="/";return a=g(f(a.split("/"),function(a){return!!a}),!b).join("/"),!a&&!b&&(a="."),a&&c&&(a+="/"),(b?"/":"")+a},c.join=function(){var a=Array.prototype.slice.call(arguments,0);return c.normalize(f(a,function(a,b){return a&&typeof a=="string"}).join("/"))},c.dirname=function(a){var b=h.exec(a)[1]||"",c=!1;return b?b.length===1||c&&b.length<=3&&b.charAt(1)===":"?b:b.substring(0,b.length-1):"."},c.basename=function(a,b){var c=h.exec(a)[2]||"";return b&&c.substr(-1*b.length)===b&&(c=c.substr(0,c.length-b.length)),c},c.extname=function(a){return h.exec(a)[3]||""}}),require.define("/haml-coffee.coffee",function(a,b,c,d,e){((function(){var c,d,e,f,g,h,i,j,k;h=a("./nodes/node"),i=a("./nodes/text"),f=a("./nodes/haml"),c=a("./nodes/code"),d=a("./nodes/comment"),e=a("./nodes/filter"),k=a("./util/text").whitespace,j=a("./util/text").indent,b.exports=g=function(){function a(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;this.options=a!=null?a:{},(m=(b=this.options).placement)==null&&(b.placement="global"),(p=(e=this.options).dependencies)==null&&(e.dependencies={hc:"hamlcoffee"}),(q=(f=this.options).escapeHtml)==null&&(f.escapeHtml=!0),(r=(g=this.options).escapeAttributes)==null&&(g.escapeAttributes=!0),(s=(h=this.options).cleanValue)==null&&(h.cleanValue=!0),(t=(i=this.options).uglify)==null&&(i.uglify=!1),(u=(j=this.options).basename)==null&&(j.basename=!1),(v=(k=this.options).extendScope)==null&&(k.extendScope=!1),(w=(l=this.options).format)==null&&(l.format="html5"),(n=(c=this.options).preserveTags)==null&&(c.preserveTags="pre,textarea"),(o=(d=this.options).selfCloseTags)==null&&(d.selfCloseTags="meta,img,link,br,hr,input,area,param,col,base")}return a.VERSION="1.9.1",a.prototype.indentChanged=function(){return this.currentIndent!==this.previousIndent},a.prototype.isIndent=function(){return this.currentIndent>this.previousIndent},a.prototype.updateTabSize=function(){if(this.tabSize===0)return this.tabSize=this.currentIndent-this.previousIndent},a.prototype.updateBlockLevel=function(){this.currentBlockLevel=this.currentIndent/this.tabSize;if(this.currentBlockLevel-Math.floor(this.currentBlockLevel)>0)throw"Indentation error in line "+this.lineNumber;if((this.currentIndent-this.previousIndent)/this.tabSize>1&&!this.node.isCommented())throw"Block level too deep in line "+this.lineNumber;return this.delta=this.previousBlockLevel-this.currentBlockLevel},a.prototype.updateCodeBlockLevel=function(a){return a instanceof c?this.currentCodeBlockLevel=a.codeBlockLevel+1:this.currentCodeBlockLevel=a.codeBlockLevel},a.prototype.updateParent=function(){return this.isIndent()?this.pushParent():this.popParent()},a.prototype.pushParent=function(){return this.stack.push(this.parentNode),this.parentNode=this.node},a.prototype.popParent=function(){var a,b,c;c=[];for(a=0,b=this.delta-1;0<=b?a<=b:a>=b;0<=b?a++:a--)c.push(this.parentNode=this.stack.pop());return c},a.prototype.getNodeOptions=function(a){return a==null&&(a={}),{parentNode:a.parentNode||this.parentNode,blockLevel:a.blockLevel||this.currentBlockLevel,codeBlockLevel:a.codeBlockLevel||this.currentCodeBlockLevel,escapeHtml:a.escapeHtml||this.options.escapeHtml,escapeAttributes:a.escapeAttributes||this.options.escapeAttributes,cleanValue:a.cleanValue||this.options.cleanValue,format:a.format||this.options.format,preserveTags:a.preserveTags||this.options.preserveTags,selfCloseTags:a.selfCloseTags||this.options.selfCloseTags,uglify:a.uglify||this.options.uglify}},a.prototype.nodeFactory=function(a){var b,g,h;return a==null&&(a=""),g=this.getNodeOptions(),a.match(/^:(escaped|preserve|css|javascript|plain|cdata|coffeescript)/)?b=new e(a,g):a.match(/^(\/|-#)(.*)/)?b=new d(a,g):a.match(/^(-#|-|=|!=|\&=|~)\s*(.*)/)?b=new c(a,g):a.match(/^(%|#[^{]|\.|\!)(.*)/)?b=new f(a,g):b=new i(a,g),(h=g.parentNode)!=null&&h.addChild(b),b},a.prototype.parse=function(a){var b,c,d,f,g,j,k,l;a==null&&(a=""),this.lineNumber=this.previousIndent=this.tabSize=this.currentBlockLevel=this.previousBlockLevel=0,this.currentCodeBlockLevel=this.previousCodeBlockLevel=0,this.node=null,this.stack=[],this.root=this.parentNode=new h("",this.getNodeOptions()),f=a.split("\n");while((d=f.shift())!==void 0){if(this.node instanceof e&&!this.exitFilter)if(/^(\s)*$/.test(d))this.node.addChild(new i("",this.getNodeOptions({parentNode:this.node})));else{g=d.match(/^(\s*)(.*)/),k=g[1],c=g[2];if(this.node.blockLevel>=k.length/2){this.exitFilter=!0,f.unshift(d);continue}j=d.match(RegExp("^\\s{"+(this.node.blockLevel*2+2)+"}(.*)")),j&&this.node.addChild(new i(j[1],this.getNodeOptions({parentNode:this.node})))}else{this.exitFilter=!1,g=d.match(/^(\s*)(.*)/),k=g[1],c=g[2];if(/^\s*$/.test(d))continue;while(/^[%.#].*[{(]/.test(c)&&!/^(\s*)[-=&!~.%#</]/.test(f[0])&&/([-\w]+[\w:-]*\w?)\s*=|('\w+[\w:-]*\w?')\s*=|("\w+[\w:-]*\w?")\s*=|(\w+[\w:-]*\w?):|('[-\w]+[\w:-]*\w?'):|("[-\w]+[\w:-]*\w?"):|:(\w+[\w:-]*\w?)\s*=>|:?'([-\w]+[\w:-]*\w?)'\s*=>|:?"([-\w]+[\w:-]*\w?)"\s*=>/.test(f[0]))b=f.shift(),c=c.replace(/(\s)+\|\s*$/,""),c+=" "+b.match(/^\s*(.*?)(\s+\|\s*)?$/)[1],this.lineNumber++;if(c.match(/(\s)+\|\s*$/)){c=c.replace(/(\s)+\|\s*$/," ");while((l=f[0])!=null?l.match(/(\s)+\|$/):void 0)c+=f.shift().match(/^(\s*)(.*)/)[2].replace(/(\s)+\|\s*$/,""),this.lineNumber++}this.currentIndent=k.length,this.indentChanged()&&(this.updateTabSize(),this.updateBlockLevel(),this.updateParent(),this.updateCodeBlockLevel(this.parentNode)),this.node=this.nodeFactory(c),this.previousBlockLevel=this.currentBlockLevel,this.previousIndent=this.currentIndent}this.lineNumber++}return this.evaluate(this.root)},a.prototype.evaluate=function(a){var b,c,d,e;e=a.children;for(c=0,d=e.length;c<d;c++)b=e[c],this.evaluate(b);return a.evaluate()},a.prototype.render=function(a,b){b==null&&(b="window.HAML");switch(this.options.placement){case"amd":return this.renderAmd();default:return this.renderGlobal(a,b)}},a.prototype.renderAmd=function(){var a,b,c,d,e,f,g,h;/^hamlcoffee/.test(this.options.dependencies.hc)&&(this.options.customHtmlEscape="hc.escape",this.options.customCleanValue="hc.cleanValue",this.options.customPreserve="hc.preserve",this.options.customFindAndPreserve="hc.findAndPreserve",this.options.customSurround="hc.surround",this.options.customSucceed="hc.succeed",this.options.customPrecede="hc.precede",this.options.customReference="hc.reference"),c=[],e=[],g=this.options.dependencies;for(d in g)b=g[d],c.push(b),e.push(d);f=j(this.precompile(),4),h=this.findDependencies(f);for(d in h)b=h[d],c.push(b),e.push(d);return c.length!==0?(c=function(){var b,d,e;e=[];for(b=0,d=c.length;b<d;b++)a=c[b],e.push("'"+a+"'");return e}(),c="["+c+"], ("+e.join(", ")+")"):c="","define "+c+" ->\n (context) ->\n render = ->\n \n"+f+"\n render.call(context)"},a.prototype.renderGlobal=function(a,b){var c,d,e,f,g;b==null&&(b="window.HAML"),e="",d=(""+b+"."+a).replace(/(\s|-)+/g,"_").split(/\./),a=this.options.basename?d.pop().split(/\/|\\/).pop():d.pop(),b=d.shift();if(d.length!==0)for(f=0,g=d.length;f<g;f++)c=d[f],b+="."+c,e+=""+b+" ?= {}\n";else e+=""+b+" ?= {}\n";return this.options.extendScope?(e+=""+b+"['"+a+"'] = (context) -> ( ->\n",e+=" `with (context || {}) {`\n",e+=""+j(this.precompile(),1),e+="`}`\n",e+=").call(context)"):(e+=""+b+"['"+a+"'] = (context) -> ( ->\n",e+=""+j(this.precompile(),1),e+=").call(context)"),e},a.prototype.precompile=function(){var a,b;b="",a=this.createCode(),a.indexOf("$e")!==-1&&(this.options.customHtmlEscape?b+="$e = "+this.options.customHtmlEscape+"\n":b+="$e = (text, escape) ->\n \"#{ text }\"\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/'/g, ''')\n .replace(/\\//g, '/')\n .replace(/\"/g, '"')\n"),a.indexOf("$c")!==-1&&(this.options.customCleanValue?b+="$c = "+this.options.customCleanValue+"\n":(b+="$c = (text) ->\n",b+=" switch text\n",b+=" when null, undefined then ''\n",b+=" when true, false then '' + text\n",b+=" else text\n"));if(a.indexOf("$p")!==-1||a.indexOf("$fp")!==-1)this.options.customPreserve?b+="$p = "+this.options.customPreserve+"\n":b+="$p = (text) -> text.replace /\\n/g, '
'\n";return a.indexOf("$fp")!==-1&&(this.options.customFindAndPreserve?b+="$fp = "+this.options.customFindAndPreserve+"\n":b+="$fp = (text) ->\n text.replace /<("+this.options.preserveTags.split(",").join("|")+')>([^]*?)<\\/\\1>/g, (str, tag, content) ->\n "<#{ tag }>#{ $p content }</#{ tag }>"\n'),a.indexOf("surround")!==-1&&(this.options.customSurround?b+="surround = (start, end, fn) => "+this.options.customSurround+".call(@, start, end, fn)\n":b+="surround = (start, end, fn) => start + fn.call(@)?.replace(/^s+|s+$/g, '') + end\n"),a.indexOf("succeed")!==-1&&(this.options.customSucceed?b+="succeed = (start, end, fn) => "+this.options.customSucceed+".call(@, start, end, fn)\n":b+="succeed = (end, fn) => fn.call(@)?.replace(/s+$/g, '') + end\n"),a.indexOf("precede")!==-1&&(this.options.customPrecede?b+="precede = (start, end, fn) => "+this.options.customPrecede+".call(@, start, end, fn)\n":b+="precede = (start, fn) => start + fn.call(@)?.replace(/^s+/g, '')\n"),a.indexOf("$r")!==-1&&(this.options.customReference?b+="$r = "+this.options.customReference+"\n":b+="$r = (object, prefix) ->\n name = if prefix then prefix + '_' else ''\n\n if typeof(object.hamlObjectRef) is 'function'\n name += object.hamlObjectRef()\n else\n name += (object.constructor?.name || 'object').replace(/W+/g, '_').replace(/([a-zd])([A-Z])/g, '$1_$2').toLowerCase()\n\n id = if typeof(object.to_key) is 'function'\n object.to_key()\n else if typeof(object.id) is 'function'\n object.id()\n else if object.id\n object.id\n else\n object\n\n result = \"class='#{ name }'\"\n result += \" id='#{ name }_#{ id }'\" if id\n"),b+="$o = []\n",b+=""+a+"\n",b+='return $o.join("\\n")'+this.convertBooleans(a)+this.removeEmptyIDAndClass(a)+this.cleanupWhitespace(a)+"\n"},a.prototype.createCode=function(){var a,b,c,d,e,f,g,h,i,j;b=[],this.lines=[],i=this.root.children;for(e=0,g=i.length;e<g;e++)a=i[e],this.lines=this.lines.concat(a.render());this.lines=this.combineText(this.lines),this.blockLevel=0,j=this.lines;for(f=0,h=j.length;f<h;f++){c=j[f];if(c!==null)switch(c.type){case"text":b.push(""+k(c.cw)+this.getBuffer(this.blockLevel)+'.push "'+k(c.hw)+c.text+'"');break;case"run":c.block!=="end"?b.push(""+k(c.cw)+c.code):(b.push(""+k(c.cw)+c.code.replace("$buffer",this.getBuffer(this.blockLevel))),this.blockLevel-=1);break;case"insert":d="",c.findAndPreserve&&(d+="$fp "),c.preserve&&(d+="$p "),c.escape&&(d+="$e "),this.options.cleanValue&&(d+="$c "),b.push(""+k(c.cw)+this.getBuffer(this.blockLevel)+'.push "'+k(c.hw)+'" + '+d+c.code),c.block==="start"&&(this.blockLevel+=1,b.push(""+k(c.cw+1)+this.getBuffer(this.blockLevel)+" = []"))}}return b.join("\n")},a.prototype.getBuffer=function(a){return a>0?"$o"+a:"$o"},a.prototype.combineText=function(a){var b,c,d;b=[];while((c=a.shift())!==void 0){if(c.type==="text")while(a[0]&&a[0].type==="text"&&c.cw===a[0].cw)d=a.shift(),c.text+="\\n"+k(d.hw)+d.text;b.push(c)}return b},a.prototype.convertBooleans=function(a){return a.indexOf("$c")!==-1?this.options.format==="xhtml"?".replace(/\\s(\\w+)='true'/mg, \" $1='$1'\").replace(/\\s(\\w+)='false'/mg, '')":".replace(/\\s(\\w+)='true'/mg, ' $1').replace(/\\s(\\w+)='false'/mg, '')":""},a.prototype.removeEmptyIDAndClass=function(a){return a.indexOf("id=")!==-1||a.indexOf("class=")!==-1?'.replace(/\\s(?:id|class)=([\'"])(\\1)/mg, "")':""},a.prototype.cleanupWhitespace=function(a){return/\u0091|\u0092/.test(a)?".replace(/[\\s\\n]*\\u0091/mg, '').replace(/\\u0092[\\s\\n]*/mg, '')":""},a.prototype.findDependencies=function(a){var b,c,d,e,f;f=/require(?:\s+|\()(['"])(.+?)(\1)\)?/gm,b={};while(c=f.exec(a))d=c[2],e=d.split("/").pop(),b[e]=d;return b},a}()})).call(this)}),require.define("/nodes/node.coffee",function(a,b,c,d,e){((function(){var c,d;d=a("../util/text").escapeHTML,b.exports=c=function(){function a(a,b){this.expression=a!=null?a:"",b==null&&(b={}),this.parentNode=b.parentNode,this.children=[],this.opener=this.closer=null,this.silent=!1,this.preserveTags=b.preserveTags.split(","),this.preserve=!1,this.wsRemoval={around:!1,inside:!1},this.escapeHtml=b.escapeHtml,this.escapeAttributes=b.escapeAttributes,this.cleanValue=b.cleanValue,this.format=b.format,this.selfCloseTags=b.selfCloseTags.split(","),this.uglify=b.uglify,this.codeBlockLevel=b.codeBlockLevel,this.blockLevel=b.blockLevel}return a.CLEAR_WHITESPACE_LEFT="",a.CLEAR_WHITESPACE_RIGHT="",a.prototype.addChild=function(a){return this.children.push(a),this},a.prototype.getOpener=function(){return this.wsRemoval.around&&this.opener.text&&(this.opener.text=a.CLEAR_WHITESPACE_LEFT+this.opener.text),this.wsRemoval.inside&&this.opener.text&&(this.opener.text+=a.CLEAR_WHITESPACE_RIGHT),this.opener},a.prototype.getCloser=function(){return this.wsRemoval.inside&&this.closer.text&&(this.closer.text=a.CLEAR_WHITESPACE_LEFT+this.closer.text),this.wsRemoval.around&&this.closer.text&&(this.closer.text+=a.CLEAR_WHITESPACE_RIGHT),this.closer},a.prototype.isPreserved=function(){return this.preserve?!0:this.parentNode?this.parentNode.isPreserved():!1},a.prototype.isCommented=function(){return this.constructor.name==="Comment"?!0:this.parentNode?this.parentNode.isCommented():!1},a.prototype.markText=function(a,b){return b==null&&(b=!1),{type:"text",cw:this.codeBlockLevel,hw:this.uglify?0:this.blockLevel-this.codeBlockLevel,text:b?d(a):a}},a.prototype.markRunningCode=function(a){return{type:"run",cw:this.codeBlockLevel,code:a}},a.prototype.markInsertingCode=function(a,b,c,d){return b==null&&(b=!1),c==null&&(c=!1),d==null&&(d=!1),{type:"insert",cw:this.codeBlockLevel,hw:this.uglify?0:this.blockLevel-this.codeBlockLevel,escape:b,preserve:c,findAndPreserve:d,code:a}},a.prototype.evaluate=function(){},a.prototype.render=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;b=[];if(this.silent)return b;if(this.children.length===0)this.opener&&this.closer?(d=this.getOpener(),d.text+=this.getCloser().text,b.push(d)):!this.preserve&&this.isPreserved()?b.push(this.getOpener()):b.push(this.getOpener());else if(this.opener&&this.closer)if(this.preserve){this.wsRemoval.inside=!0,b.push(this.getOpener()),o=this.children;for(e=0,i=o.length;e<i;e++){a=o[e],p=a.render();for(f=0,j=p.length;f<j;f++)c=p[f],c.hw=this.blockLevel,b.push(c)}b.push(this.getCloser())}else{b.push(this.getOpener()),q=this.children;for(g=0,k=q.length;g<k;g++)a=q[g],b=b.concat(a.render());b.push(this.getCloser())}else if(this.opener){b.push(this.getOpener()),r=this.children;for(h=0,l=r.length;h<l;h++)a=r[h],b=b.concat(a.render())}else{s=this.children;for(n=0,m=s.length;n<m;n++)a=s[n],b.push(this.markText(a.render().text))}return b},a}()})).call(this)}),require.define("/util/text.coffee",function(a,b,c,d,e){b.exports={whitespace:function(a){var b;a*=2,b=[];while(b.length<a)b.push(" ");return b.join("")},escapeQuotes:function(a){return a?a.replace(/"/g,'\\"').replace(/\\\\\"/g,'\\"'):""},unescapeQuotes:function(a){return a?a.replace(/\\"/g,'"'):""},escapeHTML:function(a){return a?a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\"/g,"""):""},preserve:function(a){if(a)return a.replace(/<(pre|textarea)>(.*?)<\/\1>/g,function(a){return a.replace("\\n","
")})},indent:function(a,c){return a.replace(/^(.*)$/mg,b.exports.whitespace(c)+"$1")}}}),require.define("/nodes/text.coffee",function(a,b,c,d,e){((function(){var c,d,e,f=Object.prototype.hasOwnProperty,g=function(a,b){function d(){this.constructor=a}for(var c in b)f.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};c=a("./node"),e=a("../util/text").escapeQuotes,b.exports=d=function(){function a(){a.__super__.constructor.apply(this,arguments)}return g(a,c),a.prototype.evaluate=function(){return this.opener=this.markText(e(this.expression))},a}()})).call(this)}),require.define("/nodes/haml.coffee",function(a,b,c,d,e){((function(){var c,d,e,f=Object.prototype.hasOwnProperty,g=function(a,b){function d(){this.constructor=a}for(var c in b)f.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};d=a("./node"),e=a("../util/text").escapeQuotes,b.exports=c=function(){function a(){a.__super__.constructor.apply(this,arguments)}return g(a,d),a.prototype.evaluate=function(){var a,b,c,d,f,g;g=this.parseExpression(this.expression);if(g.doctype)return this.opener=this.markText(""+e(this.buildDocType(g.doctype)));if(this.isNotSelfClosing(g.tag)){f=this.buildHtmlTagPrefix(g);if(g.assignment){d=g.assignment.match(/^(=|!=|&=|~)\s*(.*)$/),c=d[1],a=d[2];if(c==="~")b="#{$fp "+a+" }";else if(c==="&="||c==="="&&this.escapeHtml)this.preserve?this.cleanValue?b="#{ $p($e($c("+a+"))) }":b="#{ $p($e("+a+")) }":this.cleanValue?b="#{ $e($c("+a+")) }":b="#{ $e("+a+") }";else if(c==="!="||c==="="&&!this.escapeHtml)this.preserve?this.cleanValue?b="#{ $p($c("+a+")) }":b="#{ $p("+a+") }":this.cleanValue?b="#{ $c("+a+") }":b="#{ "+a+" }";return this.opener=this.markText(""+f+">"+b),this.closer=this.markText("</"+g.tag+">")}return g.text?(this.opener=this.markText(""+f+">"+g.text),this.closer=this.markText("</"+g.tag+">")):(this.opener=this.markText(f+">"),this.closer=this.markText("</"+g.tag+">"))}return g.tag=g.tag.replace(/\/$/,""),f=this.buildHtmlTagPrefix(g),this.opener=this.markText(""+f+(this.format==="xhtml"?" /":"")+">")},a.prototype.parseExpression=function(a){var b,c,d,f,g,h,i,j;g=this.parseTag(a),this.preserveTags.indexOf(g.tag)!==-1&&(this.preserve=!0),d=this.interpolateCodeAttribute((i=g.ids)!=null?i.pop():void 0,!0),c=g.classes,b={};if(g.attributes){j=g.attributes;for(f in j)h=j[f],f==="id"?d?d+="_"+this.interpolateCodeAttribute(h,!0):d=this.interpolateCodeAttribute(h,!0):f==="class"?(c||(c=[]),c.push(h)):b[f]=h}return{doctype:g.doctype,tag:g.tag,id:d,classes:c,text:e(g.text),attributes:b,assignment:g.assignment,reference:g.reference}},a.prototype.parseTag=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G;try{g=(C=a.match(/^(\!{3}.*)/))!=null?C[1]:void 0;if(g)return{doctype:g};i=a.match(/^((?:[#%\.][a-z0-9_:\-]*[\/]?)+)/i)[0],r=a.substring(i.length);if(r.match(/^[{([]/)){q="",j="",s="",D=["[","{","(","[","{","("];for(y=0,A=D.length;y<A;y++){t=D[y];if(t===r[0]){h=function(){switch(t){case"{":return"}";case"(":return")";case"[":return"]"}}(),o=0;for(p=0,E=r.length;0<=E?p<=E:p>=E;0<=E?p++:p--){e=r[p],e===t&&(o+=1);if(e===h){if(o===1)break;o-=1}}switch(t){case"{":s+=r.substring(0,p+1),r=r.substring(p+1);break;case"(":j+=r.substring(0,p+1),r=r.substring(p+1);break;case"[":q=r.substring(1,p),r=r.substring(p+1)}}}b=r||""}else q="",j="",s="",b=r;d={},F=[this.parseAttributes(j),this.parseAttributes(s)];for(z=0,B=F.length;z<B;z++){c=F[z];for(m in c)w=c[m],d[m]=w}if(x=(G=b.match(/^[<>]{0,2}/))!=null?G[0]:void 0)b=b.substring(x.length);return b[0]===" "&&(b=b.substring(1)),b&&!b.match(/^(=|!=|&=|~)/)&&(v=b.replace(/^ /,""),b=void 0),x&&(x.indexOf(">")!==-1&&(this.wsRemoval.around=!0),x.indexOf("<")!==-1&&(this.wsRemoval.inside=!0,this.preserve=!0)),u=i.match(/\%([a-z_\-][a-z0-9_:\-]*[\/]?)/i),l=i.match(/\#([a-z_\-][a-z0-9_\-]*)/gi),f=i.match(/\.([a-z0-9_\-]*)/gi),{tag:u?u[1]:"div",ids:l?function(){var a,b,c;c=[];for(a=0,b=l.length;a<b;a++)k=l[a],c.push("'"+k.substr(1)+"'");return c}():void 0,classes:f?function(){var a,b,c;c=[];for(a=0,b=f.length;a<b;a++)n=f[a],c.push("'"+n.substr(1)+"'");return c}():void 0,attributes:d,assignment:b,reference:q,text:v}}catch(H){throw"Unable to parse tag from "+a+": "+H}},a.prototype.parseAttributes=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x;b={};if(a===void 0)return b;r=a.substring(0,1),a=a.replace(/(=|:|=>)\s*('([^\\']|\\\\|\\')*'|"([^\\"]|\\\\|\\")*")/g,function(a,b,c){return b+(c!=null?c.replace(/(:|=|=>)/g,"$1"):void 0)}),j=0,p=0,l=[],r==="("?(q=1,d=a.length-1):(q=0,d=a.length);for(n=q;q<=d?n<d:n>d;q<=d?n++:n--)c=a[n],c==="("&&(j+=1,j===1&&(p=n)),c===")"&&(j===1?p!==0&&n-p!==1&&l.push({start:p,end:n}):j-=1);v=l.reverse();for(t=0,u=v.length;t<u;t++)k=v[t],a=a.substring(0,k.start)+a.substring(k.start,k.end).replace(/(:|=|=>)/g,"$1")+a.substring(k.end);switch(r){case"(":i=/\(\s*([-\w]+[\w:-]*\w?)\s*=|\s+([-\w]+[\w:-]*\w?)\s*=|\(\s*('\w+[\w:-]*\w?')\s*=|\s+('\w+[\w:-]*\w?')\s*=|\(\s*("\w+[\w:-]*\w?")\s*=|\s+("\w+[\w:-]*\w?")\s*=/g;break;case"{":i=/[{,]\s*(\w+[\w:-]*\w?)\s*:|[{,]\s*('[-\w]+[\w:-]*\w?')\s*:|[{,]\s*("[-\w]+[\w:-]*\w?")\s*:|[{,]\s*:(\w+[\w:-]*\w?)\s*=>|[{,]\s*:?'([-\w]+[\w:-]*\w?)'\s*=>|[{,]\s*:?"([-\w]+[\w:-]*\w?)"\s*=>/g}m=a.split(i).filter(Boolean),f=!1,e=!1;while(m.length){h=m.splice(0,2),g=(w=h[0])!=null?w.replace(/^\s+|\s+$/g,"").replace(/^:/,""):void 0;if(o=g.match(/^("|')(.*)\1$/))g=o[2];s=(x=h[1])!=null?x.replace(/^\s+|[\s,]+$/g,"").replace(/\u0090/g,""):void 0,g==="data"&&!s?(f=!0,e=!0):g&&s&&f&&(g="data-"+g,/}\s*$/.test(s)&&(f=!1));switch(r){case"(":b[g]=s.replace(/^\s+|[\s)]+$/g,"");break;case"{":b[g]=s.replace(/^\s+|[\s}]+$/g,"")}}return e&&delete b.data,b},a.prototype.buildHtmlTagPrefix=function(a){var b,c,d,e,f,g,h,i,j,k,l;h=["<"+a.tag];if(a.classes){d=!1,b=function(){var b,c,e,f;e=a.classes,f=[];for(b=0,c=e.length;b<c;b++)g=e[b],g=this.interpolateCodeAttribute(g,!0),g.indexOf("#{")!==-1&&(d=!0),f.push(g);return f}.call(this);if(d&&b.length>1){c="#{ [";for(j=0,k=b.length;j<k;j++)f=b[j],c+=""+this.quoteAndEscapeAttributeValue(f,!0)+",";c=c.substring(0,c.length-1)+"].sort().join(' ').replace(/^\\s+|\\s+$/g, '') }"}else c=b.sort().join(" ");h.push("class='"+c+"'")}a.id&&h.push("id='"+a.id+"'"),a.reference&&(a.attributes&&(delete a.attributes["class"],delete a.attributes.id),h.push("#{$r("+a.reference+")}"));if(a.attributes){l=a.attributes;for(e in l)i=l[e],i==="true"||i==="false"?i==="true"&&(this.format==="html5"?h.push(""+e):h.push(""+e+"="+this.quoteAndEscapeAttributeValue(e))):h.push(""+e+"="+this.quoteAndEscapeAttributeValue(this.interpolateCodeAttribute(i)))}return h.join(" ")},a.prototype.interpolateCodeAttribute=function(a,b){var c;b==null&&(b=!1);if(!a)return;return a.match(/^("|').*\1$/)||(this.escapeAttributes?this.cleanValue?a="#{ $e($c("+a+")) }":a="#{ $e("+a+") }":this.cleanValue?a="#{ $c("+a+") }":a="#{ ("+a+") }"),b&&(c=a.match(/^("|')(.*)\1$/))&&(a=c[2]),a},a.prototype.quoteAndEscapeAttributeValue=function(a,b){var c,d,f,g,h,i,j,k;b==null&&(b=!1);if(!a)return;if(h=a.match(/^("|')(.*)\1$/))a=h[2];return k=this.splitInterpolations(a),g=!1,d=!1,f=!1,k=function(){var a,b,c;c=[];for(a=0,b=k.length;a<b;a++)j=k[a],j.slice(0,2)==="#{"?(j.indexOf("$e")===-1&&j.indexOf("$c")===-1&&(this.escapeAttributes?this.cleanValue?j="#{ $e($c("+j.slice(2,-1)+")) }":j="#{ $e("+j.slice(2,-1)+") }":this.cleanValue&&(j="#{ $c("+j.slice(2,-1)+") }")),f=!0):(g||(g=j.indexOf("'")!==-1),d||(d=j.indexOf('"')!==-1)),c.push(j);return c}.call(this),b?f?i='"'+k.join("")+'"':i="'"+k.join("")+"'":(!d&&!g&&(i="'"+k.join("")+"'"),g&&!d&&(i='\\"'+k.join("")+'\\"'),d&&!g&&(c=function(){var a,b,c;c=[];for(a=0,b=k.length;a<b;a++)j=k[a],c.push(e(j));return c}(),i="'"+c.join("")+"'"),g&&d&&(c=function(){var a,b,c;c=[];for(a=0,b=k.length;a<b;a++)j=k[a],c.push(e(j).replace(/'/g,"'"));return c}(),i="'"+c.join("")+"'")),i},a.prototype.splitInterpolations=function(a){var b,c,d,e,f,g,h;d=0,f=0,g=[];for(e=0,h=a.length;0<=h?e<h:e>h;0<=h?e++:e--)b=a[e],c=a.slice(e,e+1+1||9e9),b==="{"&&(d+=1),c==="#{"&&d===0&&(g.push(a.slice(f,e)),f=e),b==="}"&&(d-=1,d===0&&(g.push(a.slice(f,e+1||9e9)),f=e+1));return g.push(a.slice(f,a.length)),g.filter(Boolean)},a.prototype.buildDocType=function(a){switch(""+this.format+" "+a){case"xhtml !!! XML":return"<?xml version='1.0' encoding='utf-8' ?>";case"xhtml !!!":return'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';case"xhtml !!! 1.1":return'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">';case"xhtml !!! mobile":return'<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd">';case"xhtml !!! basic":return'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">';case"xhtml !!! frameset":return'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">';case"xhtml !!! 5":case"html5 !!!":return"<!DOCTYPE html>";case"html5 !!! XML":case"html4 !!! XML":return"";case"html4 !!!":return'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">';case"html4 !!! frameset":return'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">';case"html4 !!! strict":return'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">'}},a.prototype.isNotSelfClosing=function(a){return this.selfCloseTags.indexOf(a)===-1&&!a.match(/\/$/)},a}()})).call(this)}),require.define("/nodes/code.coffee",function(a,b,c,d,e){((function(){var c,d,e=Object.prototype.hasOwnProperty,f=function(a,b){function d(){this.constructor=a}for(var c in b)e.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};d=a("./node"),b.exports=c=function(){function a(){a.__super__.constructor.apply(this,arguments)}return f(a,d),a.prototype.evaluate=function(){var a,b,c,d;b=this.expression.match(/(-|!=|\&=|=|~)\s?(.*)?/),d=b[1],a=b[2];if(d!=="-")return d==="~"?this.escapeHtml?this.opener=this.markInsertingCode(a,!0,!1,!0):this.opener=this.markInsertingCode(a,!1,!1,!0):(c=d==="&="||d==="="&&this.escapeHtml,this.children.length!==0&&a.match(/(->|=>)$/)?(this.opener=this.markInsertingCode(a,c,!1,!1),this.opener.block="start",this.closer=this.markRunningCode(' $buffer.join "\\n"'),this.closer.block="end"):this.opener=this.markInsertingCode(a,c));this.opener=this.markRunningCode(a);if(this.children.length!==0&&this.opener.code.match(/(->|=>)/))return this.closer=this.markRunningCode(" ''")},a}()})).call(this)}),require.define("/nodes/comment.coffee",function(a,b,c,d,e){((function(){var c,d,e,f=Object.prototype.hasOwnProperty,g=function(a,b){function d(){this.constructor=a}for(var c in b)f.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};d=a("./node"),e=a("../util/text").escapeQuotes,b.exports=c=function(){function a(){a.__super__.constructor.apply(this,arguments)}return g(a,d),a.prototype.evaluate=function(){var a,b,c,d;d=this.expression.match(/(-#|\/\[|\/)\s?(.*)?/),b=d[0],c=d[1],a=d[2];switch(c){case"-#":return this.silent=!0,this.opener=this.markText("");case"/[":return this.opener=this.markText("<!--["+a+">"),this.closer=this.markText("<![endif]-->");case"/":return a?(this.opener=this.markText("<!-- "+e(a)),this.closer=this.markText(" -->")):(this.opener=this.markText("<!--"),this.closer=this.markText("-->"))}},a}()})).call(this)}),require.define("/nodes/filter.coffee",function(a,b,c,d,e){((function(){var c,d,e,f,g=Object.prototype.hasOwnProperty,h=function(a,b){function d(){this.constructor=a}for(var c in b)g.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};d=a("./node"),f=a("../util/text").whitespace,e=a("../util/text").unescapeQuotes,b.exports=c=function(){function a(){a.__super__.constructor.apply(this,arguments)}return h(a,d),a.prototype.evaluate=function(){var a;return this.filter=(a=this.expression.match(/:(escaped|preserve|css|javascript|coffeescript|plain|cdata|coffeescript)(.*)?/))!=null?a[1]:void 0},a.prototype.render=function(){var a,b,c,d,e,f,g,h,i,j;c=[];switch(this.filter){case"escaped":i=this.children;for(e=0,g=i.length;e<g;e++)a=i[e],c.push(this.markText(a.render()[0].text,!0));break;case"preserve":d="",j=this.children;for(f=0,h=j.length;f<h;f++)a=j[f],d+=""+a.render()[0].text+"
";d=d.replace(/\&\#x000A;$/,""),c.push(this.markText(d));break;case"plain":this.renderFilterContent(0,c);break;case"css":this.format==="html5"?c.push(this.markText("<style>")):c.push(this.markText("<style type='text/css'>")),this.format==="xhtml"&&c.push(this.markText(" /*<![CDATA[*/")),b=this.format==="xhtml"?2:1,this.renderFilterContent(b,c),this.format==="xhtml"&&c.push(this.markText(" /*]]>*/")),c.push(this.markText("</style>"));break;case"javascript":this.format==="html5"?c.push(this.markText("<script>")):c.push(this.markText("<script type='text/javascript'>")),this.format==="xhtml"&&c.push(this.markText(" //<![CDATA[")),b=this.format==="xhtml"?2:1,this.renderFilterContent(b,c),this.format==="xhtml"&&c.push(this.markText(" //]]>")),c.push(this.markText("</script>"));break;case"cdata":c.push(this.markText("<![CDATA[")),this.renderFilterContent(2,c),c.push(this.markText("]]>"));break;case"coffeescript":this.renderFilterContent(0,c,"run")}return c},a.prototype.renderFilterContent=function(a,b,c){var d,g,h,i,j,k,l,m,n,o,p;c==null&&(c="text"),g=[],i=0,o=this.children;for(k=0,m=o.length;k<m;k++)d=o[k],g.push(d.render()[0].text);p=[];for(l=0,n=g.length;l<n;l++){j=g[l];if(j==="")p.push(i+=1);else{switch(c){case"text":for(h=0;0<=i?h<i:h>i;0<=i?h++:h--)b.push(this.markText(""));b.push(this.markText(""+f(a)+j));break;case"run":b.push(this.markRunningCode(""+e(j)))}p.push(i=0)}}return p},a}()})).call(this)}),require.define("/hamlc.coffee",function(a,b,c,d,e){((function(){var c,d,e,f;e=a("fs"),d=a("./haml-coffee"),process.browser?c=window.CoffeeScript:c=a("coffee-script"),f={},b.exports={compile:function(a,b){var e,f;return b==null&&(b={}),e=new d(b),e.parse(a),f=new Function(c.compile(e.precompile(),{bare:!0})),function(a){return f.call(a)}},template:function(a,b,e,f){var g;return f==null&&(f={}),g=new d(f),g.parse(a),c.compile(g.render(b,e))},__express:function(a,c,d){var g;!(c&&c.constructor&&c.call&&c.apply)||(d=c,c={});try{return c.cache&&f[a]?d(null,f[a](c)):(c.filename=a,g=e.readFileSync(a,"utf8"),c.cache?(f[a]=b.exports.compile(g,c),d(null,f[a](c))):d(null,b.exports.compile(g,c)(c)))}catch(h){return d(h)}}}})).call(this)}),require.define("fs",function(a,b,c,d,e){}) | ||
var require=function(a,b){var c=require.resolve(a,b||"/"),d=require.modules[c];if(!d)throw new Error("Failed to resolve module "+a+", tried "+c);var e=d._cached?d._cached:d();return e};require.paths=[],require.modules={},require.extensions=[".js",".coffee"],require._core={assert:!0,events:!0,fs:!0,path:!0,vm:!0},require.resolve=function(){return function(a,b){function g(a){if(require.modules[a])return a;for(var b=0;b<require.extensions.length;b++){var c=require.extensions[b];if(require.modules[a+c])return a+c}}function h(a){a=a.replace(/\/+$/,"");var b=a+"/package.json";if(require.modules[b]){var d=require.modules[b](),e=d.browserify;if(typeof e=="object"&&e.main){var f=g(c.resolve(a,e.main));if(f)return f}else if(typeof e=="string"){var f=g(c.resolve(a,e));if(f)return f}else if(d.main){var f=g(c.resolve(a,d.main));if(f)return f}}return g(a+"/index")}function i(a,b){var c=j(b);for(var d=0;d<c.length;d++){var e=c[d],f=g(e+"/"+a);if(f)return f;var i=h(e+"/"+a);if(i)return i}var f=g(a);if(f)return f}function j(a){var b;a==="/"?b=[""]:b=c.normalize(a).split("/");var d=[];for(var e=b.length-1;e>=0;e--){if(b[e]==="node_modules")continue;var f=b.slice(0,e+1).join("/")+"/node_modules";d.push(f)}return d}b||(b="/");if(require._core[a])return a;var c=require.modules.path();b=c.resolve("/",b);var d=b||"/";if(a.match(/^(?:\.\.?\/|\/)/)){var e=g(c.resolve(d,a))||h(c.resolve(d,a));if(e)return e}var f=i(a,d);if(f)return f;throw new Error("Cannot find module '"+a+"'")}}(),require.alias=function(a,b){var c=require.modules.path(),d=null;try{d=require.resolve(a+"/package.json","/")}catch(e){d=require.resolve(a,"/")}var f=c.dirname(d),g=(Object.keys||function(a){var b=[];for(var c in a)b.push(c);return b})(require.modules);for(var h=0;h<g.length;h++){var i=g[h];if(i.slice(0,f.length+1)===f+"/"){var j=i.slice(f.length);require.modules[b+j]=require.modules[f+j]}else i===f&&(require.modules[b]=require.modules[f])}},require.define=function(a,b){var c=require._core[a]?"":require.modules.path().dirname(a),d=function(a){return require(a,c)};d.resolve=function(a){return require.resolve(a,c)},d.modules=require.modules,d.define=require.define;var e={exports:{}};require.modules[a]=function(){return require.modules[a]._cached=e.exports,b.call(e.exports,d,e,e.exports,c,a),require.modules[a]._cached=e.exports,e.exports}},typeof process=="undefined"&&(process={}),process.nextTick||(process.nextTick=function(){var a=[],b=typeof window!="undefined"&&window.postMessage&&window.addEventListener;return b&&window.addEventListener("message",function(b){if(b.source===window&&b.data==="browserify-tick"){b.stopPropagation();if(a.length>0){var c=a.shift();c()}}},!0),function(c){b?(a.push(c),window.postMessage("browserify-tick","*")):setTimeout(c,0)}}()),process.title||(process.title="browser"),process.binding||(process.binding=function(a){if(a==="evals")return require("vm");throw new Error("No such module")}),process.cwd||(process.cwd=function(){return"."}),require.define("path",function(a,b,c,d,e){function f(a,b){var c=[];for(var d=0;d<a.length;d++)b(a[d],d,a)&&c.push(a[d]);return c}function g(a,b){var c=0;for(var d=a.length;d>=0;d--){var e=a[d];e=="."?a.splice(d,1):e===".."?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c--;c)a.unshift("..");return a}var h=/^(.+\/(?!$)|\/)?((?:.+?)?(\.[^.]*)?)$/;c.resolve=function(){var a="",b=!1;for(var c=arguments.length;c>=-1&&!b;c--){var d=c>=0?arguments[c]:process.cwd();if(typeof d!="string"||!d)continue;a=d+"/"+a,b=d.charAt(0)==="/"}return a=g(f(a.split("/"),function(a){return!!a}),!b).join("/"),(b?"/":"")+a||"."},c.normalize=function(a){var b=a.charAt(0)==="/",c=a.slice(-1)==="/";return a=g(f(a.split("/"),function(a){return!!a}),!b).join("/"),!a&&!b&&(a="."),a&&c&&(a+="/"),(b?"/":"")+a},c.join=function(){var a=Array.prototype.slice.call(arguments,0);return c.normalize(f(a,function(a,b){return a&&typeof a=="string"}).join("/"))},c.dirname=function(a){var b=h.exec(a)[1]||"",c=!1;return b?b.length===1||c&&b.length<=3&&b.charAt(1)===":"?b:b.substring(0,b.length-1):"."},c.basename=function(a,b){var c=h.exec(a)[2]||"";return b&&c.substr(-1*b.length)===b&&(c=c.substr(0,c.length-b.length)),c},c.extname=function(a){return h.exec(a)[3]||""}}),require.define("/haml-coffee.coffee",function(a,b,c,d,e){((function(){var c,d,e,f,g,h,i,j,k,l;i=a("./nodes/node"),j=a("./nodes/text"),g=a("./nodes/haml"),c=a("./nodes/code"),d=a("./nodes/comment"),f=a("./nodes/filter"),e=a("./nodes/directive"),l=a("./util/text").whitespace,k=a("./util/text").indent,b.exports=h=function(){function a(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E;this.options=a!=null?a:{},(s=(d=this.options).placement)==null&&(d.placement="global"),(x=(i=this.options).dependencies)==null&&(i.dependencies={hc:"hamlcoffee"}),(y=(j=this.options).escapeHtml)==null&&(j.escapeHtml=!0),(z=(k=this.options).escapeAttributes)==null&&(k.escapeAttributes=!0),(A=(l=this.options).cleanValue)==null&&(l.cleanValue=!0),(B=(m=this.options).uglify)==null&&(m.uglify=!1),(C=(n=this.options).basename)==null&&(n.basename=!1),(D=(o=this.options).extendScope)==null&&(o.extendScope=!1),(E=(p=this.options).format)==null&&(p.format="html5"),(t=(e=this.options).preserveTags)==null&&(e.preserveTags="pre,textarea"),(u=(f=this.options).selfCloseTags)==null&&(f.selfCloseTags="meta,img,link,br,hr,input,area,param,col,base");if(this.options.placement==="global"){(v=(g=this.options).name)==null&&(g.name="test"),(w=(h=this.options).namespace)==null&&(h.namespace="window.HAML"),c=(""+this.options.namespace+"."+this.options.name).replace(/(\s|-)+/g,"_").split(/\./),this.options.name=this.options.basename?c.pop().split(/\/|\\/).pop():c.pop(),this.options.namespace=c.shift(),this.intro="";if(c.length!==0)for(q=0,r=c.length;q<r;q++)b=c[q],this.options.namespace+="."+b,this.intro+=""+this.options.namespace+" ?= {}\n";else this.intro+=""+this.options.namespace+" ?= {}\n"}}return a.VERSION="1.10.1",a.prototype.indentChanged=function(){return this.currentIndent!==this.previousIndent},a.prototype.isIndent=function(){return this.currentIndent>this.previousIndent},a.prototype.updateTabSize=function(){if(this.tabSize===0)return this.tabSize=this.currentIndent-this.previousIndent},a.prototype.updateBlockLevel=function(){this.currentBlockLevel=this.currentIndent/this.tabSize;if(this.currentBlockLevel-Math.floor(this.currentBlockLevel)>0)throw"Indentation error in line "+this.lineNumber;if((this.currentIndent-this.previousIndent)/this.tabSize>1&&!this.node.isCommented())throw"Block level too deep in line "+this.lineNumber;return this.delta=this.previousBlockLevel-this.currentBlockLevel},a.prototype.updateCodeBlockLevel=function(a){return a instanceof c?this.currentCodeBlockLevel=a.codeBlockLevel+1:this.currentCodeBlockLevel=a.codeBlockLevel},a.prototype.updateParent=function(){return this.isIndent()?this.pushParent():this.popParent()},a.prototype.pushParent=function(){return this.stack.push(this.parentNode),this.parentNode=this.node},a.prototype.popParent=function(){var a,b,c;c=[];for(a=0,b=this.delta-1;0<=b?a<=b:a>=b;0<=b?a++:a--)c.push(this.parentNode=this.stack.pop());return c},a.prototype.getNodeOptions=function(a){return a==null&&(a={}),{parentNode:a.parentNode||this.parentNode,blockLevel:a.blockLevel||this.currentBlockLevel,codeBlockLevel:a.codeBlockLevel||this.currentCodeBlockLevel,escapeHtml:a.escapeHtml||this.options.escapeHtml,escapeAttributes:a.escapeAttributes||this.options.escapeAttributes,cleanValue:a.cleanValue||this.options.cleanValue,format:a.format||this.options.format,preserveTags:a.preserveTags||this.options.preserveTags,selfCloseTags:a.selfCloseTags||this.options.selfCloseTags,uglify:a.uglify||this.options.uglify,placement:a.placement||this.options.placement,namespace:a.namespace||this.options.namespace,name:a.name||this.options.name}},a.prototype.nodeFactory=function(a){var b,h,i;return a==null&&(a=""),h=this.getNodeOptions(),a.match(/^:(escaped|preserve|css|javascript|plain|cdata|coffeescript)/)?b=new f(a,h):a.match(/^(\/|-#)(.*)/)?b=new d(a,h):a.match(/^(-#|-|=|!=|\&=|~)\s*(.*)/)?b=new c(a,h):a.match(/^(%|#[^{]|\.|\!)(.*)/)?b=new g(a,h):a.match(/^\+(.*)/)?b=new e(a,h):b=new j(a,h),(i=h.parentNode)!=null&&i.addChild(b),b},a.prototype.parse=function(a){var b,c,d,e,g,h,k,l;a==null&&(a=""),this.lineNumber=this.previousIndent=this.tabSize=this.currentBlockLevel=this.previousBlockLevel=0,this.currentCodeBlockLevel=this.previousCodeBlockLevel=0,this.node=null,this.stack=[],this.root=this.parentNode=new i("",this.getNodeOptions()),e=a.split("\n");while((d=e.shift())!==void 0){if(this.node instanceof f&&!this.exitFilter)if(/^(\s)*$/.test(d))this.node.addChild(new j("",this.getNodeOptions({parentNode:this.node})));else{g=d.match(/^(\s*)(.*)/),k=g[1],c=g[2];if(this.node.blockLevel>=k.length/2){this.exitFilter=!0,e.unshift(d);continue}h=d.match(RegExp("^\\s{"+(this.node.blockLevel*2+2)+"}(.*)")),h&&this.node.addChild(new j(h[1],this.getNodeOptions({parentNode:this.node})))}else{this.exitFilter=!1,g=d.match(/^(\s*)(.*)/),k=g[1],c=g[2];if(/^\s*$/.test(d))continue;while(/^[%.#].*[{(]/.test(c)&&!/^(\s*)[-=&!~.%#</]/.test(e[0])&&/([-\w]+[\w:-]*\w?)\s*=|('\w+[\w:-]*\w?')\s*=|("\w+[\w:-]*\w?")\s*=|(\w+[\w:-]*\w?):|('[-\w]+[\w:-]*\w?'):|("[-\w]+[\w:-]*\w?"):|:(\w+[\w:-]*\w?)\s*=>|:?'([-\w]+[\w:-]*\w?)'\s*=>|:?"([-\w]+[\w:-]*\w?)"\s*=>/.test(e[0]))b=e.shift(),c=c.replace(/(\s)+\|\s*$/,""),c+=" "+b.match(/^\s*(.*?)(\s+\|\s*)?$/)[1],this.lineNumber++;if(c.match(/(\s)+\|\s*$/)){c=c.replace(/(\s)+\|\s*$/," ");while((l=e[0])!=null?l.match(/(\s)+\|$/):void 0)c+=e.shift().match(/^(\s*)(.*)/)[2].replace(/(\s)+\|\s*$/,""),this.lineNumber++}this.currentIndent=k.length,this.indentChanged()&&(this.updateTabSize(),this.updateBlockLevel(),this.updateParent(),this.updateCodeBlockLevel(this.parentNode)),this.node=this.nodeFactory(c),this.previousBlockLevel=this.currentBlockLevel,this.previousIndent=this.currentIndent}this.lineNumber++}return this.evaluate(this.root)},a.prototype.evaluate=function(a){var b,c,d,e;e=a.children;for(c=0,d=e.length;c<d;c++)b=e[c],this.evaluate(b);return a.evaluate()},a.prototype.render=function(){switch(this.options.placement){case"amd":return this.renderAmd();case"standalone":return this.renderStandalone();default:return this.renderGlobal()}},a.prototype.renderStandalone=function(){var a;return a="return (context) ->\n (->\n"+k(this.precompile(),2)+"\n ).call(context)"},a.prototype.renderAmd=function(){var a,b,c,d,e,f,g,h;/^hamlcoffee/.test(this.options.dependencies.hc)&&(this.options.customHtmlEscape="hc.escape",this.options.customCleanValue="hc.cleanValue",this.options.customPreserve="hc.preserve",this.options.customFindAndPreserve="hc.findAndPreserve",this.options.customSurround="hc.surround",this.options.customSucceed="hc.succeed",this.options.customPrecede="hc.precede",this.options.customReference="hc.reference"),c=[],e=[],g=this.options.dependencies;for(d in g)b=g[d],c.push(b),e.push(d);f=k(this.precompile(),4),h=this.findDependencies(f);for(d in h)b=h[d],c.push(b),e.push(d);return c.length!==0?(c=function(){var b,d,e;e=[];for(b=0,d=c.length;b<d;b++)a=c[b],e.push("'"+a+"'");return e}(),c="["+c+"], ("+e.join(", ")+")"):c="","define "+c+" ->\n (context) ->\n render = ->\n \n"+f+"\n render.call(context)"},a.prototype.renderGlobal=function(){var a;return a=this.intro,this.options.extendScope?(a+=""+this.options.namespace+"['"+this.options.name+"'] = (context) -> ( ->\n",a+=" `with (context || {}) {`\n",a+=""+k(this.precompile(),1),a+="`}`\n",a+=").call(context)"):(a+=""+this.options.namespace+"['"+this.options.name+"'] = (context) -> ( ->\n",a+=""+k(this.precompile(),1),a+=").call(context)"),a},a.prototype.precompile=function(){var a,b;b="",a=this.createCode(),a.indexOf("$e")!==-1&&(this.options.customHtmlEscape?b+="$e = "+this.options.customHtmlEscape+"\n":b+="$e = (text, escape) ->\n \"#{ text }\"\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/'/g, ''')\n .replace(/\\//g, '/')\n .replace(/\"/g, '"')\n"),a.indexOf("$c")!==-1&&(this.options.customCleanValue?b+="$c = "+this.options.customCleanValue+"\n":(b+="$c = (text) ->\n",b+=" switch text\n",b+=" when null, undefined then ''\n",b+=" when true, false then '' + text\n",b+=" else text\n"));if(a.indexOf("$p")!==-1||a.indexOf("$fp")!==-1)this.options.customPreserve?b+="$p = "+this.options.customPreserve+"\n":b+="$p = (text) -> text.replace /\\n/g, '
'\n";return a.indexOf("$fp")!==-1&&(this.options.customFindAndPreserve?b+="$fp = "+this.options.customFindAndPreserve+"\n":b+="$fp = (text) ->\n text.replace /<("+this.options.preserveTags.split(",").join("|")+')>([^]*?)<\\/\\1>/g, (str, tag, content) ->\n "<#{ tag }>#{ $p content }</#{ tag }>"\n'),a.indexOf("surround")!==-1&&(this.options.customSurround?b+="surround = (start, end, fn) => "+this.options.customSurround+".call(@, start, end, fn)\n":b+="surround = (start, end, fn) => start + fn.call(@)?.replace(/^s+|s+$/g, '') + end\n"),a.indexOf("succeed")!==-1&&(this.options.customSucceed?b+="succeed = (start, end, fn) => "+this.options.customSucceed+".call(@, start, end, fn)\n":b+="succeed = (end, fn) => fn.call(@)?.replace(/s+$/g, '') + end\n"),a.indexOf("precede")!==-1&&(this.options.customPrecede?b+="precede = (start, end, fn) => "+this.options.customPrecede+".call(@, start, end, fn)\n":b+="precede = (start, fn) => start + fn.call(@)?.replace(/^s+/g, '')\n"),a.indexOf("$r")!==-1&&(this.options.customReference?b+="$r = "+this.options.customReference+"\n":b+="$r = (object, prefix) ->\n name = if prefix then prefix + '_' else ''\n\n if typeof(object.hamlObjectRef) is 'function'\n name += object.hamlObjectRef()\n else\n name += (object.constructor?.name || 'object').replace(/W+/g, '_').replace(/([a-zd])([A-Z])/g, '$1_$2').toLowerCase()\n\n id = if typeof(object.to_key) is 'function'\n object.to_key()\n else if typeof(object.id) is 'function'\n object.id()\n else if object.id\n object.id\n else\n object\n\n result = \"class='#{ name }'\"\n result += \" id='#{ name }_#{ id }'\" if id\n"),b+="$o = []\n",b+=""+a+"\n",b+='return $o.join("\\n")'+this.convertBooleans(a)+this.removeEmptyIDAndClass(a)+this.cleanupWhitespace(a)+"\n"},a.prototype.createCode=function(){var a,b,c,d,e,f,g,h,i,j;b=[],this.lines=[],i=this.root.children;for(e=0,g=i.length;e<g;e++)a=i[e],this.lines=this.lines.concat(a.render());this.lines=this.combineText(this.lines),this.blockLevel=0,j=this.lines;for(f=0,h=j.length;f<h;f++){c=j[f];if(c!==null)switch(c.type){case"text":b.push(""+l(c.cw)+this.getBuffer(this.blockLevel)+'.push "'+l(c.hw)+c.text+'"');break;case"run":c.block!=="end"?b.push(""+l(c.cw)+c.code):(b.push(""+l(c.cw)+c.code.replace("$buffer",this.getBuffer(this.blockLevel))),this.blockLevel-=1);break;case"insert":d="",c.findAndPreserve&&(d+="$fp "),c.preserve&&(d+="$p "),c.escape&&(d+="$e "),this.options.cleanValue&&(d+="$c "),b.push(""+l(c.cw)+this.getBuffer(this.blockLevel)+'.push "'+l(c.hw)+'" + '+d+c.code),c.block==="start"&&(this.blockLevel+=1,b.push(""+l(c.cw+1)+this.getBuffer(this.blockLevel)+" = []"))}}return b.join("\n")},a.prototype.getBuffer=function(a){return a>0?"$o"+a:"$o"},a.prototype.combineText=function(a){var b,c,d;b=[];while((c=a.shift())!==void 0){if(c.type==="text")while(a[0]&&a[0].type==="text"&&c.cw===a[0].cw)d=a.shift(),c.text+="\\n"+l(d.hw)+d.text;b.push(c)}return b},a.prototype.convertBooleans=function(a){return a.indexOf("$c")!==-1?this.options.format==="xhtml"?".replace(/\\s(\\w+)='true'/mg, \" $1='$1'\").replace(/\\s(\\w+)='false'/mg, '')":".replace(/\\s(\\w+)='true'/mg, ' $1').replace(/\\s(\\w+)='false'/mg, '')":""},a.prototype.removeEmptyIDAndClass=function(a){return a.indexOf("id=")!==-1||a.indexOf("class=")!==-1?'.replace(/\\s(?:id|class)=([\'"])(\\1)/mg, "")':""},a.prototype.cleanupWhitespace=function(a){return/\u0091|\u0092/.test(a)?".replace(/[\\s\\n]*\\u0091/mg, '').replace(/\\u0092[\\s\\n]*/mg, '')":""},a.prototype.findDependencies=function(a){var b,c,d,e,f;f=/require(?:\s+|\()(['"])(.+?)(\1)\)?/gm,b={};while(c=f.exec(a))d=c[2],e=d.split("/").pop(),b[e]=d;return b},a}()})).call(this)}),require.define("/nodes/node.coffee",function(a,b,c,d,e){((function(){var c,d;d=a("../util/text").escapeHTML,b.exports=c=function(){function a(a,b){this.expression=a!=null?a:"",b==null&&(b={}),this.parentNode=b.parentNode,this.children=[],this.opener=this.closer=null,this.silent=!1,this.preserveTags=b.preserveTags.split(","),this.preserve=!1,this.wsRemoval={around:!1,inside:!1},this.escapeHtml=b.escapeHtml,this.escapeAttributes=b.escapeAttributes,this.cleanValue=b.cleanValue,this.format=b.format,this.selfCloseTags=b.selfCloseTags.split(","),this.uglify=b.uglify,this.codeBlockLevel=b.codeBlockLevel,this.blockLevel=b.blockLevel,this.placement=b.placement,this.namespace=b.namespace,this.name=b.name}return a.CLEAR_WHITESPACE_LEFT="",a.CLEAR_WHITESPACE_RIGHT="",a.prototype.addChild=function(a){return this.children.push(a),this},a.prototype.getOpener=function(){return this.wsRemoval.around&&this.opener.text&&(this.opener.text=a.CLEAR_WHITESPACE_LEFT+this.opener.text),this.wsRemoval.inside&&this.opener.text&&(this.opener.text+=a.CLEAR_WHITESPACE_RIGHT),this.opener},a.prototype.getCloser=function(){return this.wsRemoval.inside&&this.closer.text&&(this.closer.text=a.CLEAR_WHITESPACE_LEFT+this.closer.text),this.wsRemoval.around&&this.closer.text&&(this.closer.text+=a.CLEAR_WHITESPACE_RIGHT),this.closer},a.prototype.isPreserved=function(){return this.preserve?!0:this.parentNode?this.parentNode.isPreserved():!1},a.prototype.isCommented=function(){return this.constructor.name==="Comment"?!0:this.parentNode?this.parentNode.isCommented():!1},a.prototype.markText=function(a,b){return b==null&&(b=!1),{type:"text",cw:this.codeBlockLevel,hw:this.uglify?0:this.blockLevel-this.codeBlockLevel,text:b?d(a):a}},a.prototype.markRunningCode=function(a){return{type:"run",cw:this.codeBlockLevel,code:a}},a.prototype.markInsertingCode=function(a,b,c,d){return b==null&&(b=!1),c==null&&(c=!1),d==null&&(d=!1),{type:"insert",cw:this.codeBlockLevel,hw:this.uglify?0:this.blockLevel-this.codeBlockLevel,escape:b,preserve:c,findAndPreserve:d,code:a}},a.prototype.evaluate=function(){},a.prototype.render=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;b=[];if(this.silent)return b;if(this.children.length===0)this.opener&&this.closer?(d=this.getOpener(),d.text+=this.getCloser().text,b.push(d)):!this.preserve&&this.isPreserved()?b.push(this.getOpener()):b.push(this.getOpener());else if(this.opener&&this.closer)if(this.preserve){this.wsRemoval.inside=!0,b.push(this.getOpener()),o=this.children;for(e=0,i=o.length;e<i;e++){a=o[e],p=a.render();for(f=0,j=p.length;f<j;f++)c=p[f],c.hw=this.blockLevel,b.push(c)}b.push(this.getCloser())}else{b.push(this.getOpener()),q=this.children;for(g=0,k=q.length;g<k;g++)a=q[g],b=b.concat(a.render());b.push(this.getCloser())}else if(this.opener){b.push(this.getOpener()),r=this.children;for(h=0,l=r.length;h<l;h++)a=r[h],b=b.concat(a.render())}else{s=this.children;for(n=0,m=s.length;n<m;n++)a=s[n],b.push(this.markText(a.render().text))}return b},a}()})).call(this)}),require.define("/util/text.coffee",function(a,b,c,d,e){b.exports={whitespace:function(a){var b;a*=2,b=[];while(b.length<a)b.push(" ");return b.join("")},escapeQuotes:function(a){return a?a.replace(/"/g,'\\"').replace(/\\\\\"/g,'\\"'):""},unescapeQuotes:function(a){return a?a.replace(/\\"/g,'"'):""},escapeHTML:function(a){return a?a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\"/g,"""):""},preserve:function(a){if(a)return a.replace(/<(pre|textarea)>(.*?)<\/\1>/g,function(a){return a.replace("\\n","
")})},indent:function(a,c){return a.replace(/^(.*)$/mg,b.exports.whitespace(c)+"$1")}}}),require.define("/nodes/text.coffee",function(a,b,c,d,e){((function(){var c,d,e,f=Object.prototype.hasOwnProperty,g=function(a,b){function d(){this.constructor=a}for(var c in b)f.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};c=a("./node"),e=a("../util/text").escapeQuotes,b.exports=d=function(){function a(){a.__super__.constructor.apply(this,arguments)}return g(a,c),a.prototype.evaluate=function(){return this.opener=this.markText(e(this.expression))},a}()})).call(this)}),require.define("/nodes/haml.coffee",function(a,b,c,d,e){((function(){var c,d,e,f=Object.prototype.hasOwnProperty,g=function(a,b){function d(){this.constructor=a}for(var c in b)f.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};d=a("./node"),e=a("../util/text").escapeQuotes,b.exports=c=function(){function a(){a.__super__.constructor.apply(this,arguments)}return g(a,d),a.prototype.evaluate=function(){var a,b,c,d,f,g;g=this.parseExpression(this.expression);if(g.doctype)return this.opener=this.markText(""+e(this.buildDocType(g.doctype)));if(this.isNotSelfClosing(g.tag)){f=this.buildHtmlTagPrefix(g);if(g.assignment){d=g.assignment.match(/^(=|!=|&=|~)\s*(.*)$/),c=d[1],a=d[2];if(c==="~")b="#{$fp "+a+" }";else if(c==="&="||c==="="&&this.escapeHtml)this.preserve?this.cleanValue?b="#{ $p($e($c("+a+"))) }":b="#{ $p($e("+a+")) }":this.cleanValue?b="#{ $e($c("+a+")) }":b="#{ $e("+a+") }";else if(c==="!="||c==="="&&!this.escapeHtml)this.preserve?this.cleanValue?b="#{ $p($c("+a+")) }":b="#{ $p("+a+") }":this.cleanValue?b="#{ $c("+a+") }":b="#{ "+a+" }";return this.opener=this.markText(""+f+">"+b),this.closer=this.markText("</"+g.tag+">")}return g.text?(this.opener=this.markText(""+f+">"+g.text),this.closer=this.markText("</"+g.tag+">")):(this.opener=this.markText(f+">"),this.closer=this.markText("</"+g.tag+">"))}return g.tag=g.tag.replace(/\/$/,""),f=this.buildHtmlTagPrefix(g),this.opener=this.markText(""+f+(this.format==="xhtml"?" /":"")+">")},a.prototype.parseExpression=function(a){var b,c,d,f,g,h,i,j;g=this.parseTag(a),this.preserveTags.indexOf(g.tag)!==-1&&(this.preserve=!0),d=this.interpolateCodeAttribute((i=g.ids)!=null?i.pop():void 0,!0),c=g.classes,b={};if(g.attributes){j=g.attributes;for(f in j)h=j[f],f==="id"?d?d+="_"+this.interpolateCodeAttribute(h,!0):d=this.interpolateCodeAttribute(h,!0):f==="class"?(c||(c=[]),c.push(h)):b[f]=h}return{doctype:g.doctype,tag:g.tag,id:d,classes:c,text:e(g.text),attributes:b,assignment:g.assignment,reference:g.reference}},a.prototype.parseTag=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G;try{g=(C=a.match(/^(\!{3}.*)/))!=null?C[1]:void 0;if(g)return{doctype:g};i=a.match(/^((?:[#%\.][a-z0-9_:\-]*[\/]?)+)/i)[0],r=a.substring(i.length);if(r.match(/^[{([]/)){q="",j="",s="",D=["[","{","(","[","{","("];for(y=0,A=D.length;y<A;y++){t=D[y];if(t===r[0]){h=function(){switch(t){case"{":return"}";case"(":return")";case"[":return"]"}}(),o=0;for(p=0,E=r.length;0<=E?p<=E:p>=E;0<=E?p++:p--){e=r[p],e===t&&(o+=1);if(e===h){if(o===1)break;o-=1}}switch(t){case"{":s+=r.substring(0,p+1),r=r.substring(p+1);break;case"(":j+=r.substring(0,p+1),r=r.substring(p+1);break;case"[":q=r.substring(1,p),r=r.substring(p+1)}}}b=r||""}else q="",j="",s="",b=r;d={},F=[this.parseAttributes(j),this.parseAttributes(s)];for(z=0,B=F.length;z<B;z++){c=F[z];for(m in c)w=c[m],d[m]=w}if(x=(G=b.match(/^[<>]{0,2}/))!=null?G[0]:void 0)b=b.substring(x.length);return b[0]===" "&&(b=b.substring(1)),b&&!b.match(/^(=|!=|&=|~)/)&&(v=b.replace(/^ /,""),b=void 0),x&&(x.indexOf(">")!==-1&&(this.wsRemoval.around=!0),x.indexOf("<")!==-1&&(this.wsRemoval.inside=!0,this.preserve=!0)),u=i.match(/\%([a-z_\-][a-z0-9_:\-]*[\/]?)/i),l=i.match(/\#([a-z_\-][a-z0-9_\-]*)/gi),f=i.match(/\.([a-z0-9_\-]*)/gi),{tag:u?u[1]:"div",ids:l?function(){var a,b,c;c=[];for(a=0,b=l.length;a<b;a++)k=l[a],c.push("'"+k.substr(1)+"'");return c}():void 0,classes:f?function(){var a,b,c;c=[];for(a=0,b=f.length;a<b;a++)n=f[a],c.push("'"+n.substr(1)+"'");return c}():void 0,attributes:d,assignment:b,reference:q,text:v}}catch(H){throw"Unable to parse tag from "+a+": "+H}},a.prototype.parseAttributes=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D;c={};if(a===void 0)return c;t=a.substring(0,1),a=a.replace(/(=|:|=>)\s*('([^\\']|\\\\|\\')*'|"([^\\"]|\\\\|\\")*")/g,function(a,b,c){return b+(c!=null?c.replace(/(:|=|=>)/g,"$1"):void 0)}),k=0,r=0,m=[],t==="("?(s=1,e=a.length-1):(s=0,e=a.length);for(o=s;s<=e?o<e:o>e;s<=e?o++:o--)d=a[o],d==="("&&(k+=1,k===1&&(r=o)),d===")"&&(k===1?r!==0&&o-r!==1&&m.push({start:r,end:o}):k-=1);z=m.reverse();for(v=0,x=z.length;v<x;v++)l=z[v],a=a.substring(0,l.start)+a.substring(l.start,l.end).replace(/(:|=|=>)/g,"$1")+a.substring(l.end);switch(t){case"(":j=/\(\s*([-\w]+[\w:-]*\w?)\s*=|\s+([-\w]+[\w:-]*\w?)\s*=|\(\s*('\w+[\w:-]*\w?')\s*=|\s+('\w+[\w:-]*\w?')\s*=|\(\s*("\w+[\w:-]*\w?")\s*=|\s+("\w+[\w:-]*\w?")\s*=/g;break;case"{":j=/[{,]\s*(\w+[\w:-]*\w?)\s*:|[{,]\s*('[-\w]+[\w:-]*\w?')\s*:|[{,]\s*("[-\w]+[\w:-]*\w?")\s*:|[{,]\s*:(\w+[\w:-]*\w?)\s*=>|[{,]\s*:?'([-\w]+[\w:-]*\w?)'\s*=>|[{,]\s*:?"([-\w]+[\w:-]*\w?)"\s*=>/g}n=a.split(j).filter(Boolean),g=!1,f=!1;while(n.length){i=n.splice(0,2);if(i.length===1)b=i[0].replace(/^[\s({]+|[\s)}]+$/g,""),c[b]="true";else{h=(A=i[0])!=null?A.replace(/^\s+|\s+$/g,"").replace(/^:/,""):void 0;if(q=h.match(/^("|')(.*)\1$/))h=q[2];u=(B=i[1])!=null?B.replace(/^\s+|[\s,]+$/g,"").replace(/\u0090/g,""):void 0,h==="data"&&!u?(g=!0,f=!0):h&&u&&g&&(h="data-"+h,/}\s*$/.test(u)&&(g=!1));switch(t){case"(":u=u.replace(/^\s+|[\s)]+$/g,""),p=(C=/^(['"])/.exec(u))!=null?C[1]:void 0,o=u.lastIndexOf(p);if(o>1){D=u.substring(o+1).split(" ");for(w=0,y=D.length;w<y;w++)b=D[w],b&&(c[b]="true");u=u.substring(0,o+1)}c[h]=u;break;case"{":c[h]=u.replace(/^\s+|[\s}]+$/g,"")}}}return f&&delete c.data,c},a.prototype.buildHtmlTagPrefix=function(a){var b,c,d,e,f,g,h,i,j,k,l;h=["<"+a.tag];if(a.classes){d=!1,b=function(){var b,c,e,f;e=a.classes,f=[];for(b=0,c=e.length;b<c;b++)g=e[b],g=this.interpolateCodeAttribute(g,!0),g.indexOf("#{")!==-1&&(d=!0),f.push(g);return f}.call(this);if(d&&b.length>1){c="#{ [";for(j=0,k=b.length;j<k;j++)f=b[j],c+=""+this.quoteAndEscapeAttributeValue(f,!0)+",";c=c.substring(0,c.length-1)+"].sort().join(' ').replace(/^\\s+|\\s+$/g, '') }"}else c=b.sort().join(" ");h.push("class='"+c+"'")}a.id&&h.push("id='"+a.id+"'"),a.reference&&(a.attributes&&(delete a.attributes["class"],delete a.attributes.id),h.push("#{$r("+a.reference+")}"));if(a.attributes){l=a.attributes;for(e in l)i=l[e],i==="true"||i==="false"?i==="true"&&(this.format==="html5"?h.push(""+e):h.push(""+e+"="+this.quoteAndEscapeAttributeValue(e))):h.push(""+e+"="+this.quoteAndEscapeAttributeValue(this.interpolateCodeAttribute(i)))}return h.join(" ")},a.prototype.interpolateCodeAttribute=function(a,b){var c;b==null&&(b=!1);if(!a)return;return a.match(/^("|').*\1$/)||(this.escapeAttributes?this.cleanValue?a="#{ $e($c("+a+")) }":a="#{ $e("+a+") }":this.cleanValue?a="#{ $c("+a+") }":a="#{ ("+a+") }"),b&&(c=a.match(/^("|')(.*)\1$/))&&(a=c[2]),a},a.prototype.quoteAndEscapeAttributeValue=function(a,b){var c,d,f,g,h,i,j,k;b==null&&(b=!1);if(!a)return;if(h=a.match(/^("|')(.*)\1$/))a=h[2];return k=this.splitInterpolations(a),g=!1,d=!1,f=!1,k=function(){var a,b,c;c=[];for(a=0,b=k.length;a<b;a++)j=k[a],j.slice(0,2)==="#{"?(j.indexOf("$e")===-1&&j.indexOf("$c")===-1&&(this.escapeAttributes?this.cleanValue?j="#{ $e($c("+j.slice(2,-1)+")) }":j="#{ $e("+j.slice(2,-1)+") }":this.cleanValue&&(j="#{ $c("+j.slice(2,-1)+") }")),f=!0):(g||(g=j.indexOf("'")!==-1),d||(d=j.indexOf('"')!==-1)),c.push(j);return c}.call(this),b?f?i='"'+k.join("")+'"':i="'"+k.join("")+"'":(!d&&!g&&(i="'"+k.join("")+"'"),g&&!d&&(i='\\"'+k.join("")+'\\"'),d&&!g&&(c=function(){var a,b,c;c=[];for(a=0,b=k.length;a<b;a++)j=k[a],c.push(e(j));return c}(),i="'"+c.join("")+"'"),g&&d&&(c=function(){var a,b,c;c=[];for(a=0,b=k.length;a<b;a++)j=k[a],c.push(e(j).replace(/'/g,"'"));return c}(),i="'"+c.join("")+"'")),i},a.prototype.splitInterpolations=function(a){var b,c,d,e,f,g,h;d=0,f=0,g=[];for(e=0,h=a.length;0<=h?e<h:e>h;0<=h?e++:e--)b=a[e],c=a.slice(e,e+1+1||9e9),b==="{"&&(d+=1),c==="#{"&&d===0&&(g.push(a.slice(f,e)),f=e),b==="}"&&(d-=1,d===0&&(g.push(a.slice(f,e+1||9e9)),f=e+1));return g.push(a.slice(f,a.length)),g.filter(Boolean)},a.prototype.buildDocType=function(a){switch(""+this.format+" "+a){case"xhtml !!! XML":return"<?xml version='1.0' encoding='utf-8' ?>";case"xhtml !!!":return'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';case"xhtml !!! 1.1":return'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">';case"xhtml !!! mobile":return'<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd">';case"xhtml !!! basic":return'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">';case"xhtml !!! frameset":return'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">';case"xhtml !!! 5":case"html5 !!!":return"<!DOCTYPE html>";case"html5 !!! XML":case"html4 !!! XML":return"";case"html4 !!!":return'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">';case"html4 !!! frameset":return'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">';case"html4 !!! strict":return'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">'}},a.prototype.isNotSelfClosing=function(a){return this.selfCloseTags.indexOf(a)===-1&&!a.match(/\/$/)},a}()})).call(this)}),require.define("/nodes/code.coffee",function(a,b,c,d,e){((function(){var c,d,e=Object.prototype.hasOwnProperty,f=function(a,b){function d(){this.constructor=a}for(var c in b)e.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};d=a("./node"),b.exports=c=function(){function a(){a.__super__.constructor.apply(this,arguments)}return f(a,d),a.prototype.evaluate=function(){var a,b,c,d;b=this.expression.match(/(-|!=|\&=|=|~)\s?(.*)?/),d=b[1],a=b[2];if(d!=="-")return d==="~"?this.escapeHtml?this.opener=this.markInsertingCode(a,!0,!1,!0):this.opener=this.markInsertingCode(a,!1,!1,!0):(c=d==="&="||d==="="&&this.escapeHtml,this.children.length!==0&&a.match(/(->|=>)$/)?(this.opener=this.markInsertingCode(a,c,!1,!1),this.opener.block="start",this.closer=this.markRunningCode(' $buffer.join "\\n"'),this.closer.block="end"):this.opener=this.markInsertingCode(a,c));this.opener=this.markRunningCode(a);if(this.children.length!==0&&this.opener.code.match(/(->|=>)/))return this.closer=this.markRunningCode(" ''")},a}()})).call(this)}),require.define("/nodes/comment.coffee",function(a,b,c,d,e){((function(){var c,d,e,f=Object.prototype.hasOwnProperty,g=function(a,b){function d(){this.constructor=a}for(var c in b)f.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};d=a("./node"),e=a("../util/text").escapeQuotes,b.exports=c=function(){function a(){a.__super__.constructor.apply(this,arguments)}return g(a,d),a.prototype.evaluate=function(){var a,b,c,d;d=this.expression.match(/(-#|\/\[|\/)\s?(.*)?/),b=d[0],c=d[1],a=d[2];switch(c){case"-#":return this.silent=!0,this.opener=this.markText("");case"/[":return this.opener=this.markText("<!--["+a+">"),this.closer=this.markText("<![endif]-->");case"/":return a?(this.opener=this.markText("<!-- "+e(a)),this.closer=this.markText(" -->")):(this.opener=this.markText("<!--"),this.closer=this.markText("-->"))}},a}()})).call(this)}),require.define("/nodes/filter.coffee",function(a,b,c,d,e){((function(){var c,d,e,f,g=Object.prototype.hasOwnProperty,h=function(a,b){function d(){this.constructor=a}for(var c in b)g.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};d=a("./node"),f=a("../util/text").whitespace,e=a("../util/text").unescapeQuotes,b.exports=c=function(){function a(){a.__super__.constructor.apply(this,arguments)}return h(a,d),a.prototype.evaluate=function(){var a;return this.filter=(a=this.expression.match(/:(escaped|preserve|css|javascript|coffeescript|plain|cdata|coffeescript)(.*)?/))!=null?a[1]:void 0},a.prototype.render=function(){var a,b,c,d,e,f,g,h,i,j;c=[];switch(this.filter){case"escaped":i=this.children;for(e=0,g=i.length;e<g;e++)a=i[e],c.push(this.markText(a.render()[0].text,!0));break;case"preserve":d="",j=this.children;for(f=0,h=j.length;f<h;f++)a=j[f],d+=""+a.render()[0].text+"
";d=d.replace(/\&\#x000A;$/,""),c.push(this.markText(d));break;case"plain":this.renderFilterContent(0,c);break;case"css":this.format==="html5"?c.push(this.markText("<style>")):c.push(this.markText("<style type='text/css'>")),this.format==="xhtml"&&c.push(this.markText(" /*<![CDATA[*/")),b=this.format==="xhtml"?2:1,this.renderFilterContent(b,c),this.format==="xhtml"&&c.push(this.markText(" /*]]>*/")),c.push(this.markText("</style>"));break;case"javascript":this.format==="html5"?c.push(this.markText("<script>")):c.push(this.markText("<script type='text/javascript'>")),this.format==="xhtml"&&c.push(this.markText(" //<![CDATA[")),b=this.format==="xhtml"?2:1,this.renderFilterContent(b,c),this.format==="xhtml"&&c.push(this.markText(" //]]>")),c.push(this.markText("</script>"));break;case"cdata":c.push(this.markText("<![CDATA[")),this.renderFilterContent(2,c),c.push(this.markText("]]>"));break;case"coffeescript":this.renderFilterContent(0,c,"run")}return c},a.prototype.renderFilterContent=function(a,b,c){var d,g,h,i,j,k,l,m,n,o,p;c==null&&(c="text"),g=[],i=0,o=this.children;for(k=0,m=o.length;k<m;k++)d=o[k],g.push(d.render()[0].text);p=[];for(l=0,n=g.length;l<n;l++){j=g[l];if(j==="")p.push(i+=1);else{switch(c){case"text":for(h=0;0<=i?h<i:h>i;0<=i?h++:h--)b.push(this.markText(""));b.push(this.markText(""+f(a)+j));break;case"run":b.push(this.markRunningCode(""+e(j)))}p.push(i=0)}}return p},a}()})).call(this)}),require.define("/nodes/directive.coffee",function(a,b,c,d,e){((function(){var c,d,e,f=Object.prototype.hasOwnProperty,g=function(a,b){function d(){this.constructor=a}for(var c in b)f.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};e=a("path"),d=a("./node"),b.exports=c=function(){function a(){a.__super__.constructor.apply(this,arguments)}return g(a,d),a.prototype.directives={include:function(a){var b,c,d,e;try{e=a.match(/\s*['"](.*)['"](?:,\s*(.*))?\s*/),e[0],c=e[1],b=e[2]}catch(f){throw"Failed to parse the include directive from "+a}return b||(b="this"),d=function(){switch(this.placement){case"global":return""+this.namespace+"['"+c+"'].apply("+b+")";case"amd":return"require('"+c+"').apply("+b+")";default:throw"Include directive not available when placement is "+this.placement}}.call(this),this.opener=this.markInsertingCode(d,!1)}},a.prototype.evaluate=function(){var a,b,c,d;a=Object.keys(this.directives).join("|");try{d=this.expression.match(RegExp("\\+("+a+")(.*)")),d[0],b=d[1],c=d[2]}catch(e){throw"Unable to recognize directive from "+this.expression}return this.directives[b].call(this,c)},a}()})).call(this)}),require.define("/hamlc.coffee",function(a,b,c,d,e){((function(){var c,d,e,f;e=a("fs"),d=a("./haml-coffee"),process.browser?c=window.CoffeeScript:c=a("coffee-script"),f={},b.exports={compile:function(a,b){var e,f;return b==null&&(b={}),e=new d(b),e.parse(a),f=new Function(c.compile(e.precompile(),{bare:!0})),function(a){return f.call(a)}},template:function(a,b,e,f){var g;return f==null&&(f={}),f.namespace=e,f.name=b,g=new d(f),g.parse(a),c.compile(g.render())},__express:function(a,c,d){var g;!(c&&c.constructor&&c.call&&c.apply)||(d=c,c={});try{return c.cache&&f[a]?d(null,f[a](c)):(c.filename=a,g=e.readFileSync(a,"utf8"),c.cache?(f[a]=b.exports.compile(g,c),d(null,f[a](c))):d(null,b.exports.compile(g,c)(c)))}catch(h){return d(h)}}}})).call(this)}),require.define("fs",function(a,b,c,d,e){}) |
@@ -11,3 +11,3 @@ { | ||
], | ||
"version" : "1.10.0", | ||
"version" : "1.10.1", | ||
"licenses" : [ | ||
@@ -14,0 +14,0 @@ { |
@@ -25,6 +25,6 @@ # Haml Coffee Templates [![Build Status](https://secure.travis-ci.org/netzpirat/haml-coffee.png)](http://travis-ci.org/netzpirat/haml-coffee) | ||
There are different packages available for integrating Haml-Coffee into your workflow: | ||
There are different packages available for integrating Haml Coffee into your workflow: | ||
* [grunt-haml](https://github.com/concordusapps/grunt-haml) for projects using [Grunt](http://gruntjs.com/). | ||
* [hem-haml-coffee](https://github.com/vojto/hem-haml-coffee) for project using [Hem](https://github.com/maccman/hem/). | ||
* [hem-haml-coffee](https://github.com/vojto/hem-haml-coffee) for projects using [Hem](https://github.com/maccman/hem/). | ||
* [haml_coffee_assets](https://github.com/netzpirat/haml_coffee_assets) for projects using Rails. | ||
@@ -65,3 +65,3 @@ * [stitch-haml-coffee](https://github.com/jnbt/stitch-haml-coffee) for projects using [Stitch](https://github.com/sstephenson/stitch). | ||
the [codo](https://github.com/netzpirat/codo) generated | ||
[Haml-Coffee API documentation](http://coffeedoc.info/github/netzpirat/haml-coffee/master/). | ||
[Haml Coffee API documentation](http://coffeedoc.info/github/netzpirat/haml-coffee/master/). | ||
@@ -307,3 +307,3 @@ ### Using with Express | ||
Haml Coffee implements the [Haml Spec](https://github.com/norman/haml-spec) to ensure some degree of compatibility to | ||
Haml Coffee implements the [Haml Spec](https://github.com/haml/haml-spec) to ensure some degree of compatibility to | ||
other Haml implementations and the following sections are fully compatible to Ruby Haml: | ||
@@ -313,3 +313,3 @@ | ||
* Multiline: `|` | ||
* Element names `%` | ||
* Element names: `%` | ||
* Attributes: `{}` or `()` | ||
@@ -405,3 +405,3 @@ * Class and ID: `.` and `#`, implicit `div` elements | ||
Haml-Coffee supports object references, but they are implemented slightly different due to the underlying runtime and | ||
Haml Coffee supports object references, but they are implemented slightly different due to the underlying runtime and | ||
different code style for CoffeeScript. | ||
@@ -452,3 +452,3 @@ | ||
Haml-Coffee supports currently a single directive that extends the HAML syntax. | ||
Haml Coffee supports currently a single directive that extends the Haml syntax. | ||
@@ -828,3 +828,3 @@ ### Include | ||
Haml-Coffee uses [Guard](https://github.com/guard/guard) for development, which you can install Guard with the Ruby | ||
Haml Coffee uses [Guard](https://github.com/guard/guard) for development, which you can install Guard with the Ruby | ||
[Bundler](http://gembundler.com/): | ||
@@ -831,0 +831,0 @@ |
@@ -186,2 +186,10 @@ { | ||
"HTML attributes without values" : { | ||
"haml_template" : "text/no_value_attributes", | ||
"html_template" : "text/no_value_attributes", | ||
"config" : { | ||
"format" : "html5" | ||
} | ||
}, | ||
"class concatenation" : { | ||
@@ -188,0 +196,0 @@ "haml_template" : "coffee/class", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
322657
114
2842