Socket
Socket
Sign inDemoInstall

knockout

Package Overview
Dependencies
0
Maintainers
3
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.2.1 to 2.3.0

166

build/output/knockout-latest.js

@@ -1,86 +0,88 @@

// Knockout JavaScript library v2.2.1
// Knockout JavaScript library v2.3.0
// (c) Steven Sanderson - http://knockoutjs.com/
// License: MIT (http://www.opensource.org/licenses/mit-license.php)
(function() {function k(j){throw j;}var n=!0,r=null,t=!1;function J(j){return function(){return j}};(function(j){var z=this||(0,eval)("this"),u=z.document,V=z.navigator,q=z.jQuery,H=z.JSON;!function(j){"function"===typeof require&&"object"===typeof exports&&"object"===typeof module?j(module.exports||exports):"function"===typeof define&&define.amd?define(["exports"],j):j(z.ko={})}(function(v){function na(a,d,c,e,f){var g=[];a=b.j(function(){var a=d(c,f)||[];0<g.length&&(b.a.$a(M(g),a),e&&b.r.L(e,r,[c,a,f]));g.splice(0,g.length);b.a.Q(g,a)},r,{Y:a,Ma:function(){return!b.a.nb(g)}});return{N:g,j:a.qa()?
a:j}}function M(a){for(;a.length&&!b.a.Z(a[0]);)a.splice(0,1);if(1<a.length){for(var d=a[0],c=a[a.length-1],e=[d];d!==c;){d=d.nextSibling;if(!d)return;e.push(d)}Array.prototype.splice.apply(a,[0,a.length].concat(e))}return a}function W(a,b,c,e,f){var g=Math.min,h=Math.max,l=[],m,A=a.length,p,j=b.length,w=j-A||1,F=A+j+1,q,u,x;for(m=0;m<=A;m++){u=q;l.push(q=[]);x=g(j,m+w);for(p=h(0,m-1);p<=x;p++)q[p]=p?m?a[m-1]===b[p-1]?u[p-1]:g(u[p]||F,q[p-1]||F)+1:p+1:m+1}g=[];h=[];w=[];m=A;for(p=j;m||p;)j=l[m][p]-
1,p&&j===l[m][p-1]?h.push(g[g.length]={status:c,value:b[--p],index:p}):m&&j===l[m-1][p]?w.push(g[g.length]={status:e,value:a[--m],index:m}):(g.push({status:"retained",value:b[--p]}),--m);if(h.length&&w.length){a=10*A;var s;for(b=c=0;(f||b<a)&&(s=h[c]);c++){for(e=0;l=w[e];e++)if(s.value===l.value){s.moved=l.index;l.moved=s.index;w.splice(e,1);b=e=0;break}b+=e}}return g.reverse()}function X(a,d,c,e,f){f=f||{};var g=a&&O(a),g=g&&g.ownerDocument,h=f.templateEngine||P;b.Aa.yb(c,h,g);c=h.renderTemplate(c,
e,f,g);("number"!=typeof c.length||0<c.length&&"number"!=typeof c[0].nodeType)&&k(Error("Template engine must return an array of DOM nodes"));g=t;switch(d){case "replaceChildren":b.e.O(a,c);g=n;break;case "replaceNode":b.a.$a(a,c);g=n;break;case "ignoreTargetNode":break;default:k(Error("Unknown renderMode: "+d))}g&&(Y(c,e),f.afterRender&&b.r.L(f.afterRender,r,[c,e.$data]));return c}function O(a){return a.nodeType?a:0<a.length?a[0]:r}function Y(a,d){if(a.length){var c=a[0],e=a[a.length-1];Z(c,e,function(a){b.Ea(d,
a)});Z(c,e,function(a){b.s.kb(a,[d])})}}function Z(a,d,c){var e;for(d=b.e.nextSibling(d);a&&(e=a)!==d;)a=b.e.nextSibling(e),(1===e.nodeType||8===e.nodeType)&&c(e)}function $(a,d,c){a=b.g.ba(a);for(var e=b.g.R,f=0;f<a.length;f++){var g=a[f].key;if(e.hasOwnProperty(g)){var h=e[g];"function"===typeof h?(g=h(a[f].value))&&k(Error(g)):h||k(Error("This template engine does not support the '"+g+"' binding within its templates"))}}a="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+
b.g.ca(a)+" } })()})";return c.createJavaScriptEvaluatorBlock(a)+d}function aa(a,d,c,e){function f(a){return function(){return l[a]}}function g(){return l}var h=0,l,m,A=b.a.f.get(a,ba);d||(A&&k(Error("You cannot apply bindings multiple times to the same element.")),b.a.f.set(a,ba,n));b.j(function(){var p=c&&c instanceof b.w?c:new b.w(b.a.d(c)),q=p.$data;!A&&e&&b.gb(a,p);if(l=("function"==typeof d?d(p,a):d)||b.K.instance.getBindings(a,p))0===h&&(h=1,b.a.C(l,function(d){var c=b.c[d];c&&8===a.nodeType&&
!b.e.J[d]&&k(Error("The binding '"+d+"' cannot be used with virtual elements"));if(c&&"function"==typeof c.init&&(c=(0,c.init)(a,f(d),g,q,p))&&c.controlsDescendantBindings)m!==j&&k(Error("Multiple bindings ("+m+" and "+d+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.")),m=d}),h=2),2===h&&b.a.C(l,function(d){var c=b.c[d];c&&"function"==typeof c.update&&(0,c.update)(a,f(d),g,q,p)})},r,{Y:a});return{Qb:m===j}}function ca(a,
d,c){var e=n,f=1===d.nodeType;f&&b.e.Va(d);if(f&&c||b.K.instance.nodeHasBindings(d))e=aa(d,r,a,c).Qb;e&&da(a,d,!f)}function da(a,d,c){for(var e=b.e.firstChild(d);d=e;)e=b.e.nextSibling(d),ca(a,d,c)}function ea(a,b){var c=fa(a,b);return c?0<c.length?c[c.length-1].nextSibling:a.nextSibling:r}function fa(a,b){for(var c=a,e=1,f=[];c=c.nextSibling;){if(K(c)&&(e--,0===e))return f;f.push(c);B(c)&&e++}b||k(Error("Cannot find closing comment tag to match: "+a.nodeValue));return r}function K(a){return 8==a.nodeType&&
(L?a.text:a.nodeValue).match(oa)}function B(a){return 8==a.nodeType&&(L?a.text:a.nodeValue).match(pa)}function Q(a,b){for(var c=r;a!=c;)c=a,a=a.replace(qa,function(a,c){return b[c]});return a}function ra(){var a=[],d=[];this.save=function(c,e){var f=b.a.i(a,c);0<=f?d[f]=e:(a.push(c),d.push(e))};this.get=function(c){c=b.a.i(a,c);return 0<=c?d[c]:j}}function ga(a,b,c){function e(e){var g=b(a[e]);switch(typeof g){case "boolean":case "number":case "string":case "function":f[e]=g;break;case "object":case "undefined":var h=
c.get(g);f[e]=h!==j?h:ga(g,b,c)}}c=c||new ra;a=b(a);if(!("object"==typeof a&&a!==r&&a!==j&&!(a instanceof Date)))return a;var f=a instanceof Array?[]:{};c.save(a,f);var g=a;if(g instanceof Array){for(var h=0;h<g.length;h++)e(h);"function"==typeof g.toJSON&&e("toJSON")}else for(h in g)e(h);return f}function ha(a,d){if(a)if(8==a.nodeType){var c=b.s.Wa(a.nodeValue);c!=r&&d.push({vb:a,Ib:c})}else if(1==a.nodeType)for(var c=0,e=a.childNodes,f=e.length;c<f;c++)ha(e[c],d)}function R(a,b){for(var c in a)a.hasOwnProperty(c)&&
b(c,a[c])}function S(a,d){if("input"!==b.a.u(a)||!a.type||"click"!=d.toLowerCase())return t;var c=a.type;return"checkbox"==c||"radio"==c}function T(a,d,c,e){b.c[a]={init:function(a){b.a.f.set(a,ia,{});return{controlsDescendantBindings:n}},update:function(a,g,h,l,m){h=b.a.f.get(a,ia);g=b.a.d(g());l=!c!==!g;var j=!h.ab;if(j||d||l!==h.tb)j&&(h.ab=b.a.Ka(b.e.childNodes(a),n)),l?(j||b.e.O(a,b.a.Ka(h.ab)),b.Fa(e?e(m,g):m,a)):b.e.$(a),h.tb=l}};b.g.R[a]=t;b.e.J[a]=n}function ja(a,d,c){c&&d!==b.k.q(a)&&b.k.V(a,
d);d!==b.k.q(a)&&b.r.L(b.a.Ca,r,[a,"change"])}var b="undefined"!==typeof v?v:{};b.b=function(a,d){for(var c=a.split("."),e=b,f=0;f<c.length-1;f++)e=e[c[f]];e[c[c.length-1]]=d};b.p=function(a,b,c){a[b]=c};b.version="2.2.1";b.b("version",b.version);v=b;var sa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,y={},ka={};y[V&&/Firefox\/2/i.test(V.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"];y.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" ");
R(y,function(a,b){if(b.length)for(var c=0,e=b.length;c<e;c++)ka[b[c]]=a});var ta={propertychange:n};if(y=u){for(var y=3,la=u.createElement("div"),ua=la.getElementsByTagName("i");la.innerHTML="\x3c!--[if gt IE "+ ++y+"]><i></i><![endif]--\x3e",ua[0];);y=4<y?y:j}var D=y;v.a={Pa:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],o:function(a,b){for(var c=0,e=a.length;c<e;c++)b(a[c])},i:function(a,b){if("function"==typeof Array.prototype.indexOf)return Array.prototype.indexOf.call(a,b);for(var c=
0,e=a.length;c<e;c++)if(a[c]===b)return c;return-1},Ha:function(a,b,c){for(var e=0,f=a.length;e<f;e++)if(b.call(c,a[e]))return a[e];return r},ha:function(a,d){var c=b.a.i(a,d);0<=c&&a.splice(c,1)},Ia:function(a){a=a||[];for(var d=[],c=0,e=a.length;c<e;c++)0>b.a.i(d,a[c])&&d.push(a[c]);return d},X:function(a,b){a=a||[];for(var c=[],e=0,f=a.length;e<f;e++)c.push(b(a[e]));return c},ga:function(a,b){a=a||[];for(var c=[],e=0,f=a.length;e<f;e++)b(a[e])&&c.push(a[e]);return c},Q:function(a,b){if(b instanceof
Array)a.push.apply(a,b);else for(var c=0,e=b.length;c<e;c++)a.push(b[c]);return a},mb:function(a,b,c){var e=a.indexOf?a.indexOf(b):utils.i(a,b);0>e?c&&a.push(b):c||a.splice(e,1)},extend:function(a,b){if(b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a},C:R,la:function(a){for(;a.firstChild;)b.removeNode(a.firstChild)},Kb:function(a){a=b.a.M(a);for(var d=u.createElement("div"),c=0,e=a.length;c<e;c++)d.appendChild(b.z(a[c]));return d},Ka:function(a,d){for(var c=0,e=a.length,f=[];c<e;c++){var g=
a[c].cloneNode(n);f.push(d?b.z(g):g)}return f},O:function(a,d){b.a.la(a);if(d)for(var c=0,e=d.length;c<e;c++)a.appendChild(d[c])},$a:function(a,d){var c=a.nodeType?[a]:a;if(0<c.length){for(var e=c[0],f=e.parentNode,g=0,h=d.length;g<h;g++)f.insertBefore(d[g],e);g=0;for(h=c.length;g<h;g++)b.removeNode(c[g])}},eb:function(a,b){7>D?a.setAttribute("selected",b):a.selected=b},D:function(a){return(a||"").replace(sa,"")},Ub:function(a,d){for(var c=[],e=(a||"").split(d),f=0,g=e.length;f<g;f++){var h=b.a.D(e[f]);
""!==h&&c.push(h)}return c},Rb:function(a,b){a=a||"";return b.length>a.length?t:a.substring(0,b.length)===b},wb:function(a,b){if(b.compareDocumentPosition)return 16==(b.compareDocumentPosition(a)&16);for(;a!=r;){if(a==b)return n;a=a.parentNode}return t},Z:function(a){return b.a.wb(a,a.ownerDocument)},nb:function(a){return!!b.a.Ha(a,b.a.Z)},u:function(a){return a&&a.tagName&&a.tagName.toLowerCase()},n:function(a,b,c){var e=D&&ta[b];if(!e&&"undefined"!=typeof q){if(S(a,b)){var f=c;c=function(a,b){var c=
this.checked;b&&(this.checked=b.qb!==n);f.call(this,a);this.checked=c}}q(a).bind(b,c)}else!e&&"function"==typeof a.addEventListener?a.addEventListener(b,c,t):"undefined"!=typeof a.attachEvent?a.attachEvent("on"+b,function(b){c.call(a,b)}):k(Error("Browser doesn't support addEventListener or attachEvent"))},Ca:function(a,b){(!a||!a.nodeType)&&k(Error("element must be a DOM node when calling triggerEvent"));if("undefined"!=typeof q){var c=[];S(a,b)&&c.push({qb:a.checked});q(a).trigger(b,c)}else"function"==
typeof u.createEvent?"function"==typeof a.dispatchEvent?(c=u.createEvent(ka[b]||"HTMLEvents"),c.initEvent(b,n,n,z,0,0,0,0,0,t,t,t,t,0,a),a.dispatchEvent(c)):k(Error("The supplied element doesn't support dispatchEvent")):"undefined"!=typeof a.fireEvent?(S(a,b)&&(a.checked=a.checked!==n),a.fireEvent("on"+b)):k(Error("Browser doesn't support triggering events"))},d:function(a){return b.S(a)?a():a},va:function(a){return b.S(a)?a.t():a},ea:function(a,d,c){if(d){var e=/\S+/g,f=a.className.match(e)||[];
b.a.o(d.match(e),function(a){b.a.mb(f,a,c)});a.className=f.join(" ")}},fb:function(a,d){var c=b.a.d(d);if(c===r||c===j)c="";if(3===a.nodeType)a.data=c;else{var e=b.e.firstChild(a);!e||3!=e.nodeType||b.e.nextSibling(e)?b.e.O(a,[u.createTextNode(c)]):e.data=c;b.a.zb(a)}},cb:function(a,b){a.name=b;if(7>=D)try{a.mergeAttributes(u.createElement("<input name='"+a.name+"'/>"),t)}catch(c){}},zb:function(a){9<=D&&(a=1==a.nodeType?a:a.parentNode,a.style&&(a.style.zoom=a.style.zoom))},xb:function(a){if(9<=D){var b=
a.style.width;a.style.width=0;a.style.width=b}},Ob:function(a,d){a=b.a.d(a);d=b.a.d(d);for(var c=[],e=a;e<=d;e++)c.push(e);return c},M:function(a){for(var b=[],c=0,e=a.length;c<e;c++)b.push(a[c]);return b},Sb:6===D,Tb:7===D,aa:D,Qa:function(a,d){for(var c=b.a.M(a.getElementsByTagName("input")).concat(b.a.M(a.getElementsByTagName("textarea"))),e="string"==typeof d?function(a){return a.name===d}:function(a){return d.test(a.name)},f=[],g=c.length-1;0<=g;g--)e(c[g])&&f.push(c[g]);return f},Lb:function(a){return"string"==
typeof a&&(a=b.a.D(a))?H&&H.parse?H.parse(a):(new Function("return "+a))():r},ya:function(a,d,c){(!H||!H.stringify)&&k(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"));return H.stringify(b.a.d(a),d,c)},Mb:function(a,d,c){c=c||{};var e=c.params||{},f=c.includeFields||this.Pa,g=a;if("object"==typeof a&&"form"===b.a.u(a))for(var g=a.action,
h=f.length-1;0<=h;h--)for(var l=b.a.Qa(a,f[h]),m=l.length-1;0<=m;m--)e[l[m].name]=l[m].value;d=b.a.d(d);var j=u.createElement("form");j.style.display="none";j.action=g;j.method="post";for(var p in d)a=u.createElement("input"),a.name=p,a.value=b.a.ya(b.a.d(d[p])),j.appendChild(a);R(e,function(a,b){var c=u.createElement("input");c.name=a;c.value=b;j.appendChild(c)});u.body.appendChild(j);c.submitter?c.submitter(j):j.submit();setTimeout(function(){j.parentNode.removeChild(j)},0)}};b.b("utils",b.a);b.b("utils.arrayForEach",
b.a.o);b.b("utils.arrayFirst",b.a.Ha);b.b("utils.arrayFilter",b.a.ga);b.b("utils.arrayGetDistinctValues",b.a.Ia);b.b("utils.arrayIndexOf",b.a.i);b.b("utils.arrayMap",b.a.X);b.b("utils.arrayPushAll",b.a.Q);b.b("utils.arrayRemoveItem",b.a.ha);b.b("utils.extend",b.a.extend);b.b("utils.fieldsIncludedWithJsonPost",b.a.Pa);b.b("utils.getFormFields",b.a.Qa);b.b("utils.peekObservable",b.a.va);b.b("utils.postJson",b.a.Mb);b.b("utils.parseJson",b.a.Lb);b.b("utils.registerEventHandler",b.a.n);b.b("utils.stringifyJson",
b.a.ya);b.b("utils.range",b.a.Ob);b.b("utils.toggleDomNodeCssClass",b.a.ea);b.b("utils.triggerEvent",b.a.Ca);b.b("utils.unwrapObservable",b.a.d);Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=Array.prototype.slice.call(arguments);a=c.shift();return function(){return b.apply(a,c.concat(Array.prototype.slice.call(arguments)))}});b.a.f=new function(){var a=0,d="__ko__"+(new Date).getTime(),c={};return{get:function(a,c){var d=b.a.f.ma(a,t);return d===j?j:d[c]},set:function(a,
c,d){d===j&&b.a.f.ma(a,t)===j||(b.a.f.ma(a,n)[c]=d)},ma:function(b,f){var g=b[d];if(!g||!("null"!==g&&c[g])){if(!f)return j;g=b[d]="ko"+a++;c[g]={}}return c[g]},clear:function(a){var b=a[d];return b?(delete c[b],a[d]=r,n):t}}};b.b("utils.domData",b.a.f);b.b("utils.domData.clear",b.a.f.clear);b.a.G=new function(){function a(a,d){var e=b.a.f.get(a,c);e===j&&d&&(e=[],b.a.f.set(a,c,e));return e}function d(c){var e=a(c,t);if(e)for(var e=e.slice(0),l=0;l<e.length;l++)e[l](c);b.a.f.clear(c);"function"==
typeof q&&"function"==typeof q.cleanData&&q.cleanData([c]);if(f[c.nodeType])for(e=c.firstChild;c=e;)e=c.nextSibling,8===c.nodeType&&d(c)}var c="__ko_domNodeDisposal__"+(new Date).getTime(),e={1:n,8:n,9:n},f={1:n,9:n};return{Da:function(b,c){"function"!=typeof c&&k(Error("Callback must be a function"));a(b,n).push(c)},Za:function(d,e){var f=a(d,t);f&&(b.a.ha(f,e),0==f.length&&b.a.f.set(d,c,j))},z:function(a){if(e[a.nodeType]&&(d(a),f[a.nodeType])){var c=[];b.a.Q(c,a.getElementsByTagName("*"));for(var l=
0,m=c.length;l<m;l++)d(c[l])}return a},removeNode:function(a){b.z(a);a.parentNode&&a.parentNode.removeChild(a)}}};b.z=b.a.G.z;b.removeNode=b.a.G.removeNode;b.b("cleanNode",b.z);b.b("removeNode",b.removeNode);b.b("utils.domNodeDisposal",b.a.G);b.b("utils.domNodeDisposal.addDisposeCallback",b.a.G.Da);b.b("utils.domNodeDisposal.removeDisposeCallback",b.a.G.Za);b.a.ua=function(a){var d;if("undefined"!=typeof q)if(q.parseHTML)d=q.parseHTML(a)||[];else{if((d=q.clean([a]))&&d[0]){for(a=d[0];a.parentNode&&
11!==a.parentNode.nodeType;)a=a.parentNode;a.parentNode&&a.parentNode.removeChild(a)}}else{var c=b.a.D(a).toLowerCase();d=u.createElement("div");c=c.match(/^<(thead|tbody|tfoot)/)&&[1,"<table>","</table>"]||!c.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!c.indexOf("<td")||!c.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||[0,"",""];a="ignored<div>"+c[1]+a+c[2]+"</div>";for("function"==typeof z.innerShiv?d.appendChild(z.innerShiv(a)):d.innerHTML=a;c[0]--;)d=d.lastChild;
d=b.a.M(d.lastChild.childNodes)}return d};b.a.da=function(a,d){b.a.la(a);d=b.a.d(d);if(d!==r&&d!==j)if("string"!=typeof d&&(d=d.toString()),"undefined"!=typeof q)q(a).html(d);else for(var c=b.a.ua(d),e=0;e<c.length;e++)a.appendChild(c[e])};b.b("utils.parseHtmlFragment",b.a.ua);b.b("utils.setHtml",b.a.da);var U={};b.s={sa:function(a){"function"!=typeof a&&k(Error("You can only pass a function to ko.memoization.memoize()"));var b=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*
(1+Math.random())|0).toString(16).substring(1);U[b]=a;return"\x3c!--[ko_memo:"+b+"]--\x3e"},jb:function(a,b){var c=U[a];c===j&&k(Error("Couldn't find any memo with ID "+a+". Perhaps it's already been unmemoized."));try{return c.apply(r,b||[]),n}finally{delete U[a]}},kb:function(a,d){var c=[];ha(a,c);for(var e=0,f=c.length;e<f;e++){var g=c[e].vb,h=[g];d&&b.a.Q(h,d);b.s.jb(c[e].Ib,h);g.nodeValue="";g.parentNode&&g.parentNode.removeChild(g)}},Wa:function(a){return(a=a.match(/^\[ko_memo\:(.*?)\]$/))?
a[1]:r}};b.b("memoization",b.s);b.b("memoization.memoize",b.s.sa);b.b("memoization.unmemoize",b.s.jb);b.b("memoization.parseMemoText",b.s.Wa);b.b("memoization.unmemoizeDomNodeAndDescendants",b.s.kb);b.Oa={throttle:function(a,d){a.throttleEvaluation=d;var c=r;return b.j({read:a,write:function(b){clearTimeout(c);c=setTimeout(function(){a(b)},d)}})},notify:function(a,d){a.equalityComparer="always"==d?J(t):b.m.fn.equalityComparer;return a}};b.b("extenders",b.Oa);b.hb=function(a,d,c){this.target=a;this.ia=
d;this.ub=c;b.p(this,"dispose",this.A)};b.hb.prototype.A=function(){this.Fb=n;this.ub()};b.U=function(){this.F={};b.a.extend(this,b.U.fn);b.p(this,"subscribe",this.za);b.p(this,"extend",this.extend);b.p(this,"getSubscriptionsCount",this.Bb)};b.U.fn={za:function(a,d,c){c=c||"change";var e=new b.hb(this,d?a.bind(d):a,function(){b.a.ha(this.F[c],e)}.bind(this));this.F[c]||(this.F[c]=[]);this.F[c].push(e);return e},notifySubscribers:function(a,d){d=d||"change";this.F[d]&&b.r.L(function(){b.a.o(this.F[d].slice(0),
function(b){b&&b.Fb!==n&&b.ia(a)})},this)},Bb:function(){var a=0;b.a.C(this.F,function(b,c){a+=c.length});return a},extend:function(a){var d=this;a&&b.a.C(a,function(a,e){var f=b.Oa[a];"function"==typeof f&&(d=f(d,e))});return d}};b.Sa=function(a){return"function"==typeof a.za&&"function"==typeof a.notifySubscribers};b.b("subscribable",b.U);b.b("isSubscribable",b.Sa);var G=[];b.r={pb:function(a){G.push({ia:a,Na:[]})},end:function(){G.pop()},Ya:function(a){b.Sa(a)||k(Error("Only subscribable things can act as dependencies"));
if(0<G.length){var d=G[G.length-1];d&&!(0<=b.a.i(d.Na,a))&&(d.Na.push(a),d.ia(a))}},L:function(a,b,c){try{return G.push(r),a.apply(b,c||[])}finally{G.pop()}}};var va={undefined:n,"boolean":n,number:n,string:n};b.m=function(a){function d(){if(0<arguments.length){if(!d.equalityComparer||!d.equalityComparer(c,arguments[0]))d.I(),c=arguments[0],d.H();return this}b.r.Ya(d);return c}var c=a;b.U.call(d);d.t=function(){return c};d.H=function(){d.notifySubscribers(c)};d.I=function(){d.notifySubscribers(c,
"beforeChange")};b.a.extend(d,b.m.fn);b.p(d,"peek",d.t);b.p(d,"valueHasMutated",d.H);b.p(d,"valueWillMutate",d.I);return d};b.m.fn={equalityComparer:function(a,b){return a===r||typeof a in va?a===b:t}};var I=b.m.Nb="__ko_proto__";b.m.fn[I]=b.m;b.na=function(a,d){return a===r||a===j||a[I]===j?t:a[I]===d?n:b.na(a[I],d)};b.S=function(a){return b.na(a,b.m)};b.Ta=function(a){return"function"==typeof a&&a[I]===b.m||"function"==typeof a&&a[I]===b.j&&a.Cb?n:t};b.b("observable",b.m);b.b("isObservable",b.S);
b.b("isWriteableObservable",b.Ta);b.T=function(a){0==arguments.length&&(a=[]);a!==r&&(a!==j&&!("length"in a))&&k(Error("The argument passed when initializing an observable array must be an array, or null, or undefined."));var d=b.m(a);b.a.extend(d,b.T.fn);return d};b.T.fn={remove:function(a){for(var b=this.t(),c=[],e="function"==typeof a?a:function(b){return b===a},f=0;f<b.length;f++){var g=b[f];e(g)&&(0===c.length&&this.I(),c.push(g),b.splice(f,1),f--)}c.length&&this.H();return c},removeAll:function(a){if(a===
j){var d=this.t(),c=d.slice(0);this.I();d.splice(0,d.length);this.H();return c}return!a?[]:this.remove(function(c){return 0<=b.a.i(a,c)})},destroy:function(a){var b=this.t(),c="function"==typeof a?a:function(b){return b===a};this.I();for(var e=b.length-1;0<=e;e--)c(b[e])&&(b[e]._destroy=n);this.H()},destroyAll:function(a){return a===j?this.destroy(J(n)):!a?[]:this.destroy(function(d){return 0<=b.a.i(a,d)})},indexOf:function(a){var d=this();return b.a.i(d,a)},replace:function(a,b){var c=this.indexOf(a);
0<=c&&(this.I(),this.t()[c]=b,this.H())}};b.a.o("pop push reverse shift sort splice unshift".split(" "),function(a){b.T.fn[a]=function(){var b=this.t();this.I();b=b[a].apply(b,arguments);this.H();return b}});b.a.o(["slice"],function(a){b.T.fn[a]=function(){var b=this();return b[a].apply(b,arguments)}});b.b("observableArray",b.T);b.j=function(a,d,c){function e(){b.a.o(x,function(a){a.A()});x=[]}function f(){var a=h.throttleEvaluation;a&&0<=a?(clearTimeout(s),s=setTimeout(g,a)):g()}function g(){if(!p)if(A&&
N())C();else{p=n;try{var a=b.a.X(x,function(a){return a.target});b.r.pb(function(c){var d;0<=(d=b.a.i(a,c))?a[d]=j:x.push(c.za(f))});for(var c=q.call(d),e=a.length-1;0<=e;e--)a[e]&&x.splice(e,1)[0].A();A=n;h.notifySubscribers(m,"beforeChange");m=c}finally{b.r.end()}h.notifySubscribers(m);p=t;x.length||C()}}function h(){if(0<arguments.length)return"function"===typeof u?u.apply(d,arguments):k(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.")),
this;A||g();b.r.Ya(h);return m}function l(){return!A||0<x.length}var m,A=t,p=t,q=a;q&&"object"==typeof q?(c=q,q=c.read):(c=c||{},q||(q=c.read));"function"!=typeof q&&k(Error("Pass a function that returns the value of the ko.computed"));var u=c.write,F=c.disposeWhenNodeIsRemoved||c.Y||r,N=c.disposeWhen||c.Ma||J(t),C=e,x=[],s=r;d||(d=c.owner);h.t=function(){A||g();return m};h.Ab=function(){return x.length};h.Cb="function"===typeof c.write;h.A=function(){C()};h.qa=l;b.U.call(h);b.a.extend(h,b.j.fn);
b.p(h,"peek",h.t);b.p(h,"dispose",h.A);b.p(h,"isActive",h.qa);b.p(h,"getDependenciesCount",h.Ab);c.deferEvaluation!==n&&g();if(F&&l()){C=function(){b.a.G.Za(F,C);e()};b.a.G.Da(F,C);var E=N,N=function(){return!b.a.Z(F)||E()}}return h};b.Eb=function(a){return b.na(a,b.j)};v=b.m.Nb;b.j[v]=b.m;b.j.fn={};b.j.fn[v]=b.j;b.b("dependentObservable",b.j);b.b("computed",b.j);b.b("isComputed",b.Eb);b.ib=function(a){0==arguments.length&&k(Error("When calling ko.toJS, pass the object you want to convert."));return ga(a,
function(a){for(var c=0;b.S(a)&&10>c;c++)a=a();return a})};b.toJSON=function(a,d,c){a=b.ib(a);return b.a.ya(a,d,c)};b.b("toJS",b.ib);b.b("toJSON",b.toJSON);b.k={q:function(a){switch(b.a.u(a)){case "option":return a.__ko__hasDomDataOptionValue__===n?b.a.f.get(a,b.c.options.ta):7>=b.a.aa?a.getAttributeNode("value").specified?a.value:a.text:a.value;case "select":return 0<=a.selectedIndex?b.k.q(a.options[a.selectedIndex]):j;default:return a.value}},V:function(a,d){switch(b.a.u(a)){case "option":switch(typeof d){case "string":b.a.f.set(a,
b.c.options.ta,j);"__ko__hasDomDataOptionValue__"in a&&delete a.__ko__hasDomDataOptionValue__;a.value=d;break;default:b.a.f.set(a,b.c.options.ta,d),a.__ko__hasDomDataOptionValue__=n,a.value="number"===typeof d?d:""}break;case "select":for(var c=a.options.length-1;0<=c;c--)if(b.k.q(a.options[c])==d){a.selectedIndex=c;break}break;default:if(d===r||d===j)d="";a.value=d}}};b.b("selectExtensions",b.k);b.b("selectExtensions.readValue",b.k.q);b.b("selectExtensions.writeValue",b.k.V);var qa=/\@ko_token_(\d+)\@/g,
wa=["true","false"],xa=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i;b.g={R:[],ba:function(a){var d=b.a.D(a);if(3>d.length)return[];"{"===d.charAt(0)&&(d=d.substring(1,d.length-1));a=[];for(var c=r,e,f=0;f<d.length;f++){var g=d.charAt(f);if(c===r)switch(g){case '"':case "'":case "/":c=f,e=g}else if(g==e&&"\\"!==d.charAt(f-1)){g=d.substring(c,f+1);a.push(g);var h="@ko_token_"+(a.length-1)+"@",d=d.substring(0,c)+h+d.substring(f+1),f=f-(g.length-h.length),c=r}}e=c=r;for(var l=0,m=r,f=0;f<d.length;f++){g=
d.charAt(f);if(c===r)switch(g){case "{":c=f;m=g;e="}";break;case "(":c=f;m=g;e=")";break;case "[":c=f,m=g,e="]"}g===m?l++:g===e&&(l--,0===l&&(g=d.substring(c,f+1),a.push(g),h="@ko_token_"+(a.length-1)+"@",d=d.substring(0,c)+h+d.substring(f+1),f-=g.length-h.length,c=r))}e=[];d=d.split(",");c=0;for(f=d.length;c<f;c++)l=d[c],m=l.indexOf(":"),0<m&&m<l.length-1?(g=l.substring(m+1),e.push({key:Q(l.substring(0,m),a),value:Q(g,a)})):e.push({unknown:Q(l,a)});return e},ca:function(a){var d="string"===typeof a?
b.g.ba(a):a,c=[];a=[];for(var e,f=0;e=d[f];f++)if(0<c.length&&c.push(","),e.key){var g;a:{g=e.key;var h=b.a.D(g);switch(h.length&&h.charAt(0)){case "'":case '"':break a;default:g="'"+h+"'"}}e=e.value;c.push(g);c.push(":");c.push(e);e=b.a.D(e);0<=b.a.i(wa,b.a.D(e).toLowerCase())?e=t:(h=e.match(xa),e=h===r?t:h[1]?"Object("+h[1]+")"+h[2]:e);e&&(0<a.length&&a.push(", "),a.push(g+" : function(__ko_value) { "+e+" = __ko_value; }"))}else e.unknown&&c.push(e.unknown);d=c.join("");0<a.length&&(d=d+", '_ko_property_writers' : { "+
a.join("")+" } ");return d},Hb:function(a,d){for(var c=0;c<a.length;c++)if(b.a.D(a[c].key)==d)return n;return t},fa:function(a,d,c,e,f){if(!a||!b.S(a)){if((a=d()._ko_property_writers)&&a[c])a[c](e)}else b.Ta(a)&&(!f||a.t()!==e)&&a(e)}};b.b("expressionRewriting",b.g);b.b("expressionRewriting.bindingRewriteValidators",b.g.R);b.b("expressionRewriting.parseObjectLiteral",b.g.ba);b.b("expressionRewriting.preProcessBindings",b.g.ca);b.b("jsonExpressionRewriting",b.g);b.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",
b.g.ca);var L=u&&"\x3c!--test--\x3e"===u.createComment("test").text,pa=L?/^\x3c!--\s*ko(?:\s+(.+\s*\:[\s\S]*))?\s*--\x3e$/:/^\s*ko(?:\s+(.+\s*\:[\s\S]*))?\s*$/,oa=L?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,ya={ul:n,ol:n};b.e={J:{},childNodes:function(a){return B(a)?fa(a):a.childNodes},$:function(a){if(B(a)){a=b.e.childNodes(a);for(var d=0,c=a.length;d<c;d++)b.removeNode(a[d])}else b.a.la(a)},O:function(a,d){if(B(a)){b.e.$(a);for(var c=a.nextSibling,e=0,f=d.length;e<f;e++)c.parentNode.insertBefore(d[e],
c)}else b.a.O(a,d)},Xa:function(a,b){B(a)?a.parentNode.insertBefore(b,a.nextSibling):a.firstChild?a.insertBefore(b,a.firstChild):a.appendChild(b)},Ra:function(a,d,c){c?B(a)?a.parentNode.insertBefore(d,c.nextSibling):c.nextSibling?a.insertBefore(d,c.nextSibling):a.appendChild(d):b.e.Xa(a,d)},firstChild:function(a){return!B(a)?a.firstChild:!a.nextSibling||K(a.nextSibling)?r:a.nextSibling},nextSibling:function(a){B(a)&&(a=ea(a));return a.nextSibling&&K(a.nextSibling)?r:a.nextSibling},lb:function(a){return(a=
B(a))?a[1]:r},Va:function(a){if(ya[b.a.u(a)]){var d=a.firstChild;if(d){do if(1===d.nodeType){var c;c=d.firstChild;var e=r;if(c){do if(e)e.push(c);else if(B(c)){var f=ea(c,n);f?c=f:e=[c]}else K(c)&&(e=[c]);while(c=c.nextSibling)}if(c=e){e=d.nextSibling;for(f=0;f<c.length;f++)e?a.insertBefore(c[f],e):a.appendChild(c[f])}}while(d=d.nextSibling)}}}};b.b("virtualElements",b.e);b.b("virtualElements.allowedBindings",b.e.J);b.b("virtualElements.emptyNode",b.e.$);b.b("virtualElements.insertAfter",b.e.Ra);
b.b("virtualElements.prepend",b.e.Xa);b.b("virtualElements.setDomNodeChildren",b.e.O);b.K=function(){this.Ja={}};b.a.extend(b.K.prototype,{nodeHasBindings:function(a){switch(a.nodeType){case 1:return a.getAttribute("data-bind")!=r;case 8:return b.e.lb(a)!=r;default:return t}},getBindings:function(a,b){var c=this.getBindingsString(a,b);return c?this.parseBindingsString(c,b,a):r},getBindingsString:function(a){switch(a.nodeType){case 1:return a.getAttribute("data-bind");case 8:return b.e.lb(a);default:return r}},
parseBindingsString:function(a,d,c){try{var e;if(!(e=this.Ja[a])){var f=this.Ja,g,h="with($context){with($data||{}){return{"+b.g.ca(a)+"}}}";g=new Function("$context","$element",h);e=f[a]=g}return e(d,c)}catch(l){l.message="Unable to parse bindings.\nBindings value: "+a+"\nMessage: "+l.message,k(l)}}});b.K.instance=new b.K;b.b("bindingProvider",b.K);b.c={};b.w=function(a,d,c){d?(b.a.extend(this,d),this.$parentContext=d,this.$parent=d.$data,this.$parents=(d.$parents||[]).slice(0),this.$parents.unshift(this.$parent)):
(this.$parents=[],this.$root=a,this.ko=b);this.$data=a;c&&(this[c]=a)};b.w.prototype.createChildContext=function(a,d){return new b.w(a,this,d)};b.w.prototype.extend=function(a){var d=b.a.extend(new b.w,this);return b.a.extend(d,a)};var ba="__ko_boundElement";b.gb=function(a,d){if(2==arguments.length)b.a.f.set(a,"__ko_bindingContext__",d);else return b.a.f.get(a,"__ko_bindingContext__")};b.Ga=function(a,d,c){1===a.nodeType&&b.e.Va(a);return aa(a,d,c,n)};b.Fa=function(a,b){(1===b.nodeType||8===b.nodeType)&&
da(a,b,n)};b.Ea=function(a,b){b&&(1!==b.nodeType&&8!==b.nodeType)&&k(Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node"));b=b||z.document.body;ca(a,b,n)};b.ka=function(a){switch(a.nodeType){case 1:case 8:var d=b.gb(a);if(d)return d;if(a.parentNode)return b.ka(a.parentNode)}return j};b.sb=function(a){return(a=b.ka(a))?a.$data:j};b.b("bindingHandlers",b.c);b.b("applyBindings",b.Ea);b.b("applyBindingsToDescendants",b.Fa);b.b("applyBindingsToNode",
b.Ga);b.b("contextFor",b.ka);b.b("dataFor",b.sb);var ma={"class":"className","for":"htmlFor"};b.c.attr={update:function(a,d){var c=b.a.d(d())||{};b.a.C(c,function(c,d){d=b.a.d(d);var g=d===t||d===r||d===j;g&&a.removeAttribute(c);8>=b.a.aa&&c in ma?(c=ma[c],g?a.removeAttribute(c):a[c]=d):g||a.setAttribute(c,d.toString());"name"===c&&b.a.cb(a,g?"":d.toString())})}};b.c.checked={init:function(a,d,c){b.a.n(a,"click",function(){var e;if("checkbox"==a.type)e=a.checked;else if("radio"==a.type&&a.checked)e=
a.value;else return;var f=d(),g=b.a.d(f);"checkbox"==a.type&&g instanceof Array?(e=b.a.i(g,a.value),a.checked&&0>e?f.push(a.value):!a.checked&&0<=e&&f.splice(e,1)):b.g.fa(f,c,"checked",e,n)});"radio"==a.type&&!a.name&&b.c.uniqueName.init(a,J(n))},update:function(a,d){var c=b.a.d(d());"checkbox"==a.type?a.checked=c instanceof Array?0<=b.a.i(c,a.value):c:"radio"==a.type&&(a.checked=a.value==c)}};b.c.css={update:function(a,d){var c=b.a.d(d());"object"==typeof c?b.a.C(c,function(c,d){d=b.a.d(d);b.a.ea(a,
c,d)}):(c=String(c||""),b.a.ea(a,a.__ko__cssValue,t),a.__ko__cssValue=c,b.a.ea(a,c,n))}};b.c.enable={update:function(a,d){var c=b.a.d(d());c&&a.disabled?a.removeAttribute("disabled"):!c&&!a.disabled&&(a.disabled=n)}};b.c.disable={update:function(a,d){b.c.enable.update(a,function(){return!b.a.d(d())})}};b.c.event={init:function(a,d,c,e){var f=d()||{};b.a.C(f,function(f){"string"==typeof f&&b.a.n(a,f,function(a){var l,m=d()[f];if(m){var j=c();try{var p=b.a.M(arguments);p.unshift(e);l=m.apply(e,p)}finally{l!==
n&&(a.preventDefault?a.preventDefault():a.returnValue=t)}j[f+"Bubble"]===t&&(a.cancelBubble=n,a.stopPropagation&&a.stopPropagation())}})})}};b.c.foreach={Ua:function(a){return function(){var d=a(),c=b.a.va(d);if(!c||"number"==typeof c.length)return{foreach:d,templateEngine:b.B.pa};b.a.d(d);return{foreach:c.data,as:c.as,includeDestroyed:c.includeDestroyed,afterAdd:c.afterAdd,beforeRemove:c.beforeRemove,afterRender:c.afterRender,beforeMove:c.beforeMove,afterMove:c.afterMove,templateEngine:b.B.pa}}},
init:function(a,d){return b.c.template.init(a,b.c.foreach.Ua(d))},update:function(a,d,c,e,f){return b.c.template.update(a,b.c.foreach.Ua(d),c,e,f)}};b.g.R.foreach=t;b.e.J.foreach=n;b.c.hasfocus={init:function(a,d,c){function e(e){a.__ko_hasfocusUpdating=n;var f=a.ownerDocument;"activeElement"in f&&(e=f.activeElement===a);f=d();b.g.fa(f,c,"hasfocus",e,n);a.__ko_hasfocusLastValue=e;a.__ko_hasfocusUpdating=t}var f=e.bind(r,n),g=e.bind(r,t);b.a.n(a,"focus",f);b.a.n(a,"focusin",f);b.a.n(a,"blur",g);b.a.n(a,
"focusout",g)},update:function(a,d){var c=!!b.a.d(d());!a.__ko_hasfocusUpdating&&a.__ko_hasfocusLastValue!==c&&(c?a.focus():a.blur(),b.r.L(b.a.Ca,r,[a,c?"focusin":"focusout"]))}};b.c.hasFocus=b.c.hasfocus;b.c.html={init:function(){return{controlsDescendantBindings:n}},update:function(a,d){b.a.da(a,d())}};var ia="__ko_withIfBindingData";T("if");T("ifnot",t,n);T("with",n,t,function(a,b){return a.createChildContext(b)});b.c.options={update:function(a,d,c){"select"!==b.a.u(a)&&k(Error("options binding applies only to SELECT elements"));
for(var e=0==a.length,f=b.a.X(b.a.ga(a.childNodes,function(a){return a.tagName&&"option"===b.a.u(a)&&a.selected}),function(a){return b.k.q(a)||a.innerText||a.textContent}),g=a.scrollTop,h=b.a.d(d());0<a.length;)b.z(a.options[0]),a.remove(0);if(h){c=c();var l=c.optionsIncludeDestroyed;"number"!=typeof h.length&&(h=[h]);if(c.optionsCaption){var m=u.createElement("option");b.a.da(m,c.optionsCaption);b.k.V(m,j);a.appendChild(m)}d=0;for(var q=h.length;d<q;d++){var p=h[d];if(!p||!p._destroy||l){var m=u.createElement("option"),
v=function(a,b,c){var d=typeof b;return"function"==d?b(a):"string"==d?a[b]:c},w=v(p,c.optionsValue,p);b.k.V(m,b.a.d(w));p=v(p,c.optionsText,w);b.a.fb(m,p);a.appendChild(m)}}h=a.getElementsByTagName("option");d=l=0;for(q=h.length;d<q;d++)0<=b.a.i(f,b.k.q(h[d]))&&(b.a.eb(h[d],n),l++);a.scrollTop=g;e&&"value"in c&&ja(a,b.a.va(c.value),n);b.a.xb(a)}}};b.c.options.ta="__ko.optionValueDomData__";b.c.selectedOptions={init:function(a,d,c){b.a.n(a,"change",function(){var e=d(),f=[];b.a.o(a.getElementsByTagName("option"),
function(a){a.selected&&f.push(b.k.q(a))});b.g.fa(e,c,"selectedOptions",f)})},update:function(a,d){"select"!=b.a.u(a)&&k(Error("values binding applies only to SELECT elements"));var c=b.a.d(d());c&&"number"==typeof c.length&&b.a.o(a.getElementsByTagName("option"),function(a){var d=0<=b.a.i(c,b.k.q(a));b.a.eb(a,d)})}};b.c.style={update:function(a,d){var c=b.a.d(d()||{});b.a.C(c,function(c,d){d=b.a.d(d);a.style[c]=d||""})}};b.c.submit={init:function(a,d,c,e){"function"!=typeof d()&&k(Error("The value for a submit binding must be a function"));
b.a.n(a,"submit",function(b){var c,h=d();try{c=h.call(e,a)}finally{c!==n&&(b.preventDefault?b.preventDefault():b.returnValue=t)}})}};b.c.text={update:function(a,d){b.a.fb(a,d())}};b.e.J.text=n;b.c.uniqueName={init:function(a,d){if(d()){var c="ko_unique_"+ ++b.c.uniqueName.rb;b.a.cb(a,c)}}};b.c.uniqueName.rb=0;b.c.value={init:function(a,d,c){function e(){h=t;var e=d(),f=b.k.q(a);b.g.fa(e,c,"value",f)}var f=["change"],g=c().valueUpdate,h=t;g&&("string"==typeof g&&(g=[g]),b.a.Q(f,g),f=b.a.Ia(f));if(b.a.aa&&
("input"==a.tagName.toLowerCase()&&"text"==a.type&&"off"!=a.autocomplete&&(!a.form||"off"!=a.form.autocomplete))&&-1==b.a.i(f,"propertychange"))b.a.n(a,"propertychange",function(){h=n}),b.a.n(a,"blur",function(){h&&e()});b.a.o(f,function(c){var d=e;b.a.Rb(c,"after")&&(d=function(){setTimeout(e,0)},c=c.substring(5));b.a.n(a,c,d)})},update:function(a,d){var c="select"===b.a.u(a),e=b.a.d(d()),f=b.k.q(a),g=e!=f;0===e&&(0!==f&&"0"!==f)&&(g=n);g&&(f=function(){b.k.V(a,e)},f(),c&&setTimeout(f,0));c&&0<a.length&&
ja(a,e,t)}};b.c.visible={update:function(a,d){var c=b.a.d(d()),e="none"!=a.style.display;c&&!e?a.style.display="":!c&&e&&(a.style.display="none")}};b.c.click={init:function(a,d,c,e){return b.c.event.init.call(this,a,function(){var a={};a.click=d();return a},c,e)}};b.v=function(){};b.v.prototype.renderTemplateSource=function(){k(Error("Override renderTemplateSource"))};b.v.prototype.createJavaScriptEvaluatorBlock=function(){k(Error("Override createJavaScriptEvaluatorBlock"))};b.v.prototype.makeTemplateSource=
function(a,d){if("string"==typeof a){d=d||u;var c=d.getElementById(a);c||k(Error("Cannot find template with ID "+a));return new b.l.h(c)}if(1==a.nodeType||8==a.nodeType)return new b.l.P(a);k(Error("Unknown template type: "+a))};b.v.prototype.renderTemplate=function(a,b,c,e){a=this.makeTemplateSource(a,e);return this.renderTemplateSource(a,b,c)};b.v.prototype.isTemplateRewritten=function(a,b){return this.allowTemplateRewriting===t?n:this.makeTemplateSource(a,b).data("isRewritten")};b.v.prototype.rewriteTemplate=
function(a,b,c){a=this.makeTemplateSource(a,c);b=b(a.text());a.text(b);a.data("isRewritten",n)};b.b("templateEngine",b.v);var za=/(<[a-z]+\d*(\s+(?!data-bind=)[a-z0-9\-]+(=(\"[^\"]*\"|\'[^\']*\'))?)*\s+)data-bind=(["'])([\s\S]*?)\5/gi,Aa=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;b.Aa={yb:function(a,d,c){d.isTemplateRewritten(a,c)||d.rewriteTemplate(a,function(a){return b.Aa.Jb(a,d)},c)},Jb:function(a,b){return a.replace(za,function(a,e,f,g,h,j,m){return $(m,e,b)}).replace(Aa,function(a,e){return $(e,
"\x3c!-- ko --\x3e",b)})},ob:function(a){return b.s.sa(function(d,c){d.nextSibling&&b.Ga(d.nextSibling,a,c)})}};b.b("__tr_ambtns",b.Aa.ob);b.l={};b.l.h=function(a){this.h=a};b.l.h.prototype.text=function(){var a=b.a.u(this.h),a="script"===a?"text":"textarea"===a?"value":"innerHTML";if(0==arguments.length)return this.h[a];var d=arguments[0];"innerHTML"===a?b.a.da(this.h,d):this.h[a]=d};b.l.h.prototype.data=function(a){if(1===arguments.length)return b.a.f.get(this.h,"templateSourceData_"+a);b.a.f.set(this.h,
"templateSourceData_"+a,arguments[1])};b.l.P=function(a){this.h=a};b.l.P.prototype=new b.l.h;b.l.P.prototype.text=function(){if(0==arguments.length){var a=b.a.f.get(this.h,"__ko_anon_template__")||{};a.Ba===j&&a.ja&&(a.Ba=a.ja.innerHTML);return a.Ba}b.a.f.set(this.h,"__ko_anon_template__",{Ba:arguments[0]})};b.l.h.prototype.nodes=function(){if(0==arguments.length)return(b.a.f.get(this.h,"__ko_anon_template__")||{}).ja;b.a.f.set(this.h,"__ko_anon_template__",{ja:arguments[0]})};b.b("templateSources",
b.l);b.b("templateSources.domElement",b.l.h);b.b("templateSources.anonymousTemplate",b.l.P);var P;b.xa=function(a){a!=j&&!(a instanceof b.v)&&k(Error("templateEngine must inherit from ko.templateEngine"));P=a};b.wa=function(a,d,c,e,f){c=c||{};(c.templateEngine||P)==j&&k(Error("Set a template engine before calling renderTemplate"));f=f||"replaceChildren";if(e){var g=O(e);return b.j(function(){var h=d&&d instanceof b.w?d:new b.w(b.a.d(d)),j="function"==typeof a?a(h.$data,h):a,h=X(e,f,j,h,c);"replaceNode"==
f&&(e=h,g=O(e))},r,{Ma:function(){return!g||!b.a.Z(g)},Y:g&&"replaceNode"==f?g.parentNode:g})}return b.s.sa(function(e){b.wa(a,d,c,e,"replaceNode")})};b.Pb=function(a,d,c,e,f){function g(a,b){Y(b,l);c.afterRender&&c.afterRender(b,a)}function h(d,e){l=f.createChildContext(b.a.d(d),c.as);l.$index=e;var g="function"==typeof a?a(d,l):a;return X(r,"ignoreTargetNode",g,l,c)}var l;return b.j(function(){var a=b.a.d(d)||[];"undefined"==typeof a.length&&(a=[a]);a=b.a.ga(a,function(a){return c.includeDestroyed||
a===j||a===r||!b.a.d(a._destroy)});b.r.L(b.a.bb,r,[e,a,h,c,g])},r,{Y:e})};b.c.template={init:function(a,d){var c=b.a.d(d());if("string"!=typeof c&&!c.name&&(1==a.nodeType||8==a.nodeType))c=1==a.nodeType?a.childNodes:b.e.childNodes(a),c=b.a.Kb(c),(new b.l.P(a)).nodes(c);return{controlsDescendantBindings:n}},update:function(a,d,c,e,f){d=b.a.d(d());c={};e=n;var g,h=r;"string"!=typeof d&&(c=d,d=b.a.d(c.name),"if"in c&&(e=b.a.d(c["if"])),e&&"ifnot"in c&&(e=!b.a.d(c.ifnot)),g=b.a.d(c.data));"foreach"in
c?h=b.Pb(d||a,e&&c.foreach||[],c,a,f):e?(f="data"in c?f.createChildContext(g,c.as):f,h=b.wa(d||a,f,c,a)):b.e.$(a);f=h;(g=b.a.f.get(a,"__ko__templateComputedDomDataKey__"))&&"function"==typeof g.A&&g.A();b.a.f.set(a,"__ko__templateComputedDomDataKey__",f&&f.qa()?f:j)}};b.g.R.template=function(a){a=b.g.ba(a);return 1==a.length&&a[0].unknown||b.g.Hb(a,"name")?r:"This template engine does not support anonymous templates nested within its templates"};b.e.J.template=n;b.b("setTemplateEngine",b.xa);b.b("renderTemplate",
b.wa);b.a.La=function(a,b,c){a=a||[];b=b||[];return a.length<=b.length?W(a,b,"added","deleted",c):W(b,a,"deleted","added",c)};b.b("utils.compareArrays",b.a.La);b.a.bb=function(a,d,c,e,f){function g(a,b){s=m[b];v!==b&&(x[a]=s);s.oa(v++);M(s.N);u.push(s);C.push(s)}function h(a,c){if(a)for(var d=0,e=c.length;d<e;d++)c[d]&&b.a.o(c[d].N,function(b){a(b,d,c[d].W)})}d=d||[];e=e||{};var l=b.a.f.get(a,"setDomNodeChildrenFromArrayMapping_lastMappingResult")===j,m=b.a.f.get(a,"setDomNodeChildrenFromArrayMapping_lastMappingResult")||
[],q=b.a.X(m,function(a){return a.W}),p=b.a.La(q,d),u=[],w=0,v=0,B=[],C=[];d=[];for(var x=[],q=[],s,E=0,y,z;y=p[E];E++)switch(z=y.moved,y.status){case "deleted":z===j&&(s=m[w],s.j&&s.j.A(),B.push.apply(B,M(s.N)),e.beforeRemove&&(d[E]=s,C.push(s)));w++;break;case "retained":g(E,w++);break;case "added":z!==j?g(E,z):(s={W:y.value,oa:b.m(v++)},u.push(s),C.push(s),l||(q[E]=s))}h(e.beforeMove,x);b.a.o(B,e.beforeRemove?b.z:b.removeNode);for(var E=0,l=b.e.firstChild(a),D;s=C[E];E++){s.N||b.a.extend(s,na(a,
c,s.W,f,s.oa));for(w=0;p=s.N[w];l=p.nextSibling,D=p,w++)p!==l&&b.e.Ra(a,p,D);!s.Db&&f&&(f(s.W,s.N,s.oa),s.Db=n)}h(e.beforeRemove,d);h(e.afterMove,x);h(e.afterAdd,q);b.a.f.set(a,"setDomNodeChildrenFromArrayMapping_lastMappingResult",u)};b.b("utils.setDomNodeChildrenFromArrayMapping",b.a.bb);b.B=function(){this.allowTemplateRewriting=t};b.B.prototype=new b.v;b.B.prototype.renderTemplateSource=function(a){var d=!(9>b.a.aa)&&a.nodes?a.nodes():r;if(d)return b.a.M(d.cloneNode(n).childNodes);a=a.text();
return b.a.ua(a)};b.B.pa=new b.B;b.xa(b.B.pa);b.b("nativeTemplateEngine",b.B);b.ra=function(){var a=this.Gb=function(){if("undefined"==typeof q||!q.tmpl)return 0;try{if(0<=q.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(a){}return 1}();this.renderTemplateSource=function(b,c,e){e=e||{};2>a&&k(Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later."));var f=b.data("precompiled");f||(f=b.text()||"",f=q.template(r,"{{ko_with $item.koBindingContext}}"+
f+"{{/ko_with}}"),b.data("precompiled",f));b=[c.$data];c=q.extend({koBindingContext:c},e.templateOptions);c=q.tmpl(f,b,c);c.appendTo(u.createElement("div"));q.fragments={};return c};this.createJavaScriptEvaluatorBlock=function(a){return"{{ko_code ((function() { return "+a+" })()) }}"};this.addTemplate=function(a,b){u.write("<script type='text/html' id='"+a+"'>"+b+"\x3c/script>")};0<a&&(q.tmpl.tag.ko_code={open:"__.push($1 || '');"},q.tmpl.tag.ko_with={open:"with($1) {",close:"} "})};b.ra.prototype=
new b.v;v=new b.ra;0<v.Gb&&b.xa(v);b.b("jqueryTmplTemplateEngine",b.ra)})})();
(function() {function F(q){return function(){return q}};(function(q){var w=this||(0,eval)("this"),s=w.document,H=w.navigator,t=w.jQuery,y=w.JSON;(function(q){"function"===typeof require&&"object"===typeof exports&&"object"===typeof module?q(module.exports||exports):"function"===typeof define&&define.amd?define(["exports"],q):q(w.ko={})})(function(C){function G(b,c,d,f){a.d[b]={init:function(b){a.a.f.set(b,I,{});return{controlsDescendantBindings:!0}},update:function(b,e,m,h,k){m=a.a.f.get(b,I);e=a.a.c(e());h=!d!==!e;var l=!m.fb;if(l||c||h!==m.vb)l&&(m.fb=
a.a.Oa(a.e.childNodes(b),!0)),h?(l||a.e.P(b,a.a.Oa(m.fb)),a.Ja(f?f(k,e):k,b)):a.e.ba(b),m.vb=h}};a.g.S[b]=!1;a.e.L[b]=!0}function J(b,c,d){d&&c!==a.h.n(b)&&a.h.W(b,c);c!==a.h.n(b)&&a.q.I(a.a.Ga,null,[b,"change"])}var a="undefined"!==typeof C?C:{};a.b=function(b,c){for(var d=b.split("."),f=a,g=0;g<d.length-1;g++)f=f[d[g]];f[d[d.length-1]]=c};a.r=function(a,c,d){a[c]=d};a.version="2.3.0";a.b("version",a.version);a.a=function(){function b(a,b){for(var e in a)a.hasOwnProperty(e)&&b(e,a[e])}function c(b,
e){if("input"!==a.a.u(b)||!b.type||"click"!=e.toLowerCase())return!1;var k=b.type;return"checkbox"==k||"radio"==k}var d={},f={};d[H&&/Firefox\/2/i.test(H.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"];d.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" ");b(d,function(a,b){if(b.length)for(var e=0,c=b.length;e<c;e++)f[b[e]]=a});var g={propertychange:!0},e=s&&function(){for(var a=3,b=s.createElement("div"),e=b.getElementsByTagName("i");b.innerHTML=
"\x3c!--[if gt IE "+ ++a+"]><i></i><![endif]--\x3e",e[0];);return 4<a?a:q}();return{Ta:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],p:function(a,b){for(var e=0,c=a.length;e<c;e++)b(a[e])},k:function(a,b){if("function"==typeof Array.prototype.indexOf)return Array.prototype.indexOf.call(a,b);for(var e=0,c=a.length;e<c;e++)if(a[e]===b)return e;return-1},La:function(a,b,e){for(var c=0,d=a.length;c<d;c++)if(b.call(e,a[c]))return a[c];return null},ka:function(b,e){var c=a.a.k(b,e);0<=c&&
b.splice(c,1)},Ma:function(b){b=b||[];for(var e=[],c=0,d=b.length;c<d;c++)0>a.a.k(e,b[c])&&e.push(b[c]);return e},Z:function(a,b){a=a||[];for(var e=[],c=0,d=a.length;c<d;c++)e.push(b(a[c]));return e},Y:function(a,b){a=a||[];for(var e=[],c=0,d=a.length;c<d;c++)b(a[c])&&e.push(a[c]);return e},R:function(a,b){if(b instanceof Array)a.push.apply(a,b);else for(var e=0,c=b.length;e<c;e++)a.push(b[e]);return a},ja:function(b,e,c){var d=b.indexOf?b.indexOf(e):a.a.k(b,e);0>d?c&&b.push(e):c||b.splice(d,1)},
extend:function(a,b){if(b)for(var e in b)b.hasOwnProperty(e)&&(a[e]=b[e]);return a},w:b,oa:function(b){for(;b.firstChild;)a.removeNode(b.firstChild)},Mb:function(b){b=a.a.N(b);for(var e=s.createElement("div"),c=0,d=b.length;c<d;c++)e.appendChild(a.H(b[c]));return e},Oa:function(b,e){for(var c=0,d=b.length,g=[];c<d;c++){var f=b[c].cloneNode(!0);g.push(e?a.H(f):f)}return g},P:function(b,e){a.a.oa(b);if(e)for(var c=0,d=e.length;c<d;c++)b.appendChild(e[c])},eb:function(b,e){var c=b.nodeType?[b]:b;if(0<
c.length){for(var d=c[0],g=d.parentNode,f=0,r=e.length;f<r;f++)g.insertBefore(e[f],d);f=0;for(r=c.length;f<r;f++)a.removeNode(c[f])}},hb:function(a,b){7>e?a.setAttribute("selected",b):a.selected=b},F:function(a){return null===a||a===q?"":a.trim?a.trim():a.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Wb:function(b,e){for(var c=[],d=(b||"").split(e),g=0,f=d.length;g<f;g++){var r=a.a.F(d[g]);""!==r&&c.push(r)}return c},Tb:function(a,b){a=a||"";return b.length>a.length?!1:a.substring(0,b.length)===
b},yb:function(a,b){if(b.compareDocumentPosition)return 16==(b.compareDocumentPosition(a)&16);for(;null!=a;){if(a==b)return!0;a=a.parentNode}return!1},aa:function(b){return a.a.yb(b,b.ownerDocument)},pb:function(b){return!!a.a.La(b,a.a.aa)},u:function(a){return a&&a.tagName&&a.tagName.toLowerCase()},o:function(b,d,k){var f=e&&g[d];if(f||"undefined"==typeof t)if(f||"function"!=typeof b.addEventListener)if("undefined"!=typeof b.attachEvent){var n=function(a){k.call(b,a)},p="on"+d;b.attachEvent(p,n);
a.a.C.ia(b,function(){b.detachEvent(p,n)})}else throw Error("Browser doesn't support addEventListener or attachEvent");else b.addEventListener(d,k,!1);else{if(c(b,d)){var r=k;k=function(a,b){var e=this.checked;b&&(this.checked=!0!==b.sb);r.call(this,a);this.checked=e}}t(b).bind(d,k)}},Ga:function(a,b){if(!a||!a.nodeType)throw Error("element must be a DOM node when calling triggerEvent");if("undefined"!=typeof t){var e=[];c(a,b)&&e.push({sb:a.checked});t(a).trigger(b,e)}else if("function"==typeof s.createEvent)if("function"==
typeof a.dispatchEvent)e=s.createEvent(f[b]||"HTMLEvents"),e.initEvent(b,!0,!0,w,0,0,0,0,0,!1,!1,!1,!1,0,a),a.dispatchEvent(e);else throw Error("The supplied element doesn't support dispatchEvent");else if("undefined"!=typeof a.fireEvent)c(a,b)&&(a.checked=!0!==a.checked),a.fireEvent("on"+b);else throw Error("Browser doesn't support triggering events");},c:function(b){return a.T(b)?b():b},ya:function(b){return a.T(b)?b.t():b},ga:function(b,e,c){if(e){var d=/\S+/g,g=b.className.match(d)||[];a.a.p(e.match(d),
function(b){a.a.ja(g,b,c)});b.className=g.join(" ")}},ib:function(b,e){var c=a.a.c(e);if(null===c||c===q)c="";var d=a.e.firstChild(b);!d||3!=d.nodeType||a.e.nextSibling(d)?a.e.P(b,[s.createTextNode(c)]):d.data=c;a.a.Bb(b)},gb:function(a,b){a.name=b;if(7>=e)try{a.mergeAttributes(s.createElement("<input name='"+a.name+"'/>"),!1)}catch(c){}},Bb:function(a){9<=e&&(a=1==a.nodeType?a:a.parentNode,a.style&&(a.style.zoom=a.style.zoom))},zb:function(a){if(e){var b=a.style.width;a.style.width=0;a.style.width=
b}},Qb:function(b,e){b=a.a.c(b);e=a.a.c(e);for(var c=[],d=b;d<=e;d++)c.push(d);return c},N:function(a){for(var b=[],e=0,c=a.length;e<c;e++)b.push(a[e]);return b},Ub:6===e,Vb:7===e,ca:e,Ua:function(b,e){for(var c=a.a.N(b.getElementsByTagName("input")).concat(a.a.N(b.getElementsByTagName("textarea"))),d="string"==typeof e?function(a){return a.name===e}:function(a){return e.test(a.name)},g=[],f=c.length-1;0<=f;f--)d(c[f])&&g.push(c[f]);return g},Nb:function(b){return"string"==typeof b&&(b=a.a.F(b))?
y&&y.parse?y.parse(b):(new Function("return "+b))():null},Ca:function(b,e,c){if(!y||!y.stringify)throw 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");return y.stringify(a.a.c(b),e,c)},Ob:function(e,c,d){d=d||{};var g=d.params||{},f=d.includeFields||this.Ta,p=e;if("object"==typeof e&&"form"===a.a.u(e))for(var p=e.action,r=f.length-1;0<=r;r--)for(var z=
a.a.Ua(e,f[r]),D=z.length-1;0<=D;D--)g[z[D].name]=z[D].value;c=a.a.c(c);var q=s.createElement("form");q.style.display="none";q.action=p;q.method="post";for(var v in c)e=s.createElement("input"),e.name=v,e.value=a.a.Ca(a.a.c(c[v])),q.appendChild(e);b(g,function(a,b){var e=s.createElement("input");e.name=a;e.value=b;q.appendChild(e)});s.body.appendChild(q);d.submitter?d.submitter(q):q.submit();setTimeout(function(){q.parentNode.removeChild(q)},0)}}}();a.b("utils",a.a);a.b("utils.arrayForEach",a.a.p);
a.b("utils.arrayFirst",a.a.La);a.b("utils.arrayFilter",a.a.Y);a.b("utils.arrayGetDistinctValues",a.a.Ma);a.b("utils.arrayIndexOf",a.a.k);a.b("utils.arrayMap",a.a.Z);a.b("utils.arrayPushAll",a.a.R);a.b("utils.arrayRemoveItem",a.a.ka);a.b("utils.extend",a.a.extend);a.b("utils.fieldsIncludedWithJsonPost",a.a.Ta);a.b("utils.getFormFields",a.a.Ua);a.b("utils.peekObservable",a.a.ya);a.b("utils.postJson",a.a.Ob);a.b("utils.parseJson",a.a.Nb);a.b("utils.registerEventHandler",a.a.o);a.b("utils.stringifyJson",
a.a.Ca);a.b("utils.range",a.a.Qb);a.b("utils.toggleDomNodeCssClass",a.a.ga);a.b("utils.triggerEvent",a.a.Ga);a.b("utils.unwrapObservable",a.a.c);a.b("utils.objectForEach",a.a.w);a.b("utils.addOrRemoveItem",a.a.ja);a.b("unwrap",a.a.c);Function.prototype.bind||(Function.prototype.bind=function(a){var c=this,d=Array.prototype.slice.call(arguments);a=d.shift();return function(){return c.apply(a,d.concat(Array.prototype.slice.call(arguments)))}});a.a.f=new function(){var b=0,c="__ko__"+(new Date).getTime(),
d={};return{get:function(b,c){var e=a.a.f.pa(b,!1);return e===q?q:e[c]},set:function(b,c,e){if(e!==q||a.a.f.pa(b,!1)!==q)a.a.f.pa(b,!0)[c]=e},pa:function(a,g){var e=a[c];if(!e||"null"===e||!d[e]){if(!g)return q;e=a[c]="ko"+b++;d[e]={}}return d[e]},clear:function(a){var b=a[c];return b?(delete d[b],a[c]=null,!0):!1}}};a.b("utils.domData",a.a.f);a.b("utils.domData.clear",a.a.f.clear);a.a.C=new function(){function b(b,c){var g=a.a.f.get(b,d);g===q&&c&&(g=[],a.a.f.set(b,d,g));return g}function c(e){var d=
b(e,!1);if(d)for(var d=d.slice(0),f=0;f<d.length;f++)d[f](e);a.a.f.clear(e);"function"==typeof t&&"function"==typeof t.cleanData&&t.cleanData([e]);if(g[e.nodeType])for(d=e.firstChild;e=d;)d=e.nextSibling,8===e.nodeType&&c(e)}var d="__ko_domNodeDisposal__"+(new Date).getTime(),f={1:!0,8:!0,9:!0},g={1:!0,9:!0};return{ia:function(a,c){if("function"!=typeof c)throw Error("Callback must be a function");b(a,!0).push(c)},cb:function(e,c){var g=b(e,!1);g&&(a.a.ka(g,c),0==g.length&&a.a.f.set(e,d,q))},H:function(b){if(f[b.nodeType]&&
(c(b),g[b.nodeType])){var d=[];a.a.R(d,b.getElementsByTagName("*"));for(var h=0,k=d.length;h<k;h++)c(d[h])}return b},removeNode:function(b){a.H(b);b.parentNode&&b.parentNode.removeChild(b)}}};a.H=a.a.C.H;a.removeNode=a.a.C.removeNode;a.b("cleanNode",a.H);a.b("removeNode",a.removeNode);a.b("utils.domNodeDisposal",a.a.C);a.b("utils.domNodeDisposal.addDisposeCallback",a.a.C.ia);a.b("utils.domNodeDisposal.removeDisposeCallback",a.a.C.cb);(function(){a.a.xa=function(b){var c;if("undefined"!=typeof t)if(t.parseHTML)c=
t.parseHTML(b)||[];else{if((c=t.clean([b]))&&c[0]){for(b=c[0];b.parentNode&&11!==b.parentNode.nodeType;)b=b.parentNode;b.parentNode&&b.parentNode.removeChild(b)}}else{var d=a.a.F(b).toLowerCase();c=s.createElement("div");d=d.match(/^<(thead|tbody|tfoot)/)&&[1,"<table>","</table>"]||!d.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!d.indexOf("<td")||!d.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||[0,"",""];b="ignored<div>"+d[1]+b+d[2]+"</div>";for("function"==typeof w.innerShiv?
c.appendChild(w.innerShiv(b)):c.innerHTML=b;d[0]--;)c=c.lastChild;c=a.a.N(c.lastChild.childNodes)}return c};a.a.fa=function(b,c){a.a.oa(b);c=a.a.c(c);if(null!==c&&c!==q)if("string"!=typeof c&&(c=c.toString()),"undefined"!=typeof t)t(b).html(c);else for(var d=a.a.xa(c),f=0;f<d.length;f++)b.appendChild(d[f])}})();a.b("utils.parseHtmlFragment",a.a.xa);a.b("utils.setHtml",a.a.fa);a.s=function(){function b(c,f){if(c)if(8==c.nodeType){var g=a.s.$a(c.nodeValue);null!=g&&f.push({xb:c,Kb:g})}else if(1==c.nodeType)for(var g=
0,e=c.childNodes,m=e.length;g<m;g++)b(e[g],f)}var c={};return{va:function(a){if("function"!=typeof a)throw Error("You can only pass a function to ko.memoization.memoize()");var b=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);c[b]=a;return"\x3c!--[ko_memo:"+b+"]--\x3e"},mb:function(a,b){var g=c[a];if(g===q)throw Error("Couldn't find any memo with ID "+a+". Perhaps it's already been unmemoized.");try{return g.apply(null,b||[]),
!0}finally{delete c[a]}},nb:function(c,f){var g=[];b(c,g);for(var e=0,m=g.length;e<m;e++){var h=g[e].xb,k=[h];f&&a.a.R(k,f);a.s.mb(g[e].Kb,k);h.nodeValue="";h.parentNode&&h.parentNode.removeChild(h)}},$a:function(a){return(a=a.match(/^\[ko_memo\:(.*?)\]$/))?a[1]:null}}}();a.b("memoization",a.s);a.b("memoization.memoize",a.s.va);a.b("memoization.unmemoize",a.s.mb);a.b("memoization.parseMemoText",a.s.$a);a.b("memoization.unmemoizeDomNodeAndDescendants",a.s.nb);a.Sa={throttle:function(b,c){b.throttleEvaluation=
c;var d=null;return a.j({read:b,write:function(a){clearTimeout(d);d=setTimeout(function(){b(a)},c)}})},notify:function(b,c){b.equalityComparer="always"==c?F(!1):a.m.fn.equalityComparer;return b}};a.b("extenders",a.Sa);a.kb=function(b,c,d){this.target=b;this.la=c;this.wb=d;a.r(this,"dispose",this.B)};a.kb.prototype.B=function(){this.Hb=!0;this.wb()};a.V=function(){this.G={};a.a.extend(this,a.V.fn);a.r(this,"subscribe",this.Da);a.r(this,"extend",this.extend);a.r(this,"getSubscriptionsCount",this.Db)};
a.V.fn={Da:function(b,c,d){d=d||"change";var f=new a.kb(this,c?b.bind(c):b,function(){a.a.ka(this.G[d],f)}.bind(this));this.G[d]||(this.G[d]=[]);this.G[d].push(f);return f},notifySubscribers:function(b,c){c=c||"change";this.G[c]&&a.q.I(function(){a.a.p(this.G[c].slice(0),function(a){a&&!0!==a.Hb&&a.la(b)})},this)},Db:function(){var b=0;a.a.w(this.G,function(a,d){b+=d.length});return b},extend:function(b){var c=this;b&&a.a.w(b,function(b,f){var g=a.Sa[b];"function"==typeof g&&(c=g(c,f))});return c}};
a.Wa=function(a){return null!=a&&"function"==typeof a.Da&&"function"==typeof a.notifySubscribers};a.b("subscribable",a.V);a.b("isSubscribable",a.Wa);a.q=function(){var b=[];return{rb:function(a){b.push({la:a,Ra:[]})},end:function(){b.pop()},bb:function(c){if(!a.Wa(c))throw Error("Only subscribable things can act as dependencies");if(0<b.length){var d=b[b.length-1];!d||0<=a.a.k(d.Ra,c)||(d.Ra.push(c),d.la(c))}},I:function(a,d,f){try{return b.push(null),a.apply(d,f||[])}finally{b.pop()}}}}();var L=
{undefined:!0,"boolean":!0,number:!0,string:!0};a.m=function(b){function c(){if(0<arguments.length)return c.equalityComparer&&c.equalityComparer(d,arguments[0])||(c.K(),d=arguments[0],c.J()),this;a.q.bb(c);return d}var d=b;a.V.call(c);c.t=function(){return d};c.J=function(){c.notifySubscribers(d)};c.K=function(){c.notifySubscribers(d,"beforeChange")};a.a.extend(c,a.m.fn);a.r(c,"peek",c.t);a.r(c,"valueHasMutated",c.J);a.r(c,"valueWillMutate",c.K);return c};a.m.fn={equalityComparer:function(a,c){return null===
a||typeof a in L?a===c:!1}};var A=a.m.Pb="__ko_proto__";a.m.fn[A]=a.m;a.qa=function(b,c){return null===b||b===q||b[A]===q?!1:b[A]===c?!0:a.qa(b[A],c)};a.T=function(b){return a.qa(b,a.m)};a.Xa=function(b){return"function"==typeof b&&b[A]===a.m||"function"==typeof b&&b[A]===a.j&&b.Eb?!0:!1};a.b("observable",a.m);a.b("isObservable",a.T);a.b("isWriteableObservable",a.Xa);a.U=function(b){b=b||[];if("object"!=typeof b||!("length"in b))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");
b=a.m(b);a.a.extend(b,a.U.fn);return b};a.U.fn={remove:function(a){for(var c=this.t(),d=[],f="function"==typeof a?a:function(e){return e===a},g=0;g<c.length;g++){var e=c[g];f(e)&&(0===d.length&&this.K(),d.push(e),c.splice(g,1),g--)}d.length&&this.J();return d},removeAll:function(b){if(b===q){var c=this.t(),d=c.slice(0);this.K();c.splice(0,c.length);this.J();return d}return b?this.remove(function(c){return 0<=a.a.k(b,c)}):[]},destroy:function(a){var c=this.t(),d="function"==typeof a?a:function(c){return c===
a};this.K();for(var f=c.length-1;0<=f;f--)d(c[f])&&(c[f]._destroy=!0);this.J()},destroyAll:function(b){return b===q?this.destroy(F(!0)):b?this.destroy(function(c){return 0<=a.a.k(b,c)}):[]},indexOf:function(b){var c=this();return a.a.k(c,b)},replace:function(a,c){var d=this.indexOf(a);0<=d&&(this.K(),this.t()[d]=c,this.J())}};a.a.p("pop push reverse shift sort splice unshift".split(" "),function(b){a.U.fn[b]=function(){var a=this.t();this.K();a=a[b].apply(a,arguments);this.J();return a}});a.a.p(["slice"],
function(b){a.U.fn[b]=function(){var a=this();return a[b].apply(a,arguments)}});a.b("observableArray",a.U);a.j=function(b,c,d){function f(){a.a.p(v,function(a){a.B()});v=[]}function g(){var a=m.throttleEvaluation;a&&0<=a?(clearTimeout(t),t=setTimeout(e,a)):e()}function e(){if(!n)if(l&&D())x();else{n=!0;try{var b=a.a.Z(v,function(a){return a.target});a.q.rb(function(e){var c;0<=(c=a.a.k(b,e))?b[c]=q:v.push(e.Da(g))});for(var e=p.call(c),d=b.length-1;0<=d;d--)b[d]&&v.splice(d,1)[0].B();l=!0;m.notifySubscribers(k,
"beforeChange");k=e;m.notifySubscribers(k)}finally{a.q.end(),n=!1}v.length||x()}}function m(){if(0<arguments.length){if("function"===typeof r)r.apply(c,arguments);else throw 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.");return this}l||e();a.q.bb(m);return k}function h(){return!l||0<v.length}var k,l=!1,n=!1,p=b;p&&"object"==typeof p?(d=p,p=d.read):(d=d||{},p||(p=d.read));if("function"!=typeof p)throw Error("Pass a function that returns the value of the ko.computed");
var r=d.write,z=d.disposeWhenNodeIsRemoved||d.$||null,D=d.disposeWhen||d.Qa||F(!1),x=f,v=[],t=null;c||(c=d.owner);m.t=function(){l||e();return k};m.Cb=function(){return v.length};m.Eb="function"===typeof d.write;m.B=function(){x()};m.ta=h;a.V.call(m);a.a.extend(m,a.j.fn);a.r(m,"peek",m.t);a.r(m,"dispose",m.B);a.r(m,"isActive",m.ta);a.r(m,"getDependenciesCount",m.Cb);!0!==d.deferEvaluation&&e();if(z&&h()){x=function(){a.a.C.cb(z,x);f()};a.a.C.ia(z,x);var s=D,D=function(){return!a.a.aa(z)||s()}}return m};
a.Gb=function(b){return a.qa(b,a.j)};C=a.m.Pb;a.j[C]=a.m;a.j.fn={};a.j.fn[C]=a.j;a.b("dependentObservable",a.j);a.b("computed",a.j);a.b("isComputed",a.Gb);(function(){function b(a,g,e){e=e||new d;a=g(a);if("object"!=typeof a||null===a||a===q||a instanceof Date||a instanceof String||a instanceof Number||a instanceof Boolean)return a;var m=a instanceof Array?[]:{};e.save(a,m);c(a,function(c){var d=g(a[c]);switch(typeof d){case "boolean":case "number":case "string":case "function":m[c]=d;break;case "object":case "undefined":var l=
e.get(d);m[c]=l!==q?l:b(d,g,e)}});return m}function c(a,b){if(a instanceof Array){for(var e=0;e<a.length;e++)b(e);"function"==typeof a.toJSON&&b("toJSON")}else for(e in a)b(e)}function d(){this.keys=[];this.Ha=[]}a.lb=function(c){if(0==arguments.length)throw Error("When calling ko.toJS, pass the object you want to convert.");return b(c,function(b){for(var e=0;a.T(b)&&10>e;e++)b=b();return b})};a.toJSON=function(b,c,e){b=a.lb(b);return a.a.Ca(b,c,e)};d.prototype={save:function(b,c){var e=a.a.k(this.keys,
b);0<=e?this.Ha[e]=c:(this.keys.push(b),this.Ha.push(c))},get:function(b){b=a.a.k(this.keys,b);return 0<=b?this.Ha[b]:q}}})();a.b("toJS",a.lb);a.b("toJSON",a.toJSON);(function(){a.h={n:function(b){switch(a.a.u(b)){case "option":return!0===b.__ko__hasDomDataOptionValue__?a.a.f.get(b,a.d.options.wa):7>=a.a.ca?b.getAttributeNode("value")&&b.getAttributeNode("value").specified?b.value:b.text:b.value;case "select":return 0<=b.selectedIndex?a.h.n(b.options[b.selectedIndex]):q;default:return b.value}},W:function(b,
c){switch(a.a.u(b)){case "option":switch(typeof c){case "string":a.a.f.set(b,a.d.options.wa,q);"__ko__hasDomDataOptionValue__"in b&&delete b.__ko__hasDomDataOptionValue__;b.value=c;break;default:a.a.f.set(b,a.d.options.wa,c),b.__ko__hasDomDataOptionValue__=!0,b.value="number"===typeof c?c:""}break;case "select":""===c&&(c=q);if(null===c||c===q)b.selectedIndex=-1;for(var d=b.options.length-1;0<=d;d--)if(a.h.n(b.options[d])==c){b.selectedIndex=d;break}1<b.size||-1!==b.selectedIndex||(b.selectedIndex=
0);break;default:if(null===c||c===q)c="";b.value=c}}}})();a.b("selectExtensions",a.h);a.b("selectExtensions.readValue",a.h.n);a.b("selectExtensions.writeValue",a.h.W);a.g=function(){function b(a,b){for(var d=null;a!=d;)d=a,a=a.replace(c,function(a,c){return b[c]});return a}var c=/\@ko_token_(\d+)\@/g,d=["true","false","null","undefined"],f=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i;return{S:[],da:function(c){var e=a.a.F(c);if(3>e.length)return[];"{"===e.charAt(0)&&(e=e.substring(1,e.length-
1));c=[];for(var d=null,f,k=0;k<e.length;k++){var l=e.charAt(k);if(null===d)switch(l){case '"':case "'":case "/":d=k,f=l}else if(l==f&&"\\"!==e.charAt(k-1)){l=e.substring(d,k+1);c.push(l);var n="@ko_token_"+(c.length-1)+"@",e=e.substring(0,d)+n+e.substring(k+1),k=k-(l.length-n.length),d=null}}f=d=null;for(var p=0,r=null,k=0;k<e.length;k++){l=e.charAt(k);if(null===d)switch(l){case "{":d=k;r=l;f="}";break;case "(":d=k;r=l;f=")";break;case "[":d=k,r=l,f="]"}l===r?p++:l===f&&(p--,0===p&&(l=e.substring(d,
k+1),c.push(l),n="@ko_token_"+(c.length-1)+"@",e=e.substring(0,d)+n+e.substring(k+1),k-=l.length-n.length,d=null))}f=[];e=e.split(",");d=0;for(k=e.length;d<k;d++)p=e[d],r=p.indexOf(":"),0<r&&r<p.length-1?(l=p.substring(r+1),f.push({key:b(p.substring(0,r),c),value:b(l,c)})):f.push({unknown:b(p,c)});return f},ea:function(b){var e="string"===typeof b?a.g.da(b):b,c=[];b=[];for(var h,k=0;h=e[k];k++)if(0<c.length&&c.push(","),h.key){var l;a:{l=h.key;var n=a.a.F(l);switch(n.length&&n.charAt(0)){case "'":case '"':break a;
default:l="'"+n+"'"}}h=h.value;c.push(l);c.push(":");c.push(h);h=a.a.F(h);0<=a.a.k(d,a.a.F(h).toLowerCase())?h=!1:(n=h.match(f),h=null===n?!1:n[1]?"Object("+n[1]+")"+n[2]:h);h&&(0<b.length&&b.push(", "),b.push(l+" : function(__ko_value) { "+h+" = __ko_value; }"))}else h.unknown&&c.push(h.unknown);e=c.join("");0<b.length&&(e=e+", '_ko_property_writers' : { "+b.join("")+" } ");return e},Jb:function(b,c){for(var d=0;d<b.length;d++)if(a.a.F(b[d].key)==c)return!0;return!1},ha:function(b,c,d,f,k){if(b&&
a.T(b))!a.Xa(b)||k&&b.t()===f||b(f);else if((b=c()._ko_property_writers)&&b[d])b[d](f)}}}();a.b("expressionRewriting",a.g);a.b("expressionRewriting.bindingRewriteValidators",a.g.S);a.b("expressionRewriting.parseObjectLiteral",a.g.da);a.b("expressionRewriting.preProcessBindings",a.g.ea);a.b("jsonExpressionRewriting",a.g);a.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",a.g.ea);(function(){function b(a){return 8==a.nodeType&&(g?a.text:a.nodeValue).match(e)}function c(a){return 8==a.nodeType&&
(g?a.text:a.nodeValue).match(m)}function d(a,e){for(var d=a,g=1,f=[];d=d.nextSibling;){if(c(d)&&(g--,0===g))return f;f.push(d);b(d)&&g++}if(!e)throw Error("Cannot find closing comment tag to match: "+a.nodeValue);return null}function f(a,b){var c=d(a,b);return c?0<c.length?c[c.length-1].nextSibling:a.nextSibling:null}var g=s&&"\x3c!--test--\x3e"===s.createComment("test").text,e=g?/^\x3c!--\s*ko(?:\s+(.+\s*\:[\s\S]*))?\s*--\x3e$/:/^\s*ko(?:\s+(.+\s*\:[\s\S]*))?\s*$/,m=g?/^\x3c!--\s*\/ko\s*--\x3e$/:
/^\s*\/ko\s*$/,h={ul:!0,ol:!0};a.e={L:{},childNodes:function(a){return b(a)?d(a):a.childNodes},ba:function(c){if(b(c)){c=a.e.childNodes(c);for(var e=0,d=c.length;e<d;e++)a.removeNode(c[e])}else a.a.oa(c)},P:function(c,e){if(b(c)){a.e.ba(c);for(var d=c.nextSibling,g=0,f=e.length;g<f;g++)d.parentNode.insertBefore(e[g],d)}else a.a.P(c,e)},ab:function(a,c){b(a)?a.parentNode.insertBefore(c,a.nextSibling):a.firstChild?a.insertBefore(c,a.firstChild):a.appendChild(c)},Va:function(c,e,d){d?b(c)?c.parentNode.insertBefore(e,
d.nextSibling):d.nextSibling?c.insertBefore(e,d.nextSibling):c.appendChild(e):a.e.ab(c,e)},firstChild:function(a){return b(a)?!a.nextSibling||c(a.nextSibling)?null:a.nextSibling:a.firstChild},nextSibling:function(a){b(a)&&(a=f(a));return a.nextSibling&&c(a.nextSibling)?null:a.nextSibling},ob:function(a){return(a=b(a))?a[1]:null},Za:function(e){if(h[a.a.u(e)]){var d=e.firstChild;if(d){do if(1===d.nodeType){var g;g=d.firstChild;var m=null;if(g){do if(m)m.push(g);else if(b(g)){var r=f(g,!0);r?g=r:m=
[g]}else c(g)&&(m=[g]);while(g=g.nextSibling)}if(g=m)for(m=d.nextSibling,r=0;r<g.length;r++)m?e.insertBefore(g[r],m):e.appendChild(g[r])}while(d=d.nextSibling)}}}}})();a.b("virtualElements",a.e);a.b("virtualElements.allowedBindings",a.e.L);a.b("virtualElements.emptyNode",a.e.ba);a.b("virtualElements.insertAfter",a.e.Va);a.b("virtualElements.prepend",a.e.ab);a.b("virtualElements.setDomNodeChildren",a.e.P);(function(){a.M=function(){this.Na={}};a.a.extend(a.M.prototype,{nodeHasBindings:function(b){switch(b.nodeType){case 1:return null!=
b.getAttribute("data-bind");case 8:return null!=a.e.ob(b);default:return!1}},getBindings:function(a,c){var d=this.getBindingsString(a,c);return d?this.parseBindingsString(d,c,a):null},getBindingsString:function(b){switch(b.nodeType){case 1:return b.getAttribute("data-bind");case 8:return a.e.ob(b);default:return null}},parseBindingsString:function(b,c,d){try{var f;if(!(f=this.Na[b])){var g=this.Na,e,m="with($context){with($data||{}){return{"+a.g.ea(b)+"}}}";e=new Function("$context","$element",m);
f=g[b]=e}return f(c,d)}catch(h){throw h.message="Unable to parse bindings.\nBindings value: "+b+"\nMessage: "+h.message,h;}}});a.M.instance=new a.M})();a.b("bindingProvider",a.M);(function(){function b(b,e,d){for(var f=a.e.firstChild(e);e=f;)f=a.e.nextSibling(e),c(b,e,d)}function c(c,e,f){var h=!0,k=1===e.nodeType;k&&a.e.Za(e);if(k&&f||a.M.instance.nodeHasBindings(e))h=d(e,null,c,f).Sb;h&&b(c,e,!k)}function d(b,c,d,h){function k(a){return function(){return p[a]}}function l(){return p}var n=0,p,r,
z=a.a.f.get(b,f);if(!c){if(z)throw Error("You cannot apply bindings multiple times to the same element.");a.a.f.set(b,f,!0)}a.j(function(){var f=d&&d instanceof a.A?d:new a.A(a.a.c(d)),x=f.$data;!z&&h&&a.jb(b,f);if(p=("function"==typeof c?c(f,b):c)||a.M.instance.getBindings(b,f))0===n&&(n=1,a.a.w(p,function(c){var e=a.d[c];if(e&&8===b.nodeType&&!a.e.L[c])throw Error("The binding '"+c+"' cannot be used with virtual elements");if(e&&"function"==typeof e.init&&(e=(0,e.init)(b,k(c),l,x,f))&&e.controlsDescendantBindings){if(r!==
q)throw Error("Multiple bindings ("+r+" and "+c+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");r=c}}),n=2),2===n&&a.a.w(p,function(c){var e=a.d[c];e&&"function"==typeof e.update&&(0,e.update)(b,k(c),l,x,f)})},null,{$:b});return{Sb:r===q}}a.d={};a.A=function(b,c,d){c?(a.a.extend(this,c),this.$parentContext=c,this.$parent=c.$data,this.$parents=(c.$parents||[]).slice(0),this.$parents.unshift(this.$parent)):(this.$parents=
[],this.$root=b,this.ko=a);this.$data=b;d&&(this[d]=b)};a.A.prototype.createChildContext=function(b,c){return new a.A(b,this,c)};a.A.prototype.extend=function(b){var c=a.a.extend(new a.A,this);return a.a.extend(c,b)};var f="__ko_boundElement";a.jb=function(b,c){if(2==arguments.length)a.a.f.set(b,"__ko_bindingContext__",c);else return a.a.f.get(b,"__ko_bindingContext__")};a.Ka=function(b,c,f){1===b.nodeType&&a.e.Za(b);return d(b,c,f,!0)};a.Ja=function(a,c){1!==c.nodeType&&8!==c.nodeType||b(a,c,!0)};
a.Ia=function(a,b){if(b&&1!==b.nodeType&&8!==b.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");b=b||w.document.body;c(a,b,!0)};a.na=function(b){switch(b.nodeType){case 1:case 8:var c=a.jb(b);if(c)return c;if(b.parentNode)return a.na(b.parentNode)}return q};a.ub=function(b){return(b=a.na(b))?b.$data:q};a.b("bindingHandlers",a.d);a.b("applyBindings",a.Ia);a.b("applyBindingsToDescendants",a.Ja);a.b("applyBindingsToNode",a.Ka);
a.b("contextFor",a.na);a.b("dataFor",a.ub)})();var K={"class":"className","for":"htmlFor"};a.d.attr={update:function(b,c){var d=a.a.c(c())||{};a.a.w(d,function(c,d){d=a.a.c(d);var e=!1===d||null===d||d===q;e&&b.removeAttribute(c);8>=a.a.ca&&c in K?(c=K[c],e?b.removeAttribute(c):b[c]=d):e||b.setAttribute(c,d.toString());"name"===c&&a.a.gb(b,e?"":d.toString())})}};a.d.checked={init:function(b,c,d){a.a.o(b,"click",function(){var f;if("checkbox"==b.type)f=b.checked;else if("radio"==b.type&&b.checked)f=
b.value;else return;var g=c(),e=a.a.c(g);"checkbox"==b.type&&e instanceof Array?a.a.ja(g,b.value,b.checked):a.g.ha(g,d,"checked",f,!0)});"radio"!=b.type||b.name||a.d.uniqueName.init(b,F(!0))},update:function(b,c){var d=a.a.c(c());"checkbox"==b.type?b.checked=d instanceof Array?0<=a.a.k(d,b.value):d:"radio"==b.type&&(b.checked=b.value==d)}};a.d.css={update:function(b,c){var d=a.a.c(c());"object"==typeof d?a.a.w(d,function(c,d){d=a.a.c(d);a.a.ga(b,c,d)}):(d=String(d||""),a.a.ga(b,b.__ko__cssValue,!1),
b.__ko__cssValue=d,a.a.ga(b,d,!0))}};a.d.enable={update:function(b,c){var d=a.a.c(c());d&&b.disabled?b.removeAttribute("disabled"):d||b.disabled||(b.disabled=!0)}};a.d.disable={update:function(b,c){a.d.enable.update(b,function(){return!a.a.c(c())})}};a.d.event={init:function(b,c,d,f){var g=c()||{};a.a.w(g,function(e){"string"==typeof e&&a.a.o(b,e,function(b){var g,k=c()[e];if(k){var l=d();try{var n=a.a.N(arguments);n.unshift(f);g=k.apply(f,n)}finally{!0!==g&&(b.preventDefault?b.preventDefault():b.returnValue=
!1)}!1===l[e+"Bubble"]&&(b.cancelBubble=!0,b.stopPropagation&&b.stopPropagation())}})})}};a.d.foreach={Ya:function(b){return function(){var c=b(),d=a.a.ya(c);if(!d||"number"==typeof d.length)return{foreach:c,templateEngine:a.D.sa};a.a.c(c);return{foreach:d.data,as:d.as,includeDestroyed:d.includeDestroyed,afterAdd:d.afterAdd,beforeRemove:d.beforeRemove,afterRender:d.afterRender,beforeMove:d.beforeMove,afterMove:d.afterMove,templateEngine:a.D.sa}}},init:function(b,c){return a.d.template.init(b,a.d.foreach.Ya(c))},
update:function(b,c,d,f,g){return a.d.template.update(b,a.d.foreach.Ya(c),d,f,g)}};a.g.S.foreach=!1;a.e.L.foreach=!0;a.d.hasfocus={init:function(b,c,d){function f(e){b.__ko_hasfocusUpdating=!0;var f=b.ownerDocument;if("activeElement"in f){var g;try{g=f.activeElement}catch(l){g=f.body}e=g===b}f=c();a.g.ha(f,d,"hasfocus",e,!0);b.__ko_hasfocusLastValue=e;b.__ko_hasfocusUpdating=!1}var g=f.bind(null,!0),e=f.bind(null,!1);a.a.o(b,"focus",g);a.a.o(b,"focusin",g);a.a.o(b,"blur",e);a.a.o(b,"focusout",e)},
update:function(b,c){var d=!!a.a.c(c());b.__ko_hasfocusUpdating||b.__ko_hasfocusLastValue===d||(d?b.focus():b.blur(),a.q.I(a.a.Ga,null,[b,d?"focusin":"focusout"]))}};a.d.hasFocus=a.d.hasfocus;a.d.html={init:function(){return{controlsDescendantBindings:!0}},update:function(b,c){a.a.fa(b,c())}};var I="__ko_withIfBindingData";G("if");G("ifnot",!1,!0);G("with",!0,!1,function(a,c){return a.createChildContext(c)});a.d.options={init:function(b){if("select"!==a.a.u(b))throw Error("options binding applies only to SELECT elements");
for(;0<b.length;)b.remove(0);return{controlsDescendantBindings:!0}},update:function(b,c,d){function f(a,b,c){var d=typeof b;return"function"==d?b(a):"string"==d?a[b]:c}function g(b,c){if(p){var d=0<=a.a.k(p,a.h.n(c[0]));a.a.hb(c[0],d)}}var e=0==b.length,m=!e&&b.multiple?b.scrollTop:null;c=a.a.c(c());var h=d(),k=h.optionsIncludeDestroyed,l={},n,p;b.multiple?p=a.a.Z(b.selectedOptions||a.a.Y(b.childNodes,function(b){return b.tagName&&"option"===a.a.u(b)&&b.selected}),function(b){return a.h.n(b)}):0<=
b.selectedIndex&&(p=[a.h.n(b.options[b.selectedIndex])]);if(c){"undefined"==typeof c.length&&(c=[c]);var r=a.a.Y(c,function(b){return k||b===q||null===b||!a.a.c(b._destroy)});"optionsCaption"in h&&(n=a.a.c(h.optionsCaption),null!==n&&n!==q&&r.unshift(l))}else c=[];d=g;h.optionsAfterRender&&(d=function(b,c){g(0,c);a.q.I(h.optionsAfterRender,null,[c[0],b!==l?b:q])});a.a.Aa(b,r,function(b,c,d){d.length&&(p=d[0].selected&&[a.h.n(d[0])]);c=s.createElement("option");b===l?(a.a.fa(c,n),a.h.W(c,q)):(d=f(b,
h.optionsValue,b),a.h.W(c,a.a.c(d)),b=f(b,h.optionsText,d),a.a.ib(c,b));return[c]},null,d);p=null;e&&"value"in h&&J(b,a.a.ya(h.value),!0);a.a.zb(b);m&&20<Math.abs(m-b.scrollTop)&&(b.scrollTop=m)}};a.d.options.wa="__ko.optionValueDomData__";a.d.selectedOptions={init:function(b,c,d){a.a.o(b,"change",function(){var f=c(),g=[];a.a.p(b.getElementsByTagName("option"),function(b){b.selected&&g.push(a.h.n(b))});a.g.ha(f,d,"selectedOptions",g)})},update:function(b,c){if("select"!=a.a.u(b))throw Error("values binding applies only to SELECT elements");
var d=a.a.c(c());d&&"number"==typeof d.length&&a.a.p(b.getElementsByTagName("option"),function(b){var c=0<=a.a.k(d,a.h.n(b));a.a.hb(b,c)})}};a.d.style={update:function(b,c){var d=a.a.c(c()||{});a.a.w(d,function(c,d){d=a.a.c(d);b.style[c]=d||""})}};a.d.submit={init:function(b,c,d,f){if("function"!=typeof c())throw Error("The value for a submit binding must be a function");a.a.o(b,"submit",function(a){var d,m=c();try{d=m.call(f,b)}finally{!0!==d&&(a.preventDefault?a.preventDefault():a.returnValue=!1)}})}};
a.d.text={update:function(b,c){a.a.ib(b,c())}};a.e.L.text=!0;a.d.uniqueName={init:function(b,c){if(c()){var d="ko_unique_"+ ++a.d.uniqueName.tb;a.a.gb(b,d)}}};a.d.uniqueName.tb=0;a.d.value={init:function(b,c,d){function f(){m=!1;var e=c(),f=a.h.n(b);a.g.ha(e,d,"value",f)}var g=["change"],e=d().valueUpdate,m=!1;e&&("string"==typeof e&&(e=[e]),a.a.R(g,e),g=a.a.Ma(g));!a.a.ca||("input"!=b.tagName.toLowerCase()||"text"!=b.type||"off"==b.autocomplete||b.form&&"off"==b.form.autocomplete)||-1!=a.a.k(g,"propertychange")||
(a.a.o(b,"propertychange",function(){m=!0}),a.a.o(b,"blur",function(){m&&f()}));a.a.p(g,function(c){var d=f;a.a.Tb(c,"after")&&(d=function(){setTimeout(f,0)},c=c.substring(5));a.a.o(b,c,d)})},update:function(b,c){var d="select"===a.a.u(b),f=a.a.c(c()),g=a.h.n(b);f!==g&&(g=function(){a.h.W(b,f)},g(),d&&setTimeout(g,0));d&&0<b.length&&J(b,f,!1)}};a.d.visible={update:function(b,c){var d=a.a.c(c()),f="none"!=b.style.display;d&&!f?b.style.display="":!d&&f&&(b.style.display="none")}};(function(b){a.d[b]=
{init:function(c,d,f,g){return a.d.event.init.call(this,c,function(){var a={};a[b]=d();return a},f,g)}}})("click");a.v=function(){};a.v.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource");};a.v.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock");};a.v.prototype.makeTemplateSource=function(b,c){if("string"==typeof b){c=c||s;var d=c.getElementById(b);if(!d)throw Error("Cannot find template with ID "+b);return new a.l.i(d)}if(1==
b.nodeType||8==b.nodeType)return new a.l.Q(b);throw Error("Unknown template type: "+b);};a.v.prototype.renderTemplate=function(a,c,d,f){a=this.makeTemplateSource(a,f);return this.renderTemplateSource(a,c,d)};a.v.prototype.isTemplateRewritten=function(a,c){return!1===this.allowTemplateRewriting?!0:this.makeTemplateSource(a,c).data("isRewritten")};a.v.prototype.rewriteTemplate=function(a,c,d){a=this.makeTemplateSource(a,d);c=c(a.text());a.text(c);a.data("isRewritten",!0)};a.b("templateEngine",a.v);
a.Ea=function(){function b(b,c,d,m){b=a.g.da(b);for(var h=a.g.S,k=0;k<b.length;k++){var l=b[k].key;if(h.hasOwnProperty(l)){var n=h[l];if("function"===typeof n){if(l=n(b[k].value))throw Error(l);}else if(!n)throw Error("This template engine does not support the '"+l+"' binding within its templates");}}d="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+a.g.ea(b)+" } })()},'"+d.toLowerCase()+"')";return m.createJavaScriptEvaluatorBlock(d)+c}var c=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,
d=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{Ab:function(b,c,d){c.isTemplateRewritten(b,d)||c.rewriteTemplate(b,function(b){return a.Ea.Lb(b,c)},d)},Lb:function(a,g){return a.replace(c,function(a,c,d,f,l){return b(l,c,d,g)}).replace(d,function(a,c){return b(c,"\x3c!-- ko --\x3e","#comment",g)})},qb:function(b,c){return a.s.va(function(d,m){var h=d.nextSibling;h&&h.nodeName.toLowerCase()===c&&a.Ka(h,b,m)})}}}();a.b("__tr_ambtns",a.Ea.qb);(function(){a.l={};a.l.i=function(a){this.i=a};a.l.i.prototype.text=
function(){var b=a.a.u(this.i),b="script"===b?"text":"textarea"===b?"value":"innerHTML";if(0==arguments.length)return this.i[b];var c=arguments[0];"innerHTML"===b?a.a.fa(this.i,c):this.i[b]=c};a.l.i.prototype.data=function(b){if(1===arguments.length)return a.a.f.get(this.i,"templateSourceData_"+b);a.a.f.set(this.i,"templateSourceData_"+b,arguments[1])};a.l.Q=function(a){this.i=a};a.l.Q.prototype=new a.l.i;a.l.Q.prototype.text=function(){if(0==arguments.length){var b=a.a.f.get(this.i,"__ko_anon_template__")||
{};b.Fa===q&&b.ma&&(b.Fa=b.ma.innerHTML);return b.Fa}a.a.f.set(this.i,"__ko_anon_template__",{Fa:arguments[0]})};a.l.i.prototype.nodes=function(){if(0==arguments.length)return(a.a.f.get(this.i,"__ko_anon_template__")||{}).ma;a.a.f.set(this.i,"__ko_anon_template__",{ma:arguments[0]})};a.b("templateSources",a.l);a.b("templateSources.domElement",a.l.i);a.b("templateSources.anonymousTemplate",a.l.Q)})();(function(){function b(b,c,d){var f;for(c=a.e.nextSibling(c);b&&(f=b)!==c;)b=a.e.nextSibling(f),1!==
f.nodeType&&8!==f.nodeType||d(f)}function c(c,d){if(c.length){var f=c[0],g=c[c.length-1];b(f,g,function(b){a.Ia(d,b)});b(f,g,function(b){a.s.nb(b,[d])})}}function d(a){return a.nodeType?a:0<a.length?a[0]:null}function f(b,f,h,k,l){l=l||{};var n=b&&d(b),n=n&&n.ownerDocument,p=l.templateEngine||g;a.Ea.Ab(h,p,n);h=p.renderTemplate(h,k,l,n);if("number"!=typeof h.length||0<h.length&&"number"!=typeof h[0].nodeType)throw Error("Template engine must return an array of DOM nodes");n=!1;switch(f){case "replaceChildren":a.e.P(b,
h);n=!0;break;case "replaceNode":a.a.eb(b,h);n=!0;break;case "ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+f);}n&&(c(h,k),l.afterRender&&a.q.I(l.afterRender,null,[h,k.$data]));return h}var g;a.Ba=function(b){if(b!=q&&!(b instanceof a.v))throw Error("templateEngine must inherit from ko.templateEngine");g=b};a.za=function(b,c,h,k,l){h=h||{};if((h.templateEngine||g)==q)throw Error("Set a template engine before calling renderTemplate");l=l||"replaceChildren";if(k){var n=d(k);return a.j(function(){var g=
c&&c instanceof a.A?c:new a.A(a.a.c(c)),r="function"==typeof b?b(g.$data,g):b,g=f(k,l,r,g,h);"replaceNode"==l&&(k=g,n=d(k))},null,{Qa:function(){return!n||!a.a.aa(n)},$:n&&"replaceNode"==l?n.parentNode:n})}return a.s.va(function(d){a.za(b,c,h,d,"replaceNode")})};a.Rb=function(b,d,g,k,l){function n(a,b){c(b,r);g.afterRender&&g.afterRender(b,a)}function p(c,d){r=l.createChildContext(a.a.c(c),g.as);r.$index=d;var k="function"==typeof b?b(c,r):b;return f(null,"ignoreTargetNode",k,r,g)}var r;return a.j(function(){var b=
a.a.c(d)||[];"undefined"==typeof b.length&&(b=[b]);b=a.a.Y(b,function(b){return g.includeDestroyed||b===q||null===b||!a.a.c(b._destroy)});a.q.I(a.a.Aa,null,[k,b,p,g,n])},null,{$:k})};a.d.template={init:function(b,c){var d=a.a.c(c());"string"==typeof d||(d.name||1!=b.nodeType&&8!=b.nodeType)||(d=1==b.nodeType?b.childNodes:a.e.childNodes(b),d=a.a.Mb(d),(new a.l.Q(b)).nodes(d));return{controlsDescendantBindings:!0}},update:function(b,c,d,f,g){c=a.a.c(c());d={};f=!0;var n,p=null;"string"!=typeof c&&(d=
c,c=a.a.c(d.name),"if"in d&&(f=a.a.c(d["if"])),f&&"ifnot"in d&&(f=!a.a.c(d.ifnot)),n=a.a.c(d.data));"foreach"in d?p=a.Rb(c||b,f&&d.foreach||[],d,b,g):f?(g="data"in d?g.createChildContext(n,d.as):g,p=a.za(c||b,g,d,b)):a.e.ba(b);g=p;(n=a.a.f.get(b,"__ko__templateComputedDomDataKey__"))&&"function"==typeof n.B&&n.B();a.a.f.set(b,"__ko__templateComputedDomDataKey__",g&&g.ta()?g:q)}};a.g.S.template=function(b){b=a.g.da(b);return 1==b.length&&b[0].unknown||a.g.Jb(b,"name")?null:"This template engine does not support anonymous templates nested within its templates"};
a.e.L.template=!0})();a.b("setTemplateEngine",a.Ba);a.b("renderTemplate",a.za);a.a.Pa=function(){function a(b,d,f,g,e){var m=Math.min,h=Math.max,k=[],l,n=b.length,p,r=d.length,q=r-n||1,t=n+r+1,s,v,w;for(l=0;l<=n;l++)for(v=s,k.push(s=[]),w=m(r,l+q),p=h(0,l-1);p<=w;p++)s[p]=p?l?b[l-1]===d[p-1]?v[p-1]:m(v[p]||t,s[p-1]||t)+1:p+1:l+1;m=[];h=[];q=[];l=n;for(p=r;l||p;)r=k[l][p]-1,p&&r===k[l][p-1]?h.push(m[m.length]={status:f,value:d[--p],index:p}):l&&r===k[l-1][p]?q.push(m[m.length]={status:g,value:b[--l],
index:l}):(m.push({status:"retained",value:d[--p]}),--l);if(h.length&&q.length){b=10*n;var E;for(d=f=0;(e||d<b)&&(E=h[f]);f++){for(g=0;k=q[g];g++)if(E.value===k.value){E.moved=k.index;k.moved=E.index;q.splice(g,1);d=g=0;break}d+=g}}return m.reverse()}return function(c,d,f){c=c||[];d=d||[];return c.length<=d.length?a(c,d,"added","deleted",f):a(d,c,"deleted","added",f)}}();a.b("utils.compareArrays",a.a.Pa);(function(){function b(b){for(;b.length&&!a.a.aa(b[0]);)b.splice(0,1);if(1<b.length){for(var c=
b[0],g=b[b.length-1],e=[c];c!==g;){c=c.nextSibling;if(!c)return;e.push(c)}Array.prototype.splice.apply(b,[0,b.length].concat(e))}return b}function c(c,f,g,e,m){var h=[];c=a.j(function(){var c=f(g,m,b(h))||[];0<h.length&&(a.a.eb(h,c),e&&a.q.I(e,null,[g,c,m]));h.splice(0,h.length);a.a.R(h,c)},null,{$:c,Qa:function(){return!a.a.pb(h)}});return{O:h,j:c.ta()?c:q}}a.a.Aa=function(d,f,g,e,m){function h(a,c){u=n[c];x!==c&&(E[a]=u);u.ra(x++);b(u.O);t.push(u);w.push(u)}function k(b,c){if(b)for(var d=0,e=c.length;d<
e;d++)c[d]&&a.a.p(c[d].O,function(a){b(a,d,c[d].X)})}f=f||[];e=e||{};var l=a.a.f.get(d,"setDomNodeChildrenFromArrayMapping_lastMappingResult")===q,n=a.a.f.get(d,"setDomNodeChildrenFromArrayMapping_lastMappingResult")||[],p=a.a.Z(n,function(a){return a.X}),r=a.a.Pa(p,f,e.dontLimitMoves),t=[],s=0,x=0,v=[],w=[];f=[];for(var E=[],p=[],u,B=0,y,A;y=r[B];B++)switch(A=y.moved,y.status){case "deleted":A===q&&(u=n[s],u.j&&u.j.B(),v.push.apply(v,b(u.O)),e.beforeRemove&&(f[B]=u,w.push(u)));s++;break;case "retained":h(B,
s++);break;case "added":A!==q?h(B,A):(u={X:y.value,ra:a.m(x++)},t.push(u),w.push(u),l||(p[B]=u))}k(e.beforeMove,E);a.a.p(v,e.beforeRemove?a.H:a.removeNode);for(var B=0,l=a.e.firstChild(d),C;u=w[B];B++){u.O||a.a.extend(u,c(d,g,u.X,m,u.ra));for(s=0;r=u.O[s];l=r.nextSibling,C=r,s++)r!==l&&a.e.Va(d,r,C);!u.Fb&&m&&(m(u.X,u.O,u.ra),u.Fb=!0)}k(e.beforeRemove,f);k(e.afterMove,E);k(e.afterAdd,p);a.a.f.set(d,"setDomNodeChildrenFromArrayMapping_lastMappingResult",t)}})();a.b("utils.setDomNodeChildrenFromArrayMapping",
a.a.Aa);a.D=function(){this.allowTemplateRewriting=!1};a.D.prototype=new a.v;a.D.prototype.renderTemplateSource=function(b){var c=(9>a.a.ca?0:b.nodes)?b.nodes():null;if(c)return a.a.N(c.cloneNode(!0).childNodes);b=b.text();return a.a.xa(b)};a.D.sa=new a.D;a.Ba(a.D.sa);a.b("nativeTemplateEngine",a.D);(function(){a.ua=function(){var a=this.Ib=function(){if("undefined"==typeof t||!t.tmpl)return 0;try{if(0<=t.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(a){}return 1}();this.renderTemplateSource=
function(b,f,g){g=g||{};if(2>a)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var e=b.data("precompiled");e||(e=b.text()||"",e=t.template(null,"{{ko_with $item.koBindingContext}}"+e+"{{/ko_with}}"),b.data("precompiled",e));b=[f.$data];f=t.extend({koBindingContext:f},g.templateOptions);f=t.tmpl(e,b,f);f.appendTo(s.createElement("div"));t.fragments={};return f};this.createJavaScriptEvaluatorBlock=function(a){return"{{ko_code ((function() { return "+
a+" })()) }}"};this.addTemplate=function(a,b){s.write("<script type='text/html' id='"+a+"'>"+b+"\x3c/script>")};0<a&&(t.tmpl.tag.ko_code={open:"__.push($1 || '');"},t.tmpl.tag.ko_with={open:"with($1) {",close:"} "})};a.ua.prototype=new a.v;var b=new a.ua;0<b.Ib&&a.Ba(b);a.b("jqueryTmplTemplateEngine",a.ua)})()})})();
})();

@@ -5,6 +5,10 @@ {

"url": "http://knockoutjs.com/",
"version": "2.2.1",
"version": "2.3.0",
"license": "MIT",
"author": "The Knockout.js team",
"main": "build/output/knockout-latest.debug.js",
"scripts": {
"prepublish": "bash build/build.sh",
"test": "node spec/runner.node.js"
},
"repository": {

@@ -14,3 +18,16 @@ "type": "git",

},
"bugs": "https://github.com/SteveSanderson/knockout/issues"
"bugs": "https://github.com/SteveSanderson/knockout/issues",
"testling": {
"preprocess": "build/build.sh",
"html": "spec/runner.html?src=build/output/knockout-latest.js",
"browsers": [
"ie/6..latest",
"chrome/20..latest",
"firefox/3..latest",
"safari/5.0.5..latest",
"opera/11.0..latest",
"iphone/6..latest",
"ipad/6..latest"
]
}
}

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc