(function(){(function(n){var r=this||eval("this"),i=r.document,f=r.navigator,t=r.jQuery,u=r.JSON;t||"undefined"==typeof jQuery||(t=jQuery),function(n){"function"==typeof define&&define.amd?define(["exports","require"],n):"object"==typeof exports&&"object"==typeof module?n(module.exports||exports):n(r.ko={})}(function(e,o){function b(n,t){return null===n||typeof n in d?n===t:!1}function g(t,i){var r;return function(){r||(r=s.a.setTimeout(function(){r=n;t()},i))}}function nt(n,t){var i;return function(){clearTimeout(i);i=s.a.setTimeout(n,t)}}function tt(n,t){t&&"change"!==t?"beforeChange"===t?this.pc(n):this.gb(n,t):this.qc(n)}function it(n,t){null!==t&&t.s&&t.s()}function rt(n,t){var i=this.qd,r=i[h];r.ra||(this.Qb&&this.mb[t]?(i.uc(t,n,this.mb[t]),this.mb[t]=null,--this.Qb):r.I[t]||i.uc(t,n,r.J?{da:n}:i.$c(n)),n.Ja&&n.gd())}var s="undefined"!=typeof e?e:{},d,l,v,a,y,h,p,k,w;s.b=function(n,t){for(var i=n.split("."),r=s,u=0;u<\/i>",u[0];);return 4s.a.A(t,n)&&t.push(n)}),t},Mb:function(n,t,i){var u=[],r,f;if(n)for(r=0,f=n.length;rr?i&&n.push(t):i||n.splice(r,1)},Ba:w,extend:v,setPrototypeOf:y,Ab:w?y:v,P:o,Ga:function(n,t,i){if(!n)return n;var u={};for(var r in n)h.call(n,r)&&(u[r]=t.call(i,n[r],r,n));return u},Tb:function(n){for(;n.firstChild;)s.removeNode(n.firstChild)},Yb:function(n){n=s.a.la(n);for(var r=(n[0]&&n[0].ownerDocument||i).createElement("div"),t=0,u=n.length;te?n.setAttribute("selected",t):n.selected=t},Db:function(t){return null===t||t===n?"":t.trim?t.trim():t.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Ud:function(n,t){return n=n||"",t.length>n.length?!1:n.substring(0,t.length)===t},vd:function(n,t){if(n===t)return!0;if(11===n.nodeType)return!1;if(t.contains)return t.contains(1!==n.nodeType?n.parentNode:n);if(t.compareDocumentPosition)return 16==(t.compareDocumentPosition(n)&16);for(;n&&n!=t;)n=n.parentNode;return!!n},Sb:function(n){return s.a.vd(n,n.ownerDocument.documentElement)},kd:function(n){return!!s.a.Lb(n,s.a.Sb)},R:function(n){return n&&n.tagName&&n.tagName.toLowerCase()},Ac:function(n){return s.onError?function(){try{return n.apply(this,arguments)}catch(t){throw s.onError&&s.onError(t),t;}}:n},setTimeout:function(n,t){return setTimeout(s.a.Ac(n),t)},Gc:function(n){setTimeout(function(){s.onError&&s.onError(n);throw n;},0)},B:function(n,i,r){var u=s.a.Ac(r),f,e;if(r=d[i],s.options.useOnlyNativeEvents||r||!t)if(r||"function"!=typeof n.addEventListener)if("undefined"!=typeof n.attachEvent)f=function(t){u.call(n,t)},e="on"+i,n.attachEvent(e,f),s.a.K.za(n,function(){n.detachEvent(e,f)});else throw Error("Browser doesn't support addEventListener or attachEvent");else n.addEventListener(i,u,!1);else a||(a="function"==typeof t(n).on?"on":"bind"),t(n)[a](i,u)},Fb:function(n,u){if(!n||!n.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var f;if("input"===s.a.R(n)&&n.type&&"click"==u.toLowerCase()?(f=n.type,f="checkbox"==f||"radio"==f):f=!1,s.options.useOnlyNativeEvents||!t||f)if("function"==typeof i.createEvent)if("function"==typeof n.dispatchEvent)f=i.createEvent(b[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");else t(n).trigger(u)},f:function(n){return s.O(n)?n():n},bc:function(n){return s.O(n)?n.v():n},Eb:function(n,t,i){var r;t&&("object"==typeof n.classList?(r=n.classList[i?"add":"remove"],s.a.D(t.match(l),function(t){r.call(n.classList,t)})):"string"==typeof n.className.baseVal?p(n.className,"baseVal",t,i):p(n,"className",t,i))},Bb:function(t,i){var r=s.a.f(i),u;(null===r||r===n)&&(r="");u=s.h.firstChild(t);!u||3!=u.nodeType||s.h.nextSibling(u)?s.h.va(t,[t.ownerDocument.createTextNode(r)]):u.data=r;s.a.Ad(t)},Yc:function(n,t){if(n.name=t,7>=e)try{var r=n.name.replace(/[&<>'"]/g,function(n){return"&#"+n.charCodeAt(0)+";"});n.mergeAttributes(i.createElement(""),!1)}catch(u){}},Ad:function(n){9<=e&&(n=1==n.nodeType?n:n.parentNode,n.style&&(n.style.zoom=n.style.zoom))},wd:function(n){if(e){var t=n.style.width;n.style.width=0;n.style.width=t}},Pd:function(n,t){n=s.a.f(n);t=s.a.f(t);for(var r=[],i=n;i<=t;i++)r.push(i);return r},la:function(n){for(var i=[],t=0,r=n.length;t","<\/table>"],f=[3,"","<\/tr><\/tbody><\/table>"],e=[1,"
","<\/tbody><\/table>"],td:f,th:f,option:e,optgroup:e},o=8>=s.a.W;s.a.ua=function(n,u){var f,e;if(t){if(t.parseHTML)f=t.parseHTML(n,u)||[];else if((f=t.clean([n],u))&&f[0]){for(e=f[0];e.parentNode&&11!==e.parentNode.nodeType;)e=e.parentNode;e.parentNode&&e.parentNode.removeChild(e)}}else{(f=u)||(f=i);var e=f.parentWindow||f.defaultView||r,v=s.a.Db(n).toLowerCase(),l=f.createElement("div"),a;for(a=(v=v.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&c[v[1]]||h,v=a[0],a="ignored
"+a[1]+n+a[2]+"<\/div>","function"==typeof e.innerShiv?l.appendChild(e.innerShiv(a)):(o&&f.body.appendChild(l),l.innerHTML=a,o&&l.parentNode.removeChild(l));v--;)l=l.lastChild;f=s.a.la(l.lastChild.childNodes)}return f};s.a.Md=function(n,t){var i=s.a.ua(n,t);return i.length&&i[0].parentElement||s.a.Yb(i)};s.a.fc=function(i,r){if(s.a.Tb(i),r=s.a.f(r),null!==r&&r!==n)if("string"!=typeof r&&(r=r.toString()),t)t(i).html(r);else for(var f=s.a.ua(r,i.ownerDocument),u=0;u"},bd: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]}},cd:function(n,t){var f=[],u,o,r,e;for(i(n,f),u=0,o=f.length;ui){if(5e3<=++r){t=n;s.a.Gc(Error("'Too much recursion' after processing "+r+" task groups."));break}i=n}try{f()}catch(e){s.a.Gc(e)}}}function e(){f();t=n=u.length=0}var o,u=[],n=0,h=1,t=0;return o=r.MutationObserver?function(n){var t=i.createElement("div");return new MutationObserver(n).observe(t,{attributes:!0}),function(){t.classList.toggle("foo")}}(e):i&&"onreadystatechange"in i.createElement("script")?function(n){var t=i.createElement("script");t.onreadystatechange=function(){t.onreadystatechange=null;i.documentElement.removeChild(t);t=null;n()};i.documentElement.appendChild(t)}:function(n){setTimeout(n,0)},{scheduler:o,zb:function(t){return n||s.na.scheduler(e),u[n++]=t,h++},cancel:function(i){i=i-(h-n);i>=t&&ii[0]?e+i[0]:i[0]),e);for(var e=1===h?e:Math.min(t+(i[1]||0),e),h=t+h-2,o=Math.max(e,h),a=[],v=[],y=2;tt;t++)n=n();return n})};s.toJSON=function(n,t,i){return n=s.ad(n),s.a.hc(n,t,i)};t.prototype={constructor:t,save:function(n,t){var i=s.a.A(this.keys,n);0<=i?this.values[i]=t:(this.keys.push(n),this.values.push(t))},get:function(t){return t=s.a.A(this.keys,t),0<=t?this.values[t]:n}}}();s.b("toJS",s.ad);s.b("toJSON",s.toJSON);s.Wd=function(n,t,i){function r(t){var r=s.xb(n,i).extend({ma:"always"}),u=r.subscribe(function(n){n&&(u.s(),t(n))});return r.notifySubscribers(r.v()),u}return"function"!=typeof Promise||t?r(t.bind(i)):new Promise(r)};s.b("when",s.Wd),function(){s.w={M:function(t){switch(s.a.R(t)){case"option":return!0===t.__ko__hasDomDataOptionValue__?s.a.g.get(t,s.c.options.$b):7>=s.a.W?t.getAttributeNode("value")&&t.getAttributeNode("value").specified?t.value:t.text:t.value;case"select":return 0<=t.selectedIndex?s.w.M(t.options[t.selectedIndex]):n;default:return t.value}},cb:function(t,i,r){switch(s.a.R(t)){case"option":"string"==typeof i?(s.a.g.set(t,s.c.options.$b,n),"__ko__hasDomDataOptionValue__"in t&&delete t.__ko__hasDomDataOptionValue__,t.value=i):(s.a.g.set(t,s.c.options.$b,i),t.__ko__hasDomDataOptionValue__=!0,t.value="number"==typeof i?i:"");break;case"select":(""===i||null===i)&&(i=n);for(var u=-1,f=0,o=t.options.length,e;f=h){a.push(o&&u.length?{key:o,value:u.join("")}:{unknown:o||u.join("")});o=h=0;u=[];continue}}else if(58===t){if(!h&&!o&&1===u.length){o=u.pop();continue}}else if(47===t&&1"===i.createComment("test").text,e=r?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,h=r?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,c={ul:!0,ol:!0},o="__ko_matchedEndComment__";s.h={ea:{},childNodes:function(t){return n(t)?u(t):t.childNodes},Ea:function(t){if(n(t)){t=s.h.childNodes(t);for(var i=0,r=t.length;iarguments.length){if(u=i.body,!u)throw Error("ko.applyBindings: could not find document.body; has the document been loaded?");}else if(!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");w(h(n,f),u)};s.Dc=function(t){return!t||1!==t.nodeType&&8!==t.nodeType?n:s.Td(t)};s.Ec=function(t){return(t=s.Dc(t))?t.$data:n};s.b("bindingHandlers",s.c);s.b("bindingEvent",s.i);s.b("bindingEvent.subscribe",s.i.subscribe);s.b("bindingEvent.startPossiblyAsyncContentBinding",s.i.Cb);s.b("applyBindings",s.vc);s.b("applyBindingsToDescendants",s.Oa);s.b("applyBindingAccessorsToNode",s.ib);s.b("applyBindingsToNode",s.ld);s.b("contextFor",s.Dc);s.b("dataFor",s.Ec)}(),function(n){function u(t,u){var e=Object.prototype.hasOwnProperty.call(i,t)?i[t]:n,o;e?e.subscribe(u):(e=i[t]=new s.T,e.subscribe(u),f(t,function(n,u){var f=!(!u||!u.synchronous);r[t]={definition:n,Gd:f};delete i[t];o||f?e.notifySubscribers(n):s.na.zb(function(){e.notifySubscribers(n)})}),o=!0)}function f(n,i){t("getConfig",[n],function(r){r?t("loadComponent",[n,r],function(n){i(n,r)}):i(null,null)})}function t(i,r,u,f){var e,o,h;if(f||(f=s.j.loaders.slice(0)),e=f.shift(),e)if(o=e[i],o){if(h=!1,o.apply(e,r.concat(function(n){h?u(null):null!==n?u(n):t(i,r,u,f)}))!==n&&(h=!0,!e.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.");}else t(i,r,u,f);else u(null)}var i={},r={};s.j={get:function(t,i){var f=Object.prototype.hasOwnProperty.call(r,t)?r[t]:n;f?f.Gd?s.u.G(function(){i(f.definition)}):s.na.zb(function(){i(f.definition)}):u(t,i)},Bc:function(n){delete r[n]},oc:t};s.j.loaders=[];s.b("components",s.j);s.b("components.get",s.j.get);s.b("components.clearCachedDefinition",s.j.Bc)}(),function(){function l(n,i,r,f){function e(){0==--c&&f(o)}var o={},c=2,h=r.template;r=r.viewModel;h?u(i,h,function(t){s.j.oc("loadTemplate",[n,t],function(n){o.template=n;e()})}):e();r?u(i,r,function(i){s.j.oc("loadViewModel",[n,i],function(n){o[t]=n;e()})}):e()}function e(n,i,r){if("function"==typeof i)r(function(n){return new i(n)});else if("function"==typeof i[t])r(i[t]);else if("instance"in i){var u=i.instance;r(function(){return u})}else"viewModel"in i?e(n,i.viewModel,r):n("Unknown viewModel value: "+i)}function h(n){switch(s.a.R(n)){case"script":return s.a.ua(n.text);case"textarea":return s.a.ua(n.value);case"template":if(c(n.content))return s.a.Ca(n.content.childNodes)}return s.a.Ca(n.childNodes)}function c(n){return r.DocumentFragment?n instanceof DocumentFragment:n&&11===n.nodeType}function u(n,t,i){"string"==typeof t.require?o||r.require?(o||r.require)([t.require],function(n){n&&"object"==typeof n&&n.Xd&&n["default"]&&(n=n["default"]);i(n)}):n("Uses require, but no AMD loader is present"):i(t)}function f(n){return function(t){throw Error("Component '"+n+"': "+t);}}var n={},t;s.j.register=function(t,i){if(!i)throw Error("Invalid configuration for "+t);if(s.j.tb(t))throw Error("Component "+t+" is already registered");n[t]=i};s.j.tb=function(t){return Object.prototype.hasOwnProperty.call(n,t)};s.j.unregister=function(t){delete n[t];s.j.Bc(t)};s.j.Fc={getConfig:function(t,i){i(s.j.tb(t)?n[t]:null)},loadComponent:function(n,t,i){var r=f(n);u(r,t,function(t){l(n,r,t,i)})},loadTemplate:function(n,t,u){if(n=f(n),"string"==typeof t)u(s.a.ua(t));else if(t instanceof Array)u(t);else if(c(t))u(s.a.la(t.childNodes));else if(t.element)if(t=t.element,r.HTMLElement?t instanceof HTMLElement:t&&t.tagName&&1===t.nodeType)u(h(t));else if("string"==typeof t){var e=i.getElementById(t);e?u(h(e)):n("Cannot find element with ID "+t)}else n("Unknown element type: "+t);else n("Unknown template value: "+t)},loadViewModel:function(n,t,i){e(f(n),t,i)}};t="createViewModel";s.b("components.register",s.j.register);s.b("components.isRegistered",s.j.tb);s.b("components.unregister",s.j.unregister);s.b("components.defaultLoader",s.j.Fc);s.j.loaders.push(s.j.Fc);s.j.dd=n}(),function(){function n(n,i){var r=n.getAttribute("params");if(r){var r=t.parseBindingsString(r,i,n,{valueAccessors:!0,bindingParams:!0}),r=s.a.Ga(r,function(t){return s.o(t,null,{l:n})}),u=s.a.Ga(r,function(t){var i=t.v();return t.ja()?s.o({read:function(){return s.a.f(t())},write:s.Za(i)&&function(n){t()(n)},l:n}):i});return Object.prototype.hasOwnProperty.call(u,"$raw")||(u.$raw=r),u}return{$raw:{}}}s.j.getComponentNameForNode=function(n){var t=s.a.R(n);if(s.j.tb(t)&&(-1!=t.indexOf("-")||"[object HTMLUnknownElement]"==""+n||8>=s.a.W&&n.tagName===t))return t};s.j.tc=function(t,i,r,u){var f,e;if(1===i.nodeType&&(f=s.j.getComponentNameForNode(i),f)){if(t=t||{},t.component)throw Error('Cannot use the "component" binding on a custom element matching a component');e={name:f,params:n(i,r)};t.component=u?function(){return e}:e}return t};var t=new s.ga;9>s.a.W&&(s.j.register=function(n){return function(){return n.apply(this,arguments)}}(s.j.register),i.createDocumentFragment=function(n){return function(){var t=n(),i=s.j.dd;for(var r in i);return t}}(i.createDocumentFragment))}(),function(){function n(n,t,i){if(t=t.template,!t)throw Error("Component '"+n+"' has no template");n=s.a.Ca(t);s.h.va(i,n)}function t(n,t,i){var r=n.createViewModel;return r?r.call(n,t,i):t}var i=0;s.c.component={init:function(r,u,f,e,o){function a(){var n=h&&h.dispose;"function"==typeof n&&n.call(h);c&&c.s();l=h=c=null}var h,l,c,v=s.a.la(s.h.childNodes(r));return s.h.Ea(r),s.a.K.za(r,a),s.o(function(){var e=s.a.f(u()),f,y,p,w;if("string"==typeof e?f=e:(f=s.a.f(e.name),y=s.a.f(e.params)),!f)throw Error("No component name specified");p=s.i.Cb(r,o);w=l=++i;s.j.get(f,function(i){if(l===w){if(a(),!i)throw Error("Unknown component '"+f+"'");n(f,i,r);var u=t(i,y,{element:r,templateNodes:v});i=p.createChildContext(u,{extend:function(n){n.$component=u;n.$componentTemplateNodes=v}});u&&u.koDescendantsComplete&&(c=s.i.subscribe(r,s.i.pa,u.koDescendantsComplete,u));h=u;s.Oa(i,r)}})},null,{l:r}),{controlsDescendantBindings:!0}}};s.h.ea.component=!0}();k={"class":"className","for":"htmlFor"};s.c.attr={update:function(t,i){var r=s.a.f(i())||{};s.a.P(r,function(i,r){r=s.a.f(r);var u=i.indexOf(":"),u="lookupNamespaceURI"in t&&0=s.a.W&&i in k?(i=k[i],f?t.removeAttribute(i):t[i]=r):f||(u?t.setAttributeNS(u,i,r):t.setAttribute(i,r));"name"===i&&s.a.Yc(t,f?"":r)})}},function(){s.c.checked={after:["value","attr"],init:function(t,i,r){function l(){var v=t.checked,h=f(),l,y,p;s.S.Ya()||!v&&(o||s.S.qa())||(l=s.u.G(i),u?(y=a?l.v():l,p=c,c=h,p!==h?v&&(s.a.Na(y,h,!0),s.a.Na(y,p,!1)):s.a.Na(y,h,v),a&&s.Za(l)&&l(y)):(e&&(h===n?h=v:v||(h=n)),s.m.eb(l,r,"checked",h,!0)))}function v(){var r=s.a.f(i()),o=f();u?(t.checked=0<=s.a.A(r,o),c=o):t.checked=e&&o===n?!!r:f()===r}var f=s.xb(function(){return r.has("checkedValue")?s.a.f(r.get("checkedValue")):y?r.has("value")?s.a.f(r.get("value")):t.value:void 0}),e="checkbox"==t.type,o="radio"==t.type;if(e||o){var h=i(),u=e&&s.a.f(h)instanceof Array,a=!(u&&h.push&&h.splice),y=o||u,c=u?f():n;o&&!t.name&&s.c.uniqueName.init(t,function(){return!0});s.o(l,null,{l:t});s.a.B(t,"click",l);s.o(v,null,{l:t});h=n}}};s.m.wa.checked=!0;s.c.checkedValue={update:function(n,t){n.value=s.a.f(t())}}}();s.c["class"]={update:function(n,t){var i=s.a.Db(s.a.f(t()));s.a.Eb(n,n.__ko__cssValue,!1);n.__ko__cssValue=i;s.a.Eb(n,i,!0)}};s.c.css={update:function(n,t){var i=s.a.f(t());null!==i&&"object"==typeof i?s.a.P(i,function(t,i){i=s.a.f(i);s.a.Eb(n,t,i)}):s.c["class"].update(n,t)}};s.c.enable={update:function(n,t){var i=s.a.f(t());i&&n.disabled?n.removeAttribute("disabled"):i||n.disabled||(n.disabled=!0)}};s.c.disable={update:function(n,t){s.c.enable.update(n,function(){return!s.a.f(t())})}};s.c.event={init:function(n,t,i,r,u){var f=t()||{};s.a.P(f,function(f){"string"==typeof f&&s.a.B(n,f,function(n){var o,h=t()[f],e;if(h){try{e=s.a.la(arguments);r=u.$data;e.unshift(r);o=h.apply(r,e)}finally{!0!==o&&(n.preventDefault?n.preventDefault():n.returnValue=!1)}!1===i.get(f+"Bubble")&&(n.cancelBubble=!0,n.stopPropagation&&n.stopPropagation())}})})}};s.c.foreach={Rc:function(n){return function(){var i=n(),t=s.a.bc(i);return!t||"number"==typeof t.length?{foreach:i,templateEngine:s.ba.Ma}:(s.a.f(i),{foreach:t.data,as:t.as,noChildContext:t.noChildContext,includeDestroyed:t.includeDestroyed,afterAdd:t.afterAdd,beforeRemove:t.beforeRemove,afterRender:t.afterRender,beforeMove:t.beforeMove,afterMove:t.afterMove,templateEngine:s.ba.Ma})}},init:function(n,t){return s.c.template.init(n,s.c.foreach.Rc(t))},update:function(n,t,i,r,u){return s.c.template.update(n,s.c.foreach.Rc(t),i,r,u)}};s.m.Ra.foreach=!1;s.h.ea.foreach=!0;s.c.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();s.m.eb(u,i,"hasfocus",r,!0);n.__ko_hasfocusLastValue=r;n.__ko_hasfocusUpdating=!1}var u=r.bind(null,!0),f=r.bind(null,!1);s.a.B(n,"focus",u);s.a.B(n,"focusin",u);s.a.B(n,"blur",f);s.a.B(n,"focusout",f);n.__ko_hasfocusLastValue=!1},update:function(n,t){var i=!!s.a.f(t());n.__ko_hasfocusUpdating||n.__ko_hasfocusLastValue===i||(i?n.focus():n.blur(),!i&&n.__ko_hasfocusLastValue&&n.ownerDocument.body.focus(),s.u.G(s.a.Fb,null,[n,i?"focusin":"focusout"]))}};s.m.wa.hasfocus=!0;s.c.hasFocus=s.c.hasfocus;s.m.wa.hasFocus="hasfocus";s.c.html={init:function(){return{controlsDescendantBindings:!0}},update:function(n,t){s.a.fc(n,t())}},function(){function n(n,t,i){s.c[n]={init:function(n,r,u,f,e){var a,c,o={},v,y,h,l;return t&&(f=u.get("as"),l=u.get("noChildContext"),h=!(f&&l),o={as:f,noChildContext:l,exportDependencies:h}),y=(v="render"==u.get("completeOn"))||u.has(s.i.pa),s.o(function(){var f=s.a.f(r()),u=!i!=!f,l=!c,p;(h||u!==a)&&(y&&(e=s.i.Cb(n,e)),u&&((!t||h)&&(o.dataDependency=s.S.o()),p=t?e.createChildContext("function"==typeof f?f:r,o):s.S.qa()?e.extend(null,o):e),l&&s.S.qa()&&(c=s.a.Ca(s.h.childNodes(n),!0)),u?(l||s.h.va(n,s.a.Ca(c)),s.Oa(p,n)):(s.h.Ea(n),v||s.i.ma(n,s.i.H)),a=u)},null,{l:n}),{controlsDescendantBindings:!0}}};s.m.Ra[n]=!1;s.h.ea[n]=!0}n("if");n("ifnot",!1,!0);n("with",!0)}();s.c.let={init:function(n,t,i,r,u){return t=u.extend(t),s.Oa(t,n),{controlsDescendantBindings:!0}}};s.h.ea.let=!0;w={};s.c.options={init:function(n){if("select"!==s.a.R(n))throw Error("options binding applies only to SELECT elements");for(;0t)var c=s.a.g.Z(),l=s.a.g.Z(),v=function(n){var t=this.activeElement;(t=t&&s.a.g.get(t,l))&&t(n)},a=function(n,t){var i=n.ownerDocument;s.a.g.get(i,c)||(s.a.g.set(i,c,!0),s.a.B(i,"selectionchange",v));s.a.g.set(n,l,t)};s.c.textInput={init:function(i,r,u){function c(n,t){s.a.B(i,n,t)}function d(){var t=s.a.f(r());(null===t||t===n)&&(t="");p!==n&&t===p?s.a.setTimeout(d,4):i.value!==t&&(k=!0,i.value=t,k=!1,w=i.value)}function v(){y||(p=i.value,y=s.a.setTimeout(l,4))}function l(){clearTimeout(y);p=y=n;var t=i.value;w!==t&&(w=t,s.m.eb(r(),u,"textInput",t))}var w=i.value,y,p,b=9==s.a.W?v:l,k=!1;t&&c("keypress",l);11>t&&c("propertychange",function(n){k||"value"!==n.propertyName||b(n)});8==t&&(c("keyup",l),c("keydown",l));a&&(a(i,b),c("dragend",v));(!t||9<=t)&&c("input",b);5>e&&"textarea"===s.a.R(i)?(c("keydown",v),c("paste",v),c("cut",v)):11>f?c("keydown",v):4>o?(c("DOMAutoComplete",l),c("dragdrop",l),c("drop",l)):h&&"number"===i.type&&c("keydown",v);c("change",l);c("blur",l);s.o(d,null,{l:i})}};s.m.wa.textInput=!0;s.c.textinput={preprocess:function(n,t,i){i("textInput",n)}}}();s.c.uniqueName={init:function(n,t){if(t()){var i="ko_unique_"+ ++s.c.uniqueName.rd;s.a.Yc(n,i)}}};s.c.uniqueName.rd=0;s.c.using={init:function(n,t,i,r,u){var f;return i.has("as")&&(f={as:i.get("as"),noChildContext:i.get("noChildContext")}),t=u.createChildContext(t,f),s.Oa(t,n),{controlsDescendantBindings:!0}}};s.h.ea.using=!0;s.c.value={init:function(t,i,r){var l=s.a.R(t),a="input"==l,u,f,v;if(a&&("checkbox"==t.type||"radio"==t.type))s.ib(t,{checkedValue:i});else{var e=[],o=r.get("valueUpdate"),h=!1,c=null;o&&(e="string"==typeof o?[o]:s.a.wc(o),s.a.Pa(e,"change"));u=function(){c=null;h=!1;var n=i(),u=s.w.M(t);s.m.eb(n,r,"value",u)};s.a.W&&a&&"text"==t.type&&"off"!=t.autocomplete&&(!t.form||"off"!=t.form.autocomplete)&&-1==s.a.A(e,"propertychange")&&(s.a.B(t,"propertychange",function(){h=!0}),s.a.B(t,"focus",function(){h=!1}),s.a.B(t,"blur",function(){h&&u()}));s.a.D(e,function(n){var i=u;s.a.Ud(n,"after")&&(i=function(){c=s.w.M(t);s.a.setTimeout(u,0)},n=n.substring(5));s.a.B(t,n,i)});f=a&&"file"==t.type?function(){var r=s.a.f(i());null===r||r===n||""===r?t.value="":s.u.G(u)}:function(){var e=s.a.f(i()),o=s.w.M(t);null!==c&&e===c?s.a.setTimeout(f,0):(e!==o||o===n)&&("select"===l?(o=r.get("valueAllowUnset"),s.w.cb(t,e,o),o||e===s.w.M(t)||s.u.G(u)):s.w.cb(t,e))};"select"===l?s.i.subscribe(t,s.i.H,function(){v?r.get("valueAllowUnset")?f():u():(s.a.B(t,"change",u),v=s.o(f,null,{l:t}))},null,{notifyImmediately:!0}):(s.a.B(t,"change",u),s.o(f,null,{l:t}))}},update:function(){}};s.m.wa.value=!0;s.c.visible={update:function(n,t){var i=s.a.f(t()),r="none"!=n.style.display;i&&!r?n.style.display="":!i&&r&&(n.style.display="none")}};s.c.hidden={update:function(n,t){s.c.visible.update(n,function(){return!s.a.f(t())})}},function(n){s.c[n]={init:function(t,i,r,u,f){return s.c.event.init.call(this,t,function(){var t={};return t[n]=i(),t},r,u,f)}}}("click");s.ca=function(){};s.ca.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource");};s.ca.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock");};s.ca.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 s.C.F(r)}if(1==n.nodeType||8==n.nodeType)return new s.C.ia(n);throw Error("Unknown template type: "+n);};s.ca.prototype.renderTemplate=function(n,t,i,r){return n=this.makeTemplateSource(n,r),this.renderTemplateSource(n,t,i,r)};s.ca.prototype.isTemplateRewritten=function(n,t){return!1===this.allowTemplateRewriting?!0:this.makeTemplateSource(n,t).data("isRewritten")};s.ca.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.ca);s.kc=function(){function n(n,t,i,r){var o,f,u,e;for(n=s.m.ac(n),o=s.m.Ra,f=0;f]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,i=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{xd:function(n,t,i){t.isTemplateRewritten(n,i)||t.rewriteTemplate(n,function(n){return s.kc.Ld(n,t)},i)},Ld: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,"","#comment",u)})},md:function(n,t){return s.aa.Xb(function(i,r){var u=i.nextSibling;u&&u.nodeName.toLowerCase()===t&&s.ib(u,n,r)})}}}();s.b("__tr_ambtns",s.kc.md),function(){var i,t;s.C={};s.C.F=function(n){if(this.F=n){var t=s.a.R(n);this.ab="script"===t?1:"textarea"===t?2:"template"==t&&n.content&&11===n.content.nodeType?3:4}};s.C.F.prototype.text=function(){var n=1===this.ab?"text":2===this.ab?"value":"innerHTML",t;if(0==arguments.length)return this.F[n];t=arguments[0];"innerHTML"===n?s.a.fc(this.F,t):this.F[n]=t};i=s.a.g.Z()+"_";s.C.F.prototype.data=function(n){if(1===arguments.length)return s.a.g.get(this.F,i+n);s.a.g.set(this.F,i+n,arguments[1])};t=s.a.g.Z();s.C.F.prototype.nodes=function(){var i=this.F,r,u,f;if(0==arguments.length)return r=s.a.g.get(i,t)||{},u=r.lb||(3===this.ab?i.content:4===this.ab?i:n),(!u||r.jd)&&(f=this.text(),f&&f!==r.bb&&(u=s.a.Md(f,i.ownerDocument),s.a.g.set(i,t,{lb:u,bb:f,jd:!0}))),u;r=arguments[0];this.ab!==n&&this.text("");s.a.g.set(i,t,{lb:r})};s.C.ia=function(n){this.F=n};s.C.ia.prototype=new s.C.F;s.C.ia.prototype.constructor=s.C.ia;s.C.ia.prototype.text=function(){if(0==arguments.length){var i=s.a.g.get(this.F,t)||{};return i.bb===n&&i.lb&&(i.bb=i.lb.innerHTML),i.bb}s.a.g.set(this.F,t,{bb:arguments[0]})};s.b("templateSources",s.C);s.b("templateSources.domElement",s.C.F);s.b("templateSources.anonymousTemplate",s.C.ia)}(),function(){function t(n,t,i){var r;for(t=s.h.nextSibling(t);n&&(r=n)!==t;)n=s.h.nextSibling(r),i(r,n)}function e(n,i){if(n.length){var r=n[0],u=n[n.length-1],f=r.parentNode,e=s.ga.instance,o=e.preprocessNode;if(o){if(t(r,u,function(n,t){var f=n.previousSibling,i=o.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),s.a.Ua(n,f))}t(r,u,function(n){1!==n.nodeType&&8!==n.nodeType||s.vc(i,n)});t(r,u,function(n){1!==n.nodeType&&8!==n.nodeType||s.aa.cd(n,[i])});s.a.Ua(n,f)}}function i(n){return n.nodeType?n:0s.a.W?0:n.nodes)?n.nodes():null)?s.a.la(t.cloneNode(!0).childNodes):(n=n.text(),s.a.ua(n,r))};s.ba.Ma=new s.ba;s.gc(s.ba.Ma);s.b("nativeTemplateEngine",s.ba),function(){s.$a=function(){var n=this.Hd=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,e){if(e=e||i,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 o=r.data("precompiled");return o||(o=r.text()||"",o=t.template(null,"{{ko_with $item.koBindingContext}}"+o+"{{/ko_with}}"),r.data("precompiled",o)),r=[u.$data],u=t.extend({koBindingContext:u},f.templateOptions),u=t.tmpl(o,r,u),u.appendTo(e.createElement("div")),t.fragments={},u};this.createJavaScriptEvaluatorBlock=function(n){return"{{ko_code ((function() { return "+n+" })()) }}"};this.addTemplate=function(n,t){i.write("