n:function(a,c,e){varf=i&&k[c];if(!f&&"undefined"!=typeofjQuery){if(b(a,c))varg=e,e=function(a,b){varc=this.checked;b&&(this.checked=b.fb!==p);g.call(this,a);this.checked=c};jQuery(a).bind(c,e)}else!f&&"function"==typeofa.addEventListener?a.addEventListener(c,e,t):"undefined"!=typeofa.attachEvent?a.attachEvent("on"+c,function(b){e.call(a,b)}):m(Error("Browser doesn't support addEventListener or attachEvent"))},va:function(a,c){(!a||!a.nodeType)&&m(Error("element must be a DOM node when calling triggerEvent"));
if("undefined"!=typeofjQuery){vare=[];b(a,c)&&e.push({fb:a.checked});jQuery(a).trigger(c,e)}else"function"==typeofdocument.createEvent?"function"==typeofa.dispatchEvent?(e=document.createEvent(f[c]||"HTMLEvents"),e.initEvent(c,p,p,window,0,0,0,0,0,t,t,t,t,0,a),a.dispatchEvent(e)):m(Error("The supplied element doesn't support dispatchEvent")):"undefined"!=typeofa.fireEvent?(b(a,c)&&(a.checked=a.checked!==p),a.fireEvent("on"+c)):m(Error("Browser doesn't support triggering events"))},d:function(b){returna.la(b)?
e,c){("undefined"==typeofJSON||"undefined"==typeofJSON.stringify)&&m(Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js"));returnJSON.stringify(a.a.d(b),e,c)},Cb:function(b,e,c){varc=c||{},f=c.params||{},g=c.includeFields||this.Ca,d=b;if("object"==typeofb&&"form"===a.a.o(b))for(vard=b.action,h=g.length-1;0<=h;h--)for(vark=a.a.Da(b,g[h]),
jQuery.cleanData([e]);if(g[e.nodeType])for(f=e.firstChild;e=f;)f=e.nextSibling,8===e.nodeType&&c(e)}vard="__ko_domNodeDisposal__"+(newDate).getTime(),f={1:p,8:p,9:p},g={1:p,9:p};return{wa:function(a,c){"function"!=typeofc&&m(Error("Callback must be a function"));b(a,p).push(c)},Ma:function(c,f){varg=b(c,t);g&&(a.a.ba(g,f),0==g.length&&a.a.f.set(c,d,n))},F:function(b){if(f[b.nodeType]&&(c(b),g[b.nodeType])){vard=[];a.a.N(d,b.getElementsByTagName("*"));for(varb=0,j=d.length;b<j;b++)c(d[b])}},
j;e++)c(d[e],g)}vard={};return{na:function(a){"function"!=typeofa&&m(Error("You can only pass a function to ko.memoization.memoize()"));varc=b()+b();d[c]=a;return"<\!--[ko_memo:"+c+"]--\>"},Va:function(a,b){varc=d[a];c===n&&m(Error("Couldn't find any memo with ID "+a+". Perhaps it's already been unmemoized."));try{returnc.apply(s,b||[]),p}finally{deleted[a]}},Wa:function(b,d){vare=[];c(b,e);for(varh=0,j=e.length;h<j;h++){vark=e[h].jb,i=[k];d&&a.a.N(i,d);a.s.Va(e[h].yb,i);k.nodeValue="";k.parentNode&&
end:function(){b.pop()},La:function(c){a.Ga(c)||m(Error("Only subscribable things can act as dependencies"));if(0<b.length){vard=b[b.length-1];0<=a.a.j(d.Aa,c)||(d.Aa.push(c),d.ca(c))}}}}();varG={undefined:p,"boolean":p,number:p,string:p};a.m=function(b){functionc(){if(0<arguments.length){if(!c.equalityComparer||!c.equalityComparer(d,arguments[0]))c.I(),d=arguments[0],c.H();returnthis}a.U.La(c);returnd}vard=b;a.R.call(c);c.H=function(){c.notifySubscribers(d)};c.I=function(){c.notifySubscribers(d,
a.Ha);a.Q=function(b){0==arguments.length&&(b=[]);b!==s&&(b!==n&&!("length"inb))&&m(Error("The argument passed when initializing an observable array must be an array, or null, or undefined."));varc=a.m(b);a.a.extend(c,a.Q.fn);returnc};a.Q.fn={remove:function(a){for(varc=this(),d=[],f="function"==typeofa?a:function(c){returnc===a},g=0;g<c.length;g++){vare=c[g];f(e)&&(0===d.length&&this.I(),d.push(e),c.splice(g,1),g--)}d.length&&this.H();returnd},removeAll:function(b){if(b===n){varc=this(),
p;try{varb=a.a.T(v,function(a){returna.target});a.U.bb(function(c){vare;0<=(e=a.a.j(b,c))?b[e]=n:v.push(c.ta(g))});for(vare=q.call(c),f=b.length-1;0<=f;f--)b[f]&&v.splice(f,1)[0].A();i=p;h.notifySubscribers(k,"beforeChange");k=e}finally{a.U.end()}h.notifySubscribers(k);l=t}}functionh(){if(0<arguments.length)j.apply(h,arguments);elsereturni||e(),a.U.La(h),k}functionj(){"function"===typeofo?o.apply(c,arguments):m(Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters."))}
vark,i=t,l=t,q=b;q&&"object"==typeofq?(d=q,q=d.read):(d=d||{},q||(q=d.read));"function"!=typeofq&&m(Error("Pass a function that returns the value of the ko.computed"));varo=d.write;c||(c=d.owner);varv=[],u=f,r="object"==typeofd.disposeWhenNodeIsRemoved?d.disposeWhenNodeIsRemoved:s,w=d.disposeWhen||A(t);if(r){u=function(){a.a.G.Ma(r,arguments.callee);f()};a.a.G.wa(r,u);vary=w,w=function(){return!a.a.fa(r)||y()}}varx=s;h.nb=function(){returnv.length};h.pb="function"===typeofd.write;h.A=function(){u()};
d;break;case"object":case"undefined":vari=e.get(d);h[c]=i!==n?i:b(d,g,e)}});returnh}functionc(a,b){if(ainstanceofArray){for(varc=0;c<a.length;c++)b(c);"function"==typeofa.toJSON&&b("toJSON")}elsefor(cina)b(c)}functiond(){varb=[],c=[];this.save=function(e,d){varj=a.a.j(b,e);0<=j?c[j]=d:(b.push(e),c.push(d))};this.get=function(e){e=a.a.j(b,e);return0<=e?c[e]:n}}a.Ta=function(c){0==arguments.length&&m(Error("When calling ko.toJS, pass the object you want to convert."));returnb(c,function(b){for(varc=
a.g.ka);(function(){functionb(a){return8==a.nodeType&&(g?a.text:a.nodeValue).match(e)}functionc(a){return8==a.nodeType&&(g?a.text:a.nodeValue).match(h)}functiond(a,e){for(vard=a,f=1,g=[];d=d.nextSibling;){if(c(d)&&(f--,0===f))returng;g.push(d);b(d)&&f++}e||m(Error("Cannot find closing comment tag to match: "+a.nodeValue));returns}functionf(a,b){varc=d(a,b);returnc?0<c.length?c[c.length-1].nextSibling:a.nextSibling:s}varg="<\!--test--\>"===document.createComment("test").text,e=g?/^<\!--\s*ko\s+(.*\:.*)\s*--\>$/:
typeofc?c():c)||a.J.instance.getBindings(b,o)){if(0===i){i=1;for(varuinl){varr=a.c[u];r&&8===b.nodeType&&!a.e.C[u]&&m(Error("The binding '"+u+"' cannot be used with virtual elements"));if(r&&"function"==typeofr.init&&(r=(0,r.init)(b,j(u),k,v,o))&&r.controlsDescendantBindings)q!==n&&m(Error("Multiple bindings ("+q+" and "+u+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.")),q=u}i=2}if(2===i)for(uinl)(r=a.c[u])&&"function"==
"__ko_bindingContext__",c);elsereturna.a.f.get(b,"__ko_bindingContext__")};a.ya=function(b,c,e){1===b.nodeType&&a.e.Ia(b);returnd(b,c,e,p)};a.Ya=function(a,c){(1===c.nodeType||8===c.nodeType)&&b(a,c,p)};a.xa=function(a,b){b&&(1!==b.nodeType&&8!==b.nodeType)&&m(Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node"));b=b||window.document.body;c(a,b,p)};a.ea=function(b){switch(b.nodeType){case1:case8:varc=a.Ra(b);if(c)returnc;if(b.parentNode)returna.ea(b.parentNode)}};
d();try{varq=a.a.L(arguments);q.unshift(f);e=i.apply(f,q)}finally{e!==p&&(b.preventDefault?b.preventDefault():b.returnValue=t)}l[g+"Bubble"]===t&&(b.cancelBubble=p,b.stopPropagation&&b.stopPropagation())}})})()}};a.c.submit={init:function(b,c,d,f){"function"!=typeofc()&&m(Error("The value for a submit binding must be a function"));a.a.n(b,"submit",function(a){vare,d=c();try{e=d.call(f,b)}finally{e!==p&&(a.preventDefault?a.preventDefault():a.returnValue=t)}})}};a.c.visible={update:function(b,c){vard=
0));d&&0<b.length&&B(b,f,t)}};a.c.options={update:function(b,c,d){"select"!==a.a.o(b)&&m(Error("options binding applies only to SELECT elements"));for(varf=0==b.length,g=a.a.T(a.a.aa(b.childNodes,function(b){returnb.tagName&&"option"===a.a.o(b)&&b.selected}),function(b){returna.k.r(b)||b.innerText||b.textContent}),e=b.scrollTop,h=a.a.d(c());0<b.length;)a.F(b.options[0]),b.remove(0);if(h){d=d();"number"!=typeofh.length&&(h=[h]);if(d.optionsCaption){varj=document.createElement("option");a.a.Y(j,
a.c.options.oa="__ko.optionValueDomData__";a.c.selectedOptions={Ea:function(b){for(varc=[],b=b.childNodes,d=0,f=b.length;d<f;d++){varg=b[d],e=a.a.o(g);"option"==e&&g.selected?c.push(a.k.r(g)):"optgroup"==e&&(g=a.c.selectedOptions.Ea(g),Array.prototype.splice.apply(c,[c.length,0].concat(g)))}returnc},init:function(b,c,d){a.a.n(b,"change",function(){varb=c(),g=a.c.selectedOptions.Ea(this);a.g.$(b,d,"value",g)})},update:function(b,c){"select"!=a.a.o(b)&&m(Error("values binding applies only to SELECT elements"));
update:function(b,c,d,f,g){returna.c.template.update(b,a.c.foreach.p(c),d,f,g)}};a.g.D.foreach=t;a.e.C.foreach=p;a.t=function(){};a.t.prototype.renderTemplateSource=function(){m(Error("Override renderTemplateSource"))};a.t.prototype.createJavaScriptEvaluatorBlock=function(){m(Error("Override createJavaScriptEvaluatorBlock"))};a.t.prototype.makeTemplateSource=function(b,c){if("string"==typeofb){varc=c||document,d=c.getElementById(b);d||m(Error("Cannot find template with ID "+b));returnnewa.l.i(d)}if(1==
p);!(d&&d!=document)&&"string"==typeofa&&(this.V=this.V||{},this.V[a]=p)};a.b("templateEngine",a.t);a.Z=function(){functionb(b,c,e){for(varb=a.g.W(b),d=a.g.D,j=0;j<b.length;j++){vark=b[j].key;if(d.hasOwnProperty(k)){vari=d[k];"function"===typeofi?(k=i(b[j].value))&&m(Error(k)):i||m(Error("This template engine does not support the '"+k+"' binding within its templates"))}}b="ko.templateRewriting.applyMemoizedBindingsToNextSibling(function() { return (function() { return { "+a.g.ka(b)+
" } })() })";returne.createJavaScriptEvaluatorBlock(b)+c}varc=/(<[a-z]+\d*(\s+(?!data-bind=)[a-z0-9\-]+(=(\"[^\"]*\"|\'[^\']*\'))?)*\s+)data-bind=(["'])([\s\S]*?)\5/gi,d=/<\!--\s*ko\b\s*([\s\S]*?)\s*--\>/g;return{mb:function(b,c,e){c.isTemplateRewritten(b,e)||c.rewriteTemplate(b,function(b){returna.Z.zb(b,c)},e)},zb:function(a,g){returna.replace(c,function(a,c,d,f,i,l,q){returnb(q,c,g)}).replace(d,function(a,c){returnb(c,"<\!-- ko --\>",g)})},Za:function(b){returna.s.na(function(c,
g;a.Z.mb(j,q,l);j=q.renderTemplate(j,k,i,l);("number"!=typeofj.length||0<j.length&&"number"!=typeofj[0].nodeType)&&m(Error("Template engine must return an array of DOM nodes"));l=t;switch(f){case"replaceChildren":a.e.X(b,j);l=p;break;case"replaceNode":a.a.Na(b,j);l=p;break;case"ignoreTargetNode":break;default:m(Error("Unknown renderMode: "+f))}l&&(c(j,k),i.afterRender&&i.afterRender(j,k.$data));returnj}varg;a.ra=function(b){b!=n&&!(binstanceofa.t)&&m(Error("templateEngine must inherit from ko.templateEngine"));
g=b};a.qa=function(b,c,j,k,i){j=j||{};(j.templateEngine||g)==n&&m(Error("Set a template engine before calling renderTemplate"));i=i||"replaceChildren";if(k){varl=d(k);returna.h(function(){varg=c&&cinstanceofa.z?c:newa.z(a.a.d(c)),o="function"==typeofb?b(g.$data):b,g=f(k,i,o,g,j);"replaceNode"==i&&(k=g,l=d(k))},s,{disposeWhen:function(){return!l||!a.a.fa(l)},disposeWhenNodeIsRemoved:l&&"replaceNode"==i?l.parentNode:l})}returna.s.na(function(d){a.qa(b,c,j,d,"replaceNode")})};a.Fb=function(b,
"function"==typeofc.A&&c.A();a.a.f.set(b,"__ko__templateSubscriptionDomDataKey__",g)}};a.g.D.template=function(b){b=a.g.W(b);return1==b.length&&b[0].unknown||a.g.wb(b,"name")?s:"This template engine does not support anonymous templates nested within its templates"};a.e.C.template=p})();a.b("setTemplateEngine",a.ra);a.b("renderTemplate",a.qa);(function(){a.a.O=function(b,c,d){if(d===n)returna.a.O(b,c,1)||a.a.O(b,c,10)||a.a.O(b,c,Number.MAX_VALUE);for(varb=b||[],c=c||[],f=b,g=c,e=[],h=0;h<=g.length;h++)e[h]=
if(c)returna.a.L(c.cloneNode(p).childNodes);b=b.text();returna.a.pa(b)};a.q.K=newa.q;a.ra(a.q.K);a.b("nativeTemplateEngine",a.q);(function(){a.ma=function(){vara=this.vb=function(){if("undefined"==typeofjQuery||!jQuery.tmpl)return0;try{if(0<=jQuery.tmpl.tag.tmpl.open.toString().indexOf("__"))return2}catch(a){}return1}();this.renderTemplateSource=function(b,f,g){g=g||{};2>a&&m(Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later."));vare=b.data("precompiled");
<ahref="architecture-examples/plastronjs/index.html"data-source="https://github.com/rhysbrettbowen/PlastronJS"data-content="PlastronJS is an mvc framework built on top of the Closure Library and built to compile with projects that use the Closure Compiler.">PlastronJS *</a>
</li>
<li>
<ahref="dependency-examples/knockoutjs_require/index.html"data-source=""data-content="This project is an adaptation of /architecture-examples/knockoutjs with require.js.">Knockout + Require.js *</a>