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