if(Array.prototype.forEach||(Array.prototype.forEach=function(t){var e,n;if(null==this)throw new TypeError("this is null or not defined");var i=Object(this),r=i.length>>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(arguments.length>1&&(e=arguments[1]),n=0;n1||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||location.protocol!==o.protocol||location.hostname!==o.hostname||o.href.indexOf("#")>-1&&d(o)==d(location)||e.isDefaultPrevented())){var s={url:o.href,container:t(o).attr("data-pjax"),target:o},a=t.extend({},s,i),l=t.Event("pjax:click");t(o).trigger(l,[a]),l.isDefaultPrevented()||(r(a),e.preventDefault(),t(o).trigger("pjax:clicked",[a]))}}function i(e,n,i){i=g(n,i);var o=e.currentTarget,s=t(o);if("FORM"!==o.tagName.toUpperCase())throw"$.pjax.submit requires a form element";var a={type:(s.attr("method")||"GET").toUpperCase(),url:s.attr("action"),container:s.attr("data-pjax"),target:o};if("GET"!==a.type&&window.FormData!==undefined)a.data=new FormData(o),a.processData=!1,a.contentType=!1;else{if(t(o).find(":file").length)return;a.data=t(o).serializeArray()}r(t.extend({},a,i)),e.preventDefault()}function r(e){function n(e,n,i){i||(i={}),i.relatedTarget=o;var r=t.Event(e,i);return l.trigger(r,n),!r.isDefaultPrevented()}e=t.extend(!0,{},t.ajaxSettings,r.defaults,e),t.isFunction(e.url)&&(e.url=e.url());var i,o=e.target,a=f(e.url).hash,l=e.context=v(e.container);e.data||(e.data={}),t.isArray(e.data)?e.data.push({name:"_pjax",value:l.selector}):e.data._pjax=l.selector,e.beforeSend=function(t,r){if("GET"!==r.type&&(r.timeout=0),t.setRequestHeader("X-PJAX","true"),t.setRequestHeader("X-PJAX-Container",l.selector),!n("pjax:beforeSend",[t,r]))return!1;r.timeout>0&&(i=setTimeout(function(){n("pjax:timeout",[t,e])&&t.abort("timeout")},r.timeout),r.timeout=0);var o=f(r.url);a&&(o.hash=a),e.requestUrl=p(o)},e.complete=function(t,r){i&&clearTimeout(i),n("pjax:complete",[t,r,e]),n("pjax:end",[t,e])},e.error=function(t,i,r){var o=_("",t,e),a=n("pjax:error",[t,i,r,e]);"GET"==e.type&&"abort"!==i&&a&&s(o.url)},e.success=function(i,o,c){var h=r.state,p="function"==typeof t.pjax.defaults.version?t.pjax.defaults.version():t.pjax.defaults.version,d=c.getResponseHeader("X-PJAX-Version"),g=_(i,c,e),v=f(g.url);if(a&&(v.hash=a,g.url=v.href),p&&d&&p!==d)s(g.url);else if(g.contents){if(r.state={id:e.id||u(),url:g.url,title:g.title,container:l.selector,fragment:e.fragment,timeout:e.timeout},(e.push||e.replace)&&window.history.replaceState(r.state,g.title,g.url),t.contains(e.container,document.activeElement))try{document.activeElement.blur()}catch(C){}g.title&&(document.title=g.title),n("pjax:beforeReplace",[g.contents,e],{state:r.state,previousState:h}),l.html(g.contents);var y=l.find("input[autofocus], textarea[autofocus]").last()[0];y&&document.activeElement!==y&&y.focus(),b(g.scripts);var m=e.scrollTo;if(a){var w=decodeURIComponent(a.slice(1)),x=document.getElementById(w)||document.getElementsByName(w)[0];x&&(m=t(x).offset().top)}"number"==typeof m&&t(window).scrollTop(m),n("pjax:success",[i,o,c,e])}else s(g.url)},r.state||(r.state={id:u(),url:window.location.href,title:document.title,container:l.selector,fragment:e.fragment,timeout:e.timeout},window.history.replaceState(r.state,document.title)),c(r.xhr),r.options=e;var d=r.xhr=t.ajax(e);return d.readyState>0&&(e.push&&!e.replace&&(w(r.state.id,h(l)),window.history.pushState(null,"",e.requestUrl)),n("pjax:start",[d,e]),n("pjax:send",[d,e])),r.xhr}function o(e,n){var i={url:window.location.href,push:!1,replace:!0,scrollTo:!1};return r(t.extend(i,g(e,n)))}function s(t){window.history.replaceState(null,"",r.state.url),window.location.replace(t)}function a(e){$||c(r.xhr);var n,i=r.state,o=e.state;if(o&&o.container){if($&&E==o.url)return;if(i){if(i.id===o.id)return;n=i.id",{method:"GET"===i?"GET":"POST",action:n,style:"display:none"});"GET"!==i&&"POST"!==i&&r.append(t("",{type:"hidden",name:"_method",value:i.toLowerCase()}));var o=e.data;if("string"==typeof o)t.each(o.split("&"),function(e,n){var i=n.split("=");r.append(t("",{type:"hidden",name:i[0],value:i[1]}))});else if(t.isArray(o))t.each(o,function(e,n){r.append(t("",{type:"hidden",name:n.name,value:n.value}))});else if("object"==typeof o){var s;for(s in o)r.append(t("",{type:"hidden",name:s,value:o[s]}))}t(document.body).append(r),r.submit()}function c(e){e&&e.readyState<4&&(e.onreadystatechange=t.noop,e.abort())}function u(){return(new Date).getTime()}function h(t){var e=t.clone();return e.find("script").each(function(){this.src||jQuery._data(this,"globalEval",!1)}),[t.selector,e.contents()]}function p(t){return t.search=t.search.replace(/([?&])(_pjax|_)=[^&]*/g,""),t.href.replace(/\?($|#)/,"$1")}function f(t){var e=document.createElement("a");return e.href=t,e}function d(t){return t.href.replace(/#.*/,"")}function g(e,n){return e&&n?n.container=e:n=t.isPlainObject(e)?e:{container:e},n.container&&(n.container=v(n.container)),n}function v(e){if((e=t(e)).length){if(""!==e.selector&&e.context===document)return e;if(e.attr("id"))return t("#"+e.attr("id"));throw"cant get selector for pjax container!"}throw"no pjax container for "+e.selector}function y(t,e){return t.filter(e).add(t.find(e))}function m(e){return t.parseHTML(e,document,!0)}function _(e,n,i){var r={},o=/]*>([\s\S.]*)<\/head>/i)[0])),l=t(m(e.match(/]*>([\s\S.]*)<\/body>/i)[0]));else a=l=t(m(e));if(0===l.length)return r;if(r.title=y(a,"title").last().text(),i.fragment){if("body"===i.fragment)var c=l;else c=y(l,i.fragment).first();c.length&&(r.contents="body"===i.fragment?c:c.contents(),r.title||(r.title=c.attr("title")||c.data("title")))}else o||(r.contents=l);return r.contents&&(r.contents=r.contents.not(function(){return t(this).is("title")}),r.contents.find("title").remove(),r.scripts=y(r.contents,"script[src]").remove(),r.contents=r.contents.not(r.scripts)),r.title&&(r.title=t.trim(r.title)),r}function b(e){if(e){var n=t("script[src]");e.each(function(){var e=this.src;if(!n.filter(function(){return this.src===e}).length){var i=document.createElement("script"),r=t(this).attr("type");r&&(i.type=r),i.src=t(this).attr("src"),document.head.appendChild(i)}})}}function w(t,e){F[t]=e,P.push(t),C(A,0),C(P,r.defaults.maxCacheLength)}function x(t,e,n){var i,o;F[e]=n,"forward"===t?(i=P,o=A):(i=A,o=P),i.push(e),(e=o.pop())&&delete F[e],C(i,r.defaults.maxCacheLength)}function C(t,e){for(;t.length>e;)delete F[t.shift()]}function k(){return t("meta").filter(function(){var e=t(this).attr("http-equiv");return e&&"X-PJAX-VERSION"===e.toUpperCase()}).attr("content")}function T(){t.fn.pjax=e,t.pjax=r,t.pjax.enable=t.noop,t.pjax.disable=S,t.pjax.click=n,t.pjax.submit=i,t.pjax.reload=o,t.pjax.defaults={timeout:650,push:!0,replace:!1,type:"GET",dataType:"html",scrollTo:0,maxCacheLength:20,version:k},t(window).on("popstate.pjax",a)}function S(){t.fn.pjax=function(){return this},t.pjax=l,t.pjax.enable=T,t.pjax.disable=t.noop,t.pjax.click=t.noop,t.pjax.submit=t.noop,t.pjax.reload=function(){window.location.reload()},t(window).off("popstate.pjax",a)}var $=!0,E=window.location.href,j=window.history.state;j&&j.container&&(r.state=j),"state"in window.history&&($=!1);var F={},A=[],P=[];t.inArray("state",t.event.props)<0&&t.event.props.push("state"),t.support.pjax=window.history&&window.history.pushState&&window.history.replaceState&&!navigator.userAgent.match(/((iPod|iPhone|iPad).+\bOS\s+[1-4]\D|WebApps\/.+CFNetwork)/),t.support.pjax?T():S()}(jQuery),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(){"use strict";var t=jQuery.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1||t[0]>2)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")}(),function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in e)if(void 0!==t.style[n])return{end:e[n]};return!1}t.fn.emulateTransitionEnd=function(e){var n=!1,i=this;return t(this).one("bsTransitionEnd",function(){n=!0}),setTimeout(function(){n||t(i).trigger(t.support.transition.end)},e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){return t(e.target).is(this)?e.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var n=t(this),r=n.data("bs.alert");r||n.data("bs.alert",r=new i(this)),"string"==typeof e&&r[e].call(n)})}var n='[data-dismiss="alert"]',i=function(e){t(e).on("click",n,this.close)};i.VERSION="3.3.6",i.TRANSITION_DURATION=150,i.prototype.close=function(e){function n(){s.detach().trigger("closed.bs.alert").remove()}var r=t(this),o=r.attr("data-target");o||(o=(o=r.attr("href"))&&o.replace(/.*(?=#[^\s]*$)/,""));var s=t(o);e&&e.preventDefault(),s.length||(s=r.closest(".alert")),s.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(s.removeClass("in"),t.support.transition&&s.hasClass("fade")?s.one("bsTransitionEnd",n).emulateTransitionEnd(i.TRANSITION_DURATION):n())};var r=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=i,t.fn.alert.noConflict=function(){return t.fn.alert=r,this},t(document).on("click.bs.alert.data-api",n,i.prototype.close)}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.button"),o="object"==typeof e&&e;r||i.data("bs.button",r=new n(this,o)),"toggle"==e?r.toggle():e&&r.setState(e)})}var n=function(e,i){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,i),this.isLoading=!1};n.VERSION="3.3.6",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(e){var n="disabled",i=this.$element,r=i.is("input")?"val":"html",o=i.data();e+="Text",null==o.resetText&&i.data("resetText",i[r]()),setTimeout(t.proxy(function(){i[r](null==o[e]?this.options[e]:o[e]),"loadingText"==e?(this.isLoading=!0,i.addClass(n).attr(n,n)):this.isLoading&&(this.isLoading=!1,i.removeClass(n).removeAttr(n))},this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),t&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var i=t.fn.button;t.fn.button=e,t.fn.button.Constructor=n,t.fn.button.noConflict=function(){return t.fn.button=i,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(n){var i=t(n.target);i.hasClass("btn")||(i=i.closest(".btn")),e.call(i,"toggle"),t(n.target).is('input[type="radio"]')||t(n.target).is('input[type="checkbox"]')||n.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.carousel"),o=t.extend({},n.DEFAULTS,i.data(),"object"==typeof e&&e),s="string"==typeof e?e:o.slide;r||i.data("bs.carousel",r=new n(this,o)),"number"==typeof e?r.to(e):s?r[s]():o.interval&&r.pause().cycle()})}var n=function(e,n){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};n.VERSION="3.3.6",n.TRANSITION_DURATION=600,n.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},n.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},n.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},n.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},n.prototype.getItemForDirection=function(t,e){var n=this.getItemIndex(e);if(("prev"==t&&0===n||"next"==t&&n==this.$items.length-1)&&!this.options.wrap)return e;var i=(n+("prev"==t?-1:1))%this.$items.length;return this.$items.eq(i)},n.prototype.to=function(t){var e=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));return t>this.$items.length-1||0>t?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",this.$items.eq(t))},n.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},n.prototype.next=function(){return this.sliding?void 0:this.slide("next")},n.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},n.prototype.slide=function(e,i){var r=this.$element.find(".item.active"),o=i||this.getItemForDirection(e,r),s=this.interval,a="next"==e?"left":"right",l=this;if(o.hasClass("active"))return this.sliding=!1;var c=o[0],u=t.Event("slide.bs.carousel",{relatedTarget:c,direction:a});if(this.$element.trigger(u),!u.isDefaultPrevented()){if(this.sliding=!0,s&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var h=t(this.$indicators.children()[this.getItemIndex(o)]);h&&h.addClass("active")}var p=t.Event("slid.bs.carousel",{relatedTarget:c,direction:a});return t.support.transition&&this.$element.hasClass("slide")?(o.addClass(e),o[0].offsetWidth,r.addClass(a),o.addClass(a),r.one("bsTransitionEnd",function(){o.removeClass([e,a].join(" ")).addClass("active"),r.removeClass(["active",a].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(p)},0)}).emulateTransitionEnd(n.TRANSITION_DURATION)):(r.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(p)),s&&this.cycle(),this}};var i=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=n,t.fn.carousel.noConflict=function(){return t.fn.carousel=i,this};var r=function(n){var i,r=t(this),o=t(r.attr("data-target")||(i=r.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,""));if(o.hasClass("carousel")){var s=t.extend({},o.data(),r.data()),a=r.attr("data-slide-to");a&&(s.interval=!1),e.call(o,s),a&&o.data("bs.carousel").to(a),n.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",r).on("click.bs.carousel.data-api","[data-slide-to]",r),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var n=t(this);e.call(n,n.data())})})}(jQuery),function(t){"use strict";function e(e){var n,i=e.attr("data-target")||(n=e.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return t(i)}function n(e){return this.each(function(){var n=t(this),r=n.data("bs.collapse"),o=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e);!r&&o.toggle&&/show|hide/.test(e)&&(o.toggle=!1),r||n.data("bs.collapse",r=new i(this,o)),"string"==typeof e&&r[e]()})}var i=function(e,n){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,n),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};i.VERSION="3.3.6",i.TRANSITION_DURATION=350,i.DEFAULTS={toggle:!0},i.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},i.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,r=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(r&&r.length&&(e=r.data("bs.collapse"),e&&e.transitioning))){var o=t.Event("show.bs.collapse");if(this.$element.trigger(o),!o.isDefaultPrevented()){r&&r.length&&(n.call(r,"hide"),e||r.data("bs.collapse",null));var s=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[s](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[s](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var l=t.camelCase(["scroll",s].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(i.TRANSITION_DURATION)[s](this.$element[0][l])}}}},i.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var r=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[n](0).one("bsTransitionEnd",t.proxy(r,this)).emulateTransitionEnd(i.TRANSITION_DURATION):r.call(this)}}},i.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},i.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(n,i){var r=t(i);this.addAriaAndCollapsedClass(e(r),r)},this)).end()},i.prototype.addAriaAndCollapsedClass=function(t,e){var n=t.hasClass("in");t.attr("aria-expanded",n),e.toggleClass("collapsed",!n).attr("aria-expanded",n)};var r=t.fn.collapse;t.fn.collapse=n,t.fn.collapse.Constructor=i,t.fn.collapse.noConflict=function(){return t.fn.collapse=r,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(i){var r=t(this);r.attr("data-target")||i.preventDefault();var o=e(r),s=o.data("bs.collapse")?"toggle":r.data();n.call(o,s)})}(jQuery),function(t){"use strict";function e(e){var n=e.attr("data-target");n||(n=(n=e.attr("href"))&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i=n&&t(n);return i&&i.length?i:e.parent()}function n(n){n&&3===n.which||(t(r).remove(),t(o).each(function(){var i=t(this),r=e(i),o={relatedTarget:this};r.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&t.contains(r[0],n.target)||(r.trigger(n=t.Event("hide.bs.dropdown",o)),n.isDefaultPrevented()||(i.attr("aria-expanded","false"),r.removeClass("open").trigger(t.Event("hidden.bs.dropdown",o)))))}))}function i(e){return this.each(function(){var n=t(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new s(this)),"string"==typeof e&&i[e].call(n)})}var r=".dropdown-backdrop",o='[data-toggle="dropdown"]',s=function(e){t(e).on("click.bs.dropdown",this.toggle)};s.VERSION="3.3.6",s.prototype.toggle=function(i){var r=t(this);if(!r.is(".disabled, :disabled")){var o=e(r),s=o.hasClass("open");if(n(),!s){"ontouchstart"in document.documentElement&&!o.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",n);var a={relatedTarget:this};if(o.trigger(i=t.Event("show.bs.dropdown",a)),i.isDefaultPrevented())return;r.trigger("focus").attr("aria-expanded","true"),o.toggleClass("open").trigger(t.Event("shown.bs.dropdown",a))}return!1}},s.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var i=t(this);if(n.preventDefault(),n.stopPropagation(),!i.is(".disabled, :disabled")){var r=e(i),s=r.hasClass("open");if(!s&&27!=n.which||s&&27==n.which)return 27==n.which&&r.find(o).trigger("focus"),i.trigger("click");var a=" li:not(.disabled):visible a",l=r.find(".dropdown-menu"+a);if(l.length){var c=l.index(n.target);38==n.which&&c>0&&c--,40==n.which&&cdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},n.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},n.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},n.prototype.init=function(e,n,i){if(this.enabled=!0,this.type=e,this.$element=t(n),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var r=this.options.trigger.split(" "),o=r.length;o--;){var s=r[o];if("click"==s)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",l="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.getOptions=function(e){return(e=t.extend({},this.getDefaults(),this.$element.data(),e)).delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},n.prototype.getDelegateOptions=function(){var e={},n=this.getDefaults();return this._options&&t.each(this._options,function(t,i){n[t]!=i&&(e[t]=i)}),e},n.prototype.enter=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusin"==e.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState?void(n.hoverState="in"):(clearTimeout(n.timeout),n.hoverState="in",n.options.delay&&n.options.delay.show?void(n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)):n.show())},n.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},n.prototype.leave=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusout"==e.type?"focus":"hover"]=!1),n.isInStateTrue()?void 0:(clearTimeout(n.timeout),n.hoverState="out",n.options.delay&&n.options.delay.hide?void(n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)):n.hide())},n.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var i=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!i)return;var r=this,o=this.tip(),s=this.getUID(this.type);this.setContent(),o.attr("id",s),this.$element.attr("aria-describedby",s),this.options.animation&&o.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,c=l.test(a);c&&(a=a.replace(l,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?o.appendTo(this.options.container):o.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var u=this.getPosition(),h=o[0].offsetWidth,p=o[0].offsetHeight;if(c){var f=a,d=this.getPosition(this.$viewport);a="bottom"==a&&u.bottom+p>d.bottom?"top":"top"==a&&u.top-pd.width?"left":"left"==a&&u.left-hs.top+s.height&&(r.top=s.top+s.height-l)}else{var c=e.left-o,u=e.left+o+n;cs.right&&(r.left=s.left+s.width-u)}return r},n.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},n.prototype.getUID=function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},n.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},n.prototype.enable=function(){this.enabled=!0},n.prototype.disable=function(){this.enabled=!1},n.prototype.toggleEnabled=function(){this.enabled=!this.enabled},n.prototype.toggle=function(e){var n=this;e&&((n=t(e.currentTarget).data("bs."+this.type))||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n))),e?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},n.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null})};var i=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=n,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=i,this}}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.popover"),o="object"==typeof e&&e;(r||!/destroy|hide/.test(e))&&(r||i.data("bs.popover",r=new n(this,o)),"string"==typeof e&&r[e]())})}var n=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");n.VERSION="3.3.6",n.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),n.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),n.prototype.constructor=n,n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),n=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof n?"html":"append":"text"](n),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},n.prototype.hasContent=function(){return this.getTitle()||this.getContent()},n.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var i=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=n,t.fn.popover.noConflict=function(){return t.fn.popover=i,this}}(jQuery),function(t){"use strict";function e(n,i){this.$body=t(document.body),this.$scrollElement=t(t(n).is(document.body)?window:n),this.options=t.extend({},e.DEFAULTS,i),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each(function(){var i=t(this),r=i.data("bs.scrollspy"),o="object"==typeof n&&n;r||i.data("bs.scrollspy",r=new e(this,o)),"string"==typeof n&&r[n]()})}e.VERSION="3.3.6",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,n="offset",i=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(n="position",i=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=t(this),r=e.data("target")||e.attr("href"),o=/^#./.test(r)&&t(r);return o&&o.length&&o.is(":visible")&&[[o[n]().top+i,r]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),i=this.options.offset+n-this.$scrollElement.height(),r=this.offsets,o=this.targets,s=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),e>=i)return s!=(t=o[o.length-1])&&this.activate(t);if(s&&e=r[t]&&(void 0===r[t+1]||e .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),r&&r()}var s=i.find("> .active"),a=r&&t.support.transition&&(s.length&&s.hasClass("fade")||!!i.find("> .fade").length);s.length&&a?s.one("bsTransitionEnd",o).emulateTransitionEnd(n.TRANSITION_DURATION):o(),s.removeClass("in")};var i=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=n,t.fn.tab.noConflict=function(){return t.fn.tab=i,this};var r=function(n){n.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',r).on("click.bs.tab.data-api",'[data-toggle="pill"]',r)}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.affix"),o="object"==typeof e&&e;r||i.data("bs.affix",r=new n(this,o)),"string"==typeof e&&r[e]()})}var n=function(e,i){this.options=t.extend({},n.DEFAULTS,i),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};n.VERSION="3.3.6",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getState=function(t,e,n,i){var r=this.$target.scrollTop(),o=this.$element.offset(),s=this.$target.height();if(null!=n&&"top"==this.affixed)return n>r&&"top";if("bottom"==this.affixed)return null!=n?!(r+this.unpin<=o.top)&&"bottom":!(t-i>=r+s)&&"bottom";var a=null==this.affixed,l=a?r:o.top;return null!=n&&n>=r?"top":null!=i&&l+(a?s:e)>=t-i&&"bottom"},n.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(n.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},n.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),i=this.options.offset,r=i.top,o=i.bottom,s=Math.max(t(document).height(),t(document.body).height());"object"!=typeof i&&(o=r=i),"function"==typeof r&&(r=i.top(this.$element)),"function"==typeof o&&(o=i.bottom(this.$element));var a=this.getState(s,e,r,o);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var l="affix"+(a?"-"+a:""),c=t.Event(l+".bs.affix");if(this.$element.trigger(c),c.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-e-o})}};var i=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=n,t.fn.affix.noConflict=function(){return t.fn.affix=i,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var n=t(this),i=n.data();i.offset=i.offset||{},null!=i.offsetBottom&&(i.offset.bottom=i.offsetBottom),null!=i.offsetTop&&(i.offset.top=i.offsetTop),e.call(n,i)})})}(jQuery),function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Promise=t()}}(function(){return function t(e,n,i){function r(s,a){if(!n[s]){if(!e[s]){var l="function"==typeof _dereq_&&_dereq_;if(!a&&l)return l(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[s]={exports:{}};e[s][0].call(u.exports,function(t){var n=e[s][1][t];return r(n||t)},u,u.exports,t,e,n,i)}return n[s].exports}for(var o="function"==typeof _dereq_&&_dereq_,s=0;s0;){var e=t.shift();if("function"==typeof e){var n=t.shift(),i=t.shift();e.call(n,i)}else e._settlePromises()}},n.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},n.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},n.prototype._reset=function(){this._isTickUsed=!1},e.exports=n,e.exports.firstLineError=s},{"./queue":26,"./schedule":29,"./util":36}],3:[function(t,e){"use strict";e.exports=function(t,e,n,i){var r=!1,o=function(t,e){this._reject(e)},s=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},a=function(t,e){0==(50397184&this._bitField)&&this._resolveCallback(e.target)},l=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){r||(r=!0,t.prototype._propagateFrom=i.propagateFromFunction(),t.prototype._boundValue=i.boundValueFunction());var c=n(o),u=new t(e);u._propagateFrom(this,1);var h=this._target();if(u._setBoundTo(c),c instanceof t){var p={promiseRejectionQueued:!1,promise:u,target:h,bindingPromise:c};h._then(e,s,void 0,u,p),c._then(a,l,void 0,u,p),u._setOnCancel(c)}else u._resolveCallback(h);return u},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152==(2097152&this._bitField)},t.bind=function(e,n){return t.resolve(n).bind(e)}}},{}],4:[function(t,e){"use strict";function n(){try{Promise===r&&(Promise=i)}catch(t){}return r}var i;"undefined"!=typeof Promise&&(i=Promise);var r=t("./promise")();r.noConflict=n,e.exports=r},{"./promise":22}],5:[function(t,e){"use strict";var n=Object.create;if(n){var i=n(null),r=n(null);i[" size"]=r[" size"]=0}e.exports=function(e){function n(t,n){var i;if(null!=t&&(i=t[n]),"function"!=typeof i){var r="Object "+a.classString(t)+" has no method '"+a.toString(n)+"'";throw new e.TypeError(r)}return i}function i(t){return n(t,this.pop()).apply(t,this)}function r(t){return t[this]}function o(t){var e=+this;return 0>e&&(e=Math.max(0,e+t.length)),t[e]}var s,a=t("./util"),l=a.canEvaluate;a.isIdentifier,e.prototype.call=function(t){var e=[].slice.call(arguments,1);return e.push(t),this._then(i,void 0,void 0,e,void 0)},e.prototype.get=function(t){var e;if("number"==typeof t)e=o;else if(l){var n=s(t);e=null!==n?n:r}else e=r;return this._then(e,void 0,void 0,t,void 0)}}},{"./util":36}],6:[function(t,e){"use strict";e.exports=function(e,n,i,r){var o=t("./util"),s=o.tryCatch,a=o.errorObj,l=e._async;e.prototype["break"]=e.prototype.cancel=function(){if(!r.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var n=t._cancellationParent;if(null==n||!n._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=n}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),l.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var n=0;n=0?o[t]:void 0}var r=!1,o=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=o.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=n,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var n=t.prototype._pushContext,o=t.prototype._popContext,s=t._peekContext,a=t.prototype._peekContext,l=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=n,t.prototype._popContext=o,t._peekContext=s,t.prototype._peekContext=a,t.prototype._promiseCreated=l,r=!1},r=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=i,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},{}],9:[function(t,e){"use strict";e.exports=function(e,n){function i(t,e){return{promise:e}}function r(){return!1}function o(t,e,n){var i=this;try{t(e,n,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+L.toString(t));i._attachCancellationCallback(t)})}catch(r){return r}}function s(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?L.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function a(){return this._onCancelField}function l(t){this._onCancelField=t}function c(){this._cancellationParent=void 0,this._onCancelField=void 0}function u(t,e){if(0!=(1&e)){this._cancellationParent=t;var n=t._branchesRemainingToCancel;void 0===n&&(n=0),t._branchesRemainingToCancel=n+1}0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function h(t,e){0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function p(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t}function f(){this._trace=new A(this._peekContext())}function d(t,e){if(B(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var i=C(t);L.notEnumerableProp(t,"stack",i.message+"\n"+i.stack.join("\n")),L.notEnumerableProp(t,"__stackCleaned__",!0)}}}function g(t,e,n,i,r){if(void 0===t&&null!==e&&X){if(void 0!==r&&r._returnedNonUndefined())return;if(0==(65535&i._bitField))return;n&&(n+=" ");var o="",s="";if(e._trace){for(var a=e._trace.stack.split("\n"),l=w(a),c=l.length-1;c>=0;--c){var u=l[c];if(!q.test(u)){var h=u.match(V);h&&(o="at "+h[1]+":"+h[2]+":"+h[3]+" ");break}}if(l.length>0){var p=l[0];for(c=0;c0&&(s="\n"+a[c-1]);break}}}var f="a promise was created in a "+n+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+s;i._warn(f,!0,e)}}function v(t,e){var n=t+" is deprecated and will be removed in a future version.";return e&&(n+=" Use "+e+" instead."),y(n)}function y(t,n,i){if(ot.warnings){var r,o=new I(t);if(n)i._attachExtraTrace(o);else if(ot.longStackTraces&&(r=e._peekContext()))r.attachExtraTrace(o);else{var s=C(o);o.stack=s.message+"\n"+s.stack.join("\n")}tt("warning",o)||k(o,"",!0)}}function m(t,e){for(var n=0;n=0;--a)if(i[a]===o){s=a;break}for(a=s;a>=0;--a){var l=i[a];if(e[r]!==l)break;e.pop(),r--}e=i}}function w(t){for(var e=[],n=0;n0&&"SyntaxError"!=t.name&&(e=e.slice(n)),e}function C(t){var e=t.stack,n=t.toString();return e="string"==typeof e&&e.length>0?x(t):[" (No stack trace)"],{message:n,stack:"SyntaxError"==t.name?e:w(e)}}function k(t,e,n){if("undefined"!=typeof console){var i;if(L.isObject(t)){var r=t.stack;i=e+H(r,t)}else i=e+String(t);"function"==typeof R?R(i,n):("function"==typeof console.log||"object"==typeof console.log)&&console.log(i)}}function T(t,e,n,i){var r=!1;try{"function"==typeof e&&(r=!0,"rejectionHandled"===t?e(i):e(n,i))}catch(o){N.throwLater(o)}"unhandledRejection"===t?tt(t,n,i)||r||k(n,"Unhandled rejection "):tt(t,i)}function S(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{if(e=t&&"function"==typeof t.toString?t.toString():L.toString(t),/\[object [a-zA-Z0-9$_]+\]/.test(e))try{e=JSON.stringify(t)}catch(r){}0===e.length&&(e="(empty array)")}return"(<"+$(e)+">, no stack trace)"}function $(t){var e=41;return t.lengths||0>a||!n||!i||n!==i||s>=a||(nt=function(t){if(M.test(t))return!0;var e=j(t);return!!(e&&e.fileName===n&&s<=e.line&&e.line<=a)})}}function A(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);rt(this,A),e>32&&this.uncycle()}var P,O,R,D=e._getDomain,N=e._async,I=t("./errors").Warning,L=t("./util"),B=L.canAttachTrace,M=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,q=/\((?:timers\.js):\d+:\d+\)/,V=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,U=null,H=null,z=!1,W=!(0==L.env("BLUEBIRD_DEBUG")||!L.env("BLUEBIRD_DEBUG")&&"development"!==L.env("NODE_ENV")),Q=!(0==L.env("BLUEBIRD_WARNINGS")||!W&&!L.env("BLUEBIRD_WARNINGS")),G=!(0==L.env("BLUEBIRD_LONG_STACK_TRACES")||!W&&!L.env("BLUEBIRD_LONG_STACK_TRACES")),X=0!=L.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(Q||!!L.env("BLUEBIRD_W_FORGOTTEN_RETURN"));e.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},e.prototype._ensurePossibleRejectionHandled=function(){if(0==(524288&this._bitField)){this._setRejectionIsUnhandled();var t=this;setTimeout(function(){t._notifyUnhandledRejection()},1)}},e.prototype._notifyUnhandledRejectionIsHandled=function(){T("rejectionHandled",P,void 0,this)},e.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},e.prototype._returnedNonUndefined=function(){return 0!=(268435456&this._bitField)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),T("unhandledRejection",O,t,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},e.prototype._warn=function(t,e,n){return y(t,e,n||this)},e.onPossiblyUnhandledRejection=function(t){var e=D();O="function"==typeof t?null===e?t:L.domainBind(e,t):void 0},e.onUnhandledRejectionHandled=function(t){var e=D();P="function"==typeof t?null===e?t:L.domainBind(e,t):void 0};var K=function(){};e.longStackTraces=function(){if(N.haveItemsQueued()&&!ot.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!ot.longStackTraces&&E()){var t=e.prototype._captureStackTrace,i=e.prototype._attachExtraTrace;ot.longStackTraces=!0,K=function(){if(N.haveItemsQueued()&&!ot.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");e.prototype._captureStackTrace=t,e.prototype._attachExtraTrace=i,n.deactivateLongStackTraces(),N.enableTrampoline(),ot.longStackTraces=!1},e.prototype._captureStackTrace=f,e.prototype._attachExtraTrace=d,n.activateLongStackTraces(),N.disableTrampolineIfNecessary()}},e.hasLongStackTraces=function(){return ot.longStackTraces&&E()};var Y=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return L.global.dispatchEvent(t),function(t,e){var n=new CustomEvent(t.toLowerCase(),{detail:e,cancelable:!0});return!L.global.dispatchEvent(n)}}if("function"==typeof Event){t=new Event("CustomEvent");return L.global.dispatchEvent(t),function(t,e){var n=new Event(t.toLowerCase(),{cancelable:!0});return n.detail=e,!L.global.dispatchEvent(n)}}return(t=document.createEvent("CustomEvent")).initCustomEvent("testingtheevent",!1,!0,{}),L.global.dispatchEvent(t),function(t,e){var n=document.createEvent("CustomEvent");return n.initCustomEvent(t.toLowerCase(),!1,!0,e),!L.global.dispatchEvent(n)}}catch(e){}return function(){return!1}}(),Z=L.isNode?function(){return process.emit.apply(process,arguments)}:L.global?function(t){var e="on"+t.toLowerCase(),n=L.global[e];return!!n&&(n.apply(L.global,[].slice.call(arguments,1)),!0)}:function(){return!1},J={promiseCreated:i,promiseFulfilled:i,promiseRejected:i,promiseResolved:i,promiseCancelled:i,promiseChained:function(t,e,n){return{promise:e,child:n}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,n){return{reason:e,promise:n}},rejectionHandled:i},tt=function(t){var e=!1;try{e=Z.apply(null,arguments)}catch(n){N.throwLater(n),e=!0}var i=!1;try{i=Y(t,J[t].apply(null,arguments))}catch(n){N.throwLater(n),i=!0}return i||e};e.config=function(t){if("longStackTraces"in(t=Object(t))&&(t.longStackTraces?e.longStackTraces():!t.longStackTraces&&e.hasLongStackTraces()&&K()),"warnings"in t){var n=t.warnings;ot.warnings=!!n,X=ot.warnings,L.isObject(n)&&"wForgottenReturn"in n&&(X=!!n.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!ot.cancellation){if(N.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");e.prototype._clearCancellationData=c,e.prototype._propagateFrom=u,e.prototype._onCancel=a,e.prototype._setOnCancel=l,e.prototype._attachCancellationCallback=s,e.prototype._execute=o,et=u,ot.cancellation=!0}return"monitoring"in t&&(t.monitoring&&!ot.monitoring?(ot.monitoring=!0,e.prototype._fireEvent=tt):!t.monitoring&&ot.monitoring&&(ot.monitoring=!1,e.prototype._fireEvent=r)),e},e.prototype._fireEvent=r,e.prototype._execute=function(t,e,n){try{t(e,n)}catch(i){return i}},e.prototype._onCancel=function(){},e.prototype._setOnCancel=function(){},e.prototype._attachCancellationCallback=function(){},e.prototype._captureStackTrace=function(){},e.prototype._attachExtraTrace=function(){},e.prototype._clearCancellationData=function(){},e.prototype._propagateFrom=function(){};var et=h,nt=function(){return!1},it=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;L.inherits(A,Error),n.CapturedTrace=A,A.prototype.uncycle=function(){var t=this._length;if(!(2>t)){for(var e=[],n={},i=0,r=this;void 0!==r;++i)e.push(r),r=r._parent;for(i=(t=this._length=i)-1;i>=0;--i){var o=e[i].stack;void 0===n[o]&&(n[o]=i)} for(i=0;t>i;++i){var s=n[e[i].stack];if(void 0!==s&&s!==i){s>0&&(e[s-1]._parent=void 0,e[s-1]._length=1),e[i]._parent=void 0,e[i]._length=1;var a=i>0?e[i-1]:this;t-1>s?(a._parent=e[s+1],a._parent.uncycle(),a._length=a._parent._length+1):(a._parent=void 0,a._length=1);for(var l=a._length+1,c=i-2;c>=0;--c)e[c]._length=l,l++;return}}}},A.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=C(t),n=e.message,i=[e.stack],r=this;void 0!==r;)i.push(w(r.stack.split("\n"))),r=r._parent;b(i),_(i),L.notEnumerableProp(t,"stack",m(n,i)),L.notEnumerableProp(t,"__stackCleaned__",!0)}};var rt=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():S(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,U=t,H=e;var n=Error.captureStackTrace;return nt=function(t){return M.test(t)},function(t,e){Error.stackTraceLimit+=6,n(t,e),Error.stackTraceLimit-=6}}var i,r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return U=/@/,H=e,z=!0,function(t){t.stack=(new Error).stack};try{throw new Error}catch(o){i="stack"in o}return"stack"in r||!i||"number"!=typeof Error.stackTraceLimit?(H=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?S(e):e.toString()},null):(U=t,H=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}();"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(R=function(t){console.warn(t)},L.isNode&&process.stderr.isTTY?R=function(t,e){var n=e?"\x1b[33m":"\x1b[31m";console.warn(n+t+"\x1b[0m\n")}:L.isNode||"string"!=typeof(new Error).stack||(R=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var ot={warnings:Q,longStackTraces:!1,cancellation:!1,monitoring:!1};return G&&e.longStackTraces(),{longStackTraces:function(){return ot.longStackTraces},warnings:function(){return ot.warnings},cancellation:function(){return ot.cancellation},monitoring:function(){return ot.monitoring},propagateFromFunction:function(){return et},boundValueFunction:function(){return p},checkForgottenReturns:g,setBounds:F,warn:y,deprecated:v,CapturedTrace:A,fireDomEvent:Y,fireGlobalEvent:Z}}},{"./errors":12,"./util":36}],10:[function(t,e){"use strict";e.exports=function(t){function e(){return this.value}function n(){throw this.reason}t.prototype["return"]=t.prototype.thenReturn=function(n){return n instanceof t&&n.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:n},void 0)},t.prototype["throw"]=t.prototype.thenThrow=function(t){return this._then(n,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:t},void 0);var e=arguments[1],i=function(){throw e};return this.caught(t,i)},t.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof t&&n.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:n},void 0);var i=arguments[1];i instanceof t&&i.suppressUnhandledRejections();var r=function(){return i};return this.caught(n,r)}}},{}],11:[function(t,e){"use strict";e.exports=function(t,e){function n(){return o(this)}function i(t,n){return r(t,n,e,e)}var r=t.reduce,o=t.all;t.prototype.each=function(t){return r(this,t,e,0)._then(n,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return r(this,t,e,e)},t.each=function(t,i){return r(t,i,e,0)._then(n,void 0,void 0,t,void 0)},t.mapSeries=i}},{}],12:[function(t,e){"use strict";function n(t,e){function n(i){return this instanceof n?(u(this,"message","string"==typeof i?i:e),u(this,"name",t),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new n(i)}return c(n,Error),n}function i(t){return this instanceof i?(u(this,"name","OperationalError"),u(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(u(this,"message",t.message),u(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new i(t)}var r,o,s=t("./es5"),a=s.freeze,l=t("./util"),c=l.inherits,u=l.notEnumerableProp,h=n("Warning","warning"),p=n("CancellationError","cancellation error"),f=n("TimeoutError","timeout error"),d=n("AggregateError","aggregate error");try{r=TypeError,o=RangeError}catch(_){r=n("TypeError","type error"),o=n("RangeError","range error")}for(var g="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),v=0;v1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0)}function a(){return c.call(this,this.promise._target()._settledValue())}function l(t){return s(this,t)?void 0:(p.e=t,p)}function c(t){var r=this.promise,c=this.handler;if(!this.called){this.called=!0;var u=this.isFinallyHandler()?c.call(r._boundValue()):c.call(r._boundValue(),t);if(u===i)return u;if(void 0!==u){r._setReturnedNonUndefined();var f=n(u,r);if(f instanceof e){if(null!=this.cancelPromise){if(f._isCancelled()){var d=new h("late cancellation observer");return r._attachExtraTrace(d),p.e=d,p}f.isPending()&&f._attachCancellationCallback(new o(this))}return f._then(a,l,void 0,this,void 0)}}}return r.isRejected()?(s(this),p.e=t,p):(s(this),t)}var u=t("./util"),h=e.CancellationError,p=u.errorObj,f=t("./catch_filter")(i);return r.prototype.isFinallyHandler=function(){return 0===this.type},o.prototype._resultCancelled=function(){s(this.finallyHandler)},e.prototype._passThrough=function(t,e,n,i){return"function"!=typeof t?this.then():this._then(n,i,void 0,new r(this,e,t),void 0)},e.prototype.lastly=e.prototype["finally"]=function(t){return this._passThrough(t,0,c,c)},e.prototype.tap=function(t){return this._passThrough(t,1,c)},e.prototype.tapCatch=function(t){var n=arguments.length;if(1===n)return this._passThrough(t,1,void 0,c);var i,r=new Array(n-1),o=0;for(i=0;n-1>i;++i){var s=arguments[i];if(!u.isObject(s))return e.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+u.classString(s)));r[o++]=s}r.length=o;var a=arguments[i];return this._passThrough(f(r,a,this),1,void 0,c)},r}},{"./catch_filter":7,"./util":36}],16:[function(t,e){"use strict";e.exports=function(e,n,i,r,o,s){function a(t,n,i){for(var o=0;o0&&"function"==typeof arguments[e]&&(t=arguments[e]);var i=[].slice.call(arguments);t&&i.pop();var r=new n(i).promise();return void 0!==t?r.spread(t):r}}},{"./util":36}],18:[function(t,e){"use strict";e.exports=function(e,n,i,r,o,s){function a(t,e,n,i){this.constructor$(t),this._promise._captureStackTrace();var r=c();this._callback=null===r?e:u.domainBind(r,e),this._preservedValues=i===o?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],f.invoke(this._asyncInit,this,void 0)}function l(t,n,r,o){if("function"!=typeof n)return i("expecting a function but got "+u.classString(n));var s=0;if(void 0!==r){if("object"!=typeof r||null===r)return e.reject(new TypeError("options argument must be an object but it is "+u.classString(r)));if("number"!=typeof r.concurrency)return e.reject(new TypeError("'concurrency' must be a number but it is "+u.classString(r.concurrency)));s=r.concurrency}return new a(t,n,s="number"==typeof s&&isFinite(s)&&s>=1?s:0,o).promise()}var c=e._getDomain,u=t("./util"),h=u.tryCatch,p=u.errorObj,f=e._async;u.inherits(a,n),a.prototype._asyncInit=function(){this._init$(void 0,-2)},a.prototype._init=function(){},a.prototype._promiseFulfilled=function(t,n){var i=this._values,o=this.length(),a=this._preservedValues,l=this._limit;if(0>n){if(i[n=-1*n-1]=t,l>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(l>=1&&this._inFlight>=l)return i[n]=t,this._queue.push(n),!1;null!==a&&(a[n]=t);var c=this._promise,u=this._callback,f=c._boundValue();c._pushContext();var d=h(u).call(f,t,n,o),g=c._popContext();if(s.checkForgottenReturns(d,g,null!==a?"Promise.filter":"Promise.map",c),d===p)return this._reject(d.e),!0;var v=r(d,this._promise);if(v instanceof e){var y=(v=v._target())._bitField;if(0==(50397184&y))return l>=1&&this._inFlight++,i[n]=v,v._proxy(this,-1*(n+1)),!1;if(0==(33554432&y))return 0!=(16777216&y)?(this._reject(v._reason()),!0):(this._cancel(),!0);d=v._value()}i[n]=d}return++this._totalResolved>=o&&(null!==a?this._filter(i,a):this._resolve(i),!0)},a.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,n=this._values;t.length>0&&this._inFlighto;++o)t[o]&&(i[r++]=e[o]);i.length=r,this._resolve(i)},a.prototype.preservedValues=function(){return this._preservedValues},e.prototype.map=function(t,e){return l(this,t,e,null)},e.map=function(t,e,n,i){return l(t,e,n,i)}}},{"./util":36}],19:[function(t,e){"use strict";e.exports=function(e,n,i,r,o){var s=t("./util"),a=s.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("expecting a function but got "+s.classString(t));return function(){var i=new e(n);i._captureStackTrace(),i._pushContext();var r=a(t).apply(this,arguments),s=i._popContext();return o.checkForgottenReturns(r,s,"Promise.method",i),i._resolveFromSyncValue(r),i}},e.attempt=e["try"]=function(t){if("function"!=typeof t)return r("expecting a function but got "+s.classString(t));var i,l=new e(n);if(l._captureStackTrace(),l._pushContext(),arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var c=arguments[1],u=arguments[2];i=s.isArray(c)?a(t).apply(u,c):a(t).call(u,c)}else i=a(t)();var h=l._popContext();return o.checkForgottenReturns(i,h,"Promise.try",l),l._resolveFromSyncValue(i),l},e.prototype._resolveFromSyncValue=function(t){t===s.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":36}],20:[function(t,e){"use strict";function n(t){return t instanceof Error&&l.getPrototypeOf(t)===Error.prototype}function i(t){var e;if(n(t)){(e=new a(t)).name=t.name,e.message=t.message,e.stack=t.stack;for(var i=l.keys(t),r=0;r1){var n,i=new Array(e-1),r=0;for(n=0;e-1>n;++n){var o=arguments[n];if(!f.isObject(o))return h("Catch statement predicate: expecting an object but got "+f.classString(o));i[r++]=o}return i.length=r,t=arguments[n],this.then(void 0,j(i,t,this))}return this.then(void 0,t)},r.prototype.reflect=function(){return this._then(u,u,void 0,this,void 0)},r.prototype.then=function(t,e){if($.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+f.classString(t);arguments.length>1&&(n+=", "+f.classString(e)),this._warn(n)}return this._then(t,e,void 0,void 0,void 0)},r.prototype.done=function(t,e){this._then(t,e,void 0,void 0,void 0)._setIsFinal()},r.prototype.spread=function(t){return"function"!=typeof t?h("expecting a function but got "+f.classString(t)):this.all()._then(t,void 0,void 0,w,void 0)},r.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},r.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new k(this).promise()},r.prototype.error=function(t){return this.caught(f.originatesFromRejection,t)},r.getNewLibraryCopy=e.exports,r.is=function(t){return t instanceof r},r.fromNode=r.fromCallback=function(t){var e=new r(b);e._captureStackTrace();var n=arguments.length>1&&!!Object(arguments[1]).multiArgs,i=P(t)(F(e,n));return i===A&&e._rejectCallback(i.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},r.all=function(t){return new k(t).promise()},r.cast=function(t){var e=C(t);return e instanceof r||((e=new r(b))._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},r.resolve=r.fulfilled=r.cast,r.reject=r.rejected=function(t){var e=new r(b);return e._captureStackTrace(),e._rejectCallback(t,!0),e},r.setScheduler=function(t){if("function"!=typeof t)throw new m("expecting a function but got "+f.classString(t));return v.setScheduler(t)},r.prototype._then=function(t,e,n,i,o){var s=void 0!==o,a=s?o:new r(b),c=this._target(),u=c._bitField;s||(a._propagateFrom(this,3),a._captureStackTrace(),void 0===i&&0!=(2097152&this._bitField)&&(i=0!=(50397184&u)?this._boundValue():c===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,a));var h=l();if(0!=(50397184&u)){var p,d,g=c._settlePromiseCtx;0!=(33554432&u)?(d=c._rejectionHandler0,p=t):0!=(16777216&u)?(d=c._fulfillmentHandler0,p=e,c._unsetRejectionIsUnhandled()):(g=c._settlePromiseLateCancellationObserver,d=new _("late cancellation observer"),c._attachExtraTrace(d),p=e),v.invoke(g,c,{handler:null===h?p:"function"==typeof p&&f.domainBind(h,p),promise:a,receiver:i,value:d})}else c._addCallbacks(t,e,a,i,h);return a},r.prototype._length=function(){return 65535&this._bitField},r.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},r.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},r.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},r.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},r.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},r.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},r.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},r.prototype._isFinal=function(){return(4194304&this._bitField)>0},r.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},r.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},r.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},r.prototype._setAsyncGuaranteed=function(){v.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},r.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];return e===p?void 0:void 0===e&&this._isBound()?this._boundValue():e},r.prototype._promiseAt=function(t){return this[4*t-4+2]},r.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},r.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},r.prototype._boundValue=function(){},r.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),n=t._rejectionHandler0,i=t._promise0,r=t._receiverAt(0);void 0===r&&(r=p),this._addCallbacks(e,n,i,r,null)},r.prototype._migrateCallbackAt=function(t,e){var n=t._fulfillmentHandlerAt(e),i=t._rejectionHandlerAt(e),r=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=p),this._addCallbacks(n,i,r,o,null)},r.prototype._addCallbacks=function(t,e,n,i,r){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=i,"function"==typeof t&&(this._fulfillmentHandler0=null===r?t:f.domainBind(r,t)),"function"==typeof e&&(this._rejectionHandler0=null===r?e:f.domainBind(r,e));else{var s=4*o-4;this[s+2]=n,this[s+3]=i,"function"==typeof t&&(this[s+0]=null===r?t:f.domainBind(r,t)),"function"==typeof e&&(this[s+1]=null===r?e:f.domainBind(r,e))}return this._setLength(o+1),o},r.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},r.prototype._resolveCallback=function(t,e){if(0==(117506048&this._bitField)){if(t===this)return this._rejectCallback(c(),!1);var n=C(t,this);if(!(n instanceof r))return this._fulfill(t);e&&this._propagateFrom(n,2);var i=n._target();if(i===this)return void this._reject(c());var o=i._bitField;if(0==(50397184&o)){var s=this._length();s>0&&i._migrateCallback0(this);for(var a=1;s>a;++a)i._migrateCallbackAt(this,a);this._setFollowing(),this._setLength(0),this._setFollowee(i)}else if(0!=(33554432&o))this._fulfill(i._value());else if(0!=(16777216&o))this._reject(i._reason());else{var l=new _("late cancellation observer");i._attachExtraTrace(l),this._reject(l)}}},r.prototype._rejectCallback=function(t,e,n){var i=f.ensureErrorObject(t),r=i===t;if(!r&&!n&&$.warnings()){var o="a promise was rejected with a non-error: "+f.classString(t);this._warn(o,!0)}this._attachExtraTrace(i,!!e&&r),this._reject(t)},r.prototype._resolveFromExecutor=function(t){if(t!==b){var e=this;this._captureStackTrace(),this._pushContext();var n=!0,i=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,n)});n=!1,this._popContext(),void 0!==i&&e._rejectCallback(i,!0)}},r.prototype._settlePromiseFromHandler=function(t,e,n,i){var r=i._bitField;if(0==(65536&r)){var o;i._pushContext(),e===w?n&&"number"==typeof n.length?o=P(t).apply(this._boundValue(),n):(o=A).e=new m("cannot .spread() a non-array: "+f.classString(n)):o=P(t).call(e,n);var s=i._popContext();0==(65536&(r=i._bitField))&&(o===x?i._reject(n):o===A?i._rejectCallback(o.e,!1):($.checkForgottenReturns(o,s,"",i,this),i._resolveCallback(o)))}},r.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},r.prototype._followee=function(){return this._rejectionHandler0},r.prototype._setFollowee=function(t){this._rejectionHandler0=t},r.prototype._settlePromise=function(t,e,i,o){var s=t instanceof r,a=this._bitField,l=0!=(134217728&a);0!=(65536&a)?(s&&t._invokeInternalOnCancel(),i instanceof E&&i.isFinallyHandler()?(i.cancelPromise=t,P(e).call(i,o)===A&&t._reject(A.e)):e===u?t._fulfill(u.call(i)):i instanceof n?i._promiseCancelled(t):s||t instanceof k?t._cancel():i.cancel()):"function"==typeof e?s?(l&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,i,o,t)):e.call(i,o,t):i instanceof n?i._isResolved()||(0!=(33554432&a)?i._promiseFulfilled(o,t):i._promiseRejected(o,t)):s&&(l&&t._setAsyncGuaranteed(),0!=(33554432&a)?t._fulfill(o):t._reject(o))},r.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,n=t.promise,i=t.receiver,o=t.value;"function"==typeof e?n instanceof r?this._settlePromiseFromHandler(e,i,o,n):e.call(i,o,n):n instanceof r&&n._reject(o)},r.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},r.prototype._settlePromise0=function(t,e){var n=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(n,t,i,e)},r.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},r.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var n=c();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!=(134217728&e)?this._settlePromises():v.settlePromises(this))}},r.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16))return this._setRejected(),this._fulfillmentHandler0=t,this._isFinal()?v.fatalError(t,f.isNode):void((65535&e)>0?v.settlePromises(this):this._ensurePossibleRejectionHandled())},r.prototype._fulfillPromises=function(t,e){for(var n=1;t>n;n++){var i=this._fulfillmentHandlerAt(n),r=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(r,i,o,e)}},r.prototype._rejectPromises=function(t,e){for(var n=1;t>n;n++){var i=this._rejectionHandlerAt(n),r=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(r,i,o,e)}},r.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!=(16842752&t)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,t),this._rejectPromises(e,n)}else{var i=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,i,t),this._fulfillPromises(e,i)}this._setLength(0)}this._clearCancellationData()},r.prototype._settledValue=function(){var t=this._bitField;return 0!=(33554432&t)?this._rejectionHandler0:0!=(16777216&t)?this._fulfillmentHandler0:void 0},r.defer=r.pending=function(){return $.deprecated("Promise.defer","new Promise"),{promise:new r(b),resolve:o,reject:s}},f.notEnumerableProp(r,"_makeSelfResolutionError",c),t("./method")(r,b,C,h,$),t("./bind")(r,b,C,$),t("./cancel")(r,k,h,$),t("./direct_resolve")(r),t("./synchronous_inspection")(r),t("./join")(r,k,C,b,v,l),r.Promise=r,r.version="3.5.1",t("./map.js")(r,k,h,C,b,$),t("./call_get.js")(r),t("./using.js")(r,h,C,S,b,$),t("./timers.js")(r,b,$),t("./generators.js")(r,h,b,C,n,$),t("./nodeify.js")(r),t("./promisify.js")(r,b),t("./props.js")(r,k,C,h),t("./race.js")(r,b,C,h),t("./reduce.js")(r,k,h,C,b,$),t("./settle.js")(r,k,$),t("./some.js")(r,k,h),t("./filter.js")(r,b),t("./each.js")(r,b),t("./any.js")(r),f.toFastProperties(r),f.toFastProperties(r.prototype),a({a:1}),a({b:2}),a({c:3}),a(1),a(function(){}),a(void 0),a(!1),a(new r(b)),$.setBounds(g.firstLineError,f.lastLineError),r}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(t,e){"use strict";e.exports=function(e,n,i,r,o){function s(t){switch(t){case-2:return[];case-3:return{};case-6:return new Map}}function a(t){var i=this._promise=new e(n);t instanceof e&&i._propagateFrom(t,3),i._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var l=t("./util");return l.isArray,l.inherits(a,o),a.prototype.length=function(){return this._length},a.prototype.promise=function(){return this._promise},a.prototype._init=function c(t,n){var o=i(this._values,this._promise);if(o instanceof e){var a=(o=o._target())._bitField;if(this._values=o,0==(50397184&a))return this._promise._setAsyncGuaranteed(),o._then(c,this._reject,void 0,this,n);if(0==(33554432&a))return 0!=(16777216&a)?this._reject(o._reason()):this._cancel();o=o._value()}if(null!==(o=l.asArray(o)))return 0===o.length?void(-5===n?this._resolveEmptyArray():this._resolve(s(n))):void this._iterate(o);var u=r("expecting an array or an iterable object but got "+l.classString(o)).reason();this._promise._rejectCallback(u,!1)},a.prototype._iterate=function(t){var n=this.getActualLength(t.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var r=this._promise,o=!1,s=null,a=0;n>a;++a){var l=i(t[a],r);l instanceof e?s=(l=l._target())._bitField:s=null,o?null!==s&&l.suppressUnhandledRejections():null!==s?0==(50397184&s)?(l._proxy(this,a),this._values[a]=l):o=0!=(33554432&s)?this._promiseFulfilled(l._value(),a):0!=(16777216&s)?this._promiseRejected(l._reason(),a):this._promiseCancelled(a):o=this._promiseFulfilled(l,a)}o||r._setAsyncGuaranteed()},a.prototype._isResolved=function(){return null===this._values},a.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},a.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null, this._promise._cancel())},a.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},a.prototype._promiseFulfilled=function(t,e){return this._values[e]=t,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},a.prototype._promiseCancelled=function(){return this._cancel(),!0},a.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},a.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var n=0;nl;l+=2){var u=s[l],h=s[l+1],d=u+e;if(i===k)t[d]=k(u,p,u,h,e,r);else{var g=i(h,function(){return k(u,p,u,h,e,r)});f.notEnumerableProp(g,"__isPromisified__",!0),t[d]=g}}return f.toFastProperties(t),t}function u(t,e,n){return k(t,e,void 0,t,null,n)}var h,p={},f=t("./util"),d=t("./nodeback"),g=f.withAppended,v=f.maybeWrapAsError,y=f.canEvaluate,m=t("./errors").TypeError,_="Async",b={__isPromisified__:!0},w=new RegExp("^(?:"+["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"].join("|")+")$"),x=function(t){return f.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t},C=function(t){return t.replace(/([$])/,"\\$")},k=y?h:l;e.promisify=function(t,e){if("function"!=typeof t)throw new m("expecting a function but got "+f.classString(t));if(r(t))return t;var n=u(t,void 0===(e=Object(e)).context?p:e.context,!!e.multiArgs);return f.copyDescriptors(t,n,i),n},e.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new m("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");var n=!!(e=Object(e)).multiArgs,i=e.suffix;"string"!=typeof i&&(i=_);var r=e.filter;"function"!=typeof r&&(r=x);var o=e.promisifier;if("function"!=typeof o&&(o=k),!f.isIdentifier(i))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var s=f.inheritedDataKeys(t),a=0;ao;++o){var s=i[o];e[o]=t[s],e[o+r]=s}}this.constructor$(e),this._isMap=n,this._init$(void 0,n?-6:-3)}function s(t){var n,s=i(t);return c(s)?(n=s instanceof e?s._then(e.props,void 0,void 0,void 0,void 0):new o(s).promise(),s instanceof e&&n._propagateFrom(s,2),n):r("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}var a,l=t("./util"),c=l.isObject,u=t("./es5");"function"==typeof Map&&(a=Map);var h=function(){function t(t,i){this[e]=t,this[e+n]=i,e++}var e=0,n=0;return function(i){n=i.size,e=0;var r=new Array(2*i.size);return i.forEach(t,r),r}}(),p=function(t){for(var e=new a,n=t.length/2|0,i=0;n>i;++i){var r=t[n+i],o=t[i];e.set(r,o)}return e};l.inherits(o,n),o.prototype._init=function(){},o.prototype._promiseFulfilled=function(t,e){if(this._values[e]=t,++this._totalResolved>=this._length){var n;if(this._isMap)n=p(this._values);else{n={};for(var i=this.length(),r=0,o=this.length();o>r;++r)n[this._values[r+i]]=this._values[r]}return this._resolve(n),!0}return!1},o.prototype.shouldCopyValues=function(){return!1},o.prototype.getActualLength=function(t){return t>>1},e.prototype.props=function(){return s(this)},e.props=function(t){return s(t)}}},{"./es5":13,"./util":36}],26:[function(t,e){"use strict";function n(t,e,n,i,r){for(var o=0;r>o;++o)n[o+i]=t[o+e],t[o+e]=void 0}function i(t){this._capacity=t,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(t){return this._capacityp;++p){var d=t[p];(void 0!==d||p in t)&&e.cast(d)._then(u,h,void 0,c,null)}return c}var s=t("./util"),a=function(t){return t.then(function(e){return o(e,t)})};e.race=function(t){return o(t,void 0)},e.prototype.race=function(){return o(this,void 0)}}},{"./util":36}],28:[function(t,e){"use strict";e.exports=function(e,n,i,r,o,s){function a(t,n,i,r){this.constructor$(t);var s=p();this._fn=null===s?n:f.domainBind(s,n),void 0!==i&&(i=e.resolve(i))._attachCancellationCallback(this),this._initialValue=i,this._currentCancellable=null,this._eachValues=r===o?Array(this._length):0===r?null:void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function l(t,e){this.isFulfilled()?e._resolve(t):e._reject(t)}function c(t,e,n,r){return"function"!=typeof e?i("expecting a function but got "+f.classString(e)):new a(t,e,n,r).promise()}function u(t){this.accum=t,this.array._gotAccum(t);var n=r(this.value,this.array._promise);return n instanceof e?(this.array._currentCancellable=n,n._then(h,void 0,void 0,this,void 0)):h.call(this,n)}function h(t){var n,i=this.array,r=i._promise,o=d(i._fn);r._pushContext(),(n=void 0!==i._eachValues?o.call(r._boundValue(),t,this.index,this.length):o.call(r._boundValue(),this.accum,t,this.index,this.length))instanceof e&&(i._currentCancellable=n);var a=r._popContext();return s.checkForgottenReturns(n,a,void 0!==i._eachValues?"Promise.each":"Promise.reduce",r),n}var p=e._getDomain,f=t("./util"),d=f.tryCatch;f.inherits(a,n),a.prototype._gotAccum=function(t){void 0!==this._eachValues&&null!==this._eachValues&&t!==o&&this._eachValues.push(t)},a.prototype._eachComplete=function(t){return null!==this._eachValues&&this._eachValues.push(t),this._eachValues},a.prototype._init=function(){},a.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},a.prototype.shouldCopyValues=function(){return!1},a.prototype._resolve=function(t){this._promise._resolveCallback(t),this._values=null},a.prototype._resultCancelled=function(t){return t===this._initialValue?this._cancel():void(this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof e&&this._currentCancellable.cancel(),this._initialValue instanceof e&&this._initialValue.cancel()))},a.prototype._iterate=function(t){this._values=t;var n,i,r=t.length;if(void 0!==this._initialValue?(n=this._initialValue,i=0):(n=e.resolve(t[0]),i=1),this._currentCancellable=n,!n.isRejected())for(;r>i;++i){var o={accum:null,value:t[i],index:i,length:r,array:this};n=n._then(u,void 0,void 0,o,void 0)}void 0!==this._eachValues&&(n=n._then(this._eachComplete,void 0,void 0,this,void 0)),n._then(l,l,void 0,n,this)},e.prototype.reduce=function(t,e){return c(this,t,e,null)},e.reduce=function(t,e,n,i){return c(t,e,n,i)}}},{"./util":36}],29:[function(t,e){"use strict";var n,i=t("./util"),r=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},o=i.getNativePromise();if(i.isNode&&"undefined"==typeof MutationObserver){var s=global.setImmediate,a=process.nextTick;n=i.isRecentNode?function(t){s.call(global,t)}:function(t){a.call(process,t)}}else if("function"==typeof o&&"function"==typeof o.resolve){var l=o.resolve();n=function(t){l.then(t)}}else n="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)?"undefined"!=typeof setImmediate?function(t){setImmediate(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:r:function(){var t=document.createElement("div"),e={attributes:!0},n=!1,i=document.createElement("div");new MutationObserver(function(){t.classList.toggle("foo"),n=!1}).observe(i,e);var r=function(){n||(n=!0,i.classList.toggle("foo"))};return function(n){var i=new MutationObserver(function(){i.disconnect(),n()});i.observe(t,e),r()}}();e.exports=n},{"./util":36}],30:[function(t,e){"use strict";e.exports=function(e,n,i){function r(t){this.constructor$(t)}var o=e.PromiseInspection;t("./util").inherits(r,n),r.prototype._promiseResolved=function(t,e){return this._values[t]=e,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},r.prototype._promiseFulfilled=function(t,e){var n=new o;return n._bitField=33554432,n._settledValueField=t,this._promiseResolved(e,n)},r.prototype._promiseRejected=function(t,e){var n=new o;return n._bitField=16777216,n._settledValueField=t,this._promiseResolved(e,n)},e.settle=function(t){return i.deprecated(".settle()",".reflect()"),new r(t).promise()},e.prototype.settle=function(){return e.settle(this)}}},{"./util":36}],31:[function(t,e){"use strict";e.exports=function(e,n,i){function r(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(t,e){if((0|e)!==e||0>e)return i("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var n=new r(t),o=n.promise();return n.setHowMany(e),n.init(),o}var s=t("./util"),a=t("./errors").RangeError,l=t("./errors").AggregateError,c=s.isArray,u={};s.inherits(r,n),r.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var t=c(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},r.prototype.init=function(){this._initialized=!0,this._init()},r.prototype.setUnwrap=function(){this._unwrap=!0},r.prototype.howMany=function(){return this._howMany},r.prototype.setHowMany=function(t){this._howMany=t},r.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},r.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},r.prototype._promiseCancelled=function(){return this._values instanceof e||null==this._values?this._cancel():(this._addRejected(u),this._checkOutcome())},r.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new l,e=this.length();e0?this._reject(t):this._cancel(),!0}return!1},r.prototype._fulfilled=function(){return this._totalResolved},r.prototype._rejected=function(){return this._values.length-this.length()},r.prototype._addRejected=function(t){this._values.push(t)},r.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},r.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},r.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new a(e)},r.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(t,e){return o(t,e)},e.prototype.some=function(t){return o(this,t)},e._SomePromiseArray=r}},{"./errors":12,"./util":36}],32:[function(t,e){"use strict";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var n=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},r=e.prototype.isFulfilled=function(){return 0!=(33554432&this._bitField)},o=e.prototype.isRejected=function(){return 0!=(16777216&this._bitField)},s=e.prototype.isPending=function(){return 0==(50397184&this._bitField)},a=e.prototype.isResolved=function(){return 0!=(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!=(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536==(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!=(8454144&this._target()._bitField)},t.prototype.isPending=function(){return s.call(this._target())},t.prototype.isRejected=function(){return o.call(this._target())},t.prototype.isFulfilled=function(){return r.call(this._target())},t.prototype.isResolved=function(){return a.call(this._target())},t.prototype.value=function(){return n.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),i.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},{}],33:[function(t,e){"use strict";e.exports=function(e,n){function i(t,i){if(u(t)){if(t instanceof e)return t;var r=o(t);if(r===c){i&&i._pushContext();var l=e.reject(r.e);return i&&i._popContext(),l}if("function"==typeof r){if(s(t)){l=new e(n);return t._then(l._fulfill,l._reject,void 0,l,null),l}return a(t,r,i)}}return t}function r(t){return t.then}function o(t){try{return r(t)}catch(e){return c.e=e,c}}function s(t){try{return h.call(t,"_promise0")}catch(e){return!1}}function a(t,i,r){function o(t){a&&(a._resolveCallback(t),a=null)}function s(t){a&&(a._rejectCallback(t,h,!0),a=null)}var a=new e(n),u=a;r&&r._pushContext(),a._captureStackTrace(),r&&r._popContext();var h=!0,p=l.tryCatch(i).call(t,o,s);return h=!1,a&&p===c&&(a._rejectCallback(p.e,!0,!0),a=null),u}var l=t("./util"),c=l.errorObj,u=l.isObject,h={}.hasOwnProperty;return i}},{"./util":36}],34:[function(t,e){"use strict";e.exports=function(e,n,i){function r(t){this.handle=t}function o(t){return clearTimeout(this.handle),t}function s(t){throw clearTimeout(this.handle),t}var a=t("./util"),l=e.TimeoutError;r.prototype._resultCancelled=function(){clearTimeout(this.handle)};var c=function(t){return u(+this).thenReturn(t)},u=e.delay=function(t,o){var s,a;return void 0!==o?(s=e.resolve(o)._then(c,null,null,t,void 0),i.cancellation()&&o instanceof e&&s._setOnCancel(o)):(s=new e(n),a=setTimeout(function(){s._fulfill()},+t),i.cancellation()&&s._setOnCancel(new r(a)),s._captureStackTrace()),s._setAsyncGuaranteed(),s};e.prototype.delay=function(t){return u(t,this)};var h=function(t,e,n){var i;i="string"!=typeof e?e instanceof Error?e:new l("operation timed out"):new l(e),a.markAsOriginatingFromRejection(i),t._attachExtraTrace(i),t._reject(i),null!=n&&n.cancel()};e.prototype.timeout=function(t,e){t=+t;var n,a,l=new r(setTimeout(function(){n.isPending()&&h(n,e,a)},t));return i.cancellation()?(a=this.then(),(n=a._then(o,s,void 0,l,void 0))._setOnCancel(l)):n=this._then(o,s,void 0,l,void 0),n}}},{"./util":36}],35:[function(t,e){"use strict";e.exports=function(e,n,i,r,o,s){function a(t){setTimeout(function(){throw t},0)}function l(t){var e=i(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}function c(t,n){function r(){if(s>=c)return u._fulfill();var o=l(t[s++]);if(o instanceof e&&o._isDisposable()){try{o=i(o._getDisposer().tryDispose(n),t.promise)}catch(h){return a(h)}if(o instanceof e)return o._then(r,a,null,null,null)}r()}var s=0,c=t.length,u=new e(o);return r(),u}function u(t,e,n){this._data=t,this._promise=e,this._context=n}function h(t,e,n){this.constructor$(t,e,n)}function p(t){return u.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function f(t){this.length=t,this.promise=null,this[t-1]=null}var d=t("./util"),g=t("./errors").TypeError,v=t("./util").inherits,y=d.errorObj,m=d.tryCatch,_={};u.prototype.data=function(){return this._data},u.prototype.promise=function(){return this._promise},u.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():_},u.prototype.tryDispose=function(t){var e=this.resource(),n=this._context;void 0!==n&&n._pushContext();var i=e!==_?this.doDispose(e,t):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,i},u.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},v(h,u),h.prototype.doDispose=function(t,e){return this.data().call(t,t,e)},f.prototype._resultCancelled=function(){for(var t=this.length,n=0;t>n;++n){var i=this[n];i instanceof e&&i.cancel()}},e.using=function(){var t=arguments.length;if(2>t)return n("you must pass at least 2 arguments to Promise.using");var r=arguments[t-1];if("function"!=typeof r)return n("expecting a function but got "+d.classString(r));var o,a=!0;2===t&&Array.isArray(arguments[0])?(t=(o=arguments[0]).length,a=!1):(o=arguments,t--);for(var l=new f(t),h=0;t>h;++h){var g=o[h];if(u.isDisposer(g)){var v=g;(g=g.promise())._setDisposable(v)}else{var _=i(g);_ instanceof e&&(g=_._then(p,null,null,{resources:l,index:h},void 0))}l[h]=g}var b=new Array(l.length);for(h=0;h0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new h(t,this,r());throw new g}}},{"./errors":12,"./util":36}],36:[function(t,e){"use strict";function n(){try{var t=T;return T=null,t.apply(this,arguments)}catch(e){return E.e=e,E}}function i(t){return T=t,n}function r(t){return null==t||!0===t||!1===t||"string"==typeof t||"number"==typeof t}function o(t){return"function"==typeof t||"object"==typeof t&&null!==t}function s(t){return r(t)?new Error(g(t)):t}function a(t,e){var n,i=t.length,r=new Array(i+1);for(n=0;i>n;++n)r[n]=t[n];return r[n]=e,r}function l(t,e,n){if(!S.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var i=Object.getOwnPropertyDescriptor(t,e);return null!=i?null==i.get&&null==i.set?i.value:n:void 0}function c(t,e,n){if(r(t))return t;var i={value:n,configurable:!0,enumerable:!1,writable:!0};return S.defineProperty(t,e,i),t}function u(t){throw t}function h(t){try{if("function"==typeof t){var e=S.names(t.prototype),n=S.isES5&&e.length>1,i=e.length>0&&!(1===e.length&&"constructor"===e[0]),o=P.test(t+"")&&S.names(t).length>0;if(n||i||o)return!0}return!1}catch(r){return!1}}function p(t){function e(){}e.prototype=t;for(var n=8;n--;)new e;return t}function f(t){return O.test(t)}function d(t,e,n){for(var i=new Array(t),r=0;t>r;++r)i[r]=e+r+n;return i}function g(t){try{return t+""}catch(e){return"[no string representation]"}}function v(t){return t instanceof Error||null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function y(t){try{c(t,"isOperational",!0)}catch(e){}}function m(t){return null!=t&&(t instanceof Error.__BluebirdErrorTypes__.OperationalError||!0===t.isOperational)}function _(t){return v(t)&&S.propertyIsWritable(t,"stack")}function b(t){return{}.toString.call(t)}function w(t,e,n){for(var i=S.names(t),r=0;r10||t[0]>0}(),B.isNode&&B.toFastProperties(process);try{throw new Error}catch(M){B.lastLineError=M}e.exports=B},{"./es5":13}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise),function(t,e){"use strict";var n=t(document);t.fn.typeIt=function(n){return this.each(function(){var i=t(this),r=i.data("typeit");r!==e&&(clearTimeout(r.tTO),clearTimeout(r.dTO),i.removeData("typeit")),i.data("typeit",new t.typeIt(i,n))})},t.typeIt=function(n,i){this.d={strings:[],speed:100,deleteSpeed:e,lifeLike:!0,cursor:!0,cursorSpeed:1e3,breakLines:!0,breakDelay:750,deleteDelay:750,startDelay:250,startDelete:!1,loop:!1,loopDelay:750,html:!0,autoStart:!0,callback:function(){}},this.queue=[],this.queueIndex=0,this.hasStarted=!1,this.inTag=!1,this.stringsToDelete="",this.style='style="display:inline;position:relative;font:inherit;color:inherit;"',this.s=t.extend({},this.d,i),this.el=n,this._init()},t.typeIt.prototype={_init:function(){this.el.find(".ti-container, .ti-cursor, .ti-placeholder").remove(),this._elCheck(),this.s.strings=this._toArray(this.s.strings),this.el.html(''),this.tel=this.el.find("span"),this.insert=function(t){this.tel.append(t)},this.s.startDelete&&(this.tel.html(this.stringsToDelete),this.queue.push([this["delete"]])),this._generateQueue(),this._kickoff()},_kickoff:function(){this._cursor(),this.s.autoStart?this._startQueue():this._isVisible()?(this.hasStarted=!0,this._startQueue()):n.on("scroll",function(){this._isVisible()&&!this.hasStarted&&(this.hasStarted=!0,this._startQueue())}.bind(this))},_generateQueue:function(){for(var t=0;t=0;e--)-1!==t[e].indexOf(""),this._executeQueue()},mergeSet:function(e){this.s=t.extend({},this.s,e),this._executeQueue()},_print:function(e){this.inTag?(t(this.tag,this.el).last().append(e),this.tagCount-1;r--){if(">"!==n[r]&&";"!==n[r]||!this.s.html){n.pop();break}for(var o=r;o>-1;o--){if("
"===n.slice(o-3,o+1).join("")){n.splice(o-3,4);break}if("&"===n[o]){n.splice(o,r-o+1);break}if("<"===n[o]&&">"!==n[o-1]){if(";"===n[o-1])for(var s=o-1;s>-1;s--)if("&"===n[s]){n.splice(s,o-s);break}n.splice(o-1,1);break}}break}if(this.tel.html().indexOf(">-1)for(var a=this.tel.html().indexOf(">=0;a--)if("<"===n[a]){n.splice(a,n.length-a);break}this.tel.html(n.join("")),i>(t===e?0:2)?this["delete"](t===e?e:t-1):this._executeQueue()}.bind(this),this.deletePace)},_isVisible:function(){var e=t(window),n={top:e.scrollTop(),left:e.scrollLeft()};n.right=n.left+e.width(),n.bottom=n.top+e.height();var i=this.el.outerHeight(),r=this.el.outerWidth();if(!r||!i)return!1;var o=this.el.offset();if(o.right=o.left+r,o.bottom=o.top+i,!!(n.righto.right||n.bottomo.bottom))return!1;var s={top:Math.min(1,(o.bottom-n.top)/i),bottom:Math.min(1,(n.bottom-o.top)/i),left:Math.min(1,(o.right-n.left)/r),right:Math.min(1,(n.right-o.left)/r)};return s.left*s.right>=1&&s.top*s.bottom>=1},_executeQueue:function(){if(this.queueIndex0?this.s.strings=this.el.html().trim():this.s.startDelete&&(this.stringsToDelete=this.el.html())},_toArray:function(t){return t.constructor===Array?t.slice(0):t.split("
")},_cursor:function(){if(this.s.cursor){this.el.append("|');var t=this.s.cursorSpeed,e=this;!function n(){e.el.find(".ti-cursor").fadeTo(t/2,0).fadeTo(t/2,1),e._to(n,t)}()}},_setPace:function(){var t=this.s.speed,n=this.s.deleteSpeed!==e?this.s.deleteSpeed:this.s.speed/3,i=t/2,r=n/2;this.typePace=this.s.lifeLike?this._randomInRange(t,i):t,this.deletePace=this.s.lifeLike?this._randomInRange(n,r):n},_randomInRange:function(t,e){return Math.abs(Math.random()*(t+e-(t-e))+(t-e))},_rake:function(t){for(var e=0;e"===t[e][o]||";"===t[e][o]&&r)&&(i[1]=o,o=0,n=t[e].slice(i[0],i[1]+1).join(""),t[e].splice(i[0],i[1]-i[0]+1,n),r=!1)}return t},_makeNode:function(e){this.tag=t(t.parseHTML(e)),this._print(this.tag),this.inTag=!0}},t.fn.tiType=function(i){var r=t(this).data("typeit");return r===e?n:(r.queue.push([r.type,i]),this)},t.fn.tiEmpty=function(){var i=t(this).data("typeit");return i===e?n:(i.queue.push([i.empty]),this)},t.fn.tiDelete=function(i){var r=t(this).data("typeit");return r===e?n:(r.queue.push([r["delete"],i]),this)},t.fn.tiPause=function(i){var r=t(this).data("typeit");return r===e?n:(r.queue.push([r.pause,i]),this)},t.fn.tiBreak=function(){var i=t(this).data("typeit");return i===e?n:(i.queue.push([i["break"]]),this)},t.fn.tiSettings=function(i){var r=t(this).data("typeit");return r===e?n:(r.queue.push([r.mergeSet,i]),this)}}(jQuery),function(t){var e,n,i="0.4.2",r="hasOwnProperty",o=/[\.\/]/,s=/\s*,\s*/,a="*",l=function(t,e){return t-e},c={n:{}},u=function(){for(var t=0,e=this.length;t1)for(var i=0,l=n.length;i=1&&(delete n[r],o.s=1,t--,function(t){setTimeout(function(){e("mina.finish."+t.id,t)})}(o)),o.update()}t&&i(v)},y=function(t,e,r,o,s,l,m){var _={id:a(),start:t,end:e,b:r,s:0,dur:o-r,spd:1,get:s,set:l,easing:m||y.linear,status:c,speed:u,duration:h,stop:p,pause:f,resume:d,update:g};n[_.id]=_;var b,w=0;for(b in n)if(n.hasOwnProperty(b)&&2==++w)break;return 1==w&&i(v),_};return y.time=l,y.getById=function(t){return n[t]||null},y.linear=function(t){return t},y.easeout=function(t){return Math.pow(t,1.7)},y.easein=function(t){return Math.pow(t,.48)},y.easeinout=function(t){if(1==t)return 1;if(0==t)return 0;var e=.48-t/1.04,n=Math.sqrt(.1734+e*e),i=n-e,r=-n-e,o=Math.pow(Math.abs(i),1/3)*(i<0?-1:1)+Math.pow(Math.abs(r),1/3)*(r<0?-1:1)+.5;return 3*(1-o)*o*o+o*o*o},y.backin=function(t){if(1==t)return 1;var e=1.70158;return t*t*((e+1)*t-e)},y.backout=function(t){if(0==t)return 0;var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},y.elastic=function(t){return t==!!t?t:Math.pow(2,-10*t)*Math.sin((t-.075)*(2*Math.PI)/.3)+1},y.bounce=function(t){var e=7.5625,n=2.75;return t<1/n?e*t*t:t<2/n?e*(t-=1.5/n)*t+.75:t<2.5/n?e*(t-=2.25/n)*t+.9375:e*(t-=2.625/n)*t+.984375},t.mina=y,y}(void 0===e?function(){}:e),i=function(t){function n(t,e){if(t){if(t.nodeType)return x(t);if(r(t,"array")&&n.set)return n.set.apply(n,t);if(t instanceof m)return t;if(null==e)return x(t=k.doc.querySelector(String(t)))}return new w(t=null==t?"100%":t,e=null==e?"100%":e)}function i(t,e){if(e){if("#text"==t&&(t=k.doc.createTextNode(e.text||e["#text"]||"")),"#comment"==t&&(t=k.doc.createComment(e.text||e["#text"]||"")),"string"==typeof t&&(t=i(t)),"string"==typeof e)return 1==t.nodeType?"xlink:"==e.substring(0,6)?t.getAttributeNS(G,e.substring(6)):"xml:"==e.substring(0,4)?t.getAttributeNS(X,e.substring(4)):t.getAttribute(e):"text"==e?t.nodeValue:null;if(1==t.nodeType){for(var n in e)if(e[E](n)){var r=j(e[n]);r?"xlink:"==n.substring(0,6)?t.setAttributeNS(G,n.substring(6),r):"xml:"==n.substring(0,4)?t.setAttributeNS(X,n.substring(4),r):t.setAttribute(n,r):t.removeAttribute(n)}}else"text"in e&&(t.nodeValue=e.text)}else t=k.doc.createElementNS(X,t);return t}function r(t,e){return"finite"==(e=j.prototype.toLowerCase.call(e))?isFinite(t):!("array"!=e||!(t instanceof Array||Array.isArray&&Array.isArray(t)))||("null"==e&&null===t||e==typeof t&&null!==t||"object"==e&&t===Object(t)||L.call(t).slice(8,-1).toLowerCase()==e)}function o(t){if("function"==typeof t||Object(t)!==t)return t;var e=new t.constructor;for(var n in t)t[E](n)&&(e[n]=o(t[n]));return e}function s(t,e){for(var n=0,i=t.length;n=1e3&&delete a[l.shift()],l.push(o),a[o]=t.apply(e,r),n?n(a[o]):a[o])}return i}function l(t,e,n,i,r,o){if(null==r){var s=t-n,a=e-i;return s||a?(180+180*P.atan2(-a,-s)/N+360)%360:0}return l(t,e,r,o)-l(n,i,r,o)}function c(t){return t%360*N/180}function u(t){return 180*t/N%360}function h(t){var e=[];return t=t.replace(/(?:^|\s)(\w+)\(([^)]+)\)/g,function(t,n,i){return i=i.split(/\s*,\s*|\s+/),"rotate"==n&&1==i.length&&i.push(0,0),"scale"==n&&(i.length>2?i=i.slice(0,2):2==i.length&&i.push(0,0),1==i.length&&i.push(i[0],0,0)),"skewX"==n?e.push(["m",1,0,P.tan(c(i[0])),1,0,0]):"skewY"==n?e.push(["m",1,P.tan(c(i[0])),0,1,0,0]):e.push([n.charAt(0)].concat(i)),t}),e}function p(t,e){var i=it(t),r=new n.Matrix;if(i)for(var o=0,s=i.length;o.5;){var f,d,g,v,y,m;(g=o-u)>=0&&(y=i(f=l.getPointAtLength(g)))t-n)return e-o+t}return e},n.getRGB=a(function(t){if(!t||(t=j(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:tt};if("none"==t)return{r:-1,g:-1,b:-1,hex:"none",toString:tt};if(!q[E](t.toLowerCase().substring(0,2))&&"#"!=t.charAt()&&(t=Y(t)),!t)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:tt};var e,i,o,s,a,l,c=t.match(B);return c?(c[2]&&(o=A(c[2].substring(5),16),i=A(c[2].substring(3,5),16),e=A(c[2].substring(1,3),16)),c[3]&&(o=A((a=c[3].charAt(3))+a,16),i=A((a=c[3].charAt(2))+a,16),e=A((a=c[3].charAt(1))+a,16)),c[4]&&(l=c[4].split(M),e=F(l[0]),"%"==l[0].slice(-1)&&(e*=2.55),i=F(l[1]),"%"==l[1].slice(-1)&&(i*=2.55),o=F(l[2]),"%"==l[2].slice(-1)&&(o*=2.55),"rgba"==c[1].toLowerCase().slice(0,4)&&(s=F(l[3])),l[3]&&"%"==l[3].slice(-1)&&(s/=100)),c[5]?(l=c[5].split(M),e=F(l[0]),"%"==l[0].slice(-1)&&(e/=100),i=F(l[1]),"%"==l[1].slice(-1)&&(i/=100),o=F(l[2]),"%"==l[2].slice(-1)&&(o/=100),("deg"==l[0].slice(-3)||"\xb0"==l[0].slice(-1))&&(e/=360),"hsba"==c[1].toLowerCase().slice(0,4)&&(s=F(l[3])),l[3]&&"%"==l[3].slice(-1)&&(s/=100),n.hsb2rgb(e,i,o,s)):c[6]?(l=c[6].split(M),e=F(l[0]),"%"==l[0].slice(-1)&&(e/=100),i=F(l[1]),"%"==l[1].slice(-1)&&(i/=100),o=F(l[2]),"%"==l[2].slice(-1)&&(o/=100),("deg"==l[0].slice(-3)||"\xb0"==l[0].slice(-1))&&(e/=360),"hsla"==c[1].toLowerCase().slice(0,4)&&(s=F(l[3])),l[3]&&"%"==l[3].slice(-1)&&(s/=100),n.hsl2rgb(e,i,o,s)):(e=R(P.round(e),255),i=R(P.round(i),255),o=R(P.round(o),255),s=R(O(s,0),1),(c={r:e,g:i,b:o,toString:tt}).hex="#"+(16777216|o|i<<8|e<<16).toString(16).slice(1),c.opacity=r(s,"finite")?s:1,c)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:tt}},n),n.hsb=a(function(t,e,i){return n.hsb2rgb(t,e,i).hex}),n.hsl=a(function(t,e,i){return n.hsl2rgb(t,e,i).hex}),n.rgb=a(function(t,e,n,i){if(r(i,"finite")){var o=P.round;return"rgba("+[o(t),o(e),o(n),+i.toFixed(2)]+")"}return"#"+(16777216|n|e<<8|t<<16).toString(16).slice(1)});var Y=function(t){var e=k.doc.getElementsByTagName("head")[0]||k.doc.getElementsByTagName("svg")[0],n="rgb(255, 0, 0)";return(Y=a(function(t){if("red"==t.toLowerCase())return n;e.style.color=n,e.style.color=t;var i=k.doc.defaultView.getComputedStyle(e,I).getPropertyValue("color");return i==n?null:i}))(t)},Z=function(){return"hsb("+[this.h,this.s,this.b]+")"},J=function(){return"hsl("+[this.h,this.s,this.l]+")"},tt=function(){return 1==this.opacity||null==this.opacity?this.hex:"rgba("+[this.r,this.g,this.b,this.opacity]+")"},et=function(t,e,i){if(null==e&&r(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(i=t.b,e=t.g,t=t.r),null==e&&r(t,string)){var o=n.getRGB(t);t=o.r,e=o.g,i=o.b}return(t>1||e>1||i>1)&&(t/=255,e/=255,i/=255),[t,e,i]},nt=function(t,e,i,o){var s={r:t=P.round(255*t),g:e=P.round(255*e),b:i=P.round(255*i),opacity:r(o,"finite")?o:1,hex:n.rgb(t,e,i),toString:tt};return r(o,"finite")&&(s.opacity=o),s};n.color=function(t){var e;return r(t,"object")&&"h"in t&&"s"in t&&"b"in t?(e=n.hsb2rgb(t),t.r=e.r,t.g=e.g,t.b=e.b,t.opacity=1,t.hex=e.hex):r(t,"object")&&"h"in t&&"s"in t&&"l"in t?(e=n.hsl2rgb(t),t.r=e.r,t.g=e.g,t.b=e.b,t.opacity=1,t.hex=e.hex):(r(t,"string")&&(t=n.getRGB(t)),r(t,"object")&&"r"in t&&"g"in t&&"b"in t&&!("error"in t)?(e=n.rgb2hsl(t),t.h=e.h,t.s=e.s,t.l=e.l,e=n.rgb2hsb(t),t.v=e.b):((t={hex:"none"}).r=t.g=t.b=t.h=t.s=t.v=t.l=-1,t.error=1)),t.toString=tt,t},n.hsb2rgb=function(t,e,n,i){var o,s,a,l,c;return r(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(n=t.b,e=t.s,i=t.o,t=t.h),o=s=a=n-(c=n*e),o+=[c,l=c*(1-D((t=(t*=360)%360/60)%2-1)),0,0,l,c][t=~~t],s+=[l,c,c,l,0,0][t],a+=[0,0,l,c,c,l][t],nt(o,s,a,i)},n.hsl2rgb=function(t,e,n,i){var o,s,a,l,c;return r(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(n=t.l,e=t.s,t=t.h),(t>1||e>1||n>1)&&(t/=360,e/=100,n/=100),o=s=a=n-(c=2*e*(n<.5?n:1-n))/2,o+=[c,l=c*(1-D((t=(t*=360)%360/60)%2-1)),0,0,l,c][t=~~t],s+=[l,c,c,l,0,0][t],a+=[0,0,l,c,c,l][t],nt(o,s,a,i)},n.rgb2hsb=function(t,e,n){var i,r;return t=(n=et(t,e,n))[0],e=n[1],n=n[2],{h:((0==(r=(i=O(t,e,n))-R(t,e,n))?null:i==t?(e-n)/r:i==e?(n-t)/r+2:(t-e)/r+4)+360)%6*60/360,s:0==r?0:r/i,b:i,toString:Z}},n.rgb2hsl=function(t,e,n){var i,r,o,s;return t=(n=et(t,e,n))[0],e=n[1],n=n[2],i=((r=O(t,e,n))+(o=R(t,e,n)))/2,{h:((0==(s=r-o)?null:r==t?(e-n)/s:r==e?(n-t)/s+2:(t-e)/s+4)+360)%6*60/360,s:0==s?0:i<.5?s/(2*i):s/(2-2*i),l:i,toString:J}},n.parsePathString=function(t){if(!t)return null;var e=n.path(t);if(e.arr)return n.path.clone(e.arr);var i={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},o=[];return r(t,"array")&&r(t[0],"array")&&(o=n.path.clone(t)),o.length||j(t).replace(V,function(t,e,n){var r=[],s=e.toLowerCase();if(n.replace(H,function(t,e){e&&r.push(+e)}),"m"==s&&r.length>2&&(o.push([e].concat(r.splice(0,2))),s="l",e="m"==e?"l":"L"),"o"==s&&1==r.length&&o.push([e,r[0]]),"r"==s)o.push([e].concat(r));else for(;r.length>=i[s]&&(o.push([e].concat(r.splice(0,i[s]))),i[s]););}),o.toString=n.path.toString,e.arr=n.path.clone(o),o};var it=n.parseTransformString=function(t){if(!t)return null;var e=[];return r(t,"array")&&r(t[0],"array")&&(e=n.path.clone(t)),e.length||j(t).replace(U,function(t,n,i){var r=[];n.toLowerCase();i.replace(H,function(t,e){e&&r.push(+e)}),e.push([n].concat(r))}),e.toString=n.path.toString,e};n._.svgTransform2string=h,n._.rgTransform=/^[a-z][\s]*-?\.?\d/i,n._.transform2matrix=p,n._unit2px=v;k.doc.contains||k.doc.compareDocumentPosition;n._.getSomeDefs=f,n._.getSomeSVG=d,n.select=function(t){return t=j(t).replace(/([^\\]):/g,"$1\\:"),x(k.doc.querySelector(t))},n.selectAll=function(t){for(var e=k.doc.querySelectorAll(t),i=(n.set||Array)(),r=0;r1))return e("snap.util.getattr."+t,i).firstDefined();var u={};u[t]=n,t=u}for(var h in t)t[E](h)&&e("snap.util.attr."+h,i,t[h]);return i},n.parse=function(t){var e=k.doc.createDocumentFragment(),n=!0,i=k.doc.createElement("div");if((t=j(t)).match(/^\s*<\s*svg(?:\s|>)/)||(t=""+t+"",n=!1),i.innerHTML=t,t=i.getElementsByTagName("svg")[0])if(n)e=t;else for(;t.firstChild;)e.appendChild(t.firstChild);return new _(e)},n.fragment=function(){for(var t=Array.prototype.slice.call(arguments,0),e=k.doc.createDocumentFragment(),i=0,r=t.length;i")}else t&&(e+="/>");return e}}var p=r.prototype,f=i.is,d=String,g=i._unit2px,v=i._.$,y=i._.make,m=i._.getSomeDefs,_="hasOwnProperty",b=i._.wrap;p.getBBox=function(t){if(!i.Matrix||!i.path)return this.node.getBBox();var e=this,n=new i.Matrix;if(e.removed)return i._.box();for(;"use"==e.type;)if(t||(n=n.add(e.transform().localMatrix.translate(e.attr("x")||0,e.attr("y")||0))),e.original)e=e.original;else{var r=e.attr("xlink:href");e=e.original=e.node.ownerDocument.getElementById(r.substring(r.indexOf("#")+1))}var o=e._,s=i.path.get[e.type]||i.path.get.deflt;try{return t?(o.bboxwt=s?i.path.getBBox(e.realPath=s(e)):i._.box(e.node.getBBox()),i._.box(o.bboxwt)):(e.realPath=s(e),e.matrix=e.transform().localMatrix,o.bbox=i.path.getBBox(i.path.map(e.realPath,n.add(e.matrix))),i._.box(o.bbox))}catch(a){return i._.box()}};var w=function(){return this.string};p.transform=function(t){var e=this._;if(null==t){for(var n,r=this,o=new i.Matrix(this.node.getCTM()),s=l(this),a=[s],c=new i.Matrix,u=s.toTransformString(),h=d(s)==d(this.matrix)?d(e.transform):u;"svg"!=r.type&&(r=r.parent());)a.push(l(r));for(n=a.length;n--;)c.add(a[n]);return{string:h,globalMatrix:o,totalMatrix:c,localMatrix:s,diffMatrix:o.clone().add(s.invert()),global:o.toTransformString(),total:c.toTransformString(),local:u,toString:w}}return t instanceof i.Matrix?(this.matrix=t,this._.transform=t.toTransformString()):l(this,t),this.node&&("linearGradient"==this.type||"radialGradient"==this.type?v(this.node,{gradientTransform:this.matrix}):"pattern"==this.type?v(this.node,{patternTransform:this.matrix}):v(this.node,{transform:this.matrix})),this},p.parent=function(){return b(this.node.parentNode)},p.append=p.add=function(t){if(t){if("set"==t.type){var e=this;return t.forEach(function(t){e.add(t)}),this}t=b(t),this.node.appendChild(t.node),t.paper=this.paper}return this},p.appendTo=function(t){return t&&(t=b(t)).append(this),this},p.prepend=function(t){if(t){if("set"==t.type){var e,n=this;return t.forEach(function(t){e?e.after(t):n.prepend(t),e=t}),this}var i=(t=b(t)).parent();this.node.insertBefore(t.node,this.node.firstChild),this.add&&this.add(),t.paper=this.paper,this.parent()&&this.parent().add(),i&&i.add()}return this},p.prependTo=function(t){return(t=b(t)).prepend(this),this},p.before=function(t){if("set"==t.type){var e=this;return t.forEach(function(t){var n=t.parent();e.node.parentNode.insertBefore(t.node,e.node),n&&n.add()}),this.parent().add(),this}var n=(t=b(t)).parent();return this.node.parentNode.insertBefore(t.node,this.node),this.parent()&&this.parent().add(),n&&n.add(),t.paper=this.paper,this},p.after=function(t){var e=(t=b(t)).parent();return this.node.nextSibling?this.node.parentNode.insertBefore(t.node,this.node.nextSibling):this.node.parentNode.appendChild(t.node),this.parent()&&this.parent().add(),e&&e.add(),t.paper=this.paper,this},p.insertBefore=function(t){t=b(t);var e=this.parent();return t.node.parentNode.insertBefore(this.node,t.node),this.paper=t.paper,e&&e.add(),t.parent()&&t.parent().add(),this},p.insertAfter=function(t){t=b(t);var e=this.parent();return t.node.parentNode.insertBefore(this.node,t.node.nextSibling),this.paper=t.paper,e&&e.add(),t.parent()&&t.parent().add(),this},p.remove=function(){var t=this.parent();return this.node.parentNode&&this.node.parentNode.removeChild(this.node),delete this.paper,this.removed=!0,t&&t.add(),this},p.select=function(t){return t=d(t).replace(/([^\\]):/g,"$1\\:"),b(this.node.querySelector(t))},p.selectAll=function(t){for(var e=this.node.querySelectorAll(t),n=(i.set||Array)(),r=0;r{contents}',{x:+e.x.toFixed(3),y:+e.y.toFixed(3),width:+e.width.toFixed(3),height:+e.height.toFixed(3),contents:this.outerSVG()});return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(n)))}},a.prototype.select=p.select,a.prototype.selectAll=p.selectAll}),i.plugin(function(t){function e(t,e,i,r,o,s){if(null==e&&"[object SVGMatrix]"==n.call(t))return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.e=t.e,void(this.f=t.f);null!=t?(this.a=+t,this.b=+e,this.c=+i,this.d=+r,this.e=+o,this.f=+s):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}var n=Object.prototype.toString,i=String,r=Math,o="";!function(n){function s(t){return t[0]*t[0]+t[1]*t[1]}function a(t){var e=r.sqrt(s(t));t[0]&&(t[0]/=e),t[1]&&(t[1]/=e)}n.add=function(t,n,i,r,o,s){var a,l,c,u,h=[[],[],[]],p=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],f=[[t,i,o],[n,r,s],[0,0,1]];for(t&&t instanceof e&&(f=[[t.a,t.c,t.e],[t.b,t.d,t.f],[0,0,1]]),a=0;a<3;a++)for(l=0;l<3;l++){for(u=0,c=0;c<3;c++)u+=p[a][c]*f[c][l];h[a][l]=u}return this.a=h[0][0],this.b=h[1][0],this.c=h[0][1],this.d=h[1][1],this.e=h[0][2],this.f=h[1][2],this},n.invert=function(){var t=this,n=t.a*t.d-t.b*t.c;return new e(t.d/n,-t.b/n,-t.c/n,t.a/n,(t.c*t.f-t.d*t.e)/n,(t.b*t.e-t.a*t.f)/n)},n.clone=function(){return new e(this.a,this.b,this.c,this.d,this.e,this.f)},n.translate=function(t,e){return this.add(1,0,0,1,t,e)},n.scale=function(t,e,n,i){return null==e&&(e=t),(n||i)&&this.add(1,0,0,1,n,i),this.add(t,0,0,e,0,0),(n||i)&&this.add(1,0,0,1,-n,-i),this},n.rotate=function(e,n,i){e=t.rad(e),n=n||0,i=i||0;var o=+r.cos(e).toFixed(9),s=+r.sin(e).toFixed(9);return this.add(o,s,-s,o,n,i),this.add(1,0,0,1,-n,-i)},n.x=function(t,e){return t*this.a+e*this.c+this.e},n.y=function(t,e){return t*this.b+e*this.d+this.f},n.get=function(t){return+this[i.fromCharCode(97+t)].toFixed(4)},n.toString=function(){return"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")"},n.offset=function(){ return[this.e.toFixed(4),this.f.toFixed(4)]},n.determinant=function(){return this.a*this.d-this.b*this.c},n.split=function(){var e={};e.dx=this.e,e.dy=this.f;var n=[[this.a,this.c],[this.b,this.d]];e.scalex=r.sqrt(s(n[0])),a(n[0]),e.shear=n[0][0]*n[1][0]+n[0][1]*n[1][1],n[1]=[n[1][0]-n[0][0]*e.shear,n[1][1]-n[0][1]*e.shear],e.scaley=r.sqrt(s(n[1])),a(n[1]),e.shear/=e.scaley,this.determinant()<0&&(e.scalex=-e.scalex);var i=-n[0][1],o=n[1][1];return o<0?(e.rotate=t.deg(r.acos(o)),i<0&&(e.rotate=360-e.rotate)):e.rotate=t.deg(r.asin(i)),e.isSimple=!(+e.shear.toFixed(9)||e.scalex.toFixed(9)!=e.scaley.toFixed(9)&&e.rotate),e.isSuperSimple=!+e.shear.toFixed(9)&&e.scalex.toFixed(9)==e.scaley.toFixed(9)&&!e.rotate,e.noRotation=!+e.shear.toFixed(9)&&!e.rotate,e},n.toTransformString=function(t){var e=t||this.split();return+e.shear.toFixed(9)?"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]:(e.scalex=+e.scalex.toFixed(4),e.scaley=+e.scaley.toFixed(4),e.rotate=+e.rotate.toFixed(4),(e.dx||e.dy?"t"+[+e.dx.toFixed(4),+e.dy.toFixed(4)]:o)+(1!=e.scalex||1!=e.scaley?"s"+[e.scalex,e.scaley,0,0]:o)+(e.rotate?"r"+[+e.rotate.toFixed(4),0,0]:o))}}(e.prototype),t.Matrix=e,t.matrix=function(t,n,i,r,o,s){return new e(t,n,i,r,o,s)}}),i.plugin(function(t,n,i,r,o){function s(i){return function(r){if(e.stop(),r instanceof o&&1==r.node.childNodes.length&&("radialGradient"==r.node.firstChild.tagName||"linearGradient"==r.node.firstChild.tagName||"pattern"==r.node.firstChild.tagName)&&(r=r.node.firstChild,d(this).appendChild(r),r=p(r)),r instanceof n)if("radialGradient"==r.type||"linearGradient"==r.type||"pattern"==r.type){r.node.id||v(r.node,{id:r.id});var s=y(r.node.id)}else s=r.attr(i);else if((s=t.color(r)).error){var a=t(d(this).ownerSVGElement).gradient(r);a?(a.node.id||v(a.node,{id:a.id}),s=y(a.node.id)):s=r}else s=m(s);var l={};l[i]=s,v(this.node,l),this.node.style[i]=b}}function a(t){e.stop(),t==+t&&(t+="px"),this.node.style.fontSize=t}function l(t){for(var e=[],n=t.childNodes,i=0,r=n.length;i1&&(t=Array.prototype.slice.call(arguments,0));var e={};return a(t,"object")&&!a(t,"array")?e=t:null!=t&&(e={points:t}),this.el("polyline",e)},s.polygon=function(t){arguments.length>1&&(t=Array.prototype.slice.call(arguments,0));var e={};return a(t,"object")&&!a(t,"array")?e=t:null!=t&&(e={points:t}),this.el("polygon",e)},function(){function i(){return this.selectAll("stop")}function r(t,e){var i=u("stop"),r={offset:+e+"%"};return t=n.color(t),r["stop-color"]=t.hex,t.opacity<1&&(r["stop-opacity"]=t.opacity),u(i,r),this.node.appendChild(i),this}function o(){if("linearGradient"==this.type){var t=u(this.node,"x1")||0,e=u(this.node,"x2")||1,i=u(this.node,"y1")||0,r=u(this.node,"y2")||0;return n._.box(t,i,math.abs(e-t),math.abs(r-i))}var o=this.node.cx||.5,s=this.node.cy||.5,a=this.node.r||0;return n._.box(o-a,s-a,2*a,2*a)}function a(t,n){function i(t,e){for(var n=(e-h)/(t-p),i=p;io){if(i&&!g.start){if(d+=["C"+r((f=s(c,u,h[1],h[2],h[3],h[4],h[5],h[6],o-v)).start.x),r(f.start.y),r(f.m.x),r(f.m.y),r(f.x),r(f.y)],a)return d;g.start=d,d=["M"+r(f.x),r(f.y)+"C"+r(f.n.x),r(f.n.y),r(f.end.x),r(f.end.y),r(h[5]),r(h[6])].join(),v+=p,c=+h[5],u=+h[6];continue}if(!n&&!i)return f=s(c,u,h[1],h[2],h[3],h[4],h[5],h[6],o-v)}v+=p,c=+h[5],u=+h[6]}d+=h.shift()+h}return g.end=d,f=n?v:i?g:l(c,u,h[0],h[1],h[2],h[3],h[4],h[5],1)},null,t._.clone)}function l(t,e,n,i,r,o,s,a,l){var c=1-l,u=U(c,3),h=U(c,2),p=l*l,f=p*l,d=t+2*l*(n-t)+p*(r-2*n+t),g=e+2*l*(i-e)+p*(o-2*i+e),v=n+2*l*(r-n)+p*(s-2*r+n),y=i+2*l*(o-i)+p*(a-2*o+i);return{x:u*t+3*h*l*n+3*c*l*l*r+f*s,y:u*e+3*h*l*i+3*c*l*l*o+f*a,m:{x:d,y:g},n:{x:v,y:y},start:{x:c*t+l*n,y:c*e+l*i},end:{x:c*r+l*s,y:c*o+l*a},alpha:90-180*B.atan2(d-v,g-y)/M}}function c(e,n,r,o,s,a,l,c){t.is(e,"array")||(e=[e,n,r,o,s,a,l,c]);var u=j.apply(null,e);return i(u.min.x,u.min.y,u.max.x-u.min.x,u.max.y-u.min.y)}function u(t,e,n){return e>=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height}function h(t,e){return t=i(t),u(e=i(e),t.x,t.y)||u(e,t.x2,t.y)||u(e,t.x,t.y2)||u(e,t.x2,t.y2)||u(t,e.x,e.y)||u(t,e.x2,e.y)||u(t,e.x,e.y2)||u(t,e.x2,e.y2)||(t.xe.x||e.xt.x)&&(t.ye.y||e.yt.y)}function p(t,e,n,i,r){return t*(t*(-3*e+9*n-9*i+3*r)+6*e-12*n+6*i)-3*e+3*n}function f(t,e,n,i,r,o,s,a,l){null==l&&(l=1);for(var c=(l=l>1?1:l<0?0:l)/2,u=12,h=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],f=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,g=0;gd;)c=f(t,e,n,i,r,o,s,a,p+=(cV(r,s)||V(e,i)V(o,a))){var l=(t-n)*(o-a)-(e-i)*(r-s);if(l){var c=((t*i-e*n)*(r-s)-(t-n)*(r*a-o*s))/l,u=((t*i-e*n)*(o-a)-(e-i)*(r*a-o*s))/l,h=+c.toFixed(2),p=+u.toFixed(2);if(!(h<+q(t,n).toFixed(2)||h>+V(t,n).toFixed(2)||h<+q(r,s).toFixed(2)||h>+V(r,s).toFixed(2)||p<+q(e,i).toFixed(2)||p>+V(e,i).toFixed(2)||p<+q(o,a).toFixed(2)||p>+V(o,a).toFixed(2)))return{x:c,y:u}}}}function v(t,e,n){if(!h(c(t),c(e)))return n?0:[];for(var i=~~(f.apply(0,t)/8),r=~~(f.apply(0,e)/8),o=[],s=[],a={},u=n?0:[],p=0;p=0&&k<=1&&T>=0&&T<=1&&(n?u++:u.push({x:C.x,y:C.y,t1:k,t2:T}))}}return u}function y(t,e){return _(t,e)}function m(t,e){return _(t,e,1)}function _(t,e,n){t=F(t),e=F(e);for(var i,r,o,s,a,l,c,u,h,p,f=n?0:[],d=0,g=t.length;d180),0,l,e+n*Math.sin(-o*s)]];else c=[["M",t,e],["m",0,-i],["a",n,i,0,1,1,0,2*i],["a",n,i,0,1,1,0,-2*i],["z"]];return c.toString=r,c}function k(e){var i=n(e),s=String.prototype.toLowerCase;if(i.rel)return o(i.rel);t.is(e,"array")&&t.is(e&&e[0],"array")||(e=t.parsePathString(e));var a=[],l=0,c=0,u=0,h=0,p=0;"M"==e[0][0]&&(u=l=e[0][1],h=c=e[0][2],p++,a.push(["M",l,c]));for(var f=p,d=e.length;f1&&(i*=m=B.sqrt(m),r*=m);var _=i*i,b=r*r,w=(s==a?-1:1)*B.sqrt(H((_*b-_*y*y-b*v*v)/(_*y*y+b*v*v))),x=w*i*y/r+(e+l)/2,C=w*-r*v/i+(n+c)/2,k=B.asin(((n-C)/r).toFixed(9)),T=B.asin(((c-C)/r).toFixed(9));(k=eT&&(k-=2*M),!a&&T>k&&(T-=2*M)}var S=T-k;if(H(S)>p){var $=T,j=l,F=c;T=k+p*(a&&T>k?1:-1),d=E(l=x+i*B.cos(T),c=C+r*B.sin(T),i,r,o,0,a,j,F,[T,$,x,C])}S=T-k;var A=B.cos(k),P=B.sin(k),O=B.cos(T),R=B.sin(T),D=B.tan(S/4),N=4/3*i*D,I=4/3*r*D,L=[e,n],q=[e+N*P,n-I*A],V=[l+N*R,c-I*O],U=[l,c];if(q[0]=2*L[0]-q[0],q[1]=2*L[1]-q[1],u)return[q,V,U].concat(d);for(var z=[],W=0,Q=(d=[q,V,U].concat(d).join().split(",")).length;W7){t[e].shift();for(var n=t[e];n.length;)p[e]="A",s&&(f[e]="A"),t.splice(e++,0,["C"].concat(n.splice(0,6)));t.splice(e,1),y=V(r.length,s&&s.length||0)}},h=function(t,e,n,i,o){t&&e&&"M"==t[o][0]&&"M"!=e[o][0]&&(e.splice(o,0,["M",i.x,i.y]),n.bx=0,n.by=0,n.x=t[o][1],n.y=t[o][2],y=V(r.length,s&&s.length||0))},p=[],f=[],d="",g="",v=0,y=V(r.length,s&&s.length||0);vi;i+=2){var o=[{x:+t[i-2],y:+t[i-1]},{x:+t[i],y:+t[i+1]},{x:+t[i+2],y:+t[i+3]},{x:+t[i+4],y:+t[i+5]}];e?i?r-4==i?o[3]={x:+t[0],y:+t[1]}:r-2==i&&(o[2]={x:+t[0],y:+t[1]},o[3]={x:+t[2],y:+t[3]}):o[0]={x:+t[r-2],y:+t[r-1]}:r-4==i?o[3]=o[2]:i||(o[0]={x:+t[i],y:+t[i+1]}),n.push(["C",(-o[0].x+6*o[1].x+o[2].x)/6,(-o[0].y+6*o[1].y+o[2].y)/6,(o[1].x+6*o[2].x-o[3].x)/6,(o[1].y+6*o[2].y-o[3].y)/6,o[2].x,o[2].y])}return n}var O=e.prototype,R=t.is,D=t._.clone,N="hasOwnProperty",I=/,?([a-z]),?/gi,L=parseFloat,B=Math,M=B.PI,q=B.min,V=B.max,U=B.pow,H=B.abs,z=a(1),W=a(),Q=a(0,1),G=t._unit2px,X={path:function(t){return t.attr("path")},circle:function(t){var e=G(t);return C(e.cx,e.cy,e.r)},ellipse:function(t){var e=G(t);return C(e.cx||0,e.cy||0,e.rx,e.ry)},rect:function(t){var e=G(t);return x(e.x||0,e.y||0,e.width,e.height,e.rx,e.ry)},image:function(t){var e=G(t);return x(e.x||0,e.y||0,e.width,e.height)},line:function(t){return"M"+[t.attr("x1")||0,t.attr("y1")||0,t.attr("x2"),t.attr("y2")]},polyline:function(t){return"M"+t.attr("points")},polygon:function(t){return"M"+t.attr("points")+"z"},deflt:function(t){var e=t.node.getBBox();return x(e.x,e.y,e.width,e.height)}};t.path=n,t.path.getTotalLength=z,t.path.getPointAtLength=W,t.path.getSubpath=function(t,e,n){if(this.getTotalLength(t)-n<1e-6)return Q(t,e).end;var i=Q(t,n,1);return e?Q(i,e).end:i},O.getTotalLength=function(){if(this.node.getTotalLength)return this.node.getTotalLength()},O.getPointAtLength=function(t){return W(this.attr("d"),t)},O.getSubpath=function(e,n){return t.path.getSubpath(this.attr("d"),e,n)},t._.box=i,t.path.findDotsAtSegment=l,t.path.bezierBBox=c,t.path.isPointInsideBBox=u,t.closest=function(e,n,r,o){for(var s=100,a=i(e-s/2,n-s/2,s,s),l=[],c=r[0].hasOwnProperty("x")?function(t){return{x:r[t].x,y:r[t].y}}:function(t){return{x:r[t],y:o[t]}},h=0;s<=1e6&&!h;){for(var p=0,f=r.length;py&&(v=y,l[p].len=y,g=l[p])}return g}},t.path.isBBoxIntersect=h,t.path.intersection=y,t.path.intersectionNumber=m,t.path.isPointInside=b,t.path.getBBox=w,t.path.get=X,t.path.toRelative=k,t.path.toAbsolute=T,t.path.toCubic=F,t.path.map=A,t.path.toString=r,t.path.clone=o}),i.plugin(function(t){var i=Math.max,r=Math.min,o=function(t){if(this.items=[],this.bindings={},this.length=0,this.type="set",t)for(var e=0,n=t.length;e',{def:i})},t.filter.blur.toString=function(){return this()},t.filter.shadow=function(e,n,i,r,o){return"string"==typeof i&&(o=r=i,i=4),"string"!=typeof r&&(o=r,r="#000"),r=r||"#000",null==i&&(i=4),null==o&&(o=1),null==e&&(e=0,n=2),null==n&&(n=e),r=t.color(r),t.format('',{color:r,dx:e,dy:n,blur:i,opacity:o})},t.filter.shadow.toString=function(){return this()},t.filter.grayscale=function(e){return null==e&&(e=1),t.format('',{a:.2126+.7874*(1-e),b:.7152-.7152*(1-e),c:.0722-.0722*(1-e),d:.2126-.2126*(1-e),e:.7152+.2848*(1-e),f:.0722-.0722*(1-e),g:.2126-.2126*(1-e),h:.0722+.9278*(1-e)})},t.filter.grayscale.toString=function(){return this()},t.filter.sepia=function(e){return null==e&&(e=1),t.format('',{a:.393+.607*(1-e),b:.769-.769*(1-e),c:.189-.189*(1-e),d:.349-.349*(1-e),e:.686+.314*(1-e),f:.168-.168*(1-e),g:.272-.272*(1-e),h:.534-.534*(1-e),i:.131+.869*(1-e)})},t.filter.sepia.toString=function(){return this()},t.filter.saturate=function(e){return null==e&&(e=1),t.format('',{amount:1-e})},t.filter.saturate.toString=function(){return this()},t.filter.hueRotate=function(e){return e=e||0,t.format('',{angle:e})},t.filter.hueRotate.toString=function(){return this()},t.filter.invert=function(e){return null==e&&(e=1),t.format('',{amount:e,amount2:1-e})},t.filter.invert.toString=function(){return this()},t.filter.brightness=function(e){return null==e&&(e=1),t.format('',{amount:e})},t.filter.brightness.toString=function(){return this()},t.filter.contrast=function(e){return null==e&&(e=1),t.format('',{amount:e,amount2:.5-e/2})},t.filter.contrast.toString=function(){return this()}}),i.plugin(function(t,e){var n=t._.box,i=t.is,r=/^[^a-z]*([tbmlrc])/i,o=function(){return"T"+this.dx+","+this.dy};e.prototype.getAlign=function(t,e){null==e&&i(t,"string")&&(e=t,t=null);var s=(t=t||this.paper).getBBox?t.getBBox():n(t),a=this.getBBox(),l={};switch(e=(e=e&&e.match(r))?e[1].toLowerCase():"c"){case"t":l.dx=0,l.dy=s.y-a.y;break;case"b":l.dx=0,l.dy=s.y2-a.y2;break;case"m":l.dx=0,l.dy=s.cy-a.cy;break;case"l":l.dx=s.x-a.x,l.dy=0;break;case"r":l.dx=s.x2-a.x2,l.dy=0;break;default:l.dx=s.cx-a.cx,l.dy=0}return l.toString=o,l},e.prototype.align=function(t,e){return this.transform("..."+this.getAlign(t,e))}}),i}),function(){"use strict";function t(i){if(!i)throw new Error("No options passed to Waypoint constructor");if(!i.element)throw new Error("No element option passed to Waypoint constructor");if(!i.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+e,this.options=t.Adapter.extend({},t.defaults,i),this.element=this.options.element,this.adapter=new t.Adapter(this.element),this.callback=i.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=t.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=t.Context.findOrCreateByElement(this.options.context),t.offsetAliases[this.options.offset]&&(this.options.offset=t.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),n[this.key]=this,e+=1}var e=0,n={};t.prototype.queueTrigger=function(t){this.group.queueTrigger(this,t)},t.prototype.trigger=function(t){this.enabled&&this.callback&&this.callback.apply(this,t)},t.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete n[this.key]},t.prototype.disable=function(){return this.enabled=!1,this},t.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},t.prototype.next=function(){return this.group.next(this)},t.prototype.previous=function(){return this.group.previous(this)},t.invokeAll=function(t){var e=[];for(var i in n)e.push(n[i]);for(var r=0,o=e.length;o>r;r++)e[r][t]()},t.destroyAll=function(){t.invokeAll("destroy")},t.disableAll=function(){t.invokeAll("disable")},t.enableAll=function(){t.invokeAll("enable")},t.refreshAll=function(){t.Context.refreshAll()},t.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},t.viewportWidth=function(){return document.documentElement.clientWidth},t.adapters=[],t.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},t.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=t}(),function(){"use strict";function t(t){window.setTimeout(t,1e3/60)}function e(t){this.element=t,this.Adapter=r.Adapter,this.adapter=new this.Adapter(t),this.key="waypoint-context-"+n,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},t.waypointContextKey=this.key,i[t.waypointContextKey]=this,n+=1,this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}var n=0,i={},r=window.Waypoint,o=window.onload;e.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},e.prototype.checkEmpty=function(){var t=this.Adapter.isEmptyObject(this.waypoints.horizontal),e=this.Adapter.isEmptyObject(this.waypoints.vertical);t&&e&&(this.adapter.off(".waypoints"),delete i[this.key])},e.prototype.createThrottledResizeHandler=function(){function t(){e.handleResize(),e.didResize=!1}var e=this;this.adapter.on("resize.waypoints",function(){e.didResize||(e.didResize=!0,r.requestAnimationFrame(t))})},e.prototype.createThrottledScrollHandler=function(){function t(){e.handleScroll(),e.didScroll=!1}var e=this;this.adapter.on("scroll.waypoints",function(){(!e.didScroll||r.isTouch)&&(e.didScroll=!0,r.requestAnimationFrame(t))})},e.prototype.handleResize=function(){r.Context.refreshAll()},e.prototype.handleScroll=function(){var t={},e={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(var n in e){var i=e[n],r=i.newScroll>i.oldScroll?i.forward:i.backward;for(var o in this.waypoints[n]){var s=this.waypoints[n][o],a=i.oldScroll=s.triggerPoint;(a&&l||!a&&!l)&&(s.queueTrigger(r),t[s.group.id]=s.group)}}for(var c in t)t[c].flushTriggers();this.oldScroll={x:e.horizontal.newScroll,y:e.vertical.newScroll}},e.prototype.innerHeight=function(){return this.element==this.element.window?r.viewportHeight():this.adapter.innerHeight()},e.prototype.remove=function(t){delete this.waypoints[t.axis][t.key],this.checkEmpty()},e.prototype.innerWidth=function(){return this.element==this.element.window?r.viewportWidth():this.adapter.innerWidth()},e.prototype.destroy=function(){var t=[];for(var e in this.waypoints)for(var n in this.waypoints[e])t.push(this.waypoints[e][n]);for(var i=0,r=t.length;r>i;i++)t[i].destroy()},e.prototype.refresh=function(){var t,e=this.element==this.element.window,n=e?void 0:this.adapter.offset(),i={};for(var o in this.handleScroll(),t={horizontal:{contextOffset:e?0:n.left,contextScroll:e?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:e?0:n.top,contextScroll:e?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}}){var s=t[o];for(var a in this.waypoints[o]){var l,c,u,h,p=this.waypoints[o][a],f=p.options.offset,d=p.triggerPoint,g=0,v=null==d;p.element!==p.element.window&&(g=p.adapter.offset()[s.offsetProp]),"function"==typeof f?f=f.apply(p):"string"==typeof f&&(f=parseFloat(f),p.options.offset.indexOf("%")>-1&&(f=Math.ceil(s.contextDimension*f/100))),l=s.contextScroll-s.contextOffset,p.triggerPoint=g+l-f,c=d=s.oldScroll,h=!c&&!u,!v&&(c&&u)?(p.queueTrigger(s.backward),i[p.group.id]=p.group):!v&&h?(p.queueTrigger(s.forward),i[p.group.id]=p.group):v&&s.oldScroll>=p.triggerPoint&&(p.queueTrigger(s.forward),i[p.group.id]=p.group)}}return r.requestAnimationFrame(function(){for(var t in i)i[t].flushTriggers()}),this},e.findOrCreateByElement=function(t){return e.findByElement(t)||new e(t)},e.refreshAll=function(){for(var t in i)i[t].refresh()},e.findByElement=function(t){return i[t.waypointContextKey]},window.onload=function(){o&&o(),e.refreshAll()},r.requestAnimationFrame=function(e){(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||t).call(window,e)},r.Context=e}(),function(){"use strict";function t(t,e){return t.triggerPoint-e.triggerPoint}function e(t,e){return e.triggerPoint-t.triggerPoint}function n(t){this.name=t.name,this.axis=t.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.clearTriggerQueues(),i[this.axis][this.name]=this}var i={vertical:{},horizontal:{}},r=window.Waypoint;n.prototype.add=function(t){this.waypoints.push(t)},n.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}},n.prototype.flushTriggers=function(){for(var n in this.triggerQueues){var i=this.triggerQueues[n],r="up"===n||"left"===n;i.sort(r?e:t);for(var o=0,s=i.length;s>o;o+=1){var a=i[o];(a.options.continuous||o===i.length-1)&&a.trigger([n])}}this.clearTriggerQueues()},n.prototype.next=function(e){this.waypoints.sort(t);var n=r.Adapter.inArray(e,this.waypoints);return n===this.waypoints.length-1?null:this.waypoints[n+1]},n.prototype.previous=function(e){this.waypoints.sort(t);var n=r.Adapter.inArray(e,this.waypoints);return n?this.waypoints[n-1]:null},n.prototype.queueTrigger=function(t,e){this.triggerQueues[e].push(t)},n.prototype.remove=function(t){var e=r.Adapter.inArray(t,this.waypoints);e>-1&&this.waypoints.splice(e,1)},n.prototype.first=function(){return this.waypoints[0]},n.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},n.findOrCreate=function(t){return i[t.axis][t.name]||new n(t)},r.Group=n}(),function(){"use strict";function t(t){this.$element=e(t)}var e=window.jQuery,n=window.Waypoint;e.each(["innerHeight","innerWidth","off","offset","on","outerHeight","outerWidth","scrollLeft","scrollTop"],function(e,n){t.prototype[n]=function(){var t=Array.prototype.slice.call(arguments);return this.$element[n].apply(this.$element,t)}}),e.each(["extend","inArray","isEmptyObject"],function(n,i){t[i]=e[i]}),n.adapters.push({name:"jquery",Adapter:t}),n.Adapter=t}(),function(){"use strict";function t(t){return function(){var n=[],i=arguments[0];return t.isFunction(arguments[0])&&((i=t.extend({},arguments[1])).handler=arguments[0]),this.each(function(){var r=t.extend({},i,{element:this});"string"==typeof r.context&&(r.context=t(this).closest(r.context)[0]),n.push(new e(r))}),n}}var e=window.Waypoint;window.jQuery&&(window.jQuery.fn.waypoint=t(window.jQuery)),window.Zepto&&(window.Zepto.fn.waypoint=t(window.Zepto))}(),function(){"use strict";function t(i){this.options=e.extend({},n.defaults,t.defaults,i),this.element=this.options.element,this.$element=e(this.element),this.createWrapper(),this.createWaypoint()}var e=window.jQuery,n=window.Waypoint;t.prototype.createWaypoint=function(){var t=this.options.handler;this.waypoint=new n(e.extend({},this.options,{element:this.wrapper,handler:e.proxy(function(e){var n=this.options.direction.indexOf(e)>-1,i=n?this.$element.outerHeight(!0):"";this.$wrapper.height(i),this.$element.toggleClass(this.options.stuckClass,n),t&&t.call(this,e)},this)}))},t.prototype.createWrapper=function(){this.options.wrapper&&this.$element.wrap(this.options.wrapper),this.$wrapper=this.$element.parent(),this.wrapper=this.$wrapper[0]},t.prototype.destroy=function(){this.$element.parent()[0]===this.wrapper&&(this.waypoint.destroy(),this.$element.removeClass(this.options.stuckClass),this.options.wrapper&&this.$element.unwrap())},t.defaults={wrapper:'
',stuckClass:"stuck",direction:"down right"},n.Sticky=t}(),function(){"use strict";function t(){}function e(t){this.options=n.Adapter.extend({},e.defaults,t),this.axis=this.options.horizontal?"horizontal":"vertical",this.waypoints=[],this.element=this.options.element,this.createWaypoints()}var n=window.Waypoint;e.prototype.createWaypoints=function(){for(var t={vertical:[{down:"enter",up:"exited",offset:"100%"},{down:"entered",up:"exit",offset:"bottom-in-view"},{down:"exit",up:"entered",offset:0},{down:"exited",up:"enter",offset:function(){return-this.adapter.outerHeight()}}],horizontal:[{right:"enter",left:"exited",offset:"100%"},{right:"entered",left:"exit",offset:"right-in-view"},{right:"exit",left:"entered",offset:0},{right:"exited",left:"enter",offset:function(){return-this.adapter.outerWidth()}}]},e=0,n=t[this.axis].length;n>e;e++){var i=t[this.axis][e];this.createWaypoint(i)}},e.prototype.createWaypoint=function(t){var e=this;this.waypoints.push(new n({context:this.options.context,element:this.options.element,enabled:this.options.enabled,handler:function(t){return function(n){e.options[t[n]].call(e,n)}}(t),offset:t.offset,horizontal:this.options.horizontal}))},e.prototype.destroy=function(){for(var t=0,e=this.waypoints.length;e>t;t++)this.waypoints[t].destroy();this.waypoints=[]},e.prototype.disable=function(){for(var t=0,e=this.waypoints.length;e>t;t++)this.waypoints[t].disable()},e.prototype.enable=function(){for(var t=0,e=this.waypoints.length;e>t;t++)this.waypoints[t].enable()},e.defaults={context:window,enabled:!0,enter:t,entered:t,exit:t,exited:t},n.Inview=e}(),function(t,e){"use strict";var n=function(t){if("object"!=typeof t.document)throw Error("Cookies.js requires a `window` with a `document` object");var n=function(t,e,i){return 1===arguments.length?n.get(t):n.set(t,e,i)};return n._document=t.document,n._cacheKeyPrefix="cookey.",n._maxExpireDate=new Date("Fri, 31 Dec 9999 23:59:59 UTC"),n.defaults={path:"/",secure:!1},n.get=function(t){return n._cachedDocumentCookie!==n._document.cookie&&n._renewCache(),(t=n._cache[n._cacheKeyPrefix+t])===e?e:decodeURIComponent(t)},n.set=function(t,i,r){return(r=n._getExtendedOptions(r)).expires=n._getExpiresDate(i===e?-1:r.expires),n._document.cookie=n._generateCookieString(t,i,r),n},n.expire=function(t,i){return n.set(t,e,i)},n._getExtendedOptions=function(t){return{path:t&&t.path||n.defaults.path,domain:t&&t.domain||n.defaults.domain,expires:t&&t.expires||n.defaults.expires,secure:t&&t.secure!==e?t.secure:n.defaults.secure}},n._isValidDate=function(t){return"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(t.getTime())},n._getExpiresDate=function(t,e){if(e=e||new Date,"number"==typeof t?t=Infinity===t?n._maxExpireDate:new Date(e.getTime()+1e3*t):"string"==typeof t&&(t=new Date(t)),t&&!n._isValidDate(t))throw Error("`expires` parameter cannot be converted to a valid Date instance");return t},n._generateCookieString=function(t,e,n){return t=(t=(t=t.replace(/[^#$&+\^`|]/g,encodeURIComponent)).replace(/\(/g,"%28").replace(/\)/g,"%29"))+"="+(e=(e+"").replace(/[^!#$&-+\--:<-\[\]-~]/g,encodeURIComponent))+((n=n||{}).path?";path="+n.path:""),t+=n.domain?";domain="+n.domain:"",(t+=n.expires?";expires="+n.expires.toUTCString():"")+(n.secure?";secure":"")},n._getCacheFromString=function(t){var i={};t=t?t.split("; "):[];for(var r=0;r(i=t.indexOf("="))?t.length:i,r=t.substr(0,i);try{n=decodeURIComponent(r)}catch(e){console&&"function"==typeof console.error&&console.error('Could not decode cookie with key "'+r+'"',e)}return{key:n,value:t.substr(i+1)}},n._renewCache=function(){n._cache=n._getCacheFromString(n._document.cookie),n._cachedDocumentCookie=n._document.cookie},n._areEnabled=function(){var t="1"===n.set("cookies.js",1).get("cookies.js");return n.expire("cookies.js"),t},n.enabled=n._areEnabled(),n},i="object"==typeof t.document?n(t):n;"function"==typeof define&&define.amd?define(function(){return i}):"object"==typeof exports?("object"==typeof module&&"object"==typeof module.exports&&(exports=module.exports=i),exports.Cookies=i):t.Cookies=i}("undefined"==typeof window?this:window),function(t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"undefined"!=typeof window&&(window.KonamiCode=t())}(function(){var t={A:65,B:66,UP:38,DOWN:40,LEFT:37,RIGHT:39},e=[t.UP,t.UP,t.DOWN,t.DOWN,t.LEFT,t.RIGHT,t.LEFT,t.RIGHT,t.B,t.A].join(""),n=function(){return this.init.apply(this,arguments)};return n.prototype={constructor:n,init:function(){this._delay=500,this._callbacks=[],this._timeout=null;var t="",n=this,i=function(i){try{clearTimeout(n._timeout)}catch(r){}(t=""+(t+i.keyCode))===e&&n._dispatch("konami-code"),n._timeout=setTimeout(function(){clearTimeout(n._timeout),t=""},n._delay)};document.addEventListener?document.addEventListener("keydown",i,!1):document.attachEvent&&document.attachEvent("onkeydown",i)},listen:function(t){return"function"==typeof t&&this._callbacks.push(t),this},_dispatch:function(t){for(var e=this._callbacks.length;e--;)this._callbacks[e].call(this,t)}},n}),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t(require("jquery")):t(jQuery)}(function(t){"use strict";function e(){var t=document.createElement("input");return t.setAttribute("type","range"),"text"!==t.type}function n(t,e){var n=Array.prototype.slice.call(arguments,2);return setTimeout(function(){return t.apply(null,n)},e)}function i(t,e){return e=e||100,function(){if(!t.debouncing){var n=Array.prototype.slice.apply(arguments);t.lastReturnVal=t.apply(window,n),t.debouncing=!0}return clearTimeout(t.debounceTimeout),t.debounceTimeout=setTimeout(function(){t.debouncing=!1},e),t.lastReturnVal}}function r(t){return t&&(0===t.offsetWidth||0===t.offsetHeight||!1===t.open)}function o(t){for(var e=[],n=t.parentNode;r(n);)e.push(n),n=n.parentNode;return e}function s(t,e){function n(t){void 0!==t.open&&(t.open=!t.open)}var i=o(t),r=i.length,s=[],a=t[e];if(r){for(var l=0;l'),this.$handle=t('
'),this.$range=t('
').insertAfter(this.$element).prepend(this.$fill,this.$handle),this.$element.css({position:"absolute",width:"1px",height:"1px",overflow:"hidden",opacity:"0"}),this.handleDown=t.proxy(this.handleDown,this),this.handleMove=t.proxy(this.handleMove,this),this.handleEnd=t.proxy(this.handleEnd,this),this.init();var o=this;this.$window.on("resize."+this.identifier,i(function(){n(function(){o.update(!1,!1)},300)},20)),this.$document.on(this.startEvent,"#"+this.identifier+":not(."+this.options.disabledClass+")",this.handleDown),this.$element.on("change."+this.identifier,function(t,e){if(!e||e.origin!==o.identifier){var n=t.target.value,i=o.getPositionFromValue(n);o.setPosition(i)}})}Number.isNaN=Number.isNaN||function(t){return"number"==typeof t&&t!=t};var u="rangeslider",h=0,p=e(),f={polyfill:!0,orientation:"horizontal",rangeClass:"rangeslider",disabledClass:"rangeslider--disabled",activeClass:"rangeslider--active",horizontalClass:"rangeslider--horizontal",verticalClass:"rangeslider--vertical",fillClass:"rangeslider__fill",handleClass:"rangeslider__handle",startEvent:["mousedown","touchstart","pointerdown"],moveEvent:["mousemove","touchmove","pointermove"],endEvent:["mouseup","touchend","pointerup"]},d={orientation:{horizontal:{dimension:"width",direction:"left",directionStyle:"left",coordinate:"x"},vertical:{dimension:"height",direction:"top",directionStyle:"bottom",coordinate:"y"}}};return c.prototype.init=function(){this.update(!0,!1),this.onInit&&"function"==typeof this.onInit&&this.onInit()},c.prototype.update=function(t,e){(t=t||!1)&&(this.min=a(this.$element[0].getAttribute("min"),0),this.max=a(this.$element[0].getAttribute("max"),100),this.value=a(this.$element[0].value,Math.round(this.min+(this.max-this.min)/2)),this.step=a(this.$element[0].getAttribute("step"),1)),this.handleDimension=s(this.$handle[0],"offset"+l(this.DIMENSION)),this.rangeDimension=s(this.$range[0],"offset"+l(this.DIMENSION)),this.maxHandlePos=this.rangeDimension-this.handleDimension,this.grabPos=this.handleDimension/2,this.position=this.getPositionFromValue(this.value),this.$element[0].disabled?this.$range.addClass(this.options.disabledClass):this.$range.removeClass(this.options.disabledClass),this.setPosition(this.position,e)},c.prototype.handleDown=function(t){if(t.preventDefault(),!(t.button&&0!==t.button||(this.$document.on(this.moveEvent,this.handleMove),this.$document.on(this.endEvent,this.handleEnd),this.$range.addClass(this.options.activeClass),(" "+t.target.className+" ").replace(/[\n\t]/g," ").indexOf(this.options.handleClass)>-1))){var e=this.getRelativePosition(t),n=this.$range[0].getBoundingClientRect()[this.DIRECTION],i=this.getPositionFromNode(this.$handle[0])-n,r="vertical"===this.orientation?this.maxHandlePos-(e-this.grabPos):e-this.grabPos;this.setPosition(r),e>=i&&en?n:t},c.prototype.setPosition=function(t,e){var n,i;void 0===e&&(e=!0),n=this.getValueFromPosition(this.cap(t,0,this.maxHandlePos)),i=this.getPositionFromValue(n),this.$fill[0].style[this.DIMENSION]=i+this.grabPos+"px",this.$handle[0].style[this.DIRECTION_STYLE]=i+"px",this.setValue(n),this.position=i,this.value=n,e&&this.onSlide&&"function"==typeof this.onSlide&&this.onSlide(i,n)},c.prototype.getPositionFromNode=function(t){for(var e=0;null!==t;)e+=t.offsetLeft,t=t.offsetParent;return e},c.prototype.getRelativePosition=function(t){var e=l(this.COORDINATE),n=this.$range[0].getBoundingClientRect()[this.DIRECTION],i=0;return void 0!==t.originalEvent["client"+e]?i=t.originalEvent["client"+e]:t.originalEvent.touches&&t.originalEvent.touches[0]&&void 0!==t.originalEvent.touches[0]["client"+e]?i=t.originalEvent.touches[0]["client"+e]:t.currentPoint&&void 0!==t.currentPoint[this.COORDINATE]&&(i=t.currentPoint[this.COORDINATE]),i-n},c.prototype.getPositionFromValue=function(t){var e;return e=(t-this.min)/(this.max-this.min),Number.isNaN(e)?0:e*this.maxHandlePos},c.prototype.getValueFromPosition=function(t){var e,n;return e=t/(this.maxHandlePos||1),n=this.step*Math.round(e*(this.max-this.min)/this.step)+this.min,Number(n.toFixed(this.toFixed))},c.prototype.setValue=function(t){t===this.value&&""!==this.$element[0].value||this.$element.val(t).trigger("input",{origin:this.identifier})},c.prototype.destroy=function(){this.$document.off("."+this.identifier),this.$window.off("."+this.identifier),this.$element.off("."+this.identifier).removeAttr("style").removeData("plugin_"+u),this.$range&&this.$range.length&&this.$range[0].parentNode.removeChild(this.$range[0])},t.fn[u]=function(e){var n=Array.prototype.slice.call(arguments,1);return this.each(function(){var i=t(this),r=i.data("plugin_"+u);r||i.data("plugin_"+u,r=new c(this,e)),"string"==typeof e&&r[e].apply(r,n)})},"rangeslider.js is available in jQuery context e.g $(selector).rangeslider(options);"}),function(){var t=function(){this.$search=$("#app-directory-search"),this.$apps=$("div.app-directory-app"),this.$categorySelectors=$("a.app-directory-category-selector"),this.$noResults=$("div.app-directory-no-results"),this.$search.on("keyup",$.proxy(this._onSearch,this)),this.$categorySelectors.on("click",$.proxy(this._onSelectCategory,this)),$("#app-directory-toggler").on("click",function(){$("#app-directory-toggled").toggle()})};t.prototype._onSearch=function(){var t=this.$search.val().toLowerCase();this._setCategory("all"),this.$apps.each(function(e,n){var i=$(n);i[i.text().toLowerCase().indexOf(t)>-1?"addClass":"removeClass"]("app-directory-app-visible")}),this.$noResults[this.$apps.filter(":visible").length?"hide":"show"]()},t.prototype._onSelectCategory=function(t){t.preventDefault();var e=$(t.target).data("category");this._setCategory(e),this.$search.val(""),$("#app-directory-toggled").hide()},t.prototype._setCategory=function(t){this.$categorySelectors.removeClass("app-directory-category-selector-active").filter('[data-category="'+t+'"]').addClass("app-directory-category-selector-active"),"all"===t?this.$apps.addClass("app-directory-app-visible"):this.$apps.removeClass("app-directory-app-visible").filter(".app-directory-category-"+t).addClass("app-directory-app-visible")},window.AppDirectory=t}(),function(){var t=function(){this.$search=$("#resource-center-search"),this.$apps=$("div.resource-center-app"), this.$categories=$("div.resource-center-category"),this.$categorySelectors=$("a.resource-center-category-selector"),this.$noResults=$("div.resource-center-no-results"),this.$search.on("keyup",$.proxy(this._onSearch,this)),this.$categorySelectors.on("click",$.proxy(this._onSelectCategory,this)),$("#resource-center-toggler").on("click",function(){$("#resource-center-toggled").toggle()})};t.prototype._onSearch=function(){var t=this.$search.val().toLowerCase();this._setCategory("all"),this.$apps.each(function(e,n){var i=$(n);i[i.text().toLowerCase().indexOf(t)>-1?"addClass":"removeClass"]("resource-center-app-visible")}),this.$categories.each(function(e,n){var i=$(n);i[i.text().toLowerCase().indexOf(t)>-1?"addClass":"removeClass"]("resource-center-category-visible")}),this.$noResults[this.$apps.filter(":visible").length?"hide":"show"]()},t.prototype._onSelectCategory=function(t){t.preventDefault();var e=$(t.target).data("category");this._setCategory(e),this.$search.val(""),$("#resource-center-toggled").hide()},t.prototype._setCategory=function(t){this.$categorySelectors.removeClass("resource-center-category-selector-active").filter('[data-category="'+t+'"]').addClass("resource-center-category-selector-active"),"all"===t?(this.$apps.addClass("resource-center-app-visible"),this.$categories.addClass("resource-center-category-visible")):(this.$apps.removeClass("resource-center-app-visible").filter(".resource-center-category-"+t).addClass("resource-center-app-visible"),this.$categories.removeClass("resource-center-category-visible").filter(".resource-center-category-"+t).addClass("resource-center-category-visible"))},window.ResourceCenter=t}();const SCREEN_SMALL=768;!function(){var t=function(){this.$planTabs=$("#plan-tabs a"),this.$pricingContent=$("#pricing-content"),this.$pricingHeader=$(".pricing-header"),this.$pricingFaq=$("#pricing-faq"),this.$pricingContainer=$("#pricing-container"),this.$featureComparisonToggle=$("#full-features-toggle"),this.$featureComparison=$("#full-feature-comparison"),this.$annualToggle=$("#annual-toggle"),this.$annualToggleMobile=$("#annual-toggle-mobile"),this.$trialButtons=$(".start-trial-button"),this.$planTabs.on("click",$.proxy(this.onSelectTab,this)),this.$featureComparisonToggle.on("click",$.proxy(this.onToggleFeatures,this)),this.$annualToggle.on("change",this.onToggleAnnual.bind(this)),this.$annualToggleMobile.on("change",this.onToggleAnnual.bind(this)),this.prevWidth=$(window).width(),$(window).resize(this.onResize.bind(this)),this.onLoad()};t.prototype.onResize=function(){this.prevWidth>=SCREEN_SMALL&&$(window).width()=SCREEN_SMALL&&$("#hide").is(":hidden")&&this.flipFeatureToggle(),this.prevWidth=$(window).width()},t.prototype.onToggleAnnual=function(t){t.preventDefault(),$(".pricing-monthly").toggleClass("hidden"),$(".pricing-annually").toggleClass("hidden");const e=$(t.currentTarget).prop("checked");$(".annual-toggle-checkbox").prop("checked",e),this.$trialButtons.prop("href",function(t,n){const i=e?"annually":"monthly";return n.replace(/&period=[^&]+/i,"&period="+i)})},t.prototype.onSelectTab=function(t){t.preventDefault();var e=$(t.target).data("tab");this.$pricingContent.find("."+e).removeClass("hidden-xs").addClass("col-xs-4"),this.$pricingContent.find(".pricing-tab").not("."+e).addClass("hidden-xs"),this.$pricingHeader.find("."+e).removeClass("hidden-xs"),this.$pricingHeader.find(".pricing-tab").not("."+e).addClass("hidden-xs")},t.prototype.flipFeatureToggle=function(){$("#show").toggleClass("hidden").toggleClass("shown"),$("#hide").toggleClass("hidden").toggleClass("shown")},t.prototype.onToggleFeatures=function(t){t.preventDefault(),this.flipFeatureToggle(),this.$featureComparison.toggle(),this.$featureComparison.is(":hidden")?Waypoint.destroyAll():this.toggleWaypoints()},t.prototype.onLoad=function(){this.$featureComparisonToggle.is(":hidden")?(this.$featureComparison.show(),this.toggleWaypoints()):this.$featureComparison.toggle()},t.prototype.toggleWaypoints=function(){if(this.$pricingHeader.length&&new Waypoint.Sticky({element:this.$pricingHeader[0],offset:38+$("#header-navigation").outerHeight(!0)}),this.$pricingFaq.length&&this.$pricingContainer.length){var t=this;new Waypoint({element:this.$pricingFaq,handler:function(e){var n=t.$pricingHeader;"down"===e?(n.removeClass("stuck").addClass("full-width").parent().addClass("bottom-stuck"),t.$pricingContainer.addClass("position-relative")):(n.addClass("stuck").removeClass("full-width").parent().removeClass("bottom-stuck"),t.$pricingContainer.removeClass("position-relative"))},offset:38+$("#header-navigation").outerHeight(!0)+this.$pricingHeader.outerHeight(!0)})}},window.RecruiterPlans=t}(),function(){var t=function(){$("li.dropdown-nav-item").hover(function(){var t=$($(".section .container")[0]),e=(t.outerWidth(!0)-t.outerWidth())/2,n=$(this).find("ul.menu-list"),i=$(n).offset().left+$(n).width()+e+15,r=$(window).width();if(r
')})}},t.prototype.getYoutubeId=function(t){return/(?:youtube\.com\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?\/ ]{11})/i.exec(t)[1]},t.prototype.onStateChange=function(t){0===t.data&&(this.$youtubeLightbox.fadeOut(400),this.$youtubeLightbox.find("iframe").remove(),this.$youtubeLightbox.find(".video-wrapper").append('
'))},t.prototype.createLightbox=function(){var t=this;$("body").on("click.YoutubeLightbox","a.lightbox",function(e){e.preventDefault();var n=$(this).data("url");t.createYoutubePlayer(n),$("#youtube-lightbox").fadeIn(400)})},window.HomeVideo=t}(),function(){var t=function(){this.alliances=document.querySelectorAll(".alliance-logo"),this.categorySelectors=document.querySelectorAll(".alliance-category-selector");var t=this;this.categorySelectors.forEach(function(e){e.addEventListener("click",t.onSelectCategory.bind(t))})};t.prototype.onSelectCategory=function(t){t.preventDefault();var e=t.target.getAttribute("data-category");this.setCategory(e)},t.prototype.setCategory=function(t){this.categorySelectors.forEach(function(t){t.classList.remove("active")}),Array.prototype.filter.call(this.categorySelectors,function(e){return e.matches('[data-category="'+t+'"]')}).forEach(function(t){t.classList.add("active")}),this.alliances.forEach(function(t){t.classList.remove("visible")}),Array.prototype.filter.call(this.alliances,function(e){return e.matches(".alliance-"+t)}).forEach(function(t){t.classList.add("visible")})},window.IndustryAlliances=t}(),function(){var t=function(){this.$feature=$("#typeit"),this.index=0,this.features=["sourcing.","communication.","workflow.","recruiting."],this.$feature.length&&this.onLoad()};t.prototype.onLoad=function(){var t=this;this.$feature.typeIt({lifeLike:!1,speed:50,deleteSpeed:50}).tiType(t.features[t.index]).tiPause(2500).tiDelete(t.features[t.index].length);var e=50*(this.features[this.index].length+2);setTimeout(function(){t.index+10)}).triggerHandler("scroll"),setTimeout(i,1)}),function(){if(window.Cookies){var t="cats-www-referrer",e=document.referrer,n=".catsone.com",i=new Date;e===window.location.href&&(e=""),i.setDate(i.getDate()+365),e&&!Cookies.get(t)&&Cookies.set(t,e,{domain:n,expires:i})}}(),window.addTake20Pormo=function(){if(window.Cookies){var t="cats-take-20",e=1,n=".catsone.com",i=new Date;e===window.location.href&&(e=""),i.setDate(i.getDate()+365),e&&!Cookies.get(t)&&Cookies.set(t,e,{domain:n,expires:i})}},function(){function t(){$("body").append(e),olark&&olark("api.box.hide")}var e='
';(new KonamiCode).listen(t)}(),function(){var t=function(){this.$form=$("#pricing-form"),$.each(this.$form.find("input, textarea"),function(){$(this).val("")}),this.$submitButton=$("#submit-pricing-form"),this.invalidFields=[],this.$submitButton.on("click",$.proxy(this._onSubmit,this)),$("#pricing-modal").on("shown.bs.modal",function(){$("#first-name").focus()})};t.prototype._onSubmit=function(t){t.preventDefault(),$.each(this.$form.find("input, textarea"),function(){$(this).parent().removeClass("has-error"),$(this).parent().siblings(".control-label").removeClass("has-error")});for(var e="https://app.catsone.com/marketing/request-pricing",n=this.$form.serialize(),i=this.$form.serializeArray(),r={},o=0;ot.ok?t.json():($("#pricing-modal").modal("hide"),void $("#error-modal").modal("show"))).then(t=>{t&&($("#pricing-modal").modal("hide"),$("#success-modal").modal("show"))})},t.prototype._validate=function(){for(var t=this.$form.find("input, textarea"),e=0;e