Socket
Socket
Sign inDemoInstall

knockout

Package Overview
Dependencies
Maintainers
3
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

knockout - npm Package Compare versions

Comparing version 2.2.1 to 2.3.0-rc

165

build/output/knockout-latest.js

@@ -1,86 +0,87 @@

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

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

"url": "http://knockoutjs.com/",
"version": "2.2.1",
"version": "2.3.0rc",
"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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc