if(!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):n(jQuery)}(function(n){function i(n){return t.raw?n:encodeURIComponent(n)}function u(n){return t.raw?n:decodeURIComponent(n)}function f(n){return i(t.json?JSON.stringify(n):String(n))}function e(n){0===n.indexOf('"')&&(n=n.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{n=decodeURIComponent(n.replace(o," "))}catch(i){return}try{return t.json?JSON.parse(n):n}catch(i){}}function r(i,r){var u=t.raw?i:e(i);return n.isFunction(r)?r(u):u}var o=/\+/g,t=n.cookie=function(e,o,s){var v,c;if(void 0!==o&&!n.isFunction(o))return(s=n.extend({},t.defaults,s),"number"==typeof s.expires)&&(v=s.expires,c=s.expires=new Date,c.setDate(c.getDate()+v)),document.cookie=[i(e),"=",f(o),s.expires?"; expires="+s.expires.toUTCString():"",s.path?"; path="+s.path:"",s.domain?"; domain="+s.domain:"",s.secure?"; secure":""].join("");for(var l=e?void 0:{},y=document.cookie?document.cookie.split("; "):[],a=0,b=y.length;b>a;a++){var p=y[a].split("="),w=u(p.shift()),h=p.join("=");if(e&&e===w){l=r(h,o);break}e||void 0===(h=r(h))||(l[w]=h)}return l};t.defaults={};n.removeCookie=function(t,i){return void 0!==n.cookie(t)?(n.cookie(t,"",n.extend({},i,{expires:-1})),!0):!1}}),"undefined"==typeof jQuery)throw new Error("Bootstrap requires jQuery");+function(n){"use strict";function t(){var i=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(void 0!==i.style[n])return{end:t[n]}}n.fn.emulateTransitionEnd=function(t){var i=!1,u=this,r;n(this).one(n.support.transition.end,function(){i=!0});return r=function(){i||n(u).trigger(n.support.transition.end)},setTimeout(r,t),this};n(function(){n.support.transition=t()})}(jQuery);+function(n){"use strict";var i='[data-dismiss="alert"]',t=function(t){n(t).on("click",i,this.close)},r;t.prototype.close=function(t){function f(){i.trigger("closed.bs.alert").remove()}var u=n(this),r=u.attr("data-target"),i;r||(r=u.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));i=n(r);t&&t.preventDefault();i.length||(i=u.hasClass("alert")?u:u.parent());i.trigger(t=n.Event("close.bs.alert"));t.isDefaultPrevented()||(i.removeClass("in"),n.support.transition&&i.hasClass("fade")?i.one(n.support.transition.end,f).emulateTransitionEnd(150):f())};r=n.fn.alert;n.fn.alert=function(i){return this.each(function(){var r=n(this),u=r.data("bs.alert");u||r.data("bs.alert",u=new t(this));"string"==typeof i&&u[i].call(r)})};n.fn.alert.Constructor=t;n.fn.alert.noConflict=function(){return n.fn.alert=r,this};n(document).on("click.bs.alert.data-api",i,t.prototype.close)}(jQuery);+function(n){"use strict";var t=function(i,r){this.$element=n(i);this.options=n.extend({},t.DEFAULTS,r)},i;t.DEFAULTS={loadingText:"loading..."};t.prototype.setState=function(n){var i="disabled",t=this.$element,r=t.is("input")?"val":"html",u=t.data();n+="Text";u.resetText||t.data("resetText",t[r]());t[r](u[n]||this.options[n]);setTimeout(function(){"loadingText"==n?t.addClass(i).attr(i,i):t.removeClass(i).removeAttr(i)},0)};t.prototype.toggle=function(){var n=this.$element.closest('[data-toggle="buttons"]'),t;n.length&&(t=this.$element.find("input").prop("checked",!this.$element.hasClass("active")).trigger("change"),"radio"===t.prop("type")&&n.find(".active").removeClass("active"));this.$element.toggleClass("active")};i=n.fn.button;n.fn.button=function(i){return this.each(function(){var u=n(this),r=u.data("bs.button"),f="object"==typeof i&&i;r||u.data("bs.button",r=new t(this,f));"toggle"==i?r.toggle():i&&r.setState(i)})};n.fn.button.Constructor=t;n.fn.button.noConflict=function(){return n.fn.button=i,this};n(document).on("click.bs.button.data-api","[data-toggle^=button]",function(t){var i=n(t.target);i.hasClass("btn")||(i=i.closest(".btn"));i.button("toggle");t.preventDefault()})}(jQuery);+function(n){"use strict";var t=function(t,i){this.$element=n(t);this.$indicators=this.$element.find(".carousel-indicators");this.options=i;this.paused=this.sliding=this.interval=this.$active=this.$items=null;"hover"==this.options.pause&&this.$element.on("mouseenter",n.proxy(this.pause,this)).on("mouseleave",n.proxy(this.cycle,this))},i;t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0};t.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(n.proxy(this.next,this),this.options.interval)),this};t.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)};t.prototype.to=function(t){var r=this,i=this.getActiveIndex();if(!(t>this.$items.length-1)&&!(0>t))return this.sliding?this.$element.one("slid",function(){r.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",n(this.$items[t]))};t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&n.support.transition.end&&(this.$element.trigger(n.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this};t.prototype.next=function(){if(!this.sliding)return this.slide("next")};t.prototype.prev=function(){if(!this.sliding)return this.slide("prev")};t.prototype.slide=function(t,i){var u=this.$element.find(".item.active"),r=i||u[t](),s=this.interval,f="next"==t?"left":"right",h="next"==t?"first":"last",o=this,e;if(!r.length){if(!this.options.wrap)return;r=this.$element.find(".item")[h]()}if(this.sliding=!0,s&&this.pause(),e=n.Event("slide.bs.carousel",{relatedTarget:r[0],direction:f}),!r.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var t=n(o.$indicators.children()[o.getActiveIndex()]);t&&t.addClass("active")})),n.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(e),e.isDefaultPrevented())return;r.addClass(t);r[0].offsetWidth;u.addClass(f);r.addClass(f);u.one(n.support.transition.end,function(){r.removeClass([t,f].join(" ")).addClass("active");u.removeClass(["active",f].join(" "));o.sliding=!1;setTimeout(function(){o.$element.trigger("slid")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(e),e.isDefaultPrevented())return;u.removeClass("active");r.addClass("active");this.sliding=!1;this.$element.trigger("slid")}return s&&this.cycle(),this}};i=n.fn.carousel;n.fn.carousel=function(i){return this.each(function(){var u=n(this),r=u.data("bs.carousel"),f=n.extend({},t.DEFAULTS,u.data(),"object"==typeof i&&i),e="string"==typeof i?i:f.slide;r||u.data("bs.carousel",r=new t(this,f));"number"==typeof i?r.to(i):e?r[e]():f.interval&&r.pause().cycle()})};n.fn.carousel.Constructor=t;n.fn.carousel.noConflict=function(){return n.fn.carousel=i,this};n(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(t){var f,i=n(this),r=n(i.attr("data-target")||(f=i.attr("href"))&&f.replace(/.*(?=#[^\s]+$)/,"")),e=n.extend({},r.data(),i.data()),u=i.attr("data-slide-to");u&&(e.interval=!1);r.carousel(e);(u=i.attr("data-slide-to"))&&r.data("bs.carousel").to(u);t.preventDefault()});n(window).on("load",function(){n('[data-ride="carousel"]').each(function(){var t=n(this);t.carousel(t.data())})})}(jQuery);+function(n){"use strict";var t=function(i,r){this.$element=n(i);this.options=n.extend({},t.DEFAULTS,r);this.transitioning=null;this.options.parent&&(this.$parent=n(this.options.parent));this.options.toggle&&this.toggle()},i;t.DEFAULTS={toggle:!0};t.prototype.dimension=function(){var n=this.$element.hasClass("width");return n?"width":"height"};t.prototype.show=function(){var u,t,r,i,f,e;if(!this.transitioning&&!this.$element.hasClass("in")&&(u=n.Event("show.bs.collapse"),this.$element.trigger(u),!u.isDefaultPrevented())){if(t=this.$parent&&this.$parent.find("> .panel > .in"),t&&t.length){if(r=t.data("bs.collapse"),r&&r.transitioning)return;t.collapse("hide");r||t.data("bs.collapse",null)}if(i=this.dimension(),this.$element.removeClass("collapse").addClass("collapsing")[i](0),this.transitioning=1,f=function(){this.$element.removeClass("collapsing").addClass("in")[i]("auto");this.transitioning=0;this.$element.trigger("shown.bs.collapse")},!n.support.transition)return f.call(this);e=n.camelCase(["scroll",i].join("-"));this.$element.one(n.support.transition.end,n.proxy(f,this)).emulateTransitionEnd(350)[i](this.$element[0][e])}};t.prototype.hide=function(){var i,t,r;if(!this.transitioning&&this.$element.hasClass("in")&&(i=n.Event("hide.bs.collapse"),this.$element.trigger(i),!i.isDefaultPrevented()))return t=this.dimension(),this.$element[t](this.$element[t]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1,r=function(){this.transitioning=0;this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")},n.support.transition?(this.$element[t](0).one(n.support.transition.end,n.proxy(r,this)).emulateTransitionEnd(350),void 0):r.call(this)};t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};i=n.fn.collapse;n.fn.collapse=function(i){return this.each(function(){var r=n(this),u=r.data("bs.collapse"),f=n.extend({},t.DEFAULTS,r.data(),"object"==typeof i&&i);u||r.data("bs.collapse",u=new t(this,f));"string"==typeof i&&u[i]()})};n.fn.collapse.Constructor=t;n.fn.collapse.noConflict=function(){return n.fn.collapse=i,this};n(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(t){var e,i=n(this),s=i.attr("data-target")||t.preventDefault()||(e=i.attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,""),r=n(s),u=r.data("bs.collapse"),h=u?"toggle":i.data(),f=i.attr("data-parent"),o=f&&n(f);u&&u.transitioning||(o&&o.find('[data-toggle=collapse][data-parent="'+f+'"]').not(i).addClass("collapsed"),i[r.hasClass("in")?"addClass":"removeClass"]("collapsed"));r.collapse(h)})}(jQuery);+function(n){"use strict";function r(){n(e).remove();n(i).each(function(t){var i=u(n(this));i.hasClass("open")&&(i.trigger(t=n.Event("hide.bs.dropdown")),t.isDefaultPrevented()||i.removeClass("open").trigger("hidden.bs.dropdown"))})}function u(t){var i=t.attr("data-target"),r;return i||(i=t.attr("href"),i=i&&/#/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,"")),r=i&&n(i),r&&r.length?r:t.parent()}var e=".dropdown-backdrop",i="[data-toggle=dropdown]",t=function(t){n(t).on("click.bs.dropdown",this.toggle)},f;t.prototype.toggle=function(t){var f=n(this),i,e;if(!f.is(".disabled, :disabled")){if(i=u(f),e=i.hasClass("open"),r(),!e){if("ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&n('<div class="dropdown-backdrop"/>').insertAfter(n(this)).on("click",r),i.trigger(t=n.Event("show.bs.dropdown")),t.isDefaultPrevented())return;i.toggleClass("open").trigger("shown.bs.dropdown");f.focus()}return!1}};t.prototype.keydown=function(t){var e,o,s,f,r;if(/(38|40|27)/.test(t.keyCode)&&(e=n(this),t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled"))){if(o=u(e),s=o.hasClass("open"),!s||s&&27==t.keyCode)return 27==t.which&&o.find(i).focus(),e.click();f=n("[role=menu] li:not(.divider):visible a",o);f.length&&(r=f.index(f.filter(":focus")),38==t.keyCode&&r>0&&r--,40==t.keyCode&&r<f.length-1&&r++,~r||(r=0),f.eq(r).focus())}};f=n.fn.dropdown;n.fn.dropdown=function(i){return this.each(function(){var r=n(this),u=r.data("dropdown");u||r.data("dropdown",u=new t(this));"string"==typeof i&&u[i].call(r)})};n.fn.dropdown.Constructor=t;n.fn.dropdown.noConflict=function(){return n.fn.dropdown=f,this};n(document).on("click.bs.dropdown.data-api",r).on("click.bs.dropdown.data-api",".dropdown form",function(n){n.stopPropagation()}).on("click.bs.dropdown.data-api",i,t.prototype.toggle).on("keydown.bs.dropdown.data-api",i+", [role=menu]",t.prototype.keydown)}(jQuery);+function(n){"use strict";var t=function(t,i){this.options=i;this.$element=n(t);this.$backdrop=this.isShown=null;this.options.remote&&this.$element.load(this.options.remote)},i;t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0};t.prototype.toggle=function(n){return this[this.isShown?"hide":"show"](n)};t.prototype.show=function(t){var i=this,r=n.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(r);this.isShown||r.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.$element.on("click.dismiss.modal",'[data-dismiss="modal"]',n.proxy(this.hide,this)),this.backdrop(function(){var u=n.support.transition&&i.$element.hasClass("fade"),r;i.$element.parent().length||i.$element.appendTo(document.body);i.$element.show();u&&i.$element[0].offsetWidth;i.$element.addClass("in").attr("aria-hidden",!1);i.enforceFocus();r=n.Event("shown.bs.modal",{relatedTarget:t});u?i.$element.find(".modal-dialog").one(n.support.transition.end,function(){i.$element.focus().trigger(r)}).emulateTransitionEnd(300):i.$element.focus().trigger(r)}))};t.prototype.hide=function(t){t&&t.preventDefault();t=n.Event("hide.bs.modal");this.$element.trigger(t);this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),n(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.modal"),n.support.transition&&this.$element.hasClass("fade")?this.$element.one(n.support.transition.end,n.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())};t.prototype.enforceFocus=function(){n(document).off("focusin.bs.modal").on("focusin.bs.modal",n.proxy(function(n){this.$element[0]===n.target||this.$element.has(n.target).length||this.$element.focus()},this))};t.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",n.proxy(function(n){27==n.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")};t.prototype.hideModal=function(){var n=this;this.$element.hide();this.backdrop(function(){n.removeBackdrop();n.$element.trigger("hidden.bs.modal")})};t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove();this.$backdrop=null};t.prototype.backdrop=function(t){var r=this.$element.hasClass("fade")?"fade":"",i;if(this.isShown&&this.options.backdrop){if(i=n.support.transition&&r,this.$backdrop=n('<div class="modal-backdrop '+r+'" />').appendTo(document.body),this.$element.on("click.dismiss.modal",n.proxy(function(n){n.target===n.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;i?this.$backdrop.one(n.support.transition.end,t).emulateTransitionEnd(150):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),n.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(n.support.transition.end,t).emulateTransitionEnd(150):t()):t&&t()};i=n.fn.modal;n.fn.modal=function(i,r){return this.each(function(){var f=n(this),u=f.data("bs.modal"),e=n.extend({},t.DEFAULTS,f.data(),"object"==typeof i&&i);u||f.data("bs.modal",u=new t(this,e));"string"==typeof i?u[i](r):e.show&&u.show(r)})};n.fn.modal.Constructor=t;n.fn.modal.noConflict=function(){return n.fn.modal=i,this};n(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var i=n(this),r=i.attr("href"),u=n(i.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),f=u.data("modal")?"toggle":n.extend({remote:!/#/.test(r)&&r},u.data(),i.data());t.preventDefault();u.modal(f,this).one("hide",function(){i.is(":visible")&&i.focus()})});n(document).on("show.bs.modal",".modal",function(){n(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){n(document.body).removeClass("modal-open")})}(jQuery);+function(n){"use strict";var t=function(n,t){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null;this.init("tooltip",n,t)},i;t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"><\/div><div class="tooltip-inner"><\/div><\/div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1};t.prototype.init=function(t,i,r){var f,e,u,o,s;for(this.enabled=!0,this.type=t,this.$element=n(i),this.options=this.getOptions(r),f=this.options.trigger.split(" "),e=f.length;e--;)if(u=f[e],"click"==u)this.$element.on("click."+this.type,this.options.selector,n.proxy(this.toggle,this));else"manual"!=u&&(o="hover"==u?"mouseenter":"focus",s="hover"==u?"mouseleave":"blur",this.$element.on(o+"."+this.type,this.options.selector,n.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,n.proxy(this.leave,this)));this.options.selector?this._options=n.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()};t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.getOptions=function(t){return t=n.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t};t.prototype.getDelegateOptions=function(){var t={},i=this.getDefaults();return this._options&&n.each(this._options,function(n,r){i[n]!=r&&(t[n]=r)}),t};t.prototype.enter=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show),void 0):i.show()};t.prototype.leave=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide),void 0):i.hide()};t.prototype.show=function(){var o=n.Event("show.bs."+this.type),i,l;if(this.hasContent()&&this.enabled){if(this.$element.trigger(o),o.isDefaultPrevented())return;i=this.tip();this.setContent();this.options.animation&&i.addClass("fade");var t="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,s=/\s?auto?\s?/i,h=s.test(t);h&&(t=t.replace(s,"")||"top");i.detach().css({top:0,left:0,display:"block"}).addClass(t);this.options.container?i.appendTo(this.options.container):i.insertAfter(this.$element);var r=this.getPosition(),u=i[0].offsetWidth,f=i[0].offsetHeight;if(h){var e=this.$element.parent(),a=t,c=document.documentElement.scrollTop||document.body.scrollTop,v="body"==this.options.container?window.innerWidth:e.outerWidth(),y="body"==this.options.container?window.innerHeight:e.outerHeight(),p="body"==this.options.container?0:e.offset().left;t="bottom"==t&&r.top+r.height+f-c>y?"top":"top"==t&&r.top-c-f<0?"bottom":"right"==t&&r.right+u>v?"left":"left"==t&&r.left-u<p?"right":t;i.removeClass(a).addClass(t)}l=this.getCalculatedOffset(t,r,u,f);this.applyPlacement(l,t);this.$element.trigger("shown.bs."+this.type)}};t.prototype.applyPlacement=function(n,t){var h,i=this.tip(),c=i[0].offsetWidth,f=i[0].offsetHeight,e=parseInt(i.css("margin-top"),10),o=parseInt(i.css("margin-left"),10),u,r,s;isNaN(e)&&(e=0);isNaN(o)&&(o=0);n.top=n.top+e;n.left=n.left+o;i.offset(n).addClass("in");u=i[0].offsetWidth;r=i[0].offsetHeight;("top"==t&&r!=f&&(h=!0,n.top=n.top+f-r),/bottom|top/.test(t))?(s=0,n.left<0&&(s=-2*n.left,n.left=0,i.offset(n),u=i[0].offsetWidth,r=i[0].offsetHeight),this.replaceArrow(s-c+u,u,"left")):this.replaceArrow(r-f,r,"top");h&&i.offset(n)};t.prototype.replaceArrow=function(n,t,i){this.arrow().css(i,n?50*(1-n/t)+"%":"")};t.prototype.setContent=function(){var n=this.tip(),t=this.getTitle();n.find(".tooltip-inner")[this.options.html?"html":"text"](t);n.removeClass("fade in top bottom left right")};t.prototype.hide=function(){function i(){"in"!=u.hoverState&&t.detach()}var u=this,t=this.tip(),r=n.Event("hide.bs."+this.type);return this.$element.trigger(r),r.isDefaultPrevented()?void 0:(t.removeClass("in"),n.support.transition&&this.$tip.hasClass("fade")?t.one(n.support.transition.end,i).emulateTransitionEnd(150):i(),this.$element.trigger("hidden.bs."+this.type),this)};t.prototype.fixTitle=function(){var n=this.$element;(n.attr("title")||"string"!=typeof n.attr("data-original-title"))&&n.attr("data-original-title",n.attr("title")||"").attr("title","")};t.prototype.hasContent=function(){return this.getTitle()};t.prototype.getPosition=function(){var t=this.$element[0];return n.extend({},"function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())};t.prototype.getCalculatedOffset=function(n,t,i,r){return"bottom"==n?{top:t.top+t.height,left:t.left+t.width/2-i/2}:"top"==n?{top:t.top-r,left:t.left+t.width/2-i/2}:"left"==n?{top:t.top+t.height/2-r/2,left:t.left-i}:{top:t.top+t.height/2-r/2,left:t.left+t.width}};t.prototype.getTitle=function(){var t=this.$element,n=this.options;return t.attr("data-original-title")||("function"==typeof n.title?n.title.call(t[0]):n.title)};t.prototype.tip=function(){return this.$tip=this.$tip||n(this.options.template)};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")};t.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)};t.prototype.enable=function(){this.enabled=!0};t.prototype.disable=function(){this.enabled=!1};t.prototype.toggleEnabled=function(){this.enabled=!this.enabled};t.prototype.toggle=function(t){var i=t?n(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;i.tip().hasClass("in")?i.leave(i):i.enter(i)};t.prototype.destroy=function(){this.hide().$element.off("."+this.type).removeData("bs."+this.type)};i=n.fn.tooltip;n.fn.tooltip=function(i){return this.each(function(){var u=n(this),r=u.data("bs.tooltip"),f="object"==typeof i&&i;r||u.data("bs.tooltip",r=new t(this,f));"string"==typeof i&&r[i]()})};n.fn.tooltip.Constructor=t;n.fn.tooltip.noConflict=function(){return n.fn.tooltip=i,this}}(jQuery);+function(n){"use strict";var t=function(n,t){this.init("popover",n,t)},i;if(!n.fn.tooltip)throw new Error("Popover requires tooltip.js");t.DEFAULTS=n.extend({},n.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"><\/div><h3 class="popover-title"><\/h3><div class="popover-content"><\/div><\/div>'});t.prototype=n.extend({},n.fn.tooltip.Constructor.prototype);t.prototype.constructor=t;t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.setContent=function(){var n=this.tip(),t=this.getTitle(),i=this.getContent();n.find(".popover-title")[this.options.html?"html":"text"](t);n.find(".popover-content")[this.options.html?"html":"text"](i);n.removeClass("fade top bottom left right in");n.find(".popover-title").html()||n.find(".popover-title").hide()};t.prototype.hasContent=function(){return this.getTitle()||this.getContent()};t.prototype.getContent=function(){var t=this.$element,n=this.options;return t.attr("data-content")||("function"==typeof n.content?n.content.call(t[0]):n.content)};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};t.prototype.tip=function(){return this.$tip||(this.$tip=n(this.options.template)),this.$tip};i=n.fn.popover;n.fn.popover=function(i){return this.each(function(){var u=n(this),r=u.data("bs.popover"),f="object"==typeof i&&i;r||u.data("bs.popover",r=new t(this,f));"string"==typeof i&&r[i]()})};n.fn.popover.Constructor=t;n.fn.popover.noConflict=function(){return n.fn.popover=i,this}}(jQuery);+function(n){"use strict";function t(i,r){var u,f=n.proxy(this.process,this);this.$element=n(i).is("body")?n(window):n(i);this.$body=n("body");this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f);this.options=n.extend({},t.DEFAULTS,r);this.selector=(this.options.target||(u=n(i).attr("href"))&&u.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a";this.offsets=n([]);this.targets=n([]);this.activeTarget=null;this.refresh();this.process()}t.DEFAULTS={offset:10};t.prototype.refresh=function(){var i=this.$element[0]==window?"offset":"position",t;this.offsets=n([]);this.targets=n([]);t=this;this.$body.find(this.selector).map(function(){var f=n(this),r=f.data("target")||f.attr("href"),u=/^#\w/.test(r)&&n(r);return u&&u.length&&[[u[i]().top+(!n.isWindow(t.$scrollElement.get(0))&&t.$scrollElement.scrollTop()),r]]||null}).sort(function(n,t){return n[0]-t[0]}).each(function(){t.offsets.push(this[0]);t.targets.push(this[1])})};t.prototype.process=function(){var n,i=this.$scrollElement.scrollTop()+this.options.offset,f=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,e=f-this.$scrollElement.height(),t=this.offsets,r=this.targets,u=this.activeTarget;if(i>=e)return u!=(n=r.last()[0])&&this.activate(n);for(n=t.length;n--;)u!=r[n]&&i>=t[n]&&(!t[n+1]||i<=t[n+1])&&this.activate(r[n])};t.prototype.activate=function(t){this.activeTarget=t;n(this.selector).parents(".active").removeClass("active");var r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=n(r).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active"));i.trigger("activate")};var i=n.fn.scrollspy;n.fn.scrollspy=function(i){return this.each(function(){var u=n(this),r=u.data("bs.scrollspy"),f="object"==typeof i&&i;r||u.data("bs.scrollspy",r=new t(this,f));"string"==typeof i&&r[i]()})};n.fn.scrollspy.Constructor=t;n.fn.scrollspy.noConflict=function(){return n.fn.scrollspy=i,this};n(window).on("load",function(){n('[data-spy="scroll"]').each(function(){var t=n(this);t.scrollspy(t.data())})})}(jQuery);+function(n){"use strict";var t=function(t){this.element=n(t)},i;t.prototype.show=function(){var t=this.element,e=t.closest("ul:not(.dropdown-menu)"),i=t.data("target"),r,u,f;(i||(i=t.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),t.parent("li").hasClass("active"))||(r=e.find(".active:last a")[0],u=n.Event("show.bs.tab",{relatedTarget:r}),(t.trigger(u),u.isDefaultPrevented())||(f=n(i),this.activate(t.parent("li"),e),this.activate(f,f.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:r})})))};t.prototype.activate=function(t,i,r){function f(){u.removeClass("active").find("> .dropdown-menu > .active").removeClass("active");t.addClass("active");e?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade");t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active");r&&r()}var u=i.find("> .active"),e=r&&n.support.transition&&u.hasClass("fade");e?u.one(n.support.transition.end,f).emulateTransitionEnd(150):f();u.removeClass("in")};i=n.fn.tab;n.fn.tab=function(i){return this.each(function(){var u=n(this),r=u.data("bs.tab");r||u.data("bs.tab",r=new t(this));"string"==typeof i&&r[i]()})};n.fn.tab.Constructor=t;n.fn.tab.noConflict=function(){return n.fn.tab=i,this};n(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault();n(this).tab("show")})}(jQuery);+function(n){"use strict";var t=function(i,r){this.options=n.extend({},t.DEFAULTS,r);this.$window=n(window).on("scroll.bs.affix.data-api",n.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",n.proxy(this.checkPositionWithEventLoop,this));this.$element=n(i);this.affixed=this.unpin=null;this.checkPosition()},i;t.RESET="affix affix-top affix-bottom";t.DEFAULTS={offset:0};t.prototype.checkPositionWithEventLoop=function(){setTimeout(n.proxy(this.checkPosition,this),1)};t.prototype.checkPosition=function(){var i;if(this.$element.is(":visible")){var s=n(document).height(),e=this.$window.scrollTop(),o=this.$element.offset(),r=this.options.offset,f=r.top,u=r.bottom;"object"!=typeof r&&(u=f=r);"function"==typeof f&&(f=r.top());"function"==typeof u&&(u=r.bottom());i=null!=this.unpin&&e+this.unpin<=o.top?!1:null!=u&&o.top+this.$element.height()>=s-u?"bottom":null!=f&&f>=e?"top":!1;this.affixed!==i&&(this.unpin&&this.$element.css("top",""),this.affixed=i,this.unpin="bottom"==i?o.top-e:null,this.$element.removeClass(t.RESET).addClass("affix"+(i?"-"+i:"")),"bottom"==i&&this.$element.offset({top:document.body.offsetHeight-u-this.$element.height()}))}};i=n.fn.affix;n.fn.affix=function(i){return this.each(function(){var u=n(this),r=u.data("bs.affix"),f="object"==typeof i&&i;r||u.data("bs.affix",r=new t(this,f));"string"==typeof i&&r[i]()})};n.fn.affix.Constructor=t;n.fn.affix.noConflict=function(){return n.fn.affix=i,this};n(window).on("load",function(){n('[data-spy="affix"]').each(function(){var i=n(this),t=i.data();t.offset=t.offset||{};t.offsetBottom&&(t.offset.bottom=t.offsetBottom);t.offsetTop&&(t.offset.top=t.offsetTop);i.affix(t)})})}(jQuery),function(n,t,i){function o(n){throw n;}function s(n){return function(){return n}}function h(h){function v(n,t,i){i&&t!==c.k.r(n)&&c.k.S(n,t);t!==c.k.r(n)&&c.a.va(n,"change")}var c="undefined"!=typeof h?h:{},y,l,a;c.b=function(n,t){for(var i=n.split("."),r=c,u=0;u<i.length-1;u++)r=r[i[u]];r[i[i.length-1]]=t};c.B=function(n,t,i){n[t]=i};c.version="2.1.0";c.b("version",c.version);c.a=new function(){function v(n,t){if("input"!==c.a.o(n)||!n.type||"click"!=t.toLowerCase())return f;var i=n.type;return"checkbox"==i||"radio"==i}var k=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,h={},p={},y,l,a,w,b,s;h[/Firefox\/2/i.test(i.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"];h.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" ");for(y in h)if(l=h[y],l.length)for(a=0,w=l.length;a<w;a++)p[l[a]]=y;return b={propertychange:r},s=function(){for(var n=3,i=t.createElement("div"),r=i.getElementsByTagName("i");i.innerHTML="<!--[if gt IE "+ ++n+"]><i><\/i><![endif]-->",r[0];);return 4<n?n:e}(),{Ca:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],v:function(n,t){for(var i=0,r=n.length;i<r;i++)t(n[i])},j: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},ab:function(n,t,i){for(var r=0,f=n.length;r<f;r++)if(t.call(i,n[r]))return n[r];return u},ba:function(n,t){var i=c.a.j(n,t);0<=i&&n.splice(i,1)},za:function(n){for(var n=n||[],i=[],t=0,r=n.length;t<r;t++)0>c.a.j(i,n[t])&&i.push(n[t]);return i},T:function(n,t){for(var n=n||[],r=[],i=0,u=n.length;i<u;i++)r.push(t(n[i]));return r},aa:function(n,t){for(var n=n||[],r=[],i=0,u=n.length;i<u;i++)t(n[i])&&r.push(n[i]);return r},N: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},extend:function(n,t){if(t)for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);return n},ga:function(n){for(;n.firstChild;)c.removeNode(n.firstChild)},Ab:function(n){for(var n=c.a.L(n),r=t.createElement("div"),i=0,u=n.length;i<u;i++)c.F(n[i]),r.appendChild(n[i]);return r},X:function(n,t){if(c.a.ga(n),t)for(var i=0,r=t.length;i<r;i++)n.appendChild(t[i])},Na: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++)c.removeNode(r[i])}},Pa:function(n,t){0<=i.userAgent.indexOf("MSIE 6")?n.setAttribute("selected",t):n.selected=t},w:function(n){return(n||"").replace(k,"")},Ib:function(n,t){for(var r,u=[],f=(n||"").split(t),i=0,e=f.length;i<e;i++)r=c.a.w(f[i]),""!==r&&u.push(r);return u},Hb:function(n,t){return n=n||"",t.length>n.length?f:n.substring(0,t.length)===t},eb:function(n,t){for(var i="return ("+n+")",r=0;r<t;r++)i="with(sc["+r+"]) { "+i+" } ";return new Function("sc",i)},kb:function(n,t){if(t.compareDocumentPosition)return 16==(t.compareDocumentPosition(n)&16);for(;n!=u;){if(n==t)return r;n=n.parentNode}return f},fa:function(n){return c.a.kb(n,n.ownerDocument)},o:function(n){return n&&n.tagName&&n.tagName.toLowerCase()},n:function(n,t,i){var u=s&&b[t],e,i;u||"undefined"==typeof jQuery?!u&&"function"==typeof n.addEventListener?n.addEventListener(t,i,f):"undefined"!=typeof n.attachEvent?n.attachEvent("on"+t,function(t){i.call(n,t)}):o(Error("Browser doesn't support addEventListener or attachEvent")):(v(n,t)&&(e=i,i=function(n,t){var i=this.checked;t&&(this.checked=t.fb!==r);e.call(this,n);this.checked=i}),jQuery(n).bind(t,i))},va:function(i,u){if(i&&i.nodeType||o(Error("element must be a DOM node when calling triggerEvent")),"undefined"!=typeof jQuery){var e=[];v(i,u)&&e.push({fb:i.checked});jQuery(i).trigger(u,e)}else"function"==typeof t.createEvent?"function"==typeof i.dispatchEvent?(e=t.createEvent(p[u]||"HTMLEvents"),e.initEvent(u,r,r,n,0,0,0,0,0,f,f,f,f,0,i),i.dispatchEvent(e)):o(Error("The supplied element doesn't support dispatchEvent")):"undefined"!=typeof i.fireEvent?(v(i,u)&&(i.checked=i.checked!==r),i.fireEvent("on"+u)):o(Error("Browser doesn't support triggering events"))},d:function(n){return c.la(n)?n():n},Ua:function(n,t,i){var u=(n.className||"").split(/\s+/),r=0<=c.a.j(u,t);if(i&&!r)n.className+=(u[0]?" ":"")+t;else if(r&&!i){for(i="",r=0;r<u.length;r++)u[r]!=t&&(i+=u[r]+" ");n.className=c.a.w(i)}},Qa:function(n,t){var i=c.a.d(t);(i===u||i===e)&&(i="");"innerText"in n?n.innerText=i:n.textContent=i;9<=s&&(n.style.display=n.style.display)},lb:function(n){if(9<=s){var t=n.style.width;n.style.width=0;n.style.width=t}},Eb:function(n,t){for(var n=c.a.d(n),t=c.a.d(t),r=[],i=n;i<=t;i++)r.push(i);return r},L:function(n){for(var i=[],t=0,r=n.length;t<r;t++)i.push(n[t]);return i},tb:6===s,ub:7===s,ja:s,Da:function(n,t){for(var r=c.a.L(n.getElementsByTagName("input")).concat(c.a.L(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},Bb:function(t){return"string"==typeof t&&(t=c.a.w(t))?n.JSON&&n.JSON.parse?n.JSON.parse(t):new Function("return "+t)():u},sa:function(n,t,i){return("undefined"==typeof JSON||"undefined"==typeof JSON.stringify)&&o(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")),JSON.stringify(c.a.d(n),t,i)},Cb:function(n,i,r){var r=r||{},h=r.params||{},a=r.includeFields||this.Ca,l=n,o,s,e,i,u,f;if("object"==typeof n&&"form"===c.a.o(n))for(l=n.action,o=a.length-1;0<=o;o--)for(s=c.a.Da(n,a[o]),e=s.length-1;0<=e;e--)h[s[e].name]=s[e].value;i=c.a.d(i);u=t.createElement("form");u.style.display="none";u.action=l;u.method="post";for(f in i)n=t.createElement("input"),n.name=f,n.value=c.a.sa(c.a.d(i[f])),u.appendChild(n);for(f in h)n=t.createElement("input"),n.name=f,n.value=h[f],u.appendChild(n);t.body.appendChild(u);r.submitter?r.submitter(u):u.submit();setTimeout(function(){u.parentNode.removeChild(u)},0)}}};c.b("utils",c.a);c.b("utils.arrayForEach",c.a.v);c.b("utils.arrayFirst",c.a.ab);c.b("utils.arrayFilter",c.a.aa);c.b("utils.arrayGetDistinctValues",c.a.za);c.b("utils.arrayIndexOf",c.a.j);c.b("utils.arrayMap",c.a.T);c.b("utils.arrayPushAll",c.a.N);c.b("utils.arrayRemoveItem",c.a.ba);c.b("utils.extend",c.a.extend);c.b("utils.fieldsIncludedWithJsonPost",c.a.Ca);c.b("utils.getFormFields",c.a.Da);c.b("utils.postJson",c.a.Cb);c.b("utils.parseJson",c.a.Bb);c.b("utils.registerEventHandler",c.a.n);c.b("utils.stringifyJson",c.a.sa);c.b("utils.range",c.a.Eb);c.b("utils.toggleDomNodeCssClass",c.a.Ua);c.b("utils.triggerEvent",c.a.va);c.b("utils.unwrapObservable",c.a.d);Function.prototype.bind||(Function.prototype.bind=function(n){var i=this,t=Array.prototype.slice.call(arguments),n=t.shift();return function(){return i.apply(n,t.concat(Array.prototype.slice.call(arguments)))}});c.a.f=new function(){var i=0,n="__ko__"+(new Date).getTime(),t={};return{get:function(n,t){var i=c.a.f.getAll(n,f);return i===e?e:i[t]},set:function(n,t,i){i===e&&c.a.f.getAll(n,f)===e||(c.a.f.getAll(n,r)[t]=i)},getAll:function(r,u){var f=r[n];if(!(f&&"null"!==f)){if(!u)return;f=r[n]="ko"+i++;t[f]={}}return t[f]},clear:function(i){var r=i[n];r&&(delete t[r],i[n]=u)}}};c.b("utils.domData",c.a.f);c.b("utils.domData.clear",c.a.f.clear);c.a.G=new function(){function n(n,t){var r=c.a.f.get(n,i);return r===e&&t&&(r=[],c.a.f.set(n,i,r)),r}function t(i){var r=n(i,f),e;if(r)for(r=r.slice(0),e=0;e<r.length;e++)r[e](i);if(c.a.f.clear(i),"function"==typeof jQuery&&"function"==typeof jQuery.cleanData&&jQuery.cleanData([i]),u[i.nodeType])for(r=i.firstChild;i=r;)r=i.nextSibling,8===i.nodeType&&t(i)}var i="__ko_domNodeDisposal__"+(new Date).getTime(),s={1:r,8:r,9:r},u={1:r,9:r};return{wa:function(t,i){"function"!=typeof i&&o(Error("Callback must be a function"));n(t,r).push(i)},Ma:function(t,r){var u=n(t,f);u&&(c.a.ba(u,r),0==u.length&&c.a.f.set(t,i,e))},F:function(n){var i,n,r;if(s[n.nodeType]&&(t(n),u[n.nodeType]))for(i=[],c.a.N(i,n.getElementsByTagName("*")),n=0,r=i.length;n<r;n++)t(i[n])},removeNode:function(n){c.F(n);n.parentNode&&n.parentNode.removeChild(n)}}};c.F=c.a.G.F;c.removeNode=c.a.G.removeNode;c.b("cleanNode",c.F);c.b("removeNode",c.removeNode);c.b("utils.domNodeDisposal",c.a.G);c.b("utils.domNodeDisposal.addDisposeCallback",c.a.G.wa);c.b("utils.domNodeDisposal.removeDisposeCallback",c.a.G.Ma),function(){c.a.pa=function(i){var r,u;if("undefined"!=typeof jQuery){if((r=jQuery.clean([i]))&&r[0]){for(i=r[0];i.parentNode&&11!==i.parentNode.nodeType;)i=i.parentNode;i.parentNode&&i.parentNode.removeChild(i)}}else{for(u=c.a.w(i).toLowerCase(),r=t.createElement("div"),u=u.match(/^<(thead|tbody|tfoot)/)&&[1,"<table>","<\/table>"]||!u.indexOf("<tr")&&[2,"<table><tbody>","<\/tbody><\/table>"]||(!u.indexOf("<td")||!u.indexOf("<th"))&&[3,"<table><tbody><tr>","<\/tr><\/tbody><\/table>"]||[0,"",""],i="ignored<div>"+u[1]+i+u[2]+"<\/div>","function"==typeof n.innerShiv?r.appendChild(n.innerShiv(i)):r.innerHTML=i;u[0]--;)r=r.lastChild;r=c.a.L(r.lastChild.childNodes)}return r};c.a.Y=function(n,t){if(c.a.ga(n),t!==u&&t!==e)if("string"!=typeof t&&(t=t.toString()),"undefined"!=typeof jQuery)jQuery(n).html(t);else for(var r=c.a.pa(t),i=0;i<r.length;i++)n.appendChild(r[i])}}();c.b("utils.parseHtmlFragment",c.a.pa);c.b("utils.setHtml",c.a.Y);c.s=function(){function t(){return(4294967296*(1+Math.random())|0).toString(16).substring(1)}function i(n,t){var r;if(n)if(8==n.nodeType)r=c.s.Ja(n.nodeValue),r!=u&&t.push({jb:n,yb:r});else if(1==n.nodeType)for(var r=0,f=n.childNodes,e=f.length;r<e;r++)i(f[r],t)}var n={};return{na:function(i){"function"!=typeof i&&o(Error("You can only pass a function to ko.memoization.memoize()"));var r=t()+t();return n[r]=i,"<!--[ko_memo:"+r+"]-->"},Va:function(t,i){var f=n[t];f===e&&o(Error("Couldn't find any memo with ID "+t+". Perhaps it's already been unmemoized."));try{return f.apply(u,i||[]),r}finally{delete n[t]}},Wa:function(n,t){var f=[],u,o,r,e;for(i(n,f),u=0,o=f.length;u<o;u++)r=f[u].jb,e=[r],t&&c.a.N(e,t),c.s.Va(f[u].yb,e),r.nodeValue="",r.parentNode&&r.parentNode.removeChild(r)},Ja:function(n){return(n=n.match(/^\[ko_memo\:(.*?)\]$/))?n[1]:u}}}();c.b("memoization",c.s);c.b("memoization.memoize",c.s.na);c.b("memoization.unmemoize",c.s.Va);c.b("memoization.parseMemoText",c.s.Ja);c.b("memoization.unmemoizeDomNodeAndDescendants",c.s.Wa);c.Ba={throttle:function(n,t){n.throttleEvaluation=t;var i=u;return c.h({read:n,write:function(r){clearTimeout(i);i=setTimeout(function(){n(r)},t)}})},notify:function(n,t){return n.equalityComparer="always"==t?s(f):c.m.fn.equalityComparer,n}};c.b("extenders",c.Ba);c.Sa=function(n,t,i){this.target=n;this.ca=t;this.ib=i;c.B(this,"dispose",this.A)};c.Sa.prototype.A=function(){this.sb=r;this.ib()};c.R=function(){this.u={};c.a.extend(this,c.R.fn);c.B(this,"subscribe",this.ta);c.B(this,"extend",this.extend);c.B(this,"getSubscriptionsCount",this.ob)};c.R.fn={ta:function(n,t,i){var i=i||"change",n=t?n.bind(t):n,r=new c.Sa(this,n,function(){c.a.ba(this.u[i],r)}.bind(this));return this.u[i]||(this.u[i]=[]),this.u[i].push(r),r},notifySubscribers:function(n,t){t=t||"change";this.u[t]&&c.a.v(this.u[t].slice(0),function(t){t&&t.sb!==r&&t.ca(n)})},ob:function(){var t=0,n;for(n in this.u)this.u.hasOwnProperty(n)&&(t+=this.u[n].length);return t},extend:function(n){var t=this,i,r;if(n)for(i in n)r=c.Ba[i],"function"==typeof r&&(t=r(t,n[i]));return t}};c.Ga=function(n){return"function"==typeof n.ta&&"function"==typeof n.notifySubscribers};c.b("subscribable",c.R);c.b("isSubscribable",c.Ga);c.U=function(){var n=[];return{bb:function(t){n.push({ca:t,Aa:[]})},end:function(){n.pop()},La:function(t){if(c.Ga(t)||o(Error("Only subscribable things can act as dependencies")),0<n.length){var i=n[n.length-1];0<=c.a.j(i.Aa,t)||(i.Aa.push(t),i.ca(t))}}}}();y={undefined:r,boolean:r,number:r,string:r};c.m=function(n){function t(){return 0<arguments.length?(t.equalityComparer&&t.equalityComparer(i,arguments[0])||(t.I(),i=arguments[0],t.H()),this):(c.U.La(t),i)}var i=n;return c.R.call(t),t.H=function(){t.notifySubscribers(i)},t.I=function(){t.notifySubscribers(i,"beforeChange")},c.a.extend(t,c.m.fn),c.B(t,"valueHasMutated",t.H),c.B(t,"valueWillMutate",t.I),t};c.m.fn={equalityComparer:function(n,t){return n===u||typeof n in y?n===t:f}};l=c.m.Db="__ko_proto__";c.m.fn[l]=c.m;c.ia=function(n,t){return n===u||n===e||n[l]===e?f:n[l]===t?r:c.ia(n[l],t)};c.la=function(n){return c.ia(n,c.m)};c.Ha=function(n){return"function"==typeof n&&n[l]===c.m||"function"==typeof n&&n[l]===c.h&&n.pb?r:f};c.b("observable",c.m);c.b("isObservable",c.la);c.b("isWriteableObservable",c.Ha);c.Q=function(n){0==arguments.length&&(n=[]);n===u||n===e||"length"in n||o(Error("The argument passed when initializing an observable array must be an array, or null, or undefined."));var t=c.m(n);return c.a.extend(t,c.Q.fn),t};c.Q.fn={remove:function(n){for(var u,r=this(),i=[],f="function"==typeof n?n:function(t){return t===n},t=0;t<r.length;t++)u=r[t],f(u)&&(0===i.length&&this.I(),i.push(u),r.splice(t,1),t--);return i.length&&this.H(),i},removeAll:function(n){if(n===e){var t=this(),i=t.slice(0);return this.I(),t.splice(0,t.length),this.H(),i}return n?this.remove(function(t){return 0<=c.a.j(n,t)}):[]},destroy:function(n){var i=this(),u="function"==typeof n?n:function(t){return t===n},t;for(this.I(),t=i.length-1;0<=t;t--)u(i[t])&&(i[t]._destroy=r);this.H()},destroyAll:function(n){return n===e?this.destroy(s(r)):n?this.destroy(function(t){return 0<=c.a.j(n,t)}):[]},indexOf:function(n){var t=this();return c.a.j(t,n)},replace:function(n,t){var i=this.indexOf(n);0<=i&&(this.I(),this()[i]=t,this.H())}};c.a.v("pop push reverse shift sort splice unshift".split(" "),function(n){c.Q.fn[n]=function(){var t=this();return this.I(),t=t[n].apply(t,arguments),this.H(),t}});c.a.v(["slice"],function(n){c.Q.fn[n]=function(){var t=this();return t[n].apply(t,arguments)}});c.b("observableArray",c.Q);c.h=function(n,t,i){function tt(){c.a.v(a,function(n){n.A()});a=[]}function rt(){var n=h.throttleEvaluation;n&&0<=n?(clearTimeout(nt),nt=setTimeout(v,n)):v()}function v(){var n,u,i;if(!d)if(k&&b())p();else{d=r;try{for(n=c.a.T(a,function(n){return n.target}),c.U.bb(function(t){var i;0<=(i=c.a.j(n,t))?n[i]=e:a.push(t.ta(rt))}),u=l.call(t),i=n.length-1;0<=i;i--)n[i]&&a.splice(i,1)[0].A();k=r;h.notifySubscribers(y,"beforeChange");y=u}finally{c.U.end()}h.notifySubscribers(y);d=f}}function h(){if(0<arguments.length)ut.apply(h,arguments);else return k||v(),c.U.La(h),y}function ut(){"function"==typeof g?g.apply(t,arguments):o(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."))}var y,k=f,d=f,l=n,g,it,b,nt;l&&"object"==typeof l?(i=l,l=i.read):(i=i||{},l||(l=i.read));"function"!=typeof l&&o(Error("Pass a function that returns the value of the ko.computed"));g=i.write;t||(t=i.owner);var a=[],p=tt,w="object"==typeof i.disposeWhenNodeIsRemoved?i.disposeWhenNodeIsRemoved:u,b=i.disposeWhen||s(f);return w&&(p=function(){c.a.G.Ma(w,arguments.callee);tt()},c.a.G.wa(w,p),it=b,b=function(){return!c.a.fa(w)||it()}),nt=u,h.nb=function(){return a.length},h.pb="function"==typeof i.write,h.A=function(){p()},c.R.call(h),c.a.extend(h,c.h.fn),i.deferEvaluation!==r&&v(),c.B(h,"dispose",h.A),c.B(h,"getDependenciesCount",h.nb),h};c.rb=function(n){return c.ia(n,c.h)};h=c.m.Db;c.h[h]=c.m;c.h.fn={};c.h.fn[h]=c.h;c.b("dependentObservable",c.h);c.b("computed",c.h);c.b("isComputed",c.rb),function(){function n(r,f,o){if(o=o||new i,r=f(r),!("object"==typeof r&&r!==u&&r!==e&&!(r instanceof Date)))return r;var s=r instanceof Array?[]:{};return o.save(r,s),t(r,function(t){var i=f(r[t]),u;switch(typeof i){case"boolean":case"number":case"string":case"function":s[t]=i;break;case"object":case"undefined":u=o.get(i);s[t]=u!==e?u:n(i,f,o)}}),s}function t(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(){var n=[],t=[];this.save=function(i,r){var u=c.a.j(n,i);0<=u?t[u]=r:(n.push(i),t.push(r))};this.get=function(i){return i=c.a.j(n,i),0<=i?t[i]:e}}c.Ta=function(t){return 0==arguments.length&&o(Error("When calling ko.toJS, pass the object you want to convert.")),n(t,function(n){for(var t=0;c.la(n)&&10>t;t++)n=n();return n})};c.toJSON=function(n,t,i){return n=c.Ta(n),c.a.sa(n,t,i)}}();c.b("toJS",c.Ta);c.b("toJSON",c.toJSON),function(){c.k={r:function(n){switch(c.a.o(n)){case"option":return n.__ko__hasDomDataOptionValue__===r?c.a.f.get(n,c.c.options.oa):n.getAttribute("value");case"select":return 0<=n.selectedIndex?c.k.r(n.options[n.selectedIndex]):e;default:return n.value}},S:function(n,t){switch(c.a.o(n)){case"option":switch(typeof t){case"string":c.a.f.set(n,c.c.options.oa,e);"__ko__hasDomDataOptionValue__"in n&&delete n.__ko__hasDomDataOptionValue__;n.value=t;break;default:c.a.f.set(n,c.c.options.oa,t);n.__ko__hasDomDataOptionValue__=r;n.value="number"==typeof t?t:""}break;case"select":for(var i=n.options.length-1;0<=i;i--)if(c.k.r(n.options[i])==t){n.selectedIndex=i;break}break;default:(t===u||t===e)&&(t="");n.value=t}}}}();c.b("selectExtensions",c.k);c.b("selectExtensions.readValue",c.k.r);c.b("selectExtensions.writeValue",c.k.S);c.g=function(){function n(n,i){for(var r=u;n!=r;)r=n,n=n.replace(t,function(n,t){return i[t]});return n}var t=/\@ko_token_(\d+)\@/g,i=/^[\_$a-z][\_$a-z0-9]*(\[.*?\])*(\.[\_$a-z][\_$a-z0-9]*(\[.*?\])*)*$/i,e=["true","false"];return{D:[],W:function(t){var i=c.a.w(t),f;if(3>i.length)return[];"{"===i.charAt(0)&&(i=i.substring(1,i.length-1));for(var t=[],e=u,o,r=0;r<i.length;r++)if(f=i.charAt(r),e===u)switch(f){case'"':case"'":case"/":e=r;o=f}else if(f==o&&"\\"!==i.charAt(r-1)){f=i.substring(e,r+1);t.push(f);var l="@ko_token_"+(t.length-1)+"@",i=i.substring(0,e)+l+i.substring(r+1),r=r-(f.length-l.length),e=u}o=e=u;for(var s=0,h=u,r=0;r<i.length;r++){if(f=i.charAt(r),e===u)switch(f){case"{":e=r;h=f;o="}";break;case"(":e=r;h=f;o=")";break;case"[":e=r;h=f;o="]"}f===h?s++:f===o&&(s--,0===s&&(f=i.substring(e,r+1),t.push(f),l="@ko_token_"+(t.length-1)+"@",i=i.substring(0,e)+l+i.substring(r+1),r-=f.length-l.length,e=u))}for(o=[],i=i.split(","),e=0,r=i.length;e<r;e++)s=i[e],h=s.indexOf(":"),0<h&&h<s.length-1?(f=s.substring(h+1),o.push({key:n(s.substring(0,h),t),value:n(f,t)})):o.push({unknown:n(s,t)});return o},ka:function(n){for(var s,f,o="string"==typeof n?c.g.W(n):n,r=[],n=[],t,h=0;t=o[h];h++)if(0<r.length&&r.push(","),t.key){n:{s=t.key;f=c.a.w(s);switch(f.length&&f.charAt(0)){case"'":case'"':break n;default:s="'"+f+"'"}}t=t.value;r.push(s);r.push(":");r.push(t);f=c.a.w(t);(0<=c.a.j(e,c.a.w(f).toLowerCase())?0:f.match(i)!==u)&&(0<n.length&&n.push(", "),n.push(s+" : function(__ko_value) { "+t+" = __ko_value; }"))}else t.unknown&&r.push(t.unknown);return o=r.join(""),0<n.length&&(o=o+", '_ko_property_writers' : { "+n.join("")+" } "),o},wb:function(n,t){for(var i=0;i<n.length;i++)if(c.a.w(n[i].key)==t)return r;return f},$:function(n,t,i,r,u){n&&c.Ha(n)?u&&n()===r||n(r):(n=t()._ko_property_writers)&&n[i]&&n[i](r)}}}();c.b("jsonExpressionRewriting",c.g);c.b("jsonExpressionRewriting.bindingRewriteValidators",c.g.D);c.b("jsonExpressionRewriting.parseObjectLiteral",c.g.W);c.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",c.g.ka),function(){function n(n){return 8==n.nodeType&&(f?n.text:n.nodeValue).match(h)}function i(n){return 8==n.nodeType&&(f?n.text:n.nodeValue).match(l)}function e(t,r){for(var f=t,e=1,s=[];f=f.nextSibling;){if(i(f)&&(e--,0===e))return s;s.push(f);n(f)&&e++}return r||o(Error("Cannot find closing comment tag to match: "+t.nodeValue)),u}function s(n,t){var i=e(n,t);return i?0<i.length?i[i.length-1].nextSibling:n.nextSibling:u}var f="<!--test-->"===t.createComment("test").text,h=f?/^<\!--\s*ko\s+(.*\:.*)\s*--\>$/:/^\s*ko\s+(.*\:.*)\s*$/,l=f?/^<\!--\s*\/ko\s*--\>$/:/^\s*\/ko\s*$/,a={ul:r,ol:r};c.e={C:{},childNodes:function(t){return n(t)?e(t):t.childNodes},ha:function(t){if(n(t))for(var t=c.e.childNodes(t),i=0,r=t.length;i<r;i++)c.removeNode(t[i]);else c.a.ga(t)},X:function(t,i){if(n(t)){c.e.ha(t);for(var u=t.nextSibling,r=0,f=i.length;r<f;r++)u.parentNode.insertBefore(i[r],u)}else c.a.X(t,i)},Ka:function(t,i){n(t)?t.parentNode.insertBefore(i,t.nextSibling):t.firstChild?t.insertBefore(i,t.firstChild):t.appendChild(i)},Fa:function(t,i,r){n(t)?t.parentNode.insertBefore(i,r.nextSibling):r.nextSibling?t.insertBefore(i,r.nextSibling):t.appendChild(i)},firstChild:function(t){return n(t)?!t.nextSibling||i(t.nextSibling)?u:t.nextSibling:t.firstChild},nextSibling:function(t){return n(t)&&(t=s(t)),t.nextSibling&&i(t.nextSibling)?u:t.nextSibling},Xa:function(t){return(t=n(t))?t[1]:u},Ia:function(t){var h,f,e,o;if(a[c.a.o(t)]&&(h=t.firstChild,h))do if(1===h.nodeType){if(f=h.firstChild,e=u,f)do e?e.push(f):n(f)?(o=s(f,r),o?f=o:e=[f]):i(f)&&(e=[f]);while(f=f.nextSibling);if(f=e)for(e=h.nextSibling,o=0;o<f.length;o++)e?t.insertBefore(f[o],e):t.appendChild(f[o])}while(h=h.nextSibling)}}}();c.b("virtualElements",c.e);c.b("virtualElements.allowedBindings",c.e.C);c.b("virtualElements.emptyNode",c.e.ha);c.b("virtualElements.insertAfter",c.e.Fa);c.b("virtualElements.prepend",c.e.Ka);c.b("virtualElements.setDomNodeChildren",c.e.X),function(){c.J=function(){this.cb={}};c.a.extend(c.J.prototype,{nodeHasBindings:function(n){switch(n.nodeType){case 1:return n.getAttribute("data-bind")!=u;case 8:return c.e.Xa(n)!=u;default:return f}},getBindings:function(n,t){var i=this.getBindingsString(n,t);return i?this.parseBindingsString(i,t):u},getBindingsString:function(n){switch(n.nodeType){case 1:return n.getAttribute("data-bind");case 8:return c.e.Xa(n);default:return u}},parseBindingsString:function(n,t){var h;try{var i=t.$data,i="object"==typeof i&&i!=u?[i,t]:[t],f=i.length,e=this.cb,s=f+"_"+n,r;return(r=e[s])||(h=" { "+c.g.ka(n)+" } ",r=e[s]=c.a.eb(h,f)),r(i)}catch(l){o(Error("Unable to parse bindings.\nMessage: "+l+";\nBindings value: "+n))}}});c.J.instance=new c.J}();c.b("bindingProvider",c.J),function(){function t(n,t,r){for(var u=c.e.firstChild(t);t=u;)u=c.e.nextSibling(t),i(n,t,r)}function i(n,i,e){var s=r,o=1===i.nodeType;o&&c.e.Ia(i);(o&&e||c.J.instance.nodeHasBindings(i))&&(s=f(i,u,n,e).Gb);s&&t(n,i,!o)}function f(n,t,i,r){function l(n){return function(){return f[n]}}function a(){return f}var s=0,f,h;return c.h(function(){var y=i&&i instanceof c.z?i:new c.z(c.a.d(i)),p=y.$data,u,v;if(r&&c.Ra(n,y),f=("function"==typeof t?t():t)||c.J.instance.getBindings(n,y)){if(0===s){s=1;for(u in f)v=c.c[u],v&&8===n.nodeType&&!c.e.C[u]&&o(Error("The binding '"+u+"' cannot be used with virtual elements")),v&&"function"==typeof v.init&&(v=v.init(n,l(u),a,p,y))&&v.controlsDescendantBindings&&(h!==e&&o(Error("Multiple bindings ("+h+" and "+u+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.")),h=u);s=2}if(2===s)for(u in f)(v=c.c[u])&&"function"==typeof v.update&&v.update(n,l(u),a,p,y)}},u,{disposeWhenNodeIsRemoved:n}),{Gb:h===e}}c.c={};c.z=function(n,t){t?(c.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.$data=n};c.z.prototype.createChildContext=function(n){return new c.z(n,this)};c.z.prototype.extend=function(n){var t=c.a.extend(new c.z,this);return c.a.extend(t,n)};c.Ra=function(n,t){if(2==arguments.length)c.a.f.set(n,"__ko_bindingContext__",t);else return c.a.f.get(n,"__ko_bindingContext__")};c.ya=function(n,t,i){return 1===n.nodeType&&c.e.Ia(n),f(n,t,i,r)};c.Ya=function(n,i){(1===i.nodeType||8===i.nodeType)&&t(n,i,r)};c.xa=function(t,u){u&&1!==u.nodeType&&8!==u.nodeType&&o(Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node"));u=u||n.document.body;i(t,u,r)};c.ea=function(n){switch(n.nodeType){case 1:case 8:var t=c.Ra(n);if(t)return t;if(n.parentNode)return c.ea(n.parentNode)}};c.hb=function(n){return(n=c.ea(n))?n.$data:e};c.b("bindingHandlers",c.c);c.b("applyBindings",c.xa);c.b("applyBindingsToDescendants",c.Ya);c.b("applyBindingsToNode",c.ya);c.b("contextFor",c.ea);c.b("dataFor",c.hb)}();c.a.v(["click"],function(n){c.c[n]={init:function(t,i,r,u){return c.c.event.init.call(this,t,function(){var t={};return t[n]=i(),t},r,u)}}});c.c.event={init:function(n,t,i,u){var o=t()||{},e;for(e in o)(function(){var o=e;"string"==typeof o&&c.a.n(n,o,function(n){var s,h=t()[o],l,e;if(h){l=i();try{e=c.a.L(arguments);e.unshift(u);s=h.apply(u,e)}finally{s!==r&&(n.preventDefault?n.preventDefault():n.returnValue=f)}l[o+"Bubble"]===f&&(n.cancelBubble=r,n.stopPropagation&&n.stopPropagation())}})})()}};c.c.submit={init:function(n,t,i,u){"function"!=typeof t()&&o(Error("The value for a submit binding must be a function"));c.a.n(n,"submit",function(i){var e,o=t();try{e=o.call(u,n)}finally{e!==r&&(i.preventDefault?i.preventDefault():i.returnValue=f)}})}};c.c.visible={update:function(n,t){var i=c.a.d(t()),r="none"!=n.style.display;i&&!r?n.style.display="":!i&&r&&(n.style.display="none")}};c.c.enable={update:function(n,t){var i=c.a.d(t());i&&n.disabled?n.removeAttribute("disabled"):!i&&!n.disabled&&(n.disabled=r)}};c.c.disable={update:function(n,t){c.c.enable.update(n,function(){return!c.a.d(t())})}};c.c.value={init:function(n,t,i){function s(){var u=t(),f=c.k.r(n);c.g.$(u,i,"value",f,r)}var u=["change"],e=i().valueUpdate,o;e&&("string"==typeof e&&(e=[e]),c.a.N(u,e),u=c.a.za(u));c.a.ja&&"input"==n.tagName.toLowerCase()&&"text"==n.type&&"off"!=n.autocomplete&&(!n.form||"off"!=n.form.autocomplete)&&-1==c.a.j(u,"propertychange")&&(o=f,c.a.n(n,"propertychange",function(){o=r}),c.a.n(n,"blur",function(){o&&(o=f,s())}));c.a.v(u,function(t){var i=s;c.a.Hb(t,"after")&&(i=function(){setTimeout(s,0)},t=t.substring(5));c.a.n(n,t,i)})},update:function(n,t){var e="select"===c.a.o(n),u=c.a.d(t()),i=c.k.r(n),o=u!=i;0===u&&0!==i&&"0"!==i&&(o=r);o&&(i=function(){c.k.S(n,u)},i(),e&&setTimeout(i,0));e&&0<n.length&&v(n,u,f)}};c.c.options={update:function(n,i,f){var h,i,y,a,l;"select"!==c.a.o(n)&&o(Error("options binding applies only to SELECT elements"));for(var p=0==n.length,w=c.a.T(c.a.aa(n.childNodes,function(n){return n.tagName&&"option"===c.a.o(n)&&n.selected}),function(n){return c.k.r(n)||n.innerText||n.textContent}),b=n.scrollTop,s=c.a.d(i());0<n.length;)c.F(n.options[0]),n.remove(0);if(s){for(f=f(),"number"!=typeof s.length&&(s=[s]),f.optionsCaption&&(h=t.createElement("option"),c.a.Y(h,f.optionsCaption),c.k.S(h,e),n.appendChild(h)),i=0,y=s.length;i<y;i++){var h=t.createElement("option"),l="string"==typeof f.optionsValue?s[i][f.optionsValue]:s[i],l=c.a.d(l);c.k.S(h,l);a=f.optionsText;l="function"==typeof a?a(s[i]):"string"==typeof a?s[i][a]:l;(l===u||l===e)&&(l="");c.a.Qa(h,l);n.appendChild(h)}for(s=n.getElementsByTagName("option"),i=h=0,y=s.length;i<y;i++)0<=c.a.j(w,c.k.r(s[i]))&&(c.a.Pa(s[i],r),h++);n.scrollTop=b;p&&"value"in f&&v(n,c.a.d(f.value),r);c.a.lb(n)}}};c.c.options.oa="__ko.optionValueDomData__";c.c.selectedOptions={Ea:function(n){for(var t,u,i=[],n=n.childNodes,r=0,f=n.length;r<f;r++)t=n[r],u=c.a.o(t),"option"==u&&t.selected?i.push(c.k.r(t)):"optgroup"==u&&(t=c.c.selectedOptions.Ea(t),Array.prototype.splice.apply(i,[i.length,0].concat(t)));return i},init:function(n,t,i){c.a.n(n,"change",function(){var n=t(),r=c.c.selectedOptions.Ea(this);c.g.$(n,i,"value",r)})},update:function(n,t){var i,r;if("select"!=c.a.o(n)&&o(Error("values binding applies only to SELECT elements")),i=c.a.d(t()),i&&"number"==typeof i.length)for(var f=n.childNodes,u=0,e=f.length;u<e;u++)r=f[u],"option"===c.a.o(r)&&c.a.Pa(r,0<=c.a.j(i,c.k.r(r)))}};c.c.text={update:function(n,t){c.a.Qa(n,t())}};c.c.html={init:function(){return{controlsDescendantBindings:r}},update:function(n,t){var i=c.a.d(t());c.a.Y(n,i)}};c.c.css={update:function(n,t){var r=c.a.d(t()||{}),i,u;for(i in r)"string"==typeof i&&(u=c.a.d(r[i]),c.a.Ua(n,i,u))}};c.c.style={update:function(n,t){var r=c.a.d(t()||{}),i,u;for(i in r)"string"==typeof i&&(u=c.a.d(r[i]),n.style[i]=u||"")}};c.c.uniqueName={init:function(n,i){i()&&(n.name="ko_unique_"+ ++c.c.uniqueName.gb,(c.a.tb||c.a.ub)&&n.mergeAttributes(t.createElement("<input name='"+n.name+"'/>"),f))}};c.c.uniqueName.gb=0;c.c.checked={init:function(n,t,i){c.a.n(n,"click",function(){var u,f;if("checkbox"==n.type)u=n.checked;else if("radio"==n.type&&n.checked)u=n.value;else return;f=t();"checkbox"==n.type&&c.a.d(f)instanceof Array?(u=c.a.j(c.a.d(f),n.value),n.checked&&0>u?f.push(n.value):!n.checked&&0<=u&&f.splice(u,1)):c.g.$(f,i,"checked",u,r)});"radio"!=n.type||n.name||c.c.uniqueName.init(n,s(r))},update:function(n,t){var i=c.a.d(t());"checkbox"==n.type?n.checked=i instanceof Array?0<=c.a.j(i,n.value):i:"radio"==n.type&&(n.checked=n.value==i)}};a={"class":"className","for":"htmlFor"};c.c.attr={update:function(n,t){var s=c.a.d(t())||{},i,r,o;for(i in s)"string"==typeof i&&(r=c.a.d(s[i]),o=r===f||r===u||r===e,o&&n.removeAttribute(i),8>=c.a.ja&&i in a?(i=a[i],o?n.removeAttribute(i):n[i]=r):o||n.setAttribute(i,r.toString()))}};c.c.hasfocus={init:function(n,t,i){function u(n){var u=t();c.g.$(u,i,"hasfocus",n,r)}c.a.n(n,"focus",function(){u(r)});c.a.n(n,"focusin",function(){u(r)});c.a.n(n,"blur",function(){u(f)});c.a.n(n,"focusout",function(){u(f)})},update:function(n,t){var i=c.a.d(t());i?n.focus():n.blur();c.a.va(n,i?"focusin":"focusout")}};c.c["with"]={p:function(n){return function(){var t=n();return{"if":t,data:t,templateEngine:c.q.K}}},init:function(n,t){return c.c.template.init(n,c.c["with"].p(t))},update:function(n,t,i,r,u){return c.c.template.update(n,c.c["with"].p(t),i,r,u)}};c.g.D["with"]=f;c.e.C["with"]=r;c.c["if"]={p:function(n){return function(){return{"if":n(),templateEngine:c.q.K}}},init:function(n,t){return c.c.template.init(n,c.c["if"].p(t))},update:function(n,t,i,r,u){return c.c.template.update(n,c.c["if"].p(t),i,r,u)}};c.g.D["if"]=f;c.e.C["if"]=r;c.c.ifnot={p:function(n){return function(){return{ifnot:n(),templateEngine:c.q.K}}},init:function(n,t){return c.c.template.init(n,c.c.ifnot.p(t))},update:function(n,t,i,r,u){return c.c.template.update(n,c.c.ifnot.p(t),i,r,u)}};c.g.D.ifnot=f;c.e.C.ifnot=r;c.c.foreach={p:function(n){return function(){var t=c.a.d(n());return!t||"number"==typeof t.length?{foreach:t,templateEngine:c.q.K}:{foreach:t.data,includeDestroyed:t.includeDestroyed,afterAdd:t.afterAdd,beforeRemove:t.beforeRemove,afterRender:t.afterRender,templateEngine:c.q.K}}},init:function(n,t){return c.c.template.init(n,c.c.foreach.p(t))},update:function(n,t,i,r,u){return c.c.template.update(n,c.c.foreach.p(t),i,r,u)}};c.g.D.foreach=f;c.e.C.foreach=r;c.t=function(){};c.t.prototype.renderTemplateSource=function(){o(Error("Override renderTemplateSource"))};c.t.prototype.createJavaScriptEvaluatorBlock=function(){o(Error("Override createJavaScriptEvaluatorBlock"))};c.t.prototype.makeTemplateSource=function(n,i){if("string"==typeof n){var i=i||t,r=i.getElementById(n);return r||o(Error("Cannot find template with ID "+n)),new c.l.i(r)}if(1==n.nodeType||8==n.nodeType)return new c.l.M(n);o(Error("Unknown template type: "+n))};c.t.prototype.renderTemplate=function(n,t,i,r){return this.renderTemplateSource(this.makeTemplateSource(n,r),t,i)};c.t.prototype.isTemplateRewritten=function(n,i){return this.allowTemplateRewriting===f||!(i&&i!=t)&&this.V&&this.V[n]?r:this.makeTemplateSource(n,i).data("isRewritten")};c.t.prototype.rewriteTemplate=function(n,i,u){var f=this.makeTemplateSource(n,u),i=i(f.text());f.text(i);f.data("isRewritten",r);u&&u!=t||"string"!=typeof n||(this.V=this.V||{},this.V[n]=r)};c.b("templateEngine",c.t);c.Z=function(){function n(n,t,i){for(var r,f,n=c.g.W(n),e=c.g.D,u=0;u<n.length;u++)r=n[u].key,e.hasOwnProperty(r)&&(f=e[r],"function"==typeof f?(r=f(n[u].value))&&o(Error(r)):f||o(Error("This template engine does not support the '"+r+"' binding within its templates")));return n="ko.templateRewriting.applyMemoizedBindingsToNextSibling(function() {             return (function() { return { "+c.g.ka(n)+" } })()         })",i.createJavaScriptEvaluatorBlock(n)+t}var t=/(<[a-z]+\d*(\s+(?!data-bind=)[a-z0-9\-]+(=(\"[^\"]*\"|\'[^\']*\'))?)*\s+)data-bind=(["'])([\s\S]*?)\5/gi,i=/<\!--\s*ko\b\s*([\s\S]*?)\s*--\>/g;return{mb:function(n,t,i){t.isTemplateRewritten(n,i)||t.rewriteTemplate(n,function(n){return c.Z.zb(n,t)},i)},zb:function(r,u){return r.replace(t,function(t,i,r,f,e,o,s){return n(s,i,u)}).replace(i,function(t,i){return n(i,"<!-- ko -->",u)})},Za:function(n){return c.s.na(function(t,i){t.nextSibling&&c.ya(t.nextSibling,n,i)})}}}();c.b("templateRewriting",c.Z);c.b("templateRewriting.applyMemoizedBindingsToNextSibling",c.Z.Za),function(){c.l={};c.l.i=function(n){this.i=n};c.l.i.prototype.text=function(){var n=c.a.o(this.i),n="script"===n?"text":"textarea"===n?"value":"innerHTML",t;if(0==arguments.length)return this.i[n];t=arguments[0];"innerHTML"===n?c.a.Y(this.i,t):this.i[n]=t};c.l.i.prototype.data=function(n){if(1===arguments.length)return c.a.f.get(this.i,"templateSourceData_"+n);c.a.f.set(this.i,"templateSourceData_"+n,arguments[1])};c.l.M=function(n){this.i=n};c.l.M.prototype=new c.l.i;c.l.M.prototype.text=function(){if(0==arguments.length){var n=c.a.f.get(this.i,"__ko_anon_template__")||{};return n.ua===e&&n.da&&(n.ua=n.da.innerHTML),n.ua}c.a.f.set(this.i,"__ko_anon_template__",{ua:arguments[0]})};c.l.i.prototype.nodes=function(){if(0==arguments.length)return(c.a.f.get(this.i,"__ko_anon_template__")||{}).da;c.a.f.set(this.i,"__ko_anon_template__",{da:arguments[0]})};c.b("templateSources",c.l);c.b("templateSources.domElement",c.l.i);c.b("templateSources.anonymousTemplate",c.l.M)}(),function(){function i(n,t,i){for(var r,t=c.e.nextSibling(t);n&&(r=n)!==t;)n=c.e.nextSibling(r),(1===r.nodeType||8===r.nodeType)&&i(r)}function s(n,t){if(n.length){var r=n[0],u=n[n.length-1];i(r,u,function(n){c.xa(t,n)});i(r,u,function(n){c.s.Wa(n,[t])})}}function n(n){return n.nodeType?n:0<n.length?n[0]:u}function h(i,u,e,h,l){var l=l||{},a=i&&n(i),a=a&&a.ownerDocument,v=l.templateEngine||t;c.Z.mb(e,v,a);e=v.renderTemplate(e,h,l,a);("number"!=typeof e.length||0<e.length&&"number"!=typeof e[0].nodeType)&&o(Error("Template engine must return an array of DOM nodes"));a=f;switch(u){case"replaceChildren":c.e.X(i,e);a=r;break;case"replaceNode":c.a.Na(i,e);a=r;break;case"ignoreTargetNode":break;default:o(Error("Unknown renderMode: "+u))}return a&&(s(e,h),l.afterRender&&l.afterRender(e,h.$data)),e}var t;c.ra=function(n){n==e||n instanceof c.t||o(Error("templateEngine must inherit from ko.templateEngine"));t=n};c.qa=function(i,r,f,s,l){if(f=f||{},(f.templateEngine||t)==e&&o(Error("Set a template engine before calling renderTemplate")),l=l||"replaceChildren",s){var a=n(s);return c.h(function(){var t=r&&r instanceof c.z?r:new c.z(c.a.d(r)),u="function"==typeof i?i(t.$data):i,t=h(s,l,u,t,f);"replaceNode"==l&&(s=t,a=n(s))},u,{disposeWhen:function(){return!a||!c.a.fa(a)},disposeWhenNodeIsRemoved:a&&"replaceNode"==l?a.parentNode:a})}return c.s.na(function(n){c.qa(i,r,f,n,"replaceNode")})};c.Fb=function(n,t,i,r,f){function l(n,t){s(t,o);i.afterRender&&i.afterRender(t,n)}function a(t,r){var e="function"==typeof n?n(t):n;return o=f.createChildContext(c.a.d(t)),o.$index=r,h(u,"ignoreTargetNode",e,o,i)}var o;return c.h(function(){var n=c.a.d(t)||[];"undefined"==typeof n.length&&(n=[n]);n=c.a.aa(n,function(n){return i.includeDestroyed||n===e||n===u||!c.a.d(n._destroy)});c.a.Oa(r,n,a,i,l)},u,{disposeWhenNodeIsRemoved:r})};c.c.template={init:function(n,t){var i=c.a.d(t());return"string"==typeof i||i.name||1!=n.nodeType&&8!=n.nodeType||(i=1==n.nodeType?n.childNodes:c.e.childNodes(n),i=c.a.Ab(i),new c.l.M(n).nodes(i)),{controlsDescendantBindings:r}},update:function(n,t,i,f,e){t=c.a.d(t());f=r;"string"==typeof t?i=t:(i=t.name,"if"in t&&(f=f&&c.a.d(t["if"])),"ifnot"in t&&(f=f&&!c.a.d(t.ifnot)));var o=u;"object"==typeof t&&"foreach"in t?o=c.Fb(i||n,f&&t.foreach||[],t,n,e):f?(e="object"==typeof t&&"data"in t?e.createChildContext(c.a.d(t.data)):e,o=c.qa(i||n,e,t,n)):c.e.ha(n);e=o;(t=c.a.f.get(n,"__ko__templateSubscriptionDomDataKey__"))&&"function"==typeof t.A&&t.A();c.a.f.set(n,"__ko__templateSubscriptionDomDataKey__",e)}};c.g.D.template=function(n){return n=c.g.W(n),1==n.length&&n[0].unknown||c.g.wb(n,"name")?u:"This template engine does not support anonymous templates nested within its templates"};c.e.C.template=r}();c.b("setTemplateEngine",c.ra);c.b("renderTemplate",c.qa),function(){c.a.O=function(n,t,i){var r,h,a;if(i===e)return c.a.O(n,t,1)||c.a.O(n,t,10)||c.a.O(n,t,Number.MAX_VALUE);for(var n=n||[],t=t||[],o=n,l=t,f=[],r=0;r<=l.length;r++)f[r]=[];for(r=0,h=Math.min(o.length,i);r<=h;r++)f[0][r]=r;for(r=1,h=Math.min(l.length,i);r<=h;r++)f[r][0]=r;for(var h=o.length,s,v=l.length,r=1;r<=h;r++)for(s=Math.max(1,r-i),a=Math.min(v,r+i);s<=a;s++)f[s][r]=o[r-1]===l[s-1]?f[s-1][r-1]:Math.min(f[s-1][r]===e?Number.MAX_VALUE:f[s-1][r]+1,f[s][r-1]===e?Number.MAX_VALUE:f[s][r-1]+1);if(i=n.length,o=t.length,l=[],r=f[o][i],r===e)f=u;else{for(;0<i||0<o;)h=f[o][i],v=0<o?f[o-1][i]:r+1,a=0<i?f[o][i-1]:r+1,s=0<o&&0<i?f[o-1][i-1]:r+1,(v===e||v<h-1)&&(v=r+1),(a===e||a<h-1)&&(a=r+1),s<h-1&&(s=r+1),v<=a&&v<s?(l.push({status:"added",value:t[o-1]}),o--):(a<v&&a<s?l.push({status:"deleted",value:n[i-1]}):(l.push({status:"retained",value:n[i-1]}),o--),i--);f=l.reverse()}return f}}();c.b("utils.compareArrays",c.a.O),function(){function n(n){if(2<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))}}function t(t,i,r,f,e){var o=[],t=c.h(function(){var t=i(r,e)||[];0<o.length&&(n(o),c.a.Na(o,t),f&&f(r,t));o.splice(0,o.length);c.a.N(o,t)},u,{disposeWhenNodeIsRemoved:t,disposeWhen:function(){return 0==o.length||!c.a.fa(o[0])}});return{xb:o,h:t}}c.a.Oa=function(i,o,s,h,l){for(var y,nt,o=o||[],h=h||{},ut=c.a.f.get(i,"setDomNodeChildrenFromArrayMapping_lastMappingResult")===e,d=c.a.f.get(i,"setDomNodeChildrenFromArrayMapping_lastMappingResult")||[],p=c.a.T(d,function(n){return n.$a}),b=c.a.O(p,o),o=[],k=0,v=[],w=0,p=[],g=u,a=0,ft=b.length;a<ft;a++)switch(b[a].status){case"retained":y=d[k];y.qb(w);w=o.push(y);0<y.P.length&&(g=y.P[y.P.length-1]);k++;break;case"deleted":d[k].h.A();n(d[k].P);c.a.v(d[k].P,function(n){v.push({element:n,index:a,value:b[a].value});g=n});k++;break;case"added":for(var y=b[a].value,it=c.m(w),w=t(i,s,y,l,it),tt=w.xb,w=o.push({$a:b[a].value,P:tt,h:w.h,qb:it}),rt=0,et=tt.length;rt<et;rt++)nt=tt[rt],p.push({element:nt,index:a,value:b[a].value}),g==u?c.e.Ka(i,nt):c.e.Fa(i,nt,g),g=nt;l&&l(y,tt,it)}if(c.a.v(v,function(n){c.F(n.element)}),s=f,!ut){if(h.afterAdd)for(a=0;a<p.length;a++)h.afterAdd(p[a].element,p[a].index,p[a].value);if(h.beforeRemove){for(a=0;a<v.length;a++)h.beforeRemove(v[a].element,v[a].index,v[a].value);s=r}}if(!s&&v.length)for(a=0;a<v.length;a++)h=v[a].element,h.parentNode&&h.parentNode.removeChild(h);c.a.f.set(i,"setDomNodeChildrenFromArrayMapping_lastMappingResult",o)}}();c.b("utils.setDomNodeChildrenFromArrayMapping",c.a.Oa);c.q=function(){this.allowTemplateRewriting=f};c.q.prototype=new c.t;c.q.prototype.renderTemplateSource=function(n){var t=!(9>c.a.ja)&&n.nodes?n.nodes():u;return t?c.a.L(t.cloneNode(r).childNodes):(n=n.text(),c.a.pa(n))};c.q.K=new c.q;c.ra(c.q.K);c.b("nativeTemplateEngine",c.q),function(){c.ma=function(){var n=this.vb=function(){if("undefined"==typeof jQuery||!jQuery.tmpl)return 0;try{if(0<=jQuery.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(n){}return 1}();this.renderTemplateSource=function(i,r,f){f=f||{};2>n&&o(Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later."));var e=i.data("precompiled");return e||(e=i.text()||"",e=jQuery.template(u,"{{ko_with $item.koBindingContext}}"+e+"{{/ko_with}}"),i.data("precompiled",e)),i=[r.$data],r=jQuery.extend({koBindingContext:r},f.templateOptions),r=jQuery.tmpl(e,i,r),r.appendTo(t.createElement("div")),jQuery.fragments={},r};this.createJavaScriptEvaluatorBlock=function(n){return"{{ko_code ((function() { return "+n+" })()) }}"};this.addTemplate=function(n,i){t.write("<script type='text/html' id='"+n+"'>"+i+"<\/script>")};0<n&&(jQuery.tmpl.tag.ko_code={open:"__.push($1 || '');"},jQuery.tmpl.tag.ko_with={open:"with($1) {",close:"} "})};c.ma.prototype=new c.t;var n=new c.ma;0<n.vb&&c.ra(n);c.b("jqueryTmplTemplateEngine",c.ma)}()}var e=void 0,r=!0,u=null,f=!1;"function"==typeof require&&"object"==typeof exports&&"object"==typeof module?h(module.exports||exports):"function"==typeof define&&define.amd?define(["exports"],h):h(n.ko={});r}(window,document,navigator);!function(n){n.extend(n,{placeholder:{browser_supported:function(){return void 0!==this._supported?this._supported:this._supported=!!("placeholder"in n('<input type="text">')[0])},shim:function(t){var i={color:"#888",cls:"placeholder",selector:"input[placeholder], textarea[placeholder]"};return n.extend(i,t),!this.browser_supported()&&n(i.selector)._placeholder_shim(i)}}});n.extend(n.fn,{_placeholder_shim:function(t){function i(t){var i=n(t).offsetParent().offset(),r=n(t).offset();return{top:r.top-i.top,left:r.left-i.left,width:n(t).width()}}function r(t){var u=t.data("target");"undefined"!=typeof u&&(t.css(i(u)),n(window).one("resize",function(){r(t)}))}return this.each(function(){var u=n(this),o,e,f;if(u.is(":visible")){if(u.data("placeholder"))return o=u.data("placeholder"),o.css(i(u)),!0;e={};u.is("textarea")||"auto"==u.css("height")||(e={lineHeight:1.5,whiteSpace:"nowrap"});f=n("<label />").text(u.attr("placeholder")).addClass(t.cls).css(n.extend({position:"absolute",display:"inline",float:"none",overflow:"hidden",textAlign:"left",color:t.color,cursor:"text",paddingTop:u.css("padding-top"),paddingRight:u.css("padding-right"),paddingBottom:u.css("padding-bottom"),paddingLeft:u.css("padding-left"),fontSize:u.css("font-size"),fontFamily:u.css("font-family"),fontStyle:u.css("font-style"),fontWeight:u.css("font-weight"),textTransform:u.css("text-transform"),backgroundColor:"transparent",zIndex:99},e)).css(i(this)).attr("for",this.id).data("target",u).click(function(){n(this).data("target").focus()}).insertBefore(this);u.data("placeholder",f).keydown(function(){f.hide()}).blur(function(){f[u.val().length?"hide":"show"]()}).triggerHandler("blur");n(window).one("resize",function(){r(f)})}})}})}(jQuery);jQuery(document).add(window).bind("ready load",function(){jQuery.placeholder&&jQuery.placeholder.shim()})