-
Notifications
You must be signed in to change notification settings - Fork 0
/
ember-template-compiler.min.js
10 lines (10 loc) · 3.73 KB
/
ember-template-compiler.min.js
1
2
3
4
5
6
7
8
9
10
/*!
* @overview Ember - JavaScript Application Framework
* @copyright Copyright 2011-2014 Tilde Inc. and contributors
* Portions Copyright 2006-2011 Strobe Inc.
* Portions Copyright 2008-2011 Apple Inc. All rights reserved.
* @license Licensed under MIT license
* See https://raw.github.com/emberjs/ember.js/master/LICENSE
* @version 1.4.0-beta.1+canary.ed89e1ea
*/
!function(){var e=Object.create||function(e){function r(){}return r.prototype=e,new r},r=Ember.imports&&Ember.imports.Handlebars||this&&this.Handlebars;r||"function"!=typeof require||(r=require("handlebars")),Ember.Handlebars=e(r),Ember.Handlebars.helper=function(e,r){Ember.View.detect(r)?Ember.Handlebars.registerHelper(e,Ember.Handlebars.makeViewHelper(r)):Ember.Handlebars.registerBoundHelper.apply(null,arguments)},Ember.Handlebars.makeViewHelper=function(e){return function(r){return Ember.Handlebars.helpers.view.call(this,e,r)}},Ember.Handlebars.helpers=e(r.helpers),Ember.Handlebars.Compiler=function(){},r.Compiler&&(Ember.Handlebars.Compiler.prototype=e(r.Compiler.prototype)),Ember.Handlebars.Compiler.prototype.compiler=Ember.Handlebars.Compiler,Ember.Handlebars.JavaScriptCompiler=function(){},r.JavaScriptCompiler&&(Ember.Handlebars.JavaScriptCompiler.prototype=e(r.JavaScriptCompiler.prototype),Ember.Handlebars.JavaScriptCompiler.prototype.compiler=Ember.Handlebars.JavaScriptCompiler),Ember.Handlebars.JavaScriptCompiler.prototype.namespace="Ember.Handlebars",Ember.Handlebars.JavaScriptCompiler.prototype.initializeBuffer=function(){return"''"},Ember.Handlebars.JavaScriptCompiler.prototype.appendToBuffer=function(e){return"data.buffer.push("+e+");"};var a=/helpers\.(.*?)\)/,t=/helpers\['(.*?)'/,o=/(.*blockHelperMissing\.call\(.*)(stack[0-9]+)(,.*)/;Ember.Handlebars.JavaScriptCompiler.stringifyLastBlockHelperMissingInvocation=function(e){var r=e[e.length-1],n=(a.exec(r)||t.exec(r))[1],i=o.exec(r);e[e.length-1]=i[1]+"'"+n+"'"+i[3]};var n=Ember.Handlebars.JavaScriptCompiler.stringifyLastBlockHelperMissingInvocation,i=Ember.Handlebars.JavaScriptCompiler.prototype.blockValue;Ember.Handlebars.JavaScriptCompiler.prototype.blockValue=function(){i.apply(this,arguments),n(this.source)};var l=Ember.Handlebars.JavaScriptCompiler.prototype.ambiguousBlockValue;Ember.Handlebars.JavaScriptCompiler.prototype.ambiguousBlockValue=function(){l.apply(this,arguments),n(this.source)};var p="ember"+ +new Date,s=1;Ember.Handlebars.Compiler.prototype.mustache=function(e){if(e.isHelper&&"control"===e.id.string)e.hash=e.hash||new r.AST.HashNode([]),e.hash.pairs.push(["controlID",new r.AST.StringNode(p+s++)]);else if(e.params.length||e.hash);else{var a=new r.AST.IdNode([{part:"_triageMustache"}]);e.escaped||(e.hash=e.hash||new r.AST.HashNode([]),e.hash.pairs.push(["unescaped",new r.AST.StringNode("true")])),e=new r.AST.MustacheNode([a].concat([e.id]),e.hash,!e.escaped)}return r.Compiler.prototype.mustache.call(this,e)},Ember.Handlebars.precompile=function(e){var a=r.parse(e),t={knownHelpers:{action:!0,unbound:!0,"bind-attr":!0,template:!0,view:!0,_triageMustache:!0},data:!0,stringParams:!0},o=(new Ember.Handlebars.Compiler).compile(a,t);return(new Ember.Handlebars.JavaScriptCompiler).compile(o,t,void 0,!0)},r.compile&&(Ember.Handlebars.compile=function(e){var a=r.parse(e),t={data:!0,stringParams:!0},o=(new Ember.Handlebars.Compiler).compile(a,t),n=(new Ember.Handlebars.JavaScriptCompiler).compile(o,t,void 0,!0),i=Ember.Handlebars.template(n);return i.isMethod=!1,i})}(),"undefined"==typeof location||"localhost"!==location.hostname&&"127.0.0.1"!==location.hostname||Ember.Logger.warn("You are running a production build of Ember on localhost and won't receive detailed error messages. If you want full error messages please use the non-minified build provided on the Ember website.");