text: // knockout-amd-helpers 0.6.2 | (c) 2014 Ryan Niemeyer |  http://www.opensource.org/licenses/mit-license
  define(["knockout"],function(a){var b=window.require||window.curl,c=a.utils.unwrapObservable,d=function(a,b){var c,d=function(){return a.apply(this,b||[])};return d.prototype=a.prototype,c=new d,c.constructor=a,c},e=function(a){return a&&a.replace(/\/?$/,"/")},f=function(b){for(var c=a.virtualElements.firstChild(b);c;){if(1===c.nodeType||8===c.nodeType)return!0;c=a.virtualElements.nextSibling(c)}return!1};a.bindingHandlers.module={init:function(g,h,i,j,k){var l,m,n=h(),o=c(n),p={},q=a.bindingHandlers.module.initializer,r=a.bindingHandlers.module.disposeMethod;return p.templateEngine=o&&o.templateEngine,p.afterRender=function(){var a=c(h());a&&"function"==typeof a.afterRender&&a.afterRender.apply(this,arguments)},f(g)||(p.name=function(){var a=c(n);return(a&&"object"==typeof a?c(a.template||a.name):a)||""}),p.data=a.observable(),p["if"]=p.data,a.applyBindingsToNode(g,{template:p},l=k.extend({$module:null})),m=function(){a.computed(function(){var a=p.data();a&&("function"==typeof a[r]&&(a[r].call(a),a=null),p.data(null))}).dispose()},a.computed({read:function(){var f,g=c(n);g&&"object"==typeof g&&(q=g.initializer||q,r=g.disposeMethod||r,f=[].concat(c(g.data)),g=c(g.name)),m(),g&&b([e(a.bindingHandlers.module.baseDir)+g],function(a){"function"==typeof a?a=d(a,f):a&&a[q]&&(a=a[q].apply(a,f||[])||a),l.$module=a,p.data(a)})},disposeWhenNodeIsRemoved:g}),a.utils.domNodeDisposal.addDisposeCallback(g,m),{controlsDescendantBindings:!0}},baseDir:"",initializer:"initialize",disposeMethod:"dispose"},a.virtualElements&&(a.virtualElements.allowedBindings.module=!0),function(a,b){var c=new a.nativeTemplateEngine,d=(c.renderTemplate,{});c.defaultPath="templates",c.defaultSuffix=".tmpl.html",c.defaultRequireTextPluginName="text",a.templateSources.requireTemplate=function(b){this.key=b,this.template=a.observable(" "),this.requested=!1,this.retrieved=!1},a.templateSources.requireTemplate.prototype.text=function(){return!this.requested&&this.key&&(b([c.defaultRequireTextPluginName+"!"+e(c.defaultPath)+this.key+c.defaultSuffix],function(a){this.retrieved=!0,this.template(a)}.bind(this)),this.requested=!0),this.key||this.template(""),0===arguments.length?this.template():void 0},c.makeTemplateSource=function(b,c){var e;return"string"==typeof b?(e=(c||document).getElementById(b),e&&"script"===e.tagName.toLowerCase()?new a.templateSources.domElement(e):(b in d||(d[b]=new a.templateSources.requireTemplate(b)),d[b])):!b||1!==b.nodeType&&8!==b.nodeType?void 0:new a.templateSources.anonymousTemplate(b)},c.renderTemplate=function(b,d,e,f){var g=c.makeTemplateSource(b,f),h=e&&e.afterRender;return"function"==typeof h&&g instanceof a.templateSources.requireTemplate&&!g.retrieved&&(e.afterRender=function(){g.retrieved&&h.apply(this,arguments)}),c.renderTemplateSource(g,d,e)},a.amdTemplateEngine=c,a.setTemplateEngine(c)}(a,b)});