snipe-it/public/js/vendor.js
Wes Hulette 1742867df1 Removed inline signature.css
Added to webpack
2018-10-01 08:20:31 -04:00

19 lines
551 KiB
JavaScript

function _init(){"use strict";$.AdminLTE.layout={activate:function(){var t=this;t.fix(),t.fixSidebar(),$(window,".wrapper").resize(function(){t.fix(),t.fixSidebar()})},fix:function(){var t=$(".main-header").outerHeight()+$(".main-footer").outerHeight(),e=$(window).height(),i=$(".sidebar").height();if($("body").hasClass("fixed"))$(".content-wrapper, .right-side").css("min-height",e-$(".main-footer").outerHeight());else{var n;e>=i?($(".content-wrapper, .right-side").css("min-height",e-t),n=e-t):($(".content-wrapper, .right-side").css("min-height",i),n=i);var o=$($.AdminLTE.options.controlSidebarOptions.selector);void 0!==o&&o.height()>n&&$(".content-wrapper, .right-side").css("min-height",o.height())}},fixSidebar:function(){if(!$("body").hasClass("fixed"))return void(void 0!==$.fn.slimScroll&&$(".sidebar").slimScroll({destroy:!0}).height("auto"));void 0===$.fn.slimScroll&&window.console&&window.console.error("Error: the fixed layout requires the slimscroll plugin!"),$.AdminLTE.options.sidebarSlimScroll&&void 0!==$.fn.slimScroll&&($(".sidebar").slimScroll({destroy:!0}).height("auto"),$(".sidebar").slimscroll({height:$(window).height()-$(".main-header").height()+"px",color:"rgba(0,0,0,0.2)",size:"3px"}))}},$.AdminLTE.pushMenu={activate:function(t){var e=$.AdminLTE.options.screenSizes;$(t).on("click",function(t){t.preventDefault(),$(window).width()>e.sm-1?$("body").hasClass("sidebar-collapse")?$("body").removeClass("sidebar-collapse").trigger("expanded.pushMenu"):$("body").addClass("sidebar-collapse").trigger("collapsed.pushMenu"):$("body").hasClass("sidebar-open")?$("body").removeClass("sidebar-open").removeClass("sidebar-collapse").trigger("collapsed.pushMenu"):$("body").addClass("sidebar-open").trigger("expanded.pushMenu")}),$(".content-wrapper").click(function(){$(window).width()<=e.sm-1&&$("body").hasClass("sidebar-open")&&$("body").removeClass("sidebar-open")}),($.AdminLTE.options.sidebarExpandOnHover||$("body").hasClass("fixed")&&$("body").hasClass("sidebar-mini"))&&this.expandOnHover()},expandOnHover:function(){var t=this,e=$.AdminLTE.options.screenSizes.sm-1;$(".main-sidebar").hover(function(){$("body").hasClass("sidebar-mini")&&$("body").hasClass("sidebar-collapse")&&$(window).width()>e&&t.expand()},function(){$("body").hasClass("sidebar-mini")&&$("body").hasClass("sidebar-expanded-on-hover")&&$(window).width()>e&&t.collapse()})},expand:function(){$("body").removeClass("sidebar-collapse").addClass("sidebar-expanded-on-hover")},collapse:function(){$("body").hasClass("sidebar-expanded-on-hover")&&$("body").removeClass("sidebar-expanded-on-hover").addClass("sidebar-collapse")}},$.AdminLTE.tree=function(t){var e=this,i=$.AdminLTE.options.animationSpeed;$(document).on("click",t+" li a",function(t){var n=$(this),o=n.next();if(o.is(".treeview-menu")&&o.is(":visible"))o.slideUp(i,function(){o.removeClass("menu-open")}),o.parent("li").removeClass("active");else if(o.is(".treeview-menu")&&!o.is(":visible")){var s=n.parents("ul").first(),a=s.find("ul:visible").slideUp(i);a.removeClass("menu-open");var r=n.parent("li");o.slideDown(i,function(){o.addClass("menu-open"),s.find("li.active").removeClass("active"),r.addClass("active"),e.layout.fix()})}o.is(".treeview-menu")&&t.preventDefault()})},$.AdminLTE.controlSidebar={activate:function(){var t=this,e=$.AdminLTE.options.controlSidebarOptions,i=$(e.selector);$(e.toggleBtnSelector).on("click",function(n){n.preventDefault(),i.hasClass("control-sidebar-open")||$("body").hasClass("control-sidebar-open")?t.close(i,e.slide):t.open(i,e.slide)});var n=$(".control-sidebar-bg");t._fix(n),$("body").hasClass("fixed")?t._fixForFixed(i):$(".content-wrapper, .right-side").height()<i.height()&&t._fixForContent(i)},open:function(t,e){e?t.addClass("control-sidebar-open"):$("body").addClass("control-sidebar-open")},close:function(t,e){e?t.removeClass("control-sidebar-open"):$("body").removeClass("control-sidebar-open")},_fix:function(t){var e=this;$("body").hasClass("layout-boxed")?(t.css("position","absolute"),t.height($(".wrapper").height()),$(window).resize(function(){e._fix(t)})):t.css({position:"fixed",height:"auto"})},_fixForFixed:function(t){t.css({position:"fixed","max-height":"100%",overflow:"auto","padding-bottom":"50px"})},_fixForContent:function(t){$(".content-wrapper, .right-side").css("min-height",t.height())}},$.AdminLTE.boxWidget={selectors:$.AdminLTE.options.boxWidgetOptions.boxWidgetSelectors,icons:$.AdminLTE.options.boxWidgetOptions.boxWidgetIcons,animationSpeed:$.AdminLTE.options.animationSpeed,activate:function(t){var e=this;t||(t=document),$(t).on("click",e.selectors.collapse,function(t){t.preventDefault(),e.collapse($(this))}),$(t).on("click",e.selectors.remove,function(t){t.preventDefault(),e.remove($(this))})},collapse:function(t){var e=this,i=t.parents(".box").first(),n=i.find("> .box-body, > .box-footer, > form >.box-body, > form > .box-footer");i.hasClass("collapsed-box")?(t.children(":first").removeClass(e.icons.open).addClass(e.icons.collapse),n.slideDown(e.animationSpeed,function(){i.removeClass("collapsed-box")})):(t.children(":first").removeClass(e.icons.collapse).addClass(e.icons.open),n.slideUp(e.animationSpeed,function(){i.addClass("collapsed-box")}))},remove:function(t){t.parents(".box").first().slideUp(this.animationSpeed)}}}if("undefined"==typeof jQuery)throw new Error("AdminLTE requires jQuery");if(function(t){"use strict";function e(e){return this.each(function(){var o=t(this),a=o.data(i);if(!a){var r=t.extend({},n,o.data(),"object"==typeof e&&e);o.data(i,a=new s(o,r))}if("string"==typeof a){if(void 0===a[e])throw new Error("No method named "+e);a[e]()}})}var i="lte.boxrefresh",n={source:"",params:{},trigger:".refresh-btn",content:".box-body",loadInContent:!0,responseType:"",overlayTemplate:'<div class="overlay"><div class="fa fa-refresh fa-spin"></div></div>',onLoadStart:function(){},onLoadDone:function(t){return t}},o={data:'[data-widget="box-refresh"]'},s=function(e,i){if(this.element=e,this.options=i,this.$overlay=t(i.overlay),""===i.source)throw new Error("Source url was not defined. Please specify a url in your BoxRefresh source option.");this._setUpListeners(),this.load()};s.prototype.load=function(){this._addOverlay(),this.options.onLoadStart.call(t(this)),t.get(this.options.source,this.options.params,function(e){this.options.loadInContent&&t(this.options.content).html(e),this.options.onLoadDone.call(t(this),e),this._removeOverlay()}.bind(this),""!==this.options.responseType&&this.options.responseType)},s.prototype._setUpListeners=function(){t(this.element).on("click",o.trigger,function(t){t&&t.preventDefault(),this.load()}.bind(this))},s.prototype._addOverlay=function(){t(this.element).append(this.$overlay)},s.prototype._removeOverlay=function(){t(this.element).remove(this.$overlay)};var a=t.fn.boxRefresh;t.fn.boxRefresh=e,t.fn.boxRefresh.Constructor=s,t.fn.boxRefresh.noConflict=function(){return t.fn.boxRefresh=a,this},t(window).on("load",function(){t(o.data).each(function(){e.call(t(this))})})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var o=t(this),s=o.data(i);if(!s){var a=t.extend({},n,o.data(),"object"==typeof e&&e);o.data(i,s=new r(o,a))}if("string"==typeof e){if(void 0===s[e])throw new Error("No method named "+e);s[e]()}})}var i="lte.boxwidget",n={animationSpeed:500,collapseTrigger:'[data-widget="collapse"]',removeTrigger:'[data-widget="remove"]',collapseIcon:"fa-minus",expandIcon:"fa-plus",removeIcon:"fa-times"},o={data:".box",collapsed:".collapsed-box",header:".box-header",body:".box-body",footer:".box-footer",tools:".box-tools"},s={collapsed:"collapsed-box"},a={collapsed:"collapsed.boxwidget",expanded:"expanded.boxwidget",removed:"removed.boxwidget"},r=function(t,e){this.element=t,this.options=e,this._setUpListeners()};r.prototype.toggle=function(){t(this.element).is(o.collapsed)?this.expand():this.collapse()},r.prototype.expand=function(){var e=t.Event(a.expanded),i=this.options.collapseIcon,n=this.options.expandIcon;t(this.element).removeClass(s.collapsed),t(this.element).children(o.header+", "+o.body+", "+o.footer).children(o.tools).find("."+n).removeClass(n).addClass(i),t(this.element).children(o.body+", "+o.footer).slideDown(this.options.animationSpeed,function(){t(this.element).trigger(e)}.bind(this))},r.prototype.collapse=function(){var e=t.Event(a.collapsed),i=this.options.collapseIcon,n=this.options.expandIcon;t(this.element).children(o.header+", "+o.body+", "+o.footer).children(o.tools).find("."+i).removeClass(i).addClass(n),t(this.element).children(o.body+", "+o.footer).slideUp(this.options.animationSpeed,function(){t(this.element).addClass(s.collapsed),t(this.element).trigger(e)}.bind(this))},r.prototype.remove=function(){var e=t.Event(a.removed);t(this.element).slideUp(this.options.animationSpeed,function(){t(this.element).trigger(e),t(this.element).remove()}.bind(this))},r.prototype._setUpListeners=function(){var e=this;t(this.element).on("click",this.options.collapseTrigger,function(i){return i&&i.preventDefault(),e.toggle(t(this)),!1}),t(this.element).on("click",this.options.removeTrigger,function(i){return i&&i.preventDefault(),e.remove(t(this)),!1})};var l=t.fn.boxWidget;t.fn.boxWidget=e,t.fn.boxWidget.Constructor=r,t.fn.boxWidget.noConflict=function(){return t.fn.boxWidget=l,this},t(window).on("load",function(){t(o.data).each(function(){e.call(t(this))})})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var o=t(this),s=o.data(i);if(!s){var a=t.extend({},n,o.data(),"object"==typeof e&&e);o.data(i,s=new r(o,a))}"string"==typeof e&&s.toggle()})}var i="lte.controlsidebar",n={slide:!0},o={sidebar:".control-sidebar",data:'[data-toggle="control-sidebar"]',open:".control-sidebar-open",bg:".control-sidebar-bg",wrapper:".wrapper",content:".content-wrapper",boxed:".layout-boxed"},s={open:"control-sidebar-open",fixed:"fixed"},a={collapsed:"collapsed.controlsidebar",expanded:"expanded.controlsidebar"},r=function(t,e){this.element=t,this.options=e,this.hasBindedResize=!1,this.init()};r.prototype.init=function(){t(this.element).is(o.data)||t(this).on("click",this.toggle),this.fix(),t(window).resize(function(){this.fix()}.bind(this))},r.prototype.toggle=function(e){e&&e.preventDefault(),this.fix(),t(o.sidebar).is(o.open)||t("body").is(o.open)?this.collapse():this.expand()},r.prototype.expand=function(){this.options.slide?t(o.sidebar).addClass(s.open):t("body").addClass(s.open),t(this.element).trigger(t.Event(a.expanded))},r.prototype.collapse=function(){t("body, "+o.sidebar).removeClass(s.open),t(this.element).trigger(t.Event(a.collapsed))},r.prototype.fix=function(){t("body").is(o.boxed)&&this._fixForBoxed(t(o.bg))},r.prototype._fixForBoxed=function(e){e.css({position:"absolute",height:t(o.wrapper).height()})};var l=t.fn.controlSidebar;t.fn.controlSidebar=e,t.fn.controlSidebar.Constructor=r,t.fn.controlSidebar.noConflict=function(){return t.fn.controlSidebar=l,this},t(document).on("click",o.data,function(i){i&&i.preventDefault(),e.call(t(this),"toggle")})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data(i);o||n.data(i,o=new s(n)),"string"==typeof e&&o.toggle(n)})}var i="lte.directchat",n={data:'[data-widget="chat-pane-toggle"]',box:".direct-chat"},o={open:"direct-chat-contacts-open"},s=function(t){this.element=t};s.prototype.toggle=function(t){t.parents(n.box).first().toggleClass(o.open)};var a=t.fn.directChat;t.fn.directChat=e,t.fn.directChat.Constructor=s,t.fn.directChat.noConflict=function(){return t.fn.directChat=a,this},t(document).on("click",n.data,function(i){i&&i.preventDefault(),e.call(t(this),"toggle")})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var o=t(this),s=o.data(i);if(!s){var r=t.extend({},n,o.data(),"object"==typeof e&&e);o.data(i,s=new a(r))}if("string"==typeof e){if(void 0===s[e])throw new Error("No method named "+e);s[e]()}})}var i="lte.layout",n={slimscroll:!0,resetHeight:!0},o={wrapper:".wrapper",contentWrapper:".content-wrapper",layoutBoxed:".layout-boxed",mainFooter:".main-footer",mainHeader:".main-header",sidebar:".sidebar",controlSidebar:".control-sidebar",fixed:".fixed",sidebarMenu:".sidebar-menu",logo:".main-header .logo"},s={fixed:"fixed",holdTransition:"hold-transition"},a=function(t){this.options=t,this.bindedResize=!1,this.activate()};a.prototype.activate=function(){this.fix(),this.fixSidebar(),t("body").removeClass(s.holdTransition),this.options.resetHeight&&t("body, html, "+o.wrapper).css({height:"auto","min-height":"100%"}),this.bindedResize||(t(window).resize(function(){this.fix(),this.fixSidebar(),t(o.logo+", "+o.sidebar).one("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend",function(){this.fix(),this.fixSidebar()}.bind(this))}.bind(this)),this.bindedResize=!0),t(o.sidebarMenu).on("expanded.tree",function(){this.fix(),this.fixSidebar()}.bind(this)),t(o.sidebarMenu).on("collapsed.tree",function(){this.fix(),this.fixSidebar()}.bind(this))},a.prototype.fix=function(){t(o.layoutBoxed+" > "+o.wrapper).css("overflow","hidden");var e=t(o.mainFooter).outerHeight()||0,i=t(o.mainHeader).outerHeight()||0,n=i+e,a=t(window).height(),r=t(o.sidebar).height()||0;if(t("body").hasClass(s.fixed))t(o.contentWrapper).css("min-height",a-e);else{var l;a>=r?(t(o.contentWrapper).css("min-height",a-n),l=a-n):(t(o.contentWrapper).css("min-height",r),l=r);var h=t(o.controlSidebar);void 0!==h&&h.height()>l&&t(o.contentWrapper).css("min-height",h.height())}},a.prototype.fixSidebar=function(){if(!t("body").hasClass(s.fixed))return void(void 0!==t.fn.slimScroll&&t(o.sidebar).slimScroll({destroy:!0}).height("auto"));this.options.slimscroll&&void 0!==t.fn.slimScroll&&t(o.sidebar).slimScroll({height:t(window).height()-t(o.mainHeader).height()+"px"})};var r=t.fn.layout;t.fn.layout=e,t.fn.layout.Constuctor=a,t.fn.layout.noConflict=function(){return t.fn.layout=r,this},t(window).on("load",function(){e.call(t("body"))})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var o=t(this),s=o.data(i);if(!s){var a=t.extend({},n,o.data(),"object"==typeof e&&e);o.data(i,s=new r(a))}"toggle"===e&&s.toggle()})}var i="lte.pushmenu",n={collapseScreenSize:767,expandOnHover:!1,expandTransitionDelay:200},o={collapsed:".sidebar-collapse",open:".sidebar-open",mainSidebar:".main-sidebar",contentWrapper:".content-wrapper",searchInput:".sidebar-form .form-control",button:'[data-toggle="push-menu"]',mini:".sidebar-mini",expanded:".sidebar-expanded-on-hover",layoutFixed:".fixed"},s={collapsed:"sidebar-collapse",open:"sidebar-open",mini:"sidebar-mini",expanded:"sidebar-expanded-on-hover",expandFeature:"sidebar-mini-expand-feature",layoutFixed:"fixed"},a={expanded:"expanded.pushMenu",collapsed:"collapsed.pushMenu"},r=function(t){this.options=t,this.init()};r.prototype.init=function(){(this.options.expandOnHover||t("body").is(o.mini+o.layoutFixed))&&(this.expandOnHover(),t("body").addClass(s.expandFeature)),t(o.contentWrapper).click(function(){t(window).width()<=this.options.collapseScreenSize&&t("body").hasClass(s.open)&&this.close()}.bind(this)),t(o.searchInput).click(function(t){t.stopPropagation()})},r.prototype.toggle=function(){var e=t(window).width(),i=!t("body").hasClass(s.collapsed);e<=this.options.collapseScreenSize&&(i=t("body").hasClass(s.open)),i?this.close():this.open()},r.prototype.open=function(){t(window).width()>this.options.collapseScreenSize?t("body").removeClass(s.collapsed).trigger(t.Event(a.expanded)):t("body").addClass(s.open).trigger(t.Event(a.expanded))},r.prototype.close=function(){t(window).width()>this.options.collapseScreenSize?t("body").addClass(s.collapsed).trigger(t.Event(a.collapsed)):t("body").removeClass(s.open+" "+s.collapsed).trigger(t.Event(a.collapsed))},r.prototype.expandOnHover=function(){t(o.mainSidebar).hover(function(){t("body").is(o.mini+o.collapsed)&&t(window).width()>this.options.collapseScreenSize&&this.expand()}.bind(this),function(){t("body").is(o.expanded)&&this.collapse()}.bind(this))},r.prototype.expand=function(){setTimeout(function(){t("body").removeClass(s.collapsed).addClass(s.expanded)},this.options.expandTransitionDelay)},r.prototype.collapse=function(){setTimeout(function(){t("body").removeClass(s.expanded).addClass(s.collapsed)},this.options.expandTransitionDelay)};var l=t.fn.pushMenu;t.fn.pushMenu=e,t.fn.pushMenu.Constructor=r,t.fn.pushMenu.noConflict=function(){return t.fn.pushMenu=l,this},t(document).on("click",o.button,function(i){i.preventDefault(),e.call(t(this),"toggle")}),t(window).on("load",function(){e.call(t(o.button))})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var o=t(this),s=o.data(i);if(!s){var r=t.extend({},n,o.data(),"object"==typeof e&&e);o.data(i,s=new a(o,r))}if("string"==typeof s){if(void 0===s[e])throw new Error("No method named "+e);s[e]()}})}var i="lte.todolist",n={onCheck:function(t){return t},onUnCheck:function(t){return t}},o={data:'[data-widget="todo-list"]'},s={done:"done"},a=function(t,e){this.element=t,this.options=e,this._setUpListeners()};a.prototype.toggle=function(t){if(t.parents(o.li).first().toggleClass(s.done),!t.prop("checked"))return void this.unCheck(t);this.check(t)},a.prototype.check=function(t){this.options.onCheck.call(t)},a.prototype.unCheck=function(t){this.options.onUnCheck.call(t)},a.prototype._setUpListeners=function(){var e=this;t(this.element).on("change ifChanged","input:checkbox",function(){e.toggle(t(this))})};var r=t.fn.todoList;t.fn.todoList=e,t.fn.todoList.Constructor=a,t.fn.todoList.noConflict=function(){return t.fn.todoList=r,this},t(window).on("load",function(){t(o.data).each(function(){e.call(t(this))})})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var o=t(this);if(!o.data(i)){var s=t.extend({},n,o.data(),"object"==typeof e&&e);o.data(i,new r(o,s))}})}var i="lte.tree",n={animationSpeed:500,accordion:!0,followLink:!1,trigger:".treeview a"},o={tree:".tree",treeview:".treeview",treeviewMenu:".treeview-menu",open:".menu-open, .active",li:"li",data:'[data-widget="tree"]',active:".active"},s={open:"menu-open",tree:"tree"},a={collapsed:"collapsed.tree",expanded:"expanded.tree"},r=function(e,i){this.element=e,this.options=i,t(this.element).addClass(s.tree),t(o.treeview+o.active,this.element).addClass(s.open),this._setUpListeners()};r.prototype.toggle=function(t,e){var i=t.next(o.treeviewMenu),n=t.parent(),a=n.hasClass(s.open);n.is(o.treeview)&&(this.options.followLink&&"#"!==t.attr("href")||e.preventDefault(),a?this.collapse(i,n):this.expand(i,n))},r.prototype.expand=function(e,i){var n=t.Event(a.expanded);if(this.options.accordion){var r=i.siblings(o.open),l=r.children(o.treeviewMenu);this.collapse(l,r)}i.addClass(s.open),e.slideDown(this.options.animationSpeed,function(){t(this.element).trigger(n)}.bind(this))},r.prototype.collapse=function(e,i){var n=t.Event(a.collapsed);i.removeClass(s.open),e.slideUp(this.options.animationSpeed,function(){t(this.element).trigger(n)}.bind(this))},r.prototype._setUpListeners=function(){var e=this;t(this.element).on("click",this.options.trigger,function(i){e.toggle(t(this),i)})};var l=t.fn.tree;t.fn.tree=e,t.fn.tree.Constructor=r,t.fn.tree.noConflict=function(){return t.fn.tree=l,this},t(window).on("load",function(){t(o.data).each(function(){e.call(t(this))})})}(jQuery),"undefined"==typeof jQuery)throw new Error("AdminLTE requires jQuery");$.AdminLTE={},$.AdminLTE.options={navbarMenuSlimscroll:!0,navbarMenuSlimscrollWidth:"3px",navbarMenuHeight:"200px",animationSpeed:500,sidebarToggleSelector:"[data-toggle='offcanvas']",sidebarPushMenu:!0,sidebarSlimScroll:!0,sidebarExpandOnHover:!1,enableBoxRefresh:!0,enableBSToppltip:!0,BSTooltipSelector:"[data-toggle='tooltip']",enableFastclick:!1,enableControlSidebar:!0,controlSidebarOptions:{toggleBtnSelector:"[data-toggle='control-sidebar']",selector:".control-sidebar",slide:!0},enableBoxWidget:!0,boxWidgetOptions:{boxWidgetIcons:{collapse:"fa-minus",open:"fa-plus",remove:"fa-times"},boxWidgetSelectors:{remove:'[data-widget="remove"]',collapse:'[data-widget="collapse"]'}},directChat:{enable:!0,contactToggleSelector:'[data-widget="chat-pane-toggle"]'},colors:{lightBlue:"#3c8dbc",red:"#f56954",green:"#00a65a",aqua:"#00c0ef",yellow:"#f39c12",blue:"#0073b7",navy:"#001F3F",teal:"#39CCCC",olive:"#3D9970",lime:"#01FF70",orange:"#FF851B",fuchsia:"#F012BE",purple:"#8E24AA",maroon:"#D81B60",black:"#222222",gray:"#d2d6de"},screenSizes:{xs:480,sm:768,md:992,lg:1200}},$(function(){"use strict";$("body").removeClass("hold-transition"),"undefined"!=typeof AdminLTEOptions&&$.extend(!0,$.AdminLTE.options,AdminLTEOptions);var t=$.AdminLTE.options;_init(),$.AdminLTE.layout.activate(),$.AdminLTE.tree(".sidebar"),t.enableControlSidebar&&$.AdminLTE.controlSidebar.activate(),t.navbarMenuSlimscroll&&void 0!==$.fn.slimscroll&&$(".navbar .menu").slimscroll({height:t.navbarMenuHeight,alwaysVisible:!1,size:t.navbarMenuSlimscrollWidth}).css("width","100%"),t.sidebarPushMenu&&$.AdminLTE.pushMenu.activate(t.sidebarToggleSelector),t.enableBSToppltip&&($.widget.bridge("uitooltip",$.ui.tooltip),$("body").tooltip({selector:t.BSTooltipSelector})),t.enableBoxWidget&&$.AdminLTE.boxWidget.activate(),t.enableFastclick&&"undefined"!=typeof FastClick&&FastClick.attach(document.body),t.directChat.enable&&$(document).on("click",t.directChat.contactToggleSelector,function(){$(this).parents(".direct-chat").first().toggleClass("direct-chat-contacts-open")}),$('.btn-group[data-toggle="btn-toggle"]').each(function(){var t=$(this);$(this).find(".btn").on("click",function(e){t.find(".btn.active").removeClass("active"),$(this).addClass("active"),e.preventDefault()})})}),function(t){"use strict";t.fn.boxRefresh=function(e){function i(t){t.append(s),o.onLoadStart.call(t)}function n(t){t.find(s).remove(),o.onLoadDone.call(t)}var o=t.extend({trigger:".refresh-btn",source:"",onLoadStart:function(t){return t},onLoadDone:function(t){return t}},e),s=t('<div class="overlay"><div class="fa fa-refresh fa-spin"></div></div>');return this.each(function(){if(""===o.source)return void(window.console&&window.console.log("Please specify a source first - boxRefresh()"));var e=t(this);e.find(o.trigger).first().on("click",function(t){t.preventDefault(),i(e),e.find(".box-body").load(o.source,function(){n(e)})})})}}(jQuery),function(t){"use strict";t.fn.activateBox=function(){t.AdminLTE.boxWidget.activate(this)}}(jQuery),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){function e(t){for(var e=t.css("visibility");"inherit"===e;)t=t.parent(),e=t.css("visibility");return"hidden"!==e}function i(t){for(var e,i;t.length&&t[0]!==document;){if(("absolute"===(e=t.css("position"))||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}function n(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=o(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function o(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",i,function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",i,s)}function s(){t.datepicker._isDisabledDatepicker(p.inline?p.dpDiv.parent()[0]:p.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))}function a(e,i){t.extend(e,i);for(var n in i)null==i[n]&&(e[n]=i[n]);return e}function r(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.ui=t.ui||{};var l=(t.ui.version="1.12.1",0),h=Array.prototype.slice;t.cleanData=function(e){return function(i){var n,o,s;for(s=0;null!=(o=i[s]);s++)try{n=t._data(o,"events"),n&&n.remove&&t(o).triggerHandler("remove")}catch(t){}e(i)}}(t.cleanData),t.widget=function(e,i,n){var o,s,a,r={},l=e.split(".")[0];e=e.split(".")[1];var h=l+"-"+e;return n||(n=i,i=t.Widget),t.isArray(n)&&(n=t.extend.apply(null,[{}].concat(n))),t.expr[":"][h.toLowerCase()]=function(e){return!!t.data(e,h)},t[l]=t[l]||{},o=t[l][e],s=t[l][e]=function(t,e){if(!this._createWidget)return new s(t,e);arguments.length&&this._createWidget(t,e)},t.extend(s,o,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(n,function(e,n){if(!t.isFunction(n))return void(r[e]=n);r[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function o(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,s=this._superApply;return this._super=t,this._superApply=o,e=n.apply(this,arguments),this._super=i,this._superApply=s,e}}()}),s.prototype=t.widget.extend(a,{widgetEventPrefix:o?a.widgetEventPrefix||e:e},r,{constructor:s,namespace:l,widgetName:e,widgetFullName:h}),o?(t.each(o._childConstructors,function(e,i){var n=i.prototype;t.widget(n.namespace+"."+n.widgetName,s,i._proto)}),delete o._childConstructors):i._childConstructors.push(s),t.widget.bridge(e,s),s},t.widget.extend=function(e){for(var i,n,o=h.call(arguments,1),s=0,a=o.length;s<a;s++)for(i in o[s])n=o[s][i],o[s].hasOwnProperty(i)&&void 0!==n&&(t.isPlainObject(n)?e[i]=t.isPlainObject(e[i])?t.widget.extend({},e[i],n):t.widget.extend({},n):e[i]=n);return e},t.widget.bridge=function(e,i){var n=i.prototype.widgetFullName||e;t.fn[e]=function(o){var s="string"==typeof o,a=h.call(arguments,1),r=this;return s?this.length||"instance"!==o?this.each(function(){var i,s=t.data(this,n);return"instance"===o?(r=s,!1):s?t.isFunction(s[o])&&"_"!==o.charAt(0)?(i=s[o].apply(s,a),i!==s&&void 0!==i?(r=i&&i.jquery?r.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+o+"'")}):r=void 0:(a.length&&(o=t.widget.extend.apply(null,[o].concat(a))),this.each(function(){var e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new i(o,this))})),r}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=l++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var n,o,s,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},n=e.split("."),e=n.shift(),n.length){for(o=a[e]=t.widget.extend({},this.options[e]),s=0;s<n.length-1;s++)o[n[s]]=o[n[s]]||{},o=o[n[s]];if(e=n.pop(),1===arguments.length)return void 0===o[e]?null:o[e];o[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,n,o;for(i in e)o=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&o&&o.length&&(n=t(o.get()),this._removeClass(o,i),n.addClass(this._classes({element:n,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,s){var a,r;for(r=0;r<i.length;r++)a=o.classesElementLookup[i[r]]||t(),a=t(e.add?t.unique(a.get().concat(e.element.get())):a.not(e.element).get()),o.classesElementLookup[i[r]]=a,n.push(i[r]),s&&e.classes[i[r]]&&n.push(e.classes[i[r]])}var n=[],o=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),n.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(n,o){-1!==t.inArray(e.target,o)&&(i.classesElementLookup[n]=t(o.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,n){n="boolean"==typeof n?n:i;var o="string"==typeof t||null===t,s={extra:o?e:i,keys:o?t:e,element:o?this.element:t,add:n};return s.element.toggleClass(this._classes(s),n),this},_on:function(e,i,n){var o,s=this;"boolean"!=typeof e&&(n=i,i=e,e=!1),n?(i=o=t(i),this.bindings=this.bindings.add(i)):(n=i,
i=this.element,o=this.widget()),t.each(n,function(n,a){function r(){if(e||!0!==s.options.disabled&&!t(this).hasClass("ui-state-disabled"))return("string"==typeof a?s[a]:a).apply(s,arguments)}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var l=n.match(/^([\w:-]*)\s*(.*)$/),h=l[1]+s.eventNamespace,c=l[2];c?o.on(h,c,r):i.on(h,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?n[t]:t).apply(n,arguments)}var n=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,n){var o,s,a=this.options[e];if(n=n||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],s=i.originalEvent)for(o in s)o in i||(i[o]=s[o]);return this.element.trigger(i,n),!(t.isFunction(a)&&!1===a.apply(this.element[0],[i].concat(n))||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(n,o,s){"string"==typeof o&&(o={effect:o});var a,r=o?!0===o||"number"==typeof o?i:o.effect||i:e;o=o||{},"number"==typeof o&&(o={duration:o}),a=!t.isEmptyObject(o),o.complete=s,o.delay&&n.delay(o.delay),a&&t.effects&&t.effects.effect[r]?n[e](o):r!==e&&n[r]?n[r](o.duration,o.easing,s):n.queue(function(i){t(this)[e](),s&&s.call(n[0]),i()})}});t.widget;!function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var o,s=Math.max,a=Math.abs,r=/left|center|right/,l=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==o)return o;var e,i,n=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),s=n.children()[0];return t("body").append(n),e=s.offsetWidth,n.css("overflow","scroll"),i=s.offsetWidth,e===i&&(i=n[0].clientWidth),n.remove(),o=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),n=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),o="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth;return{width:"scroll"===n||"auto"===n&&e.height<e.element[0].scrollHeight?t.position.scrollbarWidth():0,height:o?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),n=t.isWindow(i[0]),o=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:n,isDocument:o,offset:n||o?{left:0,top:0}:t(e).offset(),scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:i.outerWidth(),height:i.outerHeight()}}},t.fn.position=function(o){if(!o||!o.of)return d.apply(this,arguments);o=t.extend({},o);var u,p,f,g,m,v,b=t(o.of),_=t.position.getWithinInfo(o.within),y=t.position.getScrollInfo(_),x=(o.collision||"flip").split(" "),w={};return v=n(b),b[0].preventDefault&&(o.at="left top"),p=v.width,f=v.height,g=v.offset,m=t.extend({},g),t.each(["my","at"],function(){var t,e,i=(o[this]||"").split(" ");1===i.length&&(i=r.test(i[0])?i.concat(["center"]):l.test(i[0])?["center"].concat(i):["center","center"]),i[0]=r.test(i[0])?i[0]:"center",i[1]=l.test(i[1])?i[1]:"center",t=h.exec(i[0]),e=h.exec(i[1]),w[this]=[t?t[0]:0,e?e[0]:0],o[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]}),1===x.length&&(x[1]=x[0]),"right"===o.at[0]?m.left+=p:"center"===o.at[0]&&(m.left+=p/2),"bottom"===o.at[1]?m.top+=f:"center"===o.at[1]&&(m.top+=f/2),u=e(w.at,p,f),m.left+=u[0],m.top+=u[1],this.each(function(){var n,r,l=t(this),h=l.outerWidth(),c=l.outerHeight(),d=i(this,"marginLeft"),v=i(this,"marginTop"),k=h+d+i(this,"marginRight")+y.width,C=c+v+i(this,"marginBottom")+y.height,D=t.extend({},m),S=e(w.my,l.outerWidth(),l.outerHeight());"right"===o.my[0]?D.left-=h:"center"===o.my[0]&&(D.left-=h/2),"bottom"===o.my[1]?D.top-=c:"center"===o.my[1]&&(D.top-=c/2),D.left+=S[0],D.top+=S[1],n={marginLeft:d,marginTop:v},t.each(["left","top"],function(e,i){t.ui.position[x[e]]&&t.ui.position[x[e]][i](D,{targetWidth:p,targetHeight:f,elemWidth:h,elemHeight:c,collisionPosition:n,collisionWidth:k,collisionHeight:C,offset:[u[0]+S[0],u[1]+S[1]],my:o.my,at:o.at,within:_,elem:l})}),o.using&&(r=function(t){var e=g.left-D.left,i=e+p-h,n=g.top-D.top,r=n+f-c,u={target:{element:b,left:g.left,top:g.top,width:p,height:f},element:{element:l,left:D.left,top:D.top,width:h,height:c},horizontal:i<0?"left":e>0?"right":"center",vertical:r<0?"top":n>0?"bottom":"middle"};p<h&&a(e+i)<p&&(u.horizontal="center"),f<c&&a(n+r)<f&&(u.vertical="middle"),s(a(e),a(i))>s(a(n),a(r))?u.important="horizontal":u.important="vertical",o.using.call(this,t,u)}),l.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,n=e.within,o=n.isWindow?n.scrollLeft:n.offset.left,a=n.width,r=t.left-e.collisionPosition.marginLeft,l=o-r,h=r+e.collisionWidth-a-o;e.collisionWidth>a?l>0&&h<=0?(i=t.left+l+e.collisionWidth-a-o,t.left+=l-i):t.left=h>0&&l<=0?o:l>h?o+a-e.collisionWidth:o:l>0?t.left+=l:h>0?t.left-=h:t.left=s(t.left-r,t.left)},top:function(t,e){var i,n=e.within,o=n.isWindow?n.scrollTop:n.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,l=o-r,h=r+e.collisionHeight-a-o;e.collisionHeight>a?l>0&&h<=0?(i=t.top+l+e.collisionHeight-a-o,t.top+=l-i):t.top=h>0&&l<=0?o:l>h?o+a-e.collisionHeight:o:l>0?t.top+=l:h>0?t.top-=h:t.top=s(t.top-r,t.top)}},flip:{left:function(t,e){var i,n,o=e.within,s=o.offset.left+o.scrollLeft,r=o.width,l=o.isWindow?o.scrollLeft:o.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-l,u=h+e.collisionWidth-r-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];c<0?((i=t.left+d+p+f+e.collisionWidth-r-s)<0||i<a(c))&&(t.left+=d+p+f):u>0&&((n=t.left-e.collisionPosition.marginLeft+d+p+f-l)>0||a(n)<u)&&(t.left+=d+p+f)},top:function(t,e){var i,n,o=e.within,s=o.offset.top+o.scrollTop,r=o.height,l=o.isWindow?o.scrollTop:o.offset.top,h=t.top-e.collisionPosition.marginTop,c=h-l,u=h+e.collisionHeight-r-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];c<0?((n=t.top+p+f+g+e.collisionHeight-r-s)<0||n<a(c))&&(t.top+=p+f+g):u>0&&((i=t.top-e.collisionPosition.marginTop+p+f+g-l)>0||a(i)<u)&&(t.top+=p+f+g)}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}();var c=(t.ui.position,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,n){return!!t.data(e,n[3])}}),t.fn.extend({disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}}),"ui-effects-animated"),u=t;t.effects={effect:{}},function(t,e){function i(t,e,i){var n=c[e.type]||{};return null==t?i||!e.def?null:e.def:(t=n.floor?~~t:parseFloat(t),isNaN(t)?e.def:n.mod?(t+n.mod)%n.mod:0>t?0:n.max<t?n.max:t)}function n(e){var i=l(),n=i._rgba=[];return e=e.toLowerCase(),p(r,function(t,o){var s,a=o.re.exec(e),r=a&&o.parse(a),l=o.space||"rgba";if(r)return s=i[l](r),i[h[l].cache]=s[h[l].cache],n=i._rgba=s._rgba,!1}),n.length?("0,0,0,0"===n.join()&&t.extend(n,s.transparent),i):s[e]}function o(t,e,i){return i=(i+1)%1,6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}var s,a=/^([\-+])=\s*(\d+\.?\d*)/,r=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],l=t.Color=function(e,i,n,o){return new t.Color.fn.parse(e,i,n,o)},h={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},c={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},u=l.support={},d=t("<p>")[0],p=t.each;d.style.cssText="background-color:rgba(1,1,1,.5)",u.rgba=d.style.backgroundColor.indexOf("rgba")>-1,p(h,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototype,{parse:function(e,o,a,r){if(void 0===e)return this._rgba=[null,null,null,null],this;(e.jquery||e.nodeType)&&(e=t(e).css(o),o=void 0);var c=this,u=t.type(e),d=this._rgba=[];return void 0!==o&&(e=[e,o,a,r],u="array"),"string"===u?this.parse(n(e)||s._default):"array"===u?(p(h.rgba.props,function(t,n){d[n.idx]=i(e[n.idx],n)}),this):"object"===u?(e instanceof l?p(h,function(t,i){e[i.cache]&&(c[i.cache]=e[i.cache].slice())}):p(h,function(n,o){var s=o.cache;p(o.props,function(t,n){if(!c[s]&&o.to){if("alpha"===t||null==e[t])return;c[s]=o.to(c._rgba)}c[s][n.idx]=i(e[t],n,!0)}),c[s]&&t.inArray(null,c[s].slice(0,3))<0&&(c[s][3]=1,o.from&&(c._rgba=o.from(c[s])))}),this):void 0},is:function(t){var e=l(t),i=!0,n=this;return p(h,function(t,o){var s,a=e[o.cache];return a&&(s=n[o.cache]||o.to&&o.to(n._rgba)||[],p(o.props,function(t,e){if(null!=a[e.idx])return i=a[e.idx]===s[e.idx]})),i}),i},_space:function(){var t=[],e=this;return p(h,function(i,n){e[n.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var n=l(t),o=n._space(),s=h[o],a=0===this.alpha()?l("transparent"):this,r=a[s.cache]||s.to(a._rgba),u=r.slice();return n=n[s.cache],p(s.props,function(t,o){var s=o.idx,a=r[s],l=n[s],h=c[o.type]||{};null!==l&&(null===a?u[s]=l:(h.mod&&(l-a>h.mod/2?a+=h.mod:a-l>h.mod/2&&(a-=h.mod)),u[s]=i((l-a)*e+a,o)))}),this[o](u)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),n=i.pop(),o=l(e)._rgba;return l(t.map(i,function(t,e){return(1-n)*o[e]+n*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&e<3&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),n=i.pop();return e&&i.push(~~(255*n)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,h.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,n=t[0]/255,o=t[1]/255,s=t[2]/255,a=t[3],r=Math.max(n,o,s),l=Math.min(n,o,s),h=r-l,c=r+l,u=.5*c;return e=l===r?0:n===r?60*(o-s)/h+360:o===r?60*(s-n)/h+120:60*(n-o)/h+240,i=0===h?0:u<=.5?h/c:h/(2-c),[Math.round(e)%360,i,u,null==a?1:a]},h.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],n=t[2],s=t[3],a=n<=.5?n*(1+i):n+i-n*i,r=2*n-a;return[Math.round(255*o(r,a,e+1/3)),Math.round(255*o(r,a,e)),Math.round(255*o(r,a,e-1/3)),s]},p(h,function(e,n){var o=n.props,s=n.cache,r=n.to,h=n.from;l.fn[e]=function(e){if(r&&!this[s]&&(this[s]=r(this._rgba)),void 0===e)return this[s].slice();var n,a=t.type(e),c="array"===a||"object"===a?e:arguments,u=this[s].slice();return p(o,function(t,e){var n=c["object"===a?t:e.idx];null==n&&(n=u[e.idx]),u[e.idx]=i(n,e)}),h?(n=l(h(u)),n[s]=u,n):l(u)},p(o,function(i,n){l.fn[i]||(l.fn[i]=function(o){var s,r=t.type(o),l="alpha"===i?this._hsla?"hsla":"rgba":e,h=this[l](),c=h[n.idx];return"undefined"===r?c:("function"===r&&(o=o.call(this,c),r=t.type(o)),null==o&&n.empty?this:("string"===r&&(s=a.exec(o))&&(o=c+parseFloat(s[2])*("+"===s[1]?1:-1)),h[n.idx]=o,this[l](h)))})})}),l.hook=function(e){var i=e.split(" ");p(i,function(e,i){t.cssHooks[i]={set:function(e,o){var s,a,r="";if("transparent"!==o&&("string"!==t.type(o)||(s=n(o)))){if(o=l(s||o),!u.rgba&&1!==o._rgba[3]){for(a="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&a&&a.style;)try{r=t.css(a,"backgroundColor"),a=a.parentNode}catch(t){}o=o.blend(r&&"transparent"!==r?r:"_default")}o=o.toRgbaString()}try{e.style[i]=o}catch(t){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=l(e.elem,i),e.end=l(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},l.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),t.cssHooks.borderColor={expand:function(t){var e={};return p(["Top","Right","Bottom","Left"],function(i,n){e["border"+n+"Color"]=t}),e}},s=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(u),function(){function e(e){var i,n,o=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,s={};if(o&&o.length&&o[0]&&o[o[0]])for(n=o.length;n--;)i=o[n],"string"==typeof o[i]&&(s[t.camelCase(i)]=o[i]);else for(i in o)"string"==typeof o[i]&&(s[i]=o[i]);return s}function i(e,i){var n,s,a={};for(n in i)s=i[n],e[n]!==s&&(o[n]||!t.fx.step[n]&&isNaN(parseFloat(s))||(a[n]=s));return a}var n=["add","remove","toggle"],o={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(u.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(o,s,a,r){var l=t.speed(s,a,r);return this.queue(function(){var s,a=t(this),r=a.attr("class")||"",h=l.children?a.find("*").addBack():a;h=h.map(function(){return{el:t(this),start:e(this)}}),s=function(){t.each(n,function(t,e){o[e]&&a[e+"Class"](o[e])})},s(),h=h.map(function(){return this.end=e(this.el[0]),this.diff=i(this.start,this.end),this}),a.attr("class",r),h=h.map(function(){var e=this,i=t.Deferred(),n=t.extend({},l,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,n),i.promise()}),t.when.apply(t,h.get()).done(function(){s(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),l.complete.call(a[0])})})},t.fn.extend({addClass:function(e){return function(i,n,o,s){return n?t.effects.animateClass.call(this,{add:i},n,o,s):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,n,o,s){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},n,o,s):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(i,n,o,s,a){return"boolean"==typeof n||void 0===n?o?t.effects.animateClass.call(this,n?{add:i}:{remove:i},o,s,a):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:i},n,o,s)}}(t.fn.toggleClass),switchClass:function(e,i,n,o,s){return t.effects.animateClass.call(this,{add:i,remove:e},n,o,s)}})}(),function(){function e(e,i,n,o){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(o=i,n=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(o=n,n=i,i={}),t.isFunction(n)&&(o=n,n=null),i&&t.extend(e,i),n=n||i.duration,e.duration=t.fx.off?0:"number"==typeof n?n:n in t.fx.speeds?t.fx.speeds[n]:t.fx.speeds._default,e.complete=o||i.complete,e}function i(e){return!(e&&"number"!=typeof e&&!t.fx.speeds[e])||("string"==typeof e&&!t.effects.effect[e]||(!!t.isFunction(e)||"object"==typeof e&&!e.effect))}function n(t,e){var i=e.outerWidth(),n=e.outerHeight(),o=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,s=o.exec(t)||["",0,i,n,0];return{top:parseFloat(s[1])||0,right:"auto"===s[2]?i:parseFloat(s[2]),bottom:"auto"===s[3]?n:parseFloat(s[3]),left:parseFloat(s[4])||0}}t.expr&&t.expr.filters&&t.expr.filters.animated&&(t.expr.filters.animated=function(e){return function(i){return!!t(i).data(c)||e(i)}}(t.expr.filters.animated)),!1!==t.uiBackCompat&&t.extend(t.effects,{save:function(t,e){for(var i=0,n=e.length;i<n;i++)null!==e[i]&&t.data("ui-effects-"+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,n=0,o=e.length;n<o;n++)null!==e[n]&&(i=t.data("ui-effects-"+e[n]),t.css(e[n],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),float:e.css("float")},n=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),o={width:e.width(),height:e.height()},s=document.activeElement;try{s.id}catch(t){s=document.body}return e.wrap(n),(e[0]===s||t.contains(e[0],s))&&t(s).trigger("focus"),n=e.parent(),"static"===e.css("position")?(n.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,n){i[n]=e.css(n),isNaN(parseInt(i[n],10))&&(i[n]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(o),n.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).trigger("focus")),e}}),t.extend(t.effects,{version:"1.12.1",define:function(e,i,n){return n||(n=i,i="effect"),t.effects.effect[e]=n,t.effects.effect[e].mode=i,n},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var n="horizontal"!==i?(e||100)/100:1,o="vertical"!==i?(e||100)/100:1;return{height:t.height()*o,width:t.width()*n,outerHeight:t.outerHeight()*o,outerWidth:t.outerWidth()*n}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var n=t.queue();e>1&&n.splice.apply(n,[1,0].concat(n.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data("ui-effects-style",t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data("ui-effects-style")||"",t.removeData("ui-effects-style")},mode:function(t,e){var i=t.is(":hidden");return"toggle"===e&&(e=i?"show":"hide"),(i?"hide"===e:"show"===e)&&(e="none"),e},getBaseline:function(t,e){var i,n;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":n=0;break;case"center":n=.5;break;case"right":n=1;break;default:n=t[1]/e.width}return{x:n,y:i}},createPlaceholder:function(e){var i,n=e.css("position"),o=e.position();return e.css({marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()),/^(static|relative)/.test(n)&&(n="absolute",i=t("<"+e[0].nodeName+">").insertAfter(e).css({display:/^(inline|ruby)/.test(e.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight"),float:e.css("float")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass("ui-effects-placeholder"),e.data("ui-effects-placeholder",i)),e.css({position:n,left:o.left,top:o.top}),i},removePlaceholder:function(t){var e="ui-effects-placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(e){t.effects.restoreStyle(e),t.effects.removePlaceholder(e)},setTransition:function(e,i,n,o){return o=o||{},t.each(i,function(t,i){var s=e.cssUnit(i);s[0]>0&&(o[i]=s[0]*n+s[1])}),o}}),t.fn.extend({effect:function(){function i(e){function i(){r.removeData(c),t.effects.cleanUp(r),"hide"===n.mode&&r.hide(),a()}function a(){t.isFunction(l)&&l.call(r[0]),t.isFunction(e)&&e()}var r=t(this);n.mode=u.shift(),!1===t.uiBackCompat||s?"none"===n.mode?(r[h](),a()):o.call(r[0],n,i):(r.is(":hidden")?"hide"===h:"show"===h)?(r[h](),a()):o.call(r[0],n,a)}var n=e.apply(this,arguments),o=t.effects.effect[n.effect],s=o.mode,a=n.queue,r=a||"fx",l=n.complete,h=n.mode,u=[],d=function(e){var i=t(this),n=t.effects.mode(i,h)||s;i.data(c,!0),u.push(n),s&&("show"===n||n===s&&"hide"===n)&&i.show(),s&&"none"===n||t.effects.saveStyle(i),t.isFunction(e)&&e()};return t.fx.off||!o?h?this[h](n.duration,l):this.each(function(){l&&l.call(this)}):!1===a?this.each(d).each(i):this.queue(r,d).queue(r,i)},show:function(t){return function(n){if(i(n))return t.apply(this,arguments);var o=e.apply(this,arguments);return o.mode="show",this.effect.call(this,o)}}(t.fn.show),hide:function(t){return function(n){if(i(n))return t.apply(this,arguments);var o=e.apply(this,arguments);return o.mode="hide",this.effect.call(this,o)}}(t.fn.hide),toggle:function(t){return function(n){if(i(n)||"boolean"==typeof n)return t.apply(this,arguments);var o=e.apply(this,arguments);return o.mode="toggle",this.effect.call(this,o)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),n=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(n=[parseFloat(i),e])}),n},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):n(this.css("clip"),this)},transfer:function(e,i){var n=t(this),o=t(e.to),s="fixed"===o.css("position"),a=t("body"),r=s?a.scrollTop():0,l=s?a.scrollLeft():0,h=o.offset(),c={top:h.top-r,left:h.left-l,height:o.innerHeight(),width:o.innerWidth()},u=n.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(e.className).css({top:u.top-r,left:u.left-l,height:n.innerHeight(),width:n.innerWidth(),position:s?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),t.isFunction(i)&&i()})}}),t.fx.step.clip=function(e){e.clipInit||(e.start=t(e.elem).cssClip(),"string"==typeof e.end&&(e.end=n(e.end,e.elem)),e.clipInit=!0),t(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;t<((e=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return t<.5?i(2*t)/2:1-i(-2*t+2)/2}})}();t.effects,t.effects.define("blind","hide",function(e,i){var n={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},o=t(this),s=e.direction||"up",a=o.cssClip(),r={clip:t.extend({},a)},l=t.effects.createPlaceholder(o);r.clip[n[s][0]]=r.clip[n[s][1]],"show"===e.mode&&(o.cssClip(r.clip),l&&l.css(t.effects.clipToBox(r)),r.clip=a),l&&l.animate(t.effects.clipToBox(r),e.duration,e.easing),o.animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("bounce",function(e,i){var n,o,s,a=t(this),r=e.mode,l="hide"===r,h="show"===r,c=e.direction||"up",u=e.distance,d=e.times||5,p=2*d+(h||l?1:0),f=e.duration/p,g=e.easing,m="up"===c||"down"===c?"top":"left",v="up"===c||"left"===c,b=0,_=a.queue().length;for(t.effects.createPlaceholder(a),s=a.css(m),u||(u=a["top"===m?"outerHeight":"outerWidth"]()/3),h&&(o={opacity:1},o[m]=s,a.css("opacity",0).css(m,v?2*-u:2*u).animate(o,f,g)),l&&(u/=Math.pow(2,d-1)),o={},o[m]=s;b<d;b++)n={},n[m]=(v?"-=":"+=")+u,a.animate(n,f,g).animate(o,f,g),u=l?2*u:u/2;l&&(n={opacity:0},n[m]=(v?"-=":"+=")+u,a.animate(n,f,g)),a.queue(i),t.effects.unshift(a,_,p+1)}),t.effects.define("clip","hide",function(e,i){var n,o={},s=t(this),a=e.direction||"vertical",r="both"===a,l=r||"horizontal"===a,h=r||"vertical"===a;n=s.cssClip(),o.clip={top:h?(n.bottom-n.top)/2:n.top,right:l?(n.right-n.left)/2:n.right,bottom:h?(n.bottom-n.top)/2:n.bottom,left:l?(n.right-n.left)/2:n.left},t.effects.createPlaceholder(s),"show"===e.mode&&(s.cssClip(o.clip),o.clip=n),s.animate(o,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("drop","hide",function(e,i){var n,o=t(this),s=e.mode,a="show"===s,r=e.direction||"left",l="up"===r||"down"===r?"top":"left",h="up"===r||"left"===r?"-=":"+=",c="+="===h?"-=":"+=",u={opacity:0};t.effects.createPlaceholder(o),n=e.distance||o["top"===l?"outerHeight":"outerWidth"](!0)/2,u[l]=h+n,a&&(o.css(u),u[l]=c+n,u.opacity=1),o.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("explode","hide",function(e,i){function n(){_.push(this),_.length===u*d&&o()}function o(){p.css({visibility:"visible"}),t(_).remove(),i()}var s,a,r,l,h,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=e.mode,g="show"===f,m=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/d),b=Math.ceil(p.outerHeight()/u),_=[];for(s=0;s<u;s++)for(l=m.top+s*b,c=s-(u-1)/2,a=0;a<d;a++)r=m.left+a*v,h=a-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-a*v,top:-s*b}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:b,left:r+(g?h*v:0),top:l+(g?c*b:0),opacity:g?0:1}).animate({left:r+(g?0:h*v),top:l+(g?0:c*b),opacity:g?1:0},e.duration||500,e.easing,n)}),t.effects.define("fade","toggle",function(e,i){var n="show"===e.mode;t(this).css("opacity",n?0:1).animate({opacity:n?1:0},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("fold","hide",function(e,i){var n=t(this),o=e.mode,s="show"===o,a="hide"===o,r=e.size||15,l=/([0-9]+)%/.exec(r),h=!!e.horizFirst,c=h?["right","bottom"]:["bottom","right"],u=e.duration/2,d=t.effects.createPlaceholder(n),p=n.cssClip(),f={clip:t.extend({},p)},g={clip:t.extend({},p)},m=[p[c[0]],p[c[1]]],v=n.queue().length;l&&(r=parseInt(l[1],10)/100*m[a?0:1]),f.clip[c[0]]=r,g.clip[c[0]]=r,g.clip[c[1]]=0,s&&(n.cssClip(g.clip),d&&d.css(t.effects.clipToBox(g)),g.clip=p),n.queue(function(i){d&&d.animate(t.effects.clipToBox(f),u,e.easing).animate(t.effects.clipToBox(g),u,e.easing),i()}).animate(f,u,e.easing).animate(g,u,e.easing).queue(i),t.effects.unshift(n,v,4)}),t.effects.define("highlight","show",function(e,i){var n=t(this),o={backgroundColor:n.css("backgroundColor")};"hide"===e.mode&&(o.opacity=0),t.effects.saveStyle(n),n.css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(o,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("size",function(e,i){var n,o,s,a=t(this),r=["fontSize"],l=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],h=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],c=e.mode,u="effect"!==c,d=e.scale||"both",p=e.origin||["middle","center"],f=a.css("position"),g=a.position(),m=t.effects.scaledDimensions(a),v=e.from||m,b=e.to||t.effects.scaledDimensions(a,0);t.effects.createPlaceholder(a),"show"===c&&(s=v,v=b,b=s),o={from:{y:v.height/m.height,x:v.width/m.width},to:{y:b.height/m.height,x:b.width/m.width}},"box"!==d&&"both"!==d||(o.from.y!==o.to.y&&(v=t.effects.setTransition(a,l,o.from.y,v),b=t.effects.setTransition(a,l,o.to.y,b)),o.from.x!==o.to.x&&(v=t.effects.setTransition(a,h,o.from.x,v),b=t.effects.setTransition(a,h,o.to.x,b))),"content"!==d&&"both"!==d||o.from.y!==o.to.y&&(v=t.effects.setTransition(a,r,o.from.y,v),b=t.effects.setTransition(a,r,o.to.y,b)),p&&(n=t.effects.getBaseline(p,m),v.top=(m.outerHeight-v.outerHeight)*n.y+g.top,v.left=(m.outerWidth-v.outerWidth)*n.x+g.left,b.top=(m.outerHeight-b.outerHeight)*n.y+g.top,b.left=(m.outerWidth-b.outerWidth)*n.x+g.left),a.css(v),"content"!==d&&"both"!==d||(l=l.concat(["marginTop","marginBottom"]).concat(r),h=h.concat(["marginLeft","marginRight"]),a.find("*[width]").each(function(){var i=t(this),n=t.effects.scaledDimensions(i),s={height:n.height*o.from.y,width:n.width*o.from.x,outerHeight:n.outerHeight*o.from.y,outerWidth:n.outerWidth*o.from.x},a={height:n.height*o.to.y,width:n.width*o.to.x,outerHeight:n.height*o.to.y,outerWidth:n.width*o.to.x};o.from.y!==o.to.y&&(s=t.effects.setTransition(i,l,o.from.y,s),a=t.effects.setTransition(i,l,o.to.y,a)),o.from.x!==o.to.x&&(s=t.effects.setTransition(i,h,o.from.x,s),a=t.effects.setTransition(i,h,o.to.x,a)),u&&t.effects.saveStyle(i),i.css(s),i.animate(a,e.duration,e.easing,function(){u&&t.effects.restoreStyle(i)})})),a.animate(b,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){var e=a.offset();0===b.opacity&&a.css("opacity",v.opacity),u||(a.css("position","static"===f?"relative":f).offset(e),t.effects.saveStyle(a)),i()}})}),t.effects.define("scale",function(e,i){var n=t(this),o=e.mode,s=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"effect"!==o?0:100),a=t.extend(!0,{from:t.effects.scaledDimensions(n),to:t.effects.scaledDimensions(n,s,e.direction||"both"),origin:e.origin||["middle","center"]},e);e.fade&&(a.from.opacity=1,a.to.opacity=0),t.effects.effect.size.call(this,a,i)}),t.effects.define("puff","hide",function(e,i){var n=t.extend(!0,{},e,{fade:!0,percent:parseInt(e.percent,10)||150});t.effects.effect.scale.call(this,n,i)}),t.effects.define("pulsate","show",function(e,i){var n=t(this),o=e.mode,s="show"===o,a="hide"===o,r=s||a,l=2*(e.times||5)+(r?1:0),h=e.duration/l,c=0,u=1,d=n.queue().length;for(!s&&n.is(":visible")||(n.css("opacity",0).show(),c=1);u<l;u++)n.animate({opacity:c},h,e.easing),c=1-c;n.animate({opacity:c},h,e.easing),n.queue(i),t.effects.unshift(n,d,l+1)}),t.effects.define("shake",function(e,i){var n=1,o=t(this),s=e.direction||"left",a=e.distance||20,r=e.times||3,l=2*r+1,h=Math.round(e.duration/l),c="up"===s||"down"===s?"top":"left",u="up"===s||"left"===s,d={},p={},f={},g=o.queue().length;for(t.effects.createPlaceholder(o),d[c]=(u?"-=":"+=")+a,p[c]=(u?"+=":"-=")+2*a,f[c]=(u?"-=":"+=")+2*a,
o.animate(d,h,e.easing);n<r;n++)o.animate(p,h,e.easing).animate(f,h,e.easing);o.animate(p,h,e.easing).animate(d,h/2,e.easing).queue(i),t.effects.unshift(o,g,l+1)}),t.effects.define("slide","show",function(e,i){var n,o,s=t(this),a={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},r=e.mode,l=e.direction||"left",h="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l,u=e.distance||s["top"===h?"outerHeight":"outerWidth"](!0),d={};t.effects.createPlaceholder(s),n=s.cssClip(),o=s.position()[h],d[h]=(c?-1:1)*u+o,d.clip=s.cssClip(),d.clip[a[l][1]]=d.clip[a[l][0]],"show"===r&&(s.cssClip(d.clip),s.css(h,d[h]),d.clip=n,d[h]=o),s.animate(d,{queue:!1,duration:e.duration,easing:e.easing,complete:i})});!1!==t.uiBackCompat&&t.effects.define("transfer",function(e,i){t(this).transfer(e,i)});t.ui.focusable=function(i,n){var o,s,a,r,l,h=i.nodeName.toLowerCase();return"area"===h?(o=i.parentNode,s=o.name,!(!i.href||!s||"map"!==o.nodeName.toLowerCase())&&(a=t("img[usemap='#"+s+"']"),a.length>0&&a.is(":visible"))):(/^(input|select|textarea|button|object)$/.test(h)?(r=!i.disabled)&&(l=t(i).closest("fieldset")[0])&&(r=!l.disabled):r="a"===h?i.href||n:n,r&&t(i).is(":visible")&&e(t(i)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}});t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}};"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],function(e,i){function n(e,i,n,s){return t.each(o,function(){i-=parseFloat(t.css(e,"padding"+this))||0,n&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),s&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var o="Width"===i?["Left","Right"]:["Top","Bottom"],s=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?a["inner"+i].call(this):this.each(function(){t(this).css(s,n(this,e)+"px")})},t.fn["outer"+i]=function(e,o){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(s,n(this,e,!0,o)+"px")})}}),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))});t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,.\/:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,i,n,o,s;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(o=this.eq(0).parents("label"),n=this.attr("id"),n&&(e=this.eq(0).parents().last(),s=e.add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(n)+"']",o=o.add(s.find(i).addBack(i))),this.pushStack(o))},t.fn.scrollParent=function(e){var i=this.css("position"),n="absolute"===i,o=e?/(auto|scroll|hidden)/:/(auto|scroll)/,s=this.parents().filter(function(){var e=t(this);return(!n||"static"!==e.css("position"))&&o.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&s.length?s:t(this[0].ownerDocument||document)},t.extend(t.expr[":"],{tabbable:function(e){var i=t.attr(e,"tabindex"),n=null!=i;return(!n||i>=0)&&t.ui.focusable(e,n)}}),t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.widget("ui.accordion",{version:"1.12.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:"> li > :first-child, > :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),e.collapsible||!1!==e.active&&null!=e.active||(e.active=0),this._processPanels(),e.active<0&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t()}},_createIcons:function(){var e,i,n=this.options.icons;n&&(e=t("<span>"),this._addClass(e,"ui-accordion-header-icon","ui-icon "+n.header),e.prependTo(this.headers),i=this.active.children(".ui-accordion-header-icon"),this._removeClass(i,n.header)._addClass(i,null,n.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){if("active"===t)return void this._activate(e);"event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||!1!==this.options.active||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons())},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!t)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,n=this.headers.length,o=this.headers.index(e.target),s=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:s=this.headers[(o+1)%n];break;case i.LEFT:case i.UP:s=this.headers[(o-1+n)%n];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:s=this.headers[0];break;case i.END:s=this.headers[n-1]}s&&(t(e.target).attr("tabIndex",-1),t(s).attr("tabIndex",0),t(s).trigger("focus"),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().trigger("focus")},refresh:function(){var e=this.options;this._processPanels(),!1===e.active&&!0===e.collapsible||!this.headers.length?(e.active=!1,this.active=t()):!1===e.active?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var e,i=this.options,n=i.heightStyle,o=this.element.parent();this.active=this._findActive(i.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var e=t(this),i=e.uniqueId().attr("id"),n=e.next(),o=n.uniqueId().attr("id");e.attr("aria-controls",o),n.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(i.event),"fill"===n?(e=o.height(),this.element.siblings(":visible").each(function(){var i=t(this),n=i.css("position");"absolute"!==n&&"fixed"!==n&&(e-=i.outerHeight(!0))}),this.headers.each(function(){e-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,e-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===n&&(e=0,this.headers.next().each(function(){var i=t(this).is(":visible");i||t(this).show(),e=Math.max(e,t(this).css("height","").height()),i||t(this).hide()}).height(e))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i,n,o=this.options,s=this.active,a=t(e.currentTarget),r=a[0]===s[0],l=r&&o.collapsible,h=l?t():a.next(),c=s.next(),u={oldHeader:s,oldPanel:c,newHeader:l?t():a,newPanel:h};e.preventDefault(),r&&!o.collapsible||!1===this._trigger("beforeActivate",e,u)||(o.active=!l&&this.headers.index(a),this.active=r?t():a,this._toggle(u),this._removeClass(s,"ui-accordion-header-active","ui-state-active"),o.icons&&(i=s.children(".ui-accordion-header-icon"),this._removeClass(i,null,o.icons.activeHeader)._addClass(i,null,o.icons.header)),r||(this._removeClass(a,"ui-accordion-header-collapsed")._addClass(a,"ui-accordion-header-active","ui-state-active"),o.icons&&(n=a.children(".ui-accordion-header-icon"),this._removeClass(n,null,o.icons.header)._addClass(n,null,o.icons.activeHeader)),this._addClass(a.next(),"ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,n=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=n,this.options.animate?this._animate(i,n,e):(n.hide(),i.show(),this._toggleComplete(e)),n.attr({"aria-hidden":"true"}),n.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&n.length?n.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===parseInt(t(this).attr("tabIndex"),10)}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,e,i){var n,o,s,a=this,r=0,l=t.css("box-sizing"),h=t.length&&(!e.length||t.index()<e.index()),c=this.options.animate||{},u=h&&c.down||c,d=function(){a._toggleComplete(i)};return"number"==typeof u&&(s=u),"string"==typeof u&&(o=u),o=o||u.easing||c.easing,s=s||u.duration||c.duration,e.length?t.length?(n=t.show().outerHeight(),e.animate(this.hideProps,{duration:s,easing:o,step:function(t,e){e.now=Math.round(t)}}),void t.hide().animate(this.showProps,{duration:s,easing:o,complete:d,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?"content-box"===l&&(r+=i.now):"content"!==a.options.heightStyle&&(i.now=Math.round(n-e.outerHeight()-r),r=0)}})):e.animate(this.hideProps,s,o,d):t.animate(this.showProps,s,o,d)},_toggleComplete:function(t){var e=t.oldPanel,i=e.prev();this._removeClass(e,"ui-accordion-content-active"),this._removeClass(i,"ui-accordion-header-active")._addClass(i,"ui-accordion-header-collapsed"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}}),t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.widget("ui.menu",{version:"1.12.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var i=t(e.target),n=t(t.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&n.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var i=t(e.target).closest(".ui-menu-item"),n=t(e.currentTarget);i[0]===n[0]&&(this._removeClass(n.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,n))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){!t.contains(this.element[0],t.ui.safeActiveElement(this.document[0]))&&this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),i=e.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),i.children().each(function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var i,n,o,s,a=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:a=!1,n=this.previousFilter||"",s=!1,o=e.keyCode>=96&&e.keyCode<=105?(e.keyCode-96).toString():String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),o===n?s=!0:o=n+o,i=this._filterMenuItems(o),i=s&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(o=String.fromCharCode(e.keyCode),i=this._filterMenuItems(o)),i.length?(this.focus(e,i),this.previousFilter=o,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i,n,o,s,a=this,r=this.options.icons.submenu,l=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),n=l.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),i=e.prev(),n=t("<span>").data("ui-menu-submenu-caret",!0);a._addClass(n,"ui-menu-icon","ui-icon "+r),i.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",i.attr("id"))}),this._addClass(n,"ui-menu","ui-widget ui-widget-content ui-front"),e=l.add(this.element),i=e.find(this.options.items),i.not(".ui-menu-item").each(function(){var e=t(this);a._isDivider(e)&&a._addClass(e,"ui-menu-divider","ui-widget-content")}),o=i.not(".ui-menu-item, .ui-menu-divider"),s=o.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(o,"ui-menu-item")._addClass(s,"ui-menu-item-wrapper"),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,n,o;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),n=this.active.children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",n.attr("id")),o=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(o,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,n,o,s,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,n=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,o=e.offset().top-this.activeMenu.offset().top-i-n,s=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.outerHeight(),o<0?this.activeMenu.scrollTop(s+o):o+r>a&&this.activeMenu.scrollTop(s+o-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var n=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));n.length||(n=this.element),this._close(n),this.blur(e),this._removeClass(n.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=n},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var n;this.active&&(n="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),n&&n.length&&this.active||(n=this.activeMenu.find(this.options.items)[e]()),this.focus(i,n)},nextPage:function(e){var i,n,o;if(!this.active)return void this.next(e);this.isLastItem()||(this._hasScroll()?(n=this.active.offset().top,o=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-n-o<0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]()))},previousPage:function(e){var i,n,o;if(!this.active)return void this.next(e);this.isFirstItem()||(this._hasScroll()?(n=this.active.offset().top,o=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-n+o>0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first()))},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)},_filterMenuItems:function(e){var i=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),n=new RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return n.test(t.trim(t(this).children(".ui-menu-item-wrapper").text()))})}});t.widget("ui.autocomplete",{version:"1.12.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,i,n,o=this.element[0].nodeName.toLowerCase(),s="textarea"===o,a="input"===o;this.isMultiLine=s||!a&&this._isContentEditable(this.element),this.valueMethod=this.element[s||a?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(o){if(this.element.prop("readOnly"))return e=!0,n=!0,void(i=!0);e=!1,n=!1,i=!1;var s=t.ui.keyCode;switch(o.keyCode){case s.PAGE_UP:e=!0,this._move("previousPage",o);break;case s.PAGE_DOWN:e=!0,this._move("nextPage",o);break;case s.UP:e=!0,this._keyEvent("previous",o);break;case s.DOWN:e=!0,this._keyEvent("next",o);break;case s.ENTER:this.menu.active&&(e=!0,o.preventDefault(),this.menu.select(o));break;case s.TAB:this.menu.active&&this.menu.select(o);break;case s.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(o),o.preventDefault());break;default:i=!0,this._searchTimeout(o)}},keypress:function(n){if(e)return e=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||n.preventDefault());if(!i){var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:this._move("previousPage",n);break;case o.PAGE_DOWN:this._move("nextPage",n);break;case o.UP:this._keyEvent("previous",n);break;case o.DOWN:this._keyEvent("next",n)}}},input:function(t){if(n)return n=!1,void t.preventDefault();this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){if(this.cancelBlur)return void delete this.cancelBlur;clearTimeout(this.searching),this.close(t),this._change(t)}}),this._initSource(),this.menu=t("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==t.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,i){var n,o;if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)});o=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:o})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(o.value),(n=i.item.attr("aria-label")||o.value)&&t.trim(n).length&&(this.liveRegion.children().hide(),t("<div>").text(n).appendTo(this.liveRegion))},menuselect:function(e,i){var n=i.item.data("ui-autocomplete-item"),o=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=o,this._delay(function(){this.previous=o,this.selectedItem=n})),!1!==this._trigger("select",e,{item:n})&&this._value(n.value),this.term=this._value(),this.close(e),this.selectedItem=n}}),this.liveRegion=t("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var i=this.menu.element[0];return e.target===this.element[0]||e.target===i||t.contains(i,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,n=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,n){n(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,o){n.xhr&&n.xhr.abort(),n.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){o(t)},error:function(){o([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),n=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;e&&(!e||i||n)||(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):!1!==this._trigger("search",e)?this._search(t):void 0},_search:function(t){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return t.proxy(function(t){e===this.requestIndex&&this.__response(t),--this.pending||this._removeClass("ui-autocomplete-loading")},this)},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var n=this;t.each(i,function(t,i){n._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<div>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e):void this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var n=new RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return n.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("<div>").text(i).appendTo(this.liveRegion))}});var d=(t.ui.autocomplete,/ui-corner-([a-z]){2,6}/g);t.widget("ui.controlgroup",{version:"1.12.1",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var e=this,i=[];t.each(this.options.items,function(n,o){var s,a={};if(o)return"controlgroupLabel"===n?(s=e.element.find(o),s.each(function(){var e=t(this);e.children(".ui-controlgroup-label-contents").length||e.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),e._addClass(s,null,"ui-widget ui-widget-content ui-state-default"),void(i=i.concat(s.get()))):void(t.fn[n]&&(a=e["_"+n+"Options"]?e["_"+n+"Options"]("middle"):{classes:{}},e.element.find(o).each(function(){var o=t(this),s=o[n]("instance"),r=t.widget.extend({},a);if("button"!==n||!o.parent(".ui-spinner").length){s||(s=o[n]()[n]("instance")),s&&(r.classes=e._resolveClassesValues(r.classes,s)),o[n](r);var l=o[n]("widget");t.data(l[0],"ui-controlgroup-data",s||o[n]("instance")),i.push(l[0])}})))}),
this.childWidgets=t(t.unique(i)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var i=t(this),n=i.data("ui-controlgroup-data");n&&n[e]&&n[e]()})},_updateCornerClass:function(t,e){var i=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,"ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"),this._addClass(t,null,i)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,n={classes:{}};return n.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],n},_spinnerOptions:function(t){var e=this._buildSimpleOptions(t,"ui-spinner");return e.classes["ui-spinner-up"]="",e.classes["ui-spinner-down"]="",e},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:!!e&&"auto",classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(e,i){var n={};return t.each(e,function(o){var s=i.options.classes[o]||"";s=t.trim(s.replace(d,"")),n[o]=(s+" "+e[o]).replace(/\s+/g," ")}),n},_setOption:function(t,e){if("direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"===t)return void this._callChildMethod(e?"disable":"enable");this.refresh()},refresh:function(){var e,i=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),e=this.childWidgets,this.options.onlyVisible&&(e=e.filter(":visible")),e.length&&(t.each(["first","last"],function(t,n){var o=e[n]().data("ui-controlgroup-data");if(o&&i["_"+o.widgetName+"Options"]){var s=i["_"+o.widgetName+"Options"](1===e.length?"only":n);s.classes=i._resolveClassesValues(s.classes,o),o.element[o.widgetName](s)}else i._updateCornerClass(e[n](),n)}),this._callChildMethod("refresh"))}});t.widget("ui.checkboxradio",[t.ui.formResetMixin,{version:"1.12.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var e,i,n=this,o=this._super()||{};return this._readType(),i=this.element.labels(),this.label=t(i[i.length-1]),this.label.length||t.error("No label found for checkboxradio widget"),this.originalLabel="",this.label.contents().not(this.element[0]).each(function(){n.originalLabel+=3===this.nodeType?t(this).text():this.outerHTML}),this.originalLabel&&(o.label=this.originalLabel),e=this.element[0].disabled,null!=e&&(o.disabled=e),o},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),t&&(this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this.icon&&this._addClass(this.icon,null,"ui-state-hover")),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var e=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===e&&/radio|checkbox/.test(this.type)||t.error("Can't create checkboxradio on element.nodeName="+e+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var e,i=this.element[0].name,n="input[name='"+t.ui.escapeSelector(i)+"']";return i?(e=this.form.length?t(this.form[0].elements).filter(n):t(n).filter(function(){return 0===t(this).form().length}),e.not(this.element)):t([])},_toggleClasses:function(){var e=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",e)._toggleClass(this.icon,null,"ui-icon-blank",!e),"radio"===this.type&&this._getRadioGroup().each(function(){var e=t(this).checkboxradio("instance");e&&e._removeClass(e.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(t,e){if("label"!==t||e){if(this._super(t,e),"disabled"===t)return this._toggleClass(this.label,null,"ui-state-disabled",e),void(this.element[0].disabled=e);this.refresh()}},_updateIcon:function(e){var i="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=t("<span>"),this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(i+=e?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,e?"ui-icon-blank":"ui-icon-check")):i+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",i),e||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),this.iconSpace&&(t=t.not(this.iconSpace[0])),t.remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]);t.ui.checkboxradio;t.widget("ui.button",{version:"1.12.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var t,e=this._super()||{};return this.isInput=this.element.is("input"),t=this.element[0].disabled,null!=t&&(e.disabled=t),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(e.label=this.originalLabel),e},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(e){e.keyCode===t.ui.keyCode.SPACE&&(e.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(e,i){var n="iconPosition"!==e,o=n?this.options.iconPosition:i,s="top"===o||"bottom"===o;this.icon?n&&this._removeClass(this.icon,null,this.options.icon):(this.icon=t("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),n&&this._addClass(this.icon,null,i),this._attachIcon(o),s?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(o))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(t){this.icon[/^(?:end|bottom)/.test(t)?"before":"after"](this.iconSpace)},_attachIcon:function(t){this.element[/^(?:end|bottom)/.test(t)?"append":"prepend"](this.icon)},_setOptions:function(t){var e=void 0===t.showLabel?this.options.showLabel:t.showLabel,i=void 0===t.icon?this.options.icon:t.icon;e||i||(t.showLabel=!0),this._super(t)},_setOption:function(t,e){"icon"===t&&(e?this._updateIcon(t,e):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===t&&this._updateIcon(t,e),"showLabel"===t&&(this._toggleClass("ui-button-icon-only",null,!e),this._updateTooltip()),"label"===t&&(this.isInput?this.element.val(e):(this.element.html(e),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(t,e),"disabled"===t&&(this._toggleClass(null,"ui-state-disabled",e),this.element[0].disabled=e,e&&this.element.blur())},refresh:function(){var t=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOptions({disabled:t}),this._updateTooltip()}}),!1!==t.uiBackCompat&&(t.widget("ui.button",t.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(t,e){if("text"===t)return void this._super("showLabel",e);"showLabel"===t&&(this.options.text=e),"icon"===t&&(this.options.icons.primary=e),"icons"===t&&(e.primary?(this._super("icon",e.primary),this._super("iconPosition","beginning")):e.secondary&&(this._super("icon",e.secondary),this._super("iconPosition","end"))),this._superApply(arguments)}}),t.fn.button=function(e){return function(){return!this.length||this.length&&"INPUT"!==this[0].tagName||this.length&&"INPUT"===this[0].tagName&&"checkbox"!==this.attr("type")&&"radio"!==this.attr("type")?e.apply(this,arguments):(t.ui.checkboxradio||t.error("Checkboxradio widget missing"),0===arguments.length?this.checkboxradio({icon:!1}):this.checkboxradio.apply(this,arguments))}}(t.fn.button),t.fn.buttonset=function(){return t.ui.controlgroup||t.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))});t.ui.button;t.extend(t.ui,{datepicker:{version:"1.12.1"}});var p;t.extend(n.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return a(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var n,o,s;n=e.nodeName.toLowerCase(),o="div"===n||"span"===n,e.id||(this.uuid+=1,e.id="dp"+this.uuid),s=this._newInst(t(e),o),s.settings=t.extend({},i||{}),"input"===n?this._connectDatepicker(e,s):o&&this._inlineDatepicker(e,s)},_newInst:function(e,i){return{id:e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?o(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var n=t(e);i.append=t([]),i.trigger=t([]),n.hasClass(this.markerClassName)||(this._attachments(n,i),n.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(i),t.data(e,"datepicker",i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var n,o,s,a=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(),a&&(i.append=t("<span class='"+this._appendClass+"'>"+a+"</span>"),e[r?"before":"after"](i.append)),e.off("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),n=this._get(i,"showOn"),"focus"!==n&&"both"!==n||e.on("focus",this._showDatepicker),"button"!==n&&"both"!==n||(o=this._get(i,"buttonText"),s=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:s,alt:o,title:o}):t("<button type='button'></button>").addClass(this._triggerClass).html(s?t("<img/>").attr({src:s,alt:o,title:o}):o)),e[r?"before":"after"](i.trigger),i.trigger.on("click",function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,n,o,s=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(i=0,n=0,o=0;o<t.length;o++)t[o].length>i&&(i=t[o].length,n=o);return n},s.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),s.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-s.getDay())),t.input.attr("size",this._formatDate(t,s).length)}},_inlineDatepicker:function(e,i){var n=t(e);n.hasClass(this.markerClassName)||(n.addClass(this.markerClassName).append(i.dpDiv),t.data(e,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,n,o,s){var r,l,h,c,u,d=this._dialogInst;return d||(this.uuid+=1,r="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+r+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),t("body").append(this._dialogInput),d=this._dialogInst=this._newInst(this._dialogInput,!1),d.settings={},t.data(this._dialogInput[0],"datepicker",d)),a(d.settings,o||{}),i=i&&i.constructor===Date?this._formatDate(d,i):i,this._dialogInput.val(i),this._pos=s?s.length?s:[s.pageX,s.pageY]:null,this._pos||(l=document.documentElement.clientWidth,h=document.documentElement.clientHeight,c=document.documentElement.scrollLeft||document.body.scrollLeft,u=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+c,h/2-150+u]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=n,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],"datepicker",d),this},_destroyDatepicker:function(e){var i,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,"datepicker"),"input"===i?(o.append.remove(),o.trigger.remove(),n.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):"div"!==i&&"span"!==i||n.removeClass(this.markerClassName).empty(),p===o&&(p=null))},_enableDatepicker:function(e){var i,n,o=t(e),s=t.data(e,"datepicker");o.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,s.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==i&&"span"!==i||(n=o.children("."+this._inlineClass),n.children().removeClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,n,o=t(e),s=t.data(e,"datepicker");o.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,s.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==i&&"span"!==i||(n=o.children("."+this._inlineClass),n.children().addClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;e<this._disabledInputs.length;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,"datepicker")}catch(t){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,i,n){var o,s,r,l,h=this._getInst(e);if(2===arguments.length&&"string"==typeof i)return"defaults"===i?t.extend({},t.datepicker._defaults):h?"all"===i?t.extend({},h.settings):this._get(h,i):null;o=i||{},"string"==typeof i&&(o={},o[i]=n),h&&(this._curInst===h&&this._hideDatepicker(),s=this._getDateDatepicker(e,!0),r=this._getMinMaxDate(h,"min"),l=this._getMinMaxDate(h,"max"),a(h.settings,o),null!==r&&void 0!==o.dateFormat&&void 0===o.minDate&&(h.settings.minDate=this._formatDate(h,r)),null!==l&&void 0!==o.dateFormat&&void 0===o.maxDate&&(h.settings.maxDate=this._formatDate(h,l)),"disabled"in o&&(o.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(t(e),h),this._autoSize(h),this._setDate(h,s),this._updateAlternate(h),this._updateDatepicker(h))},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,n,o,s=t.datepicker._getInst(e.target),a=!0,r=s.dpDiv.is(".ui-datepicker-rtl");if(s._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),a=!1;break;case 13:return o=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",s.dpDiv),o[0]&&t.datepicker._selectDay(e.target,s.selectedMonth,s.selectedYear,o[0]),i=t.datepicker._get(s,"onSelect"),i?(n=t.datepicker._formatDate(s),i.apply(s.input?s.input[0]:null,[n,s])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(s,"stepBigMonths"):-t.datepicker._get(s,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(s,"stepBigMonths"):+t.datepicker._get(s,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),a=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?1:-1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(s,"stepBigMonths"):-t.datepicker._get(s,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?-1:1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(s,"stepBigMonths"):+t.datepicker._get(s,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||e.metaKey;break;default:a=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):a=!1;a&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var i,n,o=t.datepicker._getInst(e.target);if(t.datepicker._get(o,"constrainInput"))return i=t.datepicker._possibleChars(t.datepicker._get(o,"dateFormat")),n=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||n<" "||!i||i.indexOf(n)>-1},_doKeyUp:function(e){var i,n=t.datepicker._getInst(e.target);if(n.input.val()!==n.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(n,"dateFormat"),n.input?n.input.val():null,t.datepicker._getFormatConfig(n)),i&&(t.datepicker._setDateFromField(n),t.datepicker._updateAlternate(n),t.datepicker._updateDatepicker(n))}catch(t){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var n,o,s,r,l,h,c;n=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==n&&(t.datepicker._curInst.dpDiv.stop(!0,!0),n&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),o=t.datepicker._get(n,"beforeShow"),s=o?o.apply(e,[e,n]):{},!1!==s&&(a(n.settings,s),n.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(n),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),r=!1,t(e).parents().each(function(){return!(r|="fixed"===t(this).css("position"))}),l={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,n.dpDiv.empty(),n.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(n),l=t.datepicker._checkOffset(n,l,r),n.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":r?"fixed":"absolute",display:"none",left:l.left+"px",top:l.top+"px"}),n.inline||(h=t.datepicker._get(n,"showAnim"),c=t.datepicker._get(n,"duration"),n.dpDiv.css("z-index",i(t(e))+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[h]?n.dpDiv.show(h,t.datepicker._get(n,"showOptions"),c):n.dpDiv[h||"show"](h?c:null),t.datepicker._shouldFocusInput(n)&&n.input.trigger("focus"),t.datepicker._curInst=n))}},_updateDatepicker:function(e){this.maxRows=4,p=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var i,n=this._getNumberOfMonths(e),o=n[1],a=e.dpDiv.find("."+this._dayOverClass+" a");a.length>0&&s.apply(a.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),o>1&&e.dpDiv.addClass("ui-datepicker-multi-"+o).css("width",17*o+"em"),e.dpDiv[(1!==n[0]||1!==n[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,n){var o=e.dpDiv.outerWidth(),s=e.dpDiv.outerHeight(),a=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,l=document.documentElement.clientWidth+(n?0:t(document).scrollLeft()),h=document.documentElement.clientHeight+(n?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?o-a:0,i.left-=n&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=n&&i.top===e.input.offset().top+r?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+o>l&&l>o?Math.abs(i.left+o-l):0),i.top-=Math.min(i.top,i.top+s>h&&h>s?Math.abs(s+r):0),i},_findPos:function(e){for(var i,n=this._getInst(e),o=this._get(n,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[o?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,n,o,s,a=this._curInst;!a||e&&a!==t.data(e,"datepicker")||this._datepickerShowing&&(i=this._get(a,"showAnim"),n=this._get(a,"duration"),o=function(){t.datepicker._tidyDialog(a)},t.effects&&(t.effects.effect[i]||t.effects[i])?a.dpDiv.hide(i,t.datepicker._get(a,"showOptions"),n,o):a.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?n:null,o),i||o(),this._datepickerShowing=!1,s=this._get(a,"onClose"),s&&s.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),n=t.datepicker._getInst(i[0]);(i[0].id===t.datepicker._mainDivId||0!==i.parents("#"+t.datepicker._mainDivId).length||i.hasClass(t.datepicker.markerClassName)||i.closest("."+t.datepicker._triggerClass).length||!t.datepicker._datepickerShowing||t.datepicker._inDialog&&t.blockUI)&&(!i.hasClass(t.datepicker.markerClassName)||t.datepicker._curInst===n)||t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,n){var o=t(e),s=this._getInst(o[0]);this._isDisabledDatepicker(o[0])||(this._adjustInstDate(s,i+("M"===n?this._get(s,"showCurrentAtPos"):0),n),this._updateDatepicker(s))},_gotoToday:function(e){var i,n=t(e),o=this._getInst(n[0]);this._get(o,"gotoCurrent")&&o.currentDay?(o.selectedDay=o.currentDay,o.drawMonth=o.selectedMonth=o.currentMonth,o.drawYear=o.selectedYear=o.currentYear):(i=new Date,o.selectedDay=i.getDate(),o.drawMonth=o.selectedMonth=i.getMonth(),o.drawYear=o.selectedYear=i.getFullYear()),this._notifyChange(o),this._adjustDate(n)},_selectMonthYear:function(e,i,n){var o=t(e),s=this._getInst(o[0]);s["selected"+("M"===n?"Month":"Year")]=s["draw"+("M"===n?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(s),this._adjustDate(o)},_selectDay:function(e,i,n,o){var s,a=t(e);t(o).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||(s=this._getInst(a[0]),s.selectedDay=s.currentDay=t("a",o).html(),s.selectedMonth=s.currentMonth=i,s.selectedYear=s.currentYear=n,this._selectDate(e,this._formatDate(s,s.currentDay,s.currentMonth,s.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var n,o=t(e),s=this._getInst(o[0]);i=null!=i?i:this._formatDate(s),s.input&&s.input.val(i),this._updateAlternate(s),n=this._get(s,"onSelect"),n?n.apply(s.input?s.input[0]:null,[i,s]):s.input&&s.input.trigger("change"),s.inline?this._updateDatepicker(s):(this._hideDatepicker(),this._lastInput=s.input[0],"object"!=typeof s.input[0]&&s.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(e){var i,n,o,s=this._get(e,"altField");s&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),n=this._getDate(e),o=this.formatDate(i,n,this._getFormatConfig(e)),t(s).val(o))},noWeekends:function(t){var e=t.getDay();return[e>0&&e<6,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(e,i,n){if(null==e||null==i)throw"Invalid arguments";if(""===(i="object"==typeof i?i.toString():i+""))return null;var o,s,a,r,l=0,h=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof h?h:(new Date).getFullYear()%100+parseInt(h,10),u=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,d=(n?n.dayNames:null)||this._defaults.dayNames,p=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,f=(n?n.monthNames:null)||this._defaults.monthNames,g=-1,m=-1,v=-1,b=-1,_=!1,y=function(t){var i=o+1<e.length&&e.charAt(o+1)===t;return i&&o++,i},x=function(t){var e=y(t),n="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,o="y"===t?n:1,s=new RegExp("^\\d{"+o+","+n+"}"),a=i.substring(l).match(s);if(!a)throw"Missing number at position "+l;return l+=a[0].length,parseInt(a[0],10)},w=function(e,n,o){var s=-1,a=t.map(y(e)?o:n,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(a,function(t,e){var n=e[1];if(i.substr(l,n.length).toLowerCase()===n.toLowerCase())return s=e[0],l+=n.length,!1}),-1!==s)return s+1;throw"Unknown name at position "+l},k=function(){if(i.charAt(l)!==e.charAt(o))throw"Unexpected literal at position "+l;l++};for(o=0;o<e.length;o++)if(_)"'"!==e.charAt(o)||y("'")?k():_=!1;else switch(e.charAt(o)){case"d":v=x("d");break;case"D":w("D",u,d);break;case"o":b=x("o");break;case"m":m=x("m");break;case"M":m=w("M",p,f);break;case"y":g=x("y");break;case"@":r=new Date(x("@")),g=r.getFullYear(),m=r.getMonth()+1,v=r.getDate();break;case"!":r=new Date((x("!")-this._ticksTo1970)/1e4),g=r.getFullYear(),m=r.getMonth()+1,v=r.getDate();break;case"'":y("'")?k():_=!0;break;default:k()}if(l<i.length&&(a=i.substr(l),!/^\s+/.test(a)))throw"Extra/unparsed characters found in date: "+a;if(-1===g?g=(new Date).getFullYear():g<100&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(g<=c?0:-100)),b>-1)for(m=1,v=b;;){if(s=this._getDaysInMonth(g,m-1),v<=s)break;m++,v-=s}if(r=this._daylightSavingAdjust(new Date(g,m-1,v)),r.getFullYear()!==g||r.getMonth()+1!==m||r.getDate()!==v)throw"Invalid date";return r},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(t,e,i){if(!e)return"";var n,o=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,s=(i?i.dayNames:null)||this._defaults.dayNames,a=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,l=function(e){var i=n+1<t.length&&t.charAt(n+1)===e;return i&&n++,i},h=function(t,e,i){var n=""+e;if(l(t))for(;n.length<i;)n="0"+n;return n},c=function(t,e,i,n){return l(t)?n[e]:i[e]},u="",d=!1;if(e)for(n=0;n<t.length;n++)if(d)"'"!==t.charAt(n)||l("'")?u+=t.charAt(n):d=!1;else switch(t.charAt(n)){case"d":u+=h("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),o,s);break;case"o":u+=h("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=h("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),a,r);break;case"y":u+=l("y")?e.getFullYear():(e.getFullYear()%100<10?"0":"")+e.getFullYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":l("'")?u+="'":d=!0;break;default:u+=t.charAt(n)}return u},_possibleChars:function(t){var e,i="",n=!1,o=function(i){var n=e+1<t.length&&t.charAt(e+1)===i;return n&&e++,n};for(e=0;e<t.length;e++)if(n)"'"!==t.charAt(e)||o("'")?i+=t.charAt(e):n=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":o("'")?i+="'":n=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,e){
return void 0!==t.settings[e]?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),n=t.lastVal=t.input?t.input.val():null,o=this._getDefaultDate(t),s=o,a=this._getFormatConfig(t);try{s=this.parseDate(i,n,a)||o}catch(t){n=e?"":n}t.selectedDay=s.getDate(),t.drawMonth=t.selectedMonth=s.getMonth(),t.drawYear=t.selectedYear=s.getFullYear(),t.currentDay=n?s.getDate():0,t.currentMonth=n?s.getMonth():0,t.currentYear=n?s.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,n){var o=null==i||""===i?n:"string"==typeof i?function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(t){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=n.getFullYear(),s=n.getMonth(),a=n.getDate(),r=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=r.exec(i);l;){switch(l[2]||"d"){case"d":case"D":a+=parseInt(l[1],10);break;case"w":case"W":a+=7*parseInt(l[1],10);break;case"m":case"M":s+=parseInt(l[1],10),a=Math.min(a,t.datepicker._getDaysInMonth(o,s));break;case"y":case"Y":o+=parseInt(l[1],10),a=Math.min(a,t.datepicker._getDaysInMonth(o,s))}l=r.exec(i)}return new Date(o,s,a)}(i):"number"==typeof i?isNaN(i)?n:function(t){var e=new Date;return e.setDate(e.getDate()+t),e}(i):new Date(i.getTime());return o=o&&"Invalid Date"===o.toString()?n:o,o&&(o.setHours(0),o.setMinutes(0),o.setSeconds(0),o.setMilliseconds(0)),this._daylightSavingAdjust(o)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var n=!e,o=t.selectedMonth,s=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.getFullYear(),o===t.selectedMonth&&s===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(n?"":this._formatDate(t))},_getDate:function(t){return!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay))},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),n="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(n,-i,"M")},next:function(){t.datepicker._adjustDate(n,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(n)},selectDay:function(){return t.datepicker._selectDay(n,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(n,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(n,this,"Y"),!1}};t(this).on(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,n,o,s,a,r,l,h,c,u,d,p,f,g,m,v,b,_,y,x,w,k,C,D,S,M,T,I,P,A,O,F,E,z,H,W,L,N,R=new Date,B=this._daylightSavingAdjust(new Date(R.getFullYear(),R.getMonth(),R.getDate())),V=this._get(t,"isRTL"),U=this._get(t,"showButtonPanel"),j=this._get(t,"hideIfNoPrevNext"),Y=this._get(t,"navigationAsDateFormat"),$=this._getNumberOfMonths(t),q=this._get(t,"showCurrentAtPos"),X=this._get(t,"stepMonths"),K=1!==$[0]||1!==$[1],G=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),Q=this._getMinMaxDate(t,"min"),Z=this._getMinMaxDate(t,"max"),J=t.drawMonth-q,tt=t.drawYear;if(J<0&&(J+=12,tt--),Z)for(e=this._daylightSavingAdjust(new Date(Z.getFullYear(),Z.getMonth()-$[0]*$[1]+1,Z.getDate())),e=Q&&e<Q?Q:e;this._daylightSavingAdjust(new Date(tt,J,1))>e;)--J<0&&(J=11,tt--);for(t.drawMonth=J,t.drawYear=tt,i=this._get(t,"prevText"),i=Y?this.formatDate(i,this._daylightSavingAdjust(new Date(tt,J-X,1)),this._getFormatConfig(t)):i,n=this._canAdjustMonth(t,-1,tt,J)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(V?"e":"w")+"'>"+i+"</span></a>":j?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(V?"e":"w")+"'>"+i+"</span></a>",o=this._get(t,"nextText"),o=Y?this.formatDate(o,this._daylightSavingAdjust(new Date(tt,J+X,1)),this._getFormatConfig(t)):o,s=this._canAdjustMonth(t,1,tt,J)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+o+"'><span class='ui-icon ui-icon-circle-triangle-"+(V?"w":"e")+"'>"+o+"</span></a>":j?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+o+"'><span class='ui-icon ui-icon-circle-triangle-"+(V?"w":"e")+"'>"+o+"</span></a>",a=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.currentDay?G:B,a=Y?this.formatDate(a,r,this._getFormatConfig(t)):a,l=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",h=U?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(V?l:"")+(this._isInRange(t,r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+a+"</button>":"")+(V?"":l)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),v=this._get(t,"showOtherMonths"),b=this._get(t,"selectOtherMonths"),_=this._getDefaultDate(t),y="",w=0;w<$[0];w++){for(k="",this.maxRows=4,C=0;C<$[1];C++){if(D=this._daylightSavingAdjust(new Date(tt,J,t.selectedDay)),S=" ui-corner-all",M="",K){if(M+="<div class='ui-datepicker-group",$[1]>1)switch(C){case 0:M+=" ui-datepicker-group-first",S=" ui-corner-"+(V?"right":"left");break;case $[1]-1:M+=" ui-datepicker-group-last",S=" ui-corner-"+(V?"left":"right");break;default:M+=" ui-datepicker-group-middle",S=""}M+="'>"}for(M+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+S+"'>"+(/all|left/.test(S)&&0===w?V?s:n:"")+(/all|right/.test(S)&&0===w?V?n:s:"")+this._generateMonthYearHeader(t,J,tt,Q,Z,w>0||C>0,f,g)+"</div><table class='ui-datepicker-calendar'><thead><tr>",T=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",x=0;x<7;x++)I=(x+c)%7,T+="<th scope='col'"+((x+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+d[I]+"'>"+p[I]+"</span></th>";for(M+=T+"</tr></thead><tbody>",P=this._getDaysInMonth(tt,J),tt===t.selectedYear&&J===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,P)),A=(this._getFirstDayOfMonth(tt,J)-c+7)%7,O=Math.ceil((A+P)/7),F=K&&this.maxRows>O?this.maxRows:O,this.maxRows=F,E=this._daylightSavingAdjust(new Date(tt,J,1-A)),z=0;z<F;z++){for(M+="<tr>",H=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(E)+"</td>":"",x=0;x<7;x++)W=m?m.apply(t.input?t.input[0]:null,[E]):[!0,""],L=E.getMonth()!==J,N=L&&!b||!W[0]||Q&&E<Q||Z&&E>Z,H+="<td class='"+((x+c+6)%7>=5?" ui-datepicker-week-end":"")+(L?" ui-datepicker-other-month":"")+(E.getTime()===D.getTime()&&J===t.selectedMonth&&t._keyEvent||_.getTime()===E.getTime()&&_.getTime()===D.getTime()?" "+this._dayOverClass:"")+(N?" "+this._unselectableClass+" ui-state-disabled":"")+(L&&!v?"":" "+W[1]+(E.getTime()===G.getTime()?" "+this._currentClass:"")+(E.getTime()===B.getTime()?" ui-datepicker-today":""))+"'"+(L&&!v||!W[2]?"":" title='"+W[2].replace(/'/g,"&#39;")+"'")+(N?"":" data-handler='selectDay' data-event='click' data-month='"+E.getMonth()+"' data-year='"+E.getFullYear()+"'")+">"+(L&&!v?"&#xa0;":N?"<span class='ui-state-default'>"+E.getDate()+"</span>":"<a class='ui-state-default"+(E.getTime()===B.getTime()?" ui-state-highlight":"")+(E.getTime()===G.getTime()?" ui-state-active":"")+(L?" ui-priority-secondary":"")+"' href='#'>"+E.getDate()+"</a>")+"</td>",E.setDate(E.getDate()+1),E=this._daylightSavingAdjust(E);M+=H+"</tr>"}J++,J>11&&(J=0,tt++),M+="</tbody></table>"+(K?"</div>"+($[0]>0&&C===$[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),k+=M}y+=k}return y+=h,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,n,o,s,a,r){var l,h,c,u,d,p,f,g,m=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),b=this._get(t,"showMonthAfterYear"),_="<div class='ui-datepicker-title'>",y="";if(s||!m)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(l=n&&n.getFullYear()===i,h=o&&o.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;c<12;c++)(!l||c>=n.getMonth())&&(!h||c<=o.getMonth())&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(b||(_+=y+(!s&&m&&v?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",s||!v)_+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},f=p(u[0]),g=Math.max(f,p(u[1]||"")),f=n?Math.max(f,n.getFullYear()):f,g=o?Math.min(g,o.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";f<=g;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",_+=t.yearshtml,t.yearshtml=null}return _+=this._get(t,"yearSuffix"),b&&(_+=(!s&&m&&v?"":"&#xa0;")+y),_+="</div>"},_adjustInstDate:function(t,e,i){var n=t.selectedYear+("Y"===i?e:0),o=t.selectedMonth+("M"===i?e:0),s=Math.min(t.selectedDay,this._getDaysInMonth(n,o))+("D"===i?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(n,o,s)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),"M"!==i&&"Y"!==i||this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),n=this._getMinMaxDate(t,"max"),o=i&&e<i?i:e;return n&&o>n?n:o},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,n){var o=this._getNumberOfMonths(t),s=this._daylightSavingAdjust(new Date(i,n+(e<0?e:o[0]*o[1]),1));return e<0&&s.setDate(this._getDaysInMonth(s.getFullYear(),s.getMonth())),this._isInRange(t,s)},_isInRange:function(t,e){var i,n,o=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),a=null,r=null,l=this._get(t,"yearRange");return l&&(i=l.split(":"),n=(new Date).getFullYear(),a=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=n),i[1].match(/[+\-].*/)&&(r+=n)),(!o||e.getTime()>=o.getTime())&&(!s||e.getTime()<=s.getTime())&&(!a||e.getFullYear()>=a)&&(!r||e.getFullYear()<=r)},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,n){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var o=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(n,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),o,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).on("mousedown",t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new n,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.12.1";var f=(t.datepicker,t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),!1);t(document).on("mouseup",function(){f=!1});t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){if(!0===t.data(i.target,e.widgetName+".preventClickEvent"))return t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!f){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,n=1===e.which,o=!("string"!=typeof this.options.cancel||!e.target.nodeName)&&t(e.target).closest(this.options.cancel).length;return!(n&&!o&&this._mouseCapture(e))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(e),!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),f=!0,!0))}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,f=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,n){var o,s=t.ui[e].prototype;for(o in n)s.plugins[o]=s.plugins[o]||[],s.plugins[o].push([i,n[o]])},call:function(t,e,i,n){var o,s=t.plugins[e];if(s&&(n||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(o=0;o<s.length;o++)t.options[s[o][0]]&&s[o][1].apply(t.element,i)}},t.ui.safeBlur=function(e){e&&"body"!==e.nodeName.toLowerCase()&&t(e).trigger("blur")};t.widget("ui.draggable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){if((this.helper||this.element).is(".ui-draggable-dragging"))return void(this.destroyOnClear=!0);this._removeHandleClassName(),this._mouseDestroy()},_mouseCapture:function(e){var i=this.options;return!(this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(e),!!this.handle&&(this._blurActiveElement(e),this._blockFrames(!0===i.iframeFix?"iframe":i.iframeFix),!0))},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map(function(){var e=t(this);return t("<div>").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var i=t.ui.safeActiveElement(this.document[0]);t(e.target).closest(i).length||t.ui.safeBlur(i)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===t(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),!1===this._trigger("start",e)?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var n=this._uiHash();if(!1===this._trigger("drag",e,n))return this._mouseUp(new t.Event("mouseup",e)),!1;this.position=n.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,n=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(n=t.ui.ddmanager.drop(this,e)),this.dropped&&(n=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!n||"valid"===this.options.revert&&n||!0===this.options.revert||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==i._trigger("stop",e)&&i._clear()}):!1!==this._trigger("stop",e)&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.trigger("focus"),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new t.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(e){return!this.options.handle||!!t(e.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(e){var i=this.options,n=t.isFunction(i.helper),o=n?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return o.parents("body").length||o.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),n&&o[0]===this.element[0]&&this._setPositionRelative(),o[0]===this.element[0]||/(fixed|absolute)/.test(o.css("position"))||o.css("position","absolute"),o},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,n,o=this.options,s=this.document[0];return this.relativeContainer=null,o.containment?"window"===o.containment?void(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||s.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===o.containment?void(this.containment=[0,0,t(s).width()-this.helperProportions.width-this.margins.left,(t(s).height()||s.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):o.containment.constructor===Array?void(this.containment=o.containment):("parent"===o.containment&&(o.containment=this.helper[0].parentNode),i=t(o.containment),void((n=i[0])&&(e=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(n.scrollWidth,n.offsetWidth):n.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(n.scrollHeight,n.offsetHeight):n.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i))):void(this.containment=null)},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,n=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:n?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:n?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,n,o,s,a=this.options,r=this._isRootNode(this.scrollParent[0]),l=t.pageX,h=t.pageY;return r&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(n=this.relativeContainer.offset(),i=[this.containment[0]+n.left,this.containment[1]+n.top,this.containment[2]+n.left,this.containment[3]+n.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(l=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(h=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(l=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(h=i[3]+this.offset.click.top)),a.grid&&(o=a.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,h=i?o-this.offset.click.top>=i[1]||o-this.offset.click.top>i[3]?o:o-this.offset.click.top>=i[1]?o-a.grid[1]:o+a.grid[1]:o,s=a.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,l=i?s-this.offset.click.left>=i[0]||s-this.offset.click.left>i[2]?s:s-this.offset.click.left>=i[0]?s-a.grid[0]:s+a.grid[0]:s),"y"===a.axis&&(l=this.originalPageX),"x"===a.axis&&(h=this.originalPageY)),{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,i,n){return n=n||this._uiHash(),t.ui.plugin.call(this,e,[i,n,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),n.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,n)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i,n){var o=t.extend({},i,{item:n.element});n.sortables=[],t(n.options.connectToSortable).each(function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(n.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,o))})},stop:function(e,i,n){var o=t.extend({},i,{item:n.element});n.cancelHelperRemoval=!1,t.each(n.sortables,function(){var t=this;t.isOver?(t.isOver=0,n.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,o))})},drag:function(e,i,n){t.each(n.sortables,function(){var o=!1,s=this;s.positionAbs=n.positionAbs,s.helperProportions=n.helperProportions,s.offset.click=n.offset.click,s._intersectsWith(s.containerCache)&&(o=!0,t.each(n.sortables,function(){return this.positionAbs=n.positionAbs,this.helperProportions=n.helperProportions,this.offset.click=n.offset.click,this!==s&&this._intersectsWith(this.containerCache)&&t.contains(s.element[0],this.element[0])&&(o=!1),o})),o?(s.isOver||(s.isOver=1,n._parent=i.helper.parent(),s.currentItem=i.helper.appendTo(s.element).data("ui-sortable-item",!0),s.options._helper=s.options.helper,s.options.helper=function(){return i.helper[0]},e.target=s.currentItem[0],s._mouseCapture(e,!0),s._mouseStart(e,!0,!0),s.offset.click.top=n.offset.click.top,s.offset.click.left=n.offset.click.left,s.offset.parent.left-=n.offset.parent.left-s.offset.parent.left,s.offset.parent.top-=n.offset.parent.top-s.offset.parent.top,n._trigger("toSortable",e),n.dropped=s.element,t.each(n.sortables,function(){this.refreshPositions()}),n.currentItem=n.element,s.fromOutside=n),s.currentItem&&(s._mouseDrag(e),i.position=s.position)):s.isOver&&(s.isOver=0,s.cancelHelperRemoval=!0,s.options._revert=s.options.revert,s.options.revert=!1,s._trigger("out",e,s._uiHash(s)),s._mouseStop(e,!0),s.options.revert=s.options._revert,s.options.helper=s.options._helper,s.placeholder&&s.placeholder.remove(),i.helper.appendTo(n._parent),n._refreshOffsets(e),i.position=n._generatePosition(e,!0),n._trigger("fromSortable",e),n.dropped=!1,t.each(n.sortables,function(){this.refreshPositions()}))})}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i,n){var o=t("body"),s=n.options;o.css("cursor")&&(s._cursor=o.css("cursor")),o.css("cursor",s.cursor)},stop:function(e,i,n){var o=n.options;o._cursor&&t("body").css("cursor",o._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,n){var o=t(i.helper),s=n.options;o.css("opacity")&&(s._opacity=o.css("opacity")),o.css("opacity",s.opacity)},stop:function(e,i,n){var o=n.options;o._opacity&&t(i.helper).css("opacity",o._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(e,i,n){var o=n.options,s=!1,a=n.scrollParentNotHidden[0],r=n.document[0];a!==r&&"HTML"!==a.tagName?(o.axis&&"x"===o.axis||(n.overflowOffset.top+a.offsetHeight-e.pageY<o.scrollSensitivity?a.scrollTop=s=a.scrollTop+o.scrollSpeed:e.pageY-n.overflowOffset.top<o.scrollSensitivity&&(a.scrollTop=s=a.scrollTop-o.scrollSpeed)),o.axis&&"y"===o.axis||(n.overflowOffset.left+a.offsetWidth-e.pageX<o.scrollSensitivity?a.scrollLeft=s=a.scrollLeft+o.scrollSpeed:e.pageX-n.overflowOffset.left<o.scrollSensitivity&&(a.scrollLeft=s=a.scrollLeft-o.scrollSpeed))):(o.axis&&"x"===o.axis||(e.pageY-t(r).scrollTop()<o.scrollSensitivity?s=t(r).scrollTop(t(r).scrollTop()-o.scrollSpeed):t(window).height()-(e.pageY-t(r).scrollTop())<o.scrollSensitivity&&(s=t(r).scrollTop(t(r).scrollTop()+o.scrollSpeed))),o.axis&&"y"===o.axis||(e.pageX-t(r).scrollLeft()<o.scrollSensitivity?s=t(r).scrollLeft(t(r).scrollLeft()-o.scrollSpeed):t(window).width()-(e.pageX-t(r).scrollLeft())<o.scrollSensitivity&&(s=t(r).scrollLeft(t(r).scrollLeft()+o.scrollSpeed)))),!1!==s&&t.ui.ddmanager&&!o.dropBehaviour&&t.ui.ddmanager.prepareOffsets(n,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,i,n){var o=n.options;n.snapElements=[],
t(o.snap.constructor!==String?o.snap.items||":data(ui-draggable)":o.snap).each(function(){var e=t(this),i=e.offset();this!==n.element[0]&&n.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:i.top,left:i.left})})},drag:function(e,i,n){var o,s,a,r,l,h,c,u,d,p,f=n.options,g=f.snapTolerance,m=i.offset.left,v=m+n.helperProportions.width,b=i.offset.top,_=b+n.helperProportions.height;for(d=n.snapElements.length-1;d>=0;d--)l=n.snapElements[d].left-n.margins.left,h=l+n.snapElements[d].width,c=n.snapElements[d].top-n.margins.top,u=c+n.snapElements[d].height,v<l-g||m>h+g||_<c-g||b>u+g||!t.contains(n.snapElements[d].item.ownerDocument,n.snapElements[d].item)?(n.snapElements[d].snapping&&n.options.snap.release&&n.options.snap.release.call(n.element,e,t.extend(n._uiHash(),{snapItem:n.snapElements[d].item})),n.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(o=Math.abs(c-_)<=g,s=Math.abs(u-b)<=g,a=Math.abs(l-v)<=g,r=Math.abs(h-m)<=g,o&&(i.position.top=n._convertPositionTo("relative",{top:c-n.helperProportions.height,left:0}).top),s&&(i.position.top=n._convertPositionTo("relative",{top:u,left:0}).top),a&&(i.position.left=n._convertPositionTo("relative",{top:0,left:l-n.helperProportions.width}).left),r&&(i.position.left=n._convertPositionTo("relative",{top:0,left:h}).left)),p=o||s||a||r,"outer"!==f.snapMode&&(o=Math.abs(c-b)<=g,s=Math.abs(u-_)<=g,a=Math.abs(l-m)<=g,r=Math.abs(h-v)<=g,o&&(i.position.top=n._convertPositionTo("relative",{top:c,left:0}).top),s&&(i.position.top=n._convertPositionTo("relative",{top:u-n.helperProportions.height,left:0}).top),a&&(i.position.left=n._convertPositionTo("relative",{top:0,left:l}).left),r&&(i.position.left=n._convertPositionTo("relative",{top:0,left:h-n.helperProportions.width}).left)),!n.snapElements[d].snapping&&(o||s||a||r||p)&&n.options.snap.snap&&n.options.snap.snap.call(n.element,e,t.extend(n._uiHash(),{snapItem:n.snapElements[d].item})),n.snapElements[d].snapping=o||s||a||r||p)}}),t.ui.plugin.add("draggable","stack",{start:function(e,i,n){var o,s=n.options,a=t.makeArray(t(s.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});a.length&&(o=parseInt(t(a[0]).css("zIndex"),10)||0,t(a).each(function(e){t(this).css("zIndex",o+e)}),this.css("zIndex",o+a.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i,n){var o=t(i.helper),s=n.options;o.css("zIndex")&&(s._zIndex=o.css("zIndex")),o.css("zIndex",s.zIndex)},stop:function(e,i,n){var o=n.options;o._zIndex&&t(i.helper).css("zIndex",o._zIndex)}});t.ui.draggable;t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var n=i&&"left"===i?"scrollLeft":"scrollTop",o=!1;return e[n]>0||(e[n]=1,o=e[n]>0,e[n]=0,o)},_create:function(){var e,i=this.options,n=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",function(){i.disabled||(n._removeClass("ui-resizable-autohide"),n._handles.show())}).on("mouseleave",function(){i.disabled||n.resizing||(n._addClass("ui-resizable-autohide"),n._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles()}},_setupHandles:function(){var e,i,n,o,s,a=this.options,r=this;if(this.handles=a.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),n=this.handles.split(","),this.handles={},i=0;i<n.length;i++)e=t.trim(n[i]),o="ui-resizable-"+e,s=t("<div>"),this._addClass(s,"ui-resizable-handle "+o),s.css({zIndex:a.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(s);this._renderAxis=function(e){var i,n,o,s;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(n=t(this.handles[i],this.element),s=/sw|ne|nw|se|n|s/.test(i)?n.outerHeight():n.outerWidth(),o=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(o,s),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){r.resizing||(this.className&&(s=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=s&&s[1]?s[1]:"se")}),a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,n,o=!1;for(i in this.handles)((n=t(this.handles[i])[0])===e.target||t.contains(n,e.target))&&(o=!0);return!this.options.disabled&&o},_mouseStart:function(e){var i,n,o,s=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),n=this._num(this.helper.css("top")),s.containment&&(i+=t(s.containment).scrollLeft()||0,n+=t(s.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:n},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:i,top:n},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof s.aspectRatio?s.aspectRatio:this.originalSize.width/this.originalSize.height||1,o=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===o?this.axis+"-resize":o),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,n,o=this.originalMousePosition,s=this.axis,a=e.pageX-o.left||0,r=e.pageY-o.top||0,l=this._change[s];return this._updatePrevProperties(),!!l&&(i=l.apply(this,[e,a,r]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),n=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(n)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1)},_mouseStop:function(e){this.resizing=!1;var i,n,o,s,a,r,l,h=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,n=i.length&&/textarea/i.test(i[0].nodeName),o=n&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,s=n?0:c.sizeDiff.width,a={width:c.helper.width()-s,height:c.helper.height()-o},r=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,l=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,h.animate||this.element.css(t.extend(a,{top:l,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!h.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,n,o,s,a=this.options;s={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=s.minHeight*this.aspectRatio,n=s.minWidth/this.aspectRatio,i=s.maxHeight*this.aspectRatio,o=s.maxWidth/this.aspectRatio,e>s.minWidth&&(s.minWidth=e),n>s.minHeight&&(s.minHeight=n),i<s.maxWidth&&(s.maxWidth=i),o<s.maxHeight&&(s.maxHeight=o)),this._vBoundaries=s},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,n=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===n&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===n&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,n=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,o=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,s=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,h=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return s&&(t.width=e.minWidth),a&&(t.height=e.minHeight),n&&(t.width=e.maxWidth),o&&(t.height=e.maxHeight),s&&h&&(t.left=r-e.minWidth),n&&h&&(t.left=r-e.maxWidth),a&&c&&(t.top=l-e.minHeight),o&&c&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],n=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],o=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(n[e])||0,i[e]+=parseFloat(o[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e<this._proportionallyResizeElements.length;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var n=this.originalSize;return{top:this.originalPosition.top+i,height:n.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,n){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,n]))},sw:function(e,i,n){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,n]))},ne:function(e,i,n){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,n]))},nw:function(e,i,n){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,n]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),n=i.options,o=i._proportionallyResizeElements,s=o.length&&/textarea/i.test(o[0].nodeName),a=s&&i._hasScroll(o[0],"left")?0:i.sizeDiff.height,r=s?0:i.sizeDiff.width,l={width:i.size.width-r,height:i.size.height-a},h=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(l,c&&h?{top:c,left:h}:{}),{duration:n.animateDuration,easing:n.animateEasing,step:function(){var n={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};o&&o.length&&t(o[0]).css({width:n.width,height:n.height}),i._updateCache(n),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,n,o,s,a,r,l=t(this).resizable("instance"),h=l.options,c=l.element,u=h.containment,d=u instanceof t?u.get(0):/parent/.test(u)?c.parent().get(0):u;d&&(l.containerElement=t(d),/document/.test(u)||u===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,n){i[t]=l._num(e.css("padding"+n))}),l.containerOffset=e.offset(),l.containerPosition=e.position(),l.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},n=l.containerOffset,o=l.containerSize.height,s=l.containerSize.width,a=l._hasScroll(d,"left")?d.scrollWidth:s,r=l._hasScroll(d)?d.scrollHeight:o,l.parentData={element:d,left:n.left,top:n.top,width:a,height:r}))},resize:function(e){var i,n,o,s,a=t(this).resizable("instance"),r=a.options,l=a.containerOffset,h=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(u=l),h.left<(a._helper?l.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-l.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio,p=!1),a.position.left=r.helper?l.left:0),h.top<(a._helper?l.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-l.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,p=!1),a.position.top=a._helper?l.top:0),o=a.containerElement.get(0)===a.element.parent().get(0),s=/relative|absolute/.test(a.containerElement.css("position")),o&&s?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),i=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-u.left:a.offset.left-l.left)),n=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-u.top:a.offset.top-l.top)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio,p=!1)),n+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-n,c&&(a.size.width=a.size.height*a.aspectRatio,p=!1)),p||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,n=e.containerOffset,o=e.containerPosition,s=e.containerElement,a=t(e.helper),r=a.offset(),l=a.outerWidth()-e.sizeDiff.width,h=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(s.css("position"))&&t(this).css({left:r.left-o.left-n.left,width:l,height:h}),e._helper&&!i.animate&&/static/.test(s.css("position"))&&t(this).css({left:r.left-o.left-n.left,width:l,height:h})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),i=e.options;t(i.alsoResize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,i){var n=t(this).resizable("instance"),o=n.options,s=n.originalSize,a=n.originalPosition,r={height:n.size.height-s.height||0,width:n.size.width-s.width||0,top:n.position.top-a.top||0,left:n.position.left-a.left||0};t(o.alsoResize).each(function(){var e=t(this),n=t(this).data("ui-resizable-alsoresize"),o={},s=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(s,function(t,e){var i=(n[e]||0)+(r[e]||0);i&&i>=0&&(o[e]=i||null)}),e.css(o)})},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),!1!==t.uiBackCompat&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),n=i.options,o=i.size,s=i.originalSize,a=i.originalPosition,r=i.axis,l="number"==typeof n.grid?[n.grid,n.grid]:n.grid,h=l[0]||1,c=l[1]||1,u=Math.round((o.width-s.width)/h)*h,d=Math.round((o.height-s.height)/c)*c,p=s.width+u,f=s.height+d,g=n.maxWidth&&n.maxWidth<p,m=n.maxHeight&&n.maxHeight<f,v=n.minWidth&&n.minWidth>p,b=n.minHeight&&n.minHeight>f;n.grid=l,v&&(p+=h),b&&(f+=c),g&&(p-=h),m&&(f-=c),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=a.top-d):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=a.left-u):((f-c<=0||p-h<=0)&&(e=i._getPaddingPlusBorderDimensions(this)),f-c>0?(i.size.height=f,i.position.top=a.top-d):(f=c-e.height,i.size.height=f,i.position.top=a.top+s.height-f),p-h>0?(i.size.width=p,i.position.left=a.left-u):(p=h-e.width,i.size.width=p,i.position.left=a.left+s.width-p))}});t.ui.resizable;t.widget("ui.dialog",{version:"1.12.1",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;i<0&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&!1!==this._trigger("beforeClose",e)&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||t.ui.safeBlur(t.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,i){var n=!1,o=this.uiDialog.siblings(".ui-front:visible").map(function(){return+t(this).css("z-index")}).get(),s=Math.max.apply(null,o);return s>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",s+1),n=!0),n&&!i&&this._trigger("focus",e),n},open:function(){var e=this;if(this._isOpen)return void(this._moveToTop()&&this._focusTabbable());this._isOpen=!0,this.opener=t(t.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._makeFocusTarget(),this._trigger("open")},_focusTabbable:function(){var t=this._focusedElement;t||(t=this.element.find("[autofocus]")),t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).trigger("focus")},_keepFocus:function(e){function i(){var e=t.ui.safeActiveElement(this.document[0]);this.uiDialog[0]===e||t.contains(this.uiDialog[0],e)||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),void this.close(e);if(e.keyCode===t.ui.keyCode.TAB&&!e.isDefaultPrevented()){var i=this.uiDialog.find(":tabbable"),n=i.filter(":first"),o=i.filter(":last");e.target!==o[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==n[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(this._delay(function(){o.trigger("focus")}),e.preventDefault()):(this._delay(function(){n.trigger("focus")}),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=t("<button type='button'></button>").button({label:t("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(e,"ui-dialog-title"),this._title(e),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title?t.text(this.options.title):t.html("&#160;")},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;if(this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length)return void this._removeClass(this.uiDialog,"ui-dialog-buttons");t.each(i,function(i,n){var o,s;n=t.isFunction(n)?{click:n,text:i}:n,n=t.extend({type:"button"},n),o=n.click,s={icon:n.icon,iconPosition:n.iconPosition,showLabel:n.showLabel,icons:n.icons,text:n.text},delete n.click,delete n.icon,delete n.iconPosition,delete n.showLabel,delete n.icons,"boolean"==typeof n.text&&delete n.text,t("<button></button>",n).button(s).appendTo(e.uiButtonSet).on("click",function(){o.apply(e.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog)},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,n=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(n,o){i._addClass(t(this),"ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",n,e(o))},drag:function(t,n){i._trigger("drag",t,e(n))},stop:function(o,s){var a=s.offset.left-i.document.scrollLeft(),r=s.offset.top-i.document.scrollTop();n.position={my:"left top",at:"left"+(a>=0?"+":"")+a+" top"+(r>=0?"+":"")+r,of:i.window},i._removeClass(t(this),"ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",o,e(s))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,n=this.options,o=n.resizable,s=this.uiDialog.css("position"),a="string"==typeof o?o:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:n.maxWidth,maxHeight:n.maxHeight,minWidth:n.minWidth,minHeight:this._minHeight(),handles:a,start:function(n,o){i._addClass(t(this),"ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",n,e(o))},resize:function(t,n){i._trigger("resize",t,e(n))},stop:function(o,s){var a=i.uiDialog.offset(),r=a.left-i.document.scrollLeft(),l=a.top-i.document.scrollTop();n.height=i.uiDialog.height(),n.width=i.uiDialog.width(),n.position={my:"left top",at:"left"+(r>=0?"+":"")+r+" top"+(l>=0?"+":"")+l,of:i.window},i._removeClass(t(this),"ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",o,e(s))}}).css("position",s)},_trackFocus:function(){this._on(this.widget(),{focusin:function(e){this._makeFocusTarget(),this._focusedElement=t(e.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var e=this._trackingInstances(),i=t.inArray(this,e);-1!==i&&e.splice(i,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||(t=[],this.document.data("ui-dialog-instances",t)),t},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(e){var i=this,n=!1,o={};t.each(e,function(t,e){i._setOption(t,e),t in i.sizeRelatedOptions&&(n=!0),t in i.resizableRelatedOptions&&(o[t]=e)}),n&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",o)},_setOption:function(e,i){var n,o,s=this.uiDialog;"disabled"!==e&&(this._super(e,i),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:t("<a>").text(""+this.options.closeText).html()}),"draggable"===e&&(n=s.is(":data(ui-draggable)"),n&&!i&&s.draggable("destroy"),!n&&i&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(o=s.is(":data(ui-resizable)"),o&&!i&&s.resizable("destroy"),o&&"string"==typeof i&&s.resizable("option","handles",i),o||!1===i||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,n=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),n.minWidth>n.width&&(n.width=n.minWidth),t=this.uiDialog.css({height:"auto",width:n.width}).outerHeight(),e=Math.max(0,n.minHeight-t),i="number"==typeof n.maxHeight?Math.max(0,n.maxHeight-t):"none","auto"===n.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,n.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),
delete this.iframeBlocks)},_allowInteraction:function(e){return!!t(e.target).closest(".ui-dialog").length||!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=!0;this._delay(function(){e=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(t){e||this._allowInteraction(t)||(t.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=t("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var t=this.document.data("ui-dialog-overlays")-1;t?this.document.data("ui-dialog-overlays",t):(this._off(this.document,"focusin"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),!1!==t.uiBackCompat&&t.widget("ui.dialog",t.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(t,e){"dialogClass"===t&&this.uiDialog.removeClass(this.options.dialogClass).addClass(e),this._superApply(arguments)}});t.ui.dialog;t.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,i=this.options,n=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(n)?n:function(t){return t.is(n)},this.proportions=function(){if(!arguments.length)return e||(e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight});e=arguments[0]},this._addToManager(i.scope),i.addClasses&&this._addClass("ui-droppable")},_addToManager:function(e){t.ui.ddmanager.droppables[e]=t.ui.ddmanager.droppables[e]||[],t.ui.ddmanager.droppables[e].push(this)},_splice:function(t){for(var e=0;e<t.length;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var e=t.ui.ddmanager.droppables[this.options.scope];this._splice(e)},_setOption:function(e,i){if("accept"===e)this.accept=t.isFunction(i)?i:function(t){return t.is(i)};else if("scope"===e){var n=t.ui.ddmanager.droppables[this.options.scope];this._splice(n),this._addToManager(i)}this._super(e,i)},_activate:function(e){var i=t.ui.ddmanager.current;this._addActiveClass(),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this._removeActiveClass(),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._addHoverClass(),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeHoverClass(),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var n=i||t.ui.ddmanager.current,o=!1;return!(!n||(n.currentItem||n.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i=t(this).droppable("instance");if(i.options.greedy&&!i.options.disabled&&i.options.scope===n.options.scope&&i.accept.call(i.element[0],n.currentItem||n.element)&&g(n,t.extend(i,{offset:i.element.offset()}),i.options.tolerance,e))return o=!0,!1}),!o&&(!!this.accept.call(this.element[0],n.currentItem||n.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(n)),this.element)))},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});var g=t.ui.intersect=function(){function t(t,e,i){return t>=e&&t<e+i}return function(e,i,n,o){if(!i.offset)return!1;var s=(e.positionAbs||e.position.absolute).left+e.margins.left,a=(e.positionAbs||e.position.absolute).top+e.margins.top,r=s+e.helperProportions.width,l=a+e.helperProportions.height,h=i.offset.left,c=i.offset.top,u=h+i.proportions().width,d=c+i.proportions().height;switch(n){case"fit":return h<=s&&r<=u&&c<=a&&l<=d;case"intersect":return h<s+e.helperProportions.width/2&&r-e.helperProportions.width/2<u&&c<a+e.helperProportions.height/2&&l-e.helperProportions.height/2<d;case"pointer":return t(o.pageY,c,i.proportions().height)&&t(o.pageX,h,i.proportions().width);case"touch":return(a>=c&&a<=d||l>=c&&l<=d||a<c&&l>d)&&(s>=h&&s<=u||r>=h&&r<=u||s<h&&r>u);default:return!1}}}();t.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(e,i){var n,o,s=t.ui.ddmanager.droppables[e.options.scope]||[],a=i?i.type:null,r=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(n=0;n<s.length;n++)if(!(s[n].options.disabled||e&&!s[n].accept.call(s[n].element[0],e.currentItem||e.element))){for(o=0;o<r.length;o++)if(r[o]===s[n].element[0]){s[n].proportions().height=0;continue t}s[n].visible="none"!==s[n].element.css("display"),s[n].visible&&("mousedown"===a&&s[n]._activate.call(s[n],i),s[n].offset=s[n].element.offset(),s[n].proportions({width:s[n].element[0].offsetWidth,height:s[n].element[0].offsetHeight}))}},drop:function(e,i){var n=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&g(e,this,this.options.tolerance,i)&&(n=this._drop.call(this,i)||n),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),n},dragStart:function(e,i){e.element.parentsUntil("body").on("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var n,o,s,a=g(e,this,this.options.tolerance,i),r=!a&&this.isover?"isout":a&&!this.isover?"isover":null;r&&(this.options.greedy&&(o=this.options.scope,s=this.element.parents(":data(ui-droppable)").filter(function(){return t(this).droppable("instance").options.scope===o}),s.length&&(n=t(s[0]).droppable("instance"),n.greedyChild="isover"===r)),n&&"isover"===r&&(n.isover=!1,n.isout=!0,n._out.call(n,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),n&&"isout"===r&&(n.isout=!1,n.isover=!0,n._over.call(n,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").off("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}},!1!==t.uiBackCompat&&t.widget("ui.droppable",t.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}});t.ui.droppable,t.widget("ui.progressbar",{version:"1.12.1",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=t("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(t){if(void 0===t)return this.options.value;this.options.value=this._constrainedValue(t),this._refreshValue()},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=!1===t,"number"!=typeof t&&(t=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).width(i.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,e===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}}),t.widget("ui.selectable",t.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e.elementPos=t(e.element[0]).offset(),e.selectees=t(e.options.filter,e.element[0]),e._addClass(e.selectees,"ui-selectee"),e.selectees.each(function(){var i=t(this),n=i.offset(),o={left:n.left-e.elementPos.left,top:n.top-e.elementPos.top};t.data(this,"selectable-item",{element:this,$element:i,left:o.left,top:o.top,right:o.left+i.outerWidth(),bottom:o.top+i.outerHeight(),startselected:!1,selected:i.hasClass("ui-selected"),selecting:i.hasClass("ui-selecting"),unselecting:i.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=t("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(e){var i=this,n=this.options;this.opos=[e.pageX,e.pageY],this.elementPos=t(this.element[0]).offset(),this.options.disabled||(this.selectees=t(n.filter,this.element[0]),this._trigger("start",e),t(n.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),n.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var n=t.data(this,"selectable-item");n.startselected=!0,e.metaKey||e.ctrlKey||(i._removeClass(n.$element,"ui-selected"),n.selected=!1,i._addClass(n.$element,"ui-unselecting"),n.unselecting=!0,i._trigger("unselecting",e,{unselecting:n.element}))}),t(e.target).parents().addBack().each(function(){var n,o=t.data(this,"selectable-item");if(o)return n=!e.metaKey&&!e.ctrlKey||!o.$element.hasClass("ui-selected"),i._removeClass(o.$element,n?"ui-unselecting":"ui-selected")._addClass(o.$element,n?"ui-selecting":"ui-unselecting"),o.unselecting=!n,o.selecting=n,o.selected=n,n?i._trigger("selecting",e,{selecting:o.element}):i._trigger("unselecting",e,{unselecting:o.element}),!1}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,n=this,o=this.options,s=this.opos[0],a=this.opos[1],r=e.pageX,l=e.pageY;return s>r&&(i=r,r=s,s=i),a>l&&(i=l,l=a,a=i),this.helper.css({left:s,top:a,width:r-s,height:l-a}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),h=!1,c={};i&&i.element!==n.element[0]&&(c.left=i.left+n.elementPos.left,c.right=i.right+n.elementPos.left,c.top=i.top+n.elementPos.top,c.bottom=i.bottom+n.elementPos.top,"touch"===o.tolerance?h=!(c.left>r||c.right<s||c.top>l||c.bottom<a):"fit"===o.tolerance&&(h=c.left>s&&c.right<r&&c.top>a&&c.bottom<l),h?(i.selected&&(n._removeClass(i.$element,"ui-selected"),i.selected=!1),i.unselecting&&(n._removeClass(i.$element,"ui-unselecting"),i.unselecting=!1),i.selecting||(n._addClass(i.$element,"ui-selecting"),i.selecting=!0,n._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(n._removeClass(i.$element,"ui-selecting"),i.selecting=!1,n._addClass(i.$element,"ui-selected"),i.selected=!0):(n._removeClass(i.$element,"ui-selecting"),i.selecting=!1,i.startselected&&(n._addClass(i.$element,"ui-unselecting"),i.unselecting=!0),n._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(n._removeClass(i.$element,"ui-selected"),i.selected=!1,n._addClass(i.$element,"ui-unselecting"),i.unselecting=!0,n._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var n=t.data(this,"selectable-item");i._removeClass(n.$element,"ui-unselecting"),n.unselecting=!1,n.startselected=!1,i._trigger("unselected",e,{unselected:n.element})}),t(".ui-selecting",this.element[0]).each(function(){var n=t.data(this,"selectable-item");i._removeClass(n.$element,"ui-selecting")._addClass(n.$element,"ui-selected"),n.selecting=!1,n.selected=!0,n.startselected=!0,i._trigger("selected",e,{selected:n.element})}),this._trigger("stop",e),this.helper.remove(),!1}}),t.widget("ui.selectmenu",[t.ui.formResetMixin,{version:"1.12.1",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var e=this.element.uniqueId().attr("id");this.ids={element:e,button:e+"-button",menu:e+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=t()},_drawButton:function(){var e,i=this,n=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(t){this.button.focus(),t.preventDefault()}}),this.element.hide(),this.button=t("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),e=t("<span>").appendTo(this.button),this._addClass(e,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(n).appendTo(this.button),!1!==this.options.width&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){i._rendered||i._refreshMenu()})},_drawMenu:function(){var e=this;this.menu=t("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=t("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(t,i){t.preventDefault(),e._setSelection(),e._select(i.item.data("ui-selectmenu-item"),t)},focus:function(t,i){var n=i.item.data("ui-selectmenu-item");null!=e.focusIndex&&n.index!==e.focusIndex&&(e._trigger("focus",t,{item:n}),e.isOpen||e._select(n,t)),e.focusIndex=n.index,e.button.attr("aria-activedescendant",e.menuItems.eq(n.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var t,e=this.element.find("option");this.menu.empty(),this._parseOptions(e),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,e.length&&(t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t)))},_position:function(){this.menuWrap.position(t.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(e){var i=t("<span>");return this._setText(i,e.label),this._addClass(i,"ui-selectmenu-text"),i},_renderMenu:function(e,i){var n=this,o="";t.each(i,function(i,s){var a;s.optgroup!==o&&(a=t("<li>",{text:s.optgroup}),n._addClass(a,"ui-selectmenu-optgroup","ui-menu-divider"+(s.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),a.appendTo(e),o=s.optgroup),n._renderItemData(e,s)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(e,i){var n=t("<li>"),o=t("<div>",{title:i.element.attr("title")});return i.disabled&&this._addClass(n,null,"ui-state-disabled"),this._setText(o,i.label),n.append(o).appendTo(e)},_setText:function(t,e){e?t.text(e):t.html("&#160;")},_move:function(t,e){var i,n,o=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex).parent("li"):(i=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),o+=":not(.ui-state-disabled)"),n="first"===t||"last"===t?i["first"===t?"prevAll":"nextAll"](o).eq(-1):i[t+"All"](o).eq(0),n.length&&this.menuInstance.focus(e,n)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&(window.getSelection?(t=window.getSelection(),t.removeAllRanges(),t.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(e){this.isOpen&&(t(e.target).closest(".ui-selectmenu-menu, #"+t.ui.escapeSelector(this.ids.button)).length||this.close(e))}},_buttonEvents:{mousedown:function(){var t;window.getSelection?(t=window.getSelection(),t.rangeCount&&(this.range=t.getRangeAt(0))):this.range=document.selection.createRange()},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(e){var i=!0;switch(e.keyCode){case t.ui.keyCode.TAB:case t.ui.keyCode.ESCAPE:this.close(e),i=!1;break;case t.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(e);break;case t.ui.keyCode.UP:e.altKey?this._toggle(e):this._move("prev",e);break;case t.ui.keyCode.DOWN:e.altKey?this._toggle(e):this._move("next",e);break;case t.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(e):this._toggle(e);break;case t.ui.keyCode.LEFT:this._move("prev",e);break;case t.ui.keyCode.RIGHT:this._move("next",e);break;case t.ui.keyCode.HOME:case t.ui.keyCode.PAGE_UP:this._move("first",e);break;case t.ui.keyCode.END:case t.ui.keyCode.PAGE_DOWN:this._move("last",e);break;default:this.menu.trigger(e),i=!1}i&&e.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex).parent("li");e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(t)),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==i&&this._trigger("change",e,{item:t}),this.close(e)},_setAria:function(t){var e=this.menuItems.eq(t.index).attr("id");this.button.attr({"aria-labelledby":e,"aria-activedescendant":e}),this.menu.attr("aria-activedescendant",e)},_setOption:function(t,e){if("icons"===t){var i=this.button.find("span.ui-icon");this._removeClass(i,null,this.options.icons.button)._addClass(i,null,e.button)}this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"width"===t&&this._resizeButton()},_setOptionDisabled:function(t){this._super(t),this.menuInstance.option("disabled",t),this.button.attr("aria-disabled",t),this._toggleClass(this.button,null,"ui-state-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;if(!1===t)return void this.button.css("width","");null===t&&(t=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(t)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var t=this._super();return t.disabled=this.element.prop("disabled"),t},_parseOptions:function(e){var i=this,n=[];e.each(function(e,o){n.push(i._parseOption(t(o),e))}),this.items=n},_parseOption:function(t,e){var i=t.parent("optgroup");return{element:t,index:e,value:t.val(),label:t.text(),optgroup:i.attr("label")||"",disabled:i.prop("disabled")||t.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),t.widget("ui.slider",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,n=this.options,o=this.element.find(".ui-slider-handle"),s=[];for(i=n.values&&n.values.length||1,o.length>i&&(o.slice(i).remove(),o=o.slice(0,i)),e=o.length;e<i;e++)s.push("<span tabindex='0'></span>");this.handles=o.add(t(s.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e).attr("tabIndex",0)})},_createRange:function(){var e=this.options;e.range?(!0===e.range&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=t("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==e.range&&"max"!==e.range||this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var i,n,o,s,a,r,l,h=this,c=this.options;return!c.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},n=this._normValueFromMouse(i),o=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(n-h.values(e));(o>i||o===i&&(e===h._lastChangedValue||h.values(e)===c.min))&&(o=i,s=t(this),a=e)}),!1!==this._start(e,a)&&(this._mouseSliding=!0,this._handleIndex=a,this._addClass(s,null,"ui-state-active"),s.trigger("focus"),r=s.offset(),l=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-r.left-s.width()/2,top:e.pageY-r.top-s.height()/2-(parseInt(s.css("borderTopWidth"),10)||0)-(parseInt(s.css("borderBottomWidth"),10)||0)+(parseInt(s.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,n),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,n,o,s;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),n=i/e,n>1&&(n=1),n<0&&(n=0),"vertical"===this.orientation&&(n=1-n),o=this._valueMax()-this._valueMin(),s=this._valueMin()+n*o,this._trimAlignValue(s)},_uiHash:function(t,e,i){var n={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(n.value=void 0!==e?e:this.values(t),n.values=i||this.values()),n},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var n,o=this.value(),s=this.values();this._hasMultipleValues()&&(n=this.values(e?0:1),o=this.values(e),2===this.options.values.length&&!0===this.options.range&&(i=0===e?Math.min(n,i):Math.max(n,i)),s[e]=i),i!==o&&!1!==this._trigger("slide",t,this._uiHash(e,i,s))&&(this._hasMultipleValues()?this.values(e,i):this.value(i))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),void this._change(null,0)):this._value()},values:function(e,i){var n,o,s;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),void this._change(null,e);if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this._hasMultipleValues()?this._values(e):this.value();for(n=this.options.values,o=arguments[0],s=0;s<n.length;s+=1)n[s]=this._trimAlignValue(o[s]),this._change(null,s);this._refreshValue()},_setOption:function(e,i){var n,o=0;switch("range"===e&&!0===this.options.range&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(o=this.options.values.length),this._super(e,i),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(i),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),n=o-1;n>=0;n--)this._change(null,n);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,n;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this._hasMultipleValues()){for(i=this.options.values.slice(),n=0;n<i.length;n+=1)i[n]=this._trimAlignValue(i[n]);return i}return[]},_trimAlignValue:function(t){if(t<=this._valueMin())return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,n=t-i;return 2*Math.abs(i)>=e&&(n+=i>0?e:-e),parseFloat(n.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step;t=Math.round((t-e)/i)*i+e,t>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=t.toString(),i=e.indexOf(".");return-1===i?0:e.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,i,n,o,s,a=this.options.range,r=this.options,l=this,h=!this._animateOff&&r.animate,c={};this._hasMultipleValues()?this.handles.each(function(n){i=(l.values(n)-l._valueMin())/(l._valueMax()-l._valueMin())*100,c["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[h?"animate":"css"](c,r.animate),!0===l.options.range&&("horizontal"===l.orientation?(0===n&&l.range.stop(1,1)[h?"animate":"css"]({left:i+"%"},r.animate),1===n&&l.range[h?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===n&&l.range.stop(1,1)[h?"animate":"css"]({bottom:i+"%"},r.animate),1===n&&l.range[h?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(n=this.value(),o=this._valueMin(),s=this._valueMax(),i=s!==o?(n-o)/(s-o)*100:0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[h?"animate":"css"](c,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:100-i+"%"},r.animate),
"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:100-i+"%"},r.animate))},_handleEvents:{keydown:function(e){var i,n,o,s=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(t(e.target),null,"ui-state-active"),!1===this._start(e,s)))return}switch(o=this.options.step,i=n=this._hasMultipleValues()?this.values(s):this.value(),e.keyCode){case t.ui.keyCode.HOME:n=this._valueMin();break;case t.ui.keyCode.END:n=this._valueMax();break;case t.ui.keyCode.PAGE_UP:n=this._trimAlignValue(i+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(i-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(i===this._valueMax())return;n=this._trimAlignValue(i+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i===this._valueMin())return;n=this._trimAlignValue(i-o)}this._slide(e,s,n)},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),this._removeClass(t(e.target),null,"ui-state-active"))}}}),t.widget("ui.sortable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return t>=e&&t<e+i},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){var e=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),t.each(this.items,function(){e._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,i){var n=null,o=!1,s=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(e),t(e.target).parents().each(function(){if(t.data(this,s.widgetName+"-item")===s)return n=t(this),!1}),t.data(e.target,s.widgetName+"-item")===s&&(n=t(e.target)),!!n&&(!(this.options.handle&&!i&&(t(this.options.handle,n).find("*").addBack().each(function(){this===e.target&&(o=!0)}),!o))&&(this.currentItem=n,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(e,i,n){var o,s,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(s=this.document.find("body"),this.storedCursor=s.css("cursor"),s.css("cursor",a.cursor),this.storedStylesheet=t("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(s)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!n)for(o=this.containers.length-1;o>=0;o--)this.containers[o]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,n,o,s,a=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+a.scrollSpeed:e.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+a.scrollSpeed:e.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(e.pageY-this.document.scrollTop()<a.scrollSensitivity?r=this.document.scrollTop(this.document.scrollTop()-a.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<a.scrollSensitivity&&(r=this.document.scrollTop(this.document.scrollTop()+a.scrollSpeed)),e.pageX-this.document.scrollLeft()<a.scrollSensitivity?r=this.document.scrollLeft(this.document.scrollLeft()-a.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<a.scrollSensitivity&&(r=this.document.scrollLeft(this.document.scrollLeft()+a.scrollSpeed))),!1!==r&&t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(n=this.items[i],o=n.item[0],(s=this._intersectsWithPointer(n))&&n.instance===this.currentContainer&&!(o===this.currentItem[0]||this.placeholder[1===s?"next":"prev"]()[0]===o||t.contains(this.placeholder[0],o)||"semi-dynamic"===this.options.type&&t.contains(this.element[0],o))){if(this.direction=1===s?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(n))break;this._rearrange(e,n),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var n=this,o=this.placeholder.offset(),s=this.options.axis,a={};s&&"x"!==s||(a.left=o.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),s&&"y"!==s||(a.top=o.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){n._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new t.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),n=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&n.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!n.length&&e.key&&n.push(e.key+"="),n.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),n=[];return e=e||{},i.each(function(){n.push(t(e.item||this).attr(e.attribute||"id")||"")}),n},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,n=this.positionAbs.top,o=n+this.helperProportions.height,s=t.left,a=s+t.width,r=t.top,l=r+t.height,h=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||n+h>r&&n+h<l,d="y"===this.options.axis||e+c>s&&e+c<a,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:s<e+this.helperProportions.width/2&&i-this.helperProportions.width/2<a&&r<n+this.helperProportions.height/2&&o-this.helperProportions.height/2<l},_intersectsWithPointer:function(t){var e,i,n="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),o="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width);return!(!n||!o)&&(e=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection(),this.floating?"right"===i||"down"===e?2:1:e&&("down"===e?2:1))},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),n=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&i||"left"===o&&!i:n&&("down"===n&&e||"up"===n&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){r.push(this)}var n,o,s,a,r=[],l=[],h=this._connectWith();if(h&&e)for(n=h.length-1;n>=0;n--)for(s=t(h[n],this.document[0]),o=s.length-1;o>=0;o--)(a=t.data(s[o],this.widgetFullName))&&a!==this&&!a.options.disabled&&l.push([t.isFunction(a.options.items)?a.options.items.call(a.element):t(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);for(l.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),n=l.length-1;n>=0;n--)l[n][0].each(i);return t(r)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;i<e.length;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,n,o,s,a,r,l,h,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(o=t(d[i],this.document[0]),n=o.length-1;n>=0;n--)(s=t.data(o[n],this.widgetFullName))&&s!==this&&!s.options.disabled&&(u.push([t.isFunction(s.options.items)?s.options.items.call(s.element[0],e,{item:this.currentItem}):t(s.options.items,s.element),s]),this.containers.push(s));for(i=u.length-1;i>=0;i--)for(a=u[i][1],r=u[i][0],n=0,h=r.length;n<h;n++)l=t(r[n]),l.data(this.widgetName+"-item",a),c.push({item:l,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,n,o,s;for(i=this.items.length-1;i>=0;i--)n=this.items[i],n.instance!==this.currentContainer&&this.currentContainer&&n.item[0]!==this.currentItem[0]||(o=this.options.toleranceElement?t(this.options.toleranceElement,n.item):n.item,e||(n.width=o.outerWidth(),n.height=o.outerHeight()),s=o.offset(),n.left=s.left,n.top=s.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)s=this.containers[i].element.offset(),this.containers[i].containerCache.left=s.left,this.containers[i].containerCache.top=s.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,n=e.options;n.placeholder&&n.placeholder.constructor!==String||(i=n.placeholder,n.placeholder={element:function(){var n=e.currentItem[0].nodeName.toLowerCase(),o=t("<"+n+">",e.document[0]);return e._addClass(o,"ui-sortable-placeholder",i||e.currentItem[0].className)._removeClass(o,"ui-sortable-helper"),"tbody"===n?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(o)):"tr"===n?e._createTrPlaceholder(e.currentItem,o):"img"===n&&o.attr("src",e.currentItem.attr("src")),i||o.css("visibility","hidden"),o},update:function(t,o){i&&!n.forcePlaceholderSize||(o.height()||o.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),o.width()||o.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(n.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),n.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,i){var n=this;e.children().each(function(){t("<td>&#160;</td>",n.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(i)})},_contactContainers:function(e){var i,n,o,s,a,r,l,h,c,u,d=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!t.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(d&&t.contains(this.containers[i].element[0],d.element[0]))continue;d=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",e,this._uiHash(this)),this.containers[i].containerCache.over=0);if(d)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(o=1e4,s=null,c=d.floating||this._isFloating(this.currentItem),a=c?"left":"top",r=c?"width":"height",u=c?"pageX":"pageY",n=this.items.length-1;n>=0;n--)t.contains(this.containers[p].element[0],this.items[n].item[0])&&this.items[n].item[0]!==this.currentItem[0]&&(l=this.items[n].item.offset()[a],h=!1,e[u]-l>this.items[n][r]/2&&(h=!0),Math.abs(e[u]-l)<o&&(o=Math.abs(e[u]-l),s=this.items[n],this.direction=h?"up":"down"));if(!s&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return void(this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1));s?this._rearrange(e,s,null,!0):this._rearrange(e,null,this.containers[p].element,!0),this._trigger("change",e,this._uiHash()),this.containers[p]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(e){var i=this.options,n=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return n.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(n[0]),n[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),n[0].style.width&&!i.forceHelperSize||n.width(this.currentItem.width()),n[0].style.height&&!i.forceHelperSize||n.height(this.currentItem.height()),n},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,n,o=this.options;"parent"===o.containment&&(o.containment=this.helper[0].parentNode),"document"!==o.containment&&"window"!==o.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===o.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===o.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(o.containment)||(e=t(o.containment)[0],i=t(o.containment).offset(),n="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(n?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(n?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var n="absolute"===e?1:-1,o="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,s=/(html|body)/i.test(o[0].tagName);return{top:i.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():s?0:o.scrollTop())*n,left:i.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():s?0:o.scrollLeft())*n}},_generatePosition:function(e){var i,n,o=this.options,s=e.pageX,a=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(s=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(s=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),o.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/o.grid[1])*o.grid[1],a=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-o.grid[1]:i+o.grid[1]:i,n=this.originalPageX+Math.round((s-this.originalPageX)/o.grid[0])*o.grid[0],s=this.containment?n-this.offset.click.left>=this.containment[0]&&n-this.offset.click.left<=this.containment[2]?n:n-this.offset.click.left>=this.containment[0]?n-o.grid[0]:n+o.grid[0]:n)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:r.scrollTop()),left:s-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:r.scrollLeft())}},_rearrange:function(t,e,i,n){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var o=this.counter;this._delay(function(){o===this.counter&&this.refreshPositions(!n)})},_clear:function(t,e){function i(t,e,i){return function(n){i._trigger(t,n,e._uiHash(e))}}this.reverting=!1;var n,o=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(n in this._storedCSS)"auto"!==this._storedCSS[n]&&"static"!==this._storedCSS[n]||(this._storedCSS[n]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&o.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||o.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(o.push(function(t){this._trigger("remove",t,this._uiHash())}),o.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),o.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),n=this.containers.length-1;n>=0;n--)e||o.push(i("deactivate",this,this.containers[n])),this.containers[n].containerCache.over&&(o.push(i("out",this,this.containers[n])),this.containers[n].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(n=0;n<o.length;n++)o[n].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===t.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}});t.widget("ui.spinner",{version:"1.12.1",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e=this._super(),i=this.element;return t.each(["min","max","step"],function(t,n){var o=i.attr(n);null!=o&&o.length&&(e[n]=o)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){if(this.cancelBlur)return void delete this.cancelBlur;this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t)},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){this.element[0]===t.ui.safeActiveElement(this.document[0])||(this.element.trigger("focus"),this.previous=n,this._delay(function(){this.previous=n}))}var n;n=this.element[0]===t.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),!1!==this._start(e)&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){if(t(e.currentTarget).hasClass("ui-state-active"))return!1!==this._start(e)&&void this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&this.uiSpinner.height()>0&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(e){var i=this.options,n=t.ui.keyCode;switch(e.keyCode){case n.UP:return this._repeat(null,1,e),!0;case n.DOWN:return this._repeat(null,-1,e),!0;case n.PAGE_UP:return this._repeat(null,i.page,e),!0;case n.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_start:function(t){return!(!this.spinning&&!1===this._trigger("start",t))&&(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&!1===this._trigger("spin",e,{value:i})||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=t.toString(),i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,n=this.options;return e=null!==n.min?n.min:0,i=t-e,i=Math.round(i/n.step)*n.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==n.max&&t>n.max?n.max:null!==n.min&&t<n.min?n.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){var i,n,o;if("culture"===t||"numberFormat"===t)return i=this._parse(this.element.val()),this.options[t]=e,void this.element.val(this._format(i));"max"!==t&&"min"!==t&&"step"!==t||"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(n=this.buttons.first().find(".ui-icon"),this._removeClass(n,null,this.options.icons.up),this._addClass(n,null,e.up),o=this.buttons.last().find(".ui-icon"),this._removeClass(o,null,this.options.icons.down),this._addClass(o,null,e.down)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable")},_setOptions:r(function(t){this._super(t)}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var t=this.value()
;return null!==t&&t===this._adjustValue(t)},_value:function(t,e){var i;""!==t&&null!==(i=this._parse(t))&&(e||(i=this._adjustValue(i)),t=this._format(i)),this.element.val(t),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:r(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:r(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:r(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:r(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){if(!arguments.length)return this._parse(this.element.val());r(this._value).call(this,t)},widget:function(){return this.uiSpinner}}),!1!==t.uiBackCompat&&t.widget("ui.spinner",t.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}});t.ui.spinner;t.widget("ui.tabs",{version:"1.12.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var t=/#.*$/;return function(e){var i,n;i=e.href.replace(t,""),n=location.href.replace(t,"");try{i=decodeURIComponent(i)}catch(t){}try{n=decodeURIComponent(n)}catch(t){}return e.hash.length>1&&i===n}}(),_create:function(){var e=this,i=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,i.collapsible),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),!1!==this.options.active&&this.anchors.length?this.active=this._findActive(i.active):this.active=t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var e=this.options.active,i=this.options.collapsible,n=location.hash.substring(1);return null===e&&(n&&this.tabs.each(function(i,o){if(t(o).attr("aria-controls")===n)return e=i,!1}),null===e&&(e=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),null!==e&&-1!==e||(e=!!this.tabs.length&&0)),!1!==e&&-1===(e=this.tabs.index(this.tabs.eq(e)))&&(e=!i&&0),!i&&!1===e&&this.anchors.length&&(e=0),e},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(e){var i=t(t.ui.safeActiveElement(this.document[0])).closest("li"),n=this.tabs.index(i),o=!0;if(!this._handlePageNav(e)){switch(e.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:n++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:o=!1,n--;break;case t.ui.keyCode.END:n=this.anchors.length-1;break;case t.ui.keyCode.HOME:n=0;break;case t.ui.keyCode.SPACE:return e.preventDefault(),clearTimeout(this.activating),void this._activate(n);case t.ui.keyCode.ENTER:return e.preventDefault(),clearTimeout(this.activating),void this._activate(n!==this.options.active&&n);default:return}e.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,o),e.ctrlKey||e.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(e){return e.altKey&&e.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):e.altKey&&e.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(e,i){for(var n=this.tabs.length-1;-1!==t.inArray(function(){return e>n&&(e=0),e<0&&(e=n),e}(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).trigger("focus"),t},_setOption:function(t,e){if("active"===t)return void this._activate(e);this._super(t,e),"collapsible"===t&&(this._toggleClass("ui-tabs-collapsible",null,e),e||!1!==this.options.active||this._activate(0)),"event"===t&&this._setupEvents(e),"heightStyle"===t&&this._setupHeightStyle(e)},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),!1!==e.active&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this,i=this.tabs,n=this.anchors,o=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).attr({role:"presentation",tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=t(),this.anchors.each(function(i,n){var o,s,a,r=t(n).uniqueId().attr("id"),l=t(n).closest("li"),h=l.attr("aria-controls");e._isLocal(n)?(o=n.hash,a=o.substring(1),s=e.element.find(e._sanitizeSelector(o))):(a=l.attr("aria-controls")||t({}).uniqueId()[0].id,o="#"+a,s=e.element.find(o),s.length||(s=e._createPanel(a),s.insertAfter(e.panels[i-1]||e.tablist)),s.attr("aria-live","polite")),s.length&&(e.panels=e.panels.add(s)),h&&l.data("ui-tabs-aria-controls",h),l.attr({"aria-controls":a,"aria-labelledby":r}),s.attr("aria-labelledby",r)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),i&&(this._off(i.not(this.tabs)),this._off(n.not(this.anchors)),this._off(o.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(e){var i,n,o;for(t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1),o=0;n=this.tabs[o];o++)i=t(n),!0===e||-1!==t.inArray(o,e)?(i.attr("aria-disabled","true"),this._addClass(i,null,"ui-state-disabled")):(i.removeAttr("aria-disabled"),this._removeClass(i,null,"ui-state-disabled"));this.options.disabled=e,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!0===e)},_setupEvents:function(e){var i={};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,n=this.element.parent();"fill"===e?(i=n.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),n=e.css("position");"absolute"!==n&&"fixed"!==n&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,n=this.active,o=t(e.currentTarget),s=o.closest("li"),a=s[0]===n[0],r=a&&i.collapsible,l=r?t():this._getPanelForTab(s),h=n.length?this._getPanelForTab(n):t(),c={oldTab:n,oldPanel:h,newTab:r?t():s,newPanel:l};e.preventDefault(),s.hasClass("ui-state-disabled")||s.hasClass("ui-tabs-loading")||this.running||a&&!i.collapsible||!1===this._trigger("beforeActivate",e,c)||(i.active=!r&&this.tabs.index(s),this.active=a?t():s,this.xhr&&this.xhr.abort(),h.length||l.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),l.length&&this.load(this.tabs.index(s),e),this._toggle(e,c))},_toggle:function(e,i){function n(){s.running=!1,s._trigger("activate",e,i)}function o(){s._addClass(i.newTab.closest("li"),"ui-tabs-active","ui-state-active"),a.length&&s.options.show?s._show(a,s.options.show,n):(a.show(),n())}var s=this,a=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){s._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),o()}):(this._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),r.hide(),o()),r.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),a.length&&r.length?i.oldTab.attr("tabIndex",-1):a.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),a.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(e){var i,n=this._findActive(e);n[0]!==this.active[0]&&(n.length||(n=this.active),i=n.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return!1===e?t():this.tabs.eq(e)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+t.ui.escapeSelector(e)+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(e){var i=this.options.disabled;!1!==i&&(void 0===e?i=!1:(e=this._getIndex(e),i=t.isArray(i)?t.map(i,function(t){return t!==e?t:null}):t.map(this.tabs,function(t,i){return i!==e?i:null})),this._setOptionDisabled(i))},disable:function(e){var i=this.options.disabled;if(!0!==i){if(void 0===e)i=!0;else{if(e=this._getIndex(e),-1!==t.inArray(e,i))return;i=t.isArray(i)?t.merge([e],i).sort():[e]}this._setOptionDisabled(i)}},load:function(e,i){e=this._getIndex(e);var n=this,o=this.tabs.eq(e),s=o.find(".ui-tabs-anchor"),a=this._getPanelForTab(o),r={tab:o,panel:a},l=function(t,e){"abort"===e&&n.panels.stop(!1,!0),n._removeClass(o,"ui-tabs-loading"),a.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr};this._isLocal(s[0])||(this.xhr=t.ajax(this._ajaxSettings(s,i,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(o,"ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.done(function(t,e,o){setTimeout(function(){a.html(t),n._trigger("load",i,r),l(o,e)},1)}).fail(function(t,e){setTimeout(function(){l(t,e)},1)})))},_ajaxSettings:function(e,i,n){var o=this;return{url:e.attr("href").replace(/#.*$/,""),beforeSend:function(e,s){return o._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:s},n))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),!1!==t.uiBackCompat&&t.widget("ui.tabs",t.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}});t.ui.tabs;t.widget("ui.tooltip",{version:"1.12.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(e,i){var n=(e.attr("aria-describedby")||"").split(/\s+/);n.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(n.join(" ")))},_removeDescribedBy:function(e){var i=e.data("ui-tooltip-id"),n=(e.attr("aria-describedby")||"").split(/\s+/),o=t.inArray(i,n);-1!==o&&n.splice(o,1),e.removeData("ui-tooltip-id"),n=t.trim(n.join(" ")),n?e.attr("aria-describedby",n):e.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=t("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=t([])},_setOption:function(e,i){var n=this;this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){n._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var e=this;t.each(this.tooltips,function(i,n){var o=t.Event("blur");o.target=o.currentTarget=n.element[0],e.close(o,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var e=t(this);if(e.is("[title]"))return e.data("ui-tooltip-title",e.attr("title")).removeAttr("title")}))},_enable:function(){this.disabledTitles.each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))}),this.disabledTitles=t([])},open:function(e){var i=this,n=t(e?e.target:this.element).closest(this.options.items);n.length&&!n.data("ui-tooltip-id")&&(n.attr("title")&&n.data("ui-tooltip-title",n.attr("title")),n.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&n.parents().each(function(){var e,n=t(this);n.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),n.attr("title")&&(n.uniqueId(),i.parents[this.id]={element:this,title:n.attr("title")},n.attr("title",""))}),this._registerCloseHandlers(e,n),this._updateContent(n,e))},_updateContent:function(t,e){var i,n=this.options.content,o=this,s=e?e.type:null;if("string"==typeof n||n.nodeType||n.jquery)return this._open(e,t,n);(i=n.call(t[0],function(i){o._delay(function(){t.data("ui-tooltip-open")&&(e&&(e.type=s),this._open(e,t,i))})}))&&this._open(e,t,i)},_open:function(e,i,n){function o(t){h.of=t,a.is(":hidden")||a.position(h)}var s,a,r,l,h=t.extend({},this.options.position);if(n){if(s=this._find(i))return void s.tooltip.find(".ui-tooltip-content").html(n);i.is("[title]")&&(e&&"mouseover"===e.type?i.attr("title",""):i.removeAttr("title")),s=this._tooltip(i),a=s.tooltip,this._addDescribedBy(i,a.attr("id")),a.find(".ui-tooltip-content").html(n),this.liveRegion.children().hide(),l=t("<div>").html(a.find(".ui-tooltip-content").html()),l.removeAttr("name").find("[name]").removeAttr("name"),l.removeAttr("id").find("[id]").removeAttr("id"),l.appendTo(this.liveRegion),this.options.track&&e&&/^mouse/.test(e.type)?(this._on(this.document,{mousemove:o}),o(e)):a.position(t.extend({of:i},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(r=this.delayedShow=setInterval(function(){a.is(":visible")&&(o(h.of),clearInterval(r))},t.fx.interval)),this._trigger("open",e,{tooltip:a})}},_registerCloseHandlers:function(e,i){var n={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var n=t.Event(e);n.currentTarget=i[0],this.close(n,!0)}}};i[0]!==this.element[0]&&(n.remove=function(){this._removeTooltip(this._find(i).tooltip)}),e&&"mouseover"!==e.type||(n.mouseleave="close"),e&&"focusin"!==e.type||(n.focusout="close"),this._on(!0,i,n)},close:function(e){var i,n=this,o=t(e?e.currentTarget:this.element),s=this._find(o);if(!s)return void o.removeData("ui-tooltip-open");i=s.tooltip,s.closing||(clearInterval(this.delayedShow),o.data("ui-tooltip-title")&&!o.attr("title")&&o.attr("title",o.data("ui-tooltip-title")),this._removeDescribedBy(o),s.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){n._removeTooltip(t(this))}),o.removeData("ui-tooltip-open"),this._off(o,"mouseleave focusout keyup"),o[0]!==this.element[0]&&this._off(o,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete n.parents[e]}),s.closing=!0,this._trigger("close",e,{tooltip:i}),s.hiding||(s.closing=!1))},_tooltip:function(e){var i=t("<div>").attr("role","tooltip"),n=t("<div>").appendTo(i),o=i.uniqueId().attr("id");return this._addClass(n,"ui-tooltip-content"),this._addClass(i,"ui-tooltip","ui-widget ui-widget-content"),i.appendTo(this._appendTo(e)),this.tooltips[o]={element:e,tooltip:i}},_find:function(t){var e=t.data("ui-tooltip-id");return e?this.tooltips[e]:null},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){var e=t.closest(".ui-front, dialog");return e.length||(e=this.document[0].body),e},_destroy:function(){var e=this;t.each(this.tooltips,function(i,n){var o=t.Event("blur"),s=n.element;o.target=o.currentTarget=s[0],e.close(o,!0),t("#"+i).remove(),s.data("ui-tooltip-title")&&(s.attr("title")||s.attr("title",s.data("ui-tooltip-title")),s.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),!1!==t.uiBackCompat&&t.widget("ui.tooltip",t.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}});t.ui.tooltip}),function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():t.Tether=e()}(this,function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t){var i=t.getBoundingClientRect(),n={};for(var o in i)n[o]=i[o];if(t.ownerDocument!==document){var s=t.ownerDocument.defaultView.frameElement;if(s){var a=e(s);n.top+=a.top,n.bottom+=a.top,n.left+=a.left,n.right+=a.left}}return n}function i(t){var e=getComputedStyle(t)||{},i=e.position,n=[];if("fixed"===i)return[t];for(var o=t;(o=o.parentNode)&&o&&1===o.nodeType;){var s=void 0;try{s=getComputedStyle(o)}catch(t){}if(void 0===s||null===s)return n.push(o),n;var a=s,r=a.overflow,l=a.overflowX;/(auto|scroll|overlay)/.test(r+a.overflowY+l)&&("absolute"!==i||["relative","absolute","fixed"].indexOf(s.position)>=0)&&n.push(o)}return n.push(t.ownerDocument.body),t.ownerDocument!==document&&n.push(t.ownerDocument.defaultView),n}function n(){w&&document.body.removeChild(w),w=null}function o(t){var i=void 0;t===document?(i=document,t=document.documentElement):i=t.ownerDocument;var n=i.documentElement,o=e(t),s=D();return o.top-=s.top,o.left-=s.left,void 0===o.width&&(o.width=document.body.scrollWidth-o.left-o.right),void 0===o.height&&(o.height=document.body.scrollHeight-o.top-o.bottom),o.top=o.top-n.clientTop,o.left=o.left-n.clientLeft,o.right=i.body.clientWidth-o.width-o.left,o.bottom=i.body.clientHeight-o.height-o.top,o}function s(t){return t.offsetParent||document.documentElement}function a(){if(S)return S;var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");r(e.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e);var i=t.offsetWidth;e.style.overflow="scroll";var n=t.offsetWidth;i===n&&(n=e.clientWidth),document.body.removeChild(e);var o=i-n;return S={width:o,height:o}}function r(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=[];return Array.prototype.push.apply(e,arguments),e.slice(1).forEach(function(e){if(e)for(var i in e)({}).hasOwnProperty.call(e,i)&&(t[i]=e[i])}),t}function l(t,e){if(void 0!==t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.remove(e)});else{var i=new RegExp("(^| )"+e.split(" ").join("|")+"( |$)","gi"),n=u(t).replace(i," ");d(t,n)}}function h(t,e){if(void 0!==t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.add(e)});else{l(t,e);var i=u(t)+" "+e;d(t,i)}}function c(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=u(t);return new RegExp("(^| )"+e+"( |$)","gi").test(i)}function u(t){return t.className instanceof t.ownerDocument.defaultView.SVGAnimatedString?t.className.baseVal:t.className}function d(t,e){t.setAttribute("class",e)}function p(t,e,i){i.forEach(function(i){-1===e.indexOf(i)&&c(t,i)&&l(t,i)}),e.forEach(function(e){c(t,e)||h(t,e)})}function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function g(t,e){var i=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return t+i>=e&&e>=t-i}function m(){return"object"==typeof performance&&"function"==typeof performance.now?performance.now():+new Date}function v(){for(var t={top:0,left:0},e=arguments.length,i=Array(e),n=0;n<e;n++)i[n]=arguments[n];return i.forEach(function(e){var i=e.top,n=e.left;"string"==typeof i&&(i=parseFloat(i,10)),"string"==typeof n&&(n=parseFloat(n,10)),t.top+=i,t.left+=n}),t}function b(t,e){return"string"==typeof t.left&&-1!==t.left.indexOf("%")&&(t.left=parseFloat(t.left,10)/100*e.width),"string"==typeof t.top&&-1!==t.top.indexOf("%")&&(t.top=parseFloat(t.top,10)/100*e.height),t}function _(t,e){return"scrollParent"===e?e=t.scrollParents[0]:"window"===e&&(e=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),e===document&&(e=e.documentElement),void 0!==e.nodeType&&function(){var t=e,i=o(e),n=i,s=getComputedStyle(e);if(e=[n.left,n.top,i.width+n.left,i.height+n.top],t.ownerDocument!==document){var a=t.ownerDocument.defaultView;e[0]+=a.pageXOffset,e[1]+=a.pageYOffset,e[2]+=a.pageXOffset,e[3]+=a.pageYOffset}$.forEach(function(t,i){t=t[0].toUpperCase()+t.substr(1),"Top"===t||"Left"===t?e[i]+=parseFloat(s["border"+t+"Width"]):e[i]-=parseFloat(s["border"+t+"Width"])})}(),e}var y=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),x=void 0;void 0===x&&(x={modules:[]});var w=null,k=function(){var t=0;return function(){return++t}}(),C={},D=function(){var t=w;t&&document.body.contains(t)||(t=document.createElement("div"),t.setAttribute("data-tether-id",k()),r(t.style,{top:0,left:0,position:"absolute"}),document.body.appendChild(t),w=t);var i=t.getAttribute("data-tether-id");return void 0===C[i]&&(C[i]=e(t),T(function(){delete C[i]})),C[i]},S=null,M=[],T=function(t){M.push(t)},I=function(){for(var t=void 0;t=M.pop();)t()},P=function(){function e(){t(this,e)}return y(e,[{key:"on",value:function(t,e,i){var n=!(arguments.length<=3||void 0===arguments[3])&&arguments[3];void 0===this.bindings&&(this.bindings={}),void 0===this.bindings[t]&&(this.bindings[t]=[]),this.bindings[t].push({handler:e,ctx:i,once:n})}},{key:"once",value:function(t,e,i){this.on(t,e,i,!0)}},{key:"off",value:function(t,e){if(void 0!==this.bindings&&void 0!==this.bindings[t])if(void 0===e)delete this.bindings[t];else for(var i=0;i<this.bindings[t].length;)this.bindings[t][i].handler===e?this.bindings[t].splice(i,1):++i}},{key:"trigger",value:function(t){if(void 0!==this.bindings&&this.bindings[t]){for(var e=0,i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];for(;e<this.bindings[t].length;){var s=this.bindings[t][e],a=s.handler,r=s.ctx,l=s.once,h=r;void 0===h&&(h=this),a.apply(h,n),l?this.bindings[t].splice(e,1):++e}}}}]),e}();x.Utils={getActualBoundingClientRect:e,getScrollParents:i,getBounds:o,getOffsetParent:s,extend:r,addClass:h,removeClass:l,hasClass:c,updateClasses:p,defer:T,flush:I,uniqueId:k,Evented:P,getScrollBarSize:a,removeUtilElements:n};var A=function(){function t(t,e){var i=[],n=!0,o=!1,s=void 0;try{for(var a,r=t[Symbol.iterator]();!(n=(a=r.next()).done)&&(i.push(a.value),!e||i.length!==e);n=!0);}catch(t){o=!0,s=t}finally{try{!n&&r.return&&r.return()}finally{if(o)throw s}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),y=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),O=function(t,e,i){for(var n=!0;n;){var o=t,s=e,a=i;n=!1,null===o&&(o=Function.prototype);var r=Object.getOwnPropertyDescriptor(o,s);if(void 0!==r){if("value"in r)return r.value;var l=r.get;if(void 0===l)return;return l.call(a)}var h=Object.getPrototypeOf(o);if(null===h)return;t=h,e=s,i=a,n=!0,r=h=void 0}};if(void 0===x)throw new Error("You must include the utils.js file before tether.js");var F=x.Utils,i=F.getScrollParents,o=F.getBounds,s=F.getOffsetParent,r=F.extend,h=F.addClass,l=F.removeClass,p=F.updateClasses,T=F.defer,I=F.flush,a=F.getScrollBarSize,n=F.removeUtilElements,E=function(){if("undefined"==typeof document)return"";for(var t=document.createElement("div"),e=["transform","WebkitTransform","OTransform","MozTransform","msTransform"],i=0;i<e.length;++i){var n=e[i];if(void 0!==t.style[n])return n}}(),z=[],H=function(){z.forEach(function(t){t.position(!1)}),I()};!function(){var t=null,e=null,i=null,n=function n(){return void 0!==e&&e>16?(e=Math.min(e-16,250),void(i=setTimeout(n,250))):void(void 0!==t&&m()-t<10||(null!=i&&(clearTimeout(i),i=null),t=m(),H(),e=m()-t))};"undefined"!=typeof window&&void 0!==window.addEventListener&&["resize","scroll","touchmove"].forEach(function(t){window.addEventListener(t,n)})}();var W={center:"center",left:"right",right:"left"},L={middle:"middle",top:"bottom",bottom:"top"},N={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},R=function(t,e){var i=t.left,n=t.top;return"auto"===i&&(i=W[e.left]),"auto"===n&&(n=L[e.top]),{left:i,top:n}},B=function(t){var e=t.left,i=t.top;return void 0!==N[t.left]&&(e=N[t.left]),void 0!==N[t.top]&&(i=N[t.top]),{left:e,top:i}},V=function(t){var e=t.split(" "),i=A(e,2);return{top:i[0],left:i[1]}},U=V,j=function(e){function c(e){var i=this;t(this,c),O(Object.getPrototypeOf(c.prototype),"constructor",this).call(this),this.position=this.position.bind(this),z.push(this),this.history=[],this.setOptions(e,!1),x.modules.forEach(function(t){void 0!==t.initialize&&t.initialize.call(i)}),this.position()}return f(c,e),y(c,[{key:"getClass",value:function(){var t=arguments.length<=0||void 0===arguments[0]?"":arguments[0],e=this.options.classes;return void 0!==e&&e[t]?this.options.classes[t]:this.options.classPrefix?this.options.classPrefix+"-"+t:t}},{key:"setOptions",value:function(t){var e=this,n=arguments.length<=1||void 0===arguments[1]||arguments[1],o={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"};this.options=r(o,t);var s=this.options,a=s.element,l=s.target,c=s.targetModifier;if(this.element=a,this.target=l,this.targetModifier=c,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach(function(t){if(void 0===e[t])throw new Error("Tether Error: Both element and target must be defined");void 0!==e[t].jquery?e[t]=e[t][0]:"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))}),h(this.element,this.getClass("element")),!1!==this.options.addTargetClasses&&h(this.target,this.getClass("target")),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=U(this.options.targetAttachment),this.attachment=U(this.options.attachment),this.offset=V(this.options.offset),this.targetOffset=V(this.options.targetOffset),void 0!==this.scrollParents&&this.disable(),"scroll-handle"===this.targetModifier?this.scrollParents=[this.target]:this.scrollParents=i(this.target),!1!==this.options.enabled&&this.enable(n)}},{key:"getTargetBounds",value:function(){if(void 0===this.targetModifier)return o(this.target);if("visible"===this.targetModifier){if(this.target===document.body)return{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth};var t=o(this.target),e={height:t.height,width:t.width,top:t.top,left:t.left};return e.height=Math.min(e.height,t.height-(pageYOffset-t.top)),e.height=Math.min(e.height,t.height-(t.top+t.height-(pageYOffset+innerHeight))),e.height=Math.min(innerHeight,e.height),e.height-=2,e.width=Math.min(e.width,t.width-(pageXOffset-t.left)),e.width=Math.min(e.width,t.width-(t.left+t.width-(pageXOffset+innerWidth))),e.width=Math.min(innerWidth,e.width),e.width-=2,e.top<pageYOffset&&(e.top=pageYOffset),e.left<pageXOffset&&(e.left=pageXOffset),e}if("scroll-handle"===this.targetModifier){var t=void 0,i=this.target;i===document.body?(i=document.documentElement,t={left:pageXOffset,top:pageYOffset,height:innerHeight,width:innerWidth}):t=o(i);var n=getComputedStyle(i),s=i.scrollWidth>i.clientWidth||[n.overflow,n.overflowX].indexOf("scroll")>=0||this.target!==document.body,a=0;s&&(a=15);var r=t.height-parseFloat(n.borderTopWidth)-parseFloat(n.borderBottomWidth)-a,e={width:15,height:.975*r*(r/i.scrollHeight),left:t.left+t.width-parseFloat(n.borderLeftWidth)-15},l=0;r<408&&this.target===document.body&&(l=-11e-5*Math.pow(r,2)-.00727*r+22.58),this.target!==document.body&&(e.height=Math.max(e.height,24));var h=this.target.scrollTop/(i.scrollHeight-r);return e.top=h*(r-e.height-l)+t.top+parseFloat(n.borderTopWidth),this.target===document.body&&(e.height=Math.max(e.height,24)),e}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(t,e){return void 0===this._cache&&(this._cache={}),void 0===this._cache[t]&&(this._cache[t]=e.call(this)),this._cache[t]}},{key:"enable",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]||arguments[0];!1!==this.options.addTargetClasses&&h(this.target,this.getClass("enabled")),h(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParents.forEach(function(e){e!==t.target.ownerDocument&&e.addEventListener("scroll",t.position)}),e&&this.position()}},{key:"disable",value:function(){var t=this;l(this.target,this.getClass("enabled")),l(this.element,this.getClass("enabled")),this.enabled=!1,void 0!==this.scrollParents&&this.scrollParents.forEach(function(e){
e.removeEventListener("scroll",t.position)})}},{key:"destroy",value:function(){var t=this;this.disable(),z.forEach(function(e,i){e===t&&z.splice(i,1)}),0===z.length&&n()}},{key:"updateAttachClasses",value:function(t,e){var i=this;t=t||this.attachment,e=e||this.targetAttachment;var n=["left","top","bottom","right","middle","center"];void 0!==this._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),void 0===this._addAttachClasses&&(this._addAttachClasses=[]);var o=this._addAttachClasses;t.top&&o.push(this.getClass("element-attached")+"-"+t.top),t.left&&o.push(this.getClass("element-attached")+"-"+t.left),e.top&&o.push(this.getClass("target-attached")+"-"+e.top),e.left&&o.push(this.getClass("target-attached")+"-"+e.left);var s=[];n.forEach(function(t){s.push(i.getClass("element-attached")+"-"+t),s.push(i.getClass("target-attached")+"-"+t)}),T(function(){void 0!==i._addAttachClasses&&(p(i.element,i._addAttachClasses,s),!1!==i.options.addTargetClasses&&p(i.target,i._addAttachClasses,s),delete i._addAttachClasses)})}},{key:"position",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]||arguments[0];if(this.enabled){this.clearCache();var i=R(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,i);var n=this.cache("element-bounds",function(){return o(t.element)}),r=n.width,l=n.height;if(0===r&&0===l&&void 0!==this.lastSize){var h=this.lastSize;r=h.width,l=h.height}else this.lastSize={width:r,height:l};var c=this.cache("target-bounds",function(){return t.getTargetBounds()}),u=c,d=b(B(this.attachment),{width:r,height:l}),p=b(B(i),u),f=b(this.offset,{width:r,height:l}),g=b(this.targetOffset,u);d=v(d,f),p=v(p,g);for(var m=c.left+p.left-d.left,_=c.top+p.top-d.top,y=0;y<x.modules.length;++y){var w=x.modules[y],k=w.position.call(this,{left:m,top:_,targetAttachment:i,targetPos:c,elementPos:n,offset:d,targetOffset:p,manualOffset:f,manualTargetOffset:g,scrollbarSize:M,attachment:this.attachment});if(!1===k)return!1;void 0!==k&&"object"==typeof k&&(_=k.top,m=k.left)}var C={page:{top:_,left:m},viewport:{top:_-pageYOffset,bottom:pageYOffset-_-l+innerHeight,left:m-pageXOffset,right:pageXOffset-m-r+innerWidth}},D=this.target.ownerDocument,S=D.defaultView,M=void 0;return S.innerHeight>D.documentElement.clientHeight&&(M=this.cache("scrollbar-size",a),C.viewport.bottom-=M.height),S.innerWidth>D.documentElement.clientWidth&&(M=this.cache("scrollbar-size",a),C.viewport.right-=M.width),-1!==["","static"].indexOf(D.body.style.position)&&-1!==["","static"].indexOf(D.body.parentElement.style.position)||(C.page.bottom=D.body.scrollHeight-_-l,C.page.right=D.body.scrollWidth-m-r),void 0!==this.options.optimizations&&!1!==this.options.optimizations.moveElement&&void 0===this.targetModifier&&function(){var e=t.cache("target-offsetparent",function(){return s(t.target)}),i=t.cache("target-offsetparent-bounds",function(){return o(e)}),n=getComputedStyle(e),a=i,r={};if(["Top","Left","Bottom","Right"].forEach(function(t){r[t.toLowerCase()]=parseFloat(n["border"+t+"Width"])}),i.right=D.body.scrollWidth-i.left-a.width+r.right,i.bottom=D.body.scrollHeight-i.top-a.height+r.bottom,C.page.top>=i.top+r.top&&C.page.bottom>=i.bottom&&C.page.left>=i.left+r.left&&C.page.right>=i.right){var l=e.scrollTop,h=e.scrollLeft;C.offset={top:C.page.top-i.top+l-r.top,left:C.page.left-i.left+h-r.left}}}(),this.move(C),this.history.unshift(C),this.history.length>3&&this.history.pop(),e&&I(),!0}}},{key:"move",value:function(t){var e=this;if(void 0!==this.element.parentNode){var i={};for(var n in t){i[n]={};for(var o in t[n]){for(var a=!1,l=0;l<this.history.length;++l){var h=this.history[l];if(void 0!==h[n]&&!g(h[n][o],t[n][o])){a=!0;break}}a||(i[n][o]=!0)}}var c={top:"",left:"",right:"",bottom:""},u=function(t,i){if(!1!==(void 0!==e.options.optimizations?e.options.optimizations.gpu:null)){var n=void 0,o=void 0;t.top?(c.top=0,n=i.top):(c.bottom=0,n=-i.bottom),t.left?(c.left=0,o=i.left):(c.right=0,o=-i.right),window.matchMedia&&(window.matchMedia("only screen and (min-resolution: 1.3dppx)").matches||window.matchMedia("only screen and (-webkit-min-device-pixel-ratio: 1.3)").matches||(o=Math.round(o),n=Math.round(n))),c[E]="translateX("+o+"px) translateY("+n+"px)","msTransform"!==E&&(c[E]+=" translateZ(0)")}else t.top?c.top=i.top+"px":c.bottom=i.bottom+"px",t.left?c.left=i.left+"px":c.right=i.right+"px"},d=!1;if((i.page.top||i.page.bottom)&&(i.page.left||i.page.right)?(c.position="absolute",u(i.page,t.page)):(i.viewport.top||i.viewport.bottom)&&(i.viewport.left||i.viewport.right)?(c.position="fixed",u(i.viewport,t.viewport)):void 0!==i.offset&&i.offset.top&&i.offset.left?function(){c.position="absolute";var n=e.cache("target-offsetparent",function(){return s(e.target)});s(e.element)!==n&&T(function(){e.element.parentNode.removeChild(e.element),n.appendChild(e.element)}),u(i.offset,t.offset),d=!0}():(c.position="absolute",u({top:!0,left:!0},t.page)),!d)if(this.options.bodyElement)this.element.parentNode!==this.options.bodyElement&&this.options.bodyElement.appendChild(this.element);else{for(var p=!0,f=this.element.parentNode;f&&1===f.nodeType&&"BODY"!==f.tagName;){if("static"!==getComputedStyle(f).position){p=!1;break}f=f.parentNode}p||(this.element.parentNode.removeChild(this.element),this.element.ownerDocument.body.appendChild(this.element))}var m={},v=!1;for(var o in c){var b=c[o];this.element.style[o]!==b&&(v=!0,m[o]=b)}v&&T(function(){r(e.element.style,m),e.trigger("repositioned")})}}}]),c}(P);j.modules=[],x.position=H;var Y=r(j,x),A=function(){function t(t,e){var i=[],n=!0,o=!1,s=void 0;try{for(var a,r=t[Symbol.iterator]();!(n=(a=r.next()).done)&&(i.push(a.value),!e||i.length!==e);n=!0);}catch(t){o=!0,s=t}finally{try{!n&&r.return&&r.return()}finally{if(o)throw s}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),F=x.Utils,o=F.getBounds,r=F.extend,p=F.updateClasses,T=F.defer,$=["left","top","right","bottom"];x.modules.push({position:function(t){var e=this,i=t.top,n=t.left,s=t.targetAttachment;if(!this.options.constraints)return!0;var a=this.cache("element-bounds",function(){return o(e.element)}),l=a.height,h=a.width;if(0===h&&0===l&&void 0!==this.lastSize){var c=this.lastSize;h=c.width,l=c.height}var u=this.cache("target-bounds",function(){return e.getTargetBounds()}),d=u.height,f=u.width,g=[this.getClass("pinned"),this.getClass("out-of-bounds")];this.options.constraints.forEach(function(t){var e=t.outOfBoundsClass,i=t.pinnedClass;e&&g.push(e),i&&g.push(i)}),g.forEach(function(t){["left","top","right","bottom"].forEach(function(e){g.push(t+"-"+e)})});var m=[],v=r({},s),b=r({},this.attachment);return this.options.constraints.forEach(function(t){var o=t.to,a=t.attachment,r=t.pin;void 0===a&&(a="");var c=void 0,u=void 0;if(a.indexOf(" ")>=0){var p=a.split(" "),g=A(p,2);u=g[0],c=g[1]}else c=u=a;var y=_(e,o);"target"!==u&&"both"!==u||(i<y[1]&&"top"===v.top&&(i+=d,v.top="bottom"),i+l>y[3]&&"bottom"===v.top&&(i-=d,v.top="top")),"together"===u&&("top"===v.top&&("bottom"===b.top&&i<y[1]?(i+=d,v.top="bottom",i+=l,b.top="top"):"top"===b.top&&i+l>y[3]&&i-(l-d)>=y[1]&&(i-=l-d,v.top="bottom",b.top="bottom")),"bottom"===v.top&&("top"===b.top&&i+l>y[3]?(i-=d,v.top="top",i-=l,b.top="bottom"):"bottom"===b.top&&i<y[1]&&i+(2*l-d)<=y[3]&&(i+=l-d,v.top="top",b.top="top")),"middle"===v.top&&(i+l>y[3]&&"top"===b.top?(i-=l,b.top="bottom"):i<y[1]&&"bottom"===b.top&&(i+=l,b.top="top"))),"target"!==c&&"both"!==c||(n<y[0]&&"left"===v.left&&(n+=f,v.left="right"),n+h>y[2]&&"right"===v.left&&(n-=f,v.left="left")),"together"===c&&(n<y[0]&&"left"===v.left?"right"===b.left?(n+=f,v.left="right",n+=h,b.left="left"):"left"===b.left&&(n+=f,v.left="right",n-=h,b.left="right"):n+h>y[2]&&"right"===v.left?"left"===b.left?(n-=f,v.left="left",n-=h,b.left="right"):"right"===b.left&&(n-=f,v.left="left",n+=h,b.left="left"):"center"===v.left&&(n+h>y[2]&&"left"===b.left?(n-=h,b.left="right"):n<y[0]&&"right"===b.left&&(n+=h,b.left="left"))),"element"!==u&&"both"!==u||(i<y[1]&&"bottom"===b.top&&(i+=l,b.top="top"),i+l>y[3]&&"top"===b.top&&(i-=l,b.top="bottom")),"element"!==c&&"both"!==c||(n<y[0]&&("right"===b.left?(n+=h,b.left="left"):"center"===b.left&&(n+=h/2,b.left="left")),n+h>y[2]&&("left"===b.left?(n-=h,b.left="right"):"center"===b.left&&(n-=h/2,b.left="right"))),"string"==typeof r?r=r.split(",").map(function(t){return t.trim()}):!0===r&&(r=["top","left","right","bottom"]),r=r||[];var x=[],w=[];i<y[1]&&(r.indexOf("top")>=0?(i=y[1],x.push("top")):w.push("top")),i+l>y[3]&&(r.indexOf("bottom")>=0?(i=y[3]-l,x.push("bottom")):w.push("bottom")),n<y[0]&&(r.indexOf("left")>=0?(n=y[0],x.push("left")):w.push("left")),n+h>y[2]&&(r.indexOf("right")>=0?(n=y[2]-h,x.push("right")):w.push("right")),x.length&&function(){var t=void 0;t=void 0!==e.options.pinnedClass?e.options.pinnedClass:e.getClass("pinned"),m.push(t),x.forEach(function(e){m.push(t+"-"+e)})}(),w.length&&function(){var t=void 0;t=void 0!==e.options.outOfBoundsClass?e.options.outOfBoundsClass:e.getClass("out-of-bounds"),m.push(t),w.forEach(function(e){m.push(t+"-"+e)})}(),(x.indexOf("left")>=0||x.indexOf("right")>=0)&&(b.left=v.left=!1),(x.indexOf("top")>=0||x.indexOf("bottom")>=0)&&(b.top=v.top=!1),v.top===s.top&&v.left===s.left&&b.top===e.attachment.top&&b.left===e.attachment.left||(e.updateAttachClasses(b,v),e.trigger("update",{attachment:b,targetAttachment:v}))}),T(function(){!1!==e.options.addTargetClasses&&p(e.target,m,g),p(e.element,m,g)}),{top:i,left:n}}});var F=x.Utils,o=F.getBounds,p=F.updateClasses,T=F.defer;x.modules.push({position:function(t){var e=this,i=t.top,n=t.left,s=this.cache("element-bounds",function(){return o(e.element)}),a=s.height,r=s.width,l=this.getTargetBounds(),h=i+a,c=n+r,u=[];i<=l.bottom&&h>=l.top&&["left","right"].forEach(function(t){var e=l[t];e!==n&&e!==c||u.push(t)}),n<=l.right&&c>=l.left&&["top","bottom"].forEach(function(t){var e=l[t];e!==i&&e!==h||u.push(t)});var d=[],f=[],g=["left","top","right","bottom"];return d.push(this.getClass("abutted")),g.forEach(function(t){d.push(e.getClass("abutted")+"-"+t)}),u.length&&f.push(this.getClass("abutted")),u.forEach(function(t){f.push(e.getClass("abutted")+"-"+t)}),T(function(){!1!==e.options.addTargetClasses&&p(e.target,f,d),p(e.element,f,d)}),!0}});var A=function(){function t(t,e){var i=[],n=!0,o=!1,s=void 0;try{for(var a,r=t[Symbol.iterator]();!(n=(a=r.next()).done)&&(i.push(a.value),!e||i.length!==e);n=!0);}catch(t){o=!0,s=t}finally{try{!n&&r.return&&r.return()}finally{if(o)throw s}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();return x.modules.push({position:function(t){var e=t.top,i=t.left;if(this.options.shift){var n=this.options.shift;"function"==typeof this.options.shift&&(n=this.options.shift.call(this,{top:e,left:i}));var o=void 0,s=void 0;if("string"==typeof n){n=n.split(" "),n[1]=n[1]||n[0];var a=n,r=A(a,2);o=r[0],s=r[1],o=parseFloat(o,10),s=parseFloat(s,10)}else o=n.top,s=n.left;return e+=o,i+=s,{top:e,left:i}}}}),Y}),function(e){e.fn.extend({slimScroll:function(i){var n={width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},o=e.extend(n,i);return this.each(function(){function n(t){if(h){var t=t||window.event,i=0;t.wheelDelta&&(i=-t.wheelDelta/120),t.detail&&(i=t.detail/3);var n=t.target||t.srcTarget||t.srcElement;e(n).closest("."+o.wrapperClass).is(y.parent())&&s(i,!0),t.preventDefault&&!_&&t.preventDefault(),_||(t.returnValue=!1)}}function s(t,e,i){_=!1;var n=t,s=y.outerHeight()-S.outerHeight();if(e&&(n=parseInt(S.css("top"))+t*parseInt(o.wheelStep)/100*S.outerHeight(),n=Math.min(Math.max(n,0),s),n=t>0?Math.ceil(n):Math.floor(n),S.css({top:n+"px"})),g=parseInt(S.css("top"))/(y.outerHeight()-S.outerHeight()),n=g*(y[0].scrollHeight-y.outerHeight()),i){n=t;var a=n/y[0].scrollHeight*y.outerHeight();a=Math.min(Math.max(a,0),s),S.css({top:a+"px"})}y.scrollTop(n),y.trigger("slimscrolling",~~n),r(),l()}function a(){f=Math.max(y.outerHeight()/y[0].scrollHeight*y.outerHeight(),b),S.css({height:f+"px"});var t=f==y.outerHeight()?"none":"block";S.css({display:t})}function r(){if(a(),clearTimeout(d),g==~~g){if(_=o.allowPageScroll,m!=g){var t=0==~~g?"top":"bottom";y.trigger("slimscroll",t)}}else _=!1;if(m=g,f>=y.outerHeight())return void(_=!0);S.stop(!0,!0).fadeIn("fast"),o.railVisible&&D.stop(!0,!0).fadeIn("fast")}function l(){o.alwaysVisible||(d=setTimeout(function(){o.disableFadeOut&&h||c||u||(S.fadeOut("slow"),D.fadeOut("slow"))},1e3))}var h,c,u,d,p,f,g,m,v="<div></div>",b=30,_=!1,y=e(this);if(y.parent().hasClass(o.wrapperClass)){var x=y.scrollTop();if(S=y.siblings("."+o.barClass),D=y.siblings("."+o.railClass),a(),e.isPlainObject(i)){if("height"in i&&"auto"==i.height){y.parent().css("height","auto"),y.css("height","auto");var w=y.parent().parent().height();y.parent().css("height",w),y.css("height",w)}else if("height"in i){var k=i.height;y.parent().css("height",k),y.css("height",k)}if("scrollTo"in i)x=parseInt(o.scrollTo);else if("scrollBy"in i)x+=parseInt(o.scrollBy);else if("destroy"in i)return S.remove(),D.remove(),void y.unwrap();s(x,!1,!0)}}else if(!(e.isPlainObject(i)&&"destroy"in i)){o.height="auto"==o.height?y.parent().height():o.height;var C=e(v).addClass(o.wrapperClass).css({position:"relative",overflow:"hidden",width:o.width,height:o.height});y.css({overflow:"hidden",width:o.width,height:o.height});var D=e(v).addClass(o.railClass).css({width:o.size,height:"100%",position:"absolute",top:0,display:o.alwaysVisible&&o.railVisible?"block":"none","border-radius":o.railBorderRadius,background:o.railColor,opacity:o.railOpacity,zIndex:90}),S=e(v).addClass(o.barClass).css({background:o.color,width:o.size,position:"absolute",top:0,opacity:o.opacity,display:o.alwaysVisible?"block":"none","border-radius":o.borderRadius,BorderRadius:o.borderRadius,MozBorderRadius:o.borderRadius,WebkitBorderRadius:o.borderRadius,zIndex:99}),M="right"==o.position?{right:o.distance}:{left:o.distance};D.css(M),S.css(M),y.wrap(C),y.parent().append(S),y.parent().append(D),o.railDraggable&&S.bind("mousedown",function(i){var n=e(document);return u=!0,t=parseFloat(S.css("top")),pageY=i.pageY,n.bind("mousemove.slimscroll",function(e){currTop=t+e.pageY-pageY,S.css("top",currTop),s(0,S.position().top,!1)}),n.bind("mouseup.slimscroll",function(t){u=!1,l(),n.unbind(".slimscroll")}),!1}).bind("selectstart.slimscroll",function(t){return t.stopPropagation(),t.preventDefault(),!1}),D.hover(function(){r()},function(){l()}),S.hover(function(){c=!0},function(){c=!1}),y.hover(function(){h=!0,r(),l()},function(){h=!1,l()}),y.bind("touchstart",function(t,e){t.originalEvent.touches.length&&(p=t.originalEvent.touches[0].pageY)}),y.bind("touchmove",function(t){if(_||t.originalEvent.preventDefault(),t.originalEvent.touches.length){s((p-t.originalEvent.touches[0].pageY)/o.touchScrollStep,!0),p=t.originalEvent.touches[0].pageY}}),a(),"bottom"===o.start?(S.css({top:y.outerHeight()-S.outerHeight()}),s(0,!0)):"top"!==o.start&&(s(e(o.start).position().top,null,!0),o.alwaysVisible||S.hide()),function(t){window.addEventListener?(t.addEventListener("DOMMouseScroll",n,!1),t.addEventListener("mousewheel",n,!1)):document.attachEvent("onmousewheel",n)}(this)}}),this}}),e.fn.extend({slimscroll:e.fn.slimScroll})}(jQuery),function(t,e){"use strict";t.ajaxPrefilter(function(t,e,i){if(t.iframe)return t.originalURL=t.url,"iframe"}),t.ajaxTransport("iframe",function(e,i,n){function o(){l.each(function(e,i){var n=t(i);n.data("clone").replaceWith(n)}),s.remove(),a.one("load",function(){a.remove()}),a.attr("src","javascript:false;")}var s=null,a=null,r="iframe-"+t.now(),l=t(e.files).filter(":file:enabled"),h=null;if(e.dataTypes.shift(),e.data=i.data,l.length)return s=t("<form enctype='multipart/form-data' method='post'></form>").hide().attr({action:e.originalURL,target:r}),"string"==typeof e.data&&e.data.length>0&&t.error("data must not be serialized"),t.each(e.data||{},function(e,i){t.isPlainObject(i)&&(e=i.name,i=i.value),t("<input type='hidden' />").attr({name:e,value:i}).appendTo(s)}),t("<input type='hidden' value='IFrame' name='X-Requested-With' />").appendTo(s),h=e.dataTypes[0]&&e.accepts[e.dataTypes[0]]?e.accepts[e.dataTypes[0]]+("*"!==e.dataTypes[0]?", */*; q=0.01":""):e.accepts["*"],t("<input type='hidden' name='X-HTTP-Accept'>").attr("value",h).appendTo(s),l.after(function(e){var i=t(this),n=i.clone().prop("disabled",!0);return i.data("clone",n),n}).next(),l.appendTo(s),{send:function(e,i){a=t("<iframe src='javascript:false;' name='"+r+"' id='"+r+"' style='display:none'></iframe>"),a.one("load",function(){a.one("load",function(){var t=this.contentWindow?this.contentWindow.document:this.contentDocument?this.contentDocument:this.document,e=t.documentElement?t.documentElement:t.body,n=e.getElementsByTagName("textarea")[0],s=n&&n.getAttribute("data-type")||null,a=n&&n.getAttribute("data-status")||200,r=n&&n.getAttribute("data-statusText")||"OK",l={html:e.innerHTML,text:s?n.value:e?e.textContent||e.innerText:null};o(),i(a,r,l,s?"Content-Type: "+s:null)}),s[0].submit()}),t("body").append(s,a)},abort:function(){null!==a&&(a.unbind("load").attr("src","javascript:false;"),o())}}})}(jQuery),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","jquery-ui/ui/widget"],t):"object"==typeof exports?t(require("jquery"),require("./vendor/jquery.ui.widget")):t(window.jQuery)}(function(t){"use strict";function e(e){var i="dragover"===e;return function(n){n.dataTransfer=n.originalEvent&&n.originalEvent.dataTransfer;var o=n.dataTransfer;o&&-1!==t.inArray("Files",o.types)&&!1!==this._trigger(e,t.Event(e,{delegatedEvent:n}))&&(n.preventDefault(),i&&(o.dropEffect="copy"))}}t.support.fileInput=!(new RegExp("(Android (1\\.[0156]|2\\.[01]))|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)|(w(eb)?OSBrowser)|(webOS)|(Kindle/(1\\.0|2\\.[05]|3\\.0))").test(window.navigator.userAgent)||t('<input type="file"/>').prop("disabled")),t.support.xhrFileUpload=!(!window.ProgressEvent||!window.FileReader),t.support.xhrFormDataFileUpload=!!window.FormData,t.support.blobSlice=window.Blob&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice),t.widget("blueimp.fileupload",{options:{dropZone:t(document),pasteZone:void 0,fileInput:void 0,replaceFileInput:!0,paramName:void 0,singleFileUploads:!0,limitMultiFileUploads:void 0,limitMultiFileUploadSize:void 0,limitMultiFileUploadSizeOverhead:512,sequentialUploads:!1,limitConcurrentUploads:void 0,forceIframeTransport:!1,redirect:void 0,redirectParamName:void 0,postMessage:void 0,multipart:!0,maxChunkSize:void 0,uploadedBytes:void 0,recalculateProgress:!0,progressInterval:100,bitrateInterval:500,autoUpload:!0,messages:{uploadedBytes:"Uploaded bytes exceed file size"},i18n:function(e,i){return e=this.messages[e]||e.toString(),i&&t.each(i,function(t,i){e=e.replace("{"+t+"}",i)}),e},formData:function(t){return t.serializeArray()},add:function(e,i){if(e.isDefaultPrevented())return!1;(i.autoUpload||!1!==i.autoUpload&&t(this).fileupload("option","autoUpload"))&&i.process().done(function(){i.submit()})},processData:!1,contentType:!1,cache:!1,timeout:0},_specialOptions:["fileInput","dropZone","pasteZone","multipart","forceIframeTransport"],_blobSlice:t.support.blobSlice&&function(){return(this.slice||this.webkitSlice||this.mozSlice).apply(this,arguments)},_BitrateTimer:function(){this.timestamp=Date.now?Date.now():(new Date).getTime(),this.loaded=0,this.bitrate=0,this.getBitrate=function(t,e,i){var n=t-this.timestamp;return(!this.bitrate||!i||n>i)&&(this.bitrate=(e-this.loaded)*(1e3/n)*8,this.loaded=e,this.timestamp=t),this.bitrate}},_isXHRUpload:function(e){return!e.forceIframeTransport&&(!e.multipart&&t.support.xhrFileUpload||t.support.xhrFormDataFileUpload)},_getFormData:function(e){var i;return"function"===t.type(e.formData)?e.formData(e.form):t.isArray(e.formData)?e.formData:"object"===t.type(e.formData)?(i=[],t.each(e.formData,function(t,e){i.push({name:t,value:e})}),i):[]},_getTotal:function(e){var i=0;return t.each(e,function(t,e){i+=e.size||1}),i},_initProgressObject:function(e){var i={loaded:0,total:0,bitrate:0};e._progress?t.extend(e._progress,i):e._progress=i},_initResponseObject:function(t){var e;if(t._response)for(e in t._response)t._response.hasOwnProperty(e)&&delete t._response[e];else t._response={}},_onProgress:function(e,i){if(e.lengthComputable){var n,o=Date.now?Date.now():(new Date).getTime();if(i._time&&i.progressInterval&&o-i._time<i.progressInterval&&e.loaded!==e.total)return;i._time=o,n=Math.floor(e.loaded/e.total*(i.chunkSize||i._progress.total))+(i.uploadedBytes||0),this._progress.loaded+=n-i._progress.loaded,this._progress.bitrate=this._bitrateTimer.getBitrate(o,this._progress.loaded,i.bitrateInterval),i._progress.loaded=i.loaded=n,i._progress.bitrate=i.bitrate=i._bitrateTimer.getBitrate(o,n,i.bitrateInterval),this._trigger("progress",t.Event("progress",{delegatedEvent:e}),i),this._trigger("progressall",t.Event("progressall",{delegatedEvent:e}),this._progress)}},_initProgressListener:function(e){var i=this,n=e.xhr?e.xhr():t.ajaxSettings.xhr();n.upload&&(t(n.upload).bind("progress",function(t){var n=t.originalEvent;t.lengthComputable=n.lengthComputable,t.loaded=n.loaded,t.total=n.total,i._onProgress(t,e)}),e.xhr=function(){return n})},_isInstanceOf:function(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"},_initXHRData:function(e){var i,n=this,o=e.files[0],s=e.multipart||!t.support.xhrFileUpload,a="array"===t.type(e.paramName)?e.paramName[0]:e.paramName;e.headers=t.extend({},e.headers),e.contentRange&&(e.headers["Content-Range"]=e.contentRange),s&&!e.blob&&this._isInstanceOf("File",o)||(e.headers["Content-Disposition"]='attachment; filename="'+encodeURI(o.uploadName||o.name)+'"'),s?t.support.xhrFormDataFileUpload&&(e.postMessage?(i=this._getFormData(e),e.blob?i.push({name:a,value:e.blob}):t.each(e.files,function(n,o){i.push({name:"array"===t.type(e.paramName)&&e.paramName[n]||a,value:o})})):(n._isInstanceOf("FormData",e.formData)?i=e.formData:(i=new FormData,t.each(this._getFormData(e),function(t,e){i.append(e.name,e.value)})),e.blob?i.append(a,e.blob,o.uploadName||o.name):t.each(e.files,function(o,s){(n._isInstanceOf("File",s)||n._isInstanceOf("Blob",s))&&i.append("array"===t.type(e.paramName)&&e.paramName[o]||a,s,s.uploadName||s.name)})),e.data=i):(e.contentType=o.type||"application/octet-stream",e.data=e.blob||o),e.blob=null},_initIframeSettings:function(e){var i=t("<a></a>").prop("href",e.url).prop("host");e.dataType="iframe "+(e.dataType||""),e.formData=this._getFormData(e),e.redirect&&i&&i!==location.host&&e.formData.push({name:e.redirectParamName||"redirect",value:e.redirect})},_initDataSettings:function(t){this._isXHRUpload(t)?(this._chunkedUpload(t,!0)||(t.data||this._initXHRData(t),this._initProgressListener(t)),t.postMessage&&(t.dataType="postmessage "+(t.dataType||""))):this._initIframeSettings(t)},_getParamName:function(e){var i=t(e.fileInput),n=e.paramName;return n?t.isArray(n)||(n=[n]):(n=[],i.each(function(){for(var e=t(this),i=e.prop("name")||"files[]",o=(e.prop("files")||[1]).length;o;)n.push(i),o-=1}),n.length||(n=[i.prop("name")||"files[]"])),n},_initFormSettings:function(e){e.form&&e.form.length||(e.form=t(e.fileInput.prop("form")),e.form.length||(e.form=t(this.options.fileInput.prop("form")))),e.paramName=this._getParamName(e),e.url||(e.url=e.form.prop("action")||location.href),e.type=(e.type||"string"===t.type(e.form.prop("method"))&&e.form.prop("method")||"").toUpperCase(),"POST"!==e.type&&"PUT"!==e.type&&"PATCH"!==e.type&&(e.type="POST"),e.formAcceptCharset||(e.formAcceptCharset=e.form.attr("accept-charset"))},_getAJAXSettings:function(e){var i=t.extend({},this.options,e);return this._initFormSettings(i),this._initDataSettings(i),i},_getDeferredState:function(t){return t.state?t.state():t.isResolved()?"resolved":t.isRejected()?"rejected":"pending"},_enhancePromise:function(t){return t.success=t.done,t.error=t.fail,t.complete=t.always,t},_getXHRPromise:function(e,i,n){var o=t.Deferred(),s=o.promise();return i=i||this.options.context||s,!0===e?o.resolveWith(i,n):!1===e&&o.rejectWith(i,n),s.abort=o.promise,this._enhancePromise(s)},_addConvenienceMethods:function(e,i){var n=this,o=function(e){return t.Deferred().resolveWith(n,e).promise()};i.process=function(e,s){return(e||s)&&(i._processQueue=this._processQueue=(this._processQueue||o([this])).then(function(){return i.errorThrown?t.Deferred().rejectWith(n,[i]).promise():o(arguments)}).then(e,s)),this._processQueue||o([this])},i.submit=function(){return"pending"!==this.state()&&(i.jqXHR=this.jqXHR=!1!==n._trigger("submit",t.Event("submit",{delegatedEvent:e}),this)&&n._onSend(e,this)),this.jqXHR||n._getXHRPromise()},i.abort=function(){return this.jqXHR?this.jqXHR.abort():(this.errorThrown="abort",n._trigger("fail",null,this),n._getXHRPromise(!1))},i.state=function(){return this.jqXHR?n._getDeferredState(this.jqXHR):this._processQueue?n._getDeferredState(this._processQueue):void 0},i.processing=function(){return!this.jqXHR&&this._processQueue&&"pending"===n._getDeferredState(this._processQueue)},i.progress=function(){return this._progress},i.response=function(){return this._response}},_getUploadedBytes:function(t){var e=t.getResponseHeader("Range"),i=e&&e.split("-"),n=i&&i.length>1&&parseInt(i[1],10);return n&&n+1},_chunkedUpload:function(e,i){e.uploadedBytes=e.uploadedBytes||0;var n,o,s=this,a=e.files[0],r=a.size,l=e.uploadedBytes,h=e.maxChunkSize||r,c=this._blobSlice,u=t.Deferred(),d=u.promise();return!(!(this._isXHRUpload(e)&&c&&(l||("function"===t.type(h)?h(e):h)<r))||e.data)&&(!!i||(l>=r?(a.error=e.i18n("uploadedBytes"),this._getXHRPromise(!1,e.context,[null,"error",a.error])):(o=function(){var i=t.extend({},e),d=i._progress.loaded;i.blob=c.call(a,l,l+("function"===t.type(h)?h(i):h),a.type),i.chunkSize=i.blob.size,i.contentRange="bytes "+l+"-"+(l+i.chunkSize-1)+"/"+r,s._initXHRData(i),s._initProgressListener(i),n=(!1!==s._trigger("chunksend",null,i)&&t.ajax(i)||s._getXHRPromise(!1,i.context)).done(function(n,a,h){l=s._getUploadedBytes(h)||l+i.chunkSize,d+i.chunkSize-i._progress.loaded&&s._onProgress(t.Event("progress",{lengthComputable:!0,loaded:l-i.uploadedBytes,total:l-i.uploadedBytes}),i),e.uploadedBytes=i.uploadedBytes=l,i.result=n,i.textStatus=a,i.jqXHR=h,s._trigger("chunkdone",null,i),s._trigger("chunkalways",null,i),l<r?o():u.resolveWith(i.context,[n,a,h])}).fail(function(t,e,n){i.jqXHR=t,i.textStatus=e,i.errorThrown=n,s._trigger("chunkfail",null,i),s._trigger("chunkalways",null,i),u.rejectWith(i.context,[t,e,n])})},this._enhancePromise(d),d.abort=function(){return n.abort()},o(),d)))},_beforeSend:function(t,e){0===this._active&&(this._trigger("start"),this._bitrateTimer=new this._BitrateTimer,this._progress.loaded=this._progress.total=0,this._progress.bitrate=0),this._initResponseObject(e),this._initProgressObject(e),e._progress.loaded=e.loaded=e.uploadedBytes||0,e._progress.total=e.total=this._getTotal(e.files)||1,e._progress.bitrate=e.bitrate=0,this._active+=1,this._progress.loaded+=e.loaded,this._progress.total+=e.total},_onDone:function(e,i,n,o){var s=o._progress.total,a=o._response;o._progress.loaded<s&&this._onProgress(t.Event("progress",{lengthComputable:!0,loaded:s,total:s}),o),a.result=o.result=e,a.textStatus=o.textStatus=i,a.jqXHR=o.jqXHR=n,this._trigger("done",null,o)},_onFail:function(t,e,i,n){var o=n._response;n.recalculateProgress&&(this._progress.loaded-=n._progress.loaded,this._progress.total-=n._progress.total),o.jqXHR=n.jqXHR=t,o.textStatus=n.textStatus=e,o.errorThrown=n.errorThrown=i,this._trigger("fail",null,n)},_onAlways:function(t,e,i,n){this._trigger("always",null,n)},_onSend:function(e,i){i.submit||this._addConvenienceMethods(e,i);var n,o,s,a,r=this,l=r._getAJAXSettings(i),h=function(){return r._sending+=1,l._bitrateTimer=new r._BitrateTimer,n=n||((o||!1===r._trigger("send",t.Event("send",{delegatedEvent:e}),l))&&r._getXHRPromise(!1,l.context,o)||r._chunkedUpload(l)||t.ajax(l)).done(function(t,e,i){r._onDone(t,e,i,l)}).fail(function(t,e,i){r._onFail(t,e,i,l)}).always(function(t,e,i){if(r._onAlways(t,e,i,l),r._sending-=1,r._active-=1,l.limitConcurrentUploads&&l.limitConcurrentUploads>r._sending)for(var n=r._slots.shift();n;){if("pending"===r._getDeferredState(n)){n.resolve();break}n=r._slots.shift()}0===r._active&&r._trigger("stop")})};return this._beforeSend(e,l),this.options.sequentialUploads||this.options.limitConcurrentUploads&&this.options.limitConcurrentUploads<=this._sending?(this.options.limitConcurrentUploads>1?(s=t.Deferred(),this._slots.push(s),a=s.then(h)):(this._sequence=this._sequence.then(h,h),a=this._sequence),a.abort=function(){return o=[void 0,"abort","abort"],n?n.abort():(s&&s.rejectWith(l.context,o),h())},this._enhancePromise(a)):h()},_onAdd:function(e,i){var n,o,s,a,r=this,l=!0,h=t.extend({},this.options,i),c=i.files,u=c.length,d=h.limitMultiFileUploads,p=h.limitMultiFileUploadSize,f=h.limitMultiFileUploadSizeOverhead,g=0,m=this._getParamName(h),v=0;if(!u)return!1;if(p&&void 0===c[0].size&&(p=void 0),(h.singleFileUploads||d||p)&&this._isXHRUpload(h))if(h.singleFileUploads||p||!d)if(!h.singleFileUploads&&p)for(s=[],n=[],a=0;a<u;a+=1)g+=c[a].size+f,(a+1===u||g+c[a+1].size+f>p||d&&a+1-v>=d)&&(s.push(c.slice(v,a+1)),o=m.slice(v,a+1),o.length||(o=m),n.push(o),v=a+1,g=0);else n=m;else for(s=[],n=[],a=0;a<u;a+=d)s.push(c.slice(a,a+d)),o=m.slice(a,a+d),o.length||(o=m),n.push(o);else s=[c],n=[m];return i.originalFiles=c,t.each(s||c,function(o,a){var h=t.extend({},i);return h.files=s?a:[a],h.paramName=n[o],r._initResponseObject(h),r._initProgressObject(h),r._addConvenienceMethods(e,h),l=r._trigger("add",t.Event("add",{delegatedEvent:e}),h)}),l},_replaceFileInput:function(e){var i=e.fileInput,n=i.clone(!0),o=i.is(document.activeElement);e.fileInputClone=n,t("<form></form>").append(n)[0].reset(),i.after(n).detach(),o&&n.focus(),t.cleanData(i.unbind("remove")),this.options.fileInput=this.options.fileInput.map(function(t,e){return e===i[0]?n[0]:e}),i[0]===this.element[0]&&(this.element=n)},_handleFileTreeEntry:function(e,i){var n,o=this,s=t.Deferred(),a=[],r=function(t){t&&!t.entry&&(t.entry=e),s.resolve([t])},l=function(t){o._handleFileTreeEntries(t,i+e.name+"/").done(function(t){s.resolve(t)}).fail(r)},h=function(){n.readEntries(function(t){t.length?(a=a.concat(t),h()):l(a)},r)};return i=i||"",e.isFile?e._file?(e._file.relativePath=i,s.resolve(e._file)):e.file(function(t){t.relativePath=i,s.resolve(t)},r):e.isDirectory?(n=e.createReader(),h()):s.resolve([]),s.promise()},_handleFileTreeEntries:function(e,i){var n=this;return t.when.apply(t,t.map(e,function(t){return n._handleFileTreeEntry(t,i)})).then(function(){return Array.prototype.concat.apply([],arguments)})},_getDroppedFiles:function(e){e=e||{};var i=e.items;return i&&i.length&&(i[0].webkitGetAsEntry||i[0].getAsEntry)?this._handleFileTreeEntries(t.map(i,function(t){var e;return t.webkitGetAsEntry?(e=t.webkitGetAsEntry(),e&&(e._file=t.getAsFile()),e):t.getAsEntry()})):t.Deferred().resolve(t.makeArray(e.files)).promise()},_getSingleFileInputFiles:function(e){e=t(e);var i,n,o=e.prop("webkitEntries")||e.prop("entries");if(o&&o.length)return this._handleFileTreeEntries(o);if(i=t.makeArray(e.prop("files")),i.length)void 0===i[0].name&&i[0].fileName&&t.each(i,function(t,e){e.name=e.fileName,e.size=e.fileSize});else{if(!(n=e.prop("value")))return t.Deferred().resolve([]).promise();i=[{name:n.replace(/^.*\\/,"")}]}return t.Deferred().resolve(i).promise()},
_getFileInputFiles:function(e){return e instanceof t&&1!==e.length?t.when.apply(t,t.map(e,this._getSingleFileInputFiles)).then(function(){return Array.prototype.concat.apply([],arguments)}):this._getSingleFileInputFiles(e)},_onChange:function(e){var i=this,n={fileInput:t(e.target),form:t(e.target.form)};this._getFileInputFiles(n.fileInput).always(function(o){n.files=o,i.options.replaceFileInput&&i._replaceFileInput(n),!1!==i._trigger("change",t.Event("change",{delegatedEvent:e}),n)&&i._onAdd(e,n)})},_onPaste:function(e){var i=e.originalEvent&&e.originalEvent.clipboardData&&e.originalEvent.clipboardData.items,n={files:[]};i&&i.length&&(t.each(i,function(t,e){var i=e.getAsFile&&e.getAsFile();i&&n.files.push(i)}),!1!==this._trigger("paste",t.Event("paste",{delegatedEvent:e}),n)&&this._onAdd(e,n))},_onDrop:function(e){e.dataTransfer=e.originalEvent&&e.originalEvent.dataTransfer;var i=this,n=e.dataTransfer,o={};n&&n.files&&n.files.length&&(e.preventDefault(),this._getDroppedFiles(n).always(function(n){o.files=n,!1!==i._trigger("drop",t.Event("drop",{delegatedEvent:e}),o)&&i._onAdd(e,o)}))},_onDragOver:e("dragover"),_onDragEnter:e("dragenter"),_onDragLeave:e("dragleave"),_initEventHandlers:function(){this._isXHRUpload(this.options)&&(this._on(this.options.dropZone,{dragover:this._onDragOver,drop:this._onDrop,dragenter:this._onDragEnter,dragleave:this._onDragLeave}),this._on(this.options.pasteZone,{paste:this._onPaste})),t.support.fileInput&&this._on(this.options.fileInput,{change:this._onChange})},_destroyEventHandlers:function(){this._off(this.options.dropZone,"dragenter dragleave dragover drop"),this._off(this.options.pasteZone,"paste"),this._off(this.options.fileInput,"change")},_destroy:function(){this._destroyEventHandlers()},_setOption:function(e,i){var n=-1!==t.inArray(e,this._specialOptions);n&&this._destroyEventHandlers(),this._super(e,i),n&&(this._initSpecialOptions(),this._initEventHandlers())},_initSpecialOptions:function(){var e=this.options;void 0===e.fileInput?e.fileInput=this.element.is('input[type="file"]')?this.element:this.element.find('input[type="file"]'):e.fileInput instanceof t||(e.fileInput=t(e.fileInput)),e.dropZone instanceof t||(e.dropZone=t(e.dropZone)),e.pasteZone instanceof t||(e.pasteZone=t(e.pasteZone))},_getRegExp:function(t){var e=t.split("/"),i=e.pop();return e.shift(),new RegExp(e.join("/"),i)},_isRegExpOption:function(e,i){return"url"!==e&&"string"===t.type(i)&&/^\/.*\/[igm]{0,3}$/.test(i)},_initDataAttributes:function(){var e=this,i=this.options,n=this.element.data();t.each(this.element[0].attributes,function(t,o){var s,a=o.name.toLowerCase();/^data-/.test(a)&&(a=a.slice(5).replace(/-[a-z]/g,function(t){return t.charAt(1).toUpperCase()}),s=n[a],e._isRegExpOption(a,s)&&(s=e._getRegExp(s)),i[a]=s)})},_create:function(){this._initDataAttributes(),this._initSpecialOptions(),this._slots=[],this._sequence=this._getXHRPromise(!0),this._sending=this._active=0,this._initProgressObject(this),this._initEventHandlers()},active:function(){return this._active},progress:function(){return this._progress},add:function(e){var i=this;e&&!this.options.disabled&&(e.fileInput&&!e.files?this._getFileInputFiles(e.fileInput).always(function(t){e.files=t,i._onAdd(null,e)}):(e.files=t.makeArray(e.files),this._onAdd(null,e)))},send:function(e){if(e&&!this.options.disabled){if(e.fileInput&&!e.files){var i,n,o=this,s=t.Deferred(),a=s.promise();return a.abort=function(){return n=!0,i?i.abort():(s.reject(null,"abort","abort"),a)},this._getFileInputFiles(e.fileInput).always(function(t){if(!n){if(!t.length)return void s.reject();e.files=t,i=o._onSend(null,e),i.then(function(t,e,i){s.resolve(t,e,i)},function(t,e,i){s.reject(t,e,i)})}}),this._enhancePromise(a)}if(e.files=t.makeArray(e.files),e.files.length)return this._onSend(null,e)}return this._getXHRPromise(!1,e&&e.context)}})}),function(t,e){"function"==typeof define&&define.amd?define(["jquery"],function(t){return e(t)}):"object"==typeof exports?module.exports=e(require("jquery")):jQuery&&!jQuery.fn.colorpicker&&e(jQuery)}(0,function(t){"use strict";var e=function(i,n,o,s,a){this.fallbackValue=o?o&&void 0!==o.h?o:this.value={h:0,s:0,b:0,a:1}:null,this.fallbackFormat=s||"rgba",this.hexNumberSignPrefix=!0===a,this.value=this.fallbackValue,this.origFormat=null,this.predefinedColors=n||{},this.colors=t.extend({},e.webColors,this.predefinedColors),i&&(void 0!==i.h?this.value=i:this.setColor(String(i))),this.value||(this.value={h:0,s:0,b:0,a:1})};e.webColors={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32",transparent:"transparent"},e.prototype={constructor:e,colors:{},predefinedColors:{},getValue:function(){return this.value},setValue:function(t){this.value=t},_sanitizeNumber:function(t){return"number"==typeof t?t:isNaN(t)||null===t||""===t||void 0===t?1:""===t?0:void 0!==t.toLowerCase?(t.match(/^\./)&&(t="0"+t),Math.ceil(100*parseFloat(t))/100):1},isTransparent:function(t){return!(!t||!("string"==typeof t||t instanceof String))&&("transparent"===(t=t.toLowerCase().trim())||t.match(/#?00000000/)||t.match(/(rgba|hsla)\(0,0,0,0?\.?0\)/))},rgbaIsTransparent:function(t){return 0===t.r&&0===t.g&&0===t.b&&0===t.a},setColor:function(t){if(t=t.toLowerCase().trim()){if(this.isTransparent(t))return this.value={h:0,s:0,b:0,a:0},!0;var e=this.parse(t);e?(this.value=this.value={h:e.h,s:e.s,b:e.b,a:e.a},this.origFormat||(this.origFormat=e.format)):this.fallbackValue&&(this.value=this.fallbackValue)}return!1},setHue:function(t){this.value.h=1-t},setSaturation:function(t){this.value.s=t},setBrightness:function(t){this.value.b=1-t},setAlpha:function(t){this.value.a=Math.round(parseInt(100*(1-t),10)/100*100)/100},toRGB:function(t,e,i,n){0===arguments.length&&(t=this.value.h,e=this.value.s,i=this.value.b,n=this.value.a),t*=360;var o,s,a,r,l;return t=t%360/60,l=i*e,r=l*(1-Math.abs(t%2-1)),o=s=a=i-l,t=~~t,o+=[l,r,0,0,r,l][t],s+=[r,l,l,r,0,0][t],a+=[0,0,r,l,l,r][t],{r:Math.round(255*o),g:Math.round(255*s),b:Math.round(255*a),a:n}},toHex:function(t,e,i,n,o){arguments.length<=1&&(e=this.value.h,i=this.value.s,n=this.value.b,o=this.value.a);var s="#",a=this.toRGB(e,i,n,o);return this.rgbaIsTransparent(a)?"transparent":(t||(s=this.hexNumberSignPrefix?"#":""),s+((1<<24)+(parseInt(a.r)<<16)+(parseInt(a.g)<<8)+parseInt(a.b)).toString(16).slice(1))},toHSL:function(t,e,i,n){0===arguments.length&&(t=this.value.h,e=this.value.s,i=this.value.b,n=this.value.a);var o=t,s=(2-e)*i,a=e*i;return a/=s>0&&s<=1?s:2-s,s/=2,a>1&&(a=1),{h:isNaN(o)?0:o,s:isNaN(a)?0:a,l:isNaN(s)?0:s,a:isNaN(n)?0:n}},toAlias:function(t,e,i,n){var o,s=0===arguments.length?this.toHex(!0):this.toHex(!0,t,e,i,n),a="alias"===this.origFormat?s:this.toString(!1,this.origFormat);for(var r in this.colors)if((o=this.colors[r].toLowerCase().trim())===s||o===a)return r;return!1},RGBtoHSB:function(t,e,i,n){t/=255,e/=255,i/=255;var o,s,a,r;return a=Math.max(t,e,i),r=a-Math.min(t,e,i),o=0===r?null:a===t?(e-i)/r:a===e?(i-t)/r+2:(t-e)/r+4,o=(o+360)%6*60/360,s=0===r?0:r/a,{h:this._sanitizeNumber(o),s:s,b:a,a:this._sanitizeNumber(n)}},HueToRGB:function(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t},HSLtoRGB:function(t,e,i,n){e<0&&(e=0);var o;o=i<=.5?i*(1+e):i+e-i*e;var s=2*i-o,a=t+1/3,r=t,l=t-1/3;return[Math.round(255*this.HueToRGB(s,o,a)),Math.round(255*this.HueToRGB(s,o,r)),Math.round(255*this.HueToRGB(s,o,l)),this._sanitizeNumber(n)]},parse:function(e){if(0===arguments.length)return!1;var i,n,o=this,s=!1,a=void 0!==this.colors[e];return a&&(e=this.colors[e].toLowerCase().trim()),t.each(this.stringParsers,function(t,r){var l=r.re.exec(e);return!(i=l&&r.parse.apply(o,[l]))||(s={},n=a?"alias":r.format?r.format:o.getValidFallbackFormat(),s=n.match(/hsla?/)?o.RGBtoHSB.apply(o,o.HSLtoRGB.apply(o,i)):o.RGBtoHSB.apply(o,i),s instanceof Object&&(s.format=n),!1)}),s},getValidFallbackFormat:function(){var t=["rgba","rgb","hex","hsla","hsl"];return this.origFormat&&-1!==t.indexOf(this.origFormat)?this.origFormat:this.fallbackFormat&&-1!==t.indexOf(this.fallbackFormat)?this.fallbackFormat:"rgba"},toString:function(t,i,n){i=i||this.origFormat||this.fallbackFormat,n=n||!1;var o=!1;switch(i){case"rgb":return o=this.toRGB(),this.rgbaIsTransparent(o)?"transparent":"rgb("+o.r+","+o.g+","+o.b+")";case"rgba":return o=this.toRGB(),"rgba("+o.r+","+o.g+","+o.b+","+o.a+")";case"hsl":return o=this.toHSL(),"hsl("+Math.round(360*o.h)+","+Math.round(100*o.s)+"%,"+Math.round(100*o.l)+"%)";case"hsla":return o=this.toHSL(),"hsla("+Math.round(360*o.h)+","+Math.round(100*o.s)+"%,"+Math.round(100*o.l)+"%,"+o.a+")";case"hex":return this.toHex(t);case"alias":return o=this.toAlias(),!1===o?this.toString(t,this.getValidFallbackFormat()):n&&!(o in e.webColors)&&o in this.predefinedColors?this.predefinedColors[o]:o;default:return o}},stringParsers:[{re:/rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*?\)/,format:"rgb",parse:function(t){return[t[1],t[2],t[3],1]}},{re:/rgb\(\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*?\)/,format:"rgb",parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],1]}},{re:/rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d*(?:\.\d+)?)\s*)?\)/,format:"rgba",parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba\(\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*(?:,\s*(\d*(?:\.\d+)?)\s*)?\)/,format:"rgba",parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/hsl\(\s*(\d*(?:\.\d+)?)\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*?\)/,format:"hsl",parse:function(t){return[t[1]/360,t[2]/100,t[3]/100,t[4]]}},{re:/hsla\(\s*(\d*(?:\.\d+)?)\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*(?:,\s*(\d*(?:\.\d+)?)\s*)?\)/,format:"hsla",parse:function(t){return[t[1]/360,t[2]/100,t[3]/100,t[4]]}},{re:/#?([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,format:"hex",parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16),1]}},{re:/#?([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/,format:"hex",parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16),1]}}],colorNameToHex:function(t){return void 0!==this.colors[t.toLowerCase()]&&this.colors[t.toLowerCase()]}};var i={horizontal:!1,inline:!1,color:!1,format:!1,input:"input",container:!1,component:".add-on, .input-group-addon",fallbackColor:!1,fallbackFormat:"hex",hexNumberSignPrefix:!0,sliders:{saturation:{maxLeft:100,maxTop:100,callLeft:"setSaturation",callTop:"setBrightness"},hue:{maxLeft:0,maxTop:100,callLeft:!1,callTop:"setHue"},alpha:{maxLeft:0,maxTop:100,callLeft:!1,callTop:"setAlpha"}},slidersHorz:{saturation:{maxLeft:100,maxTop:100,callLeft:"setSaturation",callTop:"setBrightness"},hue:{maxLeft:100,maxTop:0,callLeft:"setHue",callTop:!1},alpha:{maxLeft:100,maxTop:0,callLeft:"setAlpha",callTop:!1}},template:'<div class="colorpicker dropdown-menu"><div class="colorpicker-saturation"><i><b></b></i></div><div class="colorpicker-hue"><i></i></div><div class="colorpicker-alpha"><i></i></div><div class="colorpicker-color"><div /></div><div class="colorpicker-selectors"></div></div>',align:"right",customClass:null,colorSelectors:null},n=function(e,n){this.element=t(e).addClass("colorpicker-element"),this.options=t.extend(!0,{},i,this.element.data(),n),this.component=this.options.component,this.component=!1!==this.component&&this.element.find(this.component),this.component&&0===this.component.length&&(this.component=!1),this.container=!0===this.options.container?this.element:this.options.container,this.container=!1!==this.container&&t(this.container),this.input=this.element.is("input")?this.element:!!this.options.input&&this.element.find(this.options.input),this.input&&0===this.input.length&&(this.input=!1),this.color=this.createColor(!1!==this.options.color?this.options.color:this.getValue()),this.format=!1!==this.options.format?this.options.format:this.color.origFormat,!1!==this.options.color&&(this.updateInput(this.color),this.updateData(this.color)),this.disabled=!1;var o=this.picker=t(this.options.template);if(this.options.customClass&&o.addClass(this.options.customClass),this.options.inline?o.addClass("colorpicker-inline colorpicker-visible"):o.addClass("colorpicker-hidden"),this.options.horizontal&&o.addClass("colorpicker-horizontal"),-1===["rgba","hsla","alias"].indexOf(this.format)&&!1!==this.options.format&&"transparent"!==this.getValue()||o.addClass("colorpicker-with-alpha"),"right"===this.options.align&&o.addClass("colorpicker-right"),!0===this.options.inline&&o.addClass("colorpicker-no-arrow"),this.options.colorSelectors){var s=this,a=s.picker.find(".colorpicker-selectors");a.length>0&&(t.each(this.options.colorSelectors,function(e,i){var n=t("<i />").addClass("colorpicker-selectors-color").css("background-color",i).data("class",e).data("alias",e);n.on("mousedown.colorpicker touchstart.colorpicker",function(e){e.preventDefault(),s.setValue("alias"===s.format?t(this).data("alias"):t(this).css("background-color"))}),a.append(n)}),a.show().addClass("colorpicker-visible"))}o.on("mousedown.colorpicker touchstart.colorpicker",t.proxy(function(t){t.target===t.currentTarget&&t.preventDefault()},this)),o.find(".colorpicker-saturation, .colorpicker-hue, .colorpicker-alpha").on("mousedown.colorpicker touchstart.colorpicker",t.proxy(this.mousedown,this)),o.appendTo(this.container?this.container:t("body")),!1!==this.input&&(this.input.on({"keyup.colorpicker":t.proxy(this.keyup,this)}),this.input.on({"change.colorpicker":t.proxy(this.change,this)}),!1===this.component&&this.element.on({"focus.colorpicker":t.proxy(this.show,this)}),!1===this.options.inline&&this.element.on({"focusout.colorpicker":t.proxy(this.hide,this)})),!1!==this.component&&this.component.on({"click.colorpicker":t.proxy(this.show,this)}),!1===this.input&&!1===this.component&&this.element.on({"click.colorpicker":t.proxy(this.show,this)}),!1!==this.input&&!1!==this.component&&"color"===this.input.attr("type")&&this.input.on({"click.colorpicker":t.proxy(this.show,this),"focus.colorpicker":t.proxy(this.show,this)}),this.update(),t(t.proxy(function(){this.element.trigger("create")},this))};n.Color=e,n.prototype={constructor:n,destroy:function(){this.picker.remove(),this.element.removeData("colorpicker","color").off(".colorpicker"),!1!==this.input&&this.input.off(".colorpicker"),!1!==this.component&&this.component.off(".colorpicker"),this.element.removeClass("colorpicker-element"),this.element.trigger({type:"destroy"})},reposition:function(){if(!1!==this.options.inline||this.options.container)return!1;var t=this.container&&this.container[0]!==window.document.body?"position":"offset",e=this.component||this.element,i=e[t]();"right"===this.options.align&&(i.left-=this.picker.outerWidth()-e.outerWidth()),this.picker.css({top:i.top+e.outerHeight(),left:i.left})},show:function(e){this.isDisabled()||(this.picker.addClass("colorpicker-visible").removeClass("colorpicker-hidden"),this.reposition(),t(window).on("resize.colorpicker",t.proxy(this.reposition,this)),!e||this.hasInput()&&"color"!==this.input.attr("type")||e.stopPropagation&&e.preventDefault&&(e.stopPropagation(),e.preventDefault()),!this.component&&this.input||!1!==this.options.inline||t(window.document).on({"mousedown.colorpicker":t.proxy(this.hide,this)}),this.element.trigger({type:"showPicker",color:this.color}))},hide:function(e){if(void 0!==e&&e.target&&(t(e.currentTarget).parents(".colorpicker").length>0||t(e.target).parents(".colorpicker").length>0))return!1;this.picker.addClass("colorpicker-hidden").removeClass("colorpicker-visible"),t(window).off("resize.colorpicker",this.reposition),t(window.document).off({"mousedown.colorpicker":this.hide}),this.update(),this.element.trigger({type:"hidePicker",color:this.color})},updateData:function(t){return t=t||this.color.toString(!1,this.format),this.element.data("color",t),t},updateInput:function(t){return t=t||this.color.toString(!1,this.format),!1!==this.input&&(this.input.prop("value",t),this.input.trigger("change")),t},updatePicker:function(t){void 0!==t&&(this.color=this.createColor(t));var e=!1===this.options.horizontal?this.options.sliders:this.options.slidersHorz,i=this.picker.find("i");if(0!==i.length)return!1===this.options.horizontal?(e=this.options.sliders,i.eq(1).css("top",e.hue.maxTop*(1-this.color.value.h)).end().eq(2).css("top",e.alpha.maxTop*(1-this.color.value.a))):(e=this.options.slidersHorz,i.eq(1).css("left",e.hue.maxLeft*(1-this.color.value.h)).end().eq(2).css("left",e.alpha.maxLeft*(1-this.color.value.a))),i.eq(0).css({top:e.saturation.maxTop-this.color.value.b*e.saturation.maxTop,left:this.color.value.s*e.saturation.maxLeft}),this.picker.find(".colorpicker-saturation").css("backgroundColor",this.color.toHex(!0,this.color.value.h,1,1,1)),this.picker.find(".colorpicker-alpha").css("backgroundColor",this.color.toHex(!0)),this.picker.find(".colorpicker-color, .colorpicker-color div").css("backgroundColor",this.color.toString(!0,this.format)),t},updateComponent:function(t){var e;if(e=void 0!==t?this.createColor(t):this.color,!1!==this.component){var i=this.component.find("i").eq(0);i.length>0?i.css({backgroundColor:e.toString(!0,this.format)}):this.component.css({backgroundColor:e.toString(!0,this.format)})}return e.toString(!1,this.format)},update:function(t){var e;return!1===this.getValue(!1)&&!0!==t||(e=this.updateComponent(),this.updateInput(e),this.updateData(e),this.updatePicker()),e},setValue:function(t){this.color=this.createColor(t),this.update(!0),this.element.trigger({type:"changeColor",color:this.color,value:t})},createColor:function(t){return new e(t||null,this.options.colorSelectors,this.options.fallbackColor?this.options.fallbackColor:this.color,this.options.fallbackFormat,this.options.hexNumberSignPrefix)},getValue:function(t){t=void 0===t?this.options.fallbackColor:t;var e;return e=this.hasInput()?this.input.val():this.element.data("color"),void 0!==e&&""!==e&&null!==e||(e=t),e},hasInput:function(){return!1!==this.input},isDisabled:function(){return this.disabled},disable:function(){return this.hasInput()&&this.input.prop("disabled",!0),this.disabled=!0,this.element.trigger({type:"disable",color:this.color,value:this.getValue()}),!0},enable:function(){return this.hasInput()&&this.input.prop("disabled",!1),this.disabled=!1,this.element.trigger({type:"enable",color:this.color,value:this.getValue()}),!0},currentSlider:null,mousePointer:{left:0,top:0},mousedown:function(e){!e.pageX&&!e.pageY&&e.originalEvent&&e.originalEvent.touches&&(e.pageX=e.originalEvent.touches[0].pageX,e.pageY=e.originalEvent.touches[0].pageY),e.stopPropagation(),e.preventDefault();var i=t(e.target),n=i.closest("div"),o=this.options.horizontal?this.options.slidersHorz:this.options.sliders;if(!n.is(".colorpicker")){if(n.is(".colorpicker-saturation"))this.currentSlider=t.extend({},o.saturation);else if(n.is(".colorpicker-hue"))this.currentSlider=t.extend({},o.hue);else{if(!n.is(".colorpicker-alpha"))return!1;this.currentSlider=t.extend({},o.alpha)}var s=n.offset();this.currentSlider.guide=n.find("i")[0].style,this.currentSlider.left=e.pageX-s.left,this.currentSlider.top=e.pageY-s.top,this.mousePointer={left:e.pageX,top:e.pageY},t(window.document).on({"mousemove.colorpicker":t.proxy(this.mousemove,this),"touchmove.colorpicker":t.proxy(this.mousemove,this),"mouseup.colorpicker":t.proxy(this.mouseup,this),"touchend.colorpicker":t.proxy(this.mouseup,this)}).trigger("mousemove")}return!1},mousemove:function(t){!t.pageX&&!t.pageY&&t.originalEvent&&t.originalEvent.touches&&(t.pageX=t.originalEvent.touches[0].pageX,t.pageY=t.originalEvent.touches[0].pageY),t.stopPropagation(),t.preventDefault();var e=Math.max(0,Math.min(this.currentSlider.maxLeft,this.currentSlider.left+((t.pageX||this.mousePointer.left)-this.mousePointer.left))),i=Math.max(0,Math.min(this.currentSlider.maxTop,this.currentSlider.top+((t.pageY||this.mousePointer.top)-this.mousePointer.top)));return this.currentSlider.guide.left=e+"px",this.currentSlider.guide.top=i+"px",this.currentSlider.callLeft&&this.color[this.currentSlider.callLeft].call(this.color,e/this.currentSlider.maxLeft),this.currentSlider.callTop&&this.color[this.currentSlider.callTop].call(this.color,i/this.currentSlider.maxTop),!1!==this.options.format||"setAlpha"!==this.currentSlider.callTop&&"setAlpha"!==this.currentSlider.callLeft||(1!==this.color.value.a?(this.format="rgba",this.color.origFormat="rgba"):(this.format="hex",this.color.origFormat="hex")),this.update(!0),this.element.trigger({type:"changeColor",color:this.color}),!1},mouseup:function(e){return e.stopPropagation(),e.preventDefault(),t(window.document).off({"mousemove.colorpicker":this.mousemove,"touchmove.colorpicker":this.mousemove,"mouseup.colorpicker":this.mouseup,"touchend.colorpicker":this.mouseup}),!1},change:function(t){this.keyup(t)},keyup:function(t){38===t.keyCode?(this.color.value.a<1&&(this.color.value.a=Math.round(100*(this.color.value.a+.01))/100),this.update(!0)):40===t.keyCode?(this.color.value.a>0&&(this.color.value.a=Math.round(100*(this.color.value.a-.01))/100),this.update(!0)):(this.color=this.createColor(this.input.val()),this.color.origFormat&&!1===this.options.format&&(this.format=this.color.origFormat),!1!==this.getValue(!1)&&(this.updateData(),this.updateComponent(),this.updatePicker())),this.element.trigger({type:"changeColor",color:this.color,value:this.input.val()})}},t.colorpicker=n,t.fn.colorpicker=function(e){var i=Array.prototype.slice.call(arguments,1),o=1===this.length,s=null,a=this.each(function(){var o=t(this),a=o.data("colorpicker"),r="object"==typeof e?e:{};a||(a=new n(this,r),o.data("colorpicker",a)),"string"==typeof e?t.isFunction(a[e])?s=a[e].apply(a,i):(i.length&&(a[e]=i[0]),s=a[e]):s=o});return o?s:a},t.fn.colorpicker.constructor=n}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t("object"==typeof exports?require("jquery"):jQuery)}(function(t,e){function i(){return new Date(Date.UTC.apply(Date,arguments))}function n(){var t=new Date;return i(t.getFullYear(),t.getMonth(),t.getDate())}function o(t,e){return t.getUTCFullYear()===e.getUTCFullYear()&&t.getUTCMonth()===e.getUTCMonth()&&t.getUTCDate()===e.getUTCDate()}function s(i,n){return function(){return n!==e&&t.fn.datepicker.deprecated(n),this[i].apply(this,arguments)}}function a(t){return t&&!isNaN(t.getTime())}function r(e,i){function n(t,e){return e.toLowerCase()}var o,s=t(e).data(),a={},r=new RegExp("^"+i.toLowerCase()+"([A-Z])");i=new RegExp("^"+i.toLowerCase());for(var l in s)i.test(l)&&(o=l.replace(r,n),a[o]=s[l]);return a}function l(e){var i={};if(m[e]||(e=e.split("-")[0],m[e])){var n=m[e];return t.each(g,function(t,e){e in n&&(i[e]=n[e])}),i}}var h=function(){var e={get:function(t){return this.slice(t)[0]},contains:function(t){for(var e=t&&t.valueOf(),i=0,n=this.length;i<n;i++)if(0<=this[i].valueOf()-e&&this[i].valueOf()-e<864e5)return i;return-1},remove:function(t){this.splice(t,1)},replace:function(e){e&&(t.isArray(e)||(e=[e]),this.clear(),this.push.apply(this,e))},clear:function(){this.length=0},copy:function(){var t=new h;return t.replace(this),t}};return function(){var i=[];return i.push.apply(i,arguments),t.extend(i,e),i}}(),c=function(e,i){t.data(e,"datepicker",this),this._process_options(i),this.dates=new h,this.viewDate=this.o.defaultViewDate,this.focusDate=null,this.element=t(e),this.isInput=this.element.is("input"),this.inputField=this.isInput?this.element:this.element.find("input"),this.component=!!this.element.hasClass("date")&&this.element.find(".add-on, .input-group-addon, .btn"),this.component&&0===this.component.length&&(this.component=!1),this.isInline=!this.component&&this.element.is("div"),this.picker=t(v.template),this._check_template(this.o.templates.leftArrow)&&this.picker.find(".prev").html(this.o.templates.leftArrow),this._check_template(this.o.templates.rightArrow)&&this.picker.find(".next").html(this.o.templates.rightArrow),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("datepicker-inline").appendTo(this.element):this.picker.addClass("datepicker-dropdown dropdown-menu"),this.o.rtl&&this.picker.addClass("datepicker-rtl"),this.o.calendarWeeks&&this.picker.find(".datepicker-days .datepicker-switch, thead .datepicker-title, tfoot .today, tfoot .clear").attr("colspan",function(t,e){return Number(e)+1}),this._process_options({startDate:this._o.startDate,endDate:this._o.endDate,daysOfWeekDisabled:this.o.daysOfWeekDisabled,daysOfWeekHighlighted:this.o.daysOfWeekHighlighted,datesDisabled:this.o.datesDisabled}),this._allow_update=!1,this.setViewMode(this.o.startView),this._allow_update=!0,this.fillDow(),this.fillMonths(),this.update(),this.isInline&&this.show()};c.prototype={constructor:c,_resolveViewName:function(e){return t.each(v.viewModes,function(i,n){if(e===i||-1!==t.inArray(e,n.names))return e=i,!1}),e},_resolveDaysOfWeek:function(e){return t.isArray(e)||(e=e.split(/[,\s]*/)),t.map(e,Number)},_check_template:function(i){try{if(i===e||""===i)return!1;if((i.match(/[<>]/g)||[]).length<=0)return!0;return t(i).length>0}catch(t){return!1}},_process_options:function(e){this._o=t.extend({},this._o,e);var o=this.o=t.extend({},this._o),s=o.language;m[s]||(s=s.split("-")[0],m[s]||(s=f.language)),o.language=s,o.startView=this._resolveViewName(o.startView),o.minViewMode=this._resolveViewName(o.minViewMode),o.maxViewMode=this._resolveViewName(o.maxViewMode),o.startView=Math.max(this.o.minViewMode,Math.min(this.o.maxViewMode,o.startView)),!0!==o.multidate&&(o.multidate=Number(o.multidate)||!1,!1!==o.multidate&&(o.multidate=Math.max(0,o.multidate))),o.multidateSeparator=String(o.multidateSeparator),o.weekStart%=7,o.weekEnd=(o.weekStart+6)%7;var a=v.parseFormat(o.format);o.startDate!==-1/0&&(o.startDate?o.startDate instanceof Date?o.startDate=this._local_to_utc(this._zero_time(o.startDate)):o.startDate=v.parseDate(o.startDate,a,o.language,o.assumeNearbyYear):o.startDate=-1/0),o.endDate!==1/0&&(o.endDate?o.endDate instanceof Date?o.endDate=this._local_to_utc(this._zero_time(o.endDate)):o.endDate=v.parseDate(o.endDate,a,o.language,o.assumeNearbyYear):o.endDate=1/0),o.daysOfWeekDisabled=this._resolveDaysOfWeek(o.daysOfWeekDisabled||[]),o.daysOfWeekHighlighted=this._resolveDaysOfWeek(o.daysOfWeekHighlighted||[]),o.datesDisabled=o.datesDisabled||[],t.isArray(o.datesDisabled)||(o.datesDisabled=o.datesDisabled.split(",")),o.datesDisabled=t.map(o.datesDisabled,function(t){return v.parseDate(t,a,o.language,o.assumeNearbyYear)});var r=String(o.orientation).toLowerCase().split(/\s+/g),l=o.orientation.toLowerCase();if(r=t.grep(r,function(t){return/^auto|left|right|top|bottom$/.test(t)}),o.orientation={x:"auto",y:"auto"},l&&"auto"!==l)if(1===r.length)switch(r[0]){case"top":case"bottom":o.orientation.y=r[0];break;case"left":case"right":o.orientation.x=r[0]}else l=t.grep(r,function(t){return/^left|right$/.test(t)}),o.orientation.x=l[0]||"auto",l=t.grep(r,function(t){return/^top|bottom$/.test(t)}),o.orientation.y=l[0]||"auto";else;if(o.defaultViewDate instanceof Date||"string"==typeof o.defaultViewDate)o.defaultViewDate=v.parseDate(o.defaultViewDate,a,o.language,o.assumeNearbyYear);else if(o.defaultViewDate){var h=o.defaultViewDate.year||(new Date).getFullYear(),c=o.defaultViewDate.month||0,u=o.defaultViewDate.day||1;o.defaultViewDate=i(h,c,u)}else o.defaultViewDate=n()},_events:[],_secondaryEvents:[],_applyEvents:function(t){for(var i,n,o,s=0;s<t.length;s++)i=t[s][0],2===t[s].length?(n=e,o=t[s][1]):3===t[s].length&&(n=t[s][1],o=t[s][2]),i.on(o,n)},_unapplyEvents:function(t){for(var i,n,o,s=0;s<t.length;s++)i=t[s][0],2===t[s].length?(o=e,n=t[s][1]):3===t[s].length&&(o=t[s][1],n=t[s][2]),i.off(n,o)},_buildEvents:function(){var e={keyup:t.proxy(function(e){-1===t.inArray(e.keyCode,[27,37,39,38,40,32,13,9])&&this.update()},this),keydown:t.proxy(this.keydown,this),paste:t.proxy(this.paste,this)};!0===this.o.showOnFocus&&(e.focus=t.proxy(this.show,this)),this.isInput?this._events=[[this.element,e]]:this.component&&this.inputField.length?this._events=[[this.inputField,e],[this.component,{click:t.proxy(this.show,this)}]]:this._events=[[this.element,{click:t.proxy(this.show,this),keydown:t.proxy(this.keydown,this)}]],this._events.push([this.element,"*",{blur:t.proxy(function(t){this._focused_from=t.target},this)}],[this.element,{blur:t.proxy(function(t){this._focused_from=t.target},this)}]),this.o.immediateUpdates&&this._events.push([this.element,{"changeYear changeMonth":t.proxy(function(t){this.update(t.date)},this)}]),this._secondaryEvents=[[this.picker,{click:t.proxy(this.click,this)}],[this.picker,".prev, .next",{click:t.proxy(this.navArrowsClick,this)}],[this.picker,".day:not(.disabled)",{click:t.proxy(this.dayCellClick,this)}],[t(window),{resize:t.proxy(this.place,this)}],[t(document),{"mousedown touchstart":t.proxy(function(t){this.element.is(t.target)||this.element.find(t.target).length||this.picker.is(t.target)||this.picker.find(t.target).length||this.isInline||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(e,i){var n=i||this.dates.get(-1),o=this._utc_to_local(n);this.element.trigger({type:e,date:o,viewMode:this.viewMode,dates:t.map(this.dates,this._utc_to_local),
format:t.proxy(function(t,e){0===arguments.length?(t=this.dates.length-1,e=this.o.format):"string"==typeof t&&(e=t,t=this.dates.length-1),e=e||this.o.format;var i=this.dates.get(t);return v.formatDate(i,e,this.o.language)},this)})},show:function(){if(!(this.inputField.prop("disabled")||this.inputField.prop("readonly")&&!1===this.o.enableOnReadonly))return this.isInline||this.picker.appendTo(this.o.container),this.place(),this.picker.show(),this._attachSecondaryEvents(),this._trigger("show"),(window.navigator.msMaxTouchPoints||"ontouchstart"in document)&&this.o.disableTouchKeyboard&&t(this.element).blur(),this},hide:function(){return this.isInline||!this.picker.is(":visible")?this:(this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.setViewMode(this.o.startView),this.o.forceParse&&this.inputField.val()&&this.setValue(),this._trigger("hide"),this)},destroy:function(){return this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date,this},paste:function(e){var i;if(e.originalEvent.clipboardData&&e.originalEvent.clipboardData.types&&-1!==t.inArray("text/plain",e.originalEvent.clipboardData.types))i=e.originalEvent.clipboardData.getData("text/plain");else{if(!window.clipboardData)return;i=window.clipboardData.getData("Text")}this.setDate(i),this.update(),e.preventDefault()},_utc_to_local:function(t){if(!t)return t;var e=new Date(t.getTime()+6e4*t.getTimezoneOffset());return e.getTimezoneOffset()!==t.getTimezoneOffset()&&(e=new Date(t.getTime()+6e4*e.getTimezoneOffset())),e},_local_to_utc:function(t){return t&&new Date(t.getTime()-6e4*t.getTimezoneOffset())},_zero_time:function(t){return t&&new Date(t.getFullYear(),t.getMonth(),t.getDate())},_zero_utc_time:function(t){return t&&i(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate())},getDates:function(){return t.map(this.dates,this._utc_to_local)},getUTCDates:function(){return t.map(this.dates,function(t){return new Date(t)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){var t=this.dates.get(-1);return t!==e?new Date(t):null},clearDates:function(){this.inputField.val(""),this.update(),this._trigger("changeDate"),this.o.autoclose&&this.hide()},setDates:function(){var e=t.isArray(arguments[0])?arguments[0]:arguments;return this.update.apply(this,e),this._trigger("changeDate"),this.setValue(),this},setUTCDates:function(){var e=t.isArray(arguments[0])?arguments[0]:arguments;return this.setDates.apply(this,t.map(e,this._utc_to_local)),this},setDate:s("setDates"),setUTCDate:s("setUTCDates"),remove:s("destroy","Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead"),setValue:function(){var t=this.getFormattedDate();return this.inputField.val(t),this},getFormattedDate:function(i){i===e&&(i=this.o.format);var n=this.o.language;return t.map(this.dates,function(t){return v.formatDate(t,i,n)}).join(this.o.multidateSeparator)},getStartDate:function(){return this.o.startDate},setStartDate:function(t){return this._process_options({startDate:t}),this.update(),this.updateNavArrows(),this},getEndDate:function(){return this.o.endDate},setEndDate:function(t){return this._process_options({endDate:t}),this.update(),this.updateNavArrows(),this},setDaysOfWeekDisabled:function(t){return this._process_options({daysOfWeekDisabled:t}),this.update(),this},setDaysOfWeekHighlighted:function(t){return this._process_options({daysOfWeekHighlighted:t}),this.update(),this},setDatesDisabled:function(t){return this._process_options({datesDisabled:t}),this.update(),this},place:function(){if(this.isInline)return this;var e=this.picker.outerWidth(),i=this.picker.outerHeight(),n=t(this.o.container),o=n.width(),s="body"===this.o.container?t(document).scrollTop():n.scrollTop(),a=n.offset(),r=[0];this.element.parents().each(function(){var e=t(this).css("z-index");"auto"!==e&&0!==Number(e)&&r.push(Number(e))});var l=Math.max.apply(Math,r)+this.o.zIndexOffset,h=this.component?this.component.parent().offset():this.element.offset(),c=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),u=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),d=h.left-a.left,p=h.top-a.top;"body"!==this.o.container&&(p+=s),this.picker.removeClass("datepicker-orient-top datepicker-orient-bottom datepicker-orient-right datepicker-orient-left"),"auto"!==this.o.orientation.x?(this.picker.addClass("datepicker-orient-"+this.o.orientation.x),"right"===this.o.orientation.x&&(d-=e-u)):h.left<0?(this.picker.addClass("datepicker-orient-left"),d-=h.left-10):d+e>o?(this.picker.addClass("datepicker-orient-right"),d+=u-e):this.o.rtl?this.picker.addClass("datepicker-orient-right"):this.picker.addClass("datepicker-orient-left");var f,g=this.o.orientation.y;if("auto"===g&&(f=-s+p-i,g=f<0?"bottom":"top"),this.picker.addClass("datepicker-orient-"+g),"top"===g?p-=i+parseInt(this.picker.css("padding-top")):p+=c,this.o.rtl){var m=o-(d+u);this.picker.css({top:p,right:m,zIndex:l})}else this.picker.css({top:p,left:d,zIndex:l});return this},_allow_update:!0,update:function(){if(!this._allow_update)return this;var e=this.dates.copy(),i=[],n=!1;return arguments.length?(t.each(arguments,t.proxy(function(t,e){e instanceof Date&&(e=this._local_to_utc(e)),i.push(e)},this)),n=!0):(i=this.isInput?this.element.val():this.element.data("date")||this.inputField.val(),i=i&&this.o.multidate?i.split(this.o.multidateSeparator):[i],delete this.element.data().date),i=t.map(i,t.proxy(function(t){return v.parseDate(t,this.o.format,this.o.language,this.o.assumeNearbyYear)},this)),i=t.grep(i,t.proxy(function(t){return!this.dateWithinRange(t)||!t},this),!0),this.dates.replace(i),this.o.updateViewDate&&(this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate?this.viewDate=new Date(this.o.endDate):this.viewDate=this.o.defaultViewDate),n?(this.setValue(),this.element.change()):this.dates.length&&String(e)!==String(this.dates)&&n&&(this._trigger("changeDate"),this.element.change()),!this.dates.length&&e.length&&(this._trigger("clearDate"),this.element.change()),this.fill(),this},fillDow:function(){if(this.o.showWeekDays){var e=this.o.weekStart,i="<tr>";for(this.o.calendarWeeks&&(i+='<th class="cw">&#160;</th>');e<this.o.weekStart+7;)i+='<th class="dow',-1!==t.inArray(e,this.o.daysOfWeekDisabled)&&(i+=" disabled"),i+='">'+m[this.o.language].daysMin[e++%7]+"</th>";i+="</tr>",this.picker.find(".datepicker-days thead").append(i)}},fillMonths:function(){for(var t,e=this._utc_to_local(this.viewDate),i="",n=0;n<12;n++)t=e&&e.getMonth()===n?" focused":"",i+='<span class="month'+t+'">'+m[this.o.language].monthsShort[n]+"</span>";this.picker.find(".datepicker-months td").html(i)},setRange:function(e){e&&e.length?this.range=t.map(e,function(t){return t.valueOf()}):delete this.range,this.fill()},getClassNames:function(e){var i=[],s=this.viewDate.getUTCFullYear(),a=this.viewDate.getUTCMonth(),r=n();return e.getUTCFullYear()<s||e.getUTCFullYear()===s&&e.getUTCMonth()<a?i.push("old"):(e.getUTCFullYear()>s||e.getUTCFullYear()===s&&e.getUTCMonth()>a)&&i.push("new"),this.focusDate&&e.valueOf()===this.focusDate.valueOf()&&i.push("focused"),this.o.todayHighlight&&o(e,r)&&i.push("today"),-1!==this.dates.contains(e)&&i.push("active"),this.dateWithinRange(e)||i.push("disabled"),this.dateIsDisabled(e)&&i.push("disabled","disabled-date"),-1!==t.inArray(e.getUTCDay(),this.o.daysOfWeekHighlighted)&&i.push("highlighted"),this.range&&(e>this.range[0]&&e<this.range[this.range.length-1]&&i.push("range"),-1!==t.inArray(e.valueOf(),this.range)&&i.push("selected"),e.valueOf()===this.range[0]&&i.push("range-start"),e.valueOf()===this.range[this.range.length-1]&&i.push("range-end")),i},_fill_yearsView:function(i,n,o,s,a,r,l){for(var h,c,u,d="",p=o/10,f=this.picker.find(i),g=Math.floor(s/o)*o,m=g+9*p,v=Math.floor(this.viewDate.getFullYear()/p)*p,b=t.map(this.dates,function(t){return Math.floor(t.getUTCFullYear()/p)*p}),_=g-p;_<=m+p;_+=p)h=[n],c=null,_===g-p?h.push("old"):_===m+p&&h.push("new"),-1!==t.inArray(_,b)&&h.push("active"),(_<a||_>r)&&h.push("disabled"),_===v&&h.push("focused"),l!==t.noop&&(u=l(new Date(_,0,1)),u===e?u={}:"boolean"==typeof u?u={enabled:u}:"string"==typeof u&&(u={classes:u}),!1===u.enabled&&h.push("disabled"),u.classes&&(h=h.concat(u.classes.split(/\s+/))),u.tooltip&&(c=u.tooltip)),d+='<span class="'+h.join(" ")+'"'+(c?' title="'+c+'"':"")+">"+_+"</span>";f.find(".datepicker-switch").text(g+"-"+m),f.find("td").html(d)},fill:function(){var n,o,s=new Date(this.viewDate),a=s.getUTCFullYear(),r=s.getUTCMonth(),l=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,h=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,c=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,u=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,d=m[this.o.language].today||m.en.today||"",p=m[this.o.language].clear||m.en.clear||"",f=m[this.o.language].titleFormat||m.en.titleFormat;if(!isNaN(a)&&!isNaN(r)){this.picker.find(".datepicker-days .datepicker-switch").text(v.formatDate(s,f,this.o.language)),this.picker.find("tfoot .today").text(d).css("display",!0===this.o.todayBtn||"linked"===this.o.todayBtn?"table-cell":"none"),this.picker.find("tfoot .clear").text(p).css("display",!0===this.o.clearBtn?"table-cell":"none"),this.picker.find("thead .datepicker-title").text(this.o.title).css("display","string"==typeof this.o.title&&""!==this.o.title?"table-cell":"none"),this.updateNavArrows(),this.fillMonths();var g=i(a,r,0),b=g.getUTCDate();g.setUTCDate(b-(g.getUTCDay()-this.o.weekStart+7)%7);var _=new Date(g);g.getUTCFullYear()<100&&_.setUTCFullYear(g.getUTCFullYear()),_.setUTCDate(_.getUTCDate()+42),_=_.valueOf();for(var y,x,w=[];g.valueOf()<_;){if((y=g.getUTCDay())===this.o.weekStart&&(w.push("<tr>"),this.o.calendarWeeks)){var k=new Date(+g+(this.o.weekStart-y-7)%7*864e5),C=new Date(Number(k)+(11-k.getUTCDay())%7*864e5),D=new Date(Number(D=i(C.getUTCFullYear(),0,1))+(11-D.getUTCDay())%7*864e5),S=(C-D)/864e5/7+1;w.push('<td class="cw">'+S+"</td>")}x=this.getClassNames(g),x.push("day");var M=g.getUTCDate();this.o.beforeShowDay!==t.noop&&(o=this.o.beforeShowDay(this._utc_to_local(g)),o===e?o={}:"boolean"==typeof o?o={enabled:o}:"string"==typeof o&&(o={classes:o}),!1===o.enabled&&x.push("disabled"),o.classes&&(x=x.concat(o.classes.split(/\s+/))),o.tooltip&&(n=o.tooltip),o.content&&(M=o.content)),x=t.isFunction(t.uniqueSort)?t.uniqueSort(x):t.unique(x),w.push('<td class="'+x.join(" ")+'"'+(n?' title="'+n+'"':"")+' data-date="'+g.getTime().toString()+'">'+M+"</td>"),n=null,y===this.o.weekEnd&&w.push("</tr>"),g.setUTCDate(g.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").html(w.join(""));var T=m[this.o.language].monthsTitle||m.en.monthsTitle||"Months",I=this.picker.find(".datepicker-months").find(".datepicker-switch").text(this.o.maxViewMode<2?T:a).end().find("tbody span").removeClass("active");if(t.each(this.dates,function(t,e){e.getUTCFullYear()===a&&I.eq(e.getUTCMonth()).addClass("active")}),(a<l||a>c)&&I.addClass("disabled"),a===l&&I.slice(0,h).addClass("disabled"),a===c&&I.slice(u+1).addClass("disabled"),this.o.beforeShowMonth!==t.noop){var P=this;t.each(I,function(i,n){var o=new Date(a,i,1),s=P.o.beforeShowMonth(o);s===e?s={}:"boolean"==typeof s?s={enabled:s}:"string"==typeof s&&(s={classes:s}),!1!==s.enabled||t(n).hasClass("disabled")||t(n).addClass("disabled"),s.classes&&t(n).addClass(s.classes),s.tooltip&&t(n).prop("title",s.tooltip)})}this._fill_yearsView(".datepicker-years","year",10,a,l,c,this.o.beforeShowYear),this._fill_yearsView(".datepicker-decades","decade",100,a,l,c,this.o.beforeShowDecade),this._fill_yearsView(".datepicker-centuries","century",1e3,a,l,c,this.o.beforeShowCentury)}},updateNavArrows:function(){if(this._allow_update){var t,e,i=new Date(this.viewDate),n=i.getUTCFullYear(),o=i.getUTCMonth(),s=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,a=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,r=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,l=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,h=1;switch(this.viewMode){case 4:h*=10;case 3:h*=10;case 2:h*=10;case 1:t=Math.floor(n/h)*h<s,e=Math.floor(n/h)*h+h>r;break;case 0:t=n<=s&&o<a,e=n>=r&&o>l}this.picker.find(".prev").toggleClass("disabled",t),this.picker.find(".next").toggleClass("disabled",e)}},click:function(e){e.preventDefault(),e.stopPropagation();var o,s,a,r;o=t(e.target),o.hasClass("datepicker-switch")&&this.viewMode!==this.o.maxViewMode&&this.setViewMode(this.viewMode+1),o.hasClass("today")&&!o.hasClass("day")&&(this.setViewMode(0),this._setDate(n(),"linked"===this.o.todayBtn?null:"view")),o.hasClass("clear")&&this.clearDates(),o.hasClass("disabled")||(o.hasClass("month")||o.hasClass("year")||o.hasClass("decade")||o.hasClass("century"))&&(this.viewDate.setUTCDate(1),s=1,1===this.viewMode?(r=o.parent().find("span").index(o),a=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(r)):(r=0,a=Number(o.text()),this.viewDate.setUTCFullYear(a)),this._trigger(v.viewModes[this.viewMode-1].e,this.viewDate),this.viewMode===this.o.minViewMode?this._setDate(i(a,r,s)):(this.setViewMode(this.viewMode-1),this.fill())),this.picker.is(":visible")&&this._focused_from&&this._focused_from.focus(),delete this._focused_from},dayCellClick:function(e){var i=t(e.currentTarget),n=i.data("date"),o=new Date(n);this.o.updateViewDate&&(o.getUTCFullYear()!==this.viewDate.getUTCFullYear()&&this._trigger("changeYear",this.viewDate),o.getUTCMonth()!==this.viewDate.getUTCMonth()&&this._trigger("changeMonth",this.viewDate)),this._setDate(o)},navArrowsClick:function(e){var i=t(e.currentTarget),n=i.hasClass("prev")?-1:1;0!==this.viewMode&&(n*=12*v.viewModes[this.viewMode].navStep),this.viewDate=this.moveMonth(this.viewDate,n),this._trigger(v.viewModes[this.viewMode].e,this.viewDate),this.fill()},_toggle_multidate:function(t){var e=this.dates.contains(t);if(t||this.dates.clear(),-1!==e?(!0===this.o.multidate||this.o.multidate>1||this.o.toggleActive)&&this.dates.remove(e):!1===this.o.multidate?(this.dates.clear(),this.dates.push(t)):this.dates.push(t),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(t,e){e&&"date"!==e||this._toggle_multidate(t&&new Date(t)),(!e&&this.o.updateViewDate||"view"===e)&&(this.viewDate=t&&new Date(t)),this.fill(),this.setValue(),e&&"view"===e||this._trigger("changeDate"),this.inputField.trigger("change"),!this.o.autoclose||e&&"date"!==e||this.hide()},moveDay:function(t,e){var i=new Date(t);return i.setUTCDate(t.getUTCDate()+e),i},moveWeek:function(t,e){return this.moveDay(t,7*e)},moveMonth:function(t,e){if(!a(t))return this.o.defaultViewDate;if(!e)return t;var i,n,o=new Date(t.valueOf()),s=o.getUTCDate(),r=o.getUTCMonth(),l=Math.abs(e);if(e=e>0?1:-1,1===l)n=-1===e?function(){return o.getUTCMonth()===r}:function(){return o.getUTCMonth()!==i},i=r+e,o.setUTCMonth(i),i=(i+12)%12;else{for(var h=0;h<l;h++)o=this.moveMonth(o,e);i=o.getUTCMonth(),o.setUTCDate(s),n=function(){return i!==o.getUTCMonth()}}for(;n();)o.setUTCDate(--s),o.setUTCMonth(i);return o},moveYear:function(t,e){return this.moveMonth(t,12*e)},moveAvailableDate:function(t,e,i){do{if(t=this[i](t,e),!this.dateWithinRange(t))return!1;i="moveDay"}while(this.dateIsDisabled(t));return t},weekOfDateIsDisabled:function(e){return-1!==t.inArray(e.getUTCDay(),this.o.daysOfWeekDisabled)},dateIsDisabled:function(e){return this.weekOfDateIsDisabled(e)||t.grep(this.o.datesDisabled,function(t){return o(e,t)}).length>0},dateWithinRange:function(t){return t>=this.o.startDate&&t<=this.o.endDate},keydown:function(t){if(!this.picker.is(":visible"))return void(40!==t.keyCode&&27!==t.keyCode||(this.show(),t.stopPropagation()));var e,i,n=!1,o=this.focusDate||this.viewDate;switch(t.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),t.preventDefault(),t.stopPropagation();break;case 37:case 38:case 39:case 40:if(!this.o.keyboardNavigation||7===this.o.daysOfWeekDisabled.length)break;e=37===t.keyCode||38===t.keyCode?-1:1,0===this.viewMode?t.ctrlKey?(i=this.moveAvailableDate(o,e,"moveYear"))&&this._trigger("changeYear",this.viewDate):t.shiftKey?(i=this.moveAvailableDate(o,e,"moveMonth"))&&this._trigger("changeMonth",this.viewDate):37===t.keyCode||39===t.keyCode?i=this.moveAvailableDate(o,e,"moveDay"):this.weekOfDateIsDisabled(o)||(i=this.moveAvailableDate(o,e,"moveWeek")):1===this.viewMode?(38!==t.keyCode&&40!==t.keyCode||(e*=4),i=this.moveAvailableDate(o,e,"moveMonth")):2===this.viewMode&&(38!==t.keyCode&&40!==t.keyCode||(e*=4),i=this.moveAvailableDate(o,e,"moveYear")),i&&(this.focusDate=this.viewDate=i,this.setValue(),this.fill(),t.preventDefault());break;case 13:if(!this.o.forceParse)break;o=this.focusDate||this.dates.get(-1)||this.viewDate,this.o.keyboardNavigation&&(this._toggle_multidate(o),n=!0),this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(t.preventDefault(),t.stopPropagation(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}n&&(this.dates.length?this._trigger("changeDate"):this._trigger("clearDate"),this.inputField.trigger("change"))},setViewMode:function(t){this.viewMode=t,this.picker.children("div").hide().filter(".datepicker-"+v.viewModes[this.viewMode].clsName).show(),this.updateNavArrows(),this._trigger("changeViewMode",new Date(this.viewDate))}};var u=function(e,i){t.data(e,"datepicker",this),this.element=t(e),this.inputs=t.map(i.inputs,function(t){return t.jquery?t[0]:t}),delete i.inputs,this.keepEmptyValues=i.keepEmptyValues,delete i.keepEmptyValues,p.call(t(this.inputs),i).on("changeDate",t.proxy(this.dateUpdated,this)),this.pickers=t.map(this.inputs,function(e){return t.data(e,"datepicker")}),this.updateDates()};u.prototype={updateDates:function(){this.dates=t.map(this.pickers,function(t){return t.getUTCDate()}),this.updateRanges()},updateRanges:function(){var e=t.map(this.dates,function(t){return t.valueOf()});t.each(this.pickers,function(t,i){i.setRange(e)})},clearDates:function(){t.each(this.pickers,function(t,e){e.clearDates()})},dateUpdated:function(i){if(!this.updating){this.updating=!0;var n=t.data(i.target,"datepicker");if(n!==e){var o=n.getUTCDate(),s=this.keepEmptyValues,a=t.inArray(i.target,this.inputs),r=a-1,l=a+1,h=this.inputs.length;if(-1!==a){if(t.each(this.pickers,function(t,e){e.getUTCDate()||e!==n&&s||e.setUTCDate(o)}),o<this.dates[r])for(;r>=0&&o<this.dates[r];)this.pickers[r--].setUTCDate(o);else if(o>this.dates[l])for(;l<h&&o>this.dates[l];)this.pickers[l++].setUTCDate(o);this.updateDates(),delete this.updating}}}},destroy:function(){t.map(this.pickers,function(t){t.destroy()}),t(this.inputs).off("changeDate",this.dateUpdated),delete this.element.data().datepicker},remove:s("destroy","Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead")};var d=t.fn.datepicker,p=function(i){var n=Array.apply(null,arguments);n.shift();var o;if(this.each(function(){var e=t(this),s=e.data("datepicker"),a="object"==typeof i&&i;if(!s){var h=r(this,"date"),d=t.extend({},f,h,a),p=l(d.language),g=t.extend({},f,p,h,a);e.hasClass("input-daterange")||g.inputs?(t.extend(g,{inputs:g.inputs||e.find("input").toArray()}),s=new u(this,g)):s=new c(this,g),e.data("datepicker",s)}"string"==typeof i&&"function"==typeof s[i]&&(o=s[i].apply(s,n))}),o===e||o instanceof c||o instanceof u)return this;if(this.length>1)throw new Error("Using only allowed for the collection of a single element ("+i+" function)");return o};t.fn.datepicker=p;var f=t.fn.datepicker.defaults={assumeNearbyYear:!1,autoclose:!1,beforeShowDay:t.noop,beforeShowMonth:t.noop,beforeShowYear:t.noop,beforeShowDecade:t.noop,beforeShowCentury:t.noop,calendarWeeks:!1,clearBtn:!1,toggleActive:!1,daysOfWeekDisabled:[],daysOfWeekHighlighted:[],datesDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keepEmptyValues:!1,keyboardNavigation:!0,language:"en",minViewMode:0,maxViewMode:4,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-1/0,startView:0,todayBtn:!1,todayHighlight:!1,updateViewDate:!0,weekStart:0,disableTouchKeyboard:!1,enableOnReadonly:!0,showOnFocus:!0,zIndexOffset:10,container:"body",immediateUpdates:!1,title:"",templates:{leftArrow:"&#x00AB;",rightArrow:"&#x00BB;"},showWeekDays:!0},g=t.fn.datepicker.locale_opts=["format","rtl","weekStart"];t.fn.datepicker.Constructor=c;var m=t.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM yyyy"}},v={viewModes:[{names:["days","month"],clsName:"days",e:"changeMonth"},{names:["months","year"],clsName:"months",e:"changeYear",navStep:1},{names:["years","decade"],clsName:"years",e:"changeDecade",navStep:10},{names:["decades","century"],clsName:"decades",e:"changeCentury",navStep:100},{names:["centuries","millennium"],clsName:"centuries",e:"changeMillennium",navStep:1e3}],validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\u5e74\u6708\u65e5\[-`{-~\t\n\r]+/g,parseFormat:function(t){if("function"==typeof t.toValue&&"function"==typeof t.toDisplay)return t;var e=t.replace(this.validParts,"\0").split("\0"),i=t.match(this.validParts);if(!e||!e.length||!i||0===i.length)throw new Error("Invalid date format.");return{separators:e,parts:i}},parseDate:function(i,o,s,a){function r(t,e){return!0===e&&(e=10),t<100&&(t+=2e3)>(new Date).getFullYear()+e&&(t-=100),t}function l(){var t=this.slice(0,h[p].length),e=h[p].slice(0,t.length);return t.toLowerCase()===e.toLowerCase()}if(!i)return e;if(i instanceof Date)return i;if("string"==typeof o&&(o=v.parseFormat(o)),o.toValue)return o.toValue(i,o,s);var h,u,d,p,f,g={d:"moveDay",m:"moveMonth",w:"moveWeek",y:"moveYear"},b={yesterday:"-1d",today:"+0d",tomorrow:"+1d"};if(i in b&&(i=b[i]),/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/i.test(i)){for(h=i.match(/([\-+]\d+)([dmwy])/gi),i=new Date,p=0;p<h.length;p++)u=h[p].match(/([\-+]\d+)([dmwy])/i),d=Number(u[1]),f=g[u[2].toLowerCase()],i=c.prototype[f](i,d);return c.prototype._zero_utc_time(i)}h=i&&i.match(this.nonpunctuation)||[];var _,y,x={},w=["yyyy","yy","M","MM","m","mm","d","dd"],k={yyyy:function(t,e){return t.setUTCFullYear(a?r(e,a):e)},m:function(t,e){if(isNaN(t))return t;for(e-=1;e<0;)e+=12;for(e%=12,t.setUTCMonth(e);t.getUTCMonth()!==e;)t.setUTCDate(t.getUTCDate()-1);return t},d:function(t,e){return t.setUTCDate(e)}};k.yy=k.yyyy,k.M=k.MM=k.mm=k.m,k.dd=k.d,i=n();var C=o.parts.slice();if(h.length!==C.length&&(C=t(C).filter(function(e,i){return-1!==t.inArray(i,w)}).toArray()),h.length===C.length){var D;for(p=0,D=C.length;p<D;p++){if(_=parseInt(h[p],10),u=C[p],isNaN(_))switch(u){case"MM":y=t(m[s].months).filter(l),_=t.inArray(y[0],m[s].months)+1;break;case"M":y=t(m[s].monthsShort).filter(l),_=t.inArray(y[0],m[s].monthsShort)+1}x[u]=_}var S,M;for(p=0;p<w.length;p++)(M=w[p])in x&&!isNaN(x[M])&&(S=new Date(i),k[M](S,x[M]),isNaN(S)||(i=S))}return i},formatDate:function(e,i,n){if(!e)return"";if("string"==typeof i&&(i=v.parseFormat(i)),i.toDisplay)return i.toDisplay(e,i,n);var o={d:e.getUTCDate(),D:m[n].daysShort[e.getUTCDay()],DD:m[n].days[e.getUTCDay()],m:e.getUTCMonth()+1,M:m[n].monthsShort[e.getUTCMonth()],MM:m[n].months[e.getUTCMonth()],yy:e.getUTCFullYear().toString().substring(2),yyyy:e.getUTCFullYear()};o.dd=(o.d<10?"0":"")+o.d,o.mm=(o.m<10?"0":"")+o.m,e=[];for(var s=t.extend([],i.separators),a=0,r=i.parts.length;a<=r;a++)s.length&&e.push(s.shift()),e.push(o[i.parts[a]]);return e.join("")},headTemplate:'<thead><tr><th colspan="7" class="datepicker-title"></th></tr><tr><th class="prev">'+f.templates.leftArrow+'</th><th colspan="5" class="datepicker-switch"></th><th class="next">'+f.templates.rightArrow+"</th></tr></thead>",contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};v.template='<div class="datepicker"><div class="datepicker-days"><table class="table-condensed">'+v.headTemplate+"<tbody></tbody>"+v.footTemplate+'</table></div><div class="datepicker-months"><table class="table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+'</table></div><div class="datepicker-years"><table class="table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+'</table></div><div class="datepicker-decades"><table class="table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+'</table></div><div class="datepicker-centuries"><table class="table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+"</table></div></div>",t.fn.datepicker.DPGlobal=v,t.fn.datepicker.noConflict=function(){return t.fn.datepicker=d,this},t.fn.datepicker.version="1.8.0",t.fn.datepicker.deprecated=function(t){var e=window.console;e&&e.warn&&e.warn("DEPRECATED: "+t)},t(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(e){var i=t(this);i.data("datepicker")||(e.preventDefault(),p.call(i,"show"))}),t(function(){p.call(t('[data-provide="datepicker-inline"]'))})}),function(t){"use strict";function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}();!function(t){var n="ekkoLightbox",o=t.fn[n],s={title:"",footer:"",maxWidth:9999,maxHeight:9999,showArrows:!0,wrapping:!0,type:null,alwaysShowClose:!1,loadingMessage:'<div class="ekko-lightbox-loader"><div><div></div><div></div></div></div>',leftArrow:"<span>&#10094;</span>",rightArrow:"<span>&#10095;</span>",strings:{close:"Close",fail:"Failed to load image:",type:"Could not detect remote target type. Force the type using data-type"},doc:document,onShow:function(){},onShown:function(){},onHide:function(){},onHidden:function(){},onNavigate:function(){},onContentLoaded:function(){}},a=function(){function n(i,o){var a=this;e(this,n),this._config=t.extend({},s,o),this._$modalArrows=null,this._galleryIndex=0,this._galleryName=null,this._padding=null,this._border=null,this._titleIsShown=!1,this._footerIsShown=!1,this._wantedWidth=0,this._wantedHeight=0,this._touchstartX=0,this._touchendX=0,this._modalId="ekkoLightbox-"+Math.floor(1e3*Math.random()+1),this._$element=i instanceof jQuery?i:t(i),this._isBootstrap3=3==t.fn.modal.Constructor.VERSION[0];var r='<h4 class="modal-title">'+(this._config.title||"&nbsp;")+"</h4>",l='<button type="button" class="close" data-dismiss="modal" aria-label="'+this._config.strings.close+'"><span aria-hidden="true">&times;</span></button>',h='<div class="modal-header'+(this._config.title||this._config.alwaysShowClose?"":" hide")+'">'+(this._isBootstrap3?l+r:r+l)+"</div>",c='<div class="modal-footer'+(this._config.footer?"":" hide")+'">'+(this._config.footer||"&nbsp;")+"</div>",u='<div class="modal-dialog" role="document"><div class="modal-content">'+h+'<div class="modal-body"><div class="ekko-lightbox-container"><div class="ekko-lightbox-item fade in show"></div><div class="ekko-lightbox-item fade"></div></div></div>'+c+"</div></div>";t(this._config.doc.body).append('<div id="'+this._modalId+'" class="ekko-lightbox modal fade" tabindex="-1" tabindex="-1" role="dialog" aria-hidden="true">'+u+"</div>"),this._$modal=t("#"+this._modalId,this._config.doc),this._$modalDialog=this._$modal.find(".modal-dialog").first(),this._$modalContent=this._$modal.find(".modal-content").first(),this._$modalBody=this._$modal.find(".modal-body").first(),this._$modalHeader=this._$modal.find(".modal-header").first(),this._$modalFooter=this._$modal.find(".modal-footer").first(),this._$lightboxContainer=this._$modalBody.find(".ekko-lightbox-container").first(),this._$lightboxBodyOne=this._$lightboxContainer.find("> div:first-child").first(),this._$lightboxBodyTwo=this._$lightboxContainer.find("> div:last-child").first(),this._border=this._calculateBorders(),this._padding=this._calculatePadding(),this._galleryName=this._$element.data("gallery"),this._galleryName&&(this._$galleryItems=t(document.body).find('*[data-gallery="'+this._galleryName+'"]'),this._galleryIndex=this._$galleryItems.index(this._$element),t(document).on("keydown.ekkoLightbox",this._navigationalBinder.bind(this)),this._config.showArrows&&this._$galleryItems.length>1&&(this._$lightboxContainer.append('<div class="ekko-lightbox-nav-overlay"><a href="#">'+this._config.leftArrow+'</a><a href="#">'+this._config.rightArrow+"</a></div>"),this._$modalArrows=this._$lightboxContainer.find("div.ekko-lightbox-nav-overlay").first(),this._$lightboxContainer.on("click","a:first-child",function(t){return t.preventDefault(),a.navigateLeft()}),this._$lightboxContainer.on("click","a:last-child",function(t){return t.preventDefault(),a.navigateRight()}),this.updateNavigation())),this._$modal.on("show.bs.modal",this._config.onShow.bind(this)).on("shown.bs.modal",function(){return a._toggleLoading(!0),a._handle(),a._config.onShown.call(a)}).on("hide.bs.modal",this._config.onHide.bind(this)).on("hidden.bs.modal",function(){return a._galleryName&&(t(document).off("keydown.ekkoLightbox"),t(window).off("resize.ekkoLightbox")),a._$modal.remove(),a._config.onHidden.call(a)}).modal(this._config),t(window).on("resize.ekkoLightbox",function(){a._resize(a._wantedWidth,a._wantedHeight)}),this._$lightboxContainer.on("touchstart",function(){a._touchstartX=event.changedTouches[0].screenX}).on("touchend",function(){a._touchendX=event.changedTouches[0].screenX,a._swipeGesure()})}return i(n,null,[{key:"Default",get:function(){return s}}]),i(n,[{key:"element",value:function(){return this._$element}},{key:"modal",value:function(){return this._$modal}},{key:"navigateTo",value:function(e){if(e<0||e>this._$galleryItems.length-1)return this;this._galleryIndex=e,this.updateNavigation(),this._$element=t(this._$galleryItems.get(this._galleryIndex)),this._handle()}},{key:"navigateLeft",value:function(){if(this._$galleryItems&&1!==this._$galleryItems.length){if(0===this._galleryIndex){if(!this._config.wrapping)return;this._galleryIndex=this._$galleryItems.length-1}else this._galleryIndex--;return this._config.onNavigate.call(this,"left",this._galleryIndex),this.navigateTo(this._galleryIndex)}}},{key:"navigateRight",value:function(){if(this._$galleryItems&&1!==this._$galleryItems.length){if(this._galleryIndex===this._$galleryItems.length-1){if(!this._config.wrapping)return;this._galleryIndex=0}else this._galleryIndex++;return this._config.onNavigate.call(this,"right",this._galleryIndex),this.navigateTo(this._galleryIndex)}}},{key:"updateNavigation",value:function(){if(!this._config.wrapping){var t=this._$lightboxContainer.find("div.ekko-lightbox-nav-overlay");0===this._galleryIndex?t.find("a:first-child").addClass("disabled"):t.find("a:first-child").removeClass("disabled"),this._galleryIndex===this._$galleryItems.length-1?t.find("a:last-child").addClass("disabled"):t.find("a:last-child").removeClass("disabled")}}},{key:"close",value:function(){return this._$modal.modal("hide")}},{key:"_navigationalBinder",value:function(t){return t=t||window.event,39===t.keyCode?this.navigateRight():37===t.keyCode?this.navigateLeft():void 0}},{key:"_detectRemoteType",value:function(t,e){return e=e||!1,!e&&this._isImage(t)&&(e="image"),
!e&&this._getYoutubeId(t)&&(e="youtube"),!e&&this._getVimeoId(t)&&(e="vimeo"),!e&&this._getInstagramId(t)&&(e="instagram"),(!e||["image","youtube","vimeo","instagram","video","url"].indexOf(e)<0)&&(e="url"),e}},{key:"_isImage",value:function(t){return t&&t.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)}},{key:"_containerToUse",value:function(){var t=this,e=this._$lightboxBodyTwo,i=this._$lightboxBodyOne;return this._$lightboxBodyTwo.hasClass("in")&&(e=this._$lightboxBodyOne,i=this._$lightboxBodyTwo),i.removeClass("in show"),setTimeout(function(){t._$lightboxBodyTwo.hasClass("in")||t._$lightboxBodyTwo.empty(),t._$lightboxBodyOne.hasClass("in")||t._$lightboxBodyOne.empty()},500),e.addClass("in show"),e}},{key:"_handle",value:function(){var t=this._containerToUse();this._updateTitleAndFooter();var e=this._$element.attr("data-remote")||this._$element.attr("href"),i=this._detectRemoteType(e,this._$element.attr("data-type")||!1);if(["image","youtube","vimeo","instagram","video","url"].indexOf(i)<0)return this._error(this._config.strings.type);switch(i){case"image":this._preloadImage(e,t),this._preloadImageByIndex(this._galleryIndex,3);break;case"youtube":this._showYoutubeVideo(e,t);break;case"vimeo":this._showVimeoVideo(this._getVimeoId(e),t);break;case"instagram":this._showInstagramVideo(this._getInstagramId(e),t);break;case"video":this._showHtml5Video(e,t);break;default:this._loadRemoteContent(e,t)}return this}},{key:"_getYoutubeId",value:function(t){if(!t)return!1;var e=t.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);return!(!e||11!==e[2].length)&&e[2]}},{key:"_getVimeoId",value:function(t){return!!(t&&t.indexOf("vimeo")>0)&&t}},{key:"_getInstagramId",value:function(t){return!!(t&&t.indexOf("instagram")>0)&&t}},{key:"_toggleLoading",value:function(e){return e=e||!1,e?(this._$modalDialog.css("display","none"),this._$modal.removeClass("in show"),t(".modal-backdrop").append(this._config.loadingMessage)):(this._$modalDialog.css("display","block"),this._$modal.addClass("in show"),t(".modal-backdrop").find(".ekko-lightbox-loader").remove()),this}},{key:"_calculateBorders",value:function(){return{top:this._totalCssByAttribute("border-top-width"),right:this._totalCssByAttribute("border-right-width"),bottom:this._totalCssByAttribute("border-bottom-width"),left:this._totalCssByAttribute("border-left-width")}}},{key:"_calculatePadding",value:function(){return{top:this._totalCssByAttribute("padding-top"),right:this._totalCssByAttribute("padding-right"),bottom:this._totalCssByAttribute("padding-bottom"),left:this._totalCssByAttribute("padding-left")}}},{key:"_totalCssByAttribute",value:function(t){return parseInt(this._$modalDialog.css(t),10)+parseInt(this._$modalContent.css(t),10)+parseInt(this._$modalBody.css(t),10)}},{key:"_updateTitleAndFooter",value:function(){var t=this._$element.data("title")||"",e=this._$element.data("footer")||"";return this._titleIsShown=!1,t||this._config.alwaysShowClose?(this._titleIsShown=!0,this._$modalHeader.css("display","").find(".modal-title").html(t||"&nbsp;")):this._$modalHeader.css("display","none"),this._footerIsShown=!1,e?(this._footerIsShown=!0,this._$modalFooter.css("display","").html(e)):this._$modalFooter.css("display","none"),this}},{key:"_showYoutubeVideo",value:function(t,e){var i=this._getYoutubeId(t),n=t.indexOf("&")>0?t.substr(t.indexOf("&")):"",o=this._$element.data("width")||560,s=this._$element.data("height")||o/(560/315);return this._showVideoIframe("//www.youtube.com/embed/"+i+"?badge=0&autoplay=1&html5=1"+n,o,s,e)}},{key:"_showVimeoVideo",value:function(t,e){var i=this._$element.data("width")||500,n=this._$element.data("height")||i/(560/315);return this._showVideoIframe(t+"?autoplay=1",i,n,e)}},{key:"_showInstagramVideo",value:function(t,e){var i=this._$element.data("width")||612,n=i+80;return t="/"!==t.substr(-1)?t+"/":t,e.html('<iframe width="'+i+'" height="'+n+'" src="'+t+'embed/" frameborder="0" allowfullscreen></iframe>'),this._resize(i,n),this._config.onContentLoaded.call(this),this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this}},{key:"_showVideoIframe",value:function(t,e,i,n){return i=i||e,n.html('<div class="embed-responsive embed-responsive-16by9"><iframe width="'+e+'" height="'+i+'" src="'+t+'" frameborder="0" allowfullscreen class="embed-responsive-item"></iframe></div>'),this._resize(e,i),this._config.onContentLoaded.call(this),this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this}},{key:"_showHtml5Video",value:function(t,e){var i=this._$element.data("width")||560,n=this._$element.data("height")||i/(560/315);return e.html('<div class="embed-responsive embed-responsive-16by9"><video width="'+i+'" height="'+n+'" src="'+t+'" preload="auto" autoplay controls class="embed-responsive-item"></video></div>'),this._resize(i,n),this._config.onContentLoaded.call(this),this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this}},{key:"_loadRemoteContent",value:function(e,i){var n=this,o=this._$element.data("width")||560,s=this._$element.data("height")||560,a=this._$element.data("disableExternalCheck")||!1;return this._toggleLoading(!1),a||this._isExternal(e)?(i.html('<iframe src="'+e+'" frameborder="0" allowfullscreen></iframe>'),this._config.onContentLoaded.call(this)):i.load(e,t.proxy(function(){return n._$element.trigger("loaded.bs.modal")})),this._$modalArrows&&this._$modalArrows.css("display","none"),this._resize(o,s),this}},{key:"_isExternal",value:function(t){var e=t.match(/^([^:\/?#]+:)?(?:\/\/([^\/?#]*))?([^?#]+)?(\?[^#]*)?(#.*)?/);return"string"==typeof e[1]&&e[1].length>0&&e[1].toLowerCase()!==location.protocol||"string"==typeof e[2]&&e[2].length>0&&e[2].replace(new RegExp(":("+{"http:":80,"https:":443}[location.protocol]+")?$"),"")!==location.host}},{key:"_error",value:function(t){return console.error(t),this._containerToUse().html(t),this._resize(300,300),this}},{key:"_preloadImageByIndex",value:function(e,i){if(this._$galleryItems){var n=t(this._$galleryItems.get(e),!1);if(void 0!==n){var o=n.attr("data-remote")||n.attr("href");return("image"===n.attr("data-type")||this._isImage(o))&&this._preloadImage(o,!1),i>0?this._preloadImageByIndex(e+1,i-1):void 0}}}},{key:"_preloadImage",value:function(e,i){var n=this;i=i||!1;var o=new Image;return i&&function(){var s=setTimeout(function(){i.append(n._config.loadingMessage)},200);o.onload=function(){s&&clearTimeout(s),s=null;var e=t("<img />");return e.attr("src",o.src),e.addClass("img-fluid"),e.css("width","100%"),i.html(e),n._$modalArrows&&n._$modalArrows.css("display",""),n._resize(o.width,o.height),n._toggleLoading(!1),n._config.onContentLoaded.call(n)},o.onerror=function(){return n._toggleLoading(!1),n._error(n._config.strings.fail+" "+e)}}(),o.src=e,o}},{key:"_swipeGesure",value:function(){return this._touchendX<this._touchstartX?this.navigateRight():this._touchendX>this._touchstartX?this.navigateLeft():void 0}},{key:"_resize",value:function(e,i){i=i||e,this._wantedWidth=e,this._wantedHeight=i;var n=e/i,o=this._padding.left+this._padding.right+this._border.left+this._border.right,s=this._config.doc.body.clientWidth>575?20:0,a=this._config.doc.body.clientWidth>575?0:20,r=Math.min(e+o,this._config.doc.body.clientWidth-s,this._config.maxWidth);e+o>r?(i=(r-o-a)/n,e=r):e+=o;var l=0,h=0;this._footerIsShown&&(h=this._$modalFooter.outerHeight(!0)||55),this._titleIsShown&&(l=this._$modalHeader.outerHeight(!0)||67);var c=this._padding.top+this._padding.bottom+this._border.bottom+this._border.top,u=parseFloat(this._$modalDialog.css("margin-top"))+parseFloat(this._$modalDialog.css("margin-bottom")),d=Math.min(i,t(window).height()-c-u-l-h,this._config.maxHeight-c-l-h);i>d&&(e=Math.ceil(d*n)+o),this._$lightboxContainer.css("height",d),this._$modalDialog.css("flex",1).css("maxWidth",e);var p=this._$modal.data("bs.modal");if(p)try{p._handleUpdate()}catch(t){p.handleUpdate()}return this}}],[{key:"_jQueryInterface",value:function(e){var i=this;return e=e||{},this.each(function(){var o=t(i),s=t.extend({},n.Default,o.data(),"object"==typeof e&&e);new n(i,s)})}}]),n}();t.fn[n]=a._jQueryInterface,t.fn[n].Constructor=a,t.fn[n].noConflict=function(){return t.fn[n]=o,a._jQueryInterface}}(jQuery)}(jQuery),function(t){function e(t,e,o){var s=t[0],a=/er/.test(o)?g:/bl/.test(o)?p:u,r=o==m?{checked:s[u],disabled:s[p],indeterminate:"true"==t.attr(g)||"false"==t.attr(f)}:s[a];if(/^(ch|di|in)/.test(o)&&!r)i(t,a);else if(/^(un|en|de)/.test(o)&&r)n(t,a);else if(o==m)for(var l in r)r[l]?i(t,l,!0):n(t,l,!0);else e&&"toggle"!=o||(e||t[x]("ifClicked"),r?s[v]!==c&&n(t,a):i(t,a))}function i(e,i,o){var m=e[0],b=e.parent(),x=i==u,w=i==g,C=i==p,D=w?f:x?d:"enabled",S=s(e,D+a(m[v])),M=s(e,i+a(m[v]));if(!0!==m[i]){if(!o&&i==u&&m[v]==c&&m.name){var T=e.closest("form"),I='input[name="'+m.name+'"]';I=T.length?T.find(I):t(I),I.each(function(){this!==m&&t(this).data(l)&&n(t(this),i)})}w?(m[i]=!0,m[u]&&n(e,u,"force")):(o||(m[i]=!0),x&&m[g]&&n(e,g,!1)),r(e,x,i,o)}m[p]&&s(e,k,!0)&&b.find("."+h).css(k,"default"),b[_](M||s(e,i)||""),b.attr("role")&&!w&&b.attr("aria-"+(C?p:u),"true"),b[y](S||s(e,D)||"")}function n(t,e,i){var n=t[0],o=t.parent(),l=e==u,c=e==g,m=e==p,b=c?f:l?d:"enabled",x=s(t,b+a(n[v])),w=s(t,e+a(n[v]));!1!==n[e]&&(!c&&i&&"force"!=i||(n[e]=!1),r(t,l,b,i)),!n[p]&&s(t,k,!0)&&o.find("."+h).css(k,"pointer"),o[y](w||s(t,e)||""),o.attr("role")&&!c&&o.attr("aria-"+(m?p:u),"false"),o[_](x||s(t,b)||"")}function o(e,i){e.data(l)&&(e.parent().html(e.attr("style",e.data(l).s||"")),i&&e[x](i),e.off(".i").unwrap(),t(w+'[for="'+e[0].id+'"]').add(e.closest(w)).off(".i"))}function s(t,e,i){if(t.data(l))return t.data(l).o[e+(i?"":"Class")]}function a(t){return t.charAt(0).toUpperCase()+t.slice(1)}function r(t,e,i,n){n||(e&&t[x]("ifToggled"),t[x]("ifChanged")[x]("if"+a(i)))}var l="iCheck",h=l+"-helper",c="radio",u="checked",d="un"+u,p="disabled",f="determinate",g="in"+f,m="update",v="type",b="touchbegin.i touchend.i",_="addClass",y="removeClass",x="trigger",w="label",k="cursor",C=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);t.fn[l]=function(s,a){var r='input[type="checkbox"], input[type="'+c+'"]',d=t(),f=function(e){e.each(function(){var e=t(this);d=e.is(r)?d.add(e):d.add(e.find(r))})};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(s))return s=s.toLowerCase(),f(this),d.each(function(){var i=t(this);"destroy"==s?o(i,"ifDestroyed"):e(i,!0,s),t.isFunction(a)&&a()});if("object"!=typeof s&&s)return this;var k=t.extend({checkedClass:u,disabledClass:p,indeterminateClass:g,labelHover:!0},s),D=k.handle,S=k.hoverClass||"hover",M=k.focusClass||"focus",T=k.activeClass||"active",I=!!k.labelHover,P=k.labelHoverClass||"hover",A=0|(""+k.increaseArea).replace("%","");return"checkbox"!=D&&D!=c||(r='input[type="'+D+'"]'),A<-50&&(A=-50),f(this),d.each(function(){var s=t(this);o(s);var a,r=this,d=r.id,f=-A+"%",g=100+2*A+"%",D={position:"absolute",top:f,left:f,display:"block",width:g,height:g,margin:0,padding:0,background:"#fff",border:0,opacity:0},O=C?{position:"absolute",visibility:"hidden"}:A?D:{position:"absolute",opacity:0},F="checkbox"==r[v]?k.checkboxClass||"icheckbox":k.radioClass||"i"+c,E=t(w+'[for="'+d+'"]').add(s.closest(w)),z=!!k.aria,H=l+"-"+Math.random().toString(36).substr(2,6),W='<div class="'+F+'" '+(z?'role="'+r[v]+'" ':"");z&&E.each(function(){W+='aria-labelledby="',this.id?W+=this.id:(this.id=H,W+=H),W+='"'}),W=s.wrap(W+"/>")[x]("ifCreated").parent().append(k.insert),a=t('<ins class="'+h+'"/>').css(D).appendTo(W),s.data(l,{o:k,s:s.attr("style")}).css(O),!!k.inheritClass&&W[_](r.className||""),!!k.inheritID&&d&&W.attr("id",l+"-"+d),"static"==W.css("position")&&W.css("position","relative"),e(s,!0,m),E.length&&E.on("click.i mouseover.i mouseout.i "+b,function(i){var n=i[v],o=t(this);if(!r[p]){if("click"==n){if(t(i.target).is("a"))return;e(s,!1,!0)}else I&&(/ut|nd/.test(n)?(W[y](S),o[y](P)):(W[_](S),o[_](P)));if(!C)return!1;i.stopPropagation()}}),s.on("click.i focus.i blur.i keyup.i keydown.i keypress.i",function(t){var e=t[v],o=t.keyCode;return"click"!=e&&("keydown"==e&&32==o?(r[v]==c&&r[u]||(r[u]?n(s,u):i(s,u)),!1):void("keyup"==e&&r[v]==c?!r[u]&&i(s,u):/us|ur/.test(e)&&W["blur"==e?y:_](M)))}),a.on("click mousedown mouseup mouseover mouseout "+b,function(t){var i=t[v],n=/wn|up/.test(i)?T:S;if(!r[p]){if("click"==i?e(s,!1,!0):(/wn|er|in/.test(i)?W[_](n):W[y](n+" "+T),E.length&&I&&n==S&&E[/ut|nd/.test(i)?y:_](P)),!C)return!1;t.stopPropagation()}})})}}(window.jQuery||window.Zepto),function(t){function e(t){for(var e,i,n=t.length;n;e=parseInt(Math.random()*n),i=t[--n],t[n]=t[e],t[e]=i);return t}function i(t,e){return Math.floor(Math.random()*(e-t+1)+t)}var n=[],o=[],s=[],a=[],r=null,l={init:function(e,i){for(var h=t.extend({bind:"click",passwordElement:null,displayElement:null,passwordLength:16,uppercase:!0,lowercase:!0,numbers:!0,specialChars:!0,additionalSpecialChars:[],onPasswordGenerated:function(t){}},e),c=48;c<58;c++)n.push(c);for(c=65;c<91;c++)o.push(c);for(c=97;c<123;c++)s.push(c);return a=[33,35,64,36,38,42,91,93,123,125,92,47,63,58,59,95,45].concat(h.additionalSpecialChars),this.each(function(){r=t(this),r.bind(h.bind,function(t){t.preventDefault(),l.generatePassword(h)})})},generatePassword:function(r){var l=new Array,h=r.uppercase+r.lowercase+r.numbers+r.specialChars,c=0,u=new Array,d=Math.floor(r.passwordLength/h);if(r.uppercase){for(var p=0;p<d;p++)l.push(String.fromCharCode(o[i(0,o.length-1)]));u=u.concat(o),c++}if(r.numbers){for(var p=0;p<d;p++)l.push(String.fromCharCode(n[i(0,n.length-1)]));u=u.concat(n),c++}if(r.specialChars){for(var p=0;p<d;p++)l.push(String.fromCharCode(a[i(0,a.length-1)]));u=u.concat(a),c++}var f=r.passwordLength-c*d;if(r.lowercase)for(var p=0;p<f;p++)l.push(String.fromCharCode(s[i(0,s.length-1)]));else for(var p=0;p<f;p++)l.push(String.fromCharCode(u[i(0,u.length-1)]));l=e(l).join(""),null!==r.passwordElement&&t(r.passwordElement).val(l),null!==r.displayElement&&(t(r.displayElement).is("input")?t(r.displayElement).val(l):t(r.displayElement).text(l)),r.onPasswordGenerated(l)}};t.fn.pGenerator=function(e){return l[e]?l[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void t.error("Method "+e+" does not exist on jQuery.pGenerator"):l.init.apply(this,arguments)}}(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;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Chart=t()}}(function(){return function(){function t(e,i,n){function o(a,r){if(!i[a]){if(!e[a]){var l="function"==typeof require&&require;if(!r&&l)return l(a,!0);if(s)return s(a,!0);var h=new Error("Cannot find module '"+a+"'");throw h.code="MODULE_NOT_FOUND",h}var c=i[a]={exports:{}};e[a][0].call(c.exports,function(t){var i=e[a][1][t];return o(i||t)},c,c.exports,t,e,i,n)}return i[a].exports}for(var s="function"==typeof require&&require,a=0;a<n.length;a++)o(n[a]);return o}return t}()({1:[function(t,e,i){},{}],2:[function(t,e,i){function n(t){if(t){var e=/^#([a-fA-F0-9]{3})$/i,i=/^#([a-fA-F0-9]{6})$/i,n=/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i,o=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i,s=/(\w+)/,a=[0,0,0],r=1,l=t.match(e);if(l){l=l[1];for(var h=0;h<a.length;h++)a[h]=parseInt(l[h]+l[h],16)}else if(l=t.match(i)){l=l[1];for(var h=0;h<a.length;h++)a[h]=parseInt(l.slice(2*h,2*h+2),16)}else if(l=t.match(n)){for(var h=0;h<a.length;h++)a[h]=parseInt(l[h+1]);r=parseFloat(l[4])}else if(l=t.match(o)){for(var h=0;h<a.length;h++)a[h]=Math.round(2.55*parseFloat(l[h+1]));r=parseFloat(l[4])}else if(l=t.match(s)){if("transparent"==l[1])return[0,0,0,0];if(!(a=y[l[1]]))return}for(var h=0;h<a.length;h++)a[h]=b(a[h],0,255);return r=r||0==r?b(r,0,1):1,a[3]=r,a}}function o(t){if(t){var e=/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,i=t.match(e);if(i){var n=parseFloat(i[4]);return[b(parseInt(i[1]),0,360),b(parseFloat(i[2]),0,100),b(parseFloat(i[3]),0,100),b(isNaN(n)?1:n,0,1)]}}}function s(t){if(t){var e=/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,i=t.match(e);if(i){var n=parseFloat(i[4]);return[b(parseInt(i[1]),0,360),b(parseFloat(i[2]),0,100),b(parseFloat(i[3]),0,100),b(isNaN(n)?1:n,0,1)]}}}function a(t){var e=n(t);return e&&e.slice(0,3)}function r(t){var e=o(t);return e&&e.slice(0,3)}function l(t){var e=n(t);return e?e[3]:(e=o(t))?e[3]:(e=s(t))?e[3]:void 0}function h(t){return"#"+_(t[0])+_(t[1])+_(t[2])}function c(t,e){return e<1||t[3]&&t[3]<1?u(t,e):"rgb("+t[0]+", "+t[1]+", "+t[2]+")"}function u(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function d(t,e){return e<1||t[3]&&t[3]<1?p(t,e):"rgb("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%)"}function p(t,e){return"rgba("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%, "+(e||t[3]||1)+")"}function f(t,e){return e<1||t[3]&&t[3]<1?g(t,e):"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"}function g(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function m(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"}function v(t){return x[t.slice(0,3)]}function b(t,e,i){return Math.min(Math.max(e,t),i)}function _(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var y=t(6);e.exports={getRgba:n,getHsla:o,getRgb:a,getHsl:r,getHwb:s,getAlpha:l,hexString:h,rgbString:c,rgbaString:u,percentString:d,percentaString:p,hslString:f,hslaString:g,hwbString:m,keyword:v};var x={};for(var w in y)x[y[w]]=w},{6:6}],3:[function(t,e,i){var n=t(5),o=t(2),s=function(t){if(t instanceof s)return t;if(!(this instanceof s))return new s(t);this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1};var e;"string"==typeof t?(e=o.getRgba(t),e?this.setValues("rgb",e):(e=o.getHsla(t))?this.setValues("hsl",e):(e=o.getHwb(t))&&this.setValues("hwb",e)):"object"==typeof t&&(e=t,void 0!==e.r||void 0!==e.red?this.setValues("rgb",e):void 0!==e.l||void 0!==e.lightness?this.setValues("hsl",e):void 0!==e.v||void 0!==e.value?this.setValues("hsv",e):void 0!==e.w||void 0!==e.whiteness?this.setValues("hwb",e):void 0===e.c&&void 0===e.cyan||this.setValues("cmyk",e))};s.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var t=this.values;return 1!==t.alpha?t.hwb.concat([t.alpha]):t.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values;return t.rgb.concat([t.alpha])},hslaArray:function(){var t=this.values;return t.hsl.concat([t.alpha])},alpha:function(t){return void 0===t?this.values.alpha:(this.setValues("alpha",t),this)},red:function(t){return this.setChannel("rgb",0,t)},green:function(t){return this.setChannel("rgb",1,t)},blue:function(t){return this.setChannel("rgb",2,t)},hue:function(t){return t&&(t%=360,t=t<0?360+t:t),this.setChannel("hsl",0,t)},saturation:function(t){return this.setChannel("hsl",1,t)},lightness:function(t){return this.setChannel("hsl",2,t)},saturationv:function(t){return this.setChannel("hsv",1,t)},whiteness:function(t){return this.setChannel("hwb",1,t)},blackness:function(t){return this.setChannel("hwb",2,t)},value:function(t){return this.setChannel("hsv",2,t)},cyan:function(t){return this.setChannel("cmyk",0,t)},magenta:function(t){return this.setChannel("cmyk",1,t)},yellow:function(t){return this.setChannel("cmyk",2,t)},black:function(t){return this.setChannel("cmyk",3,t)},hexString:function(){return o.hexString(this.values.rgb)},rgbString:function(){return o.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return o.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return o.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return o.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return o.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return o.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return o.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var t=this.values.rgb;return t[0]<<16|t[1]<<8|t[2]},luminosity:function(){for(var t=this.values.rgb,e=[],i=0;i<t.length;i++){var n=t[i]/255;e[i]=n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),i=t.luminosity();return e>i?(e+.05)/(i+.05):(i+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,i=(e[0]+t)%360;return e[0]=i<0?360+i:i,this.setValues("hsl",e),this},mix:function(t,e){var i=this,n=t,o=void 0===e?.5:e,s=2*o-1,a=i.alpha()-n.alpha(),r=((s*a==-1?s:(s+a)/(1+s*a))+1)/2,l=1-r;return this.rgb(r*i.red()+l*n.red(),r*i.green()+l*n.green(),r*i.blue()+l*n.blue()).alpha(i.alpha()*o+n.alpha()*(1-o))},toJSON:function(){return this.rgb()},clone:function(){var t,e,i=new s,n=this.values,o=i.values;for(var a in n)n.hasOwnProperty(a)&&(t=n[a],e={}.toString.call(t),"[object Array]"===e?o[a]=t.slice(0):"[object Number]"===e?o[a]=t:console.error("unexpected color value:",t));return i}},s.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},s.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},s.prototype.getValues=function(t){for(var e=this.values,i={},n=0;n<t.length;n++)i[t.charAt(n)]=e[t][n];return 1!==e.alpha&&(i.a=e.alpha),i},s.prototype.setValues=function(t,e){var i,o=this.values,s=this.spaces,a=this.maxes,r=1;if(this.valid=!0,"alpha"===t)r=e;else if(e.length)o[t]=e.slice(0,t.length),r=e[t.length];else if(void 0!==e[t.charAt(0)]){for(i=0;i<t.length;i++)o[t][i]=e[t.charAt(i)];r=e.a}else if(void 0!==e[s[t][0]]){var l=s[t];for(i=0;i<t.length;i++)o[t][i]=e[l[i]];r=e.alpha}if(o.alpha=Math.max(0,Math.min(1,void 0===r?o.alpha:r)),"alpha"===t)return!1;var h;for(i=0;i<t.length;i++)h=Math.max(0,Math.min(a[t][i],o[t][i])),o[t][i]=Math.round(h);for(var c in s)c!==t&&(o[c]=n[t][c](o[t]));return!0},s.prototype.setSpace=function(t,e){var i=e[0];return void 0===i?this.getValues(t):("number"==typeof i&&(i=Array.prototype.slice.call(e)),this.setValues(t,i),this)},s.prototype.setChannel=function(t,e,i){var n=this.values[t];return void 0===i?n[e]:i===n[e]?this:(n[e]=i,this.setValues(t,n),this)},"undefined"!=typeof window&&(window.Color=s),e.exports=s},{2:2,5:5}],4:[function(t,e,i){function n(t){var e,i,n,o=t[0]/255,s=t[1]/255,a=t[2]/255,r=Math.min(o,s,a),l=Math.max(o,s,a),h=l-r;return l==r?e=0:o==l?e=(s-a)/h:s==l?e=2+(a-o)/h:a==l&&(e=4+(o-s)/h),e=Math.min(60*e,360),e<0&&(e+=360),n=(r+l)/2,i=l==r?0:n<=.5?h/(l+r):h/(2-l-r),[e,100*i,100*n]}function o(t){var e,i,n,o=t[0],s=t[1],a=t[2],r=Math.min(o,s,a),l=Math.max(o,s,a),h=l-r;return i=0==l?0:h/l*1e3/10,l==r?e=0:o==l?e=(s-a)/h:s==l?e=2+(a-o)/h:a==l&&(e=4+(o-s)/h),e=Math.min(60*e,360),e<0&&(e+=360),n=l/255*1e3/10,[e,i,n]}function s(t){var e=t[0],i=t[1],o=t[2],s=n(t)[0],a=1/255*Math.min(e,Math.min(i,o)),o=1-1/255*Math.max(e,Math.max(i,o));return[s,100*a,100*o]}function a(t){var e,i,n,o,s=t[0]/255,a=t[1]/255,r=t[2]/255;return o=Math.min(1-s,1-a,1-r),e=(1-s-o)/(1-o)||0,i=(1-a-o)/(1-o)||0,n=(1-r-o)/(1-o)||0,[100*e,100*i,100*n,100*o]}function l(t){return Q[JSON.stringify(t)]}function h(t){var e=t[0]/255,i=t[1]/255,n=t[2]/255;return e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,[100*(.4124*e+.3576*i+.1805*n),100*(.2126*e+.7152*i+.0722*n),100*(.0193*e+.1192*i+.9505*n)]}function c(t){var e,i,n,o=h(t),s=o[0],a=o[1],r=o[2];return s/=95.047,a/=100,r/=108.883,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,a=a>.008856?Math.pow(a,1/3):7.787*a+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,e=116*a-16,i=500*(s-a),n=200*(a-r),[e,i,n]}function u(t){return L(c(t))}function d(t){var e,i,n,o,s,a=t[0]/360,r=t[1]/100,l=t[2]/100;if(0==r)return s=255*l,[s,s,s];i=l<.5?l*(1+r):l+r-l*r,e=2*l-i,o=[0,0,0];for(var h=0;h<3;h++)n=a+1/3*-(h-1),n<0&&n++,n>1&&n--,s=6*n<1?e+6*(i-e)*n:2*n<1?i:3*n<2?e+(i-e)*(2/3-n)*6:e,o[h]=255*s;return o}function p(t){var e,i,n=t[0],o=t[1]/100,s=t[2]/100;return 0===s?[0,0,0]:(s*=2,o*=s<=1?s:2-s,i=(s+o)/2,e=2*o/(s+o),[n,100*e,100*i])}function f(t){return s(d(t))}function m(t){return a(d(t))}function v(t){return l(d(t))}function _(t){var e=t[0]/60,i=t[1]/100,n=t[2]/100,o=Math.floor(e)%6,s=e-Math.floor(e),a=255*n*(1-i),r=255*n*(1-i*s),l=255*n*(1-i*(1-s)),n=255*n;switch(o){case 0:return[n,l,a];case 1:return[r,n,a];case 2:return[a,n,l];case 3:return[a,r,n];case 4:return[l,a,n];case 5:return[n,a,r]}}function y(t){var e,i,n=t[0],o=t[1]/100,s=t[2]/100;return i=(2-o)*s,e=o*s,e/=i<=1?i:2-i,e=e||0,i/=2,[n,100*e,100*i]}function x(t){return s(_(t))}function w(t){return a(_(t))}function k(t){return l(_(t))}function C(t){var e,i,n,o,s=t[0]/360,a=t[1]/100,l=t[2]/100,h=a+l;switch(h>1&&(a/=h,l/=h),e=Math.floor(6*s),i=1-l,n=6*s-e,0!=(1&e)&&(n=1-n),o=a+n*(i-a),e){default:case 6:case 0:r=i,g=o,b=a;break;case 1:r=o,g=i,b=a;break;case 2:r=a,g=i,b=o;break;case 3:r=a,g=o,b=i;break;case 4:r=o,g=a,b=i;break;case 5:r=i,g=a,b=o}return[255*r,255*g,255*b]}function D(t){return n(C(t))}function S(t){return o(C(t))}function M(t){return a(C(t))}function T(t){return l(C(t))}function I(t){var e,i,n,o=t[0]/100,s=t[1]/100,a=t[2]/100,r=t[3]/100;return e=1-Math.min(1,o*(1-r)+r),i=1-Math.min(1,s*(1-r)+r),n=1-Math.min(1,a*(1-r)+r),[255*e,255*i,255*n]}function P(t){return n(I(t))}function A(t){return o(I(t))}function O(t){return s(I(t))}function F(t){return l(I(t))}function E(t){var e,i,n,o=t[0]/100,s=t[1]/100,a=t[2]/100;return e=3.2406*o+-1.5372*s+-.4986*a,i=-.9689*o+1.8758*s+.0415*a,n=.0557*o+-.204*s+1.057*a,e=e>.0031308?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,e=Math.min(Math.max(0,e),1),i=Math.min(Math.max(0,i),1),n=Math.min(Math.max(0,n),1),[255*e,255*i,255*n]}function z(t){var e,i,n,o=t[0],s=t[1],a=t[2];return o/=95.047,s/=100,a/=108.883,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,a=a>.008856?Math.pow(a,1/3):7.787*a+16/116,e=116*s-16,i=500*(o-s),n=200*(s-a),[e,i,n]}function H(t){return L(z(t))}function W(t){var e,i,n,o,s=t[0],a=t[1],r=t[2];return s<=8?(i=100*s/903.3,o=i/100*7.787+16/116):(i=100*Math.pow((s+16)/116,3),o=Math.pow(i/100,1/3)),e=e/95.047<=.008856?e=95.047*(a/500+o-16/116)/7.787:95.047*Math.pow(a/500+o,3),n=n/108.883<=.008859?n=108.883*(o-r/200-16/116)/7.787:108.883*Math.pow(o-r/200,3),[e,i,n]}function L(t){var e,i,n,o=t[0],s=t[1],a=t[2];return e=Math.atan2(a,s),i=360*e/2/Math.PI,i<0&&(i+=360),n=Math.sqrt(s*s+a*a),[o,n,i]}function N(t){return E(W(t))}function R(t){var e,i,n,o=t[0],s=t[1],a=t[2];return n=a/360*2*Math.PI,e=s*Math.cos(n),i=s*Math.sin(n),[o,e,i]}function B(t){return W(R(t))}function V(t){return N(R(t))}function U(t){return G[t]}function j(t){return n(U(t))}function Y(t){return o(U(t))}function $(t){return s(U(t))}function q(t){return a(U(t))}function X(t){return c(U(t))}function K(t){return h(U(t))}e.exports={rgb2hsl:n,rgb2hsv:o,rgb2hwb:s,rgb2cmyk:a,rgb2keyword:l,rgb2xyz:h,rgb2lab:c,rgb2lch:u,hsl2rgb:d,hsl2hsv:p,hsl2hwb:f,hsl2cmyk:m,hsl2keyword:v,hsv2rgb:_,hsv2hsl:y,hsv2hwb:x,hsv2cmyk:w,hsv2keyword:k,hwb2rgb:C,hwb2hsl:D,hwb2hsv:S,hwb2cmyk:M,hwb2keyword:T,cmyk2rgb:I,cmyk2hsl:P,cmyk2hsv:A,cmyk2hwb:O,cmyk2keyword:F,keyword2rgb:U,keyword2hsl:j,keyword2hsv:Y,keyword2hwb:$,keyword2cmyk:q,keyword2lab:X,keyword2xyz:K,xyz2rgb:E,xyz2lab:z,xyz2lch:H,lab2xyz:W,lab2rgb:N,lab2lch:L,lch2lab:R,lch2xyz:B,lch2rgb:V};var G={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],
navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Q={};for(var Z in G)Q[JSON.stringify(G[Z])]=Z},{}],5:[function(t,e,i){var n=t(4),o=function(){return new h};for(var s in n){o[s+"Raw"]=function(t){return function(e){return"number"==typeof e&&(e=Array.prototype.slice.call(arguments)),n[t](e)}}(s);var a=/(\w+)2(\w+)/.exec(s),r=a[1],l=a[2];o[r]=o[r]||{},o[r][l]=o[s]=function(t){return function(e){"number"==typeof e&&(e=Array.prototype.slice.call(arguments));var i=n[t](e);if("string"==typeof i||void 0===i)return i;for(var o=0;o<i.length;o++)i[o]=Math.round(i[o]);return i}}(s)}var h=function(){this.convs={}};h.prototype.routeSpace=function(t,e){var i=e[0];return void 0===i?this.getValues(t):("number"==typeof i&&(i=Array.prototype.slice.call(e)),this.setValues(t,i))},h.prototype.setValues=function(t,e){return this.space=t,this.convs={},this.convs[t]=e,this},h.prototype.getValues=function(t){var e=this.convs[t];if(!e){var i=this.space,n=this.convs[i];e=o[i][t](n),this.convs[t]=e}return e},["rgb","hsl","hsv","cmyk","keyword"].forEach(function(t){h.prototype[t]=function(e){return this.routeSpace(t,arguments)}}),e.exports=o},{4:4}],6:[function(t,e,i){"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},{}],7:[function(t,e,i){var n=t(29)();n.helpers=t(45),t(27)(n),n.defaults=t(25),n.Element=t(26),n.elements=t(40),n.Interaction=t(28),n.layouts=t(30),n.platform=t(48),n.plugins=t(31),n.Ticks=t(34),t(22)(n),t(23)(n),t(24)(n),t(33)(n),t(32)(n),t(35)(n),t(55)(n),t(53)(n),t(54)(n),t(56)(n),t(57)(n),t(58)(n),t(15)(n),t(16)(n),t(17)(n),t(18)(n),t(19)(n),t(20)(n),t(21)(n),t(8)(n),t(9)(n),t(10)(n),t(11)(n),t(12)(n),t(13)(n),t(14)(n);var o=t(49);for(var s in o)o.hasOwnProperty(s)&&n.plugins.register(o[s]);n.platform.initialize(),e.exports=n,"undefined"!=typeof window&&(window.Chart=n),n.Legend=o.legend._element,n.Title=o.title._element,n.pluginService=n.plugins,n.PluginBase=n.Element.extend({}),n.canvasHelpers=n.helpers.canvas,n.layoutService=n.layouts},{10:10,11:11,12:12,13:13,14:14,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,27:27,28:28,29:29,30:30,31:31,32:32,33:33,34:34,35:35,40:40,45:45,48:48,49:49,53:53,54:54,55:55,56:56,57:57,58:58,8:8,9:9}],8:[function(t,e,i){"use strict";e.exports=function(t){t.Bar=function(e,i){return i.type="bar",new t(e,i)}}},{}],9:[function(t,e,i){"use strict";e.exports=function(t){t.Bubble=function(e,i){return i.type="bubble",new t(e,i)}}},{}],10:[function(t,e,i){"use strict";e.exports=function(t){t.Doughnut=function(e,i){return i.type="doughnut",new t(e,i)}}},{}],11:[function(t,e,i){"use strict";e.exports=function(t){t.Line=function(e,i){return i.type="line",new t(e,i)}}},{}],12:[function(t,e,i){"use strict";e.exports=function(t){t.PolarArea=function(e,i){return i.type="polarArea",new t(e,i)}}},{}],13:[function(t,e,i){"use strict";e.exports=function(t){t.Radar=function(e,i){return i.type="radar",new t(e,i)}}},{}],14:[function(t,e,i){"use strict";e.exports=function(t){t.Scatter=function(e,i){return i.type="scatter",new t(e,i)}}},{}],15:[function(t,e,i){"use strict";function n(t,e){var i,n,o,s,a=t.isHorizontal()?t.width:t.height,r=t.getTicks();for(o=1,s=e.length;o<s;++o)a=Math.min(a,e[o]-e[o-1]);for(o=0,s=r.length;o<s;++o)n=t.getPixelForTick(o),a=o>0?Math.min(a,n-i):a,i=n;return a}function o(t,e,i){var n,o,s=i.barThickness,a=e.stackCount,r=e.pixels[t];return l.isNullOrUndef(s)?(n=e.min*i.categoryPercentage,o=i.barPercentage):(n=s*a,o=1),{chunk:n/a,ratio:o,start:r-n/2}}function s(t,e,i){var n,o,s=e.pixels,a=s[t],r=t>0?s[t-1]:null,l=t<s.length-1?s[t+1]:null,h=i.categoryPercentage;return null===r&&(r=a-(null===l?e.end-a:l-a)),null===l&&(l=a+a-r),n=a-(a-r)/2*h,o=(l-r)/2*h,{chunk:o/e.stackCount,ratio:i.barPercentage,start:n}}var a=t(25),r=t(40),l=t(45);a._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),a._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{position:"left",type:"category",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{callbacks:{title:function(t,e){var i="";return t.length>0&&(t[0].yLabel?i=t[0].yLabel:e.labels.length>0&&t[0].index<e.labels.length&&(i=e.labels[t[0].index])),i},label:function(t,e){return(e.datasets[t.datasetIndex].label||"")+": "+t.xLabel}},mode:"index",axis:"y"}}),e.exports=function(t){t.controllers.bar=t.DatasetController.extend({dataElementType:r.Rectangle,initialize:function(){var e,i=this;t.DatasetController.prototype.initialize.apply(i,arguments),e=i.getMeta(),e.stack=i.getDataset().stack,e.bar=!0},update:function(t){var e,i,n=this,o=n.getMeta().data;for(n._ruler=n.getRuler(),e=0,i=o.length;e<i;++e)n.updateElement(o[e],e,t)},updateElement:function(t,e,i){var n=this,o=n.chart,s=n.getMeta(),a=n.getDataset(),r=t.custom||{},h=o.options.elements.rectangle;t._xScale=n.getScaleForId(s.xAxisID),t._yScale=n.getScaleForId(s.yAxisID),t._datasetIndex=n.index,t._index=e,t._model={datasetLabel:a.label,label:o.data.labels[e],borderSkipped:r.borderSkipped?r.borderSkipped:h.borderSkipped,backgroundColor:r.backgroundColor?r.backgroundColor:l.valueAtIndexOrDefault(a.backgroundColor,e,h.backgroundColor),borderColor:r.borderColor?r.borderColor:l.valueAtIndexOrDefault(a.borderColor,e,h.borderColor),borderWidth:r.borderWidth?r.borderWidth:l.valueAtIndexOrDefault(a.borderWidth,e,h.borderWidth)},n.updateElementGeometry(t,e,i),t.pivot()},updateElementGeometry:function(t,e,i){var n=this,o=t._model,s=n.getValueScale(),a=s.getBasePixel(),r=s.isHorizontal(),l=n._ruler||n.getRuler(),h=n.calculateBarValuePixels(n.index,e),c=n.calculateBarIndexPixels(n.index,e,l);o.horizontal=r,o.base=i?a:h.base,o.x=r?i?a:h.head:c.center,o.y=r?c.center:i?a:h.head,o.height=r?c.size:void 0,o.width=r?void 0:c.size},getValueScaleId:function(){return this.getMeta().yAxisID},getIndexScaleId:function(){return this.getMeta().xAxisID},getValueScale:function(){return this.getScaleForId(this.getValueScaleId())},getIndexScale:function(){return this.getScaleForId(this.getIndexScaleId())},_getStacks:function(t){var e,i,n=this,o=n.chart,s=n.getIndexScale(),a=s.options.stacked,r=void 0===t?o.data.datasets.length:t+1,l=[];for(e=0;e<r;++e)i=o.getDatasetMeta(e),i.bar&&o.isDatasetVisible(e)&&(!1===a||!0===a&&-1===l.indexOf(i.stack)||void 0===a&&(void 0===i.stack||-1===l.indexOf(i.stack)))&&l.push(i.stack);return l},getStackCount:function(){return this._getStacks().length},getStackIndex:function(t,e){var i=this._getStacks(t),n=void 0!==e?i.indexOf(e):-1;return-1===n?i.length-1:n},getRuler:function(){var t,e,i,o=this,s=o.getIndexScale(),a=o.getStackCount(),r=o.index,h=s.isHorizontal(),c=h?s.left:s.top,u=c+(h?s.width:s.height),d=[];for(t=0,e=o.getMeta().data.length;t<e;++t)d.push(s.getPixelForValue(null,t,r));return i=l.isNullOrUndef(s.options.barThickness)?n(s,d):-1,{min:i,pixels:d,start:c,end:u,stackCount:a,scale:s}},calculateBarValuePixels:function(t,e){var i,n,o,s,a,r,l=this,h=l.chart,c=l.getMeta(),u=l.getValueScale(),d=h.data.datasets,p=u.getRightValue(d[t].data[e]),f=u.options.stacked,g=c.stack,m=0;if(f||void 0===f&&void 0!==g)for(i=0;i<t;++i)n=h.getDatasetMeta(i),n.bar&&n.stack===g&&n.controller.getValueScaleId()===u.id&&h.isDatasetVisible(i)&&(o=u.getRightValue(d[i].data[e]),(p<0&&o<0||p>=0&&o>0)&&(m+=o));return s=u.getPixelForValue(m),a=u.getPixelForValue(m+p),r=(a-s)/2,{size:r,base:s,head:a,center:a+r/2}},calculateBarIndexPixels:function(t,e,i){var n=this,a=i.scale.options,r="flex"===a.barThickness?s(e,i,a):o(e,i,a),h=n.getStackIndex(t,n.getMeta().stack),c=r.start+r.chunk*h+r.chunk/2,u=Math.min(l.valueOrDefault(a.maxBarThickness,1/0),r.chunk*r.ratio);return{base:c-u/2,head:c+u/2,center:c,size:u}},draw:function(){var t=this,e=t.chart,i=t.getValueScale(),n=t.getMeta().data,o=t.getDataset(),s=n.length,a=0;for(l.canvas.clipArea(e.ctx,e.chartArea);a<s;++a)isNaN(i.getRightValue(o.data[a]))||n[a].draw();l.canvas.unclipArea(e.ctx)},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t._index,n=t.custom||{},o=t._model;o.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:l.valueAtIndexOrDefault(e.hoverBackgroundColor,i,l.getHoverColor(o.backgroundColor)),o.borderColor=n.hoverBorderColor?n.hoverBorderColor:l.valueAtIndexOrDefault(e.hoverBorderColor,i,l.getHoverColor(o.borderColor)),o.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:l.valueAtIndexOrDefault(e.hoverBorderWidth,i,o.borderWidth)},removeHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t._index,n=t.custom||{},o=t._model,s=this.chart.options.elements.rectangle;o.backgroundColor=n.backgroundColor?n.backgroundColor:l.valueAtIndexOrDefault(e.backgroundColor,i,s.backgroundColor),o.borderColor=n.borderColor?n.borderColor:l.valueAtIndexOrDefault(e.borderColor,i,s.borderColor),o.borderWidth=n.borderWidth?n.borderWidth:l.valueAtIndexOrDefault(e.borderWidth,i,s.borderWidth)}}),t.controllers.horizontalBar=t.controllers.bar.extend({getValueScaleId:function(){return this.getMeta().xAxisID},getIndexScaleId:function(){return this.getMeta().yAxisID}})}},{25:25,40:40,45:45}],16:[function(t,e,i){"use strict";var n=t(25),o=t(40),s=t(45);n._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(t,e){var i=e.datasets[t.datasetIndex].label||"",n=e.datasets[t.datasetIndex].data[t.index];return i+": ("+t.xLabel+", "+t.yLabel+", "+n.r+")"}}}}),e.exports=function(t){t.controllers.bubble=t.DatasetController.extend({dataElementType:o.Point,update:function(t){var e=this,i=e.getMeta(),n=i.data;s.each(n,function(i,n){e.updateElement(i,n,t)})},updateElement:function(t,e,i){var n=this,o=n.getMeta(),s=t.custom||{},a=n.getScaleForId(o.xAxisID),r=n.getScaleForId(o.yAxisID),l=n._resolveElementOptions(t,e),h=n.getDataset().data[e],c=n.index,u=i?a.getPixelForDecimal(.5):a.getPixelForValue("object"==typeof h?h:NaN,e,c),d=i?r.getBasePixel():r.getPixelForValue(h,e,c);t._xScale=a,t._yScale=r,t._options=l,t._datasetIndex=c,t._index=e,t._model={backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,hitRadius:l.hitRadius,pointStyle:l.pointStyle,radius:i?0:l.radius,skip:s.skip||isNaN(u)||isNaN(d),x:u,y:d},t.pivot()},setHoverStyle:function(t){var e=t._model,i=t._options;e.backgroundColor=s.valueOrDefault(i.hoverBackgroundColor,s.getHoverColor(i.backgroundColor)),e.borderColor=s.valueOrDefault(i.hoverBorderColor,s.getHoverColor(i.borderColor)),e.borderWidth=s.valueOrDefault(i.hoverBorderWidth,i.borderWidth),e.radius=i.radius+i.hoverRadius},removeHoverStyle:function(t){var e=t._model,i=t._options;e.backgroundColor=i.backgroundColor,e.borderColor=i.borderColor,e.borderWidth=i.borderWidth,e.radius=i.radius},_resolveElementOptions:function(t,e){var i,n,o,a=this,r=a.chart,l=r.data.datasets,h=l[a.index],c=t.custom||{},u=r.options.elements.point,d=s.options.resolve,p=h.data[e],f={},g={chart:r,dataIndex:e,dataset:h,datasetIndex:a.index},m=["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle"];for(i=0,n=m.length;i<n;++i)o=m[i],f[o]=d([c[o],h[o],u[o]],g,e);return f.radius=d([c.radius,p?p.r:void 0,h.radius,u.radius],g,e),f}})}},{25:25,40:40,45:45}],17:[function(t,e,i){"use strict";var n=t(25),o=t(40),s=t(45);n._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');var i=t.data,n=i.datasets,o=i.labels;if(n.length)for(var s=0;s<n[0].data.length;++s)e.push('<li><span style="background-color:'+n[0].backgroundColor[s]+'"></span>'),o[s]&&e.push(o[s]),e.push("</li>");return e.push("</ul>"),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(i,n){var o=t.getDatasetMeta(0),a=e.datasets[0],r=o.data[n],l=r&&r.custom||{},h=s.valueAtIndexOrDefault,c=t.options.elements.arc;return{text:i,fillStyle:l.backgroundColor?l.backgroundColor:h(a.backgroundColor,n,c.backgroundColor),strokeStyle:l.borderColor?l.borderColor:h(a.borderColor,n,c.borderColor),lineWidth:l.borderWidth?l.borderWidth:h(a.borderWidth,n,c.borderWidth),hidden:isNaN(a.data[n])||o.data[n].hidden,index:n}}):[]}},onClick:function(t,e){var i,n,o,s=e.index,a=this.chart;for(i=0,n=(a.data.datasets||[]).length;i<n;++i)o=a.getDatasetMeta(i),o.data[s]&&(o.data[s].hidden=!o.data[s].hidden);a.update()}},cutoutPercentage:50,rotation:-.5*Math.PI,circumference:2*Math.PI,tooltips:{callbacks:{title:function(){return""},label:function(t,e){var i=e.labels[t.index],n=": "+e.datasets[t.datasetIndex].data[t.index];return s.isArray(i)?(i=i.slice(),i[0]+=n):i+=n,i}}}}),n._set("pie",s.clone(n.doughnut)),n._set("pie",{cutoutPercentage:0}),e.exports=function(t){t.controllers.doughnut=t.controllers.pie=t.DatasetController.extend({dataElementType:o.Arc,linkScales:s.noop,getRingIndex:function(t){for(var e=0,i=0;i<t;++i)this.chart.isDatasetVisible(i)&&++e;return e},update:function(t){var e=this,i=e.chart,n=i.chartArea,o=i.options,a=o.elements.arc,r=n.right-n.left-a.borderWidth,l=n.bottom-n.top-a.borderWidth,h=Math.min(r,l),c={x:0,y:0},u=e.getMeta(),d=o.cutoutPercentage,p=o.circumference;if(p<2*Math.PI){var f=o.rotation%(2*Math.PI);f+=2*Math.PI*(f>=Math.PI?-1:f<-Math.PI?1:0);var g=f+p,m={x:Math.cos(f),y:Math.sin(f)},v={x:Math.cos(g),y:Math.sin(g)},b=f<=0&&g>=0||f<=2*Math.PI&&2*Math.PI<=g,_=f<=.5*Math.PI&&.5*Math.PI<=g||f<=2.5*Math.PI&&2.5*Math.PI<=g,y=f<=-Math.PI&&-Math.PI<=g||f<=Math.PI&&Math.PI<=g,x=f<=.5*-Math.PI&&.5*-Math.PI<=g||f<=1.5*Math.PI&&1.5*Math.PI<=g,w=d/100,k={x:y?-1:Math.min(m.x*(m.x<0?1:w),v.x*(v.x<0?1:w)),y:x?-1:Math.min(m.y*(m.y<0?1:w),v.y*(v.y<0?1:w))},C={x:b?1:Math.max(m.x*(m.x>0?1:w),v.x*(v.x>0?1:w)),y:_?1:Math.max(m.y*(m.y>0?1:w),v.y*(v.y>0?1:w))},D={width:.5*(C.x-k.x),height:.5*(C.y-k.y)};h=Math.min(r/D.width,l/D.height),c={x:-.5*(C.x+k.x),y:-.5*(C.y+k.y)}}i.borderWidth=e.getMaxBorderWidth(u.data),i.outerRadius=Math.max((h-i.borderWidth)/2,0),i.innerRadius=Math.max(d?i.outerRadius/100*d:0,0),i.radiusLength=(i.outerRadius-i.innerRadius)/i.getVisibleDatasetCount(),i.offsetX=c.x*i.outerRadius,i.offsetY=c.y*i.outerRadius,u.total=e.calculateTotal(),e.outerRadius=i.outerRadius-i.radiusLength*e.getRingIndex(e.index),e.innerRadius=Math.max(e.outerRadius-i.radiusLength,0),s.each(u.data,function(i,n){e.updateElement(i,n,t)})},updateElement:function(t,e,i){var n=this,o=n.chart,a=o.chartArea,r=o.options,l=r.animation,h=(a.left+a.right)/2,c=(a.top+a.bottom)/2,u=r.rotation,d=r.rotation,p=n.getDataset(),f=i&&l.animateRotate?0:t.hidden?0:n.calculateCircumference(p.data[e])*(r.circumference/(2*Math.PI)),g=i&&l.animateScale?0:n.innerRadius,m=i&&l.animateScale?0:n.outerRadius,v=s.valueAtIndexOrDefault;s.extend(t,{_datasetIndex:n.index,_index:e,_model:{x:h+o.offsetX,y:c+o.offsetY,startAngle:u,endAngle:d,circumference:f,outerRadius:m,innerRadius:g,label:v(p.label,e,o.data.labels[e])}});var b=t._model;this.removeHoverStyle(t),i&&l.animateRotate||(b.startAngle=0===e?r.rotation:n.getMeta().data[e-1]._model.endAngle,b.endAngle=b.startAngle+b.circumference),t.pivot()},removeHoverStyle:function(e){t.DatasetController.prototype.removeHoverStyle.call(this,e,this.chart.options.elements.arc)},calculateTotal:function(){var t,e=this.getDataset(),i=this.getMeta(),n=0;return s.each(i.data,function(i,o){t=e.data[o],isNaN(t)||i.hidden||(n+=Math.abs(t))}),n},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){for(var e,i,n=0,o=this.index,s=t.length,a=0;a<s;a++)e=t[a]._model?t[a]._model.borderWidth:0,i=t[a]._chart?t[a]._chart.config.data.datasets[o].hoverBorderWidth:0,n=e>n?e:n,n=i>n?i:n;return n}})}},{25:25,40:40,45:45}],18:[function(t,e,i){"use strict";var n=t(25),o=t(40),s=t(45);n._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}}),e.exports=function(t){function e(t,e){return s.valueOrDefault(t.showLine,e.showLines)}t.controllers.line=t.DatasetController.extend({datasetElementType:o.Line,dataElementType:o.Point,update:function(t){var i,n,o,a=this,r=a.getMeta(),l=r.dataset,h=r.data||[],c=a.chart.options,u=c.elements.line,d=a.getScaleForId(r.yAxisID),p=a.getDataset(),f=e(p,c);for(f&&(o=l.custom||{},void 0!==p.tension&&void 0===p.lineTension&&(p.lineTension=p.tension),l._scale=d,l._datasetIndex=a.index,l._children=h,l._model={spanGaps:p.spanGaps?p.spanGaps:c.spanGaps,tension:o.tension?o.tension:s.valueOrDefault(p.lineTension,u.tension),backgroundColor:o.backgroundColor?o.backgroundColor:p.backgroundColor||u.backgroundColor,borderWidth:o.borderWidth?o.borderWidth:p.borderWidth||u.borderWidth,borderColor:o.borderColor?o.borderColor:p.borderColor||u.borderColor,borderCapStyle:o.borderCapStyle?o.borderCapStyle:p.borderCapStyle||u.borderCapStyle,borderDash:o.borderDash?o.borderDash:p.borderDash||u.borderDash,borderDashOffset:o.borderDashOffset?o.borderDashOffset:p.borderDashOffset||u.borderDashOffset,borderJoinStyle:o.borderJoinStyle?o.borderJoinStyle:p.borderJoinStyle||u.borderJoinStyle,fill:o.fill?o.fill:void 0!==p.fill?p.fill:u.fill,steppedLine:o.steppedLine?o.steppedLine:s.valueOrDefault(p.steppedLine,u.stepped),cubicInterpolationMode:o.cubicInterpolationMode?o.cubicInterpolationMode:s.valueOrDefault(p.cubicInterpolationMode,u.cubicInterpolationMode)},l.pivot()),i=0,n=h.length;i<n;++i)a.updateElement(h[i],i,t);for(f&&0!==l._model.tension&&a.updateBezierControlPoints(),i=0,n=h.length;i<n;++i)h[i].pivot()},getPointBackgroundColor:function(t,e){var i=this.chart.options.elements.point.backgroundColor,n=this.getDataset(),o=t.custom||{};return o.backgroundColor?i=o.backgroundColor:n.pointBackgroundColor?i=s.valueAtIndexOrDefault(n.pointBackgroundColor,e,i):n.backgroundColor&&(i=n.backgroundColor),i},getPointBorderColor:function(t,e){var i=this.chart.options.elements.point.borderColor,n=this.getDataset(),o=t.custom||{};return o.borderColor?i=o.borderColor:n.pointBorderColor?i=s.valueAtIndexOrDefault(n.pointBorderColor,e,i):n.borderColor&&(i=n.borderColor),i},getPointBorderWidth:function(t,e){var i=this.chart.options.elements.point.borderWidth,n=this.getDataset(),o=t.custom||{};return isNaN(o.borderWidth)?!isNaN(n.pointBorderWidth)||s.isArray(n.pointBorderWidth)?i=s.valueAtIndexOrDefault(n.pointBorderWidth,e,i):isNaN(n.borderWidth)||(i=n.borderWidth):i=o.borderWidth,i},updateElement:function(t,e,i){var n,o,a=this,r=a.getMeta(),l=t.custom||{},h=a.getDataset(),c=a.index,u=h.data[e],d=a.getScaleForId(r.yAxisID),p=a.getScaleForId(r.xAxisID),f=a.chart.options.elements.point;void 0!==h.radius&&void 0===h.pointRadius&&(h.pointRadius=h.radius),void 0!==h.hitRadius&&void 0===h.pointHitRadius&&(h.pointHitRadius=h.hitRadius),n=p.getPixelForValue("object"==typeof u?u:NaN,e,c),o=i?d.getBasePixel():a.calculatePointY(u,e,c),t._xScale=p,t._yScale=d,t._datasetIndex=c,t._index=e,t._model={x:n,y:o,skip:l.skip||isNaN(n)||isNaN(o),radius:l.radius||s.valueAtIndexOrDefault(h.pointRadius,e,f.radius),pointStyle:l.pointStyle||s.valueAtIndexOrDefault(h.pointStyle,e,f.pointStyle),backgroundColor:a.getPointBackgroundColor(t,e),borderColor:a.getPointBorderColor(t,e),borderWidth:a.getPointBorderWidth(t,e),tension:r.dataset._model?r.dataset._model.tension:0,steppedLine:!!r.dataset._model&&r.dataset._model.steppedLine,hitRadius:l.hitRadius||s.valueAtIndexOrDefault(h.pointHitRadius,e,f.hitRadius)}},calculatePointY:function(t,e,i){var n,o,s,a=this,r=a.chart,l=a.getMeta(),h=a.getScaleForId(l.yAxisID),c=0,u=0;if(h.options.stacked){for(n=0;n<i;n++)if(o=r.data.datasets[n],s=r.getDatasetMeta(n),"line"===s.type&&s.yAxisID===h.id&&r.isDatasetVisible(n)){var d=Number(h.getRightValue(o.data[e]));d<0?u+=d||0:c+=d||0}var p=Number(h.getRightValue(t));return p<0?h.getPixelForValue(u+p):h.getPixelForValue(c+p)}return h.getPixelForValue(t)},updateBezierControlPoints:function(){function t(t,e,i){return Math.max(Math.min(t,i),e)}var e,i,n,o,a,r=this,l=r.getMeta(),h=r.chart.chartArea,c=l.data||[];if(l.dataset._model.spanGaps&&(c=c.filter(function(t){return!t._model.skip})),"monotone"===l.dataset._model.cubicInterpolationMode)s.splineCurveMonotone(c);else for(e=0,i=c.length;e<i;++e)n=c[e],o=n._model,a=s.splineCurve(s.previousItem(c,e)._model,o,s.nextItem(c,e)._model,l.dataset._model.tension),o.controlPointPreviousX=a.previous.x,o.controlPointPreviousY=a.previous.y,o.controlPointNextX=a.next.x,o.controlPointNextY=a.next.y;if(r.chart.options.elements.line.capBezierPoints)for(e=0,i=c.length;e<i;++e)o=c[e]._model,o.controlPointPreviousX=t(o.controlPointPreviousX,h.left,h.right),o.controlPointPreviousY=t(o.controlPointPreviousY,h.top,h.bottom),o.controlPointNextX=t(o.controlPointNextX,h.left,h.right),o.controlPointNextY=t(o.controlPointNextY,h.top,h.bottom)},draw:function(){var t=this,i=t.chart,n=t.getMeta(),o=n.data||[],a=i.chartArea,r=o.length,l=0;for(s.canvas.clipArea(i.ctx,a),e(t.getDataset(),i.options)&&n.dataset.draw(),s.canvas.unclipArea(i.ctx);l<r;++l)o[l].draw(a)},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t._index,n=t.custom||{},o=t._model;o.radius=n.hoverRadius||s.valueAtIndexOrDefault(e.pointHoverRadius,i,this.chart.options.elements.point.hoverRadius),o.backgroundColor=n.hoverBackgroundColor||s.valueAtIndexOrDefault(e.pointHoverBackgroundColor,i,s.getHoverColor(o.backgroundColor)),o.borderColor=n.hoverBorderColor||s.valueAtIndexOrDefault(e.pointHoverBorderColor,i,s.getHoverColor(o.borderColor)),o.borderWidth=n.hoverBorderWidth||s.valueAtIndexOrDefault(e.pointHoverBorderWidth,i,o.borderWidth)},removeHoverStyle:function(t){var e=this,i=e.chart.data.datasets[t._datasetIndex],n=t._index,o=t.custom||{},a=t._model;void 0!==i.radius&&void 0===i.pointRadius&&(i.pointRadius=i.radius),a.radius=o.radius||s.valueAtIndexOrDefault(i.pointRadius,n,e.chart.options.elements.point.radius),a.backgroundColor=e.getPointBackgroundColor(t,n),a.borderColor=e.getPointBorderColor(t,n),a.borderWidth=e.getPointBorderWidth(t,n)}})}},{25:25,40:40,45:45}],19:[function(t,e,i){"use strict";var n=t(25),o=t(40),s=t(45);n._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');var i=t.data,n=i.datasets,o=i.labels;if(n.length)for(var s=0;s<n[0].data.length;++s)e.push('<li><span style="background-color:'+n[0].backgroundColor[s]+'"></span>'),o[s]&&e.push(o[s]),e.push("</li>");return e.push("</ul>"),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(i,n){var o=t.getDatasetMeta(0),a=e.datasets[0],r=o.data[n],l=r.custom||{},h=s.valueAtIndexOrDefault,c=t.options.elements.arc;return{text:i,fillStyle:l.backgroundColor?l.backgroundColor:h(a.backgroundColor,n,c.backgroundColor),strokeStyle:l.borderColor?l.borderColor:h(a.borderColor,n,c.borderColor),lineWidth:l.borderWidth?l.borderWidth:h(a.borderWidth,n,c.borderWidth),hidden:isNaN(a.data[n])||o.data[n].hidden,index:n}}):[]}},onClick:function(t,e){var i,n,o,s=e.index,a=this.chart;for(i=0,n=(a.data.datasets||[]).length;i<n;++i)o=a.getDatasetMeta(i),o.data[s].hidden=!o.data[s].hidden;a.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}}),e.exports=function(t){t.controllers.polarArea=t.DatasetController.extend({dataElementType:o.Arc,linkScales:s.noop,update:function(t){var e=this,i=e.chart,n=i.chartArea,o=e.getMeta(),a=i.options,r=a.elements.arc,l=Math.min(n.right-n.left,n.bottom-n.top);i.outerRadius=Math.max((l-r.borderWidth/2)/2,0),i.innerRadius=Math.max(a.cutoutPercentage?i.outerRadius/100*a.cutoutPercentage:1,0),i.radiusLength=(i.outerRadius-i.innerRadius)/i.getVisibleDatasetCount(),e.outerRadius=i.outerRadius-i.radiusLength*e.index,e.innerRadius=e.outerRadius-i.radiusLength,o.count=e.countVisibleElements(),s.each(o.data,function(i,n){e.updateElement(i,n,t)})},updateElement:function(t,e,i){for(var n=this,o=n.chart,a=n.getDataset(),r=o.options,l=r.animation,h=o.scale,c=o.data.labels,u=n.calculateCircumference(a.data[e]),d=h.xCenter,p=h.yCenter,f=0,g=n.getMeta(),m=0;m<e;++m)isNaN(a.data[m])||g.data[m].hidden||++f;var v=r.startAngle,b=t.hidden?0:h.getDistanceFromCenterForValue(a.data[e]),_=v+u*f,y=_+(t.hidden?0:u),x=l.animateScale?0:h.getDistanceFromCenterForValue(a.data[e]);s.extend(t,{_datasetIndex:n.index,_index:e,_scale:h,_model:{x:d,y:p,innerRadius:0,outerRadius:i?x:b,startAngle:i&&l.animateRotate?v:_,endAngle:i&&l.animateRotate?v:y,label:s.valueAtIndexOrDefault(c,e,c[e])}}),n.removeHoverStyle(t),t.pivot()},removeHoverStyle:function(e){t.DatasetController.prototype.removeHoverStyle.call(this,e,this.chart.options.elements.arc)},countVisibleElements:function(){var t=this.getDataset(),e=this.getMeta(),i=0;return s.each(e.data,function(e,n){isNaN(t.data[n])||e.hidden||i++}),i},calculateCircumference:function(t){var e=this.getMeta().count;return e>0&&!isNaN(t)?2*Math.PI/e:0}})}},{25:25,40:40,45:45}],20:[function(t,e,i){"use strict";var n=t(25),o=t(40),s=t(45);n._set("radar",{scale:{type:"radialLinear"},elements:{line:{tension:0}}}),e.exports=function(t){t.controllers.radar=t.DatasetController.extend({datasetElementType:o.Line,dataElementType:o.Point,linkScales:s.noop,update:function(t){var e=this,i=e.getMeta(),n=i.dataset,o=i.data,a=n.custom||{},r=e.getDataset(),l=e.chart.options.elements.line,h=e.chart.scale;void 0!==r.tension&&void 0===r.lineTension&&(r.lineTension=r.tension),s.extend(i.dataset,{_datasetIndex:e.index,_scale:h,_children:o,_loop:!0,_model:{tension:a.tension?a.tension:s.valueOrDefault(r.lineTension,l.tension),backgroundColor:a.backgroundColor?a.backgroundColor:r.backgroundColor||l.backgroundColor,borderWidth:a.borderWidth?a.borderWidth:r.borderWidth||l.borderWidth,borderColor:a.borderColor?a.borderColor:r.borderColor||l.borderColor,fill:a.fill?a.fill:void 0!==r.fill?r.fill:l.fill,borderCapStyle:a.borderCapStyle?a.borderCapStyle:r.borderCapStyle||l.borderCapStyle,borderDash:a.borderDash?a.borderDash:r.borderDash||l.borderDash,borderDashOffset:a.borderDashOffset?a.borderDashOffset:r.borderDashOffset||l.borderDashOffset,borderJoinStyle:a.borderJoinStyle?a.borderJoinStyle:r.borderJoinStyle||l.borderJoinStyle}}),i.dataset.pivot(),s.each(o,function(i,n){e.updateElement(i,n,t)},e),e.updateBezierControlPoints()},updateElement:function(t,e,i){var n=this,o=t.custom||{},a=n.getDataset(),r=n.chart.scale,l=n.chart.options.elements.point,h=r.getPointPositionForValue(e,a.data[e]);void 0!==a.radius&&void 0===a.pointRadius&&(a.pointRadius=a.radius),void 0!==a.hitRadius&&void 0===a.pointHitRadius&&(a.pointHitRadius=a.hitRadius),s.extend(t,{_datasetIndex:n.index,_index:e,_scale:r,_model:{x:i?r.xCenter:h.x,y:i?r.yCenter:h.y,tension:o.tension?o.tension:s.valueOrDefault(a.lineTension,n.chart.options.elements.line.tension),radius:o.radius?o.radius:s.valueAtIndexOrDefault(a.pointRadius,e,l.radius),backgroundColor:o.backgroundColor?o.backgroundColor:s.valueAtIndexOrDefault(a.pointBackgroundColor,e,l.backgroundColor),borderColor:o.borderColor?o.borderColor:s.valueAtIndexOrDefault(a.pointBorderColor,e,l.borderColor),
borderWidth:o.borderWidth?o.borderWidth:s.valueAtIndexOrDefault(a.pointBorderWidth,e,l.borderWidth),pointStyle:o.pointStyle?o.pointStyle:s.valueAtIndexOrDefault(a.pointStyle,e,l.pointStyle),hitRadius:o.hitRadius?o.hitRadius:s.valueAtIndexOrDefault(a.pointHitRadius,e,l.hitRadius)}}),t._model.skip=o.skip?o.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var t=this.chart.chartArea,e=this.getMeta();s.each(e.data,function(i,n){var o=i._model,a=s.splineCurve(s.previousItem(e.data,n,!0)._model,o,s.nextItem(e.data,n,!0)._model,o.tension);o.controlPointPreviousX=Math.max(Math.min(a.previous.x,t.right),t.left),o.controlPointPreviousY=Math.max(Math.min(a.previous.y,t.bottom),t.top),o.controlPointNextX=Math.max(Math.min(a.next.x,t.right),t.left),o.controlPointNextY=Math.max(Math.min(a.next.y,t.bottom),t.top),i.pivot()})},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t.custom||{},n=t._index,o=t._model;o.radius=i.hoverRadius?i.hoverRadius:s.valueAtIndexOrDefault(e.pointHoverRadius,n,this.chart.options.elements.point.hoverRadius),o.backgroundColor=i.hoverBackgroundColor?i.hoverBackgroundColor:s.valueAtIndexOrDefault(e.pointHoverBackgroundColor,n,s.getHoverColor(o.backgroundColor)),o.borderColor=i.hoverBorderColor?i.hoverBorderColor:s.valueAtIndexOrDefault(e.pointHoverBorderColor,n,s.getHoverColor(o.borderColor)),o.borderWidth=i.hoverBorderWidth?i.hoverBorderWidth:s.valueAtIndexOrDefault(e.pointHoverBorderWidth,n,o.borderWidth)},removeHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t.custom||{},n=t._index,o=t._model,a=this.chart.options.elements.point;o.radius=i.radius?i.radius:s.valueAtIndexOrDefault(e.pointRadius,n,a.radius),o.backgroundColor=i.backgroundColor?i.backgroundColor:s.valueAtIndexOrDefault(e.pointBackgroundColor,n,a.backgroundColor),o.borderColor=i.borderColor?i.borderColor:s.valueAtIndexOrDefault(e.pointBorderColor,n,a.borderColor),o.borderWidth=i.borderWidth?i.borderWidth:s.valueAtIndexOrDefault(e.pointBorderWidth,n,a.borderWidth)}})}},{25:25,40:40,45:45}],21:[function(t,e,i){"use strict";t(25)._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},showLines:!1,tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}}),e.exports=function(t){t.controllers.scatter=t.controllers.line}},{25:25}],22:[function(t,e,i){"use strict";var n=t(25),o=t(26),s=t(45);n._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:s.noop,onComplete:s.noop}}),e.exports=function(t){t.Animation=o.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),t.animationService={frameDuration:17,animations:[],dropFrames:0,request:null,addAnimation:function(t,e,i,n){var o,s,a=this.animations;for(e.chart=t,n||(t.animating=!0),o=0,s=a.length;o<s;++o)if(a[o].chart===t)return void(a[o]=e);a.push(e),1===a.length&&this.requestAnimationFrame()},cancelAnimation:function(t){var e=s.findIndex(this.animations,function(e){return e.chart===t});-1!==e&&(this.animations.splice(e,1),t.animating=!1)},requestAnimationFrame:function(){var t=this;null===t.request&&(t.request=s.requestAnimFrame.call(window,function(){t.request=null,t.startDigest()}))},startDigest:function(){var t=this,e=Date.now(),i=0;t.dropFrames>1&&(i=Math.floor(t.dropFrames),t.dropFrames=t.dropFrames%1),t.advance(1+i);var n=Date.now();t.dropFrames+=(n-e)/t.frameDuration,t.animations.length>0&&t.requestAnimationFrame()},advance:function(t){for(var e,i,n=this.animations,o=0;o<n.length;)e=n[o],i=e.chart,e.currentStep=(e.currentStep||0)+t,e.currentStep=Math.min(e.currentStep,e.numSteps),s.callback(e.render,[i,e],i),s.callback(e.onAnimationProgress,[e],i),e.currentStep>=e.numSteps?(s.callback(e.onAnimationComplete,[e],i),i.animating=!1,n.splice(o,1)):++o}},Object.defineProperty(t.Animation.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(t.Animation.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}})}},{25:25,26:26,45:45}],23:[function(t,e,i){"use strict";var n=t(25),o=t(45),s=t(28),a=t(30),r=t(48),l=t(31);e.exports=function(t){function e(t){t=t||{};var e=t.data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=o.configMerge(n.global,n[t.type],t.options||{}),t}function i(e){var i=e.options;o.each(e.scales,function(t){a.removeBox(e,t)}),i=o.configMerge(t.defaults.global,t.defaults[e.config.type],i),e.options=e.config.options=i,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=i.tooltips,e.tooltip.initialize()}function h(t){return"top"===t||"bottom"===t}t.types={},t.instances={},t.controllers={},o.extend(t.prototype,{construct:function(i,n){var s=this;n=e(n);var a=r.acquireContext(i,n),l=a&&a.canvas,h=l&&l.height,c=l&&l.width;if(s.id=o.uid(),s.ctx=a,s.canvas=l,s.config=n,s.width=c,s.height=h,s.aspectRatio=h?c/h:null,s.options=n.options,s._bufferedRender=!1,s.chart=s,s.controller=s,t.instances[s.id]=s,Object.defineProperty(s,"data",{get:function(){return s.config.data},set:function(t){s.config.data=t}}),!a||!l)return void console.error("Failed to create chart: can't acquire context from the given item");s.initialize(),s.update()},initialize:function(){var t=this;return l.notify(t,"beforeInit"),o.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.initToolTip(),l.notify(t,"afterInit"),t},clear:function(){return o.canvas.clear(this),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(t){var e=this,i=e.options,n=e.canvas,s=i.maintainAspectRatio&&e.aspectRatio||null,a=Math.max(0,Math.floor(o.getMaximumWidth(n))),r=Math.max(0,Math.floor(s?a/s:o.getMaximumHeight(n)));if((e.width!==a||e.height!==r)&&(n.width=e.width=a,n.height=e.height=r,n.style.width=a+"px",n.style.height=r+"px",o.retinaScale(e,i.devicePixelRatio),!t)){var h={width:a,height:r};l.notify(e,"resize",[h]),e.options.onResize&&e.options.onResize(e,h),e.stop(),e.update(e.options.responsiveAnimationDuration)}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},i=t.scale;o.each(e.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),o.each(e.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),i&&(i.id=i.id||"scale")},buildOrUpdateScales:function(){var e=this,i=e.options,n=e.scales||{},s=[],a=Object.keys(n).reduce(function(t,e){return t[e]=!1,t},{});i.scales&&(s=s.concat((i.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(i.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),i.scale&&s.push({options:i.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),o.each(s,function(i){var s=i.options,r=s.id,l=o.valueOrDefault(s.type,i.dtype);h(s.position)!==h(i.dposition)&&(s.position=i.dposition),a[r]=!0;var c=null;if(r in n&&n[r].type===l)c=n[r],c.options=s,c.ctx=e.ctx,c.chart=e;else{var u=t.scaleService.getScaleConstructor(l);if(!u)return;c=new u({id:r,type:l,options:s,ctx:e.ctx,chart:e}),n[c.id]=c}c.mergeTicksOptions(),i.isDefault&&(e.scale=c)}),o.each(a,function(t,e){t||delete n[e]}),e.scales=n,t.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,i=[],n=[];return o.each(e.data.datasets,function(o,s){var a=e.getDatasetMeta(s),r=o.type||e.config.type;if(a.type&&a.type!==r&&(e.destroyDatasetMeta(s),a=e.getDatasetMeta(s)),a.type=r,i.push(a.type),a.controller)a.controller.updateIndex(s),a.controller.linkScales();else{var l=t.controllers[a.type];if(void 0===l)throw new Error('"'+a.type+'" is not a chart type.');a.controller=new l(e,s),n.push(a.controller)}},e),n},resetElements:function(){var t=this;o.each(t.data.datasets,function(e,i){t.getDatasetMeta(i).controller.reset()},t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),i(e),l._invalidate(e),!1!==l.notify(e,"beforeUpdate")){e.tooltip._data=e.data;var n=e.buildOrUpdateControllers();o.each(e.data.datasets,function(t,i){e.getDatasetMeta(i).controller.buildOrUpdateElements()},e),e.updateLayout(),e.options.animation&&e.options.animation.duration&&o.each(n,function(t){t.reset()}),e.updateDatasets(),e.tooltip.initialize(),e.lastActive=[],l.notify(e,"afterUpdate"),e._bufferedRender?e._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:e.render(t)}},updateLayout:function(){var t=this;!1!==l.notify(t,"beforeLayout")&&(a.update(this,this.width,this.height),l.notify(t,"afterScaleUpdate"),l.notify(t,"afterLayout"))},updateDatasets:function(){var t=this;if(!1!==l.notify(t,"beforeDatasetsUpdate")){for(var e=0,i=t.data.datasets.length;e<i;++e)t.updateDataset(e);l.notify(t,"afterDatasetsUpdate")}},updateDataset:function(t){var e=this,i=e.getDatasetMeta(t),n={meta:i,index:t};!1!==l.notify(e,"beforeDatasetUpdate",[n])&&(i.controller.update(),l.notify(e,"afterDatasetUpdate",[n]))},render:function(e){var i=this;e&&"object"==typeof e||(e={duration:e,lazy:arguments[1]});var n=e.duration,s=e.lazy;if(!1!==l.notify(i,"beforeRender")){var a=i.options.animation,r=function(t){l.notify(i,"afterRender"),o.callback(a&&a.onComplete,[t],i)};if(a&&(void 0!==n&&0!==n||void 0===n&&0!==a.duration)){var h=new t.Animation({numSteps:(n||a.duration)/16.66,easing:e.easing||a.easing,render:function(t,e){var i=o.easing.effects[e.easing],n=e.currentStep,s=n/e.numSteps;t.draw(i(s),s,n)},onAnimationProgress:a.onProgress,onAnimationComplete:r});t.animationService.addAnimation(i,h,n,s)}else i.draw(),r(new t.Animation({numSteps:0,chart:i}));return i}},draw:function(t){var e=this;e.clear(),o.isNullOrUndef(t)&&(t=1),e.transition(t),!1!==l.notify(e,"beforeDraw",[t])&&(o.each(e.boxes,function(t){t.draw(e.chartArea)},e),e.scale&&e.scale.draw(),e.drawDatasets(t),e._drawTooltip(t),l.notify(e,"afterDraw",[t]))},transition:function(t){for(var e=this,i=0,n=(e.data.datasets||[]).length;i<n;++i)e.isDatasetVisible(i)&&e.getDatasetMeta(i).controller.transition(t);e.tooltip.transition(t)},drawDatasets:function(t){var e=this;if(!1!==l.notify(e,"beforeDatasetsDraw",[t])){for(var i=(e.data.datasets||[]).length-1;i>=0;--i)e.isDatasetVisible(i)&&e.drawDataset(i,t);l.notify(e,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var i=this,n=i.getDatasetMeta(t),o={meta:n,index:t,easingValue:e};!1!==l.notify(i,"beforeDatasetDraw",[o])&&(n.controller.draw(e),l.notify(i,"afterDatasetDraw",[o]))},_drawTooltip:function(t){var e=this,i=e.tooltip,n={tooltip:i,easingValue:t};!1!==l.notify(e,"beforeTooltipDraw",[n])&&(i.draw(),l.notify(e,"afterTooltipDraw",[n]))},getElementAtEvent:function(t){return s.modes.single(this,t)},getElementsAtEvent:function(t){return s.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return s.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,i){var n=s.modes[e];return"function"==typeof n?n(this,t,i):[]},getDatasetAtEvent:function(t){return s.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this,i=e.data.datasets[t];i._meta||(i._meta={});var n=i._meta[e.id];return n||(n=i._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),n},getVisibleDatasetCount:function(){for(var t=0,e=0,i=this.data.datasets.length;e<i;++e)this.isDatasetVisible(e)&&t++;return t},isDatasetVisible:function(t){var e=this.getDatasetMeta(t);return"boolean"==typeof e.hidden?!e.hidden:!this.data.datasets[t].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(t){var e=this.id,i=this.data.datasets[t],n=i._meta&&i._meta[e];n&&(n.controller.destroy(),delete i._meta[e])},destroy:function(){var e,i,n=this,s=n.canvas;for(n.stop(),e=0,i=n.data.datasets.length;e<i;++e)n.destroyDatasetMeta(e);s&&(n.unbindEvents(),o.canvas.clear(n),r.releaseContext(n.ctx),n.canvas=null,n.ctx=null),l.notify(n,"destroy"),delete t.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var e=this;e.tooltip=new t.Tooltip({_chart:e,_chartInstance:e,_data:e.data,_options:e.options.tooltips},e)},bindEvents:function(){var t=this,e=t._listeners={},i=function(){t.eventHandler.apply(t,arguments)};o.each(t.options.events,function(n){r.addEventListener(t,n,i),e[n]=i}),t.options.responsive&&(i=function(){t.resize()},r.addEventListener(t,"resize",i),e.resize=i)},unbindEvents:function(){var t=this,e=t._listeners;e&&(delete t._listeners,o.each(e,function(e,i){r.removeEventListener(t,i,e)}))},updateHoverStyle:function(t,e,i){var n,o,s,a=i?"setHoverStyle":"removeHoverStyle";for(o=0,s=t.length;o<s;++o)(n=t[o])&&this.getDatasetMeta(n._datasetIndex).controller[a](n)},eventHandler:function(t){var e=this,i=e.tooltip;if(!1!==l.notify(e,"beforeEvent",[t])){e._bufferedRender=!0,e._bufferedRequest=null;var n=e.handleEvent(t);i&&(n=i._start?i.handleEvent(t):n|i.handleEvent(t)),l.notify(e,"afterEvent",[t]);var o=e._bufferedRequest;return o?e.render(o):n&&!e.animating&&(e.stop(),e.render(e.options.hover.animationDuration,!0)),e._bufferedRender=!1,e._bufferedRequest=null,e}},handleEvent:function(t){var e=this,i=e.options||{},n=i.hover,s=!1;return e.lastActive=e.lastActive||[],"mouseout"===t.type?e.active=[]:e.active=e.getElementsAtEventForMode(t,n.mode,n),o.callback(i.onHover||i.hover.onHover,[t.native,e.active],e),"mouseup"!==t.type&&"click"!==t.type||i.onClick&&i.onClick.call(e,t.native,e.active),e.lastActive.length&&e.updateHoverStyle(e.lastActive,n.mode,!1),e.active.length&&n.mode&&e.updateHoverStyle(e.active,n.mode,!0),s=!o.arrayEquals(e.active,e.lastActive),e.lastActive=e.active,s}}),t.Controller=t}},{25:25,28:28,30:30,31:31,45:45,48:48}],24:[function(t,e,i){"use strict";var n=t(45);e.exports=function(t){function e(t,e){if(t._chartjs)return void t._chartjs.listeners.push(e);Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),o.forEach(function(e){var i="onData"+e.charAt(0).toUpperCase()+e.slice(1),o=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),s=o.apply(this,e);return n.each(t._chartjs.listeners,function(t){"function"==typeof t[i]&&t[i].apply(t,e)}),s}})})}function i(t,e){var i=t._chartjs;if(i){var n=i.listeners,s=n.indexOf(e);-1!==s&&n.splice(s,1),n.length>0||(o.forEach(function(e){delete t[e]}),delete t._chartjs)}}var o=["push","pop","shift","splice","unshift"];t.DatasetController=function(t,e){this.initialize(t,e)},n.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){var i=this;i.chart=t,i.index=e,i.linkScales(),i.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),i=t.getDataset();null!==e.xAxisID&&e.xAxisID in t.chart.scales||(e.xAxisID=i.xAxisID||t.chart.options.scales.xAxes[0].id),null!==e.yAxisID&&e.yAxisID in t.chart.scales||(e.yAxisID=i.yAxisID||t.chart.options.scales.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},reset:function(){this.update(!0)},destroy:function(){this._data&&i(this._data,this)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,i=e.dataElementType;return i&&new i({_chart:e.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,i=this,n=i.getMeta(),o=i.getDataset().data||[],s=n.data;for(t=0,e=o.length;t<e;++t)s[t]=s[t]||i.createMetaData(t);n.dataset=n.dataset||i.createMetaDataset()},addElementAndReset:function(t){var e=this.createMetaData(t);this.getMeta().data.splice(t,0,e),this.updateElement(e,t,!0)},buildOrUpdateElements:function(){var t=this,n=t.getDataset(),o=n.data||(n.data=[]);t._data!==o&&(t._data&&i(t._data,t),e(o,t),t._data=o),t.resyncElements()},update:n.noop,transition:function(t){for(var e=this.getMeta(),i=e.data||[],n=i.length,o=0;o<n;++o)i[o].transition(t);e.dataset&&e.dataset.transition(t)},draw:function(){var t=this.getMeta(),e=t.data||[],i=e.length,n=0;for(t.dataset&&t.dataset.draw();n<i;++n)e[n].draw()},removeHoverStyle:function(t,e){var i=this.chart.data.datasets[t._datasetIndex],o=t._index,s=t.custom||{},a=n.valueAtIndexOrDefault,r=t._model;r.backgroundColor=s.backgroundColor?s.backgroundColor:a(i.backgroundColor,o,e.backgroundColor),r.borderColor=s.borderColor?s.borderColor:a(i.borderColor,o,e.borderColor),r.borderWidth=s.borderWidth?s.borderWidth:a(i.borderWidth,o,e.borderWidth)},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t._index,o=t.custom||{},s=n.valueAtIndexOrDefault,a=n.getHoverColor,r=t._model;r.backgroundColor=o.hoverBackgroundColor?o.hoverBackgroundColor:s(e.hoverBackgroundColor,i,a(r.backgroundColor)),r.borderColor=o.hoverBorderColor?o.hoverBorderColor:s(e.hoverBorderColor,i,a(r.borderColor)),r.borderWidth=o.hoverBorderWidth?o.hoverBorderWidth:s(e.hoverBorderWidth,i,r.borderWidth)},resyncElements:function(){var t=this,e=t.getMeta(),i=t.getDataset().data,n=e.data.length,o=i.length;o<n?e.data.splice(o,n-o):o>n&&t.insertElements(n,o-n)},insertElements:function(t,e){for(var i=0;i<e;++i)this.addElementAndReset(t+i)},onDataPush:function(){this.insertElements(this.getDataset().data.length-1,arguments.length)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(t,e){this.getMeta().data.splice(t,e),this.insertElements(t,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),t.DatasetController.extend=n.inherits}},{45:45}],25:[function(t,e,i){"use strict";var n=t(45);e.exports={_set:function(t,e){return n.merge(this[t]||(this[t]={}),e)}}},{45:45}],26:[function(t,e,i){"use strict";function n(t,e,i,n){var s,a,r,l,h,c,u,d,p,f=Object.keys(i);for(s=0,a=f.length;s<a;++s)if(r=f[s],c=i[r],e.hasOwnProperty(r)||(e[r]=c),(l=e[r])!==c&&"_"!==r[0]){if(t.hasOwnProperty(r)||(t[r]=l),h=t[r],(u=typeof c)===typeof h)if("string"===u){if(d=o(h),d.valid&&(p=o(c),p.valid)){e[r]=p.mix(d,n).rgbString();continue}}else if("number"===u&&isFinite(h)&&isFinite(c)){e[r]=h+(c-h)*n;continue}e[r]=c}}var o=t(3),s=t(45),a=function(t){s.extend(this,t),this.initialize.apply(this,arguments)};s.extend(a.prototype,{initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=s.clone(t._model)),t._start={},t},transition:function(t){var e=this,i=e._model,o=e._start,s=e._view;return i&&1!==t?(s||(s=e._view={}),o||(o=e._start={}),n(o,s,i,t),e):(e._view=i,e._start=null,e)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return s.isNumber(this._model.x)&&s.isNumber(this._model.y)}}),a.extend=s.inherits,e.exports=a},{3:3,45:45}],27:[function(t,e,i){"use strict";var n=t(3),o=t(25),s=t(45);e.exports=function(t){function e(t,e,i){var n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}function i(t){return void 0!==t&&null!==t&&"none"!==t}function a(t,n,o){var s=document.defaultView,a=t.parentNode,r=s.getComputedStyle(t)[n],l=s.getComputedStyle(a)[n],h=i(r),c=i(l),u=Number.POSITIVE_INFINITY;return h||c?Math.min(h?e(r,t,o):u,c?e(l,a,o):u):"none"}s.configMerge=function(){return s.merge(s.clone(arguments[0]),[].slice.call(arguments,1),{merger:function(e,i,n,o){var a=i[e]||{},r=n[e];"scales"===e?i[e]=s.scaleMerge(a,r):"scale"===e?i[e]=s.merge(a,[t.scaleService.getScaleDefaults(r.type),r]):s._merger(e,i,n,o)}})},s.scaleMerge=function(){return s.merge(s.clone(arguments[0]),[].slice.call(arguments,1),{merger:function(e,i,n,o){if("xAxes"===e||"yAxes"===e){var a,r,l,h=n[e].length;for(i[e]||(i[e]=[]),a=0;a<h;++a)l=n[e][a],r=s.valueOrDefault(l.type,"xAxes"===e?"category":"linear"),a>=i[e].length&&i[e].push({}),!i[e][a].type||l.type&&l.type!==i[e][a].type?s.merge(i[e][a],[t.scaleService.getScaleDefaults(r),l]):s.merge(i[e][a],l)}else s._merger(e,i,n,o)}})},s.where=function(t,e){if(s.isArray(t)&&Array.prototype.filter)return t.filter(e);var i=[];return s.each(t,function(t){e(t)&&i.push(t)}),i},s.findIndex=Array.prototype.findIndex?function(t,e,i){return t.findIndex(e,i)}:function(t,e,i){i=void 0===i?t:i;for(var n=0,o=t.length;n<o;++n)if(e.call(i,t[n],n,t))return n;return-1},s.findNextWhere=function(t,e,i){s.isNullOrUndef(i)&&(i=-1);for(var n=i+1;n<t.length;n++){var o=t[n];if(e(o))return o}},s.findPreviousWhere=function(t,e,i){s.isNullOrUndef(i)&&(i=t.length);for(var n=i-1;n>=0;n--){var o=t[n];if(e(o))return o}},s.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},s.almostEquals=function(t,e,i){return Math.abs(t-e)<i},s.almostWhole=function(t,e){var i=Math.round(t);return i-e<t&&i+e>t},s.max=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.max(t,e)},Number.NEGATIVE_INFINITY)},s.min=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.min(t,e)},Number.POSITIVE_INFINITY)},s.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return t=+t,0===t||isNaN(t)?t:t>0?1:-1},s.log10=Math.log10?function(t){return Math.log10(t)}:function(t){var e=Math.log(t)*Math.LOG10E,i=Math.round(e);return t===Math.pow(10,i)?i:e},s.toRadians=function(t){return t*(Math.PI/180)},s.toDegrees=function(t){return t*(180/Math.PI)},s.getAngleFromPoint=function(t,e){var i=e.x-t.x,n=e.y-t.y,o=Math.sqrt(i*i+n*n),s=Math.atan2(n,i);return s<-.5*Math.PI&&(s+=2*Math.PI),{angle:s,distance:o}},s.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},s.aliasPixel=function(t){return t%2==0?0:.5},s.splineCurve=function(t,e,i,n){var o=t.skip?e:t,s=e,a=i.skip?e:i,r=Math.sqrt(Math.pow(s.x-o.x,2)+Math.pow(s.y-o.y,2)),l=Math.sqrt(Math.pow(a.x-s.x,2)+Math.pow(a.y-s.y,2)),h=r/(r+l),c=l/(r+l);h=isNaN(h)?0:h,c=isNaN(c)?0:c;var u=n*h,d=n*c;return{previous:{x:s.x-u*(a.x-o.x),y:s.y-u*(a.y-o.y)},next:{x:s.x+d*(a.x-o.x),y:s.y+d*(a.y-o.y)}}},s.EPSILON=Number.EPSILON||1e-14,s.splineCurveMonotone=function(t){var e,i,n,o,a=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),r=a.length;for(e=0;e<r;++e)if(n=a[e],!n.model.skip){if(i=e>0?a[e-1]:null,(o=e<r-1?a[e+1]:null)&&!o.model.skip){var l=o.model.x-n.model.x;n.deltaK=0!==l?(o.model.y-n.model.y)/l:0}!i||i.model.skip?n.mK=n.deltaK:!o||o.model.skip?n.mK=i.deltaK:this.sign(i.deltaK)!==this.sign(n.deltaK)?n.mK=0:n.mK=(i.deltaK+n.deltaK)/2}var h,c,u,d;for(e=0;e<r-1;++e)n=a[e],o=a[e+1],n.model.skip||o.model.skip||(s.almostEquals(n.deltaK,0,this.EPSILON)?n.mK=o.mK=0:(h=n.mK/n.deltaK,c=o.mK/n.deltaK,(d=Math.pow(h,2)+Math.pow(c,2))<=9||(u=3/Math.sqrt(d),n.mK=h*u*n.deltaK,o.mK=c*u*n.deltaK)));var p;for(e=0;e<r;++e)n=a[e],n.model.skip||(i=e>0?a[e-1]:null,o=e<r-1?a[e+1]:null,i&&!i.model.skip&&(p=(n.model.x-i.model.x)/3,n.model.controlPointPreviousX=n.model.x-p,n.model.controlPointPreviousY=n.model.y-p*n.mK),o&&!o.model.skip&&(p=(o.model.x-n.model.x)/3,n.model.controlPointNextX=n.model.x+p,n.model.controlPointNextY=n.model.y+p*n.mK))},s.nextItem=function(t,e,i){return i?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},s.previousItem=function(t,e,i){return i?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},s.niceNum=function(t,e){var i=Math.floor(s.log10(t)),n=t/Math.pow(10,i);return(e?n<1.5?1:n<3?2:n<7?5:10:n<=1?1:n<=2?2:n<=5?5:10)*Math.pow(10,i)},s.requestAnimFrame=function(){return"undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)}}(),s.getRelativePosition=function(t,e){var i,n,o=t.originalEvent||t,a=t.currentTarget||t.srcElement,r=a.getBoundingClientRect(),l=o.touches;l&&l.length>0?(i=l[0].clientX,n=l[0].clientY):(i=o.clientX,n=o.clientY);var h=parseFloat(s.getStyle(a,"padding-left")),c=parseFloat(s.getStyle(a,"padding-top")),u=parseFloat(s.getStyle(a,"padding-right")),d=parseFloat(s.getStyle(a,"padding-bottom")),p=r.right-r.left-h-u,f=r.bottom-r.top-c-d;return i=Math.round((i-r.left-h)/p*a.width/e.currentDevicePixelRatio),n=Math.round((n-r.top-c)/f*a.height/e.currentDevicePixelRatio),{x:i,y:n}},s.getConstraintWidth=function(t){return a(t,"max-width","clientWidth")},s.getConstraintHeight=function(t){return a(t,"max-height","clientHeight")},s.getMaximumWidth=function(t){var e=t.parentNode;if(!e)return t.clientWidth;var i=parseInt(s.getStyle(e,"padding-left"),10),n=parseInt(s.getStyle(e,"padding-right"),10),o=e.clientWidth-i-n,a=s.getConstraintWidth(t);return isNaN(a)?o:Math.min(o,a)},s.getMaximumHeight=function(t){var e=t.parentNode;if(!e)return t.clientHeight;var i=parseInt(s.getStyle(e,"padding-top"),10),n=parseInt(s.getStyle(e,"padding-bottom"),10),o=e.clientHeight-i-n,a=s.getConstraintHeight(t);return isNaN(a)?o:Math.min(o,a)},s.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},s.retinaScale=function(t,e){var i=t.currentDevicePixelRatio=e||window.devicePixelRatio||1;if(1!==i){var n=t.canvas,o=t.height,s=t.width;n.height=o*i,n.width=s*i,t.ctx.scale(i,i),n.style.height||n.style.width||(n.style.height=o+"px",n.style.width=s+"px")}},s.fontString=function(t,e,i){return e+" "+t+"px "+i},s.longestText=function(t,e,i,n){n=n||{};var o=n.data=n.data||{},a=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(o=n.data={},a=n.garbageCollect=[],n.font=e),t.font=e;var r=0;s.each(i,function(e){void 0!==e&&null!==e&&!0!==s.isArray(e)?r=s.measureText(t,o,a,r,e):s.isArray(e)&&s.each(e,function(e){void 0===e||null===e||s.isArray(e)||(r=s.measureText(t,o,a,r,e))})});var l=a.length/2;if(l>i.length){for(var h=0;h<l;h++)delete o[a[h]];a.splice(0,l)}return r},s.measureText=function(t,e,i,n,o){var s=e[o];return s||(s=e[o]=t.measureText(o).width,i.push(o)),s>n&&(n=s),n},s.numberOfLabelLines=function(t){var e=1;return s.each(t,function(t){s.isArray(t)&&t.length>e&&(e=t.length)}),e},s.color=n?function(t){return t instanceof CanvasGradient&&(t=o.global.defaultColor),n(t)}:function(t){return console.error("Color.js not found!"),t},s.getHoverColor=function(t){return t instanceof CanvasPattern?t:s.color(t).saturate(.5).darken(.1).rgbString()}}},{25:25,3:3,45:45}],28:[function(t,e,i){"use strict";function n(t,e){return t.native?{x:t.x,y:t.y}:h.getRelativePosition(t,e)}function o(t,e){var i,n,o,s,a,r=t.data.datasets;for(n=0,s=r.length;n<s;++n)if(t.isDatasetVisible(n))for(i=t.getDatasetMeta(n),o=0,a=i.data.length;o<a;++o){var l=i.data[o];l._view.skip||e(l)}}function s(t,e){var i=[];return o(t,function(t){t.inRange(e.x,e.y)&&i.push(t)}),i}function a(t,e,i,n){var s=Number.POSITIVE_INFINITY,a=[];return o(t,function(t){if(!i||t.inRange(e.x,e.y)){var o=t.getCenterPoint(),r=n(e,o);r<s?(a=[t],s=r):r===s&&a.push(t)}}),a}function r(t){var e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,n){var o=e?Math.abs(t.x-n.x):0,s=i?Math.abs(t.y-n.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(s,2))}}function l(t,e,i){var o=n(e,t);i.axis=i.axis||"x";var l=r(i.axis),h=i.intersect?s(t,o):a(t,o,!1,l),c=[];return h.length?(t.data.datasets.forEach(function(e,i){if(t.isDatasetVisible(i)){var n=t.getDatasetMeta(i),o=n.data[h[0]._index];o&&!o._view.skip&&c.push(o)}}),c):[]}var h=t(45);e.exports={modes:{single:function(t,e){var i=n(e,t),s=[];return o(t,function(t){if(t.inRange(i.x,i.y))return s.push(t),s}),s.slice(0,1)},label:l,index:l,dataset:function(t,e,i){var o=n(e,t);i.axis=i.axis||"xy";var l=r(i.axis),h=i.intersect?s(t,o):a(t,o,!1,l);return h.length>0&&(h=t.getDatasetMeta(h[0]._datasetIndex).data),h},"x-axis":function(t,e){return l(t,e,{intersect:!1})},point:function(t,e){return s(t,n(e,t))},nearest:function(t,e,i){var o=n(e,t);i.axis=i.axis||"xy";var s=r(i.axis),l=a(t,o,i.intersect,s);return l.length>1&&l.sort(function(t,e){var i=t.getArea(),n=e.getArea(),o=i-n;return 0===o&&(o=t._datasetIndex-e._datasetIndex),o}),l.slice(0,1)},x:function(t,e,i){var s=n(e,t),a=[],r=!1;return o(t,function(t){t.inXRange(s.x)&&a.push(t),t.inRange(s.x,s.y)&&(r=!0)}),i.intersect&&!r&&(a=[]),a},y:function(t,e,i){var s=n(e,t),a=[],r=!1;return o(t,function(t){t.inYRange(s.y)&&a.push(t),t.inRange(s.x,s.y)&&(r=!0)}),i.intersect&&!r&&(a=[]),a}}}},{45:45}],29:[function(t,e,i){"use strict";t(25)._set("global",{responsive:!0,responsiveAnimationDuration:0,maintainAspectRatio:!0,events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",showLines:!0,elements:{},layout:{padding:{top:0,right:0,bottom:0,left:0}}}),e.exports=function(){var t=function(t,e){return this.construct(t,e),this};return t.Chart=t,t}},{25:25}],30:[function(t,e,i){"use strict";function n(t,e){return s.where(t,function(t){return t.position===e})}function o(t,e){t.forEach(function(t,e){return t._tmpIndex_=e,t}),t.sort(function(t,i){var n=e?i:t,o=e?t:i;return n.weight===o.weight?n._tmpIndex_-o._tmpIndex_:n.weight-o.weight}),t.forEach(function(t){delete t._tmpIndex_})}var s=t(45);e.exports={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,t.boxes.push(e)},removeBox:function(t,e){var i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure:function(t,e,i){for(var n,o=["fullWidth","position","weight"],s=o.length,a=0;a<s;++a)n=o[a],i.hasOwnProperty(n)&&(e[n]=i[n])},update:function(t,e,i){function a(t){var e,i=t.isHorizontal();i?(e=t.update(t.fullWidth?x:M,S),T-=e.height):(e=t.update(D,T),M-=e.width),I.push({horizontal:i,minSize:e,box:t})}function r(t){var e=s.findNextWhere(I,function(e){return e.box===t});if(e)if(t.isHorizontal()){var i={left:Math.max(E,P),right:Math.max(z,A),top:0,bottom:0};t.update(t.fullWidth?x:M,w/2,i)}else t.update(e.minSize.width,T)}function l(t){var e=s.findNextWhere(I,function(e){return e.box===t}),i={left:0,right:0,top:H,bottom:W};e&&t.update(e.minSize.width,T,i)}function h(t){t.isHorizontal()?(t.left=t.fullWidth?d:E,t.right=t.fullWidth?e-p:E+M,t.top=U,t.bottom=U+t.height,U=t.bottom):(t.left=V,t.right=V+t.width,t.top=H,t.bottom=H+T,V=t.right)}if(t){var c=t.options.layout||{},u=s.options.toPadding(c.padding),d=u.left,p=u.right,f=u.top,g=u.bottom,m=n(t.boxes,"left"),v=n(t.boxes,"right"),b=n(t.boxes,"top"),_=n(t.boxes,"bottom"),y=n(t.boxes,"chartArea");o(m,!0),o(v,!1),o(b,!0),o(_,!1);var x=e-d-p,w=i-f-g,k=x/2,C=w/2,D=(e-k)/(m.length+v.length),S=(i-C)/(b.length+_.length),M=x,T=w,I=[];s.each(m.concat(v,b,_),a);var P=0,A=0,O=0,F=0;s.each(b.concat(_),function(t){if(t.getPadding){var e=t.getPadding();P=Math.max(P,e.left),A=Math.max(A,e.right)}}),s.each(m.concat(v),function(t){if(t.getPadding){var e=t.getPadding();O=Math.max(O,e.top),F=Math.max(F,e.bottom)}});var E=d,z=p,H=f,W=g;s.each(m.concat(v),r),s.each(m,function(t){E+=t.width}),s.each(v,function(t){z+=t.width}),s.each(b.concat(_),r),s.each(b,function(t){H+=t.height}),s.each(_,function(t){W+=t.height}),s.each(m.concat(v),l),E=d,z=p,H=f,W=g,s.each(m,function(t){E+=t.width}),s.each(v,function(t){z+=t.width}),s.each(b,function(t){H+=t.height}),s.each(_,function(t){W+=t.height});var L=Math.max(P-E,0);E+=L,z+=Math.max(A-z,0);var N=Math.max(O-H,0);H+=N,W+=Math.max(F-W,0);var R=i-H-W,B=e-E-z;B===M&&R===T||(s.each(m,function(t){t.height=R}),s.each(v,function(t){t.height=R}),s.each(b,function(t){t.fullWidth||(t.width=B)}),s.each(_,function(t){t.fullWidth||(t.width=B)}),T=R,M=B);var V=d+L,U=f+N;s.each(m.concat(b),h),V+=M,U+=T,s.each(v,h),s.each(_,h),t.chartArea={left:E,top:H,right:E+M,bottom:H+T},s.each(y,function(e){
e.left=t.chartArea.left,e.top=t.chartArea.top,e.right=t.chartArea.right,e.bottom=t.chartArea.bottom,e.update(M,T)})}}}},{45:45}],31:[function(t,e,i){"use strict";var n=t(25),o=t(45);n._set("global",{plugins:{}}),e.exports={_plugins:[],_cacheId:0,register:function(t){var e=this._plugins;[].concat(t).forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),this._cacheId++},unregister:function(t){var e=this._plugins;[].concat(t).forEach(function(t){var i=e.indexOf(t);-1!==i&&e.splice(i,1)}),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e,i){var n,o,s,a,r,l=this.descriptors(t),h=l.length;for(n=0;n<h;++n)if(o=l[n],s=o.plugin,"function"==typeof(r=s[e])&&(a=[t].concat(i||[]),a.push(o.options),!1===r.apply(s,a)))return!1;return!0},descriptors:function(t){var e=t.$plugins||(t.$plugins={});if(e.id===this._cacheId)return e.descriptors;var i=[],s=[],a=t&&t.config||{},r=a.options&&a.options.plugins||{};return this._plugins.concat(a.plugins||[]).forEach(function(t){if(-1===i.indexOf(t)){var e=t.id,a=r[e];!1!==a&&(!0===a&&(a=o.clone(n.global.plugins[e])),i.push(t),s.push({plugin:t,options:a||{}}))}}),e.descriptors=s,e.id=this._cacheId,s},_invalidate:function(t){delete t.$plugins}}},{25:25,45:45}],32:[function(t,e,i){"use strict";function n(t){var e,i,n=[];for(e=0,i=t.length;e<i;++e)n.push(t[e].label);return n}function o(t,e,i){var n=t.getPixelForTick(e);return i&&(n-=0===e?(t.getPixelForTick(1)-n)/2:(n-t.getPixelForTick(e-1))/2),n}var s=t(25),a=t(26),r=t(45),l=t(34);s._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",lineHeight:1.2,padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:l.formatters.values,minor:{},major:{}}}),e.exports=function(t){function e(t,e,i){return r.isArray(e)?r.longestText(t,i,e):t.measureText(e).width}function i(t){var e=r.valueOrDefault,i=s.global,n=e(t.fontSize,i.defaultFontSize),o=e(t.fontStyle,i.defaultFontStyle),a=e(t.fontFamily,i.defaultFontFamily);return{size:n,style:o,family:a,font:r.fontString(n,o,a)}}function l(t){return r.options.toLineHeight(r.valueOrDefault(t.lineHeight,1.2),r.valueOrDefault(t.fontSize,s.global.defaultFontSize))}t.Scale=a.extend({getPadding:function(){var t=this;return{left:t.paddingLeft||0,top:t.paddingTop||0,right:t.paddingRight||0,bottom:t.paddingBottom||0}},getTicks:function(){return this._ticks},mergeTicksOptions:function(){var t=this.options.ticks;!1===t.minor&&(t.minor={display:!1}),!1===t.major&&(t.major={display:!1});for(var e in t)"major"!==e&&"minor"!==e&&(void 0===t.minor[e]&&(t.minor[e]=t[e]),void 0===t.major[e]&&(t.major[e]=t[e]))},beforeUpdate:function(){r.callback(this.options.beforeUpdate,[this])},update:function(t,e,i){var n,o,s,a,l,h,c=this;for(c.beforeUpdate(),c.maxWidth=t,c.maxHeight=e,c.margins=r.extend({left:0,right:0,top:0,bottom:0},i),c.longestTextCache=c.longestTextCache||{},c.beforeSetDimensions(),c.setDimensions(),c.afterSetDimensions(),c.beforeDataLimits(),c.determineDataLimits(),c.afterDataLimits(),c.beforeBuildTicks(),l=c.buildTicks()||[],c.afterBuildTicks(),c.beforeTickToLabelConversion(),s=c.convertTicksToLabels(l)||c.ticks,c.afterTickToLabelConversion(),c.ticks=s,n=0,o=s.length;n<o;++n)a=s[n],h=l[n],h?h.label=a:l.push(h={label:a,major:!1});return c._ticks=l,c.beforeCalculateTickRotation(),c.calculateTickRotation(),c.afterCalculateTickRotation(),c.beforeFit(),c.fit(),c.afterFit(),c.afterUpdate(),c.minSize},afterUpdate:function(){r.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){r.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0},afterSetDimensions:function(){r.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){r.callback(this.options.beforeDataLimits,[this])},determineDataLimits:r.noop,afterDataLimits:function(){r.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){r.callback(this.options.beforeBuildTicks,[this])},buildTicks:r.noop,afterBuildTicks:function(){r.callback(this.options.afterBuildTicks,[this])},beforeTickToLabelConversion:function(){r.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this,e=t.options.ticks;t.ticks=t.ticks.map(e.userCallback||e.callback,this)},afterTickToLabelConversion:function(){r.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){r.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t=this,e=t.ctx,o=t.options.ticks,s=n(t._ticks),a=i(o);e.font=a.font;var l=o.minRotation||0;if(s.length&&t.options.display&&t.isHorizontal())for(var h,c=r.longestText(e,a.font,s,t.longestTextCache),u=c,d=t.getPixelForTick(1)-t.getPixelForTick(0)-6;u>d&&l<o.maxRotation;){var p=r.toRadians(l);if(h=Math.cos(p),Math.sin(p)*c>t.maxHeight){l--;break}l++,u=h*c}t.labelRotation=l},afterCalculateTickRotation:function(){r.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){r.callback(this.options.beforeFit,[this])},fit:function(){var t=this,o=t.minSize={width:0,height:0},s=n(t._ticks),a=t.options,h=a.ticks,c=a.scaleLabel,u=a.gridLines,d=a.display,p=t.isHorizontal(),f=i(h),g=a.gridLines.tickMarkLength;if(o.width=p?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:d&&u.drawTicks?g:0,o.height=p?d&&u.drawTicks?g:0:t.maxHeight,c.display&&d){var m=l(c),v=r.options.toPadding(c.padding),b=m+v.height;p?o.height+=b:o.width+=b}if(h.display&&d){var _=r.longestText(t.ctx,f.font,s,t.longestTextCache),y=r.numberOfLabelLines(s),x=.5*f.size,w=t.options.ticks.padding;if(p){t.longestLabelWidth=_;var k=r.toRadians(t.labelRotation),C=Math.cos(k),D=Math.sin(k),S=D*_+f.size*y+x*(y-1)+x;o.height=Math.min(t.maxHeight,o.height+S+w),t.ctx.font=f.font;var M=e(t.ctx,s[0],f.font),T=e(t.ctx,s[s.length-1],f.font);0!==t.labelRotation?(t.paddingLeft="bottom"===a.position?C*M+3:C*x+3,t.paddingRight="bottom"===a.position?C*x+3:C*T+3):(t.paddingLeft=M/2+3,t.paddingRight=T/2+3)}else h.mirror?_=0:_+=w+x,o.width=Math.min(t.maxWidth,o.width+_),t.paddingTop=f.size/2,t.paddingBottom=f.size/2}t.handleMargins(),t.width=o.width,t.height=o.height},handleMargins:function(){var t=this;t.margins&&(t.paddingLeft=Math.max(t.paddingLeft-t.margins.left,0),t.paddingTop=Math.max(t.paddingTop-t.margins.top,0),t.paddingRight=Math.max(t.paddingRight-t.margins.right,0),t.paddingBottom=Math.max(t.paddingBottom-t.margins.bottom,0))},afterFit:function(){r.callback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(r.isNullOrUndef(t))return NaN;if("number"==typeof t&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},getLabelForIndex:r.noop,getPixelForValue:r.noop,getValueForPixel:r.noop,getPixelForTick:function(t){var e=this,i=e.options.offset;if(e.isHorizontal()){var n=e.width-(e.paddingLeft+e.paddingRight),o=n/Math.max(e._ticks.length-(i?0:1),1),s=o*t+e.paddingLeft;i&&(s+=o/2);var a=e.left+Math.round(s);return a+=e.isFullWidth()?e.margins.left:0}var r=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(r/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var i=e.width-(e.paddingLeft+e.paddingRight),n=i*t+e.paddingLeft,o=e.left+Math.round(n);return o+=e.isFullWidth()?e.margins.left:0}return e.top+t*e.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this,e=t.min,i=t.max;return t.beginAtZero?0:e<0&&i<0?i:e>0&&i>0?e:0},_autoSkip:function(t){var e,i,n,o,s,a=this,l=a.isHorizontal(),h=a.options.ticks.minor,c=t.length,u=r.toRadians(a.labelRotation),d=Math.cos(u),p=a.longestLabelWidth*d,f=[];for(h.maxTicksLimit&&(s=h.maxTicksLimit),l&&(e=!1,(p+h.autoSkipPadding)*c>a.width-(a.paddingLeft+a.paddingRight)&&(e=1+Math.floor((p+h.autoSkipPadding)*c/(a.width-(a.paddingLeft+a.paddingRight)))),s&&c>s&&(e=Math.max(e,Math.floor(c/s)))),i=0;i<c;i++)n=t[i],o=e>1&&i%e>0||i%e==0&&i+e>=c,o&&i!==c-1&&delete n.label,f.push(n);return f},draw:function(t){var e=this,n=e.options;if(n.display){var a=e.ctx,h=s.global,c=n.ticks.minor,u=n.ticks.major||c,d=n.gridLines,p=n.scaleLabel,f=0!==e.labelRotation,g=e.isHorizontal(),m=c.autoSkip?e._autoSkip(e.getTicks()):e.getTicks(),v=r.valueOrDefault(c.fontColor,h.defaultFontColor),b=i(c),_=r.valueOrDefault(u.fontColor,h.defaultFontColor),y=i(u),x=d.drawTicks?d.tickMarkLength:0,w=r.valueOrDefault(p.fontColor,h.defaultFontColor),k=i(p),C=r.options.toPadding(p.padding),D=r.toRadians(e.labelRotation),S=[],M=e.options.gridLines.lineWidth,T="right"===n.position?e.right:e.right-M-x,I="right"===n.position?e.right+x:e.right,P="bottom"===n.position?e.top+M:e.bottom-x-M,A="bottom"===n.position?e.top+M+x:e.bottom+M;if(r.each(m,function(i,s){if(!r.isNullOrUndef(i.label)){var a,l,u,p,v=i.label;s===e.zeroLineIndex&&n.offset===d.offsetGridLines?(a=d.zeroLineWidth,l=d.zeroLineColor,u=d.zeroLineBorderDash,p=d.zeroLineBorderDashOffset):(a=r.valueAtIndexOrDefault(d.lineWidth,s),l=r.valueAtIndexOrDefault(d.color,s),u=r.valueOrDefault(d.borderDash,h.borderDash),p=r.valueOrDefault(d.borderDashOffset,h.borderDashOffset));var b,_,y,w,k,C,O,F,E,z,H="middle",W="middle",L=c.padding;if(g){var N=x+L;"bottom"===n.position?(W=f?"middle":"top",H=f?"right":"center",z=e.top+N):(W=f?"middle":"bottom",H=f?"left":"center",z=e.bottom-N);var R=o(e,s,d.offsetGridLines&&m.length>1);R<e.left&&(l="rgba(0,0,0,0)"),R+=r.aliasPixel(a),E=e.getPixelForTick(s)+c.labelOffset,b=y=k=O=R,_=P,w=A,C=t.top,F=t.bottom+M}else{var B,V="left"===n.position;c.mirror?(H=V?"left":"right",B=L):(H=V?"right":"left",B=x+L),E=V?e.right-B:e.left+B;var U=o(e,s,d.offsetGridLines&&m.length>1);U<e.top&&(l="rgba(0,0,0,0)"),U+=r.aliasPixel(a),z=e.getPixelForTick(s)+c.labelOffset,b=T,y=I,k=t.left,O=t.right+M,_=w=C=F=U}S.push({tx1:b,ty1:_,tx2:y,ty2:w,x1:k,y1:C,x2:O,y2:F,labelX:E,labelY:z,glWidth:a,glColor:l,glBorderDash:u,glBorderDashOffset:p,rotation:-1*D,label:v,major:i.major,textBaseline:W,textAlign:H})}}),r.each(S,function(t){if(d.display&&(a.save(),a.lineWidth=t.glWidth,a.strokeStyle=t.glColor,a.setLineDash&&(a.setLineDash(t.glBorderDash),a.lineDashOffset=t.glBorderDashOffset),a.beginPath(),d.drawTicks&&(a.moveTo(t.tx1,t.ty1),a.lineTo(t.tx2,t.ty2)),d.drawOnChartArea&&(a.moveTo(t.x1,t.y1),a.lineTo(t.x2,t.y2)),a.stroke(),a.restore()),c.display){a.save(),a.translate(t.labelX,t.labelY),a.rotate(t.rotation),a.font=t.major?y.font:b.font,a.fillStyle=t.major?_:v,a.textBaseline=t.textBaseline,a.textAlign=t.textAlign;var i=t.label;if(r.isArray(i))for(var n=i.length,o=1.5*b.size,s=e.isHorizontal()?0:-o*(n-1)/2,l=0;l<n;++l)a.fillText(""+i[l],0,s),s+=o;else a.fillText(i,0,0);a.restore()}}),p.display){var O,F,E=0,z=l(p)/2;if(g)O=e.left+(e.right-e.left)/2,F="bottom"===n.position?e.bottom-z-C.bottom:e.top+z+C.top;else{var H="left"===n.position;O=H?e.left+z+C.top:e.right-z-C.top,F=e.top+(e.bottom-e.top)/2,E=H?-.5*Math.PI:.5*Math.PI}a.save(),a.translate(O,F),a.rotate(E),a.textAlign="center",a.textBaseline="middle",a.fillStyle=w,a.font=k.font,a.fillText(p.labelString,0,0),a.restore()}if(d.drawBorder){a.lineWidth=r.valueAtIndexOrDefault(d.lineWidth,0),a.strokeStyle=r.valueAtIndexOrDefault(d.color,0);var W=e.left,L=e.right+M,N=e.top,R=e.bottom+M,B=r.aliasPixel(a.lineWidth);g?(N=R="top"===n.position?e.bottom:e.top,N+=B,R+=B):(W=L="left"===n.position?e.right:e.left,W+=B,L+=B),a.beginPath(),a.moveTo(W,N),a.lineTo(L,R),a.stroke()}}}})}},{25:25,26:26,34:34,45:45}],33:[function(t,e,i){"use strict";var n=t(25),o=t(45),s=t(30);e.exports=function(t){t.scaleService={constructors:{},defaults:{},registerScaleType:function(t,e,i){this.constructors[t]=e,this.defaults[t]=o.clone(i)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(t){return this.defaults.hasOwnProperty(t)?o.merge({},[n.scale,this.defaults[t]]):{}},updateScaleDefaults:function(t,e){var i=this;i.defaults.hasOwnProperty(t)&&(i.defaults[t]=o.extend(i.defaults[t],e))},addScalesToLayout:function(t){o.each(t.scales,function(e){e.fullWidth=e.options.fullWidth,e.position=e.options.position,e.weight=e.options.weight,s.addBox(t,e)})}}}},{25:25,30:30,45:45}],34:[function(t,e,i){"use strict";var n=t(45);e.exports={formatters:{values:function(t){return n.isArray(t)?t:""+t},linear:function(t,e,i){var o=i.length>3?i[2]-i[1]:i[1]-i[0];Math.abs(o)>1&&t!==Math.floor(t)&&(o=t-Math.floor(t));var s=n.log10(Math.abs(o)),a="";if(0!==t){var r=-1*Math.floor(s);r=Math.max(Math.min(r,20),0),a=t.toFixed(r)}else a="0";return a},logarithmic:function(t,e,i){var o=t/Math.pow(10,Math.floor(n.log10(t)));return 0===t?"0":1===o||2===o||5===o||0===e||e===i.length-1?t.toExponential():""}}}},{45:45}],35:[function(t,e,i){"use strict";var n=t(25),o=t(26),s=t(45);n._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:s.noop,title:function(t,e){var i="",n=e.labels,o=n?n.length:0;if(t.length>0){var s=t[0];s.xLabel?i=s.xLabel:o>0&&s.index<o&&(i=n[s.index])}return i},afterTitle:s.noop,beforeBody:s.noop,beforeLabel:s.noop,label:function(t,e){var i=e.datasets[t.datasetIndex].label||"";return i&&(i+=": "),i+=t.yLabel},labelColor:function(t,e){var i=e.getDatasetMeta(t.datasetIndex),n=i.data[t.index],o=n._view;return{borderColor:o.borderColor,backgroundColor:o.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:s.noop,afterBody:s.noop,beforeFooter:s.noop,footer:s.noop,afterFooter:s.noop}}}),e.exports=function(t){function e(t,e){var i=s.color(t);return i.alpha(e*i.alpha()).rgbaString()}function i(t,e){return e&&(s.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function a(t){var e=t._xScale,i=t._yScale||t._scale,n=t._index,o=t._datasetIndex;return{xLabel:e?e.getLabelForIndex(n,o):"",yLabel:i?i.getLabelForIndex(n,o):"",index:n,datasetIndex:o,x:t._model.x,y:t._model.y}}function r(t){var e=n.global,i=s.valueOrDefault;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,bodyFontColor:t.bodyFontColor,_bodyFontFamily:i(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:i(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:i(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:i(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:i(t.titleFontStyle,e.defaultFontStyle),titleFontSize:i(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:i(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:i(t.footerFontStyle,e.defaultFontStyle),footerFontSize:i(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function l(t,e){var i=t._chart.ctx,n=2*e.yPadding,o=0,a=e.body,r=a.reduce(function(t,e){return t+e.before.length+e.lines.length+e.after.length},0);r+=e.beforeBody.length+e.afterBody.length;var l=e.title.length,h=e.footer.length,c=e.titleFontSize,u=e.bodyFontSize,d=e.footerFontSize;n+=l*c,n+=l?(l-1)*e.titleSpacing:0,n+=l?e.titleMarginBottom:0,n+=r*u,n+=r?(r-1)*e.bodySpacing:0,n+=h?e.footerMarginTop:0,n+=h*d,n+=h?(h-1)*e.footerSpacing:0;var p=0,f=function(t){o=Math.max(o,i.measureText(t).width+p)};return i.font=s.fontString(c,e._titleFontStyle,e._titleFontFamily),s.each(e.title,f),i.font=s.fontString(u,e._bodyFontStyle,e._bodyFontFamily),s.each(e.beforeBody.concat(e.afterBody),f),p=e.displayColors?u+2:0,s.each(a,function(t){s.each(t.before,f),s.each(t.lines,f),s.each(t.after,f)}),p=0,i.font=s.fontString(d,e._footerFontStyle,e._footerFontFamily),s.each(e.footer,f),o+=2*e.xPadding,{width:o,height:n}}function h(t,e){var i=t._model,n=t._chart,o=t._chart.chartArea,s="center",a="center";i.y<e.height?a="top":i.y>n.height-e.height&&(a="bottom");var r,l,h,c,u,d=(o.left+o.right)/2,p=(o.top+o.bottom)/2;"center"===a?(r=function(t){return t<=d},l=function(t){return t>d}):(r=function(t){return t<=e.width/2},l=function(t){return t>=n.width-e.width/2}),h=function(t){return t+e.width+i.caretSize+i.caretPadding>n.width},c=function(t){return t-e.width-i.caretSize-i.caretPadding<0},u=function(t){return t<=p?"top":"bottom"},r(i.x)?(s="left",h(i.x)&&(s="center",a=u(i.y))):l(i.x)&&(s="right",c(i.x)&&(s="center",a=u(i.y)));var f=t._options;return{xAlign:f.xAlign?f.xAlign:s,yAlign:f.yAlign?f.yAlign:a}}function c(t,e,i,n){var o=t.x,s=t.y,a=t.caretSize,r=t.caretPadding,l=t.cornerRadius,h=i.xAlign,c=i.yAlign,u=a+r,d=l+r;return"right"===h?o-=e.width:"center"===h&&(o-=e.width/2,o+e.width>n.width&&(o=n.width-e.width),o<0&&(o=0)),"top"===c?s+=u:s-="bottom"===c?e.height+u:e.height/2,"center"===c?"left"===h?o+=u:"right"===h&&(o-=u):"left"===h?o-=d:"right"===h&&(o+=d),{x:o,y:s}}t.Tooltip=o.extend({initialize:function(){this._model=r(this._options),this._lastActive=[]},getTitle:function(){var t=this,e=t._options,n=e.callbacks,o=n.beforeTitle.apply(t,arguments),s=n.title.apply(t,arguments),a=n.afterTitle.apply(t,arguments),r=[];return r=i(r,o),r=i(r,s),r=i(r,a)},getBeforeBody:function(){var t=this._options.callbacks.beforeBody.apply(this,arguments);return s.isArray(t)?t:void 0!==t?[t]:[]},getBody:function(t,e){var n=this,o=n._options.callbacks,a=[];return s.each(t,function(t){var s={before:[],lines:[],after:[]};i(s.before,o.beforeLabel.call(n,t,e)),i(s.lines,o.label.call(n,t,e)),i(s.after,o.afterLabel.call(n,t,e)),a.push(s)}),a},getAfterBody:function(){var t=this._options.callbacks.afterBody.apply(this,arguments);return s.isArray(t)?t:void 0!==t?[t]:[]},getFooter:function(){var t=this,e=t._options.callbacks,n=e.beforeFooter.apply(t,arguments),o=e.footer.apply(t,arguments),s=e.afterFooter.apply(t,arguments),a=[];return a=i(a,n),a=i(a,o),a=i(a,s)},update:function(e){var i,n,o=this,u=o._options,d=o._model,p=o._model=r(u),f=o._active,g=o._data,m={xAlign:d.xAlign,yAlign:d.yAlign},v={x:d.x,y:d.y},b={width:d.width,height:d.height},_={x:d.caretX,y:d.caretY};if(f.length){p.opacity=1;var y=[],x=[];_=t.Tooltip.positioners[u.position].call(o,f,o._eventPosition);var w=[];for(i=0,n=f.length;i<n;++i)w.push(a(f[i]));u.filter&&(w=w.filter(function(t){return u.filter(t,g)})),u.itemSort&&(w=w.sort(function(t,e){return u.itemSort(t,e,g)})),s.each(w,function(t){y.push(u.callbacks.labelColor.call(o,t,o._chart)),x.push(u.callbacks.labelTextColor.call(o,t,o._chart))}),p.title=o.getTitle(w,g),p.beforeBody=o.getBeforeBody(w,g),p.body=o.getBody(w,g),p.afterBody=o.getAfterBody(w,g),p.footer=o.getFooter(w,g),p.x=Math.round(_.x),p.y=Math.round(_.y),p.caretPadding=u.caretPadding,p.labelColors=y,p.labelTextColors=x,p.dataPoints=w,b=l(this,p),m=h(this,b),v=c(p,b,m,o._chart)}else p.opacity=0;return p.xAlign=m.xAlign,p.yAlign=m.yAlign,p.x=v.x,p.y=v.y,p.width=b.width,p.height=b.height,p.caretX=_.x,p.caretY=_.y,o._model=p,e&&u.custom&&u.custom.call(o,p),o},drawCaret:function(t,e){var i=this._chart.ctx,n=this._view,o=this.getCaretPosition(t,e,n);i.lineTo(o.x1,o.y1),i.lineTo(o.x2,o.y2),i.lineTo(o.x3,o.y3)},getCaretPosition:function(t,e,i){var n,o,s,a,r,l,h=i.caretSize,c=i.cornerRadius,u=i.xAlign,d=i.yAlign,p=t.x,f=t.y,g=e.width,m=e.height;if("center"===d)r=f+m/2,"left"===u?(n=p,o=n-h,s=n,a=r+h,l=r-h):(n=p+g,o=n+h,s=n,a=r-h,l=r+h);else if("left"===u?(o=p+c+h,n=o-h,s=o+h):"right"===u?(o=p+g-c-h,n=o-h,s=o+h):(o=i.caretX,n=o-h,s=o+h),"top"===d)a=f,r=a-h,l=a;else{a=f+m,r=a+h,l=a;var v=s;s=n,n=v}return{x1:n,x2:o,x3:s,y1:a,y2:r,y3:l}},drawTitle:function(t,i,n,o){var a=i.title;if(a.length){n.textAlign=i._titleAlign,n.textBaseline="top";var r=i.titleFontSize,l=i.titleSpacing;n.fillStyle=e(i.titleFontColor,o),n.font=s.fontString(r,i._titleFontStyle,i._titleFontFamily);var h,c;for(h=0,c=a.length;h<c;++h)n.fillText(a[h],t.x,t.y),t.y+=r+l,h+1===a.length&&(t.y+=i.titleMarginBottom-l)}},drawBody:function(t,i,n,o){var a=i.bodyFontSize,r=i.bodySpacing,l=i.body;n.textAlign=i._bodyAlign,n.textBaseline="top",n.font=s.fontString(a,i._bodyFontStyle,i._bodyFontFamily);var h=0,c=function(e){n.fillText(e,t.x+h,t.y),t.y+=a+r};n.fillStyle=e(i.bodyFontColor,o),s.each(i.beforeBody,c);var u=i.displayColors;h=u?a+2:0,s.each(l,function(r,l){var h=e(i.labelTextColors[l],o);n.fillStyle=h,s.each(r.before,c),s.each(r.lines,function(s){u&&(n.fillStyle=e(i.legendColorBackground,o),n.fillRect(t.x,t.y,a,a),n.lineWidth=1,n.strokeStyle=e(i.labelColors[l].borderColor,o),n.strokeRect(t.x,t.y,a,a),n.fillStyle=e(i.labelColors[l].backgroundColor,o),n.fillRect(t.x+1,t.y+1,a-2,a-2),n.fillStyle=h),c(s)}),s.each(r.after,c)}),h=0,s.each(i.afterBody,c),t.y-=r},drawFooter:function(t,i,n,o){var a=i.footer;a.length&&(t.y+=i.footerMarginTop,n.textAlign=i._footerAlign,n.textBaseline="top",n.fillStyle=e(i.footerFontColor,o),n.font=s.fontString(i.footerFontSize,i._footerFontStyle,i._footerFontFamily),s.each(a,function(e){n.fillText(e,t.x,t.y),t.y+=i.footerFontSize+i.footerSpacing}))},drawBackground:function(t,i,n,o,s){n.fillStyle=e(i.backgroundColor,s),n.strokeStyle=e(i.borderColor,s),n.lineWidth=i.borderWidth;var a=i.xAlign,r=i.yAlign,l=t.x,h=t.y,c=o.width,u=o.height,d=i.cornerRadius;n.beginPath(),n.moveTo(l+d,h),"top"===r&&this.drawCaret(t,o),n.lineTo(l+c-d,h),n.quadraticCurveTo(l+c,h,l+c,h+d),"center"===r&&"right"===a&&this.drawCaret(t,o),n.lineTo(l+c,h+u-d),n.quadraticCurveTo(l+c,h+u,l+c-d,h+u),"bottom"===r&&this.drawCaret(t,o),n.lineTo(l+d,h+u),n.quadraticCurveTo(l,h+u,l,h+u-d),"center"===r&&"left"===a&&this.drawCaret(t,o),n.lineTo(l,h+d),n.quadraticCurveTo(l,h,l+d,h),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var i={width:e.width,height:e.height},n={x:e.x,y:e.y},o=Math.abs(e.opacity<.001)?0:e.opacity,s=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&s&&(this.drawBackground(n,e,t,i,o),n.x+=e.xPadding,n.y+=e.yPadding,this.drawTitle(n,e,t,o),this.drawBody(n,e,t,o),this.drawFooter(n,e,t,o))}},handleEvent:function(t){var e=this,i=e._options,n=!1;return e._lastActive=e._lastActive||[],"mouseout"===t.type?e._active=[]:e._active=e._chart.getElementsAtEventForMode(t,i.mode,i),n=!s.arrayEquals(e._active,e._lastActive),n&&(e._lastActive=e._active,(i.enabled||i.custom)&&(e._eventPosition={x:t.x,y:t.y},e.update(!0),e.pivot())),n}}),t.Tooltip.positioners={average:function(t){if(!t.length)return!1;var e,i,n=0,o=0,s=0;for(e=0,i=t.length;e<i;++e){var a=t[e];if(a&&a.hasValue()){var r=a.tooltipPosition();n+=r.x,o+=r.y,++s}}return{x:Math.round(n/s),y:Math.round(o/s)}},nearest:function(t,e){var i,n,o,a=e.x,r=e.y,l=Number.POSITIVE_INFINITY;for(i=0,n=t.length;i<n;++i){var h=t[i];if(h&&h.hasValue()){var c=h.getCenterPoint(),u=s.distanceBetweenPoints(e,c);u<l&&(l=u,o=h)}}if(o){var d=o.tooltipPosition();a=d.x,r=d.y}return{x:a,y:r}}}}},{25:25,26:26,45:45}],36:[function(t,e,i){"use strict";var n=t(25),o=t(26),s=t(45);n._set("global",{elements:{arc:{backgroundColor:n.global.defaultColor,borderColor:"#fff",borderWidth:2}}}),e.exports=o.extend({inLabelRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hoverRadius,2)},inRange:function(t,e){var i=this._view;if(i){for(var n=s.getAngleFromPoint(i,{x:t,y:e}),o=n.angle,a=n.distance,r=i.startAngle,l=i.endAngle;l<r;)l+=2*Math.PI;for(;o>l;)o-=2*Math.PI;for(;o<r;)o+=2*Math.PI;var h=o>=r&&o<=l,c=a>=i.innerRadius&&a<=i.outerRadius;return h&&c}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,i=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,i=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},draw:function(){var t=this._chart.ctx,e=this._view,i=e.startAngle,n=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,i,n),t.arc(e.x,e.y,e.innerRadius,n,i,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})},{25:25,26:26,45:45}],37:[function(t,e,i){"use strict";var n=t(25),o=t(26),s=t(45),a=n.global;n._set("global",{elements:{line:{tension:.4,backgroundColor:a.defaultColor,borderWidth:3,borderColor:a.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}}),e.exports=o.extend({draw:function(){var t,e,i,n,o=this,r=o._view,l=o._chart.ctx,h=r.spanGaps,c=o._children.slice(),u=a.elements.line,d=-1;for(o._loop&&c.length&&c.push(c[0]),l.save(),l.lineCap=r.borderCapStyle||u.borderCapStyle,l.setLineDash&&l.setLineDash(r.borderDash||u.borderDash),l.lineDashOffset=r.borderDashOffset||u.borderDashOffset,l.lineJoin=r.borderJoinStyle||u.borderJoinStyle,l.lineWidth=r.borderWidth||u.borderWidth,l.strokeStyle=r.borderColor||a.defaultColor,l.beginPath(),d=-1,t=0;t<c.length;++t)e=c[t],i=s.previousItem(c,t),n=e._view,0===t?n.skip||(l.moveTo(n.x,n.y),d=t):(i=-1===d?i:c[d],n.skip||(d!==t-1&&!h||-1===d?l.moveTo(n.x,n.y):s.canvas.lineTo(l,i._view,e._view),d=t));l.stroke(),l.restore()}})},{25:25,26:26,45:45}],38:[function(t,e,i){"use strict";function n(t){var e=this._view;return!!e&&Math.abs(t-e.x)<e.radius+e.hitRadius}function o(t){var e=this._view;return!!e&&Math.abs(t-e.y)<e.radius+e.hitRadius}var s=t(25),a=t(26),r=t(45),l=s.global.defaultColor;s._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:l,borderColor:l,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}}),e.exports=a.extend({inRange:function(t,e){var i=this._view;return!!i&&Math.pow(t-i.x,2)+Math.pow(e-i.y,2)<Math.pow(i.hitRadius+i.radius,2)},inLabelRange:n,inXRange:n,inYRange:o,getCenterPoint:function(){var t=this._view;return{x:t.x,y:t.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y,padding:t.radius+t.borderWidth}},draw:function(t){var e=this._view,i=this._model,n=this._chart.ctx,o=e.pointStyle,a=e.radius,h=e.x,c=e.y,u=r.color,d=0;e.skip||(n.strokeStyle=e.borderColor||l,n.lineWidth=r.valueOrDefault(e.borderWidth,s.global.elements.point.borderWidth),n.fillStyle=e.backgroundColor||l,void 0!==t&&(i.x<t.left||1.01*t.right<i.x||i.y<t.top||1.01*t.bottom<i.y)&&(i.x<t.left?d=(h-i.x)/(t.left-i.x):1.01*t.right<i.x?d=(i.x-h)/(i.x-t.right):i.y<t.top?d=(c-i.y)/(t.top-i.y):1.01*t.bottom<i.y&&(d=(i.y-c)/(i.y-t.bottom)),d=Math.round(100*d)/100,n.strokeStyle=u(n.strokeStyle).alpha(d).rgbString(),n.fillStyle=u(n.fillStyle).alpha(d).rgbString()),r.canvas.drawPoint(n,o,a,h,c))}})},{25:25,26:26,45:45}],39:[function(t,e,i){"use strict";function n(t){return void 0!==t._view.width}function o(t){var e,i,o,s,a=t._view;if(n(t)){var r=a.width/2;e=a.x-r,i=a.x+r,o=Math.min(a.y,a.base),s=Math.max(a.y,a.base)}else{var l=a.height/2;e=Math.min(a.x,a.base),i=Math.max(a.x,a.base),o=a.y-l,s=a.y+l}return{left:e,top:o,right:i,bottom:s}}var s=t(25),a=t(26);s._set("global",{elements:{rectangle:{backgroundColor:s.global.defaultColor,borderColor:s.global.defaultColor,borderSkipped:"bottom",borderWidth:0}}}),e.exports=a.extend({draw:function(){function t(t){return v[(_+t)%4]}var e,i,n,o,s,a,r,l=this._chart.ctx,h=this._view,c=h.borderWidth;if(h.horizontal?(e=h.base,i=h.x,n=h.y-h.height/2,o=h.y+h.height/2,s=i>e?1:-1,a=1,r=h.borderSkipped||"left"):(e=h.x-h.width/2,i=h.x+h.width/2,n=h.y,o=h.base,s=1,a=o>n?1:-1,r=h.borderSkipped||"bottom"),c){var u=Math.min(Math.abs(e-i),Math.abs(n-o));c=c>u?u:c;var d=c/2,p=e+("left"!==r?d*s:0),f=i+("right"!==r?-d*s:0),g=n+("top"!==r?d*a:0),m=o+("bottom"!==r?-d*a:0);p!==f&&(n=g,o=m),g!==m&&(e=p,i=f)}l.beginPath(),l.fillStyle=h.backgroundColor,l.strokeStyle=h.borderColor,l.lineWidth=c;var v=[[e,o],[e,n],[i,n],[i,o]],b=["bottom","left","top","right"],_=b.indexOf(r,0);-1===_&&(_=0);var y=t(0);l.moveTo(y[0],y[1]);for(var x=1;x<4;x++)y=t(x),l.lineTo(y[0],y[1]);l.fill(),c&&l.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var i=!1;if(this._view){var n=o(this);i=t>=n.left&&t<=n.right&&e>=n.top&&e<=n.bottom}return i},inLabelRange:function(t,e){var i=this;if(!i._view)return!1;var s=o(i);return n(i)?t>=s.left&&t<=s.right:e>=s.top&&e<=s.bottom},inXRange:function(t){var e=o(this);return t>=e.left&&t<=e.right},inYRange:function(t){var e=o(this);return t>=e.top&&t<=e.bottom},getCenterPoint:function(){var t,e,i=this._view;return n(this)?(t=i.x,e=(i.y+i.base)/2):(t=(i.x+i.base)/2,e=i.y),{x:t,y:e}},getArea:function(){var t=this._view;return t.width*Math.abs(t.y-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}})},{25:25,26:26}],40:[function(t,e,i){"use strict";e.exports={},e.exports.Arc=t(36),e.exports.Line=t(37),e.exports.Point=t(38),e.exports.Rectangle=t(39)},{36:36,37:37,38:38,39:39}],41:[function(t,e,i){"use strict";var n=t(42),i=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,i,n,o,s){if(s){var a=Math.min(s,n/2),r=Math.min(s,o/2);t.moveTo(e+a,i),t.lineTo(e+n-a,i),t.quadraticCurveTo(e+n,i,e+n,i+r),t.lineTo(e+n,i+o-r),t.quadraticCurveTo(e+n,i+o,e+n-a,i+o),t.lineTo(e+a,i+o),t.quadraticCurveTo(e,i+o,e,i+o-r),t.lineTo(e,i+r),t.quadraticCurveTo(e,i,e+a,i)}else t.rect(e,i,n,o)},drawPoint:function(t,e,i,n,o){var s,a,r,l,h,c;if(e&&"object"==typeof e&&("[object HTMLImageElement]"===(s=e.toString())||"[object HTMLCanvasElement]"===s))return void t.drawImage(e,n-e.width/2,o-e.height/2,e.width,e.height);if(!(isNaN(i)||i<=0)){switch(e){default:t.beginPath(),t.arc(n,o,i,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),a=3*i/Math.sqrt(3),h=a*Math.sqrt(3)/2,t.moveTo(n-a/2,o+h/3),t.lineTo(n+a/2,o+h/3),t.lineTo(n,o-2*h/3),t.closePath(),t.fill();break;case"rect":c=1/Math.SQRT2*i,t.beginPath(),t.fillRect(n-c,o-c,2*c,2*c),t.strokeRect(n-c,o-c,2*c,2*c);break;case"rectRounded":var u=i/Math.SQRT2,d=n-u,p=o-u,f=Math.SQRT2*i;t.beginPath(),this.roundedRect(t,d,p,f,f,i/2),t.closePath(),t.fill();break;case"rectRot":c=1/Math.SQRT2*i,t.beginPath(),t.moveTo(n-c,o),t.lineTo(n,o+c),t.lineTo(n+c,o),t.lineTo(n,o-c),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(n,o+i),t.lineTo(n,o-i),t.moveTo(n-i,o),t.lineTo(n+i,o),t.closePath();break;case"crossRot":t.beginPath(),r=Math.cos(Math.PI/4)*i,l=Math.sin(Math.PI/4)*i,t.moveTo(n-r,o-l),t.lineTo(n+r,o+l),t.moveTo(n-r,o+l),t.lineTo(n+r,o-l),
t.closePath();break;case"star":t.beginPath(),t.moveTo(n,o+i),t.lineTo(n,o-i),t.moveTo(n-i,o),t.lineTo(n+i,o),r=Math.cos(Math.PI/4)*i,l=Math.sin(Math.PI/4)*i,t.moveTo(n-r,o-l),t.lineTo(n+r,o+l),t.moveTo(n-r,o+l),t.lineTo(n+r,o-l),t.closePath();break;case"line":t.beginPath(),t.moveTo(n-i,o),t.lineTo(n+i,o),t.closePath();break;case"dash":t.beginPath(),t.moveTo(n,o),t.lineTo(n+i,o),t.closePath()}t.stroke()}},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,i,n){return i.steppedLine?("after"===i.steppedLine&&!n||"after"!==i.steppedLine&&n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y),void t.lineTo(i.x,i.y)):i.tension?void t.bezierCurveTo(n?e.controlPointPreviousX:e.controlPointNextX,n?e.controlPointPreviousY:e.controlPointNextY,n?i.controlPointNextX:i.controlPointPreviousX,n?i.controlPointNextY:i.controlPointPreviousY,i.x,i.y):void t.lineTo(i.x,i.y)}};n.clear=i.clear,n.drawRoundedRectangle=function(t){t.beginPath(),i.roundedRect.apply(i,arguments),t.closePath()}},{42:42}],42:[function(t,e,i){"use strict";var n={noop:function(){},uid:function(){var t=0;return function(){return t++}}(),isNullOrUndef:function(t){return null===t||void 0===t},isArray:Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,i){return n.valueOrDefault(n.isArray(t)?t[e]:t,i)},callback:function(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)},each:function(t,e,i,o){var s,a,r;if(n.isArray(t))if(a=t.length,o)for(s=a-1;s>=0;s--)e.call(i,t[s],s);else for(s=0;s<a;s++)e.call(i,t[s],s);else if(n.isObject(t))for(r=Object.keys(t),a=r.length,s=0;s<a;s++)e.call(i,t[r[s]],r[s])},arrayEquals:function(t,e){var i,o,s,a;if(!t||!e||t.length!==e.length)return!1;for(i=0,o=t.length;i<o;++i)if(s=t[i],a=e[i],s instanceof Array&&a instanceof Array){if(!n.arrayEquals(s,a))return!1}else if(s!==a)return!1;return!0},clone:function(t){if(n.isArray(t))return t.map(n.clone);if(n.isObject(t)){for(var e={},i=Object.keys(t),o=i.length,s=0;s<o;++s)e[i[s]]=n.clone(t[i[s]]);return e}return t},_merger:function(t,e,i,o){var s=e[t],a=i[t];n.isObject(s)&&n.isObject(a)?n.merge(s,a,o):e[t]=n.clone(a)},_mergerIf:function(t,e,i){var o=e[t],s=i[t];n.isObject(o)&&n.isObject(s)?n.mergeIf(o,s):e.hasOwnProperty(t)||(e[t]=n.clone(s))},merge:function(t,e,i){var o,s,a,r,l,h=n.isArray(e)?e:[e],c=h.length;if(!n.isObject(t))return t;for(i=i||{},o=i.merger||n._merger,s=0;s<c;++s)if(e=h[s],n.isObject(e))for(a=Object.keys(e),l=0,r=a.length;l<r;++l)o(a[l],t,e,i);return t},mergeIf:function(t,e){return n.merge(t,e,{merger:n._mergerIf})},extend:function(t){for(var e=function(e,i){t[i]=e},i=1,o=arguments.length;i<o;++i)n.each(arguments[i],e);return t},inherits:function(t){var e=this,i=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},o=function(){this.constructor=i};return o.prototype=e.prototype,i.prototype=new o,i.extend=n.inherits,t&&n.extend(i.prototype,t),i.__super__=e.prototype,i}};e.exports=n,n.callCallback=n.callback,n.indexOf=function(t,e,i){return Array.prototype.indexOf.call(t,e,i)},n.getValueOrDefault=n.valueOrDefault,n.getValueAtIndexOrDefault=n.valueAtIndexOrDefault},{}],43:[function(t,e,i){"use strict";var n=t(42),o={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return(t-=1)*t*t+1},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-((t-=1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return(t-=1)*t*t*t*t+1},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return 1-Math.cos(t*(Math.PI/2))},easeOutSine:function(t){return Math.sin(t*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInExpo:function(t){return 0===t?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return 1===t?1:1-Math.pow(2,-10*t)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return t>=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1===t?1:(i||(i=.3),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i))},easeOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1===t?1:(i||(i=.3),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/i)+1)},easeInOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:2==(t/=.5)?1:(i||(i=.45),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),t<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-o.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*o.easeInBounce(2*t):.5*o.easeOutBounce(2*t-1)+.5}};e.exports={effects:o},n.easingEffects=o},{42:42}],44:[function(t,e,i){"use strict";var n=t(42);e.exports={toLineHeight:function(t,e){var i=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t},toPadding:function(t){var e,i,o,s;return n.isObject(t)?(e=+t.top||0,i=+t.right||0,o=+t.bottom||0,s=+t.left||0):e=i=o=s=+t||0,{top:e,right:i,bottom:o,left:s,height:e+o,width:s+i}},resolve:function(t,e,i){var o,s,a;for(o=0,s=t.length;o<s;++o)if(void 0!==(a=t[o])&&(void 0!==e&&"function"==typeof a&&(a=a(e)),void 0!==i&&n.isArray(a)&&(a=a[i]),void 0!==a))return a}}},{42:42}],45:[function(t,e,i){"use strict";e.exports=t(42),e.exports.easing=t(43),e.exports.canvas=t(41),e.exports.options=t(44)},{41:41,42:42,43:43,44:44}],46:[function(t,e,i){e.exports={acquireContext:function(t){return t&&t.canvas&&(t=t.canvas),t&&t.getContext("2d")||null}}},{}],47:[function(t,e,i){"use strict";function n(t,e){var i=m.getStyle(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?Number(n[1]):void 0}function o(t,e){var i=t.style,o=t.getAttribute("height"),s=t.getAttribute("width");if(t[v]={initial:{height:o,width:s,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",null===s||""===s){var a=n(t,"width");void 0!==a&&(t.width=a)}if(null===o||""===o)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var r=n(t,"height");void 0!==a&&(t.height=r)}return t}function s(t,e,i){t.addEventListener(e,i,C)}function a(t,e,i){t.removeEventListener(e,i,C)}function r(t,e,i,n,o){return{type:t,chart:e,native:o||null,x:void 0!==i?i:null,y:void 0!==n?n:null}}function l(t,e){var i=w[t.type]||t.type,n=m.getRelativePosition(t,e);return r(i,e,n.x,n.y,t)}function h(t,e){var i=!1,n=[];return function(){n=Array.prototype.slice.call(arguments),e=e||this,i||(i=!0,m.requestAnimFrame.call(window,function(){i=!1,t.apply(e,n)}))}}function c(t){var e=document.createElement("div"),i=b+"size-monitor",n="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1;";e.style.cssText=n,e.className=i,e.innerHTML='<div class="'+i+'-expand" style="'+n+'"><div style="position:absolute;width:1000000px;height:1000000px;left:0;top:0"></div></div><div class="'+i+'-shrink" style="'+n+'"><div style="position:absolute;width:200%;height:200%;left:0; top:0"></div></div>';var o=e.childNodes[0],a=e.childNodes[1];e._reset=function(){o.scrollLeft=1e6,o.scrollTop=1e6,a.scrollLeft=1e6,a.scrollTop=1e6};var r=function(){e._reset(),t()};return s(o,"scroll",r.bind(o,"expand")),s(a,"scroll",r.bind(a,"shrink")),e}function u(t,e){var i=t[v]||(t[v]={}),n=i.renderProxy=function(t){t.animationName===y&&e()};m.each(x,function(e){s(t,e,n)}),i.reflow=!!t.offsetParent,t.classList.add(_)}function d(t){var e=t[v]||{},i=e.renderProxy;i&&(m.each(x,function(e){a(t,e,i)}),delete e.renderProxy),t.classList.remove(_)}function p(t,e,i){var n=t[v]||(t[v]={}),o=n.resizer=c(h(function(){if(n.resizer)return e(r("resize",i))}));u(t,function(){if(n.resizer){var e=t.parentNode;e&&e!==o.parentNode&&e.insertBefore(o,e.firstChild),o._reset()}})}function f(t){var e=t[v]||{},i=e.resizer;delete e.resizer,d(t),i&&i.parentNode&&i.parentNode.removeChild(i)}function g(t,e){var i=t._style||document.createElement("style");t._style||(t._style=i,e="/* Chart.js */\n"+e,i.setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(i)),i.appendChild(document.createTextNode(e))}var m=t(45),v="$chartjs",b="chartjs-",_=b+"render-monitor",y=b+"render-animation",x=["animationstart","webkitAnimationStart"],w={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},k=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}(),C=!!k&&{passive:!0};e.exports={_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,initialize:function(){var t="from{opacity:0.99}to{opacity:1}";g(this,"@-webkit-keyframes "+y+"{"+t+"}@keyframes "+y+"{"+t+"}."+_+"{-webkit-animation:"+y+" 0.001s;animation:"+y+" 0.001s;}")},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(o(t,e),i):null},releaseContext:function(t){var e=t.canvas;if(e[v]){var i=e[v].initial;["height","width"].forEach(function(t){var n=i[t];m.isNullOrUndef(n)?e.removeAttribute(t):e.setAttribute(t,n)}),m.each(i.style||{},function(t,i){e.style[i]=t}),e.width=e.width,delete e[v]}},addEventListener:function(t,e,i){var n=t.canvas;if("resize"===e)return void p(n,i,t);var o=i[v]||(i[v]={});s(n,e,(o.proxies||(o.proxies={}))[t.id+"_"+e]=function(e){i(l(e,t))})},removeEventListener:function(t,e,i){var n=t.canvas;if("resize"===e)return void f(n);var o=i[v]||{},s=o.proxies||{},r=s[t.id+"_"+e];r&&a(n,e,r)}},m.addEvent=s,m.removeEvent=a},{45:45}],48:[function(t,e,i){"use strict";var n=t(45),o=t(46),s=t(47),a=s._enabled?s:o;e.exports=n.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},a)},{45:45,46:46,47:47}],49:[function(t,e,i){"use strict";e.exports={},e.exports.filler=t(50),e.exports.legend=t(51),e.exports.title=t(52)},{50:50,51:51,52:52}],50:[function(t,e,i){"use strict";function n(t,e,i){var n,o=t._model||{},s=o.fill;if(void 0===s&&(s=!!o.backgroundColor),!1===s||null===s)return!1;if(!0===s)return"origin";if(n=parseFloat(s,10),isFinite(n)&&Math.floor(n)===n)return"-"!==s[0]&&"+"!==s[0]||(n=e+n),!(n===e||n<0||n>=i)&&n;switch(s){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return s;default:return!1}}function o(t){var e,i=t.el._model||{},n=t.el._scale||{},o=t.fill,s=null;if(isFinite(o))return null;if("start"===o?s=void 0===i.scaleBottom?n.bottom:i.scaleBottom:"end"===o?s=void 0===i.scaleTop?n.top:i.scaleTop:void 0!==i.scaleZero?s=i.scaleZero:n.getBasePosition?s=n.getBasePosition():n.getBasePixel&&(s=n.getBasePixel()),void 0!==s&&null!==s){if(void 0!==s.x&&void 0!==s.y)return s;if("number"==typeof s&&isFinite(s))return e=n.isHorizontal(),{x:e?s:null,y:e?null:s}}return null}function s(t,e,i){var n,o=t[e],s=o.fill,a=[e];if(!i)return s;for(;!1!==s&&-1===a.indexOf(s);){if(!isFinite(s))return s;if(!(n=t[s]))return!1;if(n.visible)return s;a.push(s),s=n.fill}return!1}function a(t){var e=t.fill,i="dataset";return!1===e?null:(isFinite(e)||(i="boundary"),p[i](t))}function r(t){return t&&!t.skip}function l(t,e,i,n,o){var s;if(n&&o){for(t.moveTo(e[0].x,e[0].y),s=1;s<n;++s)d.canvas.lineTo(t,e[s-1],e[s]);for(t.lineTo(i[o-1].x,i[o-1].y),s=o-1;s>0;--s)d.canvas.lineTo(t,i[s],i[s-1],!0)}}function h(t,e,i,n,o,s){var a,h,c,u,d,p,f,g=e.length,m=n.spanGaps,v=[],b=[],_=0,y=0;for(t.beginPath(),a=0,h=g+!!s;a<h;++a)c=a%g,u=e[c]._view,d=i(u,c,n),p=r(u),f=r(d),p&&f?(_=v.push(u),y=b.push(d)):_&&y&&(m?(p&&v.push(u),f&&b.push(d)):(l(t,v,b,_,y),_=y=0,v=[],b=[]));l(t,v,b,_,y),t.closePath(),t.fillStyle=o,t.fill()}var c=t(25),u=t(40),d=t(45);c._set("global",{plugins:{filler:{propagate:!0}}});var p={dataset:function(t){var e=t.fill,i=t.chart,n=i.getDatasetMeta(e),o=n&&i.isDatasetVisible(e),s=o&&n.dataset._children||[],a=s.length||0;return a?function(t,e){return e<a&&s[e]._view||null}:null},boundary:function(t){var e=t.boundary,i=e?e.x:null,n=e?e.y:null;return function(t){return{x:null===i?t.x:i,y:null===n?t.y:n}}}};e.exports={id:"filler",afterDatasetsUpdate:function(t,e){var i,r,l,h,c=(t.data.datasets||[]).length,d=e.propagate,p=[];for(r=0;r<c;++r)i=t.getDatasetMeta(r),l=i.dataset,h=null,l&&l._model&&l instanceof u.Line&&(h={visible:t.isDatasetVisible(r),fill:n(l,r,c),chart:t,el:l}),i.$filler=h,p.push(h);for(r=0;r<c;++r)(h=p[r])&&(h.fill=s(p,r,d),h.boundary=o(h),h.mapper=a(h))},beforeDatasetDraw:function(t,e){var i=e.meta.$filler;if(i){var n=t.ctx,o=i.el,s=o._view,a=o._children||[],r=i.mapper,l=s.backgroundColor||c.global.defaultColor;r&&l&&a.length&&(d.canvas.clipArea(n,t.chartArea),h(n,a,r,s,l,o._loop),d.canvas.unclipArea(n))}}}},{25:25,40:40,45:45}],51:[function(t,e,i){"use strict";function n(t,e){return t.usePointStyle?e*Math.SQRT2:t.boxWidth}function o(t,e){var i=new c({ctx:t.ctx,options:e,chart:t});l.configure(t,i,e),l.addBox(t,i),t.legend=i}var s=t(25),a=t(26),r=t(45),l=t(30),h=r.noop;s._set("global",{legend:{display:!0,position:"top",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var i=e.datasetIndex,n=this.chart,o=n.getDatasetMeta(i);o.hidden=null===o.hidden?!n.data.datasets[i].hidden:null,n.update()},onHover:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data;return r.isArray(e.datasets)?e.datasets.map(function(e,i){return{text:e.label,fillStyle:r.isArray(e.backgroundColor)?e.backgroundColor[0]:e.backgroundColor,hidden:!t.isDatasetVisible(i),lineCap:e.borderCapStyle,lineDash:e.borderDash,lineDashOffset:e.borderDashOffset,lineJoin:e.borderJoinStyle,lineWidth:e.borderWidth,strokeStyle:e.borderColor,pointStyle:e.pointStyle,datasetIndex:i}},this):[]}}},legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');for(var i=0;i<t.data.datasets.length;i++)e.push('<li><span style="background-color:'+t.data.datasets[i].backgroundColor+'"></span>'),t.data.datasets[i].label&&e.push(t.data.datasets[i].label),e.push("</li>");return e.push("</ul>"),e.join("")}});var c=a.extend({initialize:function(t){r.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:h,update:function(t,e,i){var n=this;return n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n.margins=i,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:h,beforeSetDimensions:h,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:h,beforeBuildLabels:h,buildLabels:function(){var t=this,e=t.options.labels||{},i=r.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(i=i.filter(function(i){return e.filter(i,t.chart.data)})),t.options.reverse&&i.reverse(),t.legendItems=i},afterBuildLabels:h,beforeFit:h,fit:function(){var t=this,e=t.options,i=e.labels,o=e.display,a=t.ctx,l=s.global,h=r.valueOrDefault,c=h(i.fontSize,l.defaultFontSize),u=h(i.fontStyle,l.defaultFontStyle),d=h(i.fontFamily,l.defaultFontFamily),p=r.fontString(c,u,d),f=t.legendHitBoxes=[],g=t.minSize,m=t.isHorizontal();if(m?(g.width=t.maxWidth,g.height=o?10:0):(g.width=o?10:0,g.height=t.maxHeight),o)if(a.font=p,m){var v=t.lineWidths=[0],b=t.legendItems.length?c+i.padding:0;a.textAlign="left",a.textBaseline="top",r.each(t.legendItems,function(e,o){var s=n(i,c),r=s+c/2+a.measureText(e.text).width;v[v.length-1]+r+i.padding>=t.width&&(b+=c+i.padding,v[v.length]=t.left),f[o]={left:0,top:0,width:r,height:c},v[v.length-1]+=r+i.padding}),g.height+=b}else{var _=i.padding,y=t.columnWidths=[],x=i.padding,w=0,k=0,C=c+_;r.each(t.legendItems,function(t,e){var o=n(i,c),s=o+c/2+a.measureText(t.text).width;k+C>g.height&&(x+=w+i.padding,y.push(w),w=0,k=0),w=Math.max(w,s),k+=C,f[e]={left:0,top:0,width:s,height:c}}),x+=w,y.push(w),g.width+=x}t.width=g.width,t.height=g.height},afterFit:h,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,i=e.labels,o=s.global,a=o.elements.line,l=t.width,h=t.lineWidths;if(e.display){var c,u=t.ctx,d=r.valueOrDefault,p=d(i.fontColor,o.defaultFontColor),f=d(i.fontSize,o.defaultFontSize),g=d(i.fontStyle,o.defaultFontStyle),m=d(i.fontFamily,o.defaultFontFamily),v=r.fontString(f,g,m);u.textAlign="left",u.textBaseline="middle",u.lineWidth=.5,u.strokeStyle=p,u.fillStyle=p,u.font=v;var b=n(i,f),_=t.legendHitBoxes,y=function(t,i,n){if(!(isNaN(b)||b<=0)){u.save(),u.fillStyle=d(n.fillStyle,o.defaultColor),u.lineCap=d(n.lineCap,a.borderCapStyle),u.lineDashOffset=d(n.lineDashOffset,a.borderDashOffset),u.lineJoin=d(n.lineJoin,a.borderJoinStyle),u.lineWidth=d(n.lineWidth,a.borderWidth),u.strokeStyle=d(n.strokeStyle,o.defaultColor);var s=0===d(n.lineWidth,a.borderWidth);if(u.setLineDash&&u.setLineDash(d(n.lineDash,a.borderDash)),e.labels&&e.labels.usePointStyle){var l=f*Math.SQRT2/2,h=l/Math.SQRT2,c=t+h,p=i+h;r.canvas.drawPoint(u,n.pointStyle,l,c,p)}else s||u.strokeRect(t,i,b,f),u.fillRect(t,i,b,f);u.restore()}},x=function(t,e,i,n){var o=f/2,s=b+o+t,a=e+o;u.fillText(i.text,s,a),i.hidden&&(u.beginPath(),u.lineWidth=2,u.moveTo(s,a),u.lineTo(s+n,a),u.stroke())},w=t.isHorizontal();c=w?{x:t.left+(l-h[0])/2,y:t.top+i.padding,line:0}:{x:t.left+i.padding,y:t.top+i.padding,line:0};var k=f+i.padding;r.each(t.legendItems,function(e,n){var o=u.measureText(e.text).width,s=b+f/2+o,a=c.x,r=c.y;w?a+s>=l&&(r=c.y+=k,c.line++,a=c.x=t.left+(l-h[c.line])/2):r+k>t.bottom&&(a=c.x=a+t.columnWidths[c.line]+i.padding,r=c.y=t.top+i.padding,c.line++),y(a,r,e),_[n].left=a,_[n].top=r,x(a,r,e,o),w?c.x+=s+i.padding:c.y+=k})}},handleEvent:function(t){var e=this,i=e.options,n="mouseup"===t.type?"click":t.type,o=!1;if("mousemove"===n){if(!i.onHover)return}else{if("click"!==n)return;if(!i.onClick)return}var s=t.x,a=t.y;if(s>=e.left&&s<=e.right&&a>=e.top&&a<=e.bottom)for(var r=e.legendHitBoxes,l=0;l<r.length;++l){var h=r[l];if(s>=h.left&&s<=h.left+h.width&&a>=h.top&&a<=h.top+h.height){if("click"===n){i.onClick.call(e,t.native,e.legendItems[l]),o=!0;break}if("mousemove"===n){i.onHover.call(e,t.native,e.legendItems[l]),o=!0;break}}}return o}});e.exports={id:"legend",_element:c,beforeInit:function(t){var e=t.options.legend;e&&o(t,e)},beforeUpdate:function(t){var e=t.options.legend,i=t.legend;e?(r.mergeIf(e,s.global.legend),i?(l.configure(t,i,e),i.options=e):o(t,e)):i&&(l.removeBox(t,i),delete t.legend)},afterEvent:function(t,e){var i=t.legend;i&&i.handleEvent(e)}}},{25:25,26:26,30:30,45:45}],52:[function(t,e,i){"use strict";function n(t,e){var i=new h({ctx:t.ctx,options:e,chart:t});r.configure(t,i,e),r.addBox(t,i),t.titleBlock=i}var o=t(25),s=t(26),a=t(45),r=t(30),l=a.noop;o._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}});var h=s.extend({initialize:function(t){var e=this;a.extend(e,t),e.legendHitBoxes=[]},beforeUpdate:l,update:function(t,e,i){var n=this;return n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n.margins=i,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:l,beforeSetDimensions:l,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:l,beforeBuildLabels:l,buildLabels:l,afterBuildLabels:l,beforeFit:l,fit:function(){var t=this,e=a.valueOrDefault,i=t.options,n=i.display,s=e(i.fontSize,o.global.defaultFontSize),r=t.minSize,l=a.isArray(i.text)?i.text.length:1,h=a.options.toLineHeight(i.lineHeight,s),c=n?l*h+2*i.padding:0;t.isHorizontal()?(r.width=t.maxWidth,r.height=c):(r.width=c,r.height=t.maxHeight),t.width=r.width,t.height=r.height},afterFit:l,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,i=a.valueOrDefault,n=t.options,s=o.global;if(n.display){var r,l,h,c=i(n.fontSize,s.defaultFontSize),u=i(n.fontStyle,s.defaultFontStyle),d=i(n.fontFamily,s.defaultFontFamily),p=a.fontString(c,u,d),f=a.options.toLineHeight(n.lineHeight,c),g=f/2+n.padding,m=0,v=t.top,b=t.left,_=t.bottom,y=t.right;e.fillStyle=i(n.fontColor,s.defaultFontColor),e.font=p,t.isHorizontal()?(l=b+(y-b)/2,h=v+g,r=y-b):(l="left"===n.position?b+g:y-g,h=v+(_-v)/2,r=_-v,m=Math.PI*("left"===n.position?-.5:.5)),e.save(),e.translate(l,h),e.rotate(m),e.textAlign="center",e.textBaseline="middle";var x=n.text;if(a.isArray(x))for(var w=0,k=0;k<x.length;++k)e.fillText(x[k],0,w,r),w+=f;else e.fillText(x,0,0,r);e.restore()}}});e.exports={id:"title",_element:h,beforeInit:function(t){var e=t.options.title;e&&n(t,e)},beforeUpdate:function(t){var e=t.options.title,i=t.titleBlock;e?(a.mergeIf(e,o.global.title),i?(r.configure(t,i,e),i.options=e):n(t,e)):i&&(r.removeBox(t,i),delete t.titleBlock)}}},{25:25,26:26,30:30,45:45}],53:[function(t,e,i){"use strict";e.exports=function(t){var e={position:"bottom"},i=t.Scale.extend({getLabels:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels},determineDataLimits:function(){var t=this,e=t.getLabels();t.minIndex=0,t.maxIndex=e.length-1;var i;void 0!==t.options.ticks.min&&(i=e.indexOf(t.options.ticks.min),t.minIndex=-1!==i?i:t.minIndex),void 0!==t.options.ticks.max&&(i=e.indexOf(t.options.ticks.max),t.maxIndex=-1!==i?i:t.maxIndex),t.min=e[t.minIndex],t.max=e[t.maxIndex]},buildTicks:function(){var t=this,e=t.getLabels();t.ticks=0===t.minIndex&&t.maxIndex===e.length-1?e:e.slice(t.minIndex,t.maxIndex+1)},getLabelForIndex:function(t,e){var i=this,n=i.chart.data,o=i.isHorizontal();return n.yLabels&&!o?i.getRightValue(n.datasets[e].data[t]):i.ticks[t-i.minIndex]},getPixelForValue:function(t,e){var i,n=this,o=n.options.offset,s=Math.max(n.maxIndex+1-n.minIndex-(o?0:1),1);if(void 0!==t&&null!==t&&(i=n.isHorizontal()?t.x:t.y),void 0!==i||void 0!==t&&isNaN(e)){var a=n.getLabels();t=i||t;var r=a.indexOf(t);e=-1!==r?r:e}if(n.isHorizontal()){var l=n.width/s,h=l*(e-n.minIndex);return o&&(h+=l/2),n.left+Math.round(h)}var c=n.height/s,u=c*(e-n.minIndex);return o&&(u+=c/2),n.top+Math.round(u)},getPixelForTick:function(t){return this.getPixelForValue(this.ticks[t],t+this.minIndex,null)},getValueForPixel:function(t){var e=this,i=e.options.offset,n=Math.max(e._ticks.length-(i?0:1),1),o=e.isHorizontal(),s=(o?e.width:e.height)/n;return t-=o?e.left:e.top,i&&(t-=s/2),(t<=0?0:Math.round(t/s))+e.minIndex},getBasePixel:function(){return this.bottom}});t.scaleService.registerScaleType("category",i,e)}},{}],54:[function(t,e,i){"use strict";var n=t(25),o=t(45),s=t(34);e.exports=function(t){var e={position:"left",ticks:{callback:s.formatters.linear}},i=t.LinearScaleBase.extend({determineDataLimits:function(){function t(t){return r?t.xAxisID===e.id:t.yAxisID===e.id}var e=this,i=e.options,n=e.chart,s=n.data,a=s.datasets,r=e.isHorizontal();e.min=null,e.max=null;var l=i.stacked;if(void 0===l&&o.each(a,function(e,i){if(!l){var o=n.getDatasetMeta(i);n.isDatasetVisible(i)&&t(o)&&void 0!==o.stack&&(l=!0)}}),i.stacked||l){var h={};o.each(a,function(s,a){var r=n.getDatasetMeta(a),l=[r.type,void 0===i.stacked&&void 0===r.stack?a:"",r.stack].join(".");void 0===h[l]&&(h[l]={positiveValues:[],negativeValues:[]});var c=h[l].positiveValues,u=h[l].negativeValues;n.isDatasetVisible(a)&&t(r)&&o.each(s.data,function(t,n){var o=+e.getRightValue(t);isNaN(o)||r.data[n].hidden||(c[n]=c[n]||0,u[n]=u[n]||0,i.relativePoints?c[n]=100:o<0?u[n]+=o:c[n]+=o)})}),o.each(h,function(t){var i=t.positiveValues.concat(t.negativeValues),n=o.min(i),s=o.max(i);e.min=null===e.min?n:Math.min(e.min,n),e.max=null===e.max?s:Math.max(e.max,s)})}else o.each(a,function(i,s){var a=n.getDatasetMeta(s);n.isDatasetVisible(s)&&t(a)&&o.each(i.data,function(t,i){var n=+e.getRightValue(t);isNaN(n)||a.data[i].hidden||(null===e.min?e.min=n:n<e.min&&(e.min=n),null===e.max?e.max=n:n>e.max&&(e.max=n))})});e.min=isFinite(e.min)&&!isNaN(e.min)?e.min:0,e.max=isFinite(e.max)&&!isNaN(e.max)?e.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var t,e=this,i=e.options.ticks;if(e.isHorizontal())t=Math.min(i.maxTicksLimit?i.maxTicksLimit:11,Math.ceil(e.width/50));else{var s=o.valueOrDefault(i.fontSize,n.global.defaultFontSize);t=Math.min(i.maxTicksLimit?i.maxTicksLimit:11,Math.ceil(e.height/(2*s)))}return t},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e=this,i=e.start,n=+e.getRightValue(t),o=e.end-i;return e.isHorizontal()?e.left+e.width/o*(n-i):e.bottom-e.height/o*(n-i)},getValueForPixel:function(t){var e=this,i=e.isHorizontal(),n=i?e.width:e.height,o=(i?t-e.left:e.bottom-t)/n;return e.start+(e.end-e.start)*o},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",i,e)}},{25:25,34:34,45:45}],55:[function(t,e,i){"use strict";function n(t,e){var i,n=[];if(t.stepSize&&t.stepSize>0)i=t.stepSize;else{var s=o.niceNum(e.max-e.min,!1);i=o.niceNum(s/(t.maxTicks-1),!0)}var a=Math.floor(e.min/i)*i,r=Math.ceil(e.max/i)*i;t.min&&t.max&&t.stepSize&&o.almostWhole((t.max-t.min)/t.stepSize,i/1e3)&&(a=t.min,r=t.max);var l=(r-a)/i;l=o.almostEquals(l,Math.round(l),i/1e3)?Math.round(l):Math.ceil(l);var h=1;i<1&&(h=Math.pow(10,i.toString().length-2),a=Math.round(a*h)/h,r=Math.round(r*h)/h),n.push(void 0!==t.min?t.min:a);for(var c=1;c<l;++c)n.push(Math.round((a+c*i)*h)/h);return n.push(void 0!==t.max?t.max:r),n}var o=t(45);e.exports=function(t){var e=o.noop;t.LinearScaleBase=t.Scale.extend({getRightValue:function(e){return"string"==typeof e?+e:t.Scale.prototype.getRightValue.call(this,e)},handleTickRangeOptions:function(){var t=this,e=t.options,i=e.ticks;if(i.beginAtZero){var n=o.sign(t.min),s=o.sign(t.max);n<0&&s<0?t.max=0:n>0&&s>0&&(t.min=0)}var a=void 0!==i.min||void 0!==i.suggestedMin,r=void 0!==i.max||void 0!==i.suggestedMax;void 0!==i.min?t.min=i.min:void 0!==i.suggestedMin&&(null===t.min?t.min=i.suggestedMin:t.min=Math.min(t.min,i.suggestedMin)),void 0!==i.max?t.max=i.max:void 0!==i.suggestedMax&&(null===t.max?t.max=i.suggestedMax:t.max=Math.max(t.max,i.suggestedMax)),a!==r&&t.min>=t.max&&(a?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,i.beginAtZero||t.min--)},getTickLimit:e,handleDirectionalChanges:e,buildTicks:function(){var t=this,e=t.options,i=e.ticks,s=t.getTickLimit();s=Math.max(2,s);var a={maxTicks:s,min:i.min,max:i.max,stepSize:o.valueOrDefault(i.fixedStepSize,i.stepSize)},r=t.ticks=n(a,t);t.handleDirectionalChanges(),t.max=o.max(r),t.min=o.min(r),i.reverse?(r.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var e=this;e.ticksAsNumbers=e.ticks.slice(),e.zeroLineIndex=e.ticks.indexOf(0),t.Scale.prototype.convertTicksToLabels.call(e)}})}},{45:45}],56:[function(t,e,i){"use strict";function n(t,e){var i,n,s=[],a=o.valueOrDefault,r=a(t.min,Math.pow(10,Math.floor(o.log10(e.min)))),l=Math.floor(o.log10(e.max)),h=Math.ceil(e.max/Math.pow(10,l));0===r?(i=Math.floor(o.log10(e.minNotZero)),n=Math.floor(e.minNotZero/Math.pow(10,i)),s.push(r),r=n*Math.pow(10,i)):(i=Math.floor(o.log10(r)),n=Math.floor(r/Math.pow(10,i)));var c=i<0?Math.pow(10,Math.abs(i)):1;do{s.push(r),++n,10===n&&(n=1,++i,c=i>=0?1:c),r=Math.round(n*Math.pow(10,i)*c)/c}while(i<l||i===l&&n<h);var u=a(t.max,r);return s.push(u),s}var o=t(45),s=t(34);e.exports=function(t){var e={position:"left",ticks:{callback:s.formatters.logarithmic}},i=t.Scale.extend({determineDataLimits:function(){function t(t){return r?t.xAxisID===e.id:t.yAxisID===e.id}var e=this,i=e.options,n=e.chart,s=n.data,a=s.datasets,r=e.isHorizontal();e.min=null,e.max=null,e.minNotZero=null;var l=i.stacked;if(void 0===l&&o.each(a,function(e,i){if(!l){var o=n.getDatasetMeta(i);n.isDatasetVisible(i)&&t(o)&&void 0!==o.stack&&(l=!0)}}),i.stacked||l){var h={};o.each(a,function(s,a){var r=n.getDatasetMeta(a),l=[r.type,void 0===i.stacked&&void 0===r.stack?a:"",r.stack].join(".");n.isDatasetVisible(a)&&t(r)&&(void 0===h[l]&&(h[l]=[]),o.each(s.data,function(t,i){var n=h[l],o=+e.getRightValue(t);isNaN(o)||r.data[i].hidden||o<0||(n[i]=n[i]||0,n[i]+=o)}))}),o.each(h,function(t){if(t.length>0){var i=o.min(t),n=o.max(t);e.min=null===e.min?i:Math.min(e.min,i),e.max=null===e.max?n:Math.max(e.max,n)}})}else o.each(a,function(i,s){var a=n.getDatasetMeta(s);n.isDatasetVisible(s)&&t(a)&&o.each(i.data,function(t,i){var n=+e.getRightValue(t);isNaN(n)||a.data[i].hidden||n<0||(null===e.min?e.min=n:n<e.min&&(e.min=n),null===e.max?e.max=n:n>e.max&&(e.max=n),0!==n&&(null===e.minNotZero||n<e.minNotZero)&&(e.minNotZero=n))})});this.handleTickRangeOptions()},handleTickRangeOptions:function(){var t=this,e=t.options,i=e.ticks,n=o.valueOrDefault;t.min=n(i.min,t.min),t.max=n(i.max,t.max),t.min===t.max&&(0!==t.min&&null!==t.min?(t.min=Math.pow(10,Math.floor(o.log10(t.min))-1),t.max=Math.pow(10,Math.floor(o.log10(t.max))+1)):(t.min=1,t.max=10)),null===t.min&&(t.min=Math.pow(10,Math.floor(o.log10(t.max))-1)),null===t.max&&(t.max=0!==t.min?Math.pow(10,Math.floor(o.log10(t.min))+1):10),null===t.minNotZero&&(t.min>0?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(o.log10(t.max))):t.minNotZero=1)},buildTicks:function(){var t=this,e=t.options,i=e.ticks,s=!t.isHorizontal(),a={min:i.min,max:i.max},r=t.ticks=n(a,t);t.max=o.max(r),t.min=o.min(r),i.reverse?(s=!s,t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),s&&r.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),t.Scale.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){return this.getPixelForValue(this.tickValues[t])},_getFirstTickValue:function(t){var e=Math.floor(o.log10(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},getPixelForValue:function(e){var i,n,s,a,r,l=this,h=l.options.ticks.reverse,c=o.log10,u=l._getFirstTickValue(l.minNotZero),d=0;return e=+l.getRightValue(e),h?(s=l.end,a=l.start,r=-1):(s=l.start,a=l.end,r=1),l.isHorizontal()?(i=l.width,
n=h?l.right:l.left):(i=l.height,r*=-1,n=h?l.top:l.bottom),e!==s&&(0===s&&(d=o.getValueOrDefault(l.options.ticks.fontSize,t.defaults.global.defaultFontSize),i-=d,s=u),0!==e&&(d+=i/(c(a)-c(s))*(c(e)-c(s))),n+=r*d),n},getValueForPixel:function(e){var i,n,s,a,r=this,l=r.options.ticks.reverse,h=o.log10,c=r._getFirstTickValue(r.minNotZero);if(l?(n=r.end,s=r.start):(n=r.start,s=r.end),r.isHorizontal()?(i=r.width,a=l?r.right-e:e-r.left):(i=r.height,a=l?e-r.top:r.bottom-e),a!==n){if(0===n){var u=o.getValueOrDefault(r.options.ticks.fontSize,t.defaults.global.defaultFontSize);a-=u,i-=u,n=c}a*=h(s)-h(n),a/=i,a=Math.pow(10,h(n)+a)}return a}});t.scaleService.registerScaleType("logarithmic",i,e)}},{34:34,45:45}],57:[function(t,e,i){"use strict";var n=t(25),o=t(45),s=t(34);e.exports=function(t){function e(t){var e=t.options;return e.angleLines.display||e.pointLabels.display?t.chart.data.labels.length:0}function i(t){var e=t.options.pointLabels,i=o.valueOrDefault(e.fontSize,m.defaultFontSize),n=o.valueOrDefault(e.fontStyle,m.defaultFontStyle),s=o.valueOrDefault(e.fontFamily,m.defaultFontFamily);return{size:i,style:n,family:s,font:o.fontString(i,n,s)}}function a(t,e,i){return o.isArray(i)?{w:o.longestText(t,t.font,i),h:i.length*e+1.5*(i.length-1)*e}:{w:t.measureText(i).width,h:e}}function r(t,e,i,n,o){return t===n||t===o?{start:e-i/2,end:e+i/2}:t<n||t>o?{start:e-i-5,end:e}:{start:e,end:e+i+5}}function l(t){var n,s,l,h=i(t),c=Math.min(t.height/2,t.width/2),u={r:t.width,l:0,t:t.height,b:0},d={};t.ctx.font=h.font,t._pointLabelSizes=[];var p=e(t);for(n=0;n<p;n++){l=t.getPointPosition(n,c),s=a(t.ctx,h.size,t.pointLabels[n]||""),t._pointLabelSizes[n]=s;var f=t.getIndexAngle(n),g=o.toDegrees(f)%360,m=r(g,l.x,s.w,0,180),v=r(g,l.y,s.h,90,270);m.start<u.l&&(u.l=m.start,d.l=f),m.end>u.r&&(u.r=m.end,d.r=f),v.start<u.t&&(u.t=v.start,d.t=f),v.end>u.b&&(u.b=v.end,d.b=f)}t.setReductions(c,u,d)}function h(t){var e=Math.min(t.height/2,t.width/2);t.drawingArea=Math.round(e),t.setCenterPoint(0,0,0,0)}function c(t){return 0===t||180===t?"center":t<180?"left":"right"}function u(t,e,i,n){if(o.isArray(e))for(var s=i.y,a=1.5*n,r=0;r<e.length;++r)t.fillText(e[r],i.x,s),s+=a;else t.fillText(e,i.x,i.y)}function d(t,e,i){90===t||270===t?i.y-=e.h/2:(t>270||t<90)&&(i.y-=e.h)}function p(t){var n=t.ctx,s=t.options,a=s.angleLines,r=s.pointLabels;n.lineWidth=a.lineWidth,n.strokeStyle=a.color;var l=t.getDistanceFromCenterForValue(s.ticks.reverse?t.min:t.max),h=i(t);n.textBaseline="top";for(var p=e(t)-1;p>=0;p--){if(a.display){var f=t.getPointPosition(p,l);n.beginPath(),n.moveTo(t.xCenter,t.yCenter),n.lineTo(f.x,f.y),n.stroke(),n.closePath()}if(r.display){var g=t.getPointPosition(p,l+5),v=o.valueAtIndexOrDefault(r.fontColor,p,m.defaultFontColor);n.font=h.font,n.fillStyle=v;var b=t.getIndexAngle(p),_=o.toDegrees(b);n.textAlign=c(_),d(_,t._pointLabelSizes[p],g),u(n,t.pointLabels[p]||"",g,h.size)}}}function f(t,i,n,s){var a=t.ctx;if(a.strokeStyle=o.valueAtIndexOrDefault(i.color,s-1),a.lineWidth=o.valueAtIndexOrDefault(i.lineWidth,s-1),t.options.gridLines.circular)a.beginPath(),a.arc(t.xCenter,t.yCenter,n,0,2*Math.PI),a.closePath(),a.stroke();else{var r=e(t);if(0===r)return;a.beginPath();var l=t.getPointPosition(0,n);a.moveTo(l.x,l.y);for(var h=1;h<r;h++)l=t.getPointPosition(h,n),a.lineTo(l.x,l.y);a.closePath(),a.stroke()}}function g(t){return o.isNumber(t)?t:0}var m=n.global,v={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:s.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}},b=t.LinearScaleBase.extend({setDimensions:function(){var t=this,e=t.options,i=e.ticks;t.width=t.maxWidth,t.height=t.maxHeight,t.xCenter=Math.round(t.width/2),t.yCenter=Math.round(t.height/2);var n=o.min([t.height,t.width]),s=o.valueOrDefault(i.fontSize,m.defaultFontSize);t.drawingArea=e.display?n/2-(s/2+i.backdropPaddingY):n/2},determineDataLimits:function(){var t=this,e=t.chart,i=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;o.each(e.data.datasets,function(s,a){if(e.isDatasetVisible(a)){var r=e.getDatasetMeta(a);o.each(s.data,function(e,o){var s=+t.getRightValue(e);isNaN(s)||r.data[o].hidden||(i=Math.min(s,i),n=Math.max(s,n))})}}),t.min=i===Number.POSITIVE_INFINITY?0:i,t.max=n===Number.NEGATIVE_INFINITY?0:n,t.handleTickRangeOptions()},getTickLimit:function(){var t=this.options.ticks,e=o.valueOrDefault(t.fontSize,m.defaultFontSize);return Math.min(t.maxTicksLimit?t.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*e)))},convertTicksToLabels:function(){var e=this;t.LinearScaleBase.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map(e.options.pointLabels.callback,e)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){this.options.pointLabels.display?l(this):h(this)},setReductions:function(t,e,i){var n=this,o=e.l/Math.sin(i.l),s=Math.max(e.r-n.width,0)/Math.sin(i.r),a=-e.t/Math.cos(i.t),r=-Math.max(e.b-n.height,0)/Math.cos(i.b);o=g(o),s=g(s),a=g(a),r=g(r),n.drawingArea=Math.min(Math.round(t-(o+s)/2),Math.round(t-(a+r)/2)),n.setCenterPoint(o,s,a,r)},setCenterPoint:function(t,e,i,n){var o=this,s=o.width-e-o.drawingArea,a=t+o.drawingArea,r=i+o.drawingArea,l=o.height-n-o.drawingArea;o.xCenter=Math.round((a+s)/2+o.left),o.yCenter=Math.round((r+l)/2+o.top)},getIndexAngle:function(t){return t*(2*Math.PI/e(this))+(this.chart.options&&this.chart.options.startAngle?this.chart.options.startAngle:0)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(null===t)return 0;var i=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*i:(t-e.min)*i},getPointPosition:function(t,e){var i=this,n=i.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(n)*e)+i.xCenter,y:Math.round(Math.sin(n)*e)+i.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this,e=t.min,i=t.max;return t.getPointPositionForValue(0,t.beginAtZero?0:e<0&&i<0?i:e>0&&i>0?e:0)},draw:function(){var t=this,e=t.options,i=e.gridLines,n=e.ticks,s=o.valueOrDefault;if(e.display){var a=t.ctx,r=this.getIndexAngle(0),l=s(n.fontSize,m.defaultFontSize),h=s(n.fontStyle,m.defaultFontStyle),c=s(n.fontFamily,m.defaultFontFamily),u=o.fontString(l,h,c);o.each(t.ticks,function(e,o){if(o>0||n.reverse){var h=t.getDistanceFromCenterForValue(t.ticksAsNumbers[o]);if(i.display&&0!==o&&f(t,i,h,o),n.display){var c=s(n.fontColor,m.defaultFontColor);if(a.font=u,a.save(),a.translate(t.xCenter,t.yCenter),a.rotate(r),n.showLabelBackdrop){var d=a.measureText(e).width;a.fillStyle=n.backdropColor,a.fillRect(-d/2-n.backdropPaddingX,-h-l/2-n.backdropPaddingY,d+2*n.backdropPaddingX,l+2*n.backdropPaddingY)}a.textAlign="center",a.textBaseline="middle",a.fillStyle=c,a.fillText(e,0,-h),a.restore()}}}),(e.angleLines.display||e.pointLabels.display)&&p(t)}}});t.scaleService.registerScaleType("radialLinear",b,v)}},{25:25,34:34,45:45}],58:[function(t,e,i){"use strict";function n(t,e){return t-e}function o(t){var e,i,n,o={},s=[];for(e=0,i=t.length;e<i;++e)n=t[e],o[n]||(o[n]=!0,s.push(n));return s}function s(t,e,i,n){if("linear"===n||!t.length)return[{time:e,pos:0},{time:i,pos:1}];var o,s,a,r,l,h=[],c=[e];for(o=0,s=t.length;o<s;++o)(r=t[o])>e&&r<i&&c.push(r);for(c.push(i),o=0,s=c.length;o<s;++o)l=c[o+1],a=c[o-1],r=c[o],void 0!==a&&void 0!==l&&Math.round((l+a)/2)===r||h.push({time:r,pos:o/(s-1)});return h}function a(t,e,i){for(var n,o,s,a=0,r=t.length-1;a>=0&&a<=r;){if(n=a+r>>1,o=t[n-1]||null,s=t[n],!o)return{lo:null,hi:s};if(s[e]<i)a=n+1;else{if(!(o[e]>i))return{lo:o,hi:s};r=n-1}}return{lo:s,hi:null}}function r(t,e,i,n){var o=a(t,e,i),s=o.lo?o.hi?o.lo:t[t.length-2]:t[0],r=o.lo?o.hi?o.hi:t[t.length-1]:t[1],l=r[e]-s[e],h=l?(i-s[e])/l:0,c=(r[n]-s[n])*h;return s[n]+c}function l(t,e){var i=e.parser,n=e.parser||e.format;return"function"==typeof i?i(t):"string"==typeof t&&"string"==typeof n?b(t,n):(t instanceof b||(t=b(t)),t.isValid()?t:"function"==typeof n?n(t):t)}function h(t,e){if(y.isNullOrUndef(t))return null;var i=e.options.time,n=l(e.getRightValue(t),i);return n.isValid()?(i.round&&n.startOf(i.round),n.valueOf()):null}function c(t,e,i,n){var o,s,a,r=e-t,l=k[i],h=l.size,c=l.steps;if(!c)return Math.ceil(r/(n*h));for(o=0,s=c.length;o<s&&(a=c[o],!(Math.ceil(r/(h*a))<=n));++o);return a}function u(t,e,i,n){var o,s,a,r=C.length;for(o=C.indexOf(t);o<r-1;++o)if(s=k[C[o]],a=s.steps?s.steps[s.steps.length-1]:w,s.common&&Math.ceil((i-e)/(a*s.size))<=n)return C[o];return C[r-1]}function d(t,e,i,n){var o,s,a=b.duration(b(n).diff(b(i))),r=C.length;for(o=r-1;o>=C.indexOf(e);o--)if(s=C[o],k[s].common&&a.as(s)>=t.length)return s;return C[e?C.indexOf(e):0]}function p(t){for(var e=C.indexOf(t)+1,i=C.length;e<i;++e)if(k[C[e]].common)return C[e]}function f(t,e,i,n){var o,s=n.time,a=s.unit||u(s.minUnit,t,e,i),r=p(a),l=y.valueOrDefault(s.stepSize,s.unitStepSize),h="week"===a&&s.isoWeekday,d=n.ticks.major.enabled,f=k[a],g=b(t),m=b(e),v=[];for(l||(l=c(t,e,a,i)),h&&(g=g.isoWeekday(h),m=m.isoWeekday(h)),g=g.startOf(h?"day":a),m=m.startOf(h?"day":a),m<e&&m.add(1,a),o=b(g),d&&r&&!h&&!s.round&&(o.startOf(r),o.add(~~((g-o)/(f.size*l))*l,a));o<m;o.add(l,a))v.push(+o);return v.push(+o),v}function g(t,e,i,n,o){var s,a,l=0,h=0;return o.offset&&e.length&&(o.time.min||(s=e.length>1?e[1]:n,a=e[0],l=(r(t,"time",s,"pos")-r(t,"time",a,"pos"))/2),o.time.max||(s=e[e.length-1],a=e.length>1?e[e.length-2]:i,h=(r(t,"time",s,"pos")-r(t,"time",a,"pos"))/2)),{left:l,right:h}}function m(t,e){var i,n,o,s,a=[];for(i=0,n=t.length;i<n;++i)o=t[i],s=!!e&&o===+b(o).startOf(e),a.push({value:o,major:s});return a}function v(t,e){var i,n,o,s=t.length;for(i=0;i<s;i++){if(n=l(t[i],e),0!==n.millisecond())return"MMM D, YYYY h:mm:ss.SSS a";0===n.second()&&0===n.minute()&&0===n.hour()||(o=!0)}return o?"MMM D, YYYY h:mm:ss a":"MMM D, YYYY"}var b=t(1);b="function"==typeof b?b:window.moment;var _=t(25),y=t(45),x=Number.MIN_SAFE_INTEGER||-9007199254740991,w=Number.MAX_SAFE_INTEGER||9007199254740991,k={millisecond:{common:!0,size:1,steps:[1,2,5,10,20,50,100,250,500]},second:{common:!0,size:1e3,steps:[1,2,5,10,30]},minute:{common:!0,size:6e4,steps:[1,2,5,10,30]},hour:{common:!0,size:36e5,steps:[1,2,3,6,12]},day:{common:!0,size:864e5,steps:[1,2,5]},week:{common:!1,size:6048e5,steps:[1,2,3,4]},month:{common:!0,size:2628e6,steps:[1,2,3]},quarter:{common:!1,size:7884e6,steps:[1,2,3,4]},year:{common:!0,size:3154e7}},C=Object.keys(k);e.exports=function(t){var e={position:"bottom",distribution:"linear",bounds:"data",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}},i=t.Scale.extend({initialize:function(){if(!b)throw new Error("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com");this.mergeTicksOptions(),t.Scale.prototype.initialize.call(this)},update:function(){var e=this,i=e.options;return i.time&&i.time.format&&console.warn("options.time.format is deprecated and replaced by options.time.parser."),t.Scale.prototype.update.apply(e,arguments)},getRightValue:function(e){return e&&void 0!==e.t&&(e=e.t),t.Scale.prototype.getRightValue.call(this,e)},determineDataLimits:function(){var t,e,i,s,a,r,l=this,c=l.chart,u=l.options.time,d=u.unit||"day",p=w,f=x,g=[],m=[],v=[];for(t=0,i=c.data.labels.length;t<i;++t)v.push(h(c.data.labels[t],l));for(t=0,i=(c.data.datasets||[]).length;t<i;++t)if(c.isDatasetVisible(t))if(a=c.data.datasets[t].data,y.isObject(a[0]))for(m[t]=[],e=0,s=a.length;e<s;++e)r=h(a[e],l),g.push(r),m[t][e]=r;else g.push.apply(g,v),m[t]=v.slice(0);else m[t]=[];v.length&&(v=o(v).sort(n),p=Math.min(p,v[0]),f=Math.max(f,v[v.length-1])),g.length&&(g=o(g).sort(n),p=Math.min(p,g[0]),f=Math.max(f,g[g.length-1])),p=h(u.min,l)||p,f=h(u.max,l)||f,p=p===w?+b().startOf(d):p,f=f===x?+b().endOf(d)+1:f,l.min=Math.min(p,f),l.max=Math.max(p+1,f),l._horizontal=l.isHorizontal(),l._table=[],l._timestamps={data:g,datasets:m,labels:v}},buildTicks:function(){var t,e,i,n=this,o=n.min,a=n.max,r=n.options,l=r.time,c=[],u=[];switch(r.ticks.source){case"data":c=n._timestamps.data;break;case"labels":c=n._timestamps.labels;break;case"auto":default:c=f(o,a,n.getLabelCapacity(o),r)}for("ticks"===r.bounds&&c.length&&(o=c[0],a=c[c.length-1]),o=h(l.min,n)||o,a=h(l.max,n)||a,t=0,e=c.length;t<e;++t)(i=c[t])>=o&&i<=a&&u.push(i);return n.min=o,n.max=a,n._unit=l.unit||d(u,l.minUnit,n.min,n.max),n._majorUnit=p(n._unit),n._table=s(n._timestamps.data,o,a,r.distribution),n._offsets=g(n._table,u,o,a,r),n._labelFormat=v(n._timestamps.data,l),m(u,n._majorUnit)},getLabelForIndex:function(t,e){var i=this,n=i.chart.data,o=i.options.time,s=n.labels&&t<n.labels.length?n.labels[t]:"",a=n.datasets[e].data[t];return y.isObject(a)&&(s=i.getRightValue(a)),o.tooltipFormat?l(s,o).format(o.tooltipFormat):"string"==typeof s?s:l(s,o).format(i._labelFormat)},tickFormatFunction:function(t,e,i,n){var o=this,s=o.options,a=t.valueOf(),r=s.time.displayFormats,l=r[o._unit],h=o._majorUnit,c=r[h],u=t.clone().startOf(h).valueOf(),d=s.ticks.major,p=d.enabled&&h&&c&&a===u,f=t.format(n||(p?c:l)),g=p?d:s.ticks.minor,m=y.valueOrDefault(g.callback,g.userCallback);return m?m(f,e,i):f},convertTicksToLabels:function(t){var e,i,n=[];for(e=0,i=t.length;e<i;++e)n.push(this.tickFormatFunction(b(t[e].value),e,t));return n},getPixelForOffset:function(t){var e=this,i=e._horizontal?e.width:e.height,n=e._horizontal?e.left:e.top,o=r(e._table,"time",t,"pos");return n+i*(e._offsets.left+o)/(e._offsets.left+1+e._offsets.right)},getPixelForValue:function(t,e,i){var n=this,o=null;if(void 0!==e&&void 0!==i&&(o=n._timestamps.datasets[i][e]),null===o&&(o=h(t,n)),null!==o)return n.getPixelForOffset(o)},getPixelForTick:function(t){var e=this.getTicks();return t>=0&&t<e.length?this.getPixelForOffset(e[t].value):null},getValueForPixel:function(t){var e=this,i=e._horizontal?e.width:e.height,n=e._horizontal?e.left:e.top,o=(i?(t-n)/i:0)*(e._offsets.left+1+e._offsets.left)-e._offsets.right,s=r(e._table,"pos",o,"time");return b(s)},getLabelWidth:function(t){var e=this,i=e.options.ticks,n=e.ctx.measureText(t).width,o=y.toRadians(i.maxRotation),s=Math.cos(o),a=Math.sin(o);return n*s+y.valueOrDefault(i.fontSize,_.global.defaultFontSize)*a},getLabelCapacity:function(t){var e=this,i=e.options.time.displayFormats.millisecond,n=e.tickFormatFunction(b(t),0,[],i),o=e.getLabelWidth(n),s=e.isHorizontal()?e.width:e.height,a=Math.floor(s/o);return a>0?a:1}});t.scaleService.registerScaleType("time",i,e)}},{1:1,25:25,45:45}]},{},[7])(7)}),function(t,e){"function"==typeof define&&define.amd?define([],function(){return t.SignaturePad=e()}):"object"==typeof exports?module.exports=e():t.SignaturePad=e()}(this,function(){return function(t){"use strict";var e=function(t,e){var i=this,n=e||{};this.velocityFilterWeight=n.velocityFilterWeight||.7,this.minWidth=n.minWidth||.5,this.maxWidth=n.maxWidth||2.5,this.dotSize=n.dotSize||function(){return(this.minWidth+this.maxWidth)/2},this.penColor=n.penColor||"black",this.backgroundColor=n.backgroundColor||"rgba(0,0,0,0)",this.onEnd=n.onEnd,this.onBegin=n.onBegin,this._canvas=t,this._ctx=t.getContext("2d"),this.clear(),this._handleMouseDown=function(t){1===t.which&&(i._mouseButtonDown=!0,i._strokeBegin(t))},this._handleMouseMove=function(t){i._mouseButtonDown&&i._strokeUpdate(t)},this._handleMouseUp=function(t){1===t.which&&i._mouseButtonDown&&(i._mouseButtonDown=!1,i._strokeEnd(t))},this._handleTouchStart=function(t){if(1==t.targetTouches.length){var e=t.changedTouches[0];i._strokeBegin(e)}},this._handleTouchMove=function(t){t.preventDefault();var e=t.targetTouches[0];i._strokeUpdate(e)},this._handleTouchEnd=function(t){t.target===i._canvas&&(t.preventDefault(),i._strokeEnd(t))},this._handleMouseEvents(),this._handleTouchEvents()};e.prototype.clear=function(){var t=this._ctx,e=this._canvas;t.fillStyle=this.backgroundColor,t.clearRect(0,0,e.width,e.height),t.fillRect(0,0,e.width,e.height),this._reset()},e.prototype.toDataURL=function(t,e){var i=this._canvas;return i.toDataURL.apply(i,arguments)},e.prototype.fromDataURL=function(t){var e=this,i=new Image,n=window.devicePixelRatio||1,o=this._canvas.width/n,s=this._canvas.height/n;this._reset(),i.src=t,i.onload=function(){e._ctx.drawImage(i,0,0,o,s)},this._isEmpty=!1},e.prototype._strokeUpdate=function(t){var e=this._createPoint(t);this._addPoint(e)},e.prototype._strokeBegin=function(t){this._reset(),this._strokeUpdate(t),"function"==typeof this.onBegin&&this.onBegin(t)},e.prototype._strokeDraw=function(t){var e=this._ctx,i="function"==typeof this.dotSize?this.dotSize():this.dotSize;e.beginPath(),this._drawPoint(t.x,t.y,i),e.closePath(),e.fill()},e.prototype._strokeEnd=function(t){var e=this.points.length>2,i=this.points[0];!e&&i&&this._strokeDraw(i),"function"==typeof this.onEnd&&this.onEnd(t)},e.prototype._handleMouseEvents=function(){this._mouseButtonDown=!1,this._canvas.addEventListener("mousedown",this._handleMouseDown),this._canvas.addEventListener("mousemove",this._handleMouseMove),t.addEventListener("mouseup",this._handleMouseUp)},e.prototype._handleTouchEvents=function(){this._canvas.style.msTouchAction="none",this._canvas.style.touchAction="none",this._canvas.addEventListener("touchstart",this._handleTouchStart),this._canvas.addEventListener("touchmove",this._handleTouchMove),this._canvas.addEventListener("touchend",this._handleTouchEnd)},e.prototype.on=function(){this._handleMouseEvents(),this._handleTouchEvents()},e.prototype.off=function(){this._canvas.removeEventListener("mousedown",this._handleMouseDown),this._canvas.removeEventListener("mousemove",this._handleMouseMove),t.removeEventListener("mouseup",this._handleMouseUp),this._canvas.removeEventListener("touchstart",this._handleTouchStart),this._canvas.removeEventListener("touchmove",this._handleTouchMove),this._canvas.removeEventListener("touchend",this._handleTouchEnd)},e.prototype.isEmpty=function(){return this._isEmpty},e.prototype._reset=function(){this.points=[],this._lastVelocity=0,this._lastWidth=(this.minWidth+this.maxWidth)/2,this._isEmpty=!0,this._ctx.fillStyle=this.penColor},e.prototype._createPoint=function(t){var e=this._canvas.getBoundingClientRect();return new i(t.clientX-e.left,t.clientY-e.top)},e.prototype._addPoint=function(t){var e,i,o,s,a=this.points;a.push(t),a.length>2&&(3===a.length&&a.unshift(a[0]),s=this._calculateCurveControlPoints(a[0],a[1],a[2]),e=s.c2,s=this._calculateCurveControlPoints(a[1],a[2],a[3]),i=s.c1,o=new n(a[1],e,i,a[2]),this._addCurve(o),a.shift())},e.prototype._calculateCurveControlPoints=function(t,e,n){var o=t.x-e.x,s=t.y-e.y,a=e.x-n.x,r=e.y-n.y,l={x:(t.x+e.x)/2,y:(t.y+e.y)/2},h={x:(e.x+n.x)/2,y:(e.y+n.y)/2},c=Math.sqrt(o*o+s*s),u=Math.sqrt(a*a+r*r),d=l.x-h.x,p=l.y-h.y,f=u/(c+u),g={x:h.x+d*f,y:h.y+p*f},m=e.x-g.x,v=e.y-g.y;return{c1:new i(l.x+m,l.y+v),c2:new i(h.x+m,h.y+v)}},e.prototype._addCurve=function(t){var e,i,n=t.startPoint,o=t.endPoint;e=o.velocityFrom(n),e=this.velocityFilterWeight*e+(1-this.velocityFilterWeight)*this._lastVelocity,i=this._strokeWidth(e),this._drawCurve(t,this._lastWidth,i),this._lastVelocity=e,this._lastWidth=i},e.prototype._drawPoint=function(t,e,i){var n=this._ctx;n.moveTo(t,e),n.arc(t,e,i,0,2*Math.PI,!1),this._isEmpty=!1},e.prototype._drawCurve=function(t,e,i){var n,o,s,a,r,l,h,c,u,d,p,f=this._ctx,g=i-e;for(n=Math.floor(t.length()),f.beginPath(),s=0;s<n;s++)a=s/n,r=a*a,l=r*a,h=1-a,c=h*h,u=c*h,d=u*t.startPoint.x,d+=3*c*a*t.control1.x,d+=3*h*r*t.control2.x,d+=l*t.endPoint.x,p=u*t.startPoint.y,p+=3*c*a*t.control1.y,p+=3*h*r*t.control2.y,p+=l*t.endPoint.y,o=e+l*g,this._drawPoint(d,p,o);f.closePath(),f.fill()},e.prototype._strokeWidth=function(t){return Math.max(this.maxWidth/(t+1),this.minWidth)};var i=function(t,e,i){this.x=t,this.y=e,this.time=i||(new Date).getTime()};i.prototype.velocityFrom=function(t){return this.time!==t.time?this.distanceTo(t)/(this.time-t.time):1},i.prototype.distanceTo=function(t){return Math.sqrt(Math.pow(this.x-t.x,2)+Math.pow(this.y-t.y,2))};var n=function(t,e,i,n){this.startPoint=t,this.control1=e,this.control2=i,this.endPoint=n};return n.prototype.length=function(){var t,e,i,n,o,s,a,r,l=0;for(t=0;t<=10;t++)e=t/10,i=this._point(e,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),n=this._point(e,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y),t>0&&(a=i-o,r=n-s,l+=Math.sqrt(a*a+r*r)),o=i,s=n;return l},n.prototype._point=function(t,e,i,n,o){return e*(1-t)*(1-t)*(1-t)+3*i*(1-t)*(1-t)*t+3*n*(1-t)*t*t+o*t*t*t},e}(document)});