From be526cc13ce5f2b7e7387263692509b311259943 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yago=20P=C3=A9rez=20V=C3=A1zquez?= Date: Sun, 1 Dec 2013 20:46:31 +0100 Subject: [PATCH] v1.1.3 --- dist/js/Stashy.js | 39 ++++++++++++++++++---------------- dist/js/Stashy.min.js | 2 +- docs/public/Scripts/Stashy.js | 39 ++++++++++++++++++---------------- docs/public/Scripts/vendor.js | 2 +- nuget/Stashy.1.1.3.nupkg | Bin 0 -> 49899 bytes src/Stashy.Notify.js | 39 ++++++++++++++++++---------------- 6 files changed, 65 insertions(+), 56 deletions(-) create mode 100644 nuget/Stashy.1.1.3.nupkg diff --git a/dist/js/Stashy.js b/dist/js/Stashy.js index 90fae8a..aeffd55 100644 --- a/dist/js/Stashy.js +++ b/dist/js/Stashy.js @@ -1621,11 +1621,8 @@ window.Modernizr = (function( window, document, undefined ) { hide = function() { self.element.addClass("fadeOut"); setTimeout(function() { - //Check for self because activeDurantion can be enabled - if (self) { - self.element.remove(); - self = null; - } + self.element.remove(); + self = null; if (toastC.children().length == 0) { toastC.remove(); } @@ -1636,7 +1633,11 @@ window.Modernizr = (function( window, document, undefined ) { toastC.append(this.element); if (self.options.activeDuration > 0) { - setTimeout(hide, self.options.activeDuration); + setTimeout(function() { + if (self) { + hide(); + } + }, self.options.activeDuration); } this.closeElement.on("click", hide); @@ -1653,11 +1654,8 @@ window.Modernizr = (function( window, document, undefined ) { hide = function() { self.element.addClass(positionY == "top" ? "fadeOutUp" : "fadeOutDown"); setTimeout(function() { - //Check for self because activeDurantion can be enabled - if (self) { - self.element.remove(); - self = null; - } + self.element.remove(); + self = null; if (barC.children().length == 0) { barC.remove(); } @@ -1667,7 +1665,11 @@ window.Modernizr = (function( window, document, undefined ) { barC.append(this.element); if (self.options.activeDuration > 0) { - setTimeout(hide, self.options.activeDuration); + setTimeout(function() { + if (self) { + hide(); + } + }, self.options.activeDuration); } this.closeElement.on("click", hide); @@ -1683,11 +1685,8 @@ window.Modernizr = (function( window, document, undefined ) { hide = function() { self.element.addClass(positionX == "left" ? "fadeOutLeft" : "fadeOutRight"); setTimeout(function() { - //Check for self because activeDurantion can be enabled - if (self) { - self.element.remove(); - self = null; - } + self.element.remove(); + self = null; }, self.options.animDuration == "fast" ? 1000 : 2000); }; this.element.addClass("panel " + positionX) @@ -1695,7 +1694,11 @@ window.Modernizr = (function( window, document, undefined ) { $(this.options.target).append(this.element); if (self.options.activeDuration > 0) { - setTimeout(hide, self.options.activeDuration); + setTimeout(function() { + if (self) { + hide(); + } + }, self.options.activeDuration); } this.closeElement.on("click", hide); diff --git a/dist/js/Stashy.min.js b/dist/js/Stashy.min.js index e1fbd3c..4b94dc9 100644 --- a/dist/js/Stashy.min.js +++ b/dist/js/Stashy.min.js @@ -4,4 +4,4 @@ * Licensed under http://http://opensource.org/licenses/MIT */ -!function(a,b){var c,d,e=b.event;c=e.special.debouncedresize={setup:function(){b(this).on("resize",c.handler)},teardown:function(){b(this).off("resize",c.handler)},handler:function(a,b){var f=this,g=arguments,h=function(){a.type="debouncedresize",e.dispatch.apply(f,g)};d&&clearTimeout(d),b?h():d=setTimeout(h,c.threshold)},threshold:150}}(window,jQuery),function(){for(var a=0,b=["ms","moz","webkit","o"],c=0;c0&&(f.duration=c),d&&(f.easing=d),e&&(f.complete=e),b("html,body").animate({scrollTop:b(a).offset().top},f)}}}}(window.Stashy||(window.Stashy={}),jQuery),window.Modernizr=function(a,b,c){function d(a){r.cssText=a}function e(a,b){return typeof a===b}function f(a,b){return!!~(""+a).indexOf(b)}function g(a,b){for(var d in a){var e=a[d];if(!f(e,"-")&&r[e]!==c)return"pfx"==b?e:!0}return!1}function h(a,b,d){for(var f in a){var g=b[a[f]];if(g!==c)return d===!1?a[f]:e(g,"function")?g.bind(d||b):g}return!1}function i(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),f=(a+" "+u.join(d+" ")+d).split(" ");return e(b,"string")||e(b,"undefined")?g(f,b):(f=(a+" "+v.join(d+" ")+d).split(" "),h(f,b,c))}var j,k,l,m="2.6.2",n={},o=b.documentElement,p="modernizr",q=b.createElement(p),r=q.style,s=({}.toString," -webkit- -moz- -o- -ms- ".split(" ")),t="Webkit Moz O ms",u=t.split(" "),v=t.toLowerCase().split(" "),w={},x=[],y=x.slice,z=function(a,c,d,e){var f,g,h,i,j=b.createElement("div"),k=b.body,l=k||b.createElement("body");if(parseInt(d,10))for(;d--;)h=b.createElement("div"),h.id=e?e[d]:p+(d+1),j.appendChild(h);return f=["­",'"].join(""),j.id=p,(k?j:l).innerHTML+=f,l.appendChild(j),k||(l.style.background="",l.style.overflow="hidden",i=o.style.overflow,o.style.overflow="hidden",o.appendChild(l)),g=c(j,a),k?j.parentNode.removeChild(j):(l.parentNode.removeChild(l),o.style.overflow=i),!!g},A={}.hasOwnProperty;l=e(A,"undefined")||e(A.call,"undefined")?function(a,b){return b in a&&e(a.constructor.prototype[b],"undefined")}:function(a,b){return A.call(a,b)},Function.prototype.bind||(Function.prototype.bind=function(a){var b=this;if("function"!=typeof b)throw new TypeError;var c=y.call(arguments,1),d=function(){if(this instanceof d){var e=function(){};e.prototype=b.prototype;var f=new e,g=b.apply(f,c.concat(y.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(y.call(arguments)))};return d}),w.csstransforms=function(){return!!i("transform")},w.csstransforms3d=function(){var a=!!i("perspective");return a&&"webkitPerspective"in o.style&&z("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b){a=9===b.offsetLeft&&3===b.offsetHeight}),a},w.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:z(["@media (",s.join("touch-enabled),("),p,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=9===a.offsetTop}),c};for(var B in w)l(w,B)&&(k=B.toLowerCase(),n[k]=w[B](),x.push((n[k]?"":"no-")+k));return n.addTest=function(a,b){if("object"==typeof a)for(var d in a)l(a,d)&&n.addTest(d,a[d]);else{if(a=a.toLowerCase(),n[a]!==c)return n;b="function"==typeof b?b():b,"undefined"!=typeof enableClasses&&enableClasses&&(o.className+=" "+(b?"":"no-")+a),n[a]=b}return n},d(""),q=j=null,n._version=m,n._prefixes=s,n._domPrefixes=v,n._cssomPrefixes=u,n.testProp=function(a){return g([a])},n.testAllProps=i,n.testStyles=z,n}(this,this.document),function(a,b,c){"use strict";var d=function(){function a(a,d){var e=b((a||"")+".st-offcanvas"||".st-offcanvas");return e[0]==c||1==e.data("st-offcanvas")?!1:(this.element=e,this.showmenuselector=this.element.find(".showmenubutton"),this.showadditionalselector=this.element.find(".showadditionalbutton"),this.menu=this.element.find(".st-offcanvas-menu"),this.main=this.element.find(".st-offcanvas-main"),this.additional=this.element.find(".st-offcanvas-additional"),this.element.data("st-offcanvas",!0),this.enabled=!1,this.options={onMobileLayout:b.noop,onTabletLayout:b.noop,onDesktopLayout:b.noop,useTransitions:!0,closeOnClickOutside:!0,enableTouch:!1},b.extend(this.options||{},d),void 0)}var d=function(a){a.showadditionalselector.css("visibility","visible"),a.showmenuselector.css("visibility","visible")},e=function(a){a.showadditionalselector.css("visibility","visible"),a.showmenuselector.css("visibility","hidden")},f=function(a){a.showadditionalselector.css("visibility","hidden"),a.showmenuselector.css("visibility","hidden")},g=function(a){var c=b(window).width();768>c?(d(a),a.options.onMobileLayout()):c>=768&&978>c?(e(a),a.options.onTabletLayout()):(f(a),a.options.onDesktopLayout())},h=function(a){var b=a.data.offcanvas;if(!Hammer.utils.isVertical(a.gesture.direction))switch(a.gesture.preventDefault(),a.stopPropagation(),a.type){case"swipeleft":b.element.hasClass("active-menu")?b.element.removeClass("active-menu"):b.additional.length>0&&b.element.addClass("active-additional"),a.gesture.stopDetect();break;case"swiperight":b.element.hasClass("active-additional")?b.element.removeClass("active-additional"):b.menu.length>0&&b.element.addClass("active-menu"),a.gesture.stopDetect()}};return a.prototype.layout=function(){if(null!=this.element){var a=this;if(b("html").addClass("js"),this.showmenuselector.on("click",function(b){return a.element.toggleClass("active-menu"),b.stopPropagation(),!1}),this.showadditionalselector.on("click",function(b){return a.element.toggleClass("active-additional"),b.stopPropagation(),!1}),0==this.element.find(".st-offcanvas-additional").length&&this.element.addClass("no-additional"),0==this.element.find(".st-offcanvas-menu").length&&this.element.addClass("no-menu"),this.options.closeOnClickOutside){var a=this;this.element.on("click",function(){a.close()})}return b(window).on("debouncedresize",function(){return g(a),!1}),g(a),a.options.useTransitions&&this.element.addClass("active-transitions"),this.options.enableTouch&&"function"==typeof Hammer&&Modernizr.touch&&(this.element.hammer({drag_lock_to_axis:!0}),this.element.on("swipeleft swiperight",{offcanvas:this},h)),this.enabled=!0,this}},a.prototype.close=function(){null!=this.element&&this.element.removeClass("active-menu active-additional")},a}();a.OffCanvas=function(a,b){return new d(a,b)}}(window.Stashy||(window.Stashy={}),jQuery),function(a,b,c){var d=function(){function a(a,d){var e=b((a||"")+".st-flyout"||".st-flyout");return e[0]==c||1==e.data("st-flyout")?!1:(this.element=e,this.container=this.element.find(".st-flyout-container"),this.element.data("st-flyout",!0),this.enabled=!1,this.options={slideType:"push",closeOnClickOutside:!0,enableTouch:!1},b.extend(this.options||{},d),void 0)}var d=function(a){var b=a.data.flyout;if(!Hammer.utils.isVertical(a.gesture.direction))switch(a.gesture.preventDefault(),a.stopPropagation(),a.type){case"swipeleft":b.close(),a.gesture.stopDetect();break;case"swiperight":b.open(),a.gesture.stopDetect()}},e=function(){var a=navigator.userAgent;return a.indexOf("Mozilla/5.0")>-1&&a.indexOf("Android ")>-1&&a.indexOf("AppleWebKit")>-1&&!(a.indexOf("Chrome")>-1)};return a.prototype.layout=function(){if(null!=this.element){if(b("html").addClass("js"),this.element.find(".st-flyout-toggle").on("click",function(a){return b(this).closest(".st-flyout-container").toggleClass("active-menu"),a.stopPropagation(),!1}),"reveal"==this.options.slideType?this.element.find(".st-flyout-container").addClass("st-reveal"):this.element.find(".st-flyout-container").addClass("st-push"),Modernizr&&Modernizr.csstransforms3d&&!e()&&this.element.find(".st-flyout-container").addClass("active-transforms"),this.options.closeOnClickOutside){var a=this;this.element.on("click",function(){a.close()})}return this.options.enableTouch&&"function"==typeof Hammer&&Modernizr.touch&&(this.element.hammer({drag_lock_to_axis:!0}),this.element.on("swipeleft swiperight",{flyout:this},d)),this.enabled=!0,this}},a.prototype.open=function(){null!=this.element&&this.container.addClass("active-menu")},a.prototype.close=function(){null!=this.element&&this.container.removeClass("active-menu")},a}();a.Flyout=function(a,b){return new d(a,b)}}(window.Stashy||(window.Stashy={}),jQuery),function(a,b,c){"use strict";var d=function(){function a(a,d){var e=b((a||"")+".st-toggle"||".st-toggle");return e[0]==c||1==e.data("st-toggle")?!1:(this.element=e,this.element.data("st-toggle",!0),this.menu=this.element.find(".st-toggle-navigation"),this.menulink=this.element.find(".st-toggle-menu-link"),this.enabled=!1,this.options={closeOnClickOutside:!0,closeOnClick:!0,fixed:!1},b.extend(this.options||{},d),void 0)}return a.prototype.layout=function(){var a=this;if(null!=this.element){if(b("html").addClass("js"),this.menulink.click(function(b){return a.menulink.toggleClass("active"),a.menu.toggleClass("active"),b.stopPropagation(),!1}),this.options.fixed&&a.element.addClass("st-toggle-fixed"),this.options.closeOnClickOutside){var a=this;a.element.on("click",function(a){a.stopPropagation()}),b("html").on("click",function(){a.close()})}return this.options.closeOnClick&&this.element.find("a:not('.st-toggle-menu-link')").on("click",function(){a.close()}),this.enabled=!0,this}},a.prototype.close=function(){this.menu.removeClass("active")},a}();a.Toggle=function(a,b){return new d(a,b)}}(window.Stashy||(window.Stashy={}),jQuery),function(a,b){var c=function(){function a(a){this.selector=a||"img"}return a.prototype.on=function(a,c){a=a||"",c=c||"",b(this.selector).each(function(){b(this).parent().hasClass("st-image-container")||($image=b(this).wrap("
"),$image.wrap("
"))})},a.prototype.update=function(a,c){a=a||"",c=c||"",b(this.selector).each(function(){b(this).closest(".st-image").removeAttr("class").addClass("st-image "+a+" "+c+(b(this).height()>b(this).width()?" portrait":""))})},a.prototype.off=function(){b(this.selector).each(function(){b(this).parent().hasClass("st-image-container")&&(b(this).unwrap(),b(this).parent().hasClass("st-image")&&b(this).unwrap())})},a}();a.FocalPoint=function(a,b){return new c(a,b)}}(window.Stashy||(window.Stashy={}),jQuery),function(a,b){var c=function(){function a(a){this.target=a}return a.prototype.on=function(a,c,d,e){var f=this;if(f.target){var g=b('
');a&&b(g).css("position",a),c&&b(g).css("top",c),d||(d="#000"),b(g).append(b(''+''+''+''+''+'')),e&&"prepend"==e?b(f.target).prepend(b(g)[0]):b(f.target).append(b(g)[0])}},a.prototype.off=function(){b(".st-loader").remove()},a}();a.Loader=function(a,b){return new c(a,b)}}(window.Stashy||(window.Stashy={}),jQuery),function(a,b,c){var d=function(){function a(a,d){return a?(this.element=a,this.options={linkClass:"",linkText:"Show more",howMany:1},b.extend(this.options||{},d),(0==this.options.howMany||c)&&(this.options.howMany=1),void 0):!1}return a.prototype.on=function(){var a=this;return b(a.element+":gt("+(a.options.howMany-1)+")").hide().last().after(b('').attr("href","#").text(a.options.linkText).on("click",function(){var c=this;return b(a.element+":not(:visible):lt("+a.options.howMany+")").fadeIn(function(){0==b(a.element+":not(:visible)").length&&b(c).remove()}),!1})),this},a.prototype.off=function(){var a=this;return b(a.element+":gt("+(a.options.howMany-1)+")").show().last().next().remove(),this},a}();a.ShowMeMore=function(a,b){return new d(a,b)}}(window.Stashy||(window.Stashy={}),jQuery),function(a,b,c){function d(a){a.pane_width=a.element.width(),a.panes.each(function(){b(this).width(a.pane_width)}),a.container.width(a.pane_width*a.pane_count)}function e(a,b,c){if(a.container.removeClass("animate"),c&&a.container.addClass("animate"),Modernizr.csstransforms3d)a.container.css("transform","translate3d("+b+"%,0,0) scale3d(1,1,1)");else if(Modernizr.csstransforms)a.container.css("transform","translate("+b+"%,0)");else{var d=a.pane_width*a.pane_count/100*b;a.container.css("left",d+"px")}}function f(a,c){a.children().each(function(){b(this).removeClass("active")}),a.find("[data-pane='"+c+"']").addClass("active")}function g(a){a.element.find("[data-pane]").on("click",function(b){var c=b.target.attributes["data-pane"].value;"next"==c?a.next():"prev"==c?a.prev():a.showPane(parseInt(c)),a.options.autoSlide=!1})}function h(a){var b=a.data.slider;switch(a.gesture.preventDefault(),a.stopPropagation(),b.options.autoSlide=!1,a.type){case"dragright":case"dragleft":var c=-(100/b.pane_count)*b.current_pane,d=100/b.pane_width*a.gesture.deltaX/b.pane_count;(0==b.current_pane&&a.gesture.direction==Hammer.DIRECTION_RIGHT||b.current_pane==b.pane_count-1&&a.gesture.direction==Hammer.DIRECTION_LEFT)&&(d*=.4),e(b,d+c);break;case"swipeleft":b.next(),a.gesture.stopDetect();break;case"swiperight":b.prev(),a.gesture.stopDetect();break;case"release":Math.abs(a.gesture.deltaX)>b.pane_width/2?"right"==a.gesture.direction?b.prev():b.next():b.showPane(b.current_pane,!0)}}var i=function(){function a(a,d){var e=b((a||"")+".st-slider"||".st-slider");return e[0]==c?!1:(this.element=e,this.container=b(">.st-slider-panes",e),this.panes=b(">.st-slider-panes>li",e),this.pane_width=0,this.pane_count=this.panes.length,this.current_pane=0,this.options={enableControls:!0,enableIndicators:!0,showOnHover:!0,autoSlide:!0,enableTouch:!1,duration:5e3},b.extend(this.options,d),void 0)}return a}();i.prototype.on=function(){var a=this;if(this.element==c)return!1;if(d(this),b(window).on("load debouncedresize orientationchange",function(){d(a)}),this.options.enableIndicators){this.indicators=b("
    ");for(var e=0;e");this.element.append(this.indicators),f(this.indicators,this.current_pane)}if(this.options.enableControls&&(this.controlleft=b("
    "),this.element.append(this.controlleft),this.controlright=b(""),this.element.append(this.controlright)),this.options.autoSlide)var i=setInterval(function(){a.options.autoSlide?a.next():clearInterval(i)},this.options.duration);return this.options.showOnHover&&(this.element.addClass("controlsonhover"),this.element.hover(function(){a.element.removeClass("controlsonhover")},function(){a.element.addClass("controlsonhover")})),g(this),this.options.enableTouch&&"function"==typeof Hammer&&(this.element.hammer({drag_lock_to_axis:!0}),this.element.on("release dragleft dragright swipeleft swiperight",{slider:this},h),this.options.showOnHover&&this.element.on("tap",function(){a.element.toggleClass("controlsonhover")})),this},i.prototype.showPane=function(a){a=Math.max(0,Math.min(a,this.pane_count-1)),this.current_pane=a,this.options.enableIndicators&&f(this.indicators,this.current_pane);var b=-(100/this.pane_count*this.current_pane);e(this,b,!0)},i.prototype.next=function(){var a;return a=this.current_pane+1==this.pane_count?this.options.autoSlide?0:this.current_pane:this.current_pane+1,this.showPane(a,!0)},i.prototype.prev=function(){var a;return a=this.current_pane-1<0?this.options.autoSlide?this.pane_count-1:this.current_pane:this.current_pane-1,this.showPane(a,!0)},a.Slider=function(a,b){return new i(a,b)}}(window.Stashy||(window.Stashy={}),jQuery),function(a,b,c){var d=function(){function a(a,d){var e=b((a||"")+".st-refresh"||".st-refresh");return e[0]==c?!1:(this.element=e,this.pullrefresh=this.element.find(".st-refresh-pullrefresh"),this.icon=this.element.find(".st-refresh-icon"),this.slidedown_height=0,this.anim=null,this.dragged_down=!1,this.options={onRelease:b.noop(),breakpoint:100},b.extend(this.options||{},d),void 0)}var d=function(a){var b=this;switch(a.type){case"touch":e.apply(b);break;case"release":if(!this.dragged_down)return;cancelAnimationFrame(this.anim),this.slidedown_height>=this.options.breakpoint?(b.element.addClass("pullrefresh-loading"),b.icon.addClass("st-refresh-icon loading"),f.apply(b,[60]),this.options.onRelease.call(b)):(b.pullrefresh.addClass("slideup"),b.element.addClass("pullrefresh-slideup"),e.apply(this));break;case"dragdown":this.dragged_down=!0;var c=window.scrollY;if(c>5)return;0!==c&&window.scrollTo(0,0),this.anim||g.apply(b),a.gesture.preventDefault(),this.slidedown_height=.4*a.gesture.deltaY}},e=function(){this.element[0].className="st-refresh",this.slidedown_height=0,f.apply(this,[0]),cancelAnimationFrame(this.anim),this.anim=null,this.dragged_down=!1},f=function(a){Modernizr.csstransforms3d?(this.element[0].style.transform="translate3d(0,"+a+"px,0) ",this.element[0].style.oTransform="translate3d(0,"+a+"px,0)",this.element[0].style.msTransform="translate3d(0,"+a+"px,0)",this.element[0].style.mozTransform="translate3d(0,"+a+"px,0)",this.element[0].style.webkitTransform="translate3d(0,"+a+"px,0) scale3d(1,1,1)"):Modernizr.csstransforms?(this.element[0].style.transform="translate(0,"+a+"px) ",this.element[0].style.oTransform="translate(0,"+a+"px)",this.element[0].style.msTransform="translate(0,"+a+"px)",this.element[0].style.mozTransform="translate(0,"+a+"px)",this.element[0].style.webkitTransform="translate(0,"+a+"px)"):this.element[0].style.top=a+"px"},g=function(){var a=this;f.apply(this,[this.slidedown_height]),this.slidedown_height>=this.options.breakpoint?(this.element.addClass("pullrefresh-breakpoint"),this.pullrefresh[0].className="st-refresh-pullrefresh breakpoint",this.icon[0].className="st-refresh-icon arrow arrow-up"):(this.element.removeClass("pullrefresh-breakpoint"),this.pullrefresh[0].className="st-refresh-pullrefresh",this.icon[0].className="st-refresh-icon arrow"),this.anim=requestAnimationFrame(function(){g.apply(a)})};return a.prototype.on=function(){var a=this;return b(this.element).hammer(),b(this.element).on("touch dragdown release",function(b){d.apply(a,[b])}),this},a.prototype.slideUp=function(){var a=this;cancelAnimationFrame(this.anim),this.pullrefresh[0].className="st-refresh-pullrefresh slideup",this.element[0].className="st-refresh pullrefresh-slideup",f.apply(this,[0]),setTimeout(function(){e.apply(a)},500)},a}();a.Refresh=function(a,b){return new d(a,b)}}(window.Stashy||(window.Stashy={}),jQuery),function(a,b,c){var d=function(){function a(a){var d=b(a);return d[0]==c?!1:(this.videos=d,void 0)}return a.prototype.on=function(){return this.videos.each(function(){var a=b(this);if(!("embed"===this.tagName.toLowerCase()&&a.parent("object").length||a.parent(".st-video").length)){var c="object"===this.tagName.toLowerCase()||a.attr("height")&&!isNaN(parseInt(a.attr("height"),10))?parseInt(a.attr("height"),10):a.height(),d=isNaN(parseInt(a.attr("width"),10))?a.width():parseInt(a.attr("width"),10),e=c/d;if(!a.attr("id")){var f="fitvid"+Math.floor(999999*Math.random());a.attr("id",f)}a.wrap('
    ').parent(".st-video").css("padding-top",100*e+"%"),a.removeAttr("height").removeAttr("width")}}),this},a}();a.ElasticVideo=function(a){return new d(a)}}(window.Stashy||(window.Stashy={}),jQuery),function(a,b,c){var d=function(){function a(a){var d=b(a);return d[0]==c?!1:(this.elements=d,void 0)}var d=function(a,c,d){this.elements.each(function(){var e=b(this);e.css("font-size",Math.max(Math.min(e.width()/(10*a),parseFloat(d)),parseFloat(c)))})};return a.prototype.on=function(a,c,e){var a=a||1,f=c||Number.NEGATIVE_INFINITY,g=e||Number.POSITIVE_INFINITY,h=this;return d.apply(this,[a,f,g]),b(window).on("debouncedresize.ElasticText orientationchange.ElasticText",function(){d.apply(h,[a,f,g])}),this},a}();a.ElasticText=function(a){return new d(a)}}(window.Stashy||(window.Stashy={}),jQuery),function(a,b,c){"use strict";var d=function(){function a(a,d){var e=b((a||"")+".st-table"||".st-table");return e[0]==c||1==e.data("st-table")?!1:(this.element=e,this.thead=this.element.find("thead"),this.tbody=this.element.find("tbody"),this.hdrCols=this.element.find("th"),this.bodyRows=this.element.find("tr"),this.container=d.checkContainer?b(d.checkContainer):b('
      '),this.element.data("st-table",!0),this.enabled=!1,this.options={idprefix:null,notSelectable:"not-selectable",checkContainer:null,menuClass:null},b.extend(this.options||{},d),void 0)}return a.prototype.on=function(){if(null!=this.element){var a=this;if(b("html").addClass("js"),this.hdrCols.each(function(c){var d=b(this),e=d.attr("id"),f=d.attr("class");if(e||(e=(a.options.idprefix?a.options.idprefix:"col-")+c,d.attr("id",e)),a.bodyRows.each(function(){var a=b(this).find("th, td").eq(c);a.attr("headers",e),f&&a.addClass(f)}),!d.is("."+a.options.notSelectable)){var g=b('
    • ");a.container.find("ul").append(g),g.find("input").change(function(){var a=b(this),c=a.val(),d=b("#"+c+", [headers="+c+"]");a.is(":checked")?d.show():d.hide()}).bind("updateCheck",function(){"table-cell"==d.css("display")||"inline"==d.css("display")?b(this).attr("checked",!0):b(this).attr("checked",!1)}).trigger("updateCheck")}}),b(window).bind("orientationchange resize",function(){a.container.find("input").trigger("updateCheck")}),!a.options.checkContainer){var c=b('
      '),d=b('Display');d.click(function(){return a.container.toggleClass("st-table-menu-hidden"),!1}),a.options.menuClass&&d.addClass(a.options.menuClass),c.append(d).append(a.container),a.element.before(c),b(document).click(function(c){b(c.target).is(a.container)||b(c.target).is(a.container.find("*"))||a.container.addClass("st-table-menu-hidden")})}return this.enabled=!0,this}},a}();a.Table=function(a,b){return new d(a,b)}}(window.Stashy||(window.Stashy={}),jQuery),function(a,b){var c=function(){function a(a){if(this.options={target:"body",title:"",titleSize:3,contentType:"inline",content:"",style:"default",animDuration:"fast",closeArea:"button",activeDuration:0},b.extend(this.options||{},a),""==this.options.content)throw new Error("content cannot be empty");return this.element=b("
      "),"button"==this.options.closeArea?(this.element.append(""),this.closeElement=this.element.find(".st-notify-close")):this.closeElement=this.element,"slow"==this.options.animDuration&&this.element.addClass("hinge"),this.options.title&&this.options.titleSize&&this.element.append(""+this.options.title+""),this.options.content&&("inline"==this.options.contentType?this.element.append(this.options.content):this.element.append(b(this.options.content).html())),this.element.addClass(this.options.style),this}function c(a,c,d){var e=b(".st-toast-container."+c+"."+d);return 0==e.length&&(e=b("
      "+"
      "),b(a).append(e)),e}function d(a,c){var d=b(".st-bar-container."+c);return 0==d.length&&(d=b("
      "+"
      "),b(a).append(d)),d}return a.prototype.toast=function(a,b,d){var e=this,f=c(this.options.target,a,b),g=function(){e.element.addClass("fadeOut"),setTimeout(function(){e&&(e.element.remove(),e=null),0==f.children().length&&f.remove()},"fast"==e.options.animDuration?1e3:2e3)};this.element.addClass((d?"radius":" ")+" "+"fadeIn"),f.append(this.element),e.options.activeDuration>0&&setTimeout(g,e.options.activeDuration),this.closeElement.on("click",g)},a.prototype.bar=function(a){var b=this,c=d(this.options.target,a),e=function(){b.element.addClass("top"==a?"fadeOutUp":"fadeOutDown"),setTimeout(function(){b&&(b.element.remove(),b=null),0==c.children().length&&c.remove()},"fast"==b.options.animDuration?1e3:2e3)};this.element.addClass("top"==a?"fadeInDown":"fadeInUp"),c.append(this.element),b.options.activeDuration>0&&setTimeout(e,b.options.activeDuration),this.closeElement.on("click",e)},a.prototype.panel=function(a){var c=this,d=function(){c.element.addClass("left"==a?"fadeOutLeft":"fadeOutRight"),setTimeout(function(){c&&(c.element.remove(),c=null)},"fast"==c.options.animDuration?1e3:2e3)};this.element.addClass("panel "+a),this.element.addClass("left"==a?"fadeInLeft":"fadeInRight"),b(this.options.target).append(this.element),c.options.activeDuration>0&&setTimeout(d,c.options.activeDuration),this.closeElement.on("click",d)},a}();a.Notify=function(a,b){return new c(a,b)}}(window.Stashy||(window.Stashy={}),jQuery); \ No newline at end of file +!function(a,b){var c,d,e=b.event;c=e.special.debouncedresize={setup:function(){b(this).on("resize",c.handler)},teardown:function(){b(this).off("resize",c.handler)},handler:function(a,b){var f=this,g=arguments,h=function(){a.type="debouncedresize",e.dispatch.apply(f,g)};d&&clearTimeout(d),b?h():d=setTimeout(h,c.threshold)},threshold:150}}(window,jQuery),function(){for(var a=0,b=["ms","moz","webkit","o"],c=0;c0&&(f.duration=c),d&&(f.easing=d),e&&(f.complete=e),b("html,body").animate({scrollTop:b(a).offset().top},f)}}}}(window.Stashy||(window.Stashy={}),jQuery),window.Modernizr=function(a,b,c){function d(a){r.cssText=a}function e(a,b){return typeof a===b}function f(a,b){return!!~(""+a).indexOf(b)}function g(a,b){for(var d in a){var e=a[d];if(!f(e,"-")&&r[e]!==c)return"pfx"==b?e:!0}return!1}function h(a,b,d){for(var f in a){var g=b[a[f]];if(g!==c)return d===!1?a[f]:e(g,"function")?g.bind(d||b):g}return!1}function i(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),f=(a+" "+u.join(d+" ")+d).split(" ");return e(b,"string")||e(b,"undefined")?g(f,b):(f=(a+" "+v.join(d+" ")+d).split(" "),h(f,b,c))}var j,k,l,m="2.6.2",n={},o=b.documentElement,p="modernizr",q=b.createElement(p),r=q.style,s=({}.toString," -webkit- -moz- -o- -ms- ".split(" ")),t="Webkit Moz O ms",u=t.split(" "),v=t.toLowerCase().split(" "),w={},x=[],y=x.slice,z=function(a,c,d,e){var f,g,h,i,j=b.createElement("div"),k=b.body,l=k||b.createElement("body");if(parseInt(d,10))for(;d--;)h=b.createElement("div"),h.id=e?e[d]:p+(d+1),j.appendChild(h);return f=["­",'"].join(""),j.id=p,(k?j:l).innerHTML+=f,l.appendChild(j),k||(l.style.background="",l.style.overflow="hidden",i=o.style.overflow,o.style.overflow="hidden",o.appendChild(l)),g=c(j,a),k?j.parentNode.removeChild(j):(l.parentNode.removeChild(l),o.style.overflow=i),!!g},A={}.hasOwnProperty;l=e(A,"undefined")||e(A.call,"undefined")?function(a,b){return b in a&&e(a.constructor.prototype[b],"undefined")}:function(a,b){return A.call(a,b)},Function.prototype.bind||(Function.prototype.bind=function(a){var b=this;if("function"!=typeof b)throw new TypeError;var c=y.call(arguments,1),d=function(){if(this instanceof d){var e=function(){};e.prototype=b.prototype;var f=new e,g=b.apply(f,c.concat(y.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(y.call(arguments)))};return d}),w.csstransforms=function(){return!!i("transform")},w.csstransforms3d=function(){var a=!!i("perspective");return a&&"webkitPerspective"in o.style&&z("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b){a=9===b.offsetLeft&&3===b.offsetHeight}),a},w.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:z(["@media (",s.join("touch-enabled),("),p,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=9===a.offsetTop}),c};for(var B in w)l(w,B)&&(k=B.toLowerCase(),n[k]=w[B](),x.push((n[k]?"":"no-")+k));return n.addTest=function(a,b){if("object"==typeof a)for(var d in a)l(a,d)&&n.addTest(d,a[d]);else{if(a=a.toLowerCase(),n[a]!==c)return n;b="function"==typeof b?b():b,"undefined"!=typeof enableClasses&&enableClasses&&(o.className+=" "+(b?"":"no-")+a),n[a]=b}return n},d(""),q=j=null,n._version=m,n._prefixes=s,n._domPrefixes=v,n._cssomPrefixes=u,n.testProp=function(a){return g([a])},n.testAllProps=i,n.testStyles=z,n}(this,this.document),function(a,b,c){"use strict";var d=function(){function a(a,d){var e=b((a||"")+".st-offcanvas"||".st-offcanvas");return e[0]==c||1==e.data("st-offcanvas")?!1:(this.element=e,this.showmenuselector=this.element.find(".showmenubutton"),this.showadditionalselector=this.element.find(".showadditionalbutton"),this.menu=this.element.find(".st-offcanvas-menu"),this.main=this.element.find(".st-offcanvas-main"),this.additional=this.element.find(".st-offcanvas-additional"),this.element.data("st-offcanvas",!0),this.enabled=!1,this.options={onMobileLayout:b.noop,onTabletLayout:b.noop,onDesktopLayout:b.noop,useTransitions:!0,closeOnClickOutside:!0,enableTouch:!1},b.extend(this.options||{},d),void 0)}var d=function(a){a.showadditionalselector.css("visibility","visible"),a.showmenuselector.css("visibility","visible")},e=function(a){a.showadditionalselector.css("visibility","visible"),a.showmenuselector.css("visibility","hidden")},f=function(a){a.showadditionalselector.css("visibility","hidden"),a.showmenuselector.css("visibility","hidden")},g=function(a){var c=b(window).width();768>c?(d(a),a.options.onMobileLayout()):c>=768&&978>c?(e(a),a.options.onTabletLayout()):(f(a),a.options.onDesktopLayout())},h=function(a){var b=a.data.offcanvas;if(!Hammer.utils.isVertical(a.gesture.direction))switch(a.gesture.preventDefault(),a.stopPropagation(),a.type){case"swipeleft":b.element.hasClass("active-menu")?b.element.removeClass("active-menu"):b.additional.length>0&&b.element.addClass("active-additional"),a.gesture.stopDetect();break;case"swiperight":b.element.hasClass("active-additional")?b.element.removeClass("active-additional"):b.menu.length>0&&b.element.addClass("active-menu"),a.gesture.stopDetect()}};return a.prototype.layout=function(){if(null!=this.element){var a=this;if(b("html").addClass("js"),this.showmenuselector.on("click",function(b){return a.element.toggleClass("active-menu"),b.stopPropagation(),!1}),this.showadditionalselector.on("click",function(b){return a.element.toggleClass("active-additional"),b.stopPropagation(),!1}),0==this.element.find(".st-offcanvas-additional").length&&this.element.addClass("no-additional"),0==this.element.find(".st-offcanvas-menu").length&&this.element.addClass("no-menu"),this.options.closeOnClickOutside){var a=this;this.element.on("click",function(){a.close()})}return b(window).on("debouncedresize",function(){return g(a),!1}),g(a),a.options.useTransitions&&this.element.addClass("active-transitions"),this.options.enableTouch&&"function"==typeof Hammer&&Modernizr.touch&&(this.element.hammer({drag_lock_to_axis:!0}),this.element.on("swipeleft swiperight",{offcanvas:this},h)),this.enabled=!0,this}},a.prototype.close=function(){null!=this.element&&this.element.removeClass("active-menu active-additional")},a}();a.OffCanvas=function(a,b){return new d(a,b)}}(window.Stashy||(window.Stashy={}),jQuery),function(a,b,c){var d=function(){function a(a,d){var e=b((a||"")+".st-flyout"||".st-flyout");return e[0]==c||1==e.data("st-flyout")?!1:(this.element=e,this.container=this.element.find(".st-flyout-container"),this.element.data("st-flyout",!0),this.enabled=!1,this.options={slideType:"push",closeOnClickOutside:!0,enableTouch:!1},b.extend(this.options||{},d),void 0)}var d=function(a){var b=a.data.flyout;if(!Hammer.utils.isVertical(a.gesture.direction))switch(a.gesture.preventDefault(),a.stopPropagation(),a.type){case"swipeleft":b.close(),a.gesture.stopDetect();break;case"swiperight":b.open(),a.gesture.stopDetect()}},e=function(){var a=navigator.userAgent;return a.indexOf("Mozilla/5.0")>-1&&a.indexOf("Android ")>-1&&a.indexOf("AppleWebKit")>-1&&!(a.indexOf("Chrome")>-1)};return a.prototype.layout=function(){if(null!=this.element){if(b("html").addClass("js"),this.element.find(".st-flyout-toggle").on("click",function(a){return b(this).closest(".st-flyout-container").toggleClass("active-menu"),a.stopPropagation(),!1}),"reveal"==this.options.slideType?this.element.find(".st-flyout-container").addClass("st-reveal"):this.element.find(".st-flyout-container").addClass("st-push"),Modernizr&&Modernizr.csstransforms3d&&!e()&&this.element.find(".st-flyout-container").addClass("active-transforms"),this.options.closeOnClickOutside){var a=this;this.element.on("click",function(){a.close()})}return this.options.enableTouch&&"function"==typeof Hammer&&Modernizr.touch&&(this.element.hammer({drag_lock_to_axis:!0}),this.element.on("swipeleft swiperight",{flyout:this},d)),this.enabled=!0,this}},a.prototype.open=function(){null!=this.element&&this.container.addClass("active-menu")},a.prototype.close=function(){null!=this.element&&this.container.removeClass("active-menu")},a}();a.Flyout=function(a,b){return new d(a,b)}}(window.Stashy||(window.Stashy={}),jQuery),function(a,b,c){"use strict";var d=function(){function a(a,d){var e=b((a||"")+".st-toggle"||".st-toggle");return e[0]==c||1==e.data("st-toggle")?!1:(this.element=e,this.element.data("st-toggle",!0),this.menu=this.element.find(".st-toggle-navigation"),this.menulink=this.element.find(".st-toggle-menu-link"),this.enabled=!1,this.options={closeOnClickOutside:!0,closeOnClick:!0,fixed:!1},b.extend(this.options||{},d),void 0)}return a.prototype.layout=function(){var a=this;if(null!=this.element){if(b("html").addClass("js"),this.menulink.click(function(b){return a.menulink.toggleClass("active"),a.menu.toggleClass("active"),b.stopPropagation(),!1}),this.options.fixed&&a.element.addClass("st-toggle-fixed"),this.options.closeOnClickOutside){var a=this;a.element.on("click",function(a){a.stopPropagation()}),b("html").on("click",function(){a.close()})}return this.options.closeOnClick&&this.element.find("a:not('.st-toggle-menu-link')").on("click",function(){a.close()}),this.enabled=!0,this}},a.prototype.close=function(){this.menu.removeClass("active")},a}();a.Toggle=function(a,b){return new d(a,b)}}(window.Stashy||(window.Stashy={}),jQuery),function(a,b){var c=function(){function a(a){this.selector=a||"img"}return a.prototype.on=function(a,c){a=a||"",c=c||"",b(this.selector).each(function(){b(this).parent().hasClass("st-image-container")||($image=b(this).wrap("
      "),$image.wrap("
      "))})},a.prototype.update=function(a,c){a=a||"",c=c||"",b(this.selector).each(function(){b(this).closest(".st-image").removeAttr("class").addClass("st-image "+a+" "+c+(b(this).height()>b(this).width()?" portrait":""))})},a.prototype.off=function(){b(this.selector).each(function(){b(this).parent().hasClass("st-image-container")&&(b(this).unwrap(),b(this).parent().hasClass("st-image")&&b(this).unwrap())})},a}();a.FocalPoint=function(a,b){return new c(a,b)}}(window.Stashy||(window.Stashy={}),jQuery),function(a,b){var c=function(){function a(a){this.target=a}return a.prototype.on=function(a,c,d,e){var f=this;if(f.target){var g=b('
      ');a&&b(g).css("position",a),c&&b(g).css("top",c),d||(d="#000"),b(g).append(b(''+''+''+''+''+'')),e&&"prepend"==e?b(f.target).prepend(b(g)[0]):b(f.target).append(b(g)[0])}},a.prototype.off=function(){b(".st-loader").remove()},a}();a.Loader=function(a,b){return new c(a,b)}}(window.Stashy||(window.Stashy={}),jQuery),function(a,b,c){var d=function(){function a(a,d){return a?(this.element=a,this.options={linkClass:"",linkText:"Show more",howMany:1},b.extend(this.options||{},d),(0==this.options.howMany||c)&&(this.options.howMany=1),void 0):!1}return a.prototype.on=function(){var a=this;return b(a.element+":gt("+(a.options.howMany-1)+")").hide().last().after(b('').attr("href","#").text(a.options.linkText).on("click",function(){var c=this;return b(a.element+":not(:visible):lt("+a.options.howMany+")").fadeIn(function(){0==b(a.element+":not(:visible)").length&&b(c).remove()}),!1})),this},a.prototype.off=function(){var a=this;return b(a.element+":gt("+(a.options.howMany-1)+")").show().last().next().remove(),this},a}();a.ShowMeMore=function(a,b){return new d(a,b)}}(window.Stashy||(window.Stashy={}),jQuery),function(a,b,c){function d(a){a.pane_width=a.element.width(),a.panes.each(function(){b(this).width(a.pane_width)}),a.container.width(a.pane_width*a.pane_count)}function e(a,b,c){if(a.container.removeClass("animate"),c&&a.container.addClass("animate"),Modernizr.csstransforms3d)a.container.css("transform","translate3d("+b+"%,0,0) scale3d(1,1,1)");else if(Modernizr.csstransforms)a.container.css("transform","translate("+b+"%,0)");else{var d=a.pane_width*a.pane_count/100*b;a.container.css("left",d+"px")}}function f(a,c){a.children().each(function(){b(this).removeClass("active")}),a.find("[data-pane='"+c+"']").addClass("active")}function g(a){a.element.find("[data-pane]").on("click",function(b){var c=b.target.attributes["data-pane"].value;"next"==c?a.next():"prev"==c?a.prev():a.showPane(parseInt(c)),a.options.autoSlide=!1})}function h(a){var b=a.data.slider;switch(a.gesture.preventDefault(),a.stopPropagation(),b.options.autoSlide=!1,a.type){case"dragright":case"dragleft":var c=-(100/b.pane_count)*b.current_pane,d=100/b.pane_width*a.gesture.deltaX/b.pane_count;(0==b.current_pane&&a.gesture.direction==Hammer.DIRECTION_RIGHT||b.current_pane==b.pane_count-1&&a.gesture.direction==Hammer.DIRECTION_LEFT)&&(d*=.4),e(b,d+c);break;case"swipeleft":b.next(),a.gesture.stopDetect();break;case"swiperight":b.prev(),a.gesture.stopDetect();break;case"release":Math.abs(a.gesture.deltaX)>b.pane_width/2?"right"==a.gesture.direction?b.prev():b.next():b.showPane(b.current_pane,!0)}}var i=function(){function a(a,d){var e=b((a||"")+".st-slider"||".st-slider");return e[0]==c?!1:(this.element=e,this.container=b(">.st-slider-panes",e),this.panes=b(">.st-slider-panes>li",e),this.pane_width=0,this.pane_count=this.panes.length,this.current_pane=0,this.options={enableControls:!0,enableIndicators:!0,showOnHover:!0,autoSlide:!0,enableTouch:!1,duration:5e3},b.extend(this.options,d),void 0)}return a}();i.prototype.on=function(){var a=this;if(this.element==c)return!1;if(d(this),b(window).on("load debouncedresize orientationchange",function(){d(a)}),this.options.enableIndicators){this.indicators=b("
        ");for(var e=0;e");this.element.append(this.indicators),f(this.indicators,this.current_pane)}if(this.options.enableControls&&(this.controlleft=b("
        "),this.element.append(this.controlleft),this.controlright=b(""),this.element.append(this.controlright)),this.options.autoSlide)var i=setInterval(function(){a.options.autoSlide?a.next():clearInterval(i)},this.options.duration);return this.options.showOnHover&&(this.element.addClass("controlsonhover"),this.element.hover(function(){a.element.removeClass("controlsonhover")},function(){a.element.addClass("controlsonhover")})),g(this),this.options.enableTouch&&"function"==typeof Hammer&&(this.element.hammer({drag_lock_to_axis:!0}),this.element.on("release dragleft dragright swipeleft swiperight",{slider:this},h),this.options.showOnHover&&this.element.on("tap",function(){a.element.toggleClass("controlsonhover")})),this},i.prototype.showPane=function(a){a=Math.max(0,Math.min(a,this.pane_count-1)),this.current_pane=a,this.options.enableIndicators&&f(this.indicators,this.current_pane);var b=-(100/this.pane_count*this.current_pane);e(this,b,!0)},i.prototype.next=function(){var a;return a=this.current_pane+1==this.pane_count?this.options.autoSlide?0:this.current_pane:this.current_pane+1,this.showPane(a,!0)},i.prototype.prev=function(){var a;return a=this.current_pane-1<0?this.options.autoSlide?this.pane_count-1:this.current_pane:this.current_pane-1,this.showPane(a,!0)},a.Slider=function(a,b){return new i(a,b)}}(window.Stashy||(window.Stashy={}),jQuery),function(a,b,c){var d=function(){function a(a,d){var e=b((a||"")+".st-refresh"||".st-refresh");return e[0]==c?!1:(this.element=e,this.pullrefresh=this.element.find(".st-refresh-pullrefresh"),this.icon=this.element.find(".st-refresh-icon"),this.slidedown_height=0,this.anim=null,this.dragged_down=!1,this.options={onRelease:b.noop(),breakpoint:100},b.extend(this.options||{},d),void 0)}var d=function(a){var b=this;switch(a.type){case"touch":e.apply(b);break;case"release":if(!this.dragged_down)return;cancelAnimationFrame(this.anim),this.slidedown_height>=this.options.breakpoint?(b.element.addClass("pullrefresh-loading"),b.icon.addClass("st-refresh-icon loading"),f.apply(b,[60]),this.options.onRelease.call(b)):(b.pullrefresh.addClass("slideup"),b.element.addClass("pullrefresh-slideup"),e.apply(this));break;case"dragdown":this.dragged_down=!0;var c=window.scrollY;if(c>5)return;0!==c&&window.scrollTo(0,0),this.anim||g.apply(b),a.gesture.preventDefault(),this.slidedown_height=.4*a.gesture.deltaY}},e=function(){this.element[0].className="st-refresh",this.slidedown_height=0,f.apply(this,[0]),cancelAnimationFrame(this.anim),this.anim=null,this.dragged_down=!1},f=function(a){Modernizr.csstransforms3d?(this.element[0].style.transform="translate3d(0,"+a+"px,0) ",this.element[0].style.oTransform="translate3d(0,"+a+"px,0)",this.element[0].style.msTransform="translate3d(0,"+a+"px,0)",this.element[0].style.mozTransform="translate3d(0,"+a+"px,0)",this.element[0].style.webkitTransform="translate3d(0,"+a+"px,0) scale3d(1,1,1)"):Modernizr.csstransforms?(this.element[0].style.transform="translate(0,"+a+"px) ",this.element[0].style.oTransform="translate(0,"+a+"px)",this.element[0].style.msTransform="translate(0,"+a+"px)",this.element[0].style.mozTransform="translate(0,"+a+"px)",this.element[0].style.webkitTransform="translate(0,"+a+"px)"):this.element[0].style.top=a+"px"},g=function(){var a=this;f.apply(this,[this.slidedown_height]),this.slidedown_height>=this.options.breakpoint?(this.element.addClass("pullrefresh-breakpoint"),this.pullrefresh[0].className="st-refresh-pullrefresh breakpoint",this.icon[0].className="st-refresh-icon arrow arrow-up"):(this.element.removeClass("pullrefresh-breakpoint"),this.pullrefresh[0].className="st-refresh-pullrefresh",this.icon[0].className="st-refresh-icon arrow"),this.anim=requestAnimationFrame(function(){g.apply(a)})};return a.prototype.on=function(){var a=this;return b(this.element).hammer(),b(this.element).on("touch dragdown release",function(b){d.apply(a,[b])}),this},a.prototype.slideUp=function(){var a=this;cancelAnimationFrame(this.anim),this.pullrefresh[0].className="st-refresh-pullrefresh slideup",this.element[0].className="st-refresh pullrefresh-slideup",f.apply(this,[0]),setTimeout(function(){e.apply(a)},500)},a}();a.Refresh=function(a,b){return new d(a,b)}}(window.Stashy||(window.Stashy={}),jQuery),function(a,b,c){var d=function(){function a(a){var d=b(a);return d[0]==c?!1:(this.videos=d,void 0)}return a.prototype.on=function(){return this.videos.each(function(){var a=b(this);if(!("embed"===this.tagName.toLowerCase()&&a.parent("object").length||a.parent(".st-video").length)){var c="object"===this.tagName.toLowerCase()||a.attr("height")&&!isNaN(parseInt(a.attr("height"),10))?parseInt(a.attr("height"),10):a.height(),d=isNaN(parseInt(a.attr("width"),10))?a.width():parseInt(a.attr("width"),10),e=c/d;if(!a.attr("id")){var f="fitvid"+Math.floor(999999*Math.random());a.attr("id",f)}a.wrap('
        ').parent(".st-video").css("padding-top",100*e+"%"),a.removeAttr("height").removeAttr("width")}}),this},a}();a.ElasticVideo=function(a){return new d(a)}}(window.Stashy||(window.Stashy={}),jQuery),function(a,b,c){var d=function(){function a(a){var d=b(a);return d[0]==c?!1:(this.elements=d,void 0)}var d=function(a,c,d){this.elements.each(function(){var e=b(this);e.css("font-size",Math.max(Math.min(e.width()/(10*a),parseFloat(d)),parseFloat(c)))})};return a.prototype.on=function(a,c,e){var a=a||1,f=c||Number.NEGATIVE_INFINITY,g=e||Number.POSITIVE_INFINITY,h=this;return d.apply(this,[a,f,g]),b(window).on("debouncedresize.ElasticText orientationchange.ElasticText",function(){d.apply(h,[a,f,g])}),this},a}();a.ElasticText=function(a){return new d(a)}}(window.Stashy||(window.Stashy={}),jQuery),function(a,b,c){"use strict";var d=function(){function a(a,d){var e=b((a||"")+".st-table"||".st-table");return e[0]==c||1==e.data("st-table")?!1:(this.element=e,this.thead=this.element.find("thead"),this.tbody=this.element.find("tbody"),this.hdrCols=this.element.find("th"),this.bodyRows=this.element.find("tr"),this.container=d.checkContainer?b(d.checkContainer):b('
          '),this.element.data("st-table",!0),this.enabled=!1,this.options={idprefix:null,notSelectable:"not-selectable",checkContainer:null,menuClass:null},b.extend(this.options||{},d),void 0)}return a.prototype.on=function(){if(null!=this.element){var a=this;if(b("html").addClass("js"),this.hdrCols.each(function(c){var d=b(this),e=d.attr("id"),f=d.attr("class");if(e||(e=(a.options.idprefix?a.options.idprefix:"col-")+c,d.attr("id",e)),a.bodyRows.each(function(){var a=b(this).find("th, td").eq(c);a.attr("headers",e),f&&a.addClass(f)}),!d.is("."+a.options.notSelectable)){var g=b('
        • ");a.container.find("ul").append(g),g.find("input").change(function(){var a=b(this),c=a.val(),d=b("#"+c+", [headers="+c+"]");a.is(":checked")?d.show():d.hide()}).bind("updateCheck",function(){"table-cell"==d.css("display")||"inline"==d.css("display")?b(this).attr("checked",!0):b(this).attr("checked",!1)}).trigger("updateCheck")}}),b(window).bind("orientationchange resize",function(){a.container.find("input").trigger("updateCheck")}),!a.options.checkContainer){var c=b('
          '),d=b('Display');d.click(function(){return a.container.toggleClass("st-table-menu-hidden"),!1}),a.options.menuClass&&d.addClass(a.options.menuClass),c.append(d).append(a.container),a.element.before(c),b(document).click(function(c){b(c.target).is(a.container)||b(c.target).is(a.container.find("*"))||a.container.addClass("st-table-menu-hidden")})}return this.enabled=!0,this}},a}();a.Table=function(a,b){return new d(a,b)}}(window.Stashy||(window.Stashy={}),jQuery),function(a,b){var c=function(){function a(a){if(this.options={target:"body",title:"",titleSize:3,contentType:"inline",content:"",style:"default",animDuration:"fast",closeArea:"button",activeDuration:0},b.extend(this.options||{},a),""==this.options.content)throw new Error("content cannot be empty");return this.element=b("
          "),"button"==this.options.closeArea?(this.element.append(""),this.closeElement=this.element.find(".st-notify-close")):this.closeElement=this.element,"slow"==this.options.animDuration&&this.element.addClass("hinge"),this.options.title&&this.options.titleSize&&this.element.append(""+this.options.title+""),this.options.content&&("inline"==this.options.contentType?this.element.append(this.options.content):this.element.append(b(this.options.content).html())),this.element.addClass(this.options.style),this}function c(a,c,d){var e=b(".st-toast-container."+c+"."+d);return 0==e.length&&(e=b("
          "+"
          "),b(a).append(e)),e}function d(a,c){var d=b(".st-bar-container."+c);return 0==d.length&&(d=b("
          "+"
          "),b(a).append(d)),d}return a.prototype.toast=function(a,b,d){var e=this,f=c(this.options.target,a,b),g=function(){e.element.addClass("fadeOut"),setTimeout(function(){e.element.remove(),e=null,0==f.children().length&&f.remove()},"fast"==e.options.animDuration?1e3:2e3)};this.element.addClass((d?"radius":" ")+" "+"fadeIn"),f.append(this.element),e.options.activeDuration>0&&setTimeout(function(){e&&g()},e.options.activeDuration),this.closeElement.on("click",g)},a.prototype.bar=function(a){var b=this,c=d(this.options.target,a),e=function(){b.element.addClass("top"==a?"fadeOutUp":"fadeOutDown"),setTimeout(function(){b.element.remove(),b=null,0==c.children().length&&c.remove()},"fast"==b.options.animDuration?1e3:2e3)};this.element.addClass("top"==a?"fadeInDown":"fadeInUp"),c.append(this.element),b.options.activeDuration>0&&setTimeout(function(){b&&e()},b.options.activeDuration),this.closeElement.on("click",e)},a.prototype.panel=function(a){var c=this,d=function(){c.element.addClass("left"==a?"fadeOutLeft":"fadeOutRight"),setTimeout(function(){c.element.remove(),c=null},"fast"==c.options.animDuration?1e3:2e3)};this.element.addClass("panel "+a),this.element.addClass("left"==a?"fadeInLeft":"fadeInRight"),b(this.options.target).append(this.element),c.options.activeDuration>0&&setTimeout(function(){c&&d()},c.options.activeDuration),this.closeElement.on("click",d)},a}();a.Notify=function(a,b){return new c(a,b)}}(window.Stashy||(window.Stashy={}),jQuery); \ No newline at end of file diff --git a/docs/public/Scripts/Stashy.js b/docs/public/Scripts/Stashy.js index e58cf0c..e4e1f1d 100644 --- a/docs/public/Scripts/Stashy.js +++ b/docs/public/Scripts/Stashy.js @@ -1615,11 +1615,8 @@ window.Modernizr = (function( window, document, undefined ) { hide = function() { self.element.addClass("fadeOut"); setTimeout(function() { - //Check for self because activeDurantion can be enabled - if (self) { - self.element.remove(); - self = null; - } + self.element.remove(); + self = null; if (toastC.children().length == 0) { toastC.remove(); } @@ -1630,7 +1627,11 @@ window.Modernizr = (function( window, document, undefined ) { toastC.append(this.element); if (self.options.activeDuration > 0) { - setTimeout(hide, self.options.activeDuration); + setTimeout(function() { + if (self) { + hide(); + } + }, self.options.activeDuration); } this.closeElement.on("click", hide); @@ -1647,11 +1648,8 @@ window.Modernizr = (function( window, document, undefined ) { hide = function() { self.element.addClass(positionY == "top" ? "fadeOutUp" : "fadeOutDown"); setTimeout(function() { - //Check for self because activeDurantion can be enabled - if (self) { - self.element.remove(); - self = null; - } + self.element.remove(); + self = null; if (barC.children().length == 0) { barC.remove(); } @@ -1661,7 +1659,11 @@ window.Modernizr = (function( window, document, undefined ) { barC.append(this.element); if (self.options.activeDuration > 0) { - setTimeout(hide, self.options.activeDuration); + setTimeout(function() { + if (self) { + hide(); + } + }, self.options.activeDuration); } this.closeElement.on("click", hide); @@ -1677,11 +1679,8 @@ window.Modernizr = (function( window, document, undefined ) { hide = function() { self.element.addClass(positionX == "left" ? "fadeOutLeft" : "fadeOutRight"); setTimeout(function() { - //Check for self because activeDurantion can be enabled - if (self) { - self.element.remove(); - self = null; - } + self.element.remove(); + self = null; }, self.options.animDuration == "fast" ? 1000 : 2000); }; this.element.addClass("panel " + positionX) @@ -1689,7 +1688,11 @@ window.Modernizr = (function( window, document, undefined ) { $(this.options.target).append(this.element); if (self.options.activeDuration > 0) { - setTimeout(hide, self.options.activeDuration); + setTimeout(function() { + if (self) { + hide(); + } + }, self.options.activeDuration); } this.closeElement.on("click", hide); diff --git a/docs/public/Scripts/vendor.js b/docs/public/Scripts/vendor.js index 199be9a..4f2db84 100644 --- a/docs/public/Scripts/vendor.js +++ b/docs/public/Scripts/vendor.js @@ -3,4 +3,4 @@ return f&&f.value!==!1?c.toLowerCase():b},set:function(a,b,c){return b===!1?ib.r },next:function(a){return k(a,"nextSibling")},prev:function(a){return k(a,"previousSibling")},nextAll:function(a){return ib.dir(a,"nextSibling")},prevAll:function(a){return ib.dir(a,"previousSibling")},nextUntil:function(a,b,c){return ib.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return ib.dir(a,"previousSibling",c)},siblings:function(a){return ib.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return ib.sibling(a.firstChild)},contents:function(a){return ib.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:ib.merge([],a.childNodes)}},function(a,b){ib.fn[a]=function(c,d){var e=ib.map(this,b,c);return Pb.test(a)||(d=c),d&&"string"==typeof d&&(e=ib.filter(d,e)),e=this.length>1&&!Tb[a]?ib.unique(e):e,this.length>1&&Qb.test(a)&&(e=e.reverse()),this.pushStack(e)}}),ib.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),1===b.length?ib.find.matchesSelector(b[0],a)?[b[0]]:[]:ib.find.matches(a,b)},dir:function(a,c,d){for(var e=[],f=a[c];f&&9!==f.nodeType&&(d===b||1!==f.nodeType||!ib(f).is(d));)1===f.nodeType&&e.push(f),f=f[c];return e},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}});var Ub="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Vb=/ jQuery\d+="(?:null|\d+)"/g,Wb=new RegExp("<(?:"+Ub+")[\\s/>]","i"),Xb=/^\s+/,Yb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Zb=/<([\w:]+)/,$b=/\s*$/g,gc={option:[1,""],legend:[1,"
          ","
          "],area:[1,"",""],param:[1,"",""],thead:[1,"","
          "],tr:[2,"","
          "],col:[2,"","
          "],td:[3,"","
          "],_default:ib.support.htmlSerialize?[0,"",""]:[1,"X
          ","
          "]},hc=m(W),ic=hc.appendChild(W.createElement("div"));gc.optgroup=gc.option,gc.tbody=gc.tfoot=gc.colgroup=gc.caption=gc.thead,gc.th=gc.td,ib.fn.extend({text:function(a){return ib.access(this,function(a){return a===b?ib.text(this):this.empty().append((this[0]&&this[0].ownerDocument||W).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(ib.isFunction(a))return this.each(function(b){ib(this).wrapAll(a.call(this,b))});if(this[0]){var b=ib(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){for(var a=this;a.firstChild&&1===a.firstChild.nodeType;)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return ib.isFunction(a)?this.each(function(b){ib(this).wrapInner(a.call(this,b))}):this.each(function(){var b=ib(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=ib.isFunction(a);return this.each(function(c){ib(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){ib.nodeName(this,"body")||ib(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(a,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,!1,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=0;null!=(c=this[d]);d++)(!a||ib.filter(a,[c]).length>0)&&(b||1!==c.nodeType||ib.cleanData(t(c)),c.parentNode&&(b&&ib.contains(c.ownerDocument,c)&&q(t(c,"script")),c.parentNode.removeChild(c)));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){for(1===a.nodeType&&ib.cleanData(t(a,!1));a.firstChild;)a.removeChild(a.firstChild);a.options&&ib.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return ib.clone(this,a,b)})},html:function(a){return ib.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return 1===c.nodeType?c.innerHTML.replace(Vb,""):b;if(!("string"!=typeof a||ac.test(a)||!ib.support.htmlSerialize&&Wb.test(a)||!ib.support.leadingWhitespace&&Xb.test(a)||gc[(Zb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(Yb,"<$1>");try{for(;e>d;d++)c=this[d]||{},1===c.nodeType&&(ib.cleanData(t(c,!1)),c.innerHTML=a);c=0}catch(f){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){var b=ib.isFunction(a);return b||"string"==typeof a||(a=ib(a).not(this).detach()),this.domManip([a],!0,function(a){var b=this.nextSibling,c=this.parentNode;c&&(ib(this).remove(),c.insertBefore(a,b))})},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){a=bb.apply([],a);var e,f,g,h,i,j,k=0,l=this.length,m=this,q=l-1,r=a[0],s=ib.isFunction(r);if(s||!(1>=l||"string"!=typeof r||ib.support.checkClone)&&cc.test(r))return this.each(function(e){var f=m.eq(e);s&&(a[0]=r.call(this,e,c?f.html():b)),f.domManip(a,c,d)});if(l&&(j=ib.buildFragment(a,this[0].ownerDocument,!1,this),e=j.firstChild,1===j.childNodes.length&&(j=e),e)){for(c=c&&ib.nodeName(e,"tr"),h=ib.map(t(j,"script"),o),g=h.length;l>k;k++)f=j,k!==q&&(f=ib.clone(f,!0,!0),g&&ib.merge(h,t(f,"script"))),d.call(c&&ib.nodeName(this[k],"table")?n(this[k],"tbody"):this[k],f,k);if(g)for(i=h[h.length-1].ownerDocument,ib.map(h,p),k=0;g>k;k++)f=h[k],dc.test(f.type||"")&&!ib._data(f,"globalEval")&&ib.contains(i,f)&&(f.src?ib.ajax({url:f.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):ib.globalEval((f.text||f.textContent||f.innerHTML||"").replace(fc,"")));j=e=null}return this}}),ib.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){ib.fn[a]=function(a){for(var c,d=0,e=[],f=ib(a),g=f.length-1;g>=d;d++)c=d===g?this:this.clone(!0),ib(f[d])[b](c),cb.apply(e,c.get());return this.pushStack(e)}}),ib.extend({clone:function(a,b,c){var d,e,f,g,h,i=ib.contains(a.ownerDocument,a);if(ib.support.html5Clone||ib.isXMLDoc(a)||!Wb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ic.innerHTML=a.outerHTML,ic.removeChild(f=ic.firstChild)),!(ib.support.noCloneEvent&&ib.support.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||ib.isXMLDoc(a)))for(d=t(f),h=t(a),g=0;null!=(e=h[g]);++g)d[g]&&s(e,d[g]);if(b)if(c)for(h=h||t(a),d=d||t(f),g=0;null!=(e=h[g]);g++)r(e,d[g]);else r(a,f);return d=t(f,"script"),d.length>0&&q(d,!i&&t(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,l=a.length,n=m(b),o=[],p=0;l>p;p++)if(f=a[p],f||0===f)if("object"===ib.type(f))ib.merge(o,f.nodeType?[f]:f);else if(_b.test(f)){for(h=h||n.appendChild(b.createElement("div")),i=(Zb.exec(f)||["",""])[1].toLowerCase(),k=gc[i]||gc._default,h.innerHTML=k[1]+f.replace(Yb,"<$1>")+k[2],e=k[0];e--;)h=h.lastChild;if(!ib.support.leadingWhitespace&&Xb.test(f)&&o.push(b.createTextNode(Xb.exec(f)[0])),!ib.support.tbody)for(f="table"!==i||$b.test(f)?""!==k[1]||$b.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;e--;)ib.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j);for(ib.merge(o,h.childNodes),h.textContent="";h.firstChild;)h.removeChild(h.firstChild);h=n.lastChild}else o.push(b.createTextNode(f));for(h&&n.removeChild(h),ib.support.appendChecked||ib.grep(t(o,"input"),u),p=0;f=o[p++];)if((!d||-1===ib.inArray(f,d))&&(g=ib.contains(f.ownerDocument,f),h=t(n.appendChild(f),"script"),g&&q(h),c))for(e=0;f=h[e++];)dc.test(f.type||"")&&c.push(f);return h=null,n},cleanData:function(a,b){for(var c,d,e,f,g=0,h=ib.expando,i=ib.cache,j=ib.support.deleteExpando,k=ib.event.special;null!=(c=a[g]);g++)if((b||ib.acceptData(c))&&(e=c[h],f=e&&i[e])){if(f.events)for(d in f.events)k[d]?ib.event.remove(c,d):ib.removeEvent(c,d,f.handle);i[e]&&(delete i[e],j?delete c[h]:typeof c.removeAttribute!==V?c.removeAttribute(h):c[h]=null,_.push(e))}}});var jc,kc,lc,mc=/alpha\([^)]*\)/i,nc=/opacity\s*=\s*([^)]*)/,oc=/^(top|right|bottom|left)$/,pc=/^(none|table(?!-c[ea]).+)/,qc=/^margin/,rc=new RegExp("^("+jb+")(.*)$","i"),sc=new RegExp("^("+jb+")(?!px)[a-z%]+$","i"),tc=new RegExp("^([+-])=("+jb+")","i"),uc={BODY:"block"},vc={position:"absolute",visibility:"hidden",display:"block"},wc={letterSpacing:0,fontWeight:400},xc=["Top","Right","Bottom","Left"],yc=["Webkit","O","Moz","ms"];ib.fn.extend({css:function(a,c){return ib.access(this,function(a,c,d){var e,f,g={},h=0;if(ib.isArray(c)){for(f=kc(a),e=c.length;e>h;h++)g[c[h]]=ib.css(a,c[h],!1,f);return g}return d!==b?ib.style(a,c,d):ib.css(a,c)},a,c,arguments.length>1)},show:function(){return x(this,!0)},hide:function(){return x(this)},toggle:function(a){var b="boolean"==typeof a;return this.each(function(){(b?a:w(this))?ib(this).show():ib(this).hide()})}}),ib.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=lc(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":ib.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var f,g,h,i=ib.camelCase(c),j=a.style;if(c=ib.cssProps[i]||(ib.cssProps[i]=v(j,i)),h=ib.cssHooks[c]||ib.cssHooks[i],d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];if(g=typeof d,"string"===g&&(f=tc.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(ib.css(a,c)),g="number"),!(null==d||"number"===g&&isNaN(d)||("number"!==g||ib.cssNumber[i]||(d+="px"),ib.support.clearCloneStyle||""!==d||0!==c.indexOf("background")||(j[c]="inherit"),h&&"set"in h&&(d=h.set(a,d,e))===b)))try{j[c]=d}catch(k){}}},css:function(a,c,d,e){var f,g,h,i=ib.camelCase(c);return c=ib.cssProps[i]||(ib.cssProps[i]=v(a.style,i)),h=ib.cssHooks[c]||ib.cssHooks[i],h&&"get"in h&&(g=h.get(a,!0,d)),g===b&&(g=lc(a,c,e)),"normal"===g&&c in wc&&(g=wc[c]),""===d||d?(f=parseFloat(g),d===!0||ib.isNumeric(f)?f||0:g):g},swap:function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e}}),a.getComputedStyle?(kc=function(b){return a.getComputedStyle(b,null)},lc=function(a,c,d){var e,f,g,h=d||kc(a),i=h?h.getPropertyValue(c)||h[c]:b,j=a.style;return h&&(""!==i||ib.contains(a.ownerDocument,a)||(i=ib.style(a,c)),sc.test(i)&&qc.test(c)&&(e=j.width,f=j.minWidth,g=j.maxWidth,j.minWidth=j.maxWidth=j.width=i,i=h.width,j.width=e,j.minWidth=f,j.maxWidth=g)),i}):W.documentElement.currentStyle&&(kc=function(a){return a.currentStyle},lc=function(a,c,d){var e,f,g,h=d||kc(a),i=h?h[c]:b,j=a.style;return null==i&&j&&j[c]&&(i=j[c]),sc.test(i)&&!oc.test(c)&&(e=j.left,f=a.runtimeStyle,g=f&&f.left,g&&(f.left=a.currentStyle.left),j.left="fontSize"===c?"1em":i,i=j.pixelLeft+"px",j.left=e,g&&(f.left=g)),""===i?"auto":i}),ib.each(["height","width"],function(a,b){ib.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&pc.test(ib.css(a,"display"))?ib.swap(a,vc,function(){return A(a,b,d)}):A(a,b,d):void 0},set:function(a,c,d){var e=d&&kc(a);return y(a,c,d?z(a,b,d,ib.support.boxSizing&&"border-box"===ib.css(a,"boxSizing",!1,e),e):0)}}}),ib.support.opacity||(ib.cssHooks.opacity={get:function(a,b){return nc.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=ib.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===ib.trim(f.replace(mc,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=mc.test(f)?f.replace(mc,e):f+" "+e)}}),ib(function(){ib.support.reliableMarginRight||(ib.cssHooks.marginRight={get:function(a,b){return b?ib.swap(a,{display:"inline-block"},lc,[a,"marginRight"]):void 0}}),!ib.support.pixelPosition&&ib.fn.position&&ib.each(["top","left"],function(a,b){ib.cssHooks[b]={get:function(a,c){return c?(c=lc(a,b),sc.test(c)?ib(a).position()[b]+"px":c):void 0}}})}),ib.expr&&ib.expr.filters&&(ib.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!ib.support.reliableHiddenOffsets&&"none"===(a.style&&a.style.display||ib.css(a,"display"))},ib.expr.filters.visible=function(a){return!ib.expr.filters.hidden(a)}),ib.each({margin:"",padding:"",border:"Width"},function(a,b){ib.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+xc[d]+b]=f[d]||f[d-2]||f[0];return e}},qc.test(a)||(ib.cssHooks[a+b].set=y)});var zc=/%20/g,Ac=/\[\]$/,Bc=/\r?\n/g,Cc=/^(?:submit|button|image|reset|file)$/i,Dc=/^(?:input|select|textarea|keygen)/i;ib.fn.extend({serialize:function(){return ib.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=ib.prop(this,"elements");return a?ib.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!ib(this).is(":disabled")&&Dc.test(this.nodeName)&&!Cc.test(a)&&(this.checked||!bc.test(a))}).map(function(a,b){var c=ib(this).val();return null==c?null:ib.isArray(c)?ib.map(c,function(a){return{name:b.name,value:a.replace(Bc,"\r\n")}}):{name:b.name,value:c.replace(Bc,"\r\n")}}).get()}}),ib.param=function(a,c){var d,e=[],f=function(a,b){b=ib.isFunction(b)?b():null==b?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(c===b&&(c=ib.ajaxSettings&&ib.ajaxSettings.traditional),ib.isArray(a)||a.jquery&&!ib.isPlainObject(a))ib.each(a,function(){f(this.name,this.value)});else for(d in a)D(d,a[d],c,f);return e.join("&").replace(zc,"+")},ib.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){ib.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),ib.fn.hover=function(a,b){return this.mouseenter(a).mouseleave(b||a)};var Ec,Fc,Gc=ib.now(),Hc=/\?/,Ic=/#.*$/,Jc=/([?&])_=[^&]*/,Kc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Lc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Mc=/^(?:GET|HEAD)$/,Nc=/^\/\//,Oc=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Pc=ib.fn.load,Qc={},Rc={},Sc="*/".concat("*");try{Fc=X.href}catch(Tc){Fc=W.createElement("a"),Fc.href="",Fc=Fc.href}Ec=Oc.exec(Fc.toLowerCase())||[],ib.fn.load=function(a,c,d){if("string"!=typeof a&&Pc)return Pc.apply(this,arguments);var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),ib.isFunction(c)?(d=c,c=b):c&&"object"==typeof c&&(g="POST"),h.length>0&&ib.ajax({url:a,type:g,dataType:"html",data:c}).done(function(a){f=arguments,h.html(e?ib("
          ").append(ib.parseHTML(a)).find(e):a)}).complete(d&&function(a,b){h.each(d,f||[a.responseText,b,a])}),this},ib.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){ib.fn[b]=function(a){return this.on(b,a)}}),ib.each(["get","post"],function(a,c){ib[c]=function(a,d,e,f){return ib.isFunction(d)&&(f=f||e,e=d,d=b),ib.ajax({url:a,type:c,dataType:f,data:d,success:e})}}),ib.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Fc,type:"GET",isLocal:Lc.test(Ec[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Sc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":ib.parseJSON,"text xml":ib.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?G(G(a,ib.ajaxSettings),b):G(ib.ajaxSettings,a)},ajaxPrefilter:E(Qc),ajaxTransport:E(Rc),ajax:function(a,c){function d(a,c,d,e){var f,l,s,t,v,x=c;2!==u&&(u=2,i&&clearTimeout(i),k=b,h=e||"",w.readyState=a>0?4:0,d&&(t=H(m,w,d)),a>=200&&300>a||304===a?(m.ifModified&&(v=w.getResponseHeader("Last-Modified"),v&&(ib.lastModified[g]=v),v=w.getResponseHeader("etag"),v&&(ib.etag[g]=v)),204===a?(f=!0,x="nocontent"):304===a?(f=!0,x="notmodified"):(f=I(m,t),x=f.state,l=f.data,s=f.error,f=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),w.status=a,w.statusText=(c||x)+"",f?p.resolveWith(n,[l,x,w]):p.rejectWith(n,[w,x,s]),w.statusCode(r),r=b,j&&o.trigger(f?"ajaxSuccess":"ajaxError",[w,m,f?l:s]),q.fireWith(n,[w,x]),j&&(o.trigger("ajaxComplete",[w,m]),--ib.active||ib.event.trigger("ajaxStop")))}"object"==typeof a&&(c=a,a=b),c=c||{};var e,f,g,h,i,j,k,l,m=ib.ajaxSetup({},c),n=m.context||m,o=m.context&&(n.nodeType||n.jquery)?ib(n):ib.event,p=ib.Deferred(),q=ib.Callbacks("once memory"),r=m.statusCode||{},s={},t={},u=0,v="canceled",w={readyState:0,getResponseHeader:function(a){var b;if(2===u){if(!l)for(l={};b=Kc.exec(h);)l[b[1].toLowerCase()]=b[2];b=l[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===u?h:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return u||(a=t[c]=t[c]||a,s[a]=b),this},overrideMimeType:function(a){return u||(m.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>u)for(b in a)r[b]=[r[b],a[b]];else w.always(a[w.status]);return this},abort:function(a){var b=a||v;return k&&k.abort(b),d(0,b),this}};if(p.promise(w).complete=q.add,w.success=w.done,w.error=w.fail,m.url=((a||m.url||Fc)+"").replace(Ic,"").replace(Nc,Ec[1]+"//"),m.type=c.method||c.type||m.method||m.type,m.dataTypes=ib.trim(m.dataType||"*").toLowerCase().match(kb)||[""],null==m.crossDomain&&(e=Oc.exec(m.url.toLowerCase()),m.crossDomain=!(!e||e[1]===Ec[1]&&e[2]===Ec[2]&&(e[3]||("http:"===e[1]?80:443))==(Ec[3]||("http:"===Ec[1]?80:443)))),m.data&&m.processData&&"string"!=typeof m.data&&(m.data=ib.param(m.data,m.traditional)),F(Qc,m,c,w),2===u)return w;j=m.global,j&&0===ib.active++&&ib.event.trigger("ajaxStart"),m.type=m.type.toUpperCase(),m.hasContent=!Mc.test(m.type),g=m.url,m.hasContent||(m.data&&(g=m.url+=(Hc.test(g)?"&":"?")+m.data,delete m.data),m.cache===!1&&(m.url=Jc.test(g)?g.replace(Jc,"$1_="+Gc++):g+(Hc.test(g)?"&":"?")+"_="+Gc++)),m.ifModified&&(ib.lastModified[g]&&w.setRequestHeader("If-Modified-Since",ib.lastModified[g]),ib.etag[g]&&w.setRequestHeader("If-None-Match",ib.etag[g])),(m.data&&m.hasContent&&m.contentType!==!1||c.contentType)&&w.setRequestHeader("Content-Type",m.contentType),w.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+("*"!==m.dataTypes[0]?", "+Sc+"; q=0.01":""):m.accepts["*"]);for(f in m.headers)w.setRequestHeader(f,m.headers[f]);if(m.beforeSend&&(m.beforeSend.call(n,w,m)===!1||2===u))return w.abort();v="abort";for(f in{success:1,error:1,complete:1})w[f](m[f]);if(k=F(Rc,m,c,w)){w.readyState=1,j&&o.trigger("ajaxSend",[w,m]),m.async&&m.timeout>0&&(i=setTimeout(function(){w.abort("timeout")},m.timeout));try{u=1,k.send(s,d)}catch(x){if(!(2>u))throw x;d(-1,x)}}else d(-1,"No Transport");return w},getScript:function(a,c){return ib.get(a,b,c,"script")},getJSON:function(a,b,c){return ib.get(a,b,c,"json")}}),ib.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return ib.globalEval(a),a}}}),ib.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),ib.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=W.head||ib("head")[0]||W.documentElement;return{send:function(b,e){c=W.createElement("script"),c.async=!0,a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,b){(b||!c.readyState||/loaded|complete/.test(c.readyState))&&(c.onload=c.onreadystatechange=null,c.parentNode&&c.parentNode.removeChild(c),c=null,b||e(200,"success"))},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(b,!0)}}}});var Uc=[],Vc=/(=)\?(?=&|$)|\?\?/;ib.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Uc.pop()||ib.expando+"_"+Gc++;return this[a]=!0,a}}),ib.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.jsonp!==!1&&(Vc.test(c.url)?"url":"string"==typeof c.data&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vc.test(c.data)&&"data");return i||"jsonp"===c.dataTypes[0]?(f=c.jsonpCallback=ib.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,i?c[i]=c[i].replace(Vc,"$1"+f):c.jsonp!==!1&&(c.url+=(Hc.test(c.url)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||ib.error(f+" was not called"),h[0]},c.dataTypes[0]="json",g=a[f],a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,Uc.push(f)),h&&ib.isFunction(g)&&g(h[0]),h=g=b}),"script"):void 0});var Wc,Xc,Yc=0,Zc=a.ActiveXObject&&function(){var a;for(a in Wc)Wc[a](b,!0)};ib.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&J()||K()}:J,Xc=ib.ajaxSettings.xhr(),ib.support.cors=!!Xc&&"withCredentials"in Xc,Xc=ib.support.ajax=!!Xc,Xc&&ib.ajaxTransport(function(c){if(!c.crossDomain||ib.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();if(c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async),c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),c.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l;try{if(d&&(e||4===i.readyState))if(d=b,g&&(i.onreadystatechange=ib.noop,Zc&&delete Wc[g]),e)4!==i.readyState&&i.abort();else{l={},h=i.status,j=i.getAllResponseHeaders(),"string"==typeof i.responseText&&(l.text=i.responseText);try{k=i.statusText}catch(m){k=""}h||!c.isLocal||c.crossDomain?1223===h&&(h=204):h=l.text?200:404}}catch(n){e||f(-1,n)}l&&f(h,k,l,j)},c.async?4===i.readyState?setTimeout(d):(g=++Yc,Zc&&(Wc||(Wc={},ib(a).unload(Zc)),Wc[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(b,!0)}}}});var $c,_c,ad=/^(?:toggle|show|hide)$/,bd=new RegExp("^(?:([+-])=|)("+jb+")([a-z%]*)$","i"),cd=/queueHooks$/,dd=[P],ed={"*":[function(a,b){var c,d,e=this.createTween(a,b),f=bd.exec(b),g=e.cur(),h=+g||0,i=1,j=20;if(f){if(c=+f[2],d=f[3]||(ib.cssNumber[a]?"":"px"),"px"!==d&&h){h=ib.css(e.elem,a,!0)||c||1;do i=i||".5",h/=i,ib.style(e.elem,a,h+d);while(i!==(i=e.cur()/g)&&1!==i&&--j)}e.unit=d,e.start=h,e.end=f[1]?h+(f[1]+1)*c:c}return e}]};ib.Animation=ib.extend(N,{tweener:function(a,b){ib.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],ed[c]=ed[c]||[],ed[c].unshift(b)},prefilter:function(a,b){b?dd.unshift(a):dd.push(a)}}),ib.Tween=Q,Q.prototype={constructor:Q,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(ib.cssNumber[c]?"":"px")},cur:function(){var a=Q.propHooks[this.prop];return a&&a.get?a.get(this):Q.propHooks._default.get(this)},run:function(a){var b,c=Q.propHooks[this.prop];return this.pos=b=this.options.duration?ib.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Q.propHooks._default.set(this),this}},Q.prototype.init.prototype=Q.prototype,Q.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=ib.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){ib.fx.step[a.prop]?ib.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[ib.cssProps[a.prop]]||ib.cssHooks[a.prop])?ib.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Q.propHooks.scrollTop=Q.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},ib.each(["toggle","show","hide"],function(a,b){var c=ib.fn[b];ib.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(R(b,!0),a,d,e)}}),ib.fn.extend({fadeTo:function(a,b,c,d){return this.filter(w).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=ib.isEmptyObject(a),f=ib.speed(b,c,d),g=function(){var b=N(this,ib.extend({},a),f);g.finish=function(){b.stop(!0)},(e||ib._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,c,d){var e=function(a){var b=a.stop;delete a.stop,b(d)};return"string"!=typeof a&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,c=null!=a&&a+"queueHooks",f=ib.timers,g=ib._data(this);if(c)g[c]&&g[c].stop&&e(g[c]);else for(c in g)g[c]&&g[c].stop&&cd.test(c)&&e(g[c]);for(c=f.length;c--;)f[c].elem!==this||null!=a&&f[c].queue!==a||(f[c].anim.stop(d),b=!1,f.splice(c,1));(b||!d)&&ib.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=ib._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=ib.timers,g=d?d.length:0;for(c.finish=!0,ib.queue(this,a,[]),e&&e.cur&&e.cur.finish&&e.cur.finish.call(this),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),ib.each({slideDown:R("show"),slideUp:R("hide"),slideToggle:R("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){ib.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),ib.speed=function(a,b,c){var d=a&&"object"==typeof a?ib.extend({},a):{complete:c||!c&&b||ib.isFunction(a)&&a,duration:a,easing:c&&b||b&&!ib.isFunction(b)&&b};return d.duration=ib.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in ib.fx.speeds?ib.fx.speeds[d.duration]:ib.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){ib.isFunction(d.old)&&d.old.call(this),d.queue&&ib.dequeue(this,d.queue)},d},ib.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},ib.timers=[],ib.fx=Q.prototype.init,ib.fx.tick=function(){var a,c=ib.timers,d=0;for($c=ib.now();d-1,l={},m={};k?(m=g.position(),e=m.top,f=m.left):(e=parseFloat(i)||0,f=parseFloat(j)||0),ib.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(l.top=b.top-h.top+e),null!=b.left&&(l.left=b.left-h.left+f),"using"in b?b.using.call(a,l):g.css(l)}},ib.fn.extend({position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===ib.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),ib.nodeName(a[0],"html")||(c=a.offset()),c.top+=ib.css(a[0],"borderTopWidth",!0),c.left+=ib.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-ib.css(d,"marginTop",!0),left:b.left-c.left-ib.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||W.documentElement;a&&!ib.nodeName(a,"html")&&"static"===ib.css(a,"position");)a=a.offsetParent;return a||W.documentElement})}}),ib.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);ib.fn[a]=function(e){return ib.access(this,function(a,e,f){var g=S(a);return f===b?g?c in g?g[c]:g.document.documentElement[e]:a[e]:(g?g.scrollTo(d?ib(g).scrollLeft():f,d?f:ib(g).scrollTop()):a[e]=f,void 0)},a,e,arguments.length,null)}}),ib.each({Height:"height",Width:"width"},function(a,c){ib.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){ib.fn[e]=function(e,f){var g=arguments.length&&(d||"boolean"!=typeof e),h=d||(e===!0||f===!0?"margin":"border");return ib.access(this,function(c,d,e){var f;return ib.isWindow(c)?c.document.documentElement["client"+a]:9===c.nodeType?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?ib.css(c,d,h):ib.style(c,d,e,h)},c,g?e:b,g,null)}})}),a.jQuery=a.$=ib,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return ib})}(window),function(){var a=!0;!function(b){var c=this||(0,eval)("this"),d=c.document,e=c.navigator,f=c.jQuery,g=c.JSON;!function(a){if("function"==typeof require&&"object"==typeof exports&&"object"==typeof module){var b=module.exports||exports;a(b)}else"function"==typeof define&&define.amd?define(["exports"],a):a(c.ko={})}(function(h){function i(a){var b=this;return a&&m.utils.objectForEach(a,function(a,c){var d=m.extenders[a];"function"==typeof d&&(b=d(b,c))}),b}function j(a){m.bindingHandlers[a]={init:function(b,c,d,e){var f=function(){var b={};return b[a]=c(),b};return m.bindingHandlers.event.init.call(this,b,f,d,e)}}}function k(a,b,c,d){m.bindingHandlers[a]={init:function(a){return m.utils.domData.set(a,v,{}),{controlsDescendantBindings:!0}},update:function(a,e,f,g,h){var i=m.utils.domData.get(a,v),j=m.utils.unwrapObservable(e()),k=!c!=!j,l=!i.savedNodes,n=l||b||k!==i.didDisplayOnLastUpdate;n&&(l&&(i.savedNodes=m.utils.cloneNodes(m.virtualElements.childNodes(a),!0)),k?(l||m.virtualElements.setDomNodeChildren(a,m.utils.cloneNodes(i.savedNodes)),m.applyBindingsToDescendants(d?d(h,j):h,a)):m.virtualElements.emptyNode(a),i.didDisplayOnLastUpdate=k)}},m.expressionRewriting.bindingRewriteValidators[a]=!1,m.virtualElements.allowedBindings[a]=!0}function l(a,b,c){c&&b!==m.selectExtensions.readValue(a)&&m.selectExtensions.writeValue(a,b),b!==m.selectExtensions.readValue(a)&&m.dependencyDetection.ignore(m.utils.triggerEvent,null,[a,"change"])}var m="undefined"!=typeof h?h:{};m.exportSymbol=function(a,b){for(var c=a.split("."),d=m,e=0;ec;c++)j[b[c]]=a});var l={propertychange:!0},n=d&&function(){for(var a=3,c=d.createElement("div"),e=c.getElementsByTagName("i");c.innerHTML="",e[0];);return a>4?a:b}(),o=6===n,p=7===n;return{fieldsIncludedWithJsonPost:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],arrayForEach:function(a,b){for(var c=0,d=a.length;d>c;c++)b(a[c])},arrayIndexOf:function(a,b){if("function"==typeof Array.prototype.indexOf)return Array.prototype.indexOf.call(a,b); for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},arrayFirst:function(a,b,c){for(var d=0,e=a.length;e>d;d++)if(b.call(c,a[d]))return a[d];return null},arrayRemoveItem:function(a,b){var c=m.utils.arrayIndexOf(a,b);c>=0&&a.splice(c,1)},arrayGetDistinctValues:function(a){a=a||[];for(var b=[],c=0,d=a.length;d>c;c++)m.utils.arrayIndexOf(b,a[c])<0&&b.push(a[c]);return b},arrayMap:function(a,b){a=a||[];for(var c=[],d=0,e=a.length;e>d;d++)c.push(b(a[d]));return c},arrayFilter:function(a,b){a=a||[];for(var c=[],d=0,e=a.length;e>d;d++)b(a[d])&&c.push(a[d]);return c},arrayPushAll:function(a,b){if(b instanceof Array)a.push.apply(a,b);else for(var c=0,d=b.length;d>c;c++)a.push(b[c]);return a},addOrRemoveItem:function(a,b,c){var d=a.indexOf?a.indexOf(b):m.utils.arrayIndexOf(a,b);0>d?c&&a.push(b):c||a.splice(d,1)},extend:function(a,b){if(b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a},objectForEach:h,emptyDomNode:function(a){for(;a.firstChild;)m.removeNode(a.firstChild)},moveCleanedNodesToContainerElement:function(a){for(var b=m.utils.makeArray(a),c=d.createElement("div"),e=0,f=b.length;f>e;e++)c.appendChild(m.cleanNode(b[e]));return c},cloneNodes:function(a,b){for(var c=0,d=a.length,e=[];d>c;c++){var f=a[c].cloneNode(!0);e.push(b?m.cleanNode(f):f)}return e},setDomNodeChildren:function(a,b){if(m.utils.emptyDomNode(a),b)for(var c=0,d=b.length;d>c;c++)a.appendChild(b[c])},replaceDomNodes:function(a,b){var c=a.nodeType?[a]:a;if(c.length>0){for(var d=c[0],e=d.parentNode,f=0,g=b.length;g>f;f++)e.insertBefore(b[f],d);for(var f=0,g=c.length;g>f;f++)m.removeNode(c[f])}},setOptionNodeSelectionState:function(a,b){7>n?a.setAttribute("selected",b):a.selected=b},stringTrim:function(a){return null===a||a===b?"":a.trim?a.trim():a.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},stringTokenize:function(a,b){for(var c=[],d=(a||"").split(b),e=0,f=d.length;f>e;e++){var g=m.utils.stringTrim(d[e]);""!==g&&c.push(g)}return c},stringStartsWith:function(a,b){return a=a||"",b.length>a.length?!1:a.substring(0,b.length)===b},domNodeIsContainedBy:function(a,b){if(b.compareDocumentPosition)return 16==(16&b.compareDocumentPosition(a));for(;null!=a;){if(a==b)return!0;a=a.parentNode}return!1},domNodeIsAttachedToDocument:function(a){return m.utils.domNodeIsContainedBy(a,a.ownerDocument)},anyDomNodeIsAttachedToDocument:function(a){return!!m.utils.arrayFirst(a,m.utils.domNodeIsAttachedToDocument)},tagNameLower:function(a){return a&&a.tagName&&a.tagName.toLowerCase()},registerEventHandler:function(b,c,d){var e=n&&l[c];if(e||"undefined"==typeof f)if(e||"function"!=typeof b.addEventListener){if("undefined"==typeof b.attachEvent)throw new Error("Browser doesn't support addEventListener or attachEvent");var g=function(a){d.call(b,a)},h="on"+c;b.attachEvent(h,g),m.utils.domNodeDisposal.addDisposeCallback(b,function(){b.detachEvent(h,g)})}else b.addEventListener(c,d,!1);else{if(a(b,c)){var i=d;d=function(a,b){var c=this.checked;b&&(this.checked=b.checkedStateBeforeEvent!==!0),i.call(this,a),this.checked=c}}f(b).bind(c,d)}},triggerEvent:function(b,e){if(!b||!b.nodeType)throw new Error("element must be a DOM node when calling triggerEvent");if("undefined"!=typeof f){var g=[];a(b,e)&&g.push({checkedStateBeforeEvent:b.checked}),f(b).trigger(e,g)}else if("function"==typeof d.createEvent){if("function"!=typeof b.dispatchEvent)throw new Error("The supplied element doesn't support dispatchEvent");var h=j[e]||"HTMLEvents",i=d.createEvent(h);i.initEvent(e,!0,!0,c,0,0,0,0,0,!1,!1,!1,!1,0,b),b.dispatchEvent(i)}else{if("undefined"==typeof b.fireEvent)throw new Error("Browser doesn't support triggering events");a(b,e)&&(b.checked=b.checked!==!0),b.fireEvent("on"+e)}},unwrapObservable:function(a){return m.isObservable(a)?a():a},peekObservable:function(a){return m.isObservable(a)?a.peek():a},toggleDomNodeCssClass:function(a,b,c){if(b){var d=/\S+/g,e=a.className.match(d)||[];m.utils.arrayForEach(b.match(d),function(a){m.utils.addOrRemoveItem(e,a,c)}),a.className=e.join(" ")}},setTextContent:function(a,c){var e=m.utils.unwrapObservable(c);(null===e||e===b)&&(e="");var f=m.virtualElements.firstChild(a);!f||3!=f.nodeType||m.virtualElements.nextSibling(f)?m.virtualElements.setDomNodeChildren(a,[d.createTextNode(e)]):f.data=e,m.utils.forceRefresh(a)},setElementName:function(a,b){if(a.name=b,7>=n)try{a.mergeAttributes(d.createElement(""),!1)}catch(c){}},forceRefresh:function(a){if(n>=9){var b=1==a.nodeType?a:a.parentNode;b.style&&(b.style.zoom=b.style.zoom)}},ensureSelectElementIsRenderedCorrectly:function(a){if(n){var b=a.style.width;a.style.width=0,a.style.width=b}},range:function(a,b){a=m.utils.unwrapObservable(a),b=m.utils.unwrapObservable(b);for(var c=[],d=a;b>=d;d++)c.push(d);return c},makeArray:function(a){for(var b=[],c=0,d=a.length;d>c;c++)b.push(a[c]);return b},isIe6:o,isIe7:p,ieVersion:n,getFormFields:function(a,b){for(var c=m.utils.makeArray(a.getElementsByTagName("input")).concat(m.utils.makeArray(a.getElementsByTagName("textarea"))),d="string"==typeof b?function(a){return a.name===b}:function(a){return b.test(a.name)},e=[],f=c.length-1;f>=0;f--)d(c[f])&&e.push(c[f]);return e},parseJson:function(a){return"string"==typeof a&&(a=m.utils.stringTrim(a))?g&&g.parse?g.parse(a):new Function("return "+a)():null},stringifyJson:function(a,b,c){if(!g||!g.stringify)throw new Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js");return g.stringify(m.utils.unwrapObservable(a),b,c)},postJson:function(a,b,c){c=c||{};var e=c.params||{},f=c.includeFields||this.fieldsIncludedWithJsonPost,g=a;if("object"==typeof a&&"form"===m.utils.tagNameLower(a)){var i=a;g=i.action;for(var j=f.length-1;j>=0;j--)for(var k=m.utils.getFormFields(i,f[j]),l=k.length-1;l>=0;l--)e[k[l].name]=k[l].value}b=m.utils.unwrapObservable(b);var n=d.createElement("form");n.style.display="none",n.action=g,n.method="post";for(var o in b){var p=d.createElement("input");p.name=o,p.value=m.utils.stringifyJson(m.utils.unwrapObservable(b[o])),n.appendChild(p)}h(e,function(a,b){var c=d.createElement("input");c.name=a,c.value=b,n.appendChild(c)}),d.body.appendChild(n),c.submitter?c.submitter(n):n.submit(),setTimeout(function(){n.parentNode.removeChild(n)},0)}}}(),m.exportSymbol("utils",m.utils),m.exportSymbol("utils.arrayForEach",m.utils.arrayForEach),m.exportSymbol("utils.arrayFirst",m.utils.arrayFirst),m.exportSymbol("utils.arrayFilter",m.utils.arrayFilter),m.exportSymbol("utils.arrayGetDistinctValues",m.utils.arrayGetDistinctValues),m.exportSymbol("utils.arrayIndexOf",m.utils.arrayIndexOf),m.exportSymbol("utils.arrayMap",m.utils.arrayMap),m.exportSymbol("utils.arrayPushAll",m.utils.arrayPushAll),m.exportSymbol("utils.arrayRemoveItem",m.utils.arrayRemoveItem),m.exportSymbol("utils.extend",m.utils.extend),m.exportSymbol("utils.fieldsIncludedWithJsonPost",m.utils.fieldsIncludedWithJsonPost),m.exportSymbol("utils.getFormFields",m.utils.getFormFields),m.exportSymbol("utils.peekObservable",m.utils.peekObservable),m.exportSymbol("utils.postJson",m.utils.postJson),m.exportSymbol("utils.parseJson",m.utils.parseJson),m.exportSymbol("utils.registerEventHandler",m.utils.registerEventHandler),m.exportSymbol("utils.stringifyJson",m.utils.stringifyJson),m.exportSymbol("utils.range",m.utils.range),m.exportSymbol("utils.toggleDomNodeCssClass",m.utils.toggleDomNodeCssClass),m.exportSymbol("utils.triggerEvent",m.utils.triggerEvent),m.exportSymbol("utils.unwrapObservable",m.utils.unwrapObservable),m.exportSymbol("utils.objectForEach",m.utils.objectForEach),m.exportSymbol("utils.addOrRemoveItem",m.utils.addOrRemoveItem),m.exportSymbol("unwrap",m.utils.unwrapObservable),Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=Array.prototype.slice.call(arguments),a=c.shift();return function(){return b.apply(a,c.concat(Array.prototype.slice.call(arguments)))}}),m.utils.domData=new function(){var a=0,c="__ko__"+(new Date).getTime(),d={};return{get:function(a,c){var d=m.utils.domData.getAll(a,!1);return d===b?b:d[c]},set:function(a,c,d){if(d!==b||m.utils.domData.getAll(a,!1)!==b){var e=m.utils.domData.getAll(a,!0);e[c]=d}},getAll:function(e,f){var g=e[c],h=g&&"null"!==g&&d[g];if(!h){if(!f)return b;g=e[c]="ko"+a++,d[g]={}}return d[g]},clear:function(a){var b=a[c];return b?(delete d[b],a[c]=null,!0):!1}}},m.exportSymbol("utils.domData",m.utils.domData),m.exportSymbol("utils.domData.clear",m.utils.domData.clear),m.utils.domNodeDisposal=new function(){function a(a,c){var d=m.utils.domData.get(a,g);return d===b&&c&&(d=[],m.utils.domData.set(a,g,d)),d}function c(a){m.utils.domData.set(a,g,b)}function d(b){var c=a(b,!1);if(c){c=c.slice(0);for(var d=0;dc;c++)d(b[c])}return a},removeNode:function(a){m.cleanNode(a),a.parentNode&&a.parentNode.removeChild(a)}}},m.cleanNode=m.utils.domNodeDisposal.cleanNode,m.removeNode=m.utils.domNodeDisposal.removeNode,m.exportSymbol("cleanNode",m.cleanNode),m.exportSymbol("removeNode",m.removeNode),m.exportSymbol("utils.domNodeDisposal",m.utils.domNodeDisposal),m.exportSymbol("utils.domNodeDisposal.addDisposeCallback",m.utils.domNodeDisposal.addDisposeCallback),m.exportSymbol("utils.domNodeDisposal.removeDisposeCallback",m.utils.domNodeDisposal.removeDisposeCallback),function(){function a(a){var b=m.utils.stringTrim(a).toLowerCase(),e=d.createElement("div"),f=b.match(/^<(thead|tbody|tfoot)/)&&[1,"
          ","
          "]||!b.indexOf("",""]||(!b.indexOf("",""]||[0,"",""],g="ignored
          "+f[1]+a+f[2]+"
          ";for("function"==typeof c.innerShiv?e.appendChild(c.innerShiv(g)):e.innerHTML=g;f[0]--;)e=e.lastChild;return m.utils.makeArray(e.lastChild.childNodes)}function e(a){if(f.parseHTML)return f.parseHTML(a)||[];var b=f.clean([a]);if(b&&b[0]){for(var c=b[0];c.parentNode&&11!==c.parentNode.nodeType;)c=c.parentNode;c.parentNode&&c.parentNode.removeChild(c)}return b}m.utils.parseHtmlFragment=function(b){return"undefined"!=typeof f?e(b):a(b)},m.utils.setHtml=function(a,c){if(m.utils.emptyDomNode(a),c=m.utils.unwrapObservable(c),null!==c&&c!==b)if("string"!=typeof c&&(c=c.toString()),"undefined"!=typeof f)f(a).html(c);else for(var d=m.utils.parseHtmlFragment(c),e=0;ee;e++)d(f[e],b)}var e={};return{memoize:function(a){if("function"!=typeof a)throw new Error("You can only pass a function to ko.memoization.memoize()");var b=c();return e[b]=a,""},unmemoize:function(a,c){var d=e[a];if(d===b)throw new Error("Couldn't find any memo with ID "+a+". Perhaps it's already been unmemoized.");try{return d.apply(null,c||[]),!0}finally{delete e[a]}},unmemoizeDomNodeAndDescendants:function(a,b){var c=[];d(a,c);for(var e=0,f=c.length;f>e;e++){var g=c[e].domNode,h=[g];b&&m.utils.arrayPushAll(h,b),m.memoization.unmemoize(c[e].memoId,h),g.nodeValue="",g.parentNode&&g.parentNode.removeChild(g)}},parseMemoText:function(a){var b=a.match(/^\[ko_memo\:(.*?)\]$/);return b?b[1]:null}}}(),m.exportSymbol("memoization",m.memoization),m.exportSymbol("memoization.memoize",m.memoization.memoize),m.exportSymbol("memoization.unmemoize",m.memoization.unmemoize),m.exportSymbol("memoization.parseMemoText",m.memoization.parseMemoText),m.exportSymbol("memoization.unmemoizeDomNodeAndDescendants",m.memoization.unmemoizeDomNodeAndDescendants),m.extenders={throttle:function(a,b){a.throttleEvaluation=b;var c=null;return m.dependentObservable({read:a,write:function(d){clearTimeout(c),c=setTimeout(function(){a(d)},b)}})},notify:function(a,b){return a.equalityComparer="always"==b?function(){return!1}:m.observable.fn.equalityComparer,a}},m.exportSymbol("extenders",m.extenders),m.subscription=function(a,b,c){this.target=a,this.callback=b,this.disposeCallback=c,m.exportProperty(this,"dispose",this.dispose)},m.subscription.prototype.dispose=function(){this.isDisposed=!0,this.disposeCallback()},m.subscribable=function(){this._subscriptions={},m.utils.extend(this,m.subscribable.fn),m.exportProperty(this,"subscribe",this.subscribe),m.exportProperty(this,"extend",this.extend),m.exportProperty(this,"getSubscriptionsCount",this.getSubscriptionsCount)};var n="change";m.subscribable.fn={subscribe:function(a,b,c){c=c||n;var d=b?a.bind(b):a,e=new m.subscription(this,d,function(){m.utils.arrayRemoveItem(this._subscriptions[c],e)}.bind(this));return this._subscriptions[c]||(this._subscriptions[c]=[]),this._subscriptions[c].push(e),e},notifySubscribers:function(a,b){b=b||n,this._subscriptions[b]&&m.dependencyDetection.ignore(function(){m.utils.arrayForEach(this._subscriptions[b].slice(0),function(b){b&&b.isDisposed!==!0&&b.callback(a)})},this)},getSubscriptionsCount:function(){var a=0;return m.utils.objectForEach(this._subscriptions,function(b,c){a+=c.length}),a},extend:i},m.isSubscribable=function(a){return null!=a&&"function"==typeof a.subscribe&&"function"==typeof a.notifySubscribers},m.exportSymbol("subscribable",m.subscribable),m.exportSymbol("isSubscribable",m.isSubscribable),m.dependencyDetection=function(){var a=[];return{begin:function(b){a.push({callback:b,distinctDependencies:[]})},end:function(){a.pop()},registerDependency:function(b){if(!m.isSubscribable(b))throw new Error("Only subscribable things can act as dependencies");if(a.length>0){var c=a[a.length-1];if(!c||m.utils.arrayIndexOf(c.distinctDependencies,b)>=0)return;c.distinctDependencies.push(b),c.callback(b)}},ignore:function(b,c,d){try{return a.push(null),b.apply(c,d||[])}finally{a.pop()}}}}();var o={undefined:!0,"boolean":!0,number:!0,string:!0};m.observable=function(b){function c(){return arguments.length>0?(c.equalityComparer&&c.equalityComparer(d,arguments[0])||(c.valueWillMutate(),d=arguments[0],a&&(c._latestValue=d),c.valueHasMutated()),this):(m.dependencyDetection.registerDependency(c),d)}var d=b;return a&&(c._latestValue=d),m.subscribable.call(c),c.peek=function(){return d},c.valueHasMutated=function(){c.notifySubscribers(d)},c.valueWillMutate=function(){c.notifySubscribers(d,"beforeChange")},m.utils.extend(c,m.observable.fn),m.exportProperty(c,"peek",c.peek),m.exportProperty(c,"valueHasMutated",c.valueHasMutated),m.exportProperty(c,"valueWillMutate",c.valueWillMutate),c},m.observable.fn={equalityComparer:function(a,b){var c=null===a||typeof a in o;return c?a===b:!1}};var p=m.observable.protoProperty="__ko_proto__";m.observable.fn[p]=m.observable,m.hasPrototype=function(a,c){return null===a||a===b||a[p]===b?!1:a[p]===c?!0:m.hasPrototype(a[p],c)},m.isObservable=function(a){return m.hasPrototype(a,m.observable)},m.isWriteableObservable=function(a){return"function"==typeof a&&a[p]===m.observable?!0:"function"==typeof a&&a[p]===m.dependentObservable&&a.hasWriteFunction?!0:!1},m.exportSymbol("observable",m.observable),m.exportSymbol("isObservable",m.isObservable),m.exportSymbol("isWriteableObservable",m.isWriteableObservable),m.observableArray=function(a){if(a=a||[],"object"!=typeof a||!("length"in a))throw new Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");var b=m.observable(a);return m.utils.extend(b,m.observableArray.fn),b},m.observableArray.fn={remove:function(a){for(var b=this.peek(),c=[],d="function"==typeof a?a:function(b){return b===a},e=0;e=0}):[]},destroy:function(a){var b=this.peek(),c="function"==typeof a?a:function(b){return b===a};this.valueWillMutate();for(var d=b.length-1;d>=0;d--){var e=b[d];c(e)&&(b[d]._destroy=!0)}this.valueHasMutated()},destroyAll:function(a){return a===b?this.destroy(function(){return!0}):a?this.destroy(function(b){return m.utils.arrayIndexOf(a,b)>=0}):[]},indexOf:function(a){var b=this();return m.utils.arrayIndexOf(b,a)},replace:function(a,b){var c=this.indexOf(a);c>=0&&(this.valueWillMutate(),this.peek()[c]=b,this.valueHasMutated())}},m.utils.arrayForEach(["pop","push","reverse","shift","sort","splice","unshift"],function(a){m.observableArray.fn[a]=function(){var b=this.peek();this.valueWillMutate();var c=b[a].apply(b,arguments);return this.valueHasMutated(),c}}),m.utils.arrayForEach(["slice"],function(a){m.observableArray.fn[a]=function(){var b=this();return b[a].apply(b,arguments)}}),m.exportSymbol("observableArray",m.observableArray),m.dependentObservable=function(c,d,e){function f(a){v.push(a.subscribe(h))}function g(){m.utils.arrayForEach(v,function(a){a.dispose()}),v=[]}function h(){var a=j.throttleEvaluation;a&&a>=0?(clearTimeout(w),w=setTimeout(i,a)):i()}function i(){if(!p){if(o&&t())return u(),void 0;p=!0;try{var c=m.utils.arrayMap(v,function(a){return a.target});m.dependencyDetection.begin(function(a){var d;(d=m.utils.arrayIndexOf(c,a))>=0?c[d]=b:f(a)});for(var e=q.call(d),g=c.length-1;g>=0;g--)c[g]&&v.splice(g,1)[0].dispose();o=!0,j.notifySubscribers(n,"beforeChange"),n=e,a&&(j._latestValue=n),j.notifySubscribers(n)}finally{m.dependencyDetection.end(),p=!1}v.length||u()}}function j(){if(arguments.length>0){if("function"!=typeof r)throw new Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");return r.apply(d,arguments),this}return o||i(),m.dependencyDetection.registerDependency(j),n}function k(){return o||i(),n}function l(){return!o||v.length>0}var n,o=!1,p=!1,q=c;if(q&&"object"==typeof q?(e=q,q=e.read):(e=e||{},q||(q=e.read)),"function"!=typeof q)throw new Error("Pass a function that returns the value of the ko.computed");var r=e.write,s=e.disposeWhenNodeIsRemoved||e.disposeWhenNodeIsRemoved||null,t=e.disposeWhen||e.disposeWhen||function(){return!1},u=g,v=[],w=null;if(d||(d=e.owner),j.peek=k,j.getDependenciesCount=function(){return v.length},j.hasWriteFunction="function"==typeof e.write,j.dispose=function(){u()},j.isActive=l,m.subscribable.call(j),m.utils.extend(j,m.dependentObservable.fn),m.exportProperty(j,"peek",j.peek),m.exportProperty(j,"dispose",j.dispose),m.exportProperty(j,"isActive",j.isActive),m.exportProperty(j,"getDependenciesCount",j.getDependenciesCount),e.deferEvaluation!==!0&&i(),s&&l()){u=function(){m.utils.domNodeDisposal.removeDisposeCallback(s,u),g()},m.utils.domNodeDisposal.addDisposeCallback(s,u);var x=t;t=function(){return!m.utils.domNodeIsAttachedToDocument(s)||x()}}return j},m.isComputed=function(a){return m.hasPrototype(a,m.dependentObservable)};var q=m.observable.protoProperty;m.dependentObservable[q]=m.observable,m.dependentObservable.fn={},m.dependentObservable.fn[q]=m.dependentObservable,m.exportSymbol("dependentObservable",m.dependentObservable),m.exportSymbol("computed",m.dependentObservable),m.exportSymbol("isComputed",m.isComputed),function(){function a(e,f,g){g=g||new d,e=f(e);var h=!("object"!=typeof e||null===e||e===b||e instanceof Date||e instanceof String||e instanceof Number||e instanceof Boolean);if(!h)return e;var i=e instanceof Array?[]:{};return g.save(e,i),c(e,function(c){var d=f(e[c]);switch(typeof d){case"boolean":case"number":case"string":case"function":i[c]=d;break;case"object":case"undefined":var h=g.get(d);i[c]=h!==b?h:a(d,f,g)}}),i}function c(a,b){if(a instanceof Array){for(var c=0;cb;b++)a=a();return a})},m.toJSON=function(a,b,c){var d=m.toJS(a);return m.utils.stringifyJson(d,b,c)},d.prototype={constructor:d,save:function(a,b){var c=m.utils.arrayIndexOf(this.keys,a);c>=0?this.values[c]=b:(this.keys.push(a),this.values.push(b))},get:function(a){var c=m.utils.arrayIndexOf(this.keys,a);return c>=0?this.values[c]:b}}}(),m.exportSymbol("toJS",m.toJS),m.exportSymbol("toJSON",m.toJSON),function(){var a="__ko__hasDomDataOptionValue__";m.selectExtensions={readValue:function(c){switch(m.utils.tagNameLower(c)){case"option":return c[a]===!0?m.utils.domData.get(c,m.bindingHandlers.options.optionValueDomDataKey):m.utils.ieVersion<=7?c.getAttributeNode("value")&&c.getAttributeNode("value").specified?c.value:c.text:c.value;case"select":return c.selectedIndex>=0?m.selectExtensions.readValue(c.options[c.selectedIndex]):b;default:return c.value}},writeValue:function(c,d){switch(m.utils.tagNameLower(c)){case"option":switch(typeof d){case"string":m.utils.domData.set(c,m.bindingHandlers.options.optionValueDomDataKey,b),a in c&&delete c[a],c.value=d;break;default:m.utils.domData.set(c,m.bindingHandlers.options.optionValueDomDataKey,d),c[a]=!0,c.value="number"==typeof d?d:""}break;case"select":""===d&&(d=b),(null===d||d===b)&&(c.selectedIndex=-1);for(var e=c.options.length-1;e>=0;e--)if(m.selectExtensions.readValue(c.options[e])==d){c.selectedIndex=e;break}c.size>1||-1!==c.selectedIndex||(c.selectedIndex=0);break;default:(null===d||d===b)&&(d=""),c.value=d}}}}(),m.exportSymbol("selectExtensions",m.selectExtensions),m.exportSymbol("selectExtensions.readValue",m.selectExtensions.readValue),m.exportSymbol("selectExtensions.writeValue",m.selectExtensions.writeValue),m.expressionRewriting=function(){function a(a,b){for(var c=null;a!=c;)c=a,a=a.replace(d,function(a,c){return b[c]});return a}function b(a){if(m.utils.arrayIndexOf(e,m.utils.stringTrim(a).toLowerCase())>=0)return!1;var b=a.match(f);return null===b?!1:b[1]?"Object("+b[1]+")"+b[2]:a}function c(a){var b=m.utils.stringTrim(a);switch(b.length&&b.charAt(0)){case"'":case'"':return a;default:return"'"+b+"'"}}var d=/\@ko_token_(\d+)\@/g,e=["true","false","null","undefined"],f=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i;return{bindingRewriteValidators:[],parseObjectLiteral:function(b){var c=m.utils.stringTrim(b);if(c.length<3)return[];"{"===c.charAt(0)&&(c=c.substring(1,c.length-1));for(var d,e=[],f=null,g=0;gp;p++){var r=o[p],s=r.indexOf(":");if(s>0&&s0&&f.push(","),d.key){var i=c(d.key),j=d.value;f.push(i),f.push(":"),f.push(j),(j=b(m.utils.stringTrim(j)))&&(g.length>0&&g.push(", "),g.push(i+" : function(__ko_value) { "+j+" = __ko_value; }"))}else d.unknown&&f.push(d.unknown);var k=f.join("");if(g.length>0){var l=g.join("");k=k+", '_ko_property_writers' : { "+l+" } "}return k},keyValueArrayContainsKey:function(a,b){for(var c=0;c0?d[d.length-1].nextSibling:a.nextSibling:null}function f(c){var d=c.firstChild,f=null;if(d)do if(f)f.push(d);else if(a(d)){var g=e(d,!0);g?d=g:f=[d]}else b(d)&&(f=[d]);while(d=d.nextSibling);return f}var g=d&&""===d.createComment("test").text,h=g?/^$/:/^\s*ko(?:\s+(.+\s*\:[\s\S]*))?\s*$/,i=g?/^$/:/^\s*\/ko\s*$/,j={ul:!0,ol:!0};m.virtualElements={allowedBindings:{},childNodes:function(b){return a(b)?c(b):b.childNodes},emptyNode:function(b){if(a(b))for(var c=m.virtualElements.childNodes(b),d=0,e=c.length;e>d;d++)m.removeNode(c[d]);else m.utils.emptyDomNode(b)},setDomNodeChildren:function(b,c){if(a(b)){m.virtualElements.emptyNode(b);for(var d=b.nextSibling,e=0,f=c.length;f>e;e++)d.parentNode.insertBefore(c[e],d)}else m.utils.setDomNodeChildren(b,c)},prepend:function(b,c){a(b)?b.parentNode.insertBefore(c,b.nextSibling):b.firstChild?b.insertBefore(c,b.firstChild):b.appendChild(c)},insertAfter:function(b,c,d){d?a(b)?b.parentNode.insertBefore(c,d.nextSibling):d.nextSibling?b.insertBefore(c,d.nextSibling):b.appendChild(c):m.virtualElements.prepend(b,c)},firstChild:function(c){return a(c)?!c.nextSibling||b(c.nextSibling)?null:c.nextSibling:c.firstChild},nextSibling:function(c){return a(c)&&(c=e(c)),c.nextSibling&&b(c.nextSibling)?null:c.nextSibling},virtualNodeBindingValue:function(b){var c=a(b);return c?c[1]:null},normaliseVirtualElementDomStructure:function(a){if(j[m.utils.tagNameLower(a)]){var b=a.firstChild;if(b)do if(1===b.nodeType){var c=f(b);if(c)for(var d=b.nextSibling,e=0;e=0:c:"radio"==a.type&&(a.checked=a.value==c)}};var s="__ko__cssValue";m.bindingHandlers.css={update:function(a,b){var c=m.utils.unwrapObservable(b());"object"==typeof c?m.utils.objectForEach(c,function(b,c){c=m.utils.unwrapObservable(c),m.utils.toggleDomNodeCssClass(a,b,c)}):(c=String(c||""),m.utils.toggleDomNodeCssClass(a,a[s],!1),a[s]=c,m.utils.toggleDomNodeCssClass(a,c,!0))}},m.bindingHandlers.enable={update:function(a,b){var c=m.utils.unwrapObservable(b());c&&a.disabled?a.removeAttribute("disabled"):c||a.disabled||(a.disabled=!0)}},m.bindingHandlers.disable={update:function(a,b){m.bindingHandlers.enable.update(a,function(){return!m.utils.unwrapObservable(b())})}},m.bindingHandlers.event={init:function(a,b,c,d){var e=b()||{};m.utils.objectForEach(e,function(e){"string"==typeof e&&m.utils.registerEventHandler(a,e,function(a){var f,g=b()[e];if(g){var h=c();try{var i=m.utils.makeArray(arguments);i.unshift(d),f=g.apply(d,i)}finally{f!==!0&&(a.preventDefault?a.preventDefault():a.returnValue=!1)}var j=h[e+"Bubble"]!==!1;j||(a.cancelBubble=!0,a.stopPropagation&&a.stopPropagation())}})})}},m.bindingHandlers.foreach={makeTemplateValueAccessor:function(a){return function(){var b=a(),c=m.utils.peekObservable(b);return c&&"number"!=typeof c.length?(m.utils.unwrapObservable(b),{foreach:c.data,as:c.as,includeDestroyed:c.includeDestroyed,afterAdd:c.afterAdd,beforeRemove:c.beforeRemove,afterRender:c.afterRender,beforeMove:c.beforeMove,afterMove:c.afterMove,templateEngine:m.nativeTemplateEngine.instance}):{foreach:b,templateEngine:m.nativeTemplateEngine.instance}}},init:function(a,b){return m.bindingHandlers.template.init(a,m.bindingHandlers.foreach.makeTemplateValueAccessor(b))},update:function(a,b,c,d,e){return m.bindingHandlers.template.update(a,m.bindingHandlers.foreach.makeTemplateValueAccessor(b),c,d,e)}},m.expressionRewriting.bindingRewriteValidators.foreach=!1,m.virtualElements.allowedBindings.foreach=!0;var t="__ko_hasfocusUpdating",u="__ko_hasfocusLastValue";m.bindingHandlers.hasfocus={init:function(a,b,c){var d=function(d){a[t]=!0;var e=a.ownerDocument;if("activeElement"in e){var f;try{f=e.activeElement}catch(g){f=e.body}d=f===a}var h=b();m.expressionRewriting.writeValueToProperty(h,c,"hasfocus",d,!0),a[u]=d,a[t]=!1},e=d.bind(null,!0),f=d.bind(null,!1);m.utils.registerEventHandler(a,"focus",e),m.utils.registerEventHandler(a,"focusin",e),m.utils.registerEventHandler(a,"blur",f),m.utils.registerEventHandler(a,"focusout",f)},update:function(a,b){var c=!!m.utils.unwrapObservable(b());a[t]||a[u]===c||(c?a.focus():a.blur(),m.dependencyDetection.ignore(m.utils.triggerEvent,null,[a,c?"focusin":"focusout"]))}},m.bindingHandlers.hasFocus=m.bindingHandlers.hasfocus,m.bindingHandlers.html={init:function(){return{controlsDescendantBindings:!0}},update:function(a,b){m.utils.setHtml(a,b())}};var v="__ko_withIfBindingData";k("if"),k("ifnot",!1,!0),k("with",!0,!1,function(a,b){return a.createChildContext(b)}),m.bindingHandlers.options={init:function(a){if("select"!==m.utils.tagNameLower(a))throw new Error("options binding applies only to SELECT elements");for(;a.length>0;)a.remove(0);return{controlsDescendantBindings:!0}},update:function(a,c,e){function f(a,b,c){var d=typeof b;return"function"==d?b(a):"string"==d?a[b]:c}function g(a,c,e){e.length&&(j=e[0].selected&&[m.selectExtensions.readValue(e[0])]);var g=d.createElement("option");if(a===r)m.utils.setHtml(g,i),m.selectExtensions.writeValue(g,b);else{var h=f(a,p.optionsValue,a);m.selectExtensions.writeValue(g,m.utils.unwrapObservable(h));var k=f(a,p.optionsText,h);m.utils.setTextContent(g,k)}return[g]}function h(a,b){if(j){var c=m.utils.arrayIndexOf(j,m.selectExtensions.readValue(b[0]))>=0;m.utils.setOptionNodeSelectionState(b[0],c)}}var i,j,k=0==a.length,n=!k&&a.multiple?a.scrollTop:null,o=m.utils.unwrapObservable(c()),p=e(),q=p.optionsIncludeDestroyed,r={};if(a.multiple?j=m.utils.arrayMap(a.selectedOptions||m.utils.arrayFilter(a.childNodes,function(a){return a.tagName&&"option"===m.utils.tagNameLower(a)&&a.selected}),function(a){return m.selectExtensions.readValue(a)}):a.selectedIndex>=0&&(j=[m.selectExtensions.readValue(a.options[a.selectedIndex])]),o){"undefined"==typeof o.length&&(o=[o]);var s=m.utils.arrayFilter(o,function(a){return q||a===b||null===a||!m.utils.unwrapObservable(a._destroy)});"optionsCaption"in p&&(i=m.utils.unwrapObservable(p.optionsCaption),null!==i&&i!==b&&s.unshift(r))}else o=[];var t=h;p.optionsAfterRender&&(t=function(a,c){h(a,c),m.dependencyDetection.ignore(p.optionsAfterRender,null,[c[0],a!==r?a:b])}),m.utils.setDomNodeChildrenFromArrayMapping(a,s,g,null,t),j=null,k&&"value"in p&&l(a,m.utils.peekObservable(p.value),!0),m.utils.ensureSelectElementIsRenderedCorrectly(a),n&&Math.abs(n-a.scrollTop)>20&&(a.scrollTop=n)}},m.bindingHandlers.options.optionValueDomDataKey="__ko.optionValueDomData__",m.bindingHandlers.selectedOptions={init:function(a,b,c){m.utils.registerEventHandler(a,"change",function(){var d=b(),e=[];m.utils.arrayForEach(a.getElementsByTagName("option"),function(a){a.selected&&e.push(m.selectExtensions.readValue(a))}),m.expressionRewriting.writeValueToProperty(d,c,"selectedOptions",e)})},update:function(a,b){if("select"!=m.utils.tagNameLower(a))throw new Error("values binding applies only to SELECT elements");var c=m.utils.unwrapObservable(b());c&&"number"==typeof c.length&&m.utils.arrayForEach(a.getElementsByTagName("option"),function(a){var b=m.utils.arrayIndexOf(c,m.selectExtensions.readValue(a))>=0;m.utils.setOptionNodeSelectionState(a,b)})}},m.bindingHandlers.style={update:function(a,b){var c=m.utils.unwrapObservable(b()||{});m.utils.objectForEach(c,function(b,c){c=m.utils.unwrapObservable(c),a.style[b]=c||""})}},m.bindingHandlers.submit={init:function(a,b,c,d){if("function"!=typeof b())throw new Error("The value for a submit binding must be a function");m.utils.registerEventHandler(a,"submit",function(c){var e,f=b();try{e=f.call(d,a)}finally{e!==!0&&(c.preventDefault?c.preventDefault():c.returnValue=!1)}})}},m.bindingHandlers.text={update:function(a,b){m.utils.setTextContent(a,b())}},m.virtualElements.allowedBindings.text=!0,m.bindingHandlers.uniqueName={init:function(a,b){if(b()){var c="ko_unique_"+ ++m.bindingHandlers.uniqueName.currentIndex;m.utils.setElementName(a,c)}}},m.bindingHandlers.uniqueName.currentIndex=0,m.bindingHandlers.value={init:function(a,b,c){var d=["change"],e=c().valueUpdate,f=!1;e&&("string"==typeof e&&(e=[e]),m.utils.arrayPushAll(d,e),d=m.utils.arrayGetDistinctValues(d));var g=function(){f=!1;var d=b(),e=m.selectExtensions.readValue(a);m.expressionRewriting.writeValueToProperty(d,c,"value",e)},h=m.utils.ieVersion&&"input"==a.tagName.toLowerCase()&&"text"==a.type&&"off"!=a.autocomplete&&(!a.form||"off"!=a.form.autocomplete);h&&-1==m.utils.arrayIndexOf(d,"propertychange")&&(m.utils.registerEventHandler(a,"propertychange",function(){f=!0}),m.utils.registerEventHandler(a,"blur",function(){f&&g()})),m.utils.arrayForEach(d,function(b){var c=g;m.utils.stringStartsWith(b,"after")&&(c=function(){setTimeout(g,0)},b=b.substring("after".length)),m.utils.registerEventHandler(a,b,c)})},update:function(a,b){var c="select"===m.utils.tagNameLower(a),d=m.utils.unwrapObservable(b()),e=m.selectExtensions.readValue(a),f=d!==e;if(f){var g=function(){m.selectExtensions.writeValue(a,d)};g();var h=c;h&&setTimeout(g,0)}c&&a.length>0&&l(a,d,!1)}},m.bindingHandlers.visible={update:function(a,b){var c=m.utils.unwrapObservable(b()),d=!("none"==a.style.display);c&&!d?a.style.display="":!c&&d&&(a.style.display="none")}},j("click"),m.templateEngine=function(){},m.templateEngine.prototype.renderTemplateSource=function(){throw new Error("Override renderTemplateSource")},m.templateEngine.prototype.createJavaScriptEvaluatorBlock=function(){throw new Error("Override createJavaScriptEvaluatorBlock")},m.templateEngine.prototype.makeTemplateSource=function(a,b){if("string"==typeof a){b=b||d;var c=b.getElementById(a);if(!c)throw new Error("Cannot find template with ID "+a);return new m.templateSources.domElement(c)}if(1==a.nodeType||8==a.nodeType)return new m.templateSources.anonymousTemplate(a);throw new Error("Unknown template type: "+a)},m.templateEngine.prototype.renderTemplate=function(a,b,c,d){var e=this.makeTemplateSource(a,d);return this.renderTemplateSource(e,b,c)},m.templateEngine.prototype.isTemplateRewritten=function(a,b){return this.allowTemplateRewriting===!1?!0:this.makeTemplateSource(a,b).data("isRewritten")},m.templateEngine.prototype.rewriteTemplate=function(a,b,c){var d=this.makeTemplateSource(a,c),e=b(d.text());d.text(e),d.data("isRewritten",!0)},m.exportSymbol("templateEngine",m.templateEngine),m.templateRewriting=function(){function a(a){for(var b=m.expressionRewriting.bindingRewriteValidators,c=0;c/g;return{ensureTemplateIsRewritten:function(a,b,c){b.isTemplateRewritten(a,c)||b.rewriteTemplate(a,function(a){return m.templateRewriting.memoizeBindingAttributeSyntax(a,b)},c)},memoizeBindingAttributeSyntax:function(a,e){return a.replace(c,function(){return b(arguments[4],arguments[1],arguments[2],e)}).replace(d,function(){return b(arguments[1],"","#comment",e)})},applyMemoizedBindingsToNextSibling:function(a,b){return m.memoization.memoize(function(c,d){var e=c.nextSibling;e&&e.nodeName.toLowerCase()===b&&m.applyBindingsToNode(e,a,d)})}}}(),m.exportSymbol("__tr_ambtns",m.templateRewriting.applyMemoizedBindingsToNextSibling),function(){m.templateSources={},m.templateSources.domElement=function(a){this.domElement=a},m.templateSources.domElement.prototype.text=function(){var a=m.utils.tagNameLower(this.domElement),b="script"===a?"text":"textarea"===a?"value":"innerHTML";if(0==arguments.length)return this.domElement[b];var c=arguments[0];"innerHTML"===b?m.utils.setHtml(this.domElement,c):this.domElement[b]=c},m.templateSources.domElement.prototype.data=function(a){return 1===arguments.length?m.utils.domData.get(this.domElement,"templateSourceData_"+a):(m.utils.domData.set(this.domElement,"templateSourceData_"+a,arguments[1]),void 0)};var a="__ko_anon_template__";m.templateSources.anonymousTemplate=function(a){this.domElement=a},m.templateSources.anonymousTemplate.prototype=new m.templateSources.domElement,m.templateSources.anonymousTemplate.prototype.constructor=m.templateSources.anonymousTemplate,m.templateSources.anonymousTemplate.prototype.text=function(){if(0==arguments.length){var c=m.utils.domData.get(this.domElement,a)||{};return c.textData===b&&c.containerData&&(c.textData=c.containerData.innerHTML),c.textData}var d=arguments[0];m.utils.domData.set(this.domElement,a,{textData:d})},m.templateSources.domElement.prototype.nodes=function(){if(0==arguments.length){var b=m.utils.domData.get(this.domElement,a)||{};return b.containerData}var c=arguments[0];m.utils.domData.set(this.domElement,a,{containerData:c})},m.exportSymbol("templateSources",m.templateSources),m.exportSymbol("templateSources.domElement",m.templateSources.domElement),m.exportSymbol("templateSources.anonymousTemplate",m.templateSources.anonymousTemplate)}(),function(){function a(a,b,c){for(var d,e=a,f=m.virtualElements.nextSibling(b);e&&(d=e)!==f;)e=m.virtualElements.nextSibling(d),(1===d.nodeType||8===d.nodeType)&&c(d)}function c(b,c){if(b.length){var d=b[0],e=b[b.length-1];a(d,e,function(a){m.applyBindings(c,a)}),a(d,e,function(a){m.memoization.unmemoizeDomNodeAndDescendants(a,[c])})}}function d(a){return a.nodeType?a:a.length>0?a[0]:null}function e(a,b,e,f,h){h=h||{};var i=a&&d(a),j=i&&i.ownerDocument,k=h.templateEngine||g;m.templateRewriting.ensureTemplateIsRewritten(e,k,j);var l=k.renderTemplate(e,f,h,j);if("number"!=typeof l.length||l.length>0&&"number"!=typeof l[0].nodeType)throw new Error("Template engine must return an array of DOM nodes");var n=!1;switch(b){case"replaceChildren":m.virtualElements.setDomNodeChildren(a,l),n=!0;break;case"replaceNode":m.utils.replaceDomNodes(a,l),n=!0;break;case"ignoreTargetNode":break;default:throw new Error("Unknown renderMode: "+b)}return n&&(c(l,f),h.afterRender&&m.dependencyDetection.ignore(h.afterRender,null,[l,f.$data])),l}function f(a,c){var d=m.utils.domData.get(a,h);d&&"function"==typeof d.dispose&&d.dispose(),m.utils.domData.set(a,h,c&&c.isActive()?c:b)}var g;m.setTemplateEngine=function(a){if(a!=b&&!(a instanceof m.templateEngine))throw new Error("templateEngine must inherit from ko.templateEngine");g=a},m.renderTemplate=function(a,c,f,h,i){if(f=f||{},(f.templateEngine||g)==b)throw new Error("Set a template engine before calling renderTemplate");if(i=i||"replaceChildren",h){var j=d(h),k=function(){return!j||!m.utils.domNodeIsAttachedToDocument(j)},l=j&&"replaceNode"==i?j.parentNode:j;return m.dependentObservable(function(){var b=c&&c instanceof m.bindingContext?c:new m.bindingContext(m.utils.unwrapObservable(c)),g="function"==typeof a?a(b.$data,b):a,k=e(h,i,g,b,f);"replaceNode"==i&&(h=k,j=d(h))},null,{disposeWhen:k,disposeWhenNodeIsRemoved:l})}return m.memoization.memoize(function(b){m.renderTemplate(a,c,f,b,"replaceNode")})},m.renderTemplateForEach=function(a,d,f,g,h){var i,j=function(b,c){i=h.createChildContext(m.utils.unwrapObservable(b),f.as),i.$index=c;var d="function"==typeof a?a(b,i):a;return e(null,"ignoreTargetNode",d,i,f)},k=function(a,b){c(b,i),f.afterRender&&f.afterRender(b,a)};return m.dependentObservable(function(){var a=m.utils.unwrapObservable(d)||[];"undefined"==typeof a.length&&(a=[a]);var c=m.utils.arrayFilter(a,function(a){return f.includeDestroyed||a===b||null===a||!m.utils.unwrapObservable(a._destroy)});m.dependencyDetection.ignore(m.utils.setDomNodeChildrenFromArrayMapping,null,[g,c,j,f,k])},null,{disposeWhenNodeIsRemoved:g})};var h="__ko__templateComputedDomDataKey__";m.bindingHandlers.template={init:function(a,b){var c=m.utils.unwrapObservable(b());if("string"!=typeof c&&!c.name&&(1==a.nodeType||8==a.nodeType)){var d=1==a.nodeType?a.childNodes:m.virtualElements.childNodes(a),e=m.utils.moveCleanedNodesToContainerElement(d);new m.templateSources.anonymousTemplate(a).nodes(e)}return{controlsDescendantBindings:!0}},update:function(a,b,c,d,e){var g,h=m.utils.unwrapObservable(b()),i={},j=!0,k=null;if("string"!=typeof h&&(i=h,h=m.utils.unwrapObservable(i.name),"if"in i&&(j=m.utils.unwrapObservable(i["if"])),j&&"ifnot"in i&&(j=!m.utils.unwrapObservable(i.ifnot)),g=m.utils.unwrapObservable(i.data)),"foreach"in i){var l=j&&i.foreach||[];k=m.renderTemplateForEach(h||a,l,i,a,e)}else if(j){var n="data"in i?e.createChildContext(g,i.as):e;k=m.renderTemplate(h||a,n,i,a)}else m.virtualElements.emptyNode(a);f(a,k)}},m.expressionRewriting.bindingRewriteValidators.template=function(a){var b=m.expressionRewriting.parseObjectLiteral(a);return 1==b.length&&b[0].unknown?null:m.expressionRewriting.keyValueArrayContainsKey(b,"name")?null:"This template engine does not support anonymous templates nested within its templates"},m.virtualElements.allowedBindings.template=!0}(),m.exportSymbol("setTemplateEngine",m.setTemplateEngine),m.exportSymbol("renderTemplate",m.renderTemplate),m.utils.compareArrays=function(){function a(a,e,f){return a=a||[],e=e||[],a.length<=e.length?b(a,e,c,d,f):b(e,a,d,c,f)}function b(a,b,c,d,e){var f,g,h,i,j,k,l=Math.min,m=Math.max,n=[],o=a.length,p=b.length,q=p-o||1,r=o+p+1;for(f=0;o>=f;f++)for(i=h,n.push(h=[]),j=l(p,f+q),k=m(0,f-1),g=k;j>=g;g++)if(g)if(f)if(a[f-1]===b[g-1])h[g]=i[g-1];else{var s=i[g]||r,t=h[g-1]||r;h[g]=l(s,t)+1}else h[g]=g+1;else h[g]=f+1;var u,v=[],w=[],x=[];for(f=o,g=p;f||g;)u=n[f][g]-1,g&&u===n[f][g-1]?w.push(v[v.length]={status:c,value:b[--g],index:g}):f&&u===n[f-1][g]?x.push(v[v.length]={status:d,value:a[--f],index:f}):(v.push({status:"retained",value:b[--g]}),--f);if(w.length&&x.length){var y,z,A,B,C,D=10*o;for(y=z=0;(e||D>y)&&(B=w[z]);z++){for(A=0;C=x[A];A++)if(B.value===C.value){B.moved=C.index,C.moved=B.index,x.splice(A,1),y=A=0;break}y+=A}}return v.reverse()}var c="added",d="deleted";return a}(),m.exportSymbol("utils.compareArrays",m.utils.compareArrays),function(){function a(a){for(;a.length&&!m.utils.domNodeIsAttachedToDocument(a[0]);)a.splice(0,1);if(a.length>1){for(var b=a[0],c=a[a.length-1],d=[b];b!==c;){if(b=b.nextSibling,!b)return;d.push(b)}Array.prototype.splice.apply(a,[0,a.length].concat(d))}return a}function c(c,d,e,f,g){var h=[],i=m.dependentObservable(function(){var b=d(e,g,a(h))||[];h.length>0&&(m.utils.replaceDomNodes(h,b),f&&m.dependencyDetection.ignore(f,null,[e,b,g])),h.splice(0,h.length),m.utils.arrayPushAll(h,b)},null,{disposeWhenNodeIsRemoved:c,disposeWhen:function(){return!m.utils.anyDomNodeIsAttachedToDocument(h)}});return{mappedNodes:h,dependentObservable:i.isActive()?i:b}}var d="setDomNodeChildrenFromArrayMapping_lastMappingResult";m.utils.setDomNodeChildrenFromArrayMapping=function(e,f,g,h,i){function j(b,c){l=q[c],v!==c&&(z[b]=l),l.indexObservable(v++),a(l.mappedNodes),t.push(l),x.push(l)}function k(a,b){if(a)for(var c=0,d=b.length;d>c;c++)b[c]&&m.utils.arrayForEach(b[c].mappedNodes,function(d){a(d,c,b[c].arrayEntry)})}f=f||[],h=h||{};for(var l,n,o,p=m.utils.domData.get(e,d)===b,q=m.utils.domData.get(e,d)||[],r=m.utils.arrayMap(q,function(a){return a.arrayEntry}),s=m.utils.compareArrays(r,f,h.dontLimitMoves),t=[],u=0,v=0,w=[],x=[],y=[],z=[],A=[],B=0;n=s[B];B++)switch(o=n.moved,n.status){case"deleted":o===b&&(l=q[u],l.dependentObservable&&l.dependentObservable.dispose(),w.push.apply(w,a(l.mappedNodes)),h.beforeRemove&&(y[B]=l,x.push(l))),u++;break;case"retained":j(B,u++);break;case"added":o!==b?j(B,o):(l={arrayEntry:n.value,indexObservable:m.observable(v++)},t.push(l),x.push(l),p||(A[B]=l))}k(h.beforeMove,z),m.utils.arrayForEach(w,h.beforeRemove?m.cleanNode:m.removeNode);for(var C,D,B=0,E=m.virtualElements.firstChild(e);l=x[B];B++){l.mappedNodes||m.utils.extend(l,c(e,g,l.arrayEntry,i,l.indexObservable));for(var F=0;D=l.mappedNodes[F];E=D.nextSibling,C=D,F++)D!==E&&m.virtualElements.insertAfter(e,D,C);!l.initialized&&i&&(i(l.arrayEntry,l.mappedNodes,l.indexObservable),l.initialized=!0)}k(h.beforeRemove,y),k(h.afterMove,z),k(h.afterAdd,A),m.utils.domData.set(e,d,t)}}(),m.exportSymbol("utils.setDomNodeChildrenFromArrayMapping",m.utils.setDomNodeChildrenFromArrayMapping),m.nativeTemplateEngine=function(){this.allowTemplateRewriting=!1},m.nativeTemplateEngine.prototype=new m.templateEngine,m.nativeTemplateEngine.prototype.constructor=m.nativeTemplateEngine,m.nativeTemplateEngine.prototype.renderTemplateSource=function(a){var b=!(m.utils.ieVersion<9),c=b?a.nodes:null,d=c?a.nodes():null;if(d)return m.utils.makeArray(d.cloneNode(!0).childNodes);var e=a.text();return m.utils.parseHtmlFragment(e)},m.nativeTemplateEngine.instance=new m.nativeTemplateEngine,m.setTemplateEngine(m.nativeTemplateEngine.instance),m.exportSymbol("nativeTemplateEngine",m.nativeTemplateEngine),function(){m.jqueryTmplTemplateEngine=function(){function a(){if(2>c)throw new Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.")}function b(a,b,c){return f.tmpl(a,b,c)}var c=this.jQueryTmplVersion=function(){if("undefined"==typeof f||!f.tmpl)return 0;try{if(f.tmpl.tag.tmpl.open.toString().indexOf("__")>=0)return 2}catch(a){}return 1}();this.renderTemplateSource=function(c,e,g){g=g||{},a();var h=c.data("precompiled");if(!h){var i=c.text()||"";i="{{ko_with $item.koBindingContext}}"+i+"{{/ko_with}}",h=f.template(null,i),c.data("precompiled",h)}var j=[e.$data],k=f.extend({koBindingContext:e},g.templateOptions),l=b(h,j,k);return l.appendTo(d.createElement("div")),f.fragments={},l},this.createJavaScriptEvaluatorBlock=function(a){return"{{ko_code ((function() { return "+a+" })()) }}"},this.addTemplate=function(a,b){d.write("