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