if("undefined"==typeof jQuery)throw new Error("AdminLTE requires jQuery");+function(t){"use strict";function e(e){return this.each(function(){var s=t(this),a=s.data(i);if(!a){var r=t.extend({},n,s.data(),"object"==typeof e&&e);s.data(i,a=new o(s,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:'
',onLoadStart:function(){},onLoadDone:function(t){return t}},s={data:'[data-widget="box-refresh"]'},o=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()};o.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)},o.prototype._setUpListeners=function(){t(this.element).on("click",s.trigger,function(t){t&&t.preventDefault(),this.load()}.bind(this))},o.prototype._addOverlay=function(){t(this.element).append(this.$overlay)},o.prototype._removeOverlay=function(){t(this.element).remove(this.$overlay)};var a=t.fn.boxRefresh;t.fn.boxRefresh=e,t.fn.boxRefresh.Constructor=o,t.fn.boxRefresh.noConflict=function(){return t.fn.boxRefresh=a,this},t(window).on("load",function(){t(s.data).each(function(){e.call(t(this))})})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var s=t(this),o=s.data(i);if(!o){var a=t.extend({},n,s.data(),"object"==typeof e&&e);s.data(i,o=new r(s,a))}if("string"==typeof e){if(void 0===o[e])throw new Error("No method named "+e);o[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"},s={data:".box",collapsed:".collapsed-box",header:".box-header",body:".box-body",footer:".box-footer",tools:".box-tools"},o={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(s.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(o.collapsed),t(this.element).children(s.header+", "+s.body+", "+s.footer).children(s.tools).find("."+n).removeClass(n).addClass(i),t(this.element).children(s.body+", "+s.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(s.header+", "+s.body+", "+s.footer).children(s.tools).find("."+i).removeClass(i).addClass(n),t(this.element).children(s.body+", "+s.footer).slideUp(this.options.animationSpeed,function(){t(this.element).addClass(o.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(s.data).each(function(){e.call(t(this))})})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var s=t(this),o=s.data(i);if(!o){var a=t.extend({},n,s.data(),"object"==typeof e&&e);s.data(i,o=new r(s,a))}"string"==typeof e&&o.toggle()})}var i="lte.controlsidebar",n={slide:!0},s={sidebar:".control-sidebar",data:'[data-toggle="control-sidebar"]',open:".control-sidebar-open",bg:".control-sidebar-bg",wrapper:".wrapper",content:".content-wrapper",boxed:".layout-boxed"},o={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(s.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(s.sidebar).is(s.open)||t("body").is(s.open)?this.collapse():this.expand()},r.prototype.expand=function(){this.options.slide?t(s.sidebar).addClass(o.open):t("body").addClass(o.open),t(this.element).trigger(t.Event(a.expanded))},r.prototype.collapse=function(){t("body, "+s.sidebar).removeClass(o.open),t(this.element).trigger(t.Event(a.collapsed))},r.prototype.fix=function(){t("body").is(s.boxed)&&this._fixForBoxed(t(s.bg))},r.prototype._fixForBoxed=function(e){e.css({position:"absolute",height:t(s.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",s.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),s=n.data(i);s||n.data(i,s=new o(n)),"string"==typeof e&&s.toggle(n)})}var i="lte.directchat",n={data:'[data-widget="chat-pane-toggle"]',box:".direct-chat"},s={open:"direct-chat-contacts-open"},o=function(t){this.element=t};o.prototype.toggle=function(t){t.parents(n.box).first().toggleClass(s.open)};var a=t.fn.directChat;t.fn.directChat=e,t.fn.directChat.Constructor=o,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 s=t(this),o=s.data(i);if(!o){var r=t.extend({},n,s.data(),"object"==typeof e&&e);s.data(i,o=new a(r))}if("string"==typeof e){if(void 0===o[e])throw new Error("No method named "+e);o[e]()}})}var i="lte.layout",n={slimscroll:!0,resetHeight:!0},s={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"},o={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(o.holdTransition),this.options.resetHeight&&t("body, html, "+s.wrapper).css({height:"auto","min-height":"100%"}),this.bindedResize||(t(window).resize(function(){this.fix(),this.fixSidebar(),t(s.logo+", "+s.sidebar).one("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend",function(){this.fix(),this.fixSidebar()}.bind(this))}.bind(this)),this.bindedResize=!0),t(s.sidebarMenu).on("expanded.tree",function(){this.fix(),this.fixSidebar()}.bind(this)),t(s.sidebarMenu).on("collapsed.tree",function(){this.fix(),this.fixSidebar()}.bind(this))},a.prototype.fix=function(){t(s.layoutBoxed+" > "+s.wrapper).css("overflow","hidden");var e=t(s.mainFooter).outerHeight()||0,i=t(s.mainHeader).outerHeight()||0,n=i+e,a=t(window).height(),r=t(s.sidebar).height()||0;if(t("body").hasClass(o.fixed))t(s.contentWrapper).css("min-height",a-e);else{var l;a>=r?(t(s.contentWrapper).css("min-height",a-n),l=a-n):(t(s.contentWrapper).css("min-height",r),l=r);var h=t(s.controlSidebar);void 0!==h&&h.height()>l&&t(s.contentWrapper).css("min-height",h.height())}},a.prototype.fixSidebar=function(){if(!t("body").hasClass(o.fixed))return void(void 0!==t.fn.slimScroll&&t(s.sidebar).slimScroll({destroy:!0}).height("auto"));this.options.slimscroll&&void 0!==t.fn.slimScroll&&t(s.sidebar).slimScroll({height:t(window).height()-t(s.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 s=t(this),o=s.data(i);if(!o){var a=t.extend({},n,s.data(),"object"==typeof e&&e);s.data(i,o=new r(a))}"toggle"===e&&o.toggle()})}var i="lte.pushmenu",n={collapseScreenSize:767,expandOnHover:!1,expandTransitionDelay:200},s={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"},o={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(s.mini+s.layoutFixed))&&(this.expandOnHover(),t("body").addClass(o.expandFeature)),t(s.contentWrapper).click(function(){t(window).width()<=this.options.collapseScreenSize&&t("body").hasClass(o.open)&&this.close()}.bind(this)),t(s.searchInput).click(function(t){t.stopPropagation()})},r.prototype.toggle=function(){var e=t(window).width(),i=!t("body").hasClass(o.collapsed);e<=this.options.collapseScreenSize&&(i=t("body").hasClass(o.open)),i?this.close():this.open()},r.prototype.open=function(){t(window).width()>this.options.collapseScreenSize?t("body").removeClass(o.collapsed).trigger(t.Event(a.expanded)):t("body").addClass(o.open).trigger(t.Event(a.expanded))},r.prototype.close=function(){t(window).width()>this.options.collapseScreenSize?t("body").addClass(o.collapsed).trigger(t.Event(a.collapsed)):t("body").removeClass(o.open+" "+o.collapsed).trigger(t.Event(a.collapsed))},r.prototype.expandOnHover=function(){t(s.mainSidebar).hover(function(){t("body").is(s.mini+s.collapsed)&&t(window).width()>this.options.collapseScreenSize&&this.expand()}.bind(this),function(){t("body").is(s.expanded)&&this.collapse()}.bind(this))},r.prototype.expand=function(){setTimeout(function(){t("body").removeClass(o.collapsed).addClass(o.expanded)},this.options.expandTransitionDelay)},r.prototype.collapse=function(){setTimeout(function(){t("body").removeClass(o.expanded).addClass(o.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",s.button,function(i){i.preventDefault(),e.call(t(this),"toggle")}),t(window).on("load",function(){e.call(t(s.button))})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var s=t(this),o=s.data(i);if(!o){var r=t.extend({},n,s.data(),"object"==typeof e&&e);s.data(i,o=new a(s,r))}if("string"==typeof o){if(void 0===o[e])throw new Error("No method named "+e);o[e]()}})}var i="lte.todolist",n={onCheck:function(t){return t},onUnCheck:function(t){return t}},s={data:'[data-widget="todo-list"]'},o={done:"done"},a=function(t,e){this.element=t,this.options=e,this._setUpListeners()};a.prototype.toggle=function(t){if(t.parents(s.li).first().toggleClass(o.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(s.data).each(function(){e.call(t(this))})})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var s=t(this);if(!s.data(i)){var o=t.extend({},n,s.data(),"object"==typeof e&&e);s.data(i,new r(s,o))}})}var i="lte.tree",n={animationSpeed:500,accordion:!0,followLink:!1,trigger:".treeview a"},s={tree:".tree",treeview:".treeview",treeviewMenu:".treeview-menu",open:".menu-open, .active",li:"li",data:'[data-widget="tree"]',active:".active"},o={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(o.tree),t(s.treeview+s.active,this.element).addClass(o.open),this._setUpListeners()};r.prototype.toggle=function(t,e){var i=t.next(s.treeviewMenu),n=t.parent(),a=n.hasClass(o.open);n.is(s.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(s.open),l=r.children(s.treeviewMenu);this.collapse(l,r)}i.addClass(o.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(o.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(s.data).each(function(){e.call(t(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=s(t("
"))}function s(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,o)}function o(){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,s,o;for(o=0;null!=(s=i[o]);o++)try{n=t._data(s,"events"),n&&n.remove&&t(s).triggerHandler("remove")}catch(t){}e(i)}}(t.cleanData),t.widget=function(e,i,n){var s,o,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]||{},s=t[l][e],o=t[l][e]=function(t,e){if(!this._createWidget)return new o(t,e);arguments.length&&this._createWidget(t,e)},t.extend(o,s,{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 s(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=s,e=n.apply(this,arguments),this._super=i,this._superApply=o,e}}()}),o.prototype=t.widget.extend(a,{widgetEventPrefix:s?a.widgetEventPrefix||e:e},r,{constructor:o,namespace:l,widgetName:e,widgetFullName:h}),s?(t.each(s._childConstructors,function(e,i){var n=i.prototype;t.widget(n.namespace+"."+n.widgetName,o,i._proto)}),delete s._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var i,n,s=h.call(arguments,1),o=0,a=s.length;o",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,s,o,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(s=a[e]=t.widget.extend({},this.options[e]),o=0;o
"),o=n.children()[0];return t("body").append(n),e=o.offsetWidth,n.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=n[0].clientWidth),n.remove(),s=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"),s="scroll"===i||"auto"===i&&e.width0?"right":"center",vertical:r<0?"top":n>0?"bottom":"middle"};po(a(n),a(r))?d.important="horizontal":d.important="vertical",s.using.call(this,t,d)}),l.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,n=e.within,s=n.isWindow?n.scrollLeft:n.offset.left,a=n.width,r=t.left-e.collisionPosition.marginLeft,l=s-r,h=r+e.collisionWidth-a-s;e.collisionWidth>a?l>0&&h<=0?(i=t.left+l+e.collisionWidth-a-s,t.left+=l-i):t.left=h>0&&l<=0?s:l>h?s+a-e.collisionWidth:s:l>0?t.left+=l:h>0?t.left-=h:t.left=o(t.left-r,t.left)},top:function(t,e){var i,n=e.within,s=n.isWindow?n.scrollTop:n.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,l=s-r,h=r+e.collisionHeight-a-s;e.collisionHeight>a?l>0&&h<=0?(i=t.top+l+e.collisionHeight-a-s,t.top+=l-i):t.top=h>0&&l<=0?s:l>h?s+a-e.collisionHeight:s:l>0?t.top+=l:h>0?t.top-=h:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,n,s=e.within,o=s.offset.left+s.scrollLeft,r=s.width,l=s.isWindow?s.scrollLeft:s.offset.left,h=t.left-e.collisionPosition.marginLeft,u=h-l,d=h+e.collisionWidth-r-l,c="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];u<0?((i=t.left+c+p+f+e.collisionWidth-r-o)<0||i0&&((n=t.left-e.collisionPosition.marginLeft+c+p+f-l)>0||a(n)0&&((i=t.top-e.collisionPosition.marginTop+p+f+g-l)>0||a(i)t?0:n.max")[0],p=t.each;c.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=c.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,s,a,r){if(void 0===e)return this._rgba=[null,null,null,null],this;(e.jquery||e.nodeType)&&(e=t(e).css(s),s=void 0);var u=this,d=t.type(e),c=this._rgba=[];return void 0!==s&&(e=[e,s,a,r],d="array"),"string"===d?this.parse(n(e)||o._default):"array"===d?(p(h.rgba.props,function(t,n){c[n.idx]=i(e[n.idx],n)}),this):"object"===d?(e instanceof l?p(h,function(t,i){e[i.cache]&&(u[i.cache]=e[i.cache].slice())}):p(h,function(n,s){var o=s.cache;p(s.props,function(t,n){if(!u[o]&&s.to){if("alpha"===t||null==e[t])return;u[o]=s.to(u._rgba)}u[o][n.idx]=i(e[t],n,!0)}),u[o]&&t.inArray(null,u[o].slice(0,3))<0&&(u[o][3]=1,s.from&&(u._rgba=s.from(u[o])))}),this):void 0},is:function(t){var e=l(t),i=!0,n=this;return p(h,function(t,s){var o,a=e[s.cache];return a&&(o=n[s.cache]||s.to&&s.to(n._rgba)||[],p(s.props,function(t,e){if(null!=a[e.idx])return i=a[e.idx]===o[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),s=n._space(),o=h[s],a=0===this.alpha()?l("transparent"):this,r=a[o.cache]||o.to(a._rgba),d=r.slice();return n=n[o.cache],p(o.props,function(t,s){var o=s.idx,a=r[o],l=n[o],h=u[s.type]||{};null!==l&&(null===a?d[o]=l:(h.mod&&(l-a>h.mod/2?a+=h.mod:a-l>h.mod/2&&(a-=h.mod)),d[o]=i((l-a)*e+a,s)))}),this[s](d)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),n=i.pop(),s=l(e)._rgba;return l(t.map(i,function(t,e){return(1-n)*s[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,s=t[1]/255,o=t[2]/255,a=t[3],r=Math.max(n,s,o),l=Math.min(n,s,o),h=r-l,u=r+l,d=.5*u;return e=l===r?0:n===r?60*(s-o)/h+360:s===r?60*(o-n)/h+120:60*(n-s)/h+240,i=0===h?0:d<=.5?h/u:h/(2-u),[Math.round(e)%360,i,d,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],o=t[3],a=n<=.5?n*(1+i):n+i-n*i,r=2*n-a;return[Math.round(255*s(r,a,e+1/3)),Math.round(255*s(r,a,e)),Math.round(255*s(r,a,e-1/3)),o]},p(h,function(e,n){var s=n.props,o=n.cache,r=n.to,h=n.from;l.fn[e]=function(e){if(r&&!this[o]&&(this[o]=r(this._rgba)),void 0===e)return this[o].slice();var n,a=t.type(e),u="array"===a||"object"===a?e:arguments,d=this[o].slice();return p(s,function(t,e){var n=u["object"===a?t:e.idx];null==n&&(n=d[e.idx]),d[e.idx]=i(n,e)}),h?(n=l(h(d)),n[o]=d,n):l(d)},p(s,function(i,n){l.fn[i]||(l.fn[i]=function(s){var o,r=t.type(s),l="alpha"===i?this._hsla?"hsla":"rgba":e,h=this[l](),u=h[n.idx];return"undefined"===r?u:("function"===r&&(s=s.call(this,u),r=t.type(s)),null==s&&n.empty?this:("string"===r&&(o=a.exec(s))&&(s=u+parseFloat(o[2])*("+"===o[1]?1:-1)),h[n.idx]=s,this[l](h)))})})}),l.hook=function(e){var i=e.split(" ");p(i,function(e,i){t.cssHooks[i]={set:function(e,s){var o,a,r="";if("transparent"!==s&&("string"!==t.type(s)||(o=n(s)))){if(s=l(o||s),!d.rgba&&1!==s._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){}s=s.blend(r&&"transparent"!==r?r:"_default")}s=s.toRgbaString()}try{e.style[i]=s}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}},o=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"}}(d),function(){function e(e){var i,n,s=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(s&&s.length&&s[0]&&s[s[0]])for(n=s.length;n--;)i=s[n],"string"==typeof s[i]&&(o[t.camelCase(i)]=s[i]);else for(i in s)"string"==typeof s[i]&&(o[i]=s[i]);return o}function i(e,i){var n,o,a={};for(n in i)o=i[n],e[n]!==o&&(s[n]||!t.fx.step[n]&&isNaN(parseFloat(o))||(a[n]=o));return a}var n=["add","remove","toggle"],s={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)&&(d.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(s,o,a,r){var l=t.speed(o,a,r);return this.queue(function(){var o,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)}}),o=function(){t.each(n,function(t,e){s[e]&&a[e+"Class"](s[e])})},o(),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(){o(),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,s,o){return n?t.effects.animateClass.call(this,{add:i},n,s,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,n,s,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},n,s,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(i,n,s,o,a){return"boolean"==typeof n||void 0===n?s?t.effects.animateClass.call(this,n?{add:i}:{remove:i},s,o,a):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:i},n,s,o)}}(t.fn.toggleClass),switchClass:function(e,i,n,s,o){return t.effects.animateClass.call(this,{add:i,remove:e},n,s,o)}})}(),function(){function e(e,i,n,s){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(s=i,n=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(s=n,n=i,i={}),t.isFunction(n)&&(s=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=s||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(),s=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,o=s.exec(t)||["",0,i,n,0];return{top:parseFloat(o[1])||0,right:"auto"===o[2]?i:parseFloat(o[2]),bottom:"auto"===o[3]?n:parseFloat(o[3]),left:parseFloat(o[4])||0}}t.expr&&t.expr.filters&&t.expr.filters.animated&&(t.expr.filters.animated=function(e){return function(i){return!!t(i).data(u)||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").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),s={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(t){o=document.body}return e.wrap(n),(e[0]===o||t.contains(e[0],o))&&t(o).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(s),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,s="vertical"!==i?(e||100)/100:1;return{height:t.height()*s,width:t.width()*n,outerHeight:t.outerHeight()*s,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"),s=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:s.left,top:s.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,s){return s=s||{},t.each(i,function(t,i){var o=e.cssUnit(i);o[0]>0&&(s[i]=o[0]*n+o[1])}),s}}),t.fn.extend({effect:function(){function i(e){function i(){r.removeData(u),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=d.shift(),!1===t.uiBackCompat||o?"none"===n.mode?(r[h](),a()):s.call(r[0],n,i):(r.is(":hidden")?"hide"===h:"show"===h)?(r[h](),a()):s.call(r[0],n,a)}var n=e.apply(this,arguments),s=t.effects.effect[n.effect],o=s.mode,a=n.queue,r=a||"fx",l=n.complete,h=n.mode,d=[],c=function(e){var i=t(this),n=t.effects.mode(i,h)||o;i.data(u,!0),d.push(n),o&&("show"===n||n===o&&"hide"===n)&&i.show(),o&&"none"===n||t.effects.saveStyle(i),t.isFunction(e)&&e()};return t.fx.off||!s?h?this[h](n.duration,l):this.each(function(){l&&l.call(this)}):!1===a?this.each(c).each(i):this.queue(r,c).queue(r,i)},show:function(t){return function(n){if(i(n))return t.apply(this,arguments);var s=e.apply(this,arguments);return s.mode="show",this.effect.call(this,s)}}(t.fn.show),hide:function(t){return function(n){if(i(n))return t.apply(this,arguments);var s=e.apply(this,arguments);return s.mode="hide",this.effect.call(this,s)}}(t.fn.hide),toggle:function(t){return function(n){if(i(n)||"boolean"==typeof n)return t.apply(this,arguments);var s=e.apply(this,arguments);return s.mode="toggle",this.effect.call(this,s)}}(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),s=t(e.to),o="fixed"===s.css("position"),a=t("body"),r=o?a.scrollTop():0,l=o?a.scrollLeft():0,h=s.offset(),u={top:h.top-r,left:h.left-l,height:s.innerHeight(),width:s.innerWidth()},d=n.offset(),c=t("
").appendTo("body").addClass(e.className).css({top:d.top-r,left:d.left-l,height:n.innerHeight(),width:n.innerWidth(),position:o?"fixed":"absolute"}).animate(u,e.duration,e.easing,function(){c.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"]},s=t(this),o=e.direction||"up",a=s.cssClip(),r={clip:t.extend({},a)},l=t.effects.createPlaceholder(s);r.clip[n[o][0]]=r.clip[n[o][1]],"show"===e.mode&&(s.cssClip(r.clip),l&&l.css(t.effects.clipToBox(r)),r.clip=a),l&&l.animate(t.effects.clipToBox(r),e.duration,e.easing),s.animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("bounce",function(e,i){var n,s,o,a=t(this),r=e.mode,l="hide"===r,h="show"===r,u=e.direction||"up",d=e.distance,c=e.times||5,p=2*c+(h||l?1:0),f=e.duration/p,g=e.easing,m="up"===u||"down"===u?"top":"left",v="up"===u||"left"===u,b=0,_=a.queue().length;for(t.effects.createPlaceholder(a),o=a.css(m),d||(d=a["top"===m?"outerHeight":"outerWidth"]()/3),h&&(s={opacity:1},s[m]=o,a.css("opacity",0).css(m,v?2*-d:2*d).animate(s,f,g)),l&&(d/=Math.pow(2,c-1)),s={},s[m]=o;b").css({position:"absolute",visibility:"visible",left:-a*v,top:-o*b}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:b,left:r+(g?h*v:0),top:l+(g?u*b:0),opacity:g?0:1}).animate({left:r+(g?0:h*v),top:l+(g?0:u*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),s=e.mode,o="show"===s,a="hide"===s,r=e.size||15,l=/([0-9]+)%/.exec(r),h=!!e.horizFirst,u=h?["right","bottom"]:["bottom","right"],d=e.duration/2,c=t.effects.createPlaceholder(n),p=n.cssClip(),f={clip:t.extend({},p)},g={clip:t.extend({},p)},m=[p[u[0]],p[u[1]]],v=n.queue().length;l&&(r=parseInt(l[1],10)/100*m[a?0:1]),f.clip[u[0]]=r,g.clip[u[0]]=r,g.clip[u[1]]=0,o&&(n.cssClip(g.clip),c&&c.css(t.effects.clipToBox(g)),g.clip=p),n.queue(function(i){c&&c.animate(t.effects.clipToBox(f),d,e.easing).animate(t.effects.clipToBox(g),d,e.easing),i()}).animate(f,d,e.easing).animate(g,d,e.easing).queue(i),t.effects.unshift(n,v,4)}),t.effects.define("highlight","show",function(e,i){var n=t(this),s={backgroundColor:n.css("backgroundColor")};"hide"===e.mode&&(s.opacity=0),t.effects.saveStyle(n),n.css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(s,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("size",function(e,i){var n,s,o,a=t(this),r=["fontSize"],l=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],h=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],u=e.mode,d="effect"!==u,c=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"===u&&(o=v,v=b,b=o),s={from:{y:v.height/m.height,x:v.width/m.width},to:{y:b.height/m.height,x:b.width/m.width}},"box"!==c&&"both"!==c||(s.from.y!==s.to.y&&(v=t.effects.setTransition(a,l,s.from.y,v),b=t.effects.setTransition(a,l,s.to.y,b)),s.from.x!==s.to.x&&(v=t.effects.setTransition(a,h,s.from.x,v),b=t.effects.setTransition(a,h,s.to.x,b))),"content"!==c&&"both"!==c||s.from.y!==s.to.y&&(v=t.effects.setTransition(a,r,s.from.y,v),b=t.effects.setTransition(a,r,s.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"!==c&&"both"!==c||(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),o={height:n.height*s.from.y,width:n.width*s.from.x,outerHeight:n.outerHeight*s.from.y,outerWidth:n.outerWidth*s.from.x},a={height:n.height*s.to.y,width:n.width*s.to.x,outerHeight:n.height*s.to.y,outerWidth:n.width*s.to.x};s.from.y!==s.to.y&&(o=t.effects.setTransition(i,l,s.from.y,o),a=t.effects.setTransition(i,l,s.to.y,a)),s.from.x!==s.to.x&&(o=t.effects.setTransition(i,h,s.from.x,o),a=t.effects.setTransition(i,h,s.to.x,a)),d&&t.effects.saveStyle(i),i.css(o),i.animate(a,e.duration,e.easing,function(){d&&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),d||(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),s=e.mode,o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"effect"!==s?0:100),a=t.extend(!0,{from:t.effects.scaledDimensions(n),to:t.effects.scaledDimensions(n,o,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),s=e.mode,o="show"===s,a="hide"===s,r=o||a,l=2*(e.times||5)+(r?1:0),h=e.duration/l,u=0,d=1,c=n.queue().length;for(!o&&n.is(":visible")||(n.css("opacity",0).show(),u=1);d0&&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,o){return t.each(s,function(){i-=parseFloat(t.css(e,"padding"+this))||0,n&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var s="Width"===i?["Left","Right"]:["Top","Bottom"],o=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(o,n(this,e)+"px")})},t.fn["outer"+i]=function(e,s){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(o,n(this,e,!0,s)+"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,s,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(s=this.eq(0).parents("label"),n=this.attr("id"),n&&(e=this.eq(0).parents().last(),o=e.add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(n)+"']",s=s.add(o.find(i).addBack(i))),this.pushStack(s))},t.fn.scrollParent=function(e){var i=this.css("position"),n="absolute"===i,s=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return(!n||"static"!==e.css("position"))&&s.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o: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(""),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,s=this.headers.index(e.target),o=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(s+1)%n];break;case i.LEFT:case i.UP:o=this.headers[(s-1+n)%n];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:o=this.headers[0];break;case i.END:o=this.headers[n-1]}o&&(t(e.target).attr("tabIndex",-1),t(o).attr("tabIndex",0),t(o).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,s=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(),s=n.uniqueId().attr("id");e.attr("aria-controls",s),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=s.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,s=this.options,o=this.active,a=t(e.currentTarget),r=a[0]===o[0],l=r&&s.collapsible,h=l?t():a.next(),u=o.next(),d={oldHeader:o,oldPanel:u,newHeader:l?t():a,newPanel:h};e.preventDefault(),r&&!s.collapsible||!1===this._trigger("beforeActivate",e,d)||(s.active=!l&&this.headers.index(a),this.active=r?t():a,this._toggle(d),this._removeClass(o,"ui-accordion-header-active","ui-state-active"),s.icons&&(i=o.children(".ui-accordion-header-icon"),this._removeClass(i,null,s.icons.activeHeader)._addClass(i,null,s.icons.header)),r||(this._removeClass(a,"ui-accordion-header-collapsed")._addClass(a,"ui-accordion-header-active","ui-state-active"),s.icons&&(n=a.children(".ui-accordion-header-icon"),this._removeClass(n,null,s.icons.header)._addClass(n,null,s.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,s,o,a=this,r=0,l=t.css("box-sizing"),h=t.length&&(!e.length||t.index()",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,s,o,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||"",o=!1,s=e.keyCode>=96&&e.keyCode<=105?(e.keyCode-96).toString():String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),s===n?o=!0:s=n+s,i=this._filterMenuItems(s),i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(s=String.fromCharCode(e.keyCode),i=this._filterMenuItems(s)),i.length?(this.focus(e,i),this.previousFilter=s,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,s,o,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("").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")}),s=i.not(".ui-menu-item, .ui-menu-divider"),o=s.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(s,"ui-menu-item")._addClass(o,"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,s;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")),s=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(s,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,s,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,n=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,s=e.offset().top-this.activeMenu.offset().top-i-n,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.outerHeight(),s<0?this.activeMenu.scrollTop(o+s):s+r>a&&this.activeMenu.scrollTop(o+s-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,s;if(!this.active)return void this.next(e);this.isLastItem()||(this._hasScroll()?(n=this.active.offset().top,s=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-n-s<0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]()))},previousPage:function(e){var i,n,s;if(!this.active)return void this.next(e);this.isFirstItem()||(this._hasScroll()?(n=this.active.offset().top,s=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-n+s>0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first()))},_hasScroll:function(){return this.element.outerHeight()",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,s=this.element[0].nodeName.toLowerCase(),o="textarea"===s,a="input"===s;this.isMultiLine=o||!a&&this._isContentEditable(this.element),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(s){if(this.element.prop("readOnly"))return e=!0,n=!0,void(i=!0);e=!1,n=!1,i=!1;var o=t.ui.keyCode;switch(s.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",s);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",s);break;case o.UP:e=!0,this._keyEvent("previous",s);break;case o.DOWN:e=!0,this._keyEvent("next",s);break;case o.ENTER:this.menu.active&&(e=!0,s.preventDefault(),this.menu.select(s));break;case o.TAB:this.menu.active&&this.menu.select(s);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(s),s.preventDefault());break;default:i=!0,this._searchTimeout(s)}},keypress:function(n){if(e)return e=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||n.preventDefault());if(!i){var s=t.ui.keyCode;switch(n.keyCode){case s.PAGE_UP:this._move("previousPage",n);break;case s.PAGE_DOWN:this._move("nextPage",n);break;case s.UP:this._keyEvent("previous",n);break;case s.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(""),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 s=t.getDatasetMeta(0),a=e.datasets[0],r=s.data[n],l=r.custom||{},h=o.valueAtIndexOrDefault,u=t.options.elements.arc;return{text:i,fillStyle:l.backgroundColor?l.backgroundColor:h(a.backgroundColor,n,u.backgroundColor),strokeStyle:l.borderColor?l.borderColor:h(a.borderColor,n,u.borderColor),lineWidth:l.borderWidth?l.borderWidth:h(a.borderWidth,n,u.borderWidth),hidden:isNaN(a.data[n])||s.data[n].hidden,index:n}}):[]}},onClick:function(t,e){var i,n,s,o=e.index,a=this.chart;for(i=0,n=(a.data.datasets||[]).length;i0&&!isNaN(t)?2*Math.PI/e:0}})}},{25:25,40:40,45:45}],20:[function(t,e,i){"use strict";var n=t(25),s=t(40),o=t(45);n._set("radar",{scale:{type:"radialLinear"},elements:{line:{tension:0}}}),e.exports=function(t){t.controllers.radar=t.DatasetController.extend({datasetElementType:s.Line,dataElementType:s.Point,linkScales:o.noop,update:function(t){var e=this,i=e.getMeta(),n=i.dataset,s=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),o.extend(i.dataset,{_datasetIndex:e.index,_scale:h,_children:s,_loop:!0,_model:{tension:a.tension?a.tension:o.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(),o.each(s,function(i,n){e.updateElement(i,n,t)},e),e.updateBezierControlPoints()},updateElement:function(t,e,i){var n=this,s=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),o.extend(t,{_datasetIndex:n.index,_index:e,_scale:r,_model:{x:i?r.xCenter:h.x,y:i?r.yCenter:h.y,tension:s.tension?s.tension:o.valueOrDefault(a.lineTension,n.chart.options.elements.line.tension),radius:s.radius?s.radius:o.valueAtIndexOrDefault(a.pointRadius,e,l.radius),backgroundColor:s.backgroundColor?s.backgroundColor:o.valueAtIndexOrDefault(a.pointBackgroundColor,e,l.backgroundColor),borderColor:s.borderColor?s.borderColor:o.valueAtIndexOrDefault(a.pointBorderColor,e,l.borderColor),borderWidth:s.borderWidth?s.borderWidth:o.valueAtIndexOrDefault(a.pointBorderWidth,e,l.borderWidth),pointStyle:s.pointStyle?s.pointStyle:o.valueAtIndexOrDefault(a.pointStyle,e,l.pointStyle),hitRadius:s.hitRadius?s.hitRadius:o.valueAtIndexOrDefault(a.pointHitRadius,e,l.hitRadius)}}),t._model.skip=s.skip?s.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var t=this.chart.chartArea,e=this.getMeta();o.each(e.data,function(i,n){var s=i._model,a=o.splineCurve(o.previousItem(e.data,n,!0)._model,s,o.nextItem(e.data,n,!0)._model,s.tension);s.controlPointPreviousX=Math.max(Math.min(a.previous.x,t.right),t.left),s.controlPointPreviousY=Math.max(Math.min(a.previous.y,t.bottom),t.top),s.controlPointNextX=Math.max(Math.min(a.next.x,t.right),t.left),s.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,s=t._model;s.radius=i.hoverRadius?i.hoverRadius:o.valueAtIndexOrDefault(e.pointHoverRadius,n,this.chart.options.elements.point.hoverRadius),s.backgroundColor=i.hoverBackgroundColor?i.hoverBackgroundColor:o.valueAtIndexOrDefault(e.pointHoverBackgroundColor,n,o.getHoverColor(s.backgroundColor)),s.borderColor=i.hoverBorderColor?i.hoverBorderColor:o.valueAtIndexOrDefault(e.pointHoverBorderColor,n,o.getHoverColor(s.borderColor)),s.borderWidth=i.hoverBorderWidth?i.hoverBorderWidth:o.valueAtIndexOrDefault(e.pointHoverBorderWidth,n,s.borderWidth)},removeHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t.custom||{},n=t._index,s=t._model,a=this.chart.options.elements.point;s.radius=i.radius?i.radius:o.valueAtIndexOrDefault(e.pointRadius,n,a.radius),s.backgroundColor=i.backgroundColor?i.backgroundColor:o.valueAtIndexOrDefault(e.pointBackgroundColor,n,a.backgroundColor),s.borderColor=i.borderColor?i.borderColor:o.valueAtIndexOrDefault(e.pointBorderColor,n,a.borderColor),s.borderWidth=i.borderWidth?i.borderWidth:o.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),s=t(26),o=t(45);n._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:o.noop,onComplete:o.noop}}),e.exports=function(t){t.Animation=s.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 s,o,a=this.animations;for(e.chart=t,n||(t.animating=!0),s=0,o=a.length;s1&&(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,s=0;s=e.numSteps?(o.callback(e.onAnimationComplete,[e],i),i.animating=!1,n.splice(s,1)):++s}},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),s=t(45),o=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=s.configMerge(n.global,n[t.type],t.options||{}),t}function i(e){var i=e.options;s.each(e.scales,function(t){a.removeBox(e,t)}),i=s.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={},s.extend(t.prototype,{construct:function(i,n){var o=this;n=e(n);var a=r.acquireContext(i,n),l=a&&a.canvas,h=l&&l.height,u=l&&l.width;if(o.id=s.uid(),o.ctx=a,o.canvas=l,o.config=n,o.width=u,o.height=h,o.aspectRatio=h?u/h:null,o.options=n.options,o._bufferedRender=!1,o.chart=o,o.controller=o,t.instances[o.id]=o,Object.defineProperty(o,"data",{get:function(){return o.config.data},set:function(t){o.config.data=t}}),!a||!l)return void console.error("Failed to create chart: can't acquire context from the given item");o.initialize(),o.update()},initialize:function(){var t=this;return l.notify(t,"beforeInit"),s.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 s.canvas.clear(this),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(t){var e=this,i=e.options,n=e.canvas,o=i.maintainAspectRatio&&e.aspectRatio||null,a=Math.max(0,Math.floor(s.getMaximumWidth(n))),r=Math.max(0,Math.floor(o?a/o:s.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",s.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;s.each(e.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),s.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||{},o=[],a=Object.keys(n).reduce(function(t,e){return t[e]=!1,t},{});i.scales&&(o=o.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&&o.push({options:i.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),s.each(o,function(i){var o=i.options,r=o.id,l=s.valueOrDefault(o.type,i.dtype);h(o.position)!==h(i.dposition)&&(o.position=i.dposition),a[r]=!0;var u=null;if(r in n&&n[r].type===l)u=n[r],u.options=o,u.ctx=e.ctx,u.chart=e;else{var d=t.scaleService.getScaleConstructor(l);if(!d)return;u=new d({id:r,type:l,options:o,ctx:e.ctx,chart:e}),n[u.id]=u}u.mergeTicksOptions(),i.isDefault&&(e.scale=u)}),s.each(a,function(t,e){t||delete n[e]}),e.scales=n,t.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,i=[],n=[];return s.each(e.data.datasets,function(s,o){var a=e.getDatasetMeta(o),r=s.type||e.config.type;if(a.type&&a.type!==r&&(e.destroyDatasetMeta(o),a=e.getDatasetMeta(o)),a.type=r,i.push(a.type),a.controller)a.controller.updateIndex(o),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,o),n.push(a.controller)}},e),n},resetElements:function(){var t=this;s.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();s.each(e.data.datasets,function(t,i){ e.getDatasetMeta(i).controller.buildOrUpdateElements()},e),e.updateLayout(),e.options.animation&&e.options.animation.duration&&s.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=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),s={meta:n,index:t,easingValue:e};!1!==l.notify(i,"beforeDatasetDraw",[s])&&(n.controller.draw(e),l.notify(i,"afterDatasetDraw",[s]))},_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 o.modes.single(this,t)},getElementsAtEvent:function(t){return o.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return o.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,i){var n=o.modes[e];return"function"==typeof n?n(this,t,i):[]},getDatasetAtEvent:function(t){return o.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;e0||(s.forEach(function(e){delete t[e]}),delete t._chartjs)}}var s=["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(),s=i.getDataset().data||[],o=n.data;for(t=0,e=s.length;tn&&t.insertElements(n,s-n)},insertElements:function(t,e){for(var i=0;i=i[e].length&&i[e].push({}),!i[e][a].type||l.type&&l.type!==i[e][a].type?o.merge(i[e][a],[t.scaleService.getScaleDefaults(r),l]):o.merge(i[e][a],l)}else o._merger(e,i,n,s)}})},o.where=function(t,e){if(o.isArray(t)&&Array.prototype.filter)return t.filter(e);var i=[];return o.each(t,function(t){e(t)&&i.push(t)}),i},o.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,s=t.length;n=0;n--){var s=t[n];if(e(s))return s}},o.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},o.almostEquals=function(t,e,i){return Math.abs(t-e)t},o.max=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.max(t,e)},Number.NEGATIVE_INFINITY)},o.min=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.min(t,e)},Number.POSITIVE_INFINITY)},o.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return t=+t,0===t||isNaN(t)?t:t>0?1:-1},o.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},o.toRadians=function(t){return t*(Math.PI/180)},o.toDegrees=function(t){return t*(180/Math.PI)},o.getAngleFromPoint=function(t,e){var i=e.x-t.x,n=e.y-t.y,s=Math.sqrt(i*i+n*n),o=Math.atan2(n,i);return o<-.5*Math.PI&&(o+=2*Math.PI),{angle:o,distance:s}},o.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},o.aliasPixel=function(t){return t%2==0?0:.5},o.splineCurve=function(t,e,i,n){var s=t.skip?e:t,o=e,a=i.skip?e:i,r=Math.sqrt(Math.pow(o.x-s.x,2)+Math.pow(o.y-s.y,2)),l=Math.sqrt(Math.pow(a.x-o.x,2)+Math.pow(a.y-o.y,2)),h=r/(r+l),u=l/(r+l);h=isNaN(h)?0:h,u=isNaN(u)?0:u;var d=n*h,c=n*u;return{previous:{x:o.x-d*(a.x-s.x),y:o.y-d*(a.y-s.y)},next:{x:o.x+c*(a.x-s.x),y:o.y+c*(a.y-s.y)}}},o.EPSILON=Number.EPSILON||1e-14,o.splineCurveMonotone=function(t){var e,i,n,s,a=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),r=a.length;for(e=0;e0?a[e-1]:null,(s=e0?a[e-1]:null,s=e=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},o.previousItem=function(t,e,i){return i?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},o.niceNum=function(t,e){var i=Math.floor(o.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)},o.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)}}(),o.getRelativePosition=function(t,e){var i,n,s=t.originalEvent||t,a=t.currentTarget||t.srcElement,r=a.getBoundingClientRect(),l=s.touches;l&&l.length>0?(i=l[0].clientX,n=l[0].clientY):(i=s.clientX,n=s.clientY);var h=parseFloat(o.getStyle(a,"padding-left")),u=parseFloat(o.getStyle(a,"padding-top")),d=parseFloat(o.getStyle(a,"padding-right")),c=parseFloat(o.getStyle(a,"padding-bottom")),p=r.right-r.left-h-d,f=r.bottom-r.top-u-c;return i=Math.round((i-r.left-h)/p*a.width/e.currentDevicePixelRatio),n=Math.round((n-r.top-u)/f*a.height/e.currentDevicePixelRatio),{x:i,y:n}},o.getConstraintWidth=function(t){return a(t,"max-width","clientWidth")},o.getConstraintHeight=function(t){return a(t,"max-height","clientHeight")},o.getMaximumWidth=function(t){var e=t.parentNode;if(!e)return t.clientWidth;var i=parseInt(o.getStyle(e,"padding-left"),10),n=parseInt(o.getStyle(e,"padding-right"),10),s=e.clientWidth-i-n,a=o.getConstraintWidth(t);return isNaN(a)?s:Math.min(s,a)},o.getMaximumHeight=function(t){var e=t.parentNode;if(!e)return t.clientHeight;var i=parseInt(o.getStyle(e,"padding-top"),10),n=parseInt(o.getStyle(e,"padding-bottom"),10),s=e.clientHeight-i-n,a=o.getConstraintHeight(t);return isNaN(a)?s:Math.min(s,a)},o.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},o.retinaScale=function(t,e){var i=t.currentDevicePixelRatio=e||window.devicePixelRatio||1;if(1!==i){var n=t.canvas,s=t.height,o=t.width;n.height=s*i,n.width=o*i,t.ctx.scale(i,i),n.style.height||n.style.width||(n.style.height=s+"px",n.style.width=o+"px")}},o.fontString=function(t,e,i){return e+" "+t+"px "+i},o.longestText=function(t,e,i,n){n=n||{};var s=n.data=n.data||{},a=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(s=n.data={},a=n.garbageCollect=[],n.font=e),t.font=e;var r=0;o.each(i,function(e){void 0!==e&&null!==e&&!0!==o.isArray(e)?r=o.measureText(t,s,a,r,e):o.isArray(e)&&o.each(e,function(e){void 0===e||null===e||o.isArray(e)||(r=o.measureText(t,s,a,r,e))})});var l=a.length/2;if(l>i.length){for(var h=0;hn&&(n=o),n},o.numberOfLabelLines=function(t){var e=1;return o.each(t,function(t){o.isArray(t)&&t.length>e&&(e=t.length)}),e},o.color=n?function(t){return t instanceof CanvasGradient&&(t=s.global.defaultColor),n(t)}:function(t){return console.error("Color.js not found!"),t},o.getHoverColor=function(t){return t instanceof CanvasPattern?t:o.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 s(t,e){var i,n,s,o,a,r=t.data.datasets;for(n=0,o=r.length;n0&&(h=t.getDatasetMeta(h[0]._datasetIndex).data),h},"x-axis":function(t,e){return l(t,e,{intersect:!1})},point:function(t,e){return o(t,n(e,t))},nearest:function(t,e,i){var s=n(e,t);i.axis=i.axis||"xy";var o=r(i.axis),l=a(t,s,i.intersect,o);return l.length>1&&l.sort(function(t,e){var i=t.getArea(),n=e.getArea(),s=i-n;return 0===s&&(s=t._datasetIndex-e._datasetIndex),s}),l.slice(0,1)},x:function(t,e,i){var o=n(e,t),a=[],r=!1;return s(t,function(t){t.inXRange(o.x)&&a.push(t),t.inRange(o.x,o.y)&&(r=!0)}),i.intersect&&!r&&(a=[]),a},y:function(t,e,i){var o=n(e,t),a=[],r=!1;return s(t,function(t){t.inYRange(o.y)&&a.push(t),t.inRange(o.x,o.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 o.where(t,function(t){return t.position===e})}function s(t,e){t.forEach(function(t,e){return t._tmpIndex_=e,t}),t.sort(function(t,i){var n=e?i:t,s=e?t:i;return n.weight===s.weight?n._tmpIndex_-s._tmpIndex_:n.weight-s.weight}),t.forEach(function(t){delete t._tmpIndex_})}var o=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,s=["fullWidth","position","weight"],o=s.length,a=0;ac&&lt.maxHeight){l--;break}l++,d=h*u}t.labelRotation=l},afterCalculateTickRotation:function(){r.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){r.callback(this.options.beforeFit,[this])},fit:function(){var t=this,s=t.minSize={width:0,height:0},o=n(t._ticks),a=t.options,h=a.ticks,u=a.scaleLabel,d=a.gridLines,c=a.display,p=t.isHorizontal(),f=i(h),g=a.gridLines.tickMarkLength;if(s.width=p?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:c&&d.drawTicks?g:0,s.height=p?c&&d.drawTicks?g:0:t.maxHeight,u.display&&c){var m=l(u),v=r.options.toPadding(u.padding),b=m+v.height;p?s.height+=b:s.width+=b}if(h.display&&c){var _=r.longestText(t.ctx,f.font,o,t.longestTextCache),y=r.numberOfLabelLines(o),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),M=D*_+f.size*y+x*(y-1)+x;s.height=Math.min(t.maxHeight,s.height+M+w),t.ctx.font=f.font;var S=e(t.ctx,o[0],f.font),T=e(t.ctx,o[o.length-1],f.font);0!==t.labelRotation?(t.paddingLeft="bottom"===a.position?C*S+3:C*x+3,t.paddingRight="bottom"===a.position?C*x+3:C*T+3):(t.paddingLeft=S/2+3,t.paddingRight=T/2+3)}else h.mirror?_=0:_+=w+x,s.width=Math.min(t.maxWidth,s.width+_),t.paddingTop=f.size/2,t.paddingBottom=f.size/2}t.handleMargins(),t.width=s.width,t.height=s.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),s=n/Math.max(e._ticks.length-(i?0:1),1),o=s*t+e.paddingLeft;i&&(o+=s/2);var a=e.left+Math.round(o);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,s=e.left+Math.round(n);return s+=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,s,o,a=this,l=a.isHorizontal(),h=a.options.ticks.minor,u=t.length,d=r.toRadians(a.labelRotation),c=Math.cos(d),p=a.longestLabelWidth*c,f=[];for(h.maxTicksLimit&&(o=h.maxTicksLimit),l&&(e=!1,(p+h.autoSkipPadding)*u>a.width-(a.paddingLeft+a.paddingRight)&&(e=1+Math.floor((p+h.autoSkipPadding)*u/(a.width-(a.paddingLeft+a.paddingRight)))),o&&u>o&&(e=Math.max(e,Math.floor(u/o)))),i=0;i1&&i%e>0||i%e==0&&i+e>=u,s&&i!==u-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=o.global,u=n.ticks.minor,d=n.ticks.major||u,c=n.gridLines,p=n.scaleLabel,f=0!==e.labelRotation,g=e.isHorizontal(),m=u.autoSkip?e._autoSkip(e.getTicks()):e.getTicks(),v=r.valueOrDefault(u.fontColor,h.defaultFontColor),b=i(u),_=r.valueOrDefault(d.fontColor,h.defaultFontColor),y=i(d),x=c.drawTicks?c.tickMarkLength:0,w=r.valueOrDefault(p.fontColor,h.defaultFontColor),k=i(p),C=r.options.toPadding(p.padding),D=r.toRadians(e.labelRotation),M=[],S=e.options.gridLines.lineWidth,T="right"===n.position?e.right:e.right-S-x,I="right"===n.position?e.right+x:e.right,P="bottom"===n.position?e.top+S:e.bottom-x-S,A="bottom"===n.position?e.top+S+x:e.bottom+S;if(r.each(m,function(i,o){if(!r.isNullOrUndef(i.label)){var a,l,d,p,v=i.label;o===e.zeroLineIndex&&n.offset===c.offsetGridLines?(a=c.zeroLineWidth,l=c.zeroLineColor,d=c.zeroLineBorderDash,p=c.zeroLineBorderDashOffset):(a=r.valueAtIndexOrDefault(c.lineWidth,o),l=r.valueAtIndexOrDefault(c.color,o),d=r.valueOrDefault(c.borderDash,h.borderDash),p=r.valueOrDefault(c.borderDashOffset,h.borderDashOffset));var b,_,y,w,k,C,F,O,E,z,H="middle",N="middle",L=u.padding;if(g){var R=x+L;"bottom"===n.position?(N=f?"middle":"top",H=f?"right":"center",z=e.top+R):(N=f?"middle":"bottom",H=f?"left":"center",z=e.bottom-R);var W=s(e,o,c.offsetGridLines&&m.length>1);W1);U3?i[2]-i[1]:i[1]-i[0];Math.abs(s)>1&&t!==Math.floor(t)&&(s=t-Math.floor(t));var o=n.log10(Math.abs(s)),a="";if(0!==t){var r=-1*Math.floor(o);r=Math.max(Math.min(r,20),0),a=t.toFixed(r)}else a="0";return a},logarithmic:function(t,e,i){var s=t/Math.pow(10,Math.floor(n.log10(t)));return 0===t?"0":1===s||2===s||5===s||0===e||e===i.length-1?t.toExponential():""}}}},{45:45}],35:[function(t,e,i){"use strict";var n=t(25),s=t(26),o=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:o.noop,title:function(t,e){var i="",n=e.labels,s=n?n.length:0;if(t.length>0){var o=t[0];o.xLabel?i=o.xLabel:s>0&&o.indexn.height-e.height&&(a="bottom");var r,l,h,u,d,c=(s.left+s.right)/2,p=(s.top+s.bottom)/2;"center"===a?(r=function(t){return t<=c},l=function(t){return t>c}):(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},u=function(t){return t-e.width-i.caretSize-i.caretPadding<0},d=function(t){return t<=p?"top":"bottom"},r(i.x)?(o="left",h(i.x)&&(o="center",a=d(i.y))):l(i.x)&&(o="right",u(i.x)&&(o="center",a=d(i.y)));var f=t._options;return{xAlign:f.xAlign?f.xAlign:o,yAlign:f.yAlign?f.yAlign:a}}function u(t,e,i,n){var s=t.x,o=t.y,a=t.caretSize,r=t.caretPadding,l=t.cornerRadius,h=i.xAlign,u=i.yAlign,d=a+r,c=l+r;return"right"===h?s-=e.width:"center"===h&&(s-=e.width/2,s+e.width>n.width&&(s=n.width-e.width),s<0&&(s=0)),"top"===u?o+=d:o-="bottom"===u?e.height+d:e.height/2,"center"===u?"left"===h?s+=d:"right"===h&&(s-=d):"left"===h?s-=c:"right"===h&&(s+=c),{x:s,y:o}}t.Tooltip=s.extend({initialize:function(){this._model=r(this._options),this._lastActive=[]},getTitle:function(){var t=this,e=t._options,n=e.callbacks,s=n.beforeTitle.apply(t,arguments),o=n.title.apply(t,arguments),a=n.afterTitle.apply(t,arguments),r=[];return r=i(r,s),r=i(r,o),r=i(r,a)},getBeforeBody:function(){var t=this._options.callbacks.beforeBody.apply(this,arguments);return o.isArray(t)?t:void 0!==t?[t]:[]},getBody:function(t,e){var n=this,s=n._options.callbacks,a=[];return o.each(t,function(t){var o={before:[],lines:[],after:[]};i(o.before,s.beforeLabel.call(n,t,e)),i(o.lines,s.label.call(n,t,e)),i(o.after,s.afterLabel.call(n,t,e)),a.push(o)}),a},getAfterBody:function(){var t=this._options.callbacks.afterBody.apply(this,arguments);return o.isArray(t)?t:void 0!==t?[t]:[]},getFooter:function(){var t=this,e=t._options.callbacks,n=e.beforeFooter.apply(t,arguments),s=e.footer.apply(t,arguments),o=e.afterFooter.apply(t,arguments),a=[];return a=i(a,n),a=i(a,s),a=i(a,o)},update:function(e){var i,n,s=this,d=s._options,c=s._model,p=s._model=r(d),f=s._active,g=s._data,m={xAlign:c.xAlign,yAlign:c.yAlign},v={x:c.x,y:c.y},b={width:c.width,height:c.height},_={x:c.caretX,y:c.caretY};if(f.length){p.opacity=1;var y=[],x=[];_=t.Tooltip.positioners[d.position].call(s,f,s._eventPosition);var w=[];for(i=0,n=f.length;i0&&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},s=Math.abs(e.opacity<.001)?0:e.opacity,o=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&o&&(this.drawBackground(n,e,t,i,s),n.x+=e.xPadding,n.y+=e.yPadding,this.drawTitle(n,e,t,s),this.drawBody(n,e,t,s),this.drawFooter(n,e,t,s))}},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=!o.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,s=0,o=0;for(e=0,i=t.length;el;)s-=2*Math.PI;for(;s=r&&s<=l,u=a>=i.innerRadius&&a<=i.outerRadius;return h&&u}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),s=t(26),o=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=s.extend({draw:function(){var t,e,i,n,s=this,r=s._view,l=s._chart.ctx,h=r.spanGaps,u=s._children.slice(),d=a.elements.line,c=-1;for(s._loop&&u.length&&u.push(u[0]),l.save(),l.lineCap=r.borderCapStyle||d.borderCapStyle,l.setLineDash&&l.setLineDash(r.borderDash||d.borderDash),l.lineDashOffset=r.borderDashOffset||d.borderDashOffset,l.lineJoin=r.borderJoinStyle||d.borderJoinStyle,l.lineWidth=r.borderWidth||d.borderWidth,l.strokeStyle=r.borderColor||a.defaultColor,l.beginPath(),c=-1,t=0;te?1:-1,a=1,r=h.borderSkipped||"left"):(e=h.x-h.width/2,i=h.x+h.width/2,n=h.y,s=h.base,o=1,a=s>n?1:-1,r=h.borderSkipped||"bottom"),u){var d=Math.min(Math.abs(e-i),Math.abs(n-s));u=u>d?d:u;var c=u/2,p=e+("left"!==r?c*o:0),f=i+("right"!==r?-c*o:0),g=n+("top"!==r?c*a:0),m=s+("bottom"!==r?-c*a:0);p!==f&&(n=g,s=m),g!==m&&(e=p,i=f)}l.beginPath(),l.fillStyle=h.backgroundColor,l.strokeStyle=h.borderColor,l.lineWidth=u;var v=[[e,s],[e,n],[i,n],[i,s]],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(),u&&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=s(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 o=s(i);return n(i)?t>=o.left&&t<=o.right:e>=o.top&&e<=o.bottom},inXRange:function(t){var e=s(this);return t>=e.left&&t<=e.right},inYRange:function(t){var e=s(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,s,o){if(o){var a=Math.min(o,n/2),r=Math.min(o,s/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+s-r),t.quadraticCurveTo(e+n,i+s,e+n-a,i+s),t.lineTo(e+a,i+s),t.quadraticCurveTo(e,i+s,e,i+s-r),t.lineTo(e,i+r),t.quadraticCurveTo(e,i,e+a,i)}else t.rect(e,i,n,s)},drawPoint:function(t,e,i,n,s){var o,a,r,l,h,u;if(e&&"object"==typeof e&&("[object HTMLImageElement]"===(o=e.toString())||"[object HTMLCanvasElement]"===o))return void t.drawImage(e,n-e.width/2,s-e.height/2,e.width,e.height);if(!(isNaN(i)||i<=0)){switch(e){default:t.beginPath(),t.arc(n,s,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,s+h/3),t.lineTo(n+a/2,s+h/3),t.lineTo(n,s-2*h/3),t.closePath(),t.fill();break;case"rect":u=1/Math.SQRT2*i,t.beginPath(),t.fillRect(n-u,s-u,2*u,2*u),t.strokeRect(n-u,s-u,2*u,2*u);break;case"rectRounded":var d=i/Math.SQRT2,c=n-d,p=s-d,f=Math.SQRT2*i;t.beginPath(),this.roundedRect(t,c,p,f,f,i/2),t.closePath(),t.fill();break;case"rectRot":u=1/Math.SQRT2*i,t.beginPath(),t.moveTo(n-u,s),t.lineTo(n,s+u),t.lineTo(n+u,s),t.lineTo(n,s-u),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(n,s+i),t.lineTo(n,s-i),t.moveTo(n-i,s),t.lineTo(n+i,s),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,s-l),t.lineTo(n+r,s+l),t.moveTo(n-r,s+l),t.lineTo(n+r,s-l),t.closePath();break;case"star":t.beginPath(),t.moveTo(n,s+i),t.lineTo(n,s-i),t.moveTo(n-i,s),t.lineTo(n+i,s),r=Math.cos(Math.PI/4)*i,l=Math.sin(Math.PI/4)*i,t.moveTo(n-r,s-l),t.lineTo(n+r,s+l),t.moveTo(n-r,s+l),t.lineTo(n+r,s-l),t.closePath();break;case"line":t.beginPath(),t.moveTo(n-i,s),t.lineTo(n+i,s),t.closePath();break;case"dash":t.beginPath(),t.moveTo(n,s),t.lineTo(n+i,s),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,s){var o,a,r;if(n.isArray(t))if(a=t.length,s)for(o=a-1;o>=0;o--)e.call(i,t[o],o);else for(o=0;o=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-s.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*s.easeInBounce(2*t):.5*s.easeOutBounce(2*t-1)+.5}};e.exports={effects:s},n.easingEffects=s},{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,s,o;return n.isObject(t)?(e=+t.top||0,i=+t.right||0,s=+t.bottom||0,o=+t.left||0):e=i=s=o=+t||0,{top:e,right:i,bottom:s,left:o,height:e+s,width:o+i}},resolve:function(t,e,i){var s,o,a;for(s=0,o=t.length;s
';var s=e.childNodes[0],a=e.childNodes[1];e._reset=function(){s.scrollLeft=1e6,s.scrollTop=1e6,a.scrollLeft=1e6,a.scrollTop=1e6};var r=function(){e._reset(),t()};return o(s,"scroll",r.bind(s,"expand")),o(a,"scroll",r.bind(a,"shrink")),e}function d(t,e){var i=t[v]||(t[v]={}),n=i.renderProxy=function(t){t.animationName===y&&e()};m.each(x,function(e){o(t,e,n)}),i.reflow=!!t.offsetParent,t.classList.add(_)}function c(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]={}),s=n.resizer=u(h(function(){if(n.resizer)return e(r("resize",i))}));d(t,function(){if(n.resizer){var e=t.parentNode;e&&e!==s.parentNode&&e.insertBefore(s,e.firstChild),s._reset()}})}function f(t){var e=t[v]||{},i=e.resizer;delete e.resizer,c(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?(s(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 s=i[v]||(i[v]={});o(n,e,(s.proxies||(s.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 s=i[v]||{},o=s.proxies||{},r=o[t.id+"_"+e];r&&a(n,e,r)}},m.addEvent=o,m.removeEvent=a},{45:45}],48:[function(t,e,i){"use strict";var n=t(45),s=t(46),o=t(47),a=o._enabled?o:s;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,s=t._model||{},o=s.fill;if(void 0===o&&(o=!!s.backgroundColor),!1===o||null===o)return!1;if(!0===o)return"origin";if(n=parseFloat(o,10),isFinite(n)&&Math.floor(n)===n)return"-"!==o[0]&&"+"!==o[0]||(n=e+n),!(n===e||n<0||n>=i)&&n;switch(o){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return o;default:return!1}}function s(t){var e,i=t.el._model||{},n=t.el._scale||{},s=t.fill,o=null;if(isFinite(s))return null;if("start"===s?o=void 0===i.scaleBottom?n.bottom:i.scaleBottom:"end"===s?o=void 0===i.scaleTop?n.top:i.scaleTop:void 0!==i.scaleZero?o=i.scaleZero:n.getBasePosition?o=n.getBasePosition():n.getBasePixel&&(o=n.getBasePixel()),void 0!==o&&null!==o){if(void 0!==o.x&&void 0!==o.y)return o;if("number"==typeof o&&isFinite(o))return e=n.isHorizontal(),{x:e?o:null,y:e?null:o}}return null}function o(t,e,i){var n,s=t[e],o=s.fill,a=[e];if(!i)return o;for(;!1!==o&&-1===a.indexOf(o);){if(!isFinite(o))return o;if(!(n=t[o]))return!1;if(n.visible)return o;a.push(o),o=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,s){var o;if(n&&s){for(t.moveTo(e[0].x,e[0].y),o=1;o0;--o)c.canvas.lineTo(t,i[o],i[o-1],!0)}}function h(t,e,i,n,s,o){var a,h,u,d,c,p,f,g=e.length,m=n.spanGaps,v=[],b=[],_=0,y=0;for(t.beginPath(),a=0,h=g+!!o;a');for(var i=0;i'),t.data.datasets[i].label&&e.push(t.data.datasets[i].label),e.push("");return e.push(""),e.join("")}});var u=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,s=e.display,a=t.ctx,l=o.global,h=r.valueOrDefault,u=h(i.fontSize,l.defaultFontSize),d=h(i.fontStyle,l.defaultFontStyle),c=h(i.fontFamily,l.defaultFontFamily),p=r.fontString(u,d,c),f=t.legendHitBoxes=[],g=t.minSize,m=t.isHorizontal();if(m?(g.width=t.maxWidth,g.height=s?10:0):(g.width=s?10:0,g.height=t.maxHeight),s)if(a.font=p,m){var v=t.lineWidths=[0],b=t.legendItems.length?u+i.padding:0;a.textAlign="left",a.textBaseline="top",r.each(t.legendItems,function(e,s){var o=n(i,u),r=o+u/2+a.measureText(e.text).width;v[v.length-1]+r+i.padding>=t.width&&(b+=u+i.padding,v[v.length]=t.left),f[s]={left:0,top:0,width:r,height:u},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=u+_;r.each(t.legendItems,function(t,e){var s=n(i,u),o=s+u/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,o),k+=C,f[e]={left:0,top:0,width:o,height:u}}),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,s=o.global,a=s.elements.line,l=t.width,h=t.lineWidths;if(e.display){var u,d=t.ctx,c=r.valueOrDefault,p=c(i.fontColor,s.defaultFontColor),f=c(i.fontSize,s.defaultFontSize),g=c(i.fontStyle,s.defaultFontStyle),m=c(i.fontFamily,s.defaultFontFamily),v=r.fontString(f,g,m);d.textAlign="left",d.textBaseline="middle",d.lineWidth=.5,d.strokeStyle=p,d.fillStyle=p,d.font=v;var b=n(i,f),_=t.legendHitBoxes,y=function(t,i,n){if(!(isNaN(b)||b<=0)){d.save(),d.fillStyle=c(n.fillStyle,s.defaultColor),d.lineCap=c(n.lineCap,a.borderCapStyle),d.lineDashOffset=c(n.lineDashOffset,a.borderDashOffset),d.lineJoin=c(n.lineJoin,a.borderJoinStyle),d.lineWidth=c(n.lineWidth,a.borderWidth),d.strokeStyle=c(n.strokeStyle,s.defaultColor);var o=0===c(n.lineWidth,a.borderWidth);if(d.setLineDash&&d.setLineDash(c(n.lineDash,a.borderDash)),e.labels&&e.labels.usePointStyle){var l=f*Math.SQRT2/2,h=l/Math.SQRT2,u=t+h,p=i+h;r.canvas.drawPoint(d,n.pointStyle,l,u,p)}else o||d.strokeRect(t,i,b,f),d.fillRect(t,i,b,f);d.restore()}},x=function(t,e,i,n){var s=f/2,o=b+s+t,a=e+s;d.fillText(i.text,o,a),i.hidden&&(d.beginPath(),d.lineWidth=2,d.moveTo(o,a),d.lineTo(o+n,a),d.stroke())},w=t.isHorizontal();u=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 s=d.measureText(e.text).width,o=b+f/2+s,a=u.x,r=u.y;w?a+o>=l&&(r=u.y+=k,u.line++,a=u.x=t.left+(l-h[u.line])/2):r+k>t.bottom&&(a=u.x=a+t.columnWidths[u.line]+i.padding,r=u.y=t.top+i.padding,u.line++),y(a,r,e),_[n].left=a,_[n].top=r,x(a,r,e,s),w?u.x+=o+i.padding:u.y+=k})}},handleEvent:function(t){var e=this,i=e.options,n="mouseup"===t.type?"click":t.type,s=!1;if("mousemove"===n){if(!i.onHover)return}else{if("click"!==n)return;if(!i.onClick)return}var o=t.x,a=t.y;if(o>=e.left&&o<=e.right&&a>=e.top&&a<=e.bottom)for(var r=e.legendHitBoxes,l=0;l=h.left&&o<=h.left+h.width&&a>=h.top&&a<=h.top+h.height){if("click"===n){i.onClick.call(e,t.native,e.legendItems[l]),s=!0;break}if("mousemove"===n){i.onHover.call(e,t.native,e.legendItems[l]),s=!0;break}}}return s}});e.exports={id:"legend",_element:u,beforeInit:function(t){var e=t.options.legend;e&&s(t,e)},beforeUpdate:function(t){var e=t.options.legend,i=t.legend;e?(r.mergeIf(e,o.global.legend),i?(l.configure(t,i,e),i.options=e):s(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 s=t(25),o=t(26),a=t(45),r=t(30),l=a.noop;s._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}});var h=o.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,o=e(i.fontSize,s.global.defaultFontSize),r=t.minSize,l=a.isArray(i.text)?i.text.length:1,h=a.options.toLineHeight(i.lineHeight,o),u=n?l*h+2*i.padding:0;t.isHorizontal()?(r.width=t.maxWidth,r.height=u):(r.width=u,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,o=s.global;if(n.display){var r,l,h,u=i(n.fontSize,o.defaultFontSize),d=i(n.fontStyle,o.defaultFontStyle),c=i(n.fontFamily,o.defaultFontFamily),p=a.fontString(u,d,c),f=a.options.toLineHeight(n.lineHeight,u),g=f/2+n.padding,m=0,v=t.top,b=t.left,_=t.bottom,y=t.right;e.fillStyle=i(n.fontColor,o.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;ke.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 o=s.valueOrDefault(i.fontSize,n.global.defaultFontSize);t=Math.min(i.maxTicksLimit?i.maxTicksLimit:11,Math.ceil(e.height/(2*o)))}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),s=e.end-i;return e.isHorizontal()?e.left+e.width/s*(n-i):e.bottom-e.height/s*(n-i)},getValueForPixel:function(t){var e=this,i=e.isHorizontal(),n=i?e.width:e.height,s=(i?t-e.left:e.bottom-t)/n;return e.start+(e.end-e.start)*s},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 o=s.niceNum(e.max-e.min,!1);i=s.niceNum(o/(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&&s.almostWhole((t.max-t.min)/t.stepSize,i/1e3)&&(a=t.min,r=t.max);var l=(r-a)/i;l=s.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 u=1;u0&&o>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,o=t.getTickLimit();o=Math.max(2,o);var a={maxTicks:o,min:i.min,max:i.max,stepSize:s.valueOrDefault(i.fixedStepSize,i.stepSize)},r=t.ticks=n(a,t);t.handleDirectionalChanges(),t.max=s.max(r),t.min=s.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,o=[],a=s.valueOrDefault,r=a(t.min,Math.pow(10,Math.floor(s.log10(e.min)))),l=Math.floor(s.log10(e.max)),h=Math.ceil(e.max/Math.pow(10,l));0===r?(i=Math.floor(s.log10(e.minNotZero)),n=Math.floor(e.minNotZero/Math.pow(10,i)),o.push(r),r=n*Math.pow(10,i)):(i=Math.floor(s.log10(r)),n=Math.floor(r/Math.pow(10,i)));var u=i<0?Math.pow(10,Math.abs(i)):1;do{o.push(r),++n,10===n&&(n=1,++i,u=i>=0?1:u),r=Math.round(n*Math.pow(10,i)*u)/u}while(i0){var i=s.min(t),n=s.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 s.each(a,function(i,o){var a=n.getDatasetMeta(o);n.isDatasetVisible(o)&&t(a)&&s.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:ne.max&&(e.max=n),0!==n&&(null===e.minNotZero||n0?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(s.log10(t.max))):t.minNotZero=1)},buildTicks:function(){var t=this,e=t.options,i=e.ticks,o=!t.isHorizontal(),a={min:i.min,max:i.max},r=t.ticks=n(a,t);t.max=s.max(r),t.min=s.min(r),i.reverse?(o=!o,t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),o&&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(s.log10(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},getPixelForValue:function(e){var i,n,o,a,r,l=this,h=l.options.ticks.reverse,u=s.log10,d=l._getFirstTickValue(l.minNotZero),c=0;return e=+l.getRightValue(e),h?(o=l.end,a=l.start,r=-1):(o=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!==o&&(0===o&&(c=s.getValueOrDefault(l.options.ticks.fontSize,t.defaults.global.defaultFontSize),i-=c,o=d),0!==e&&(c+=i/(u(a)-u(o))*(u(e)-u(o))),n+=r*c),n},getValueForPixel:function(e){var i,n,o,a,r=this,l=r.options.ticks.reverse,h=s.log10,u=r._getFirstTickValue(r.minNotZero);if(l?(n=r.end,o=r.start):(n=r.start,o=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 d=s.getValueOrDefault(r.options.ticks.fontSize,t.defaults.global.defaultFontSize);a-=d,i-=d,n=u}a*=h(o)-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),s=t(45),o=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=s.valueOrDefault(e.fontSize,m.defaultFontSize),n=s.valueOrDefault(e.fontStyle,m.defaultFontStyle),o=s.valueOrDefault(e.fontFamily,m.defaultFontFamily);return{size:i,style:n,family:o,font:s.fontString(i,n,o)}}function a(t,e,i){return s.isArray(i)?{w:s.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,s){return t===n||t===s?{start:e-i/2,end:e+i/2}:ts?{start:e-i-5,end:e}:{start:e,end:e+i+5}}function l(t){var n,o,l,h=i(t),u=Math.min(t.height/2,t.width/2),d={r:t.width,l:0,t:t.height,b:0},c={};t.ctx.font=h.font,t._pointLabelSizes=[];var p=e(t);for(n=0;nd.r&&(d.r=m.end,c.r=f),v.startd.b&&(d.b=v.end,c.b=f)}t.setReductions(u,d,c)}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 u(t){return 0===t||180===t?"center":t<180?"left":"right"}function d(t,e,i,n){if(s.isArray(e))for(var o=i.y,a=1.5*n,r=0;r270||t<90)&&(i.y-=e.h)}function p(t){var n=t.ctx,o=t.options,a=o.angleLines,r=o.pointLabels;n.lineWidth=a.lineWidth,n.strokeStyle=a.color;var l=t.getDistanceFromCenterForValue(o.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=s.valueAtIndexOrDefault(r.fontColor,p,m.defaultFontColor);n.font=h.font,n.fillStyle=v;var b=t.getIndexAngle(p),_=s.toDegrees(b);n.textAlign=u(_),c(_,t._pointLabelSizes[p],g),d(n,t.pointLabels[p]||"",g,h.size)}}}function f(t,i,n,o){var a=t.ctx;if(a.strokeStyle=s.valueAtIndexOrDefault(i.color,o-1),a.lineWidth=s.valueAtIndexOrDefault(i.lineWidth,o-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;h0&&i>0?e:0)},draw:function(){var t=this,e=t.options,i=e.gridLines,n=e.ticks,o=s.valueOrDefault;if(e.display){var a=t.ctx,r=this.getIndexAngle(0),l=o(n.fontSize,m.defaultFontSize),h=o(n.fontStyle,m.defaultFontStyle),u=o(n.fontFamily,m.defaultFontFamily),d=s.fontString(l,h,u);s.each(t.ticks,function(e,s){if(s>0||n.reverse){var h=t.getDistanceFromCenterForValue(t.ticksAsNumbers[s]);if(i.display&&0!==s&&f(t,i,h,s),n.display){var u=o(n.fontColor,m.defaultFontColor);if(a.font=d,a.save(),a.translate(t.xCenter,t.yCenter),a.rotate(r),n.showLabelBackdrop){var c=a.measureText(e).width;a.fillStyle=n.backdropColor,a.fillRect(-c/2-n.backdropPaddingX,-h-l/2-n.backdropPaddingY,c+2*n.backdropPaddingX,l+2*n.backdropPaddingY)}a.textAlign="center",a.textBaseline="middle",a.fillStyle=u,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 s(t){var e,i,n,s={},o=[];for(e=0,i=t.length;ee&&r=0&&a<=r;){if(n=a+r>>1,s=t[n-1]||null,o=t[n],!s)return{lo:null,hi:o};if(o[e]i))return{lo:s,hi:o};r=n-1}}return{lo:o,hi:null}}function r(t,e,i,n){var s=a(t,e,i),o=s.lo?s.hi?s.lo:t[t.length-2]:t[0],r=s.lo?s.hi?s.hi:t[t.length-1]:t[1],l=r[e]-o[e],h=l?(i-o[e])/l:0,u=(r[n]-o[n])*h;return o[n]+u}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 u(t,e,i,n){var s,o,a,r=e-t,l=k[i],h=l.size,u=l.steps;if(!u)return Math.ceil(r/(n*h));for(s=0,o=u.length;s=C.indexOf(e);s--)if(o=C[s],k[o].common&&a.as(o)>=t.length)return o;return C[e?C.indexOf(e):0]}function p(t){for(var e=C.indexOf(t)+1,i=C.length;e1?e[1]:n,a=e[0],l=(r(t,"time",o,"pos")-r(t,"time",a,"pos"))/2),s.time.max||(o=e[e.length-1],a=e.length>1?e[e.length-2]:i,h=(r(t,"time",o,"pos")-r(t,"time",a,"pos"))/2)),{left:l,right:h}}function m(t,e){var i,n,s,o,a=[];for(i=0,n=t.length;i=s&&i<=a&&d.push(i);return n.min=s,n.max=a,n._unit=l.unit||c(d,l.minUnit,n.min,n.max),n._majorUnit=p(n._unit),n._table=o(n._timestamps.data,s,a,r.distribution),n._offsets=g(n._table,d,s,a,r),n._labelFormat=v(n._timestamps.data,l),m(d,n._majorUnit)},getLabelForIndex:function(t,e){var i=this,n=i.chart.data,s=i.options.time,o=n.labels&&t=0&&t0?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,s=this._canvas.width/n,o=this._canvas.height/n;this._reset(),i.src=t,i.onload=function(){e._ctx.drawImage(i,0,0,s,o)},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,s,o,a=this.points;a.push(t),a.length>2&&(3===a.length&&a.unshift(a[0]),o=this._calculateCurveControlPoints(a[0],a[1],a[2]),e=o.c2,o=this._calculateCurveControlPoints(a[1],a[2],a[3]),i=o.c1,s=new n(a[1],e,i,a[2]),this._addCurve(s),a.shift())},e.prototype._calculateCurveControlPoints=function(t,e,n){var s=t.x-e.x,o=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},u=Math.sqrt(s*s+o*o),d=Math.sqrt(a*a+r*r),c=l.x-h.x,p=l.y-h.y,f=d/(u+d),g={x:h.x+c*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,s=t.endPoint;e=s.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,s,o,a,r,l,h,u,d,c,p,f=this._ctx,g=i-e;for(n=Math.floor(t.length()),f.beginPath(),o=0;o0&&(a=i-s,r=n-o,l+=Math.sqrt(a*a+r*r)),s=i,o=n;return l},n.prototype._point=function(t,e,i,n,s){return e*(1-t)*(1-t)*(1-t)+3*i*(1-t)*(1-t)*t+3*n*(1-t)*t*t+s*t*t*t},e}(document)}),function(t,e){"function"==typeof define&&define.amd?define(["jquery"],function(t){return e(t)}):"object"==typeof module&&module.exports?module.exports=e(require("jquery")):e(t.jQuery)}(this,function(t){!function(t,e,i){function n(t,e){this.$form=t,this.$input=e,this.reset(),e.on("change paste",this.reset.bind(this))}var s=function(){return!1},o=null,a={numHalted:0,haltValidation:function(e){this.numHalted++,t.formUtils.haltValidation=!0,e.unbind("submit",s).bind("submit",s).find('*[type="submit"]').addClass("disabled").attr("disabled","disabled")},unHaltValidation:function(e){0===--this.numHalted&&(t.formUtils.haltValidation=!1,e.unbind("submit",s).find('*[type="submit"]').removeClass("disabled").removeAttr("disabled","disabled"))}};n.prototype.reset=function(){this.haltedFormValidation=!1,this.hasRun=!1,this.isRunning=!1,this.result=void 0},n.prototype.run=function(t,e){return"keyup"===t?null:this.isRunning?(o=t,this.haltedFormValidation||(a.haltValidation(),this.haltedFormValidation=!0),null):this.hasRun?this.result:(o=t,a.haltValidation(this.$form),this.haltedFormValidation=!0,this.isRunning=!0,this.$input.attr("disabled","disabled").addClass("async-validation"),this.$form.addClass("async-validation"),e(function(t){this.done(t)}.bind(this)),null)},n.prototype.done=function(t){this.result=t,this.hasRun=!0,this.isRunning=!1,this.$input.removeAttr("disabled").removeClass("async-validation"),this.$form.removeClass("async-validation"),this.haltedFormValidation&&(a.unHaltValidation(this.$form),"submit"===o?this.$form.trigger("submit"):this.$input.trigger("validation.revalidate"))},n.loadInstance=function(t,e,i){var s,o=e.get(0);return o.asyncValidators||(o.asyncValidators={}),o.asyncValidators[t]?s=o.asyncValidators[t]:(s=new n(i,e),o.asyncValidators[t]=s),s},t.formUtils=t.extend(t.formUtils||{},{asyncValidation:function(t,e,i){return this.warn("Use of deprecated function $.formUtils.asyncValidation, use $.formUtils.addAsyncValidator() instead"),n.loadInstance(t,e,i)},addAsyncValidator:function(e){var i=t.extend({},e),s=i.validatorFunction;i.async=!0,i.validatorFunction=function(t,e,o,a,r,l){return n.loadInstance(this.name,e,r).run(l,function(n){s.apply(i,[n,t,e,o,a,r,l])})},this.addValidator(i)}}),t(e).bind("validatorsLoaded formValidationSetup",function(e,i){i||(i=t("form")),i.find("[data-validation]").each(function(){var e=t(this);e.valAttr("async",!1),t.each(t.split(e.attr("data-validation")),function(i,n){var s=t.formUtils.validators["validate_"+n];s&&s.async&&e.valAttr("async","yes")})})})}(t,window),function(t,e){"use strict";function i(e){e&&"custom"===e.errorMessagePosition&&"function"==typeof e.errorMessageCustom&&(t.formUtils.warn("Use of deprecated function errorMessageCustom, use config.submitErrorMessageCallback instead"),e.submitErrorMessageCallback=function(t,i){e.errorMessageCustom(t,e.language.errorTitle,i,e)})}function n(e){if(e.errorMessagePosition&&"object"==typeof e.errorMessagePosition){t.formUtils.warn("Deprecated use of config parameter errorMessagePosition, use config.submitErrorMessageCallback instead");var i=e.errorMessagePosition;e.errorMessagePosition="top",e.submitErrorMessageCallback=function(){return i}}}function s(e){var i=e.find("[data-validation-if-checked]");i.length&&t.formUtils.warn('Detected use of attribute "data-validation-if-checked" which is deprecated. Use "data-validation-depends-on" provided by module "logic"'),i.on("beforeValidation",function(){var i=t(this),n=i.valAttr("if-checked"),s=t('input[name="'+n+'"]',e),o=s.is(":checked"),a=(t.formUtils.getValue(s)||"").toString(),r=i.valAttr("if-checked-value");(!o||r&&r!==a)&&i.valAttr("skipped",!0)})}function o(e){var i={se:"sv",cz:"cs",dk:"da"};if(e.lang in i){var n=i[e.lang];t.formUtils.warn('Deprecated use of lang code "'+e.lang+'" use "'+n+'" instead'),e.lang=n}}t.fn.validateForm=function(e,i){return t.formUtils.warn("Use of deprecated function $.validateForm, use $.isValid instead"),this.isValid(e,i,!0)},t(window).on("formValidationPluginInit",function(t,e){o(e),i(e),n(e)}).on("validatorsLoaded formValidationSetup",function(e,i){i||(i=t("form")),s(i)})}(t),function(t){"use strict";var e={resolveErrorMessage:function(t,e,i,n,s){var o=n.validationErrorMsgAttribute+"-"+i.replace("validate_",""),a=t.attr(o);return a||(a=t.attr(n.validationErrorMsgAttribute))||(a="function"!=typeof e.errorMessageKey?s[e.errorMessageKey]:s[e.errorMessageKey(n)])||(a=e.errorMessage),a},getParentContainer:function(e){if(e.valAttr("error-msg-container"))return t(e.valAttr("error-msg-container"));var i=e.parent();return"checkbox"===e.attr("type")&&e.closest(".checkbox").length?i=e.closest(".checkbox").parent():"radio"===e.attr("type")&&e.closest(".radio").length&&(i=e.closest(".radio").parent()),i.closest(".input-group").length&&(i=i.closest(".input-group").parent()),i},applyInputErrorStyling:function(t,e){t.addClass(e.errorElementClass).removeClass(e.successElementClass),this.getParentContainer(t).addClass(e.inputParentClassOnError).removeClass(e.inputParentClassOnSuccess),""!==e.borderColorOnError&&t.css("border-color",e.borderColorOnError)},applyInputSuccessStyling:function(t,e){t.addClass(e.successElementClass),this.getParentContainer(t).addClass(e.inputParentClassOnSuccess)},removeInputStylingAndMessage:function(t,i){t.removeClass(i.successElementClass).removeClass(i.errorElementClass).css("border-color","");var n=e.getParentContainer(t);if(n.removeClass(i.inputParentClassOnError).removeClass(i.inputParentClassOnSuccess),"function"==typeof i.inlineErrorMessageCallback){var s=i.inlineErrorMessageCallback(t,!1,i);s&&s.html("")}else n.find("."+i.errorMessageClass).remove()},removeAllMessagesAndStyling:function(i,n){if("function"==typeof n.submitErrorMessageCallback){var s=n.submitErrorMessageCallback(i,!1,n);s&&s.html("")}else i.find("."+n.errorMessageClass+".alert").remove();i.find("."+n.errorElementClass+",."+n.successElementClass).each(function(){e.removeInputStylingAndMessage(t(this),n)})},setInlineMessage:function(e,i,n){this.applyInputErrorStyling(e,n);var s,o=document.getElementById(e.attr("name")+"_err_msg"),a=!1,r=function(n){t.formUtils.$win.trigger("validationErrorDisplay",[e,n]),n.html(i)},l=function(){var o=!1;a.find("."+n.errorMessageClass).each(function(){if(this.inputReferer===e[0])return o=t(this),!1}),o?i?r(o):o.remove():""!==i&&(s=t('
'),r(s),s[0].inputReferer=e[0],a.prepend(s))};if(o)t.formUtils.warn("Using deprecated element reference "+o.id),a=t(o),l();else if("function"==typeof n.inlineErrorMessageCallback){if(!(a=n.inlineErrorMessageCallback(e,i,n)))return;l()}else{var h=this.getParentContainer(e);s=h.find("."+n.errorMessageClass+".help-block"),0===s.length&&(s=t("").addClass("help-block").addClass(n.errorMessageClass),s.appendTo(h)),r(s)}},setMessageInTopOfForm:function(e,i,n,s){var o='
{errorTitle}
    {fields}
',a=!1;if("function"!=typeof n.submitErrorMessageCallback||(a=n.submitErrorMessageCallback(e,i,n))){var r={errorTitle:s.errorTitle,fields:"",errorMessageClass:n.errorMessageClass};t.each(i,function(t,e){r.fields+="
  • "+e+"
  • "}),t.each(r,function(t,e){o=o.replace("{"+t+"}",e)}),a?a.html(o):e.children().eq(0).before(t(o))}}};t.formUtils=t.extend(t.formUtils||{},{dialogs:e})}(t),function(t,e,i){"use strict";var n=0;t.fn.validateOnBlur=function(e,i){var n=this,s=this.find("*[data-validation]");return s.each(function(){var s=t(this);if(s.is("[type=radio]")){var o=n.find('[type=radio][name="'+s.attr("name")+'"]');o.bind("blur.validation",function(){s.validateInputOnBlur(e,i,!0,"blur")}),i.validateCheckboxRadioOnClick&&o.bind("click.validation",function(){s.validateInputOnBlur(e,i,!0,"click")})}}),s.bind("blur.validation",function(){t(this).validateInputOnBlur(e,i,!0,"blur")}),i.validateCheckboxRadioOnClick&&this.find("input[type=checkbox][data-validation],input[type=radio][data-validation]").bind("click.validation",function(){t(this).validateInputOnBlur(e,i,!0,"click")}),this},t.fn.validateOnEvent=function(e,i){if(0!==this.length){return("FORM"===this[0].nodeName?this.find("*[data-validation-event]"):this).each(function(){var n=t(this),s=n.valAttr("event");s&&n.unbind(s+".validation").bind(s+".validation",function(n){9!==(n||{}).keyCode&&t(this).validateInputOnBlur(e,i,!0,s)})}),this}},t.fn.showHelpOnFocus=function(e){return e||(e="data-validation-help"),this.find("textarea,input").each(function(){var i=t(this),s="jquery_form_help_"+ ++n,o=i.attr(e);i.removeClass("has-help-text").unbind("focus.help").unbind("blur.help"),o&&i.addClass("has-help-txt").bind("focus.help",function(){var e=i.parent().find("."+s);0===e.length&&(e=t("").addClass(s).addClass("help").addClass("help-block").text(o).hide(),i.after(e)),e.fadeIn()}).bind("blur.help",function(){t(this).parent().find("."+s).fadeOut("slow")})}),this},t.fn.validate=function(e,i,n){var s=t.extend({},t.formUtils.LANG,n||{});this.each(function(){var n=t(this),o=n.closest("form").get(0)||{},a=o.validationConfig||t.formUtils.defaultConfig();n.one("validation",function(t,i){"function"==typeof e&&e(i,this,t)}),n.validateInputOnBlur(s,t.extend({},a,i||{}),!0)})},t.fn.willPostponeValidation=function(){return(this.valAttr("suggestion-nr")||this.valAttr("postpone")||this.hasClass("hasDatepicker"))&&!e.postponedValidation},t.fn.validateInputOnBlur=function(i,n,s,o){if(t.formUtils.eventType=o,this.willPostponeValidation()){var a=this,r=this.valAttr("postpone")||200;return e.postponedValidation=function(){a.validateInputOnBlur(i,n,s,o),e.postponedValidation=!1},setTimeout(function(){e.postponedValidation&&e.postponedValidation()},r),this}i=t.extend({},t.formUtils.LANG,i||{}),t.formUtils.dialogs.removeInputStylingAndMessage(this,n);var l=this,h=l.closest("form"),u=t.formUtils.validateInput(l,i,n,h,o),d=function(){l.validateInputOnBlur(i,n,!1,"blur.revalidated")};return"blur"===o&&l.unbind("validation.revalidate",d).one("validation.revalidate",d),s&&l.removeKeyUpValidation(),u.shouldChangeDisplay&&(u.isValid?t.formUtils.dialogs.applyInputSuccessStyling(l,n):t.formUtils.dialogs.setInlineMessage(l,u.errorMsg,n)),!u.isValid&&s&&l.validateOnKeyUp(i,n),this},t.fn.validateOnKeyUp=function(e,i){return this.each(function(){var n=t(this);n.valAttr("has-keyup-event")||n.valAttr("has-keyup-event","true").bind("keyup.validation",function(t){9!==t.keyCode&&n.validateInputOnBlur(e,i,!1,"keyup")})}),this},t.fn.removeKeyUpValidation=function(){return this.each(function(){t(this).valAttr("has-keyup-event",!1).unbind("keyup.validation")}),this},t.fn.valAttr=function(t,e){return void 0===e?this.attr("data-validation-"+t):!1===e||null===e?this.removeAttr("data-validation-"+t):(t=t.length>0?"-"+t:"",this.attr("data-validation"+t,e))},t.fn.isValid=function(e,i,n){if(t.formUtils.isLoadingModules){var s=this;return setTimeout(function(){s.isValid(e,i,n)},200),null}i=t.extend({},t.formUtils.defaultConfig(),i||{}),e=t.extend({},t.formUtils.LANG,e||{}),n=!1!==n,t.formUtils.errorDisplayPreventedWhenHalted&&(delete t.formUtils.errorDisplayPreventedWhenHalted,n=!1);var o=function(e,s){t.inArray(e,r)<0&&r.push(e),l.push(s),s.valAttr("current-error",e),n&&t.formUtils.dialogs.applyInputErrorStyling(s,i)},a=[],r=[],l=[],h=this,u=function(e,n){return"submit"===n||"button"===n||"reset"===n||t.inArray(e,i.ignore||[])>-1};if(n&&t.formUtils.dialogs.removeAllMessagesAndStyling(h,i),h.find("input,textarea,select").filter(':not([type="submit"],[type="button"])').each(function(){var n=t(this),s=n.attr("type"),r="radio"===s||"checkbox"===s,l=n.attr("name");if(!u(l,s)&&(!r||t.inArray(l,a)<0)){r&&a.push(l);var d=t.formUtils.validateInput(n,e,i,h,"submit");d.isValid?d.isValid&&d.shouldChangeDisplay&&(n.valAttr("current-error",!1),t.formUtils.dialogs.applyInputSuccessStyling(n,i)):o(d.errorMsg,n)}}),"function"==typeof i.onValidate){var d=i.onValidate(h);t.isArray(d)?t.each(d,function(t,e){o(e.message,e.element)}):d&&d.element&&d.message&&o(d.message,d.element)}return t.formUtils.isValidatingEntireForm=!1,l.length>0&&n&&("top"===i.errorMessagePosition?t.formUtils.dialogs.setMessageInTopOfForm(h,r,i,e):t.each(l,function(e,n){t.formUtils.dialogs.setInlineMessage(n,n.valAttr("current-error"),i)}),i.scrollToTopOnError&&t.formUtils.$win.scrollTop(h.offset().top-20)),!n&&t.formUtils.haltValidation&&(t.formUtils.errorDisplayPreventedWhenHalted=!0),0===l.length&&!t.formUtils.haltValidation},t.fn.restrictLength=function(e){return new t.formUtils.lengthRestriction(this,e),this},t.fn.addSuggestions=function(e){var i=!1;return this.find("input").each(function(){var n=t(this);i=t.split(n.attr("data-suggestions")),i.length>0&&!n.hasClass("has-suggestions")&&(t.formUtils.suggest(n,i,e),n.addClass("has-suggestions"))}),this}}(t,window),function(t){"use strict";t.formUtils=t.extend(t.formUtils||{},{isLoadingModules:!1,loadedModules:{},registerLoadedModule:function(e){this.loadedModules[t.trim(e).toLowerCase()]=!0},hasLoadedModule:function(e){return t.trim(e).toLowerCase()in this.loadedModules},loadModules:function(e,i,n){if(t.formUtils.isLoadingModules)return void setTimeout(function(){t.formUtils.loadModules(e,i,n)},100);var s=function(e,i){var s=t.split(e),o=s.length,a=function(){0===--o&&(t.formUtils.isLoadingModules=!1,"function"==typeof n&&n())};o>0&&(t.formUtils.isLoadingModules=!0);var r="?_="+(new Date).getTime(),l=document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0];t.each(s,function(e,n){if(n=t.trim(n),0===n.length||t.formUtils.hasLoadedModule(n))a();else{var s=i+n+(".js"===n.slice(-3)?"":".js"),o=document.createElement("SCRIPT");"function"==typeof define&&define.amd?require([s+(".dev.js"===s.slice(-7)?r:"")],a):(o.type="text/javascript",o.onload=a,o.src=s+(".dev.js"===s.slice(-7)?r:""),o.onerror=function(){t.formUtils.warn("Unable to load form validation module "+s,!0),a()},o.onreadystatechange=function(){"complete"!==this.readyState&&"loaded"!==this.readyState||(a(),this.onload=null,this.onreadystatechange=null)},l.appendChild(o))}})};if(i)s(e,i);else{var o=function(){var i=!1;return t('script[src*="form-validator"]').each(function(){if(!(this.src.split("form-validator")[1].split("node_modules").length>1))return i=this.src.substr(0,this.src.lastIndexOf("/"))+"/","/"===i&&(i=""),!1}),!1!==i&&(s(e,i),!0)};o()||t(function(){o()||"function"==typeof n&&n()})}}})}(t),function(t){"use strict";t.split=function(e,i,n){n=void 0===n||!0===n;var s="[,|"+(n?"\\s":"")+"-]\\s*",o=new RegExp(s,"g");if("function"!=typeof i){if(!e)return[];var a=[];return t.each(e.split(i||o),function(e,i){i=t.trim(i),i.length&&a.push(i)}),a}e&&t.each(e.split(o),function(e,n){if(n=t.trim(n),n.length)return i(n,e)})},t.validate=function(e){var i=t.extend(t.formUtils.defaultConfig(),{form:"form",validateOnEvent:!1,validateOnBlur:!0,validateCheckboxRadioOnClick:!0,showHelpOnFocus:!0,addSuggestions:!0,modules:"",onModulesLoaded:null,language:!1,onSuccess:!1,onError:!1,onElementValidate:!1});if(e=t.extend(i,e||{}),t(window).trigger("formValidationPluginInit",[e]),e.lang&&"en"!==e.lang){var n="lang/"+e.lang+".js";e.modules+=e.modules.length?","+n:n}t(e.form).each(function(i,n){n.validationConfig=e;var s=t(n);s.trigger("formValidationSetup",[s,e]),s.find(".has-help-txt").unbind("focus.validation").unbind("blur.validation"),s.removeClass("has-validation-callback").unbind("submit.validation").unbind("reset.validation").find("input[data-validation],textarea[data-validation]").unbind("blur.validation"),s.bind("submit.validation",function(i){var n=t(this),s=function(){return i.stopImmediatePropagation(),!1};if(t.formUtils.haltValidation)return s();if(t.formUtils.isLoadingModules)return setTimeout(function(){n.trigger("submit.validation")},200),s();var o=n.isValid(e.language,e);return t.formUtils.haltValidation?s():o&&"function"==typeof e.onSuccess?!1===e.onSuccess(n)?s():void 0:o||"function"!=typeof e.onError?!!o||s():(e.onError(n),s())}).bind("reset.validation",function(){t.formUtils.dialogs.removeAllMessagesAndStyling(s,e)}).addClass("has-validation-callback"),e.showHelpOnFocus&&s.showHelpOnFocus(),e.addSuggestions&&s.addSuggestions(),e.validateOnBlur&&(s.validateOnBlur(e.language,e),s.bind("html5ValidationAttrsFound",function(){s.validateOnBlur(e.language,e)})),e.validateOnEvent&&s.validateOnEvent(e.language,e)}),""!==e.modules&&t.formUtils.loadModules(e.modules,null,function(){"function"==typeof e.onModulesLoaded&&e.onModulesLoaded();var i="string"==typeof e.form?t(e.form):e.form;t.formUtils.$win.trigger("validatorsLoaded",[i,e])})}}(t),function(t,e){"use strict";var i=t(e);t.formUtils=t.extend(t.formUtils||{},{$win:i,defaultConfig:function(){return{ignore:[],errorElementClass:"error",successElementClass:"valid",borderColorOnError:"#b94a48",errorMessageClass:"form-error",validationRuleAttribute:"data-validation",validationErrorMsgAttribute:"data-validation-error-msg",errorMessagePosition:"inline",errorMessageTemplate:{container:'
    {messages}
    ',messages:"{errorTitle}
      {fields}
    ",field:"
  • {msg}
  • "},scrollToTopOnError:!0,dateFormat:"yyyy-mm-dd",addValidClassOnAll:!1,decimalSeparator:".",inputParentClassOnError:"has-error",inputParentClassOnSuccess:"has-success",validateHiddenInputs:!1,inlineErrorMessageCallback:!1,submitErrorMessageCallback:!1}},validators:{},sanitizers:{},_events:{load:[],valid:[],invalid:[]},haltValidation:!1,addValidator:function(t){var e=0===t.name.indexOf("validate_")?t.name:"validate_"+t.name;void 0===t.validateOnKeyUp&&(t.validateOnKeyUp=!0),this.validators[e]=t},addSanitizer:function(t){this.sanitizers[t.name]=t},warn:function(t,i){"console"in e?"function"==typeof e.console.warn?e.console.warn(t):"function"==typeof e.console.log&&e.console.log(t):i&&alert(t)},getValue:function(t,e){var i=e?e.find(t):t;if(i.length>0){var n=i.eq(0).attr("type");return"radio"===n||"checkbox"===n?i.filter(":checked").val()||"":i.val()||""}return!1},validateInput:function(e,i,n,s,o){n=n||t.formUtils.defaultConfig(),i=i||t.formUtils.LANG,s.length||(s=e.parent());var a=this.getValue(e);e.valAttr("skipped",!1).one("beforeValidation",function(){(e.attr("disabled")||!e.is(":visible")&&!n.validateHiddenInputs)&&e.valAttr("skipped",1)}).trigger("beforeValidation",[a,i,n]);var r="true"===e.valAttr("optional"),l=!a&&r,h=e.attr(n.validationRuleAttribute),u=!0,d="",c={isValid:!0,shouldChangeDisplay:!0,errorMsg:""};if(!h||l||e.valAttr("skipped"))return c.shouldChangeDisplay=n.addValidClassOnAll,c;var p=e.valAttr("ignore");return p&&t.each(p.split(""),function(t,e){a=a.replace(new RegExp("\\"+e,"g"),"")}),t.split(h,function(r){0!==r.indexOf("validate_")&&(r="validate_"+r);var l=t.formUtils.validators[r];if(!l)throw new Error('Using undefined validator "'+r+'". Maybe you have forgotten to load the module that "'+r+'" belongs to?');if("validate_checkbox_group"===r&&(e=s.find('[name="'+e.attr("name")+'"]:eq(0)')),("keyup"!==o||l.validateOnKeyUp)&&(u=l.validatorFunction(a,e,n,i,s,o)),!u)return n.validateOnBlur&&e.validateOnKeyUp(i,n),d=t.formUtils.dialogs.resolveErrorMessage(e,l,r,n,i),!1}),!1===u?(e.trigger("validation",!1),c.errorMsg=d,c.isValid=!1, c.shouldChangeDisplay=!0):null===u?c.shouldChangeDisplay=!1:(e.trigger("validation",!0),c.shouldChangeDisplay=!0),"function"==typeof n.onElementValidate&&null!==d&&n.onElementValidate(c.isValid,e,s,d),e.trigger("afterValidation",[c,o]),c},parseDate:function(e,i,n){var s,o,a,r,l=i.replace(/[a-zA-Z]/gi,"").substring(0,1),h="^",u=i.split(l||null);if(t.each(u,function(t,e){h+=(t>0?"\\"+l:"")+"(\\d{"+e.length+"})"}),h+="$",n){var d=[];t.each(e.split(l),function(t,e){1===e.length&&(e="0"+e),d.push(e)}),e=d.join(l)}if(null===(s=e.match(new RegExp(h))))return!1;var c=function(e,i,n){for(var s=0;s28&&(r%4!=0||r%100==0&&r%400!=0)||2===a&&o>29&&(r%4==0||r%100!=0&&r%400==0)||a>12||0===a)&&(!(this.isShortMonth(a)&&o>30||!this.isShortMonth(a)&&o>31||0===o)&&[r,a,o])},parseDateInt:function(t){return 0===t.indexOf("0")&&(t=t.replace("0","")),parseInt(t,10)},isShortMonth:function(t){return t%2==0&&t<7||t%2!=0&&t>7},lengthRestriction:function(e,i){var n=parseInt(i.text(),10),s=0,o=function(){var t=e.val().length;if(t>n){var o=e.scrollTop();e.val(e.val().substring(0,n)),e.scrollTop(o)}s=n-t,s<0&&(s=0),i.text(s)};t(e).bind("keydown keyup keypress focus blur",o).bind("cut paste",function(){setTimeout(o,100)}),t(document).bind("ready",o)},numericRangeCheck:function(e,i){var n=t.split(i),s=parseInt(i.substr(3),10);return 1===n.length&&-1===i.indexOf("min")&&-1===i.indexOf("max")&&(n=[i,i]),2===n.length&&(eparseInt(n[1],10))?["out",n[0],n[1]]:0===i.indexOf("min")&&es?["max",s]:["ok"]},_numSuggestionElements:0,_selectedSuggestion:null,_previousTypedVal:null,suggest:function(e,n,s){var o={css:{maxHeight:"150px",background:"#FFF",lineHeight:"150%",textDecoration:"underline",overflowX:"hidden",overflowY:"auto",border:"#CCC solid 1px",borderTop:"none",cursor:"pointer"},activeSuggestionCSS:{background:"#E9E9E9"}},a=function(t,e){var i=e.offset();t.css({width:e.outerWidth(),left:i.left+"px",top:i.top+e.outerHeight()+"px"})};s&&t.extend(o,s),o.css.position="absolute",o.css["z-index"]=9999,e.attr("autocomplete","off"),0===this._numSuggestionElements&&i.bind("resize",function(){t(".jquery-form-suggestions").each(function(){var e=t(this),i=e.attr("data-suggest-container");a(e,t(".suggestions-"+i).eq(0))})}),this._numSuggestionElements++;var r=function(e){var i=e.valAttr("suggestion-nr");t.formUtils._selectedSuggestion=null,t.formUtils._previousTypedVal=null,t(".jquery-form-suggestion-"+i).fadeOut("fast")};return e.data("suggestions",n).valAttr("suggestion-nr",this._numSuggestionElements).unbind("focus.suggest").bind("focus.suggest",function(){t(this).trigger("keyup"),t.formUtils._selectedSuggestion=null}).unbind("keyup.suggest").bind("keyup.suggest",function(){var i=t(this),n=[],s=t.trim(i.val()).toLocaleLowerCase();if(s!==t.formUtils._previousTypedVal){t.formUtils._previousTypedVal=s;var l=!1,h=i.valAttr("suggestion-nr"),u=t(".jquery-form-suggestion-"+h);if(u.scrollTop(0),""!==s){var d=s.length>2;t.each(i.data("suggestions"),function(t,e){var i=e.toLocaleLowerCase();if(i===s)return n.push(""+e+""),l=!0,!1;(0===i.indexOf(s)||d&&i.indexOf(s)>-1)&&n.push(e.replace(new RegExp(s,"gi"),"$&"))})}l||0===n.length&&u.length>0?u.hide():n.length>0&&0===u.length?(u=t("
    ").css(o.css).appendTo("body"),e.addClass("suggestions-"+h),u.attr("data-suggest-container",h).addClass("jquery-form-suggestions").addClass("jquery-form-suggestion-"+h)):n.length>0&&!u.is(":visible")&&u.show(),n.length>0&&s.length!==n[0].length&&(a(u,i),u.html(""),t.each(n,function(e,n){t("
    ").append(n).css({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"5px"}).addClass("form-suggest-element").appendTo(u).click(function(){i.focus(),i.val(t(this).text()),i.trigger("change"),r(i)})}))}}).unbind("keydown.validation").bind("keydown.validation",function(e){var i,n,s=e.keyCode?e.keyCode:e.which,a=t(this);if(13===s&&null!==t.formUtils._selectedSuggestion){if(i=a.valAttr("suggestion-nr"),n=t(".jquery-form-suggestion-"+i),n.length>0){var l=n.find("div").eq(t.formUtils._selectedSuggestion).text();a.val(l),a.trigger("change"),r(a),e.preventDefault()}}else{i=a.valAttr("suggestion-nr"),n=t(".jquery-form-suggestion-"+i);var h=n.children();if(h.length>0&&t.inArray(s,[38,40])>-1){38===s?(null===t.formUtils._selectedSuggestion?t.formUtils._selectedSuggestion=h.length-1:t.formUtils._selectedSuggestion--,t.formUtils._selectedSuggestion<0&&(t.formUtils._selectedSuggestion=h.length-1)):40===s&&(null===t.formUtils._selectedSuggestion?t.formUtils._selectedSuggestion=0:t.formUtils._selectedSuggestion++,t.formUtils._selectedSuggestion>h.length-1&&(t.formUtils._selectedSuggestion=0));var u=n.innerHeight(),d=n.scrollTop(),c=n.children().eq(0).outerHeight(),p=c*t.formUtils._selectedSuggestion;return(pd+u)&&n.scrollTop(p),h.removeClass("active-suggestion").css("background","none").eq(t.formUtils._selectedSuggestion).addClass("active-suggestion").css(o.activeSuggestionCSS),e.preventDefault(),!1}}}).unbind("blur.suggest").bind("blur.suggest",function(){r(t(this))}),e},LANG:{errorTitle:"Form submission failed!",requiredField:"This is a required field",requiredFields:"You have not answered all required fields",badTime:"You have not given a correct time",badEmail:"You have not given a correct e-mail address",badTelephone:"You have not given a correct phone number",badSecurityAnswer:"You have not given a correct answer to the security question",badDate:"You have not given a correct date",lengthBadStart:"The input value must be between ",lengthBadEnd:" characters",lengthTooLongStart:"The input value is longer than ",lengthTooShortStart:"The input value is shorter than ",notConfirmed:"Input values could not be confirmed",badDomain:"Incorrect domain value",badUrl:"The input value is not a correct URL",badCustomVal:"The input value is incorrect",andSpaces:" and spaces ",badInt:"The input value was not a correct number",badSecurityNumber:"Your social security number was incorrect",badUKVatAnswer:"Incorrect UK VAT Number",badUKNin:"Incorrect UK NIN",badUKUtr:"Incorrect UK UTR Number",badStrength:"The password isn't strong enough",badNumberOfSelectedOptionsStart:"You have to choose at least ",badNumberOfSelectedOptionsEnd:" answers",badAlphaNumeric:"The input value can only contain alphanumeric characters ",badAlphaNumericExtra:" and ",wrongFileSize:"The file you are trying to upload is too large (max %s)",wrongFileType:"Only files of type %s is allowed",groupCheckedRangeStart:"Please choose between ",groupCheckedTooFewStart:"Please choose at least ",groupCheckedTooManyStart:"Please choose a maximum of ",groupCheckedEnd:" item(s)",badCreditCard:"The credit card number is not correct",badCVV:"The CVV number was not correct",wrongFileDim:"Incorrect image dimensions,",imageTooTall:"the image can not be taller than",imageTooWide:"the image can not be wider than",imageTooSmall:"the image was too small",min:"min",max:"max",imageRatioNotAccepted:"Image ratio is not be accepted",badBrazilTelephoneAnswer:"The phone number entered is invalid",badBrazilCEPAnswer:"The CEP entered is invalid",badBrazilCPFAnswer:"The CPF entered is invalid",badPlPesel:"The PESEL entered is invalid",badPlNip:"The NIP entered is invalid",badPlRegon:"The REGON entered is invalid",badreCaptcha:"Please confirm that you are not a bot",passwordComplexityStart:"Password must contain at least ",passwordComplexitySeparator:", ",passwordComplexityUppercaseInfo:" uppercase letter(s)",passwordComplexityLowercaseInfo:" lowercase letter(s)",passwordComplexitySpecialCharsInfo:" special character(s)",passwordComplexityNumericCharsInfo:" numeric character(s)",passwordComplexityEnd:"."}})}(t,window),function(t){t.formUtils.addValidator({name:"email",validatorFunction:function(e){var i=e.toLowerCase().split("@"),n=i[0],s=i[1];if(n&&s){if(0===n.indexOf('"')){var o=n.length;if(n=n.replace(/\"/g,""),n.length!==o-2)return!1}return t.formUtils.validators.validate_domain.validatorFunction(i[1])&&0!==n.indexOf(".")&&"."!==n.substring(n.length-1,n.length)&&-1===n.indexOf("..")&&!/[^\w\+\.\-\#\-\_\~\!\$\&\'\(\)\*\+\,\;\=\:]/.test(n)}return!1},errorMessage:"",errorMessageKey:"badEmail"}),t.formUtils.addValidator({name:"domain",validatorFunction:function(t){return t.length>0&&t.length<=253&&!/[^a-zA-Z0-9]/.test(t.slice(-2))&&!/[^a-zA-Z0-9]/.test(t.substr(0,1))&&!/[^a-zA-Z0-9\.\-]/.test(t)&&1===t.split("..").length&&t.split(".").length>1},errorMessage:"",errorMessageKey:"badDomain"}),t.formUtils.addValidator({name:"required",validatorFunction:function(e,i,n,s,o){switch(i.attr("type")){case"checkbox":return i.is(":checked");case"radio":return o.find('input[name="'+i.attr("name")+'"]').filter(":checked").length>0;default:return""!==t.trim(e)}},errorMessage:"",errorMessageKey:function(t){return"top"===t.errorMessagePosition||"function"==typeof t.errorMessagePosition?"requiredFields":"requiredField"}}),t.formUtils.addValidator({name:"length",validatorFunction:function(e,i,n,s){var o=i.valAttr("length"),a=i.attr("type");if(void 0===o)return alert('Please add attribute "data-validation-length" to '+i[0].nodeName+" named "+i.attr("name")),!0;var r,l="file"===a&&void 0!==i.get(0).files?i.get(0).files.length:e.length,h=t.formUtils.numericRangeCheck(l,o);switch(h[0]){case"out":this.errorMessage=s.lengthBadStart+o+s.lengthBadEnd,r=!1;break;case"min":this.errorMessage=s.lengthTooShortStart+h[1]+s.lengthBadEnd,r=!1;break;case"max":this.errorMessage=s.lengthTooLongStart+h[1]+s.lengthBadEnd,r=!1;break;default:r=!0}return r},errorMessage:"",errorMessageKey:""}),t.formUtils.addValidator({name:"url",validatorFunction:function(e){if(/^(https?|ftp):\/\/((((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])(\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])(\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/(((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|\[|\]|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#(((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(e)){var i=e.split("://")[1],n=i.indexOf("/");return n>-1&&(i=i.substr(0,n)),t.formUtils.validators.validate_domain.validatorFunction(i)}return!1},errorMessage:"",errorMessageKey:"badUrl"}),t.formUtils.addValidator({name:"number",validatorFunction:function(t,e,i){if(""!==t){var n,s,o=e.valAttr("allowing")||"",a=e.valAttr("decimal-separator")||i.decimalSeparator,r=!1,l=e.valAttr("step")||"",h=!1;if((e.attr("data-sanitize")||"").match(/(^|[\s])numberFormat([\s]|$)/i)){if(!window.numeral)throw new ReferenceError("The data-sanitize value numberFormat cannot be used without the numeral library. Please see Data Validation in http://www.formvalidator.net for more information.");t.length&&(t=String(numeral().unformat(t)))}if(-1===o.indexOf("number")&&(o+=",number"),-1===o.indexOf("negative")&&0===t.indexOf("-"))return!1;if(o.indexOf("range")>-1&&(n=parseFloat(o.substring(o.indexOf("[")+1,o.indexOf(";"))),s=parseFloat(o.substring(o.indexOf(";")+1,o.indexOf("]"))),r=!0),""!==l&&(h=!0),","===a){if(t.indexOf(".")>-1)return!1;t=t.replace(",",".")}if(""===t.replace(/[0-9-]/g,"")&&(!r||t>=n&&t<=s)&&(!h||t%l==0))return!0;if(o.indexOf("float")>-1&&null!==t.match(new RegExp("^([0-9-]+)\\.([0-9]+)$"))&&(!r||t>=n&&t<=s)&&(!h||t%l==0))return!0}return!1},errorMessage:"",errorMessageKey:"badInt"}),t.formUtils.addValidator({name:"alphanumeric",validatorFunction:function(e,i,n,s){var o=i.valAttr("allowing"),a="",r=!1;if(o){a="^([a-zA-Z0-9"+o+"]+)$";var l=o.replace(/\\/g,"");l.indexOf(" ")>-1&&(r=!0,l=l.replace(" ",""),l+=s.andSpaces||t.formUtils.LANG.andSpaces),s.badAlphaNumericAndExtraAndSpaces&&s.badAlphaNumericAndExtra?this.errorMessage=r?s.badAlphaNumericAndExtraAndSpaces+l:s.badAlphaNumericAndExtra+l+s.badAlphaNumericExtra:this.errorMessage=s.badAlphaNumeric+s.badAlphaNumericExtra+l}else a="^([a-zA-Z0-9]+)$",this.errorMessage=s.badAlphaNumeric;return new RegExp(a).test(e)},errorMessage:"",errorMessageKey:""}),t.formUtils.addValidator({name:"custom",validatorFunction:function(t,e){return new RegExp(e.valAttr("regexp")).test(t)},errorMessage:"",errorMessageKey:"badCustomVal"}),t.formUtils.addValidator({name:"date",validatorFunction:function(e,i,n){var s=i.valAttr("format")||n.dateFormat||"yyyy-mm-dd",o="false"===i.valAttr("require-leading-zero");return!1!==t.formUtils.parseDate(e,s,o)},errorMessage:"",errorMessageKey:"badDate"}),t.formUtils.addValidator({name:"checkbox_group",validatorFunction:function(e,i,n,s,o){var a=!0,r=i.attr("name"),l=t('input[type=checkbox][name^="'+r+'"]',o),h=l.filter(":checked").length,u=i.valAttr("qty");if(void 0===u){var d=i.get(0).nodeName;alert('Attribute "data-validation-qty" is missing from '+d+" named "+i.attr("name"))}var c=t.formUtils.numericRangeCheck(h,u);switch(c[0]){case"out":this.errorMessage=s.groupCheckedRangeStart+u+s.groupCheckedEnd,a=!1;break;case"min":this.errorMessage=s.groupCheckedTooFewStart+c[1]+(s.groupCheckedTooFewEnd||s.groupCheckedEnd),a=!1;break;case"max":this.errorMessage=s.groupCheckedTooManyStart+c[1]+(s.groupCheckedTooManyEnd||s.groupCheckedEnd),a=!1;break;default:a=!0}if(!a){var p=function(){l.unbind("click",p),l.filter("*[data-validation]").validateInputOnBlur(s,n,!1,"blur")};l.bind("click",p)}return a}})}(t)});