mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-11 16:14:18 -08:00
12 lines
329 KiB
JavaScript
12 lines
329 KiB
JavaScript
if("undefined"==typeof jQuery)throw new Error("AdminLTE requires jQuery");+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),r=o.data(i);if(!r){var s=t.extend({},n,o.data(),"object"==typeof e&&e);o.data(i,r=new a(o,s))}if("string"==typeof r){if(void 0===r[e])throw new Error("No method named "+e);r[e]()}})}var i="lte.boxrefresh",n={source:"",params:{},trigger:".refresh-btn",content:".box-body",loadInContent:!0,responseType:"",overlayTemplate:'<div class="overlay"><div class="fa fa-refresh fa-spin"></div></div>',onLoadStart:function(){},onLoadDone:function(t){return t}},o={data:'[data-widget="box-refresh"]'},a=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()};a.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)},a.prototype._setUpListeners=function(){t(this.element).on("click",o.trigger,function(t){t&&t.preventDefault(),this.load()}.bind(this))},a.prototype._addOverlay=function(){t(this.element).append(this.$overlay)},a.prototype._removeOverlay=function(){t(this.element).remove(this.$overlay)};var r=t.fn.boxRefresh;t.fn.boxRefresh=e,t.fn.boxRefresh.Constructor=a,t.fn.boxRefresh.noConflict=function(){return t.fn.boxRefresh=r,this},t(window).on("load",function(){t(o.data).each(function(){e.call(t(this))})})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var o=t(this),a=o.data(i);if(!a){var r=t.extend({},n,o.data(),"object"==typeof e&&e);o.data(i,a=new s(o,r))}if("string"==typeof e){if(void 0===a[e])throw new Error("No method named "+e);a[e]()}})}var i="lte.boxwidget",n={animationSpeed:500,collapseTrigger:'[data-widget="collapse"]',removeTrigger:'[data-widget="remove"]',collapseIcon:"fa-minus",expandIcon:"fa-plus",removeIcon:"fa-times"},o={data:".box",collapsed:".collapsed-box",header:".box-header",body:".box-body",footer:".box-footer",tools:".box-tools"},a={collapsed:"collapsed-box"},r={collapsed:"collapsed.boxwidget",expanded:"expanded.boxwidget",removed:"removed.boxwidget"},s=function(t,e){this.element=t,this.options=e,this._setUpListeners()};s.prototype.toggle=function(){t(this.element).is(o.collapsed)?this.expand():this.collapse()},s.prototype.expand=function(){var e=t.Event(r.expanded),i=this.options.collapseIcon,n=this.options.expandIcon;t(this.element).removeClass(a.collapsed),t(this.element).children(o.header+", "+o.body+", "+o.footer).children(o.tools).find("."+n).removeClass(n).addClass(i),t(this.element).children(o.body+", "+o.footer).slideDown(this.options.animationSpeed,function(){t(this.element).trigger(e)}.bind(this))},s.prototype.collapse=function(){var e=t.Event(r.collapsed),i=this.options.collapseIcon,n=this.options.expandIcon;t(this.element).children(o.header+", "+o.body+", "+o.footer).children(o.tools).find("."+i).removeClass(i).addClass(n),t(this.element).children(o.body+", "+o.footer).slideUp(this.options.animationSpeed,function(){t(this.element).addClass(a.collapsed),t(this.element).trigger(e)}.bind(this))},s.prototype.remove=function(){var e=t.Event(r.removed);t(this.element).slideUp(this.options.animationSpeed,function(){t(this.element).trigger(e),t(this.element).remove()}.bind(this))},s.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=s,t.fn.boxWidget.noConflict=function(){return t.fn.boxWidget=l,this},t(window).on("load",function(){t(o.data).each(function(){e.call(t(this))})})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var o=t(this),a=o.data(i);if(!a){var r=t.extend({},n,o.data(),"object"==typeof e&&e);o.data(i,a=new s(o,r))}"string"==typeof e&&a.toggle()})}var i="lte.controlsidebar",n={slide:!0},o={sidebar:".control-sidebar",data:'[data-toggle="control-sidebar"]',open:".control-sidebar-open",bg:".control-sidebar-bg",wrapper:".wrapper",content:".content-wrapper",boxed:".layout-boxed"},a={open:"control-sidebar-open",fixed:"fixed"},r={collapsed:"collapsed.controlsidebar",expanded:"expanded.controlsidebar"},s=function(t,e){this.element=t,this.options=e,this.hasBindedResize=!1,this.init()};s.prototype.init=function(){t(this.element).is(o.data)||t(this).on("click",this.toggle),this.fix(),t(window).resize(function(){this.fix()}.bind(this))},s.prototype.toggle=function(e){e&&e.preventDefault(),this.fix(),t(o.sidebar).is(o.open)||t("body").is(o.open)?this.collapse():this.expand()},s.prototype.expand=function(){this.options.slide?t(o.sidebar).addClass(a.open):t("body").addClass(a.open),t(this.element).trigger(t.Event(r.expanded))},s.prototype.collapse=function(){t("body, "+o.sidebar).removeClass(a.open),t(this.element).trigger(t.Event(r.collapsed))},s.prototype.fix=function(){t("body").is(o.boxed)&&this._fixForBoxed(t(o.bg))},s.prototype._fixForBoxed=function(e){e.css({position:"absolute",height:t(o.wrapper).height()})};var l=t.fn.controlSidebar;t.fn.controlSidebar=e,t.fn.controlSidebar.Constructor=s,t.fn.controlSidebar.noConflict=function(){return t.fn.controlSidebar=l,this},t(document).on("click",o.data,function(i){i&&i.preventDefault(),e.call(t(this),"toggle")})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data(i);o||n.data(i,o=new a(n)),"string"==typeof e&&o.toggle(n)})}var i="lte.directchat",n={data:'[data-widget="chat-pane-toggle"]',box:".direct-chat"},o={open:"direct-chat-contacts-open"},a=function(t){this.element=t};a.prototype.toggle=function(t){t.parents(n.box).first().toggleClass(o.open)};var r=t.fn.directChat;t.fn.directChat=e,t.fn.directChat.Constructor=a,t.fn.directChat.noConflict=function(){return t.fn.directChat=r,this},t(document).on("click",n.data,function(i){i&&i.preventDefault(),e.call(t(this),"toggle")})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var o=t(this),a=o.data(i);if(!a){var s=t.extend({},n,o.data(),"object"==typeof e&&e);o.data(i,a=new r(s))}if("string"==typeof e){if(void 0===a[e])throw new Error("No method named "+e);a[e]()}})}var i="lte.layout",n={slimscroll:!0,resetHeight:!0},o={wrapper:".wrapper",contentWrapper:".content-wrapper",layoutBoxed:".layout-boxed",mainFooter:".main-footer",mainHeader:".main-header",sidebar:".sidebar",controlSidebar:".control-sidebar",fixed:".fixed",sidebarMenu:".sidebar-menu",logo:".main-header .logo"},a={fixed:"fixed",holdTransition:"hold-transition"},r=function(t){this.options=t,this.bindedResize=!1,this.activate()};r.prototype.activate=function(){this.fix(),this.fixSidebar(),t("body").removeClass(a.holdTransition),this.options.resetHeight&&t("body, html, "+o.wrapper).css({height:"auto","min-height":"100%"}),this.bindedResize||(t(window).resize(function(){this.fix(),this.fixSidebar(),t(o.logo+", "+o.sidebar).one("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend",function(){this.fix(),this.fixSidebar()}.bind(this))}.bind(this)),this.bindedResize=!0),t(o.sidebarMenu).on("expanded.tree",function(){this.fix(),this.fixSidebar()}.bind(this)),t(o.sidebarMenu).on("collapsed.tree",function(){this.fix(),this.fixSidebar()}.bind(this))},r.prototype.fix=function(){t(o.layoutBoxed+" > "+o.wrapper).css("overflow","hidden");var e=t(o.mainFooter).outerHeight()||0,i=t(o.mainHeader).outerHeight()||0,n=i+e,r=t(window).height(),s=t(o.sidebar).height()||0;if(t("body").hasClass(a.fixed))t(o.contentWrapper).css("min-height",r-e);else{var l;r>=s?(t(o.contentWrapper).css("min-height",r-n),l=r-n):(t(o.contentWrapper).css("min-height",s),l=s);var d=t(o.controlSidebar);void 0!==d&&d.height()>l&&t(o.contentWrapper).css("min-height",d.height())}},r.prototype.fixSidebar=function(){if(!t("body").hasClass(a.fixed))return void(void 0!==t.fn.slimScroll&&t(o.sidebar).slimScroll({destroy:!0}).height("auto"));this.options.slimscroll&&void 0!==t.fn.slimScroll&&t(o.sidebar).slimScroll({height:t(window).height()-t(o.mainHeader).height()+"px"})};var s=t.fn.layout;t.fn.layout=e,t.fn.layout.Constuctor=r,t.fn.layout.noConflict=function(){return t.fn.layout=s,this},t(window).on("load",function(){e.call(t("body"))})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var o=t(this),a=o.data(i);if(!a){var r=t.extend({},n,o.data(),"object"==typeof e&&e);o.data(i,a=new s(r))}"toggle"===e&&a.toggle()})}var i="lte.pushmenu",n={collapseScreenSize:767,expandOnHover:!1,expandTransitionDelay:200},o={collapsed:".sidebar-collapse",open:".sidebar-open",mainSidebar:".main-sidebar",contentWrapper:".content-wrapper",searchInput:".sidebar-form .form-control",button:'[data-toggle="push-menu"]',mini:".sidebar-mini",expanded:".sidebar-expanded-on-hover",layoutFixed:".fixed"},a={collapsed:"sidebar-collapse",open:"sidebar-open",mini:"sidebar-mini",expanded:"sidebar-expanded-on-hover",expandFeature:"sidebar-mini-expand-feature",layoutFixed:"fixed"},r={expanded:"expanded.pushMenu",collapsed:"collapsed.pushMenu"},s=function(t){this.options=t,this.init()};s.prototype.init=function(){(this.options.expandOnHover||t("body").is(o.mini+o.layoutFixed))&&(this.expandOnHover(),t("body").addClass(a.expandFeature)),t(o.contentWrapper).click(function(){t(window).width()<=this.options.collapseScreenSize&&t("body").hasClass(a.open)&&this.close()}.bind(this)),t(o.searchInput).click(function(t){t.stopPropagation()})},s.prototype.toggle=function(){var e=t(window).width(),i=!t("body").hasClass(a.collapsed);e<=this.options.collapseScreenSize&&(i=t("body").hasClass(a.open)),i?this.close():this.open()},s.prototype.open=function(){t(window).width()>this.options.collapseScreenSize?t("body").removeClass(a.collapsed).trigger(t.Event(r.expanded)):t("body").addClass(a.open).trigger(t.Event(r.expanded))},s.prototype.close=function(){t(window).width()>this.options.collapseScreenSize?t("body").addClass(a.collapsed).trigger(t.Event(r.collapsed)):t("body").removeClass(a.open+" "+a.collapsed).trigger(t.Event(r.collapsed))},s.prototype.expandOnHover=function(){t(o.mainSidebar).hover(function(){t("body").is(o.mini+o.collapsed)&&t(window).width()>this.options.collapseScreenSize&&this.expand()}.bind(this),function(){t("body").is(o.expanded)&&this.collapse()}.bind(this))},s.prototype.expand=function(){setTimeout(function(){t("body").removeClass(a.collapsed).addClass(a.expanded)},this.options.expandTransitionDelay)},s.prototype.collapse=function(){setTimeout(function(){t("body").removeClass(a.expanded).addClass(a.collapsed)},this.options.expandTransitionDelay)};var l=t.fn.pushMenu;t.fn.pushMenu=e,t.fn.pushMenu.Constructor=s,t.fn.pushMenu.noConflict=function(){return t.fn.pushMenu=l,this},t(document).on("click",o.button,function(i){i.preventDefault(),e.call(t(this),"toggle")}),t(window).on("load",function(){e.call(t(o.button))})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var o=t(this),a=o.data(i);if(!a){var s=t.extend({},n,o.data(),"object"==typeof e&&e);o.data(i,a=new r(o,s))}if("string"==typeof a){if(void 0===a[e])throw new Error("No method named "+e);a[e]()}})}var i="lte.todolist",n={onCheck:function(t){return t},onUnCheck:function(t){return t}},o={data:'[data-widget="todo-list"]'},a={done:"done"},r=function(t,e){this.element=t,this.options=e,this._setUpListeners()};r.prototype.toggle=function(t){if(t.parents(o.li).first().toggleClass(a.done),!t.prop("checked"))return void this.unCheck(t);this.check(t)},r.prototype.check=function(t){this.options.onCheck.call(t)},r.prototype.unCheck=function(t){this.options.onUnCheck.call(t)},r.prototype._setUpListeners=function(){var e=this;t(this.element).on("change ifChanged","input:checkbox",function(){e.toggle(t(this))})};var s=t.fn.todoList;t.fn.todoList=e,t.fn.todoList.Constructor=r,t.fn.todoList.noConflict=function(){return t.fn.todoList=s,this},t(window).on("load",function(){t(o.data).each(function(){e.call(t(this))})})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var o=t(this);if(!o.data(i)){var a=t.extend({},n,o.data(),"object"==typeof e&&e);o.data(i,new s(o,a))}})}var i="lte.tree",n={animationSpeed:500,accordion:!0,followLink:!1,trigger:".treeview a"},o={tree:".tree",treeview:".treeview",treeviewMenu:".treeview-menu",open:".menu-open, .active",li:"li",data:'[data-widget="tree"]',active:".active"},a={open:"menu-open",tree:"tree"},r={collapsed:"collapsed.tree",expanded:"expanded.tree"},s=function(e,i){this.element=e,this.options=i,t(this.element).addClass(a.tree),t(o.treeview+o.active,this.element).addClass(a.open),this._setUpListeners()};s.prototype.toggle=function(t,e){var i=t.next(o.treeviewMenu),n=t.parent(),r=n.hasClass(a.open);n.is(o.treeview)&&(this.options.followLink&&"#"!==t.attr("href")||e.preventDefault(),r?this.collapse(i,n):this.expand(i,n))},s.prototype.expand=function(e,i){var n=t.Event(r.expanded);if(this.options.accordion){var s=i.siblings(o.open),l=s.children(o.treeviewMenu);this.collapse(l,s)}i.addClass(a.open),e.slideDown(this.options.animationSpeed,function(){t(this.element).trigger(n)}.bind(this))},s.prototype.collapse=function(e,i){var n=t.Event(r.collapsed);i.removeClass(a.open),e.slideUp(this.options.animationSpeed,function(){t(this.element).trigger(n)}.bind(this))},s.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=s,t.fn.tree.noConflict=function(){return t.fn.tree=l,this},t(window).on("load",function(){t(o.data).each(function(){e.call(t(this))})})}(jQuery),function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():t.Tether=e()}(this,function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t){var i=t.getBoundingClientRect(),n={};for(var o in i)n[o]=i[o];if(t.ownerDocument!==document){var a=t.ownerDocument.defaultView.frameElement;if(a){var r=e(a);n.top+=r.top,n.bottom+=r.top,n.left+=r.left,n.right+=r.left}}return n}function i(t){var e=getComputedStyle(t)||{},i=e.position,n=[];if("fixed"===i)return[t];for(var o=t;(o=o.parentNode)&&o&&1===o.nodeType;){var a=void 0;try{a=getComputedStyle(o)}catch(t){}if(void 0===a||null===a)return n.push(o),n;var r=a,s=r.overflow,l=r.overflowX;/(auto|scroll|overlay)/.test(s+r.overflowY+l)&&("absolute"!==i||["relative","absolute","fixed"].indexOf(a.position)>=0)&&n.push(o)}return n.push(t.ownerDocument.body),t.ownerDocument!==document&&n.push(t.ownerDocument.defaultView),n}function n(){k&&document.body.removeChild(k),k=null}function o(t){var i=void 0;t===document?(i=document,t=document.documentElement):i=t.ownerDocument;var n=i.documentElement,o=e(t),a=D();return o.top-=a.top,o.left-=a.left,void 0===o.width&&(o.width=document.body.scrollWidth-o.left-o.right),void 0===o.height&&(o.height=document.body.scrollHeight-o.top-o.bottom),o.top=o.top-n.clientTop,o.left=o.left-n.clientLeft,o.right=i.body.clientWidth-o.width-o.left,o.bottom=i.body.clientHeight-o.height-o.top,o}function a(t){return t.offsetParent||document.documentElement}function r(){if(M)return M;var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");s(e.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e);var i=t.offsetWidth;e.style.overflow="scroll";var n=t.offsetWidth;i===n&&(n=e.clientWidth),document.body.removeChild(e);var o=i-n;return M={width:o,height:o}}function s(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=[];return Array.prototype.push.apply(e,arguments),e.slice(1).forEach(function(e){if(e)for(var i in e)({}).hasOwnProperty.call(e,i)&&(t[i]=e[i])}),t}function l(t,e){if(void 0!==t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.remove(e)});else{var i=new RegExp("(^| )"+e.split(" ").join("|")+"( |$)","gi"),n=h(t).replace(i," ");c(t,n)}}function d(t,e){if(void 0!==t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.add(e)});else{l(t,e);var i=h(t)+" "+e;c(t,i)}}function u(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=h(t);return new RegExp("(^| )"+e+"( |$)","gi").test(i)}function h(t){return t.className instanceof t.ownerDocument.defaultView.SVGAnimatedString?t.className.baseVal:t.className}function c(t,e){t.setAttribute("class",e)}function f(t,e,i){i.forEach(function(i){-1===e.indexOf(i)&&u(t,i)&&l(t,i)}),e.forEach(function(e){u(t,e)||d(t,e)})}function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function g(t,e){var i=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return t+i>=e&&e>=t-i}function m(){return"object"==typeof performance&&"function"==typeof performance.now?performance.now():+new Date}function v(){for(var t={top:0,left:0},e=arguments.length,i=Array(e),n=0;n<e;n++)i[n]=arguments[n];return i.forEach(function(e){var i=e.top,n=e.left;"string"==typeof i&&(i=parseFloat(i,10)),"string"==typeof n&&(n=parseFloat(n,10)),t.top+=i,t.left+=n}),t}function b(t,e){return"string"==typeof t.left&&-1!==t.left.indexOf("%")&&(t.left=parseFloat(t.left,10)/100*e.width),"string"==typeof t.top&&-1!==t.top.indexOf("%")&&(t.top=parseFloat(t.top,10)/100*e.height),t}function y(t,e){return"scrollParent"===e?e=t.scrollParents[0]:"window"===e&&(e=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),e===document&&(e=e.documentElement),void 0!==e.nodeType&&function(){var t=e,i=o(e),n=i,a=getComputedStyle(e);if(e=[n.left,n.top,i.width+n.left,i.height+n.top],t.ownerDocument!==document){var r=t.ownerDocument.defaultView;e[0]+=r.pageXOffset,e[1]+=r.pageYOffset,e[2]+=r.pageXOffset,e[3]+=r.pageYOffset}Y.forEach(function(t,i){t=t[0].toUpperCase()+t.substr(1),"Top"===t||"Left"===t?e[i]+=parseFloat(a["border"+t+"Width"]):e[i]-=parseFloat(a["border"+t+"Width"])})}(),e}var x=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),w=void 0;void 0===w&&(w={modules:[]});var k=null,_=function(){var t=0;return function(){return++t}}(),C={},D=function(){var t=k;t&&document.body.contains(t)||(t=document.createElement("div"),t.setAttribute("data-tether-id",_()),s(t.style,{top:0,left:0,position:"absolute"}),document.body.appendChild(t),k=t);var i=t.getAttribute("data-tether-id");return void 0===C[i]&&(C[i]=e(t),T(function(){delete C[i]})),C[i]},M=null,S=[],T=function(t){S.push(t)},F=function(){for(var t=void 0;t=S.pop();)t()},A=function(){function e(){t(this,e)}return x(e,[{key:"on",value:function(t,e,i){var n=!(arguments.length<=3||void 0===arguments[3])&&arguments[3];void 0===this.bindings&&(this.bindings={}),void 0===this.bindings[t]&&(this.bindings[t]=[]),this.bindings[t].push({handler:e,ctx:i,once:n})}},{key:"once",value:function(t,e,i){this.on(t,e,i,!0)}},{key:"off",value:function(t,e){if(void 0!==this.bindings&&void 0!==this.bindings[t])if(void 0===e)delete this.bindings[t];else for(var i=0;i<this.bindings[t].length;)this.bindings[t][i].handler===e?this.bindings[t].splice(i,1):++i}},{key:"trigger",value:function(t){if(void 0!==this.bindings&&this.bindings[t]){for(var e=0,i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];for(;e<this.bindings[t].length;){var a=this.bindings[t][e],r=a.handler,s=a.ctx,l=a.once,d=s;void 0===d&&(d=this),r.apply(d,n),l?this.bindings[t].splice(e,1):++e}}}}]),e}();w.Utils={getActualBoundingClientRect:e,getScrollParents:i,getBounds:o,getOffsetParent:a,extend:s,addClass:d,removeClass:l,hasClass:u,updateClasses:f,defer:T,flush:F,uniqueId:_,Evented:A,getScrollBarSize:r,removeUtilElements:n};var I=function(){function t(t,e){var i=[],n=!0,o=!1,a=void 0;try{for(var r,s=t[Symbol.iterator]();!(n=(r=s.next()).done)&&(i.push(r.value),!e||i.length!==e);n=!0);}catch(t){o=!0,a=t}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),x=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),P=function(t,e,i){for(var n=!0;n;){var o=t,a=e,r=i;n=!1,null===o&&(o=Function.prototype);var s=Object.getOwnPropertyDescriptor(o,a);if(void 0!==s){if("value"in s)return s.value;var l=s.get;if(void 0===l)return;return l.call(r)}var d=Object.getPrototypeOf(o);if(null===d)return;t=d,e=a,i=r,n=!0,s=d=void 0}};if(void 0===w)throw new Error("You must include the utils.js file before tether.js");var O=w.Utils,i=O.getScrollParents,o=O.getBounds,a=O.getOffsetParent,s=O.extend,d=O.addClass,l=O.removeClass,f=O.updateClasses,T=O.defer,F=O.flush,r=O.getScrollBarSize,n=O.removeUtilElements,E=function(){if("undefined"==typeof document)return"";for(var t=document.createElement("div"),e=["transform","WebkitTransform","OTransform","MozTransform","msTransform"],i=0;i<e.length;++i){var n=e[i];if(void 0!==t.style[n])return n}}(),L=[],R=function(){L.forEach(function(t){t.position(!1)}),F()};!function(){var t=null,e=null,i=null,n=function n(){if(void 0!==e&&e>16)return e=Math.min(e-16,250),void(i=setTimeout(n,250));void 0!==t&&m()-t<10||(null!=i&&(clearTimeout(i),i=null),t=m(),R(),e=m()-t)};"undefined"!=typeof window&&void 0!==window.addEventListener&&["resize","scroll","touchmove"].forEach(function(t){window.addEventListener(t,n)})}();var B={center:"center",left:"right",right:"left"},V={middle:"middle",top:"bottom",bottom:"top"},U={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},z=function(t,e){var i=t.left,n=t.top;return"auto"===i&&(i=B[e.left]),"auto"===n&&(n=V[e.top]),{left:i,top:n}},N=function(t){var e=t.left,i=t.top;return void 0!==U[t.left]&&(e=U[t.left]),void 0!==U[t.top]&&(i=U[t.top]),{left:e,top:i}},W=function(t){var e=t.split(" "),i=I(e,2);return{top:i[0],left:i[1]}},H=W,j=function(e){function u(e){var i=this;t(this,u),P(Object.getPrototypeOf(u.prototype),"constructor",this).call(this),this.position=this.position.bind(this),L.push(this),this.history=[],this.setOptions(e,!1),w.modules.forEach(function(t){void 0!==t.initialize&&t.initialize.call(i)}),this.position()}return p(u,e),x(u,[{key:"getClass",value:function(){var t=arguments.length<=0||void 0===arguments[0]?"":arguments[0],e=this.options.classes;return void 0!==e&&e[t]?this.options.classes[t]:this.options.classPrefix?this.options.classPrefix+"-"+t:t}},{key:"setOptions",value:function(t){var e=this,n=arguments.length<=1||void 0===arguments[1]||arguments[1],o={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"};this.options=s(o,t);var a=this.options,r=a.element,l=a.target,u=a.targetModifier;if(this.element=r,this.target=l,this.targetModifier=u,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach(function(t){if(void 0===e[t])throw new Error("Tether Error: Both element and target must be defined");void 0!==e[t].jquery?e[t]=e[t][0]:"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))}),d(this.element,this.getClass("element")),!1!==this.options.addTargetClasses&&d(this.target,this.getClass("target")),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=H(this.options.targetAttachment),this.attachment=H(this.options.attachment),this.offset=W(this.options.offset),this.targetOffset=W(this.options.targetOffset),void 0!==this.scrollParents&&this.disable(),"scroll-handle"===this.targetModifier?this.scrollParents=[this.target]:this.scrollParents=i(this.target),!1!==this.options.enabled&&this.enable(n)}},{key:"getTargetBounds",value:function(){if(void 0===this.targetModifier)return o(this.target);if("visible"===this.targetModifier){if(this.target===document.body)return{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth};var t=o(this.target),e={height:t.height,width:t.width,top:t.top,left:t.left};return e.height=Math.min(e.height,t.height-(pageYOffset-t.top)),e.height=Math.min(e.height,t.height-(t.top+t.height-(pageYOffset+innerHeight))),e.height=Math.min(innerHeight,e.height),e.height-=2,e.width=Math.min(e.width,t.width-(pageXOffset-t.left)),e.width=Math.min(e.width,t.width-(t.left+t.width-(pageXOffset+innerWidth))),e.width=Math.min(innerWidth,e.width),e.width-=2,e.top<pageYOffset&&(e.top=pageYOffset),e.left<pageXOffset&&(e.left=pageXOffset),e}if("scroll-handle"===this.targetModifier){var t=void 0,i=this.target;i===document.body?(i=document.documentElement,t={left:pageXOffset,top:pageYOffset,height:innerHeight,width:innerWidth}):t=o(i);var n=getComputedStyle(i),a=i.scrollWidth>i.clientWidth||[n.overflow,n.overflowX].indexOf("scroll")>=0||this.target!==document.body,r=0;a&&(r=15);var s=t.height-parseFloat(n.borderTopWidth)-parseFloat(n.borderBottomWidth)-r,e={width:15,height:.975*s*(s/i.scrollHeight),left:t.left+t.width-parseFloat(n.borderLeftWidth)-15},l=0;s<408&&this.target===document.body&&(l=-11e-5*Math.pow(s,2)-.00727*s+22.58),this.target!==document.body&&(e.height=Math.max(e.height,24));var d=this.target.scrollTop/(i.scrollHeight-s);return e.top=d*(s-e.height-l)+t.top+parseFloat(n.borderTopWidth),this.target===document.body&&(e.height=Math.max(e.height,24)),e}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(t,e){return void 0===this._cache&&(this._cache={}),void 0===this._cache[t]&&(this._cache[t]=e.call(this)),this._cache[t]}},{key:"enable",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]||arguments[0];!1!==this.options.addTargetClasses&&d(this.target,this.getClass("enabled")),d(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParents.forEach(function(e){e!==t.target.ownerDocument&&e.addEventListener("scroll",t.position)}),e&&this.position()}},{key:"disable",value:function(){var t=this;l(this.target,this.getClass("enabled")),l(this.element,this.getClass("enabled")),this.enabled=!1,void 0!==this.scrollParents&&this.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.position)})}},{key:"destroy",value:function(){var t=this;this.disable(),L.forEach(function(e,i){e===t&&L.splice(i,1)}),0===L.length&&n()}},{key:"updateAttachClasses",value:function(t,e){var i=this;t=t||this.attachment,e=e||this.targetAttachment;var n=["left","top","bottom","right","middle","center"];void 0!==this._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),void 0===this._addAttachClasses&&(this._addAttachClasses=[]);var o=this._addAttachClasses;t.top&&o.push(this.getClass("element-attached")+"-"+t.top),t.left&&o.push(this.getClass("element-attached")+"-"+t.left),e.top&&o.push(this.getClass("target-attached")+"-"+e.top),e.left&&o.push(this.getClass("target-attached")+"-"+e.left);var a=[];n.forEach(function(t){a.push(i.getClass("element-attached")+"-"+t),a.push(i.getClass("target-attached")+"-"+t)}),T(function(){void 0!==i._addAttachClasses&&(f(i.element,i._addAttachClasses,a),!1!==i.options.addTargetClasses&&f(i.target,i._addAttachClasses,a),delete i._addAttachClasses)})}},{key:"position",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]||arguments[0];if(this.enabled){this.clearCache();var i=z(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,i);var n=this.cache("element-bounds",function(){return o(t.element)}),s=n.width,l=n.height;if(0===s&&0===l&&void 0!==this.lastSize){var d=this.lastSize;s=d.width,l=d.height}else this.lastSize={width:s,height:l};var u=this.cache("target-bounds",function(){return t.getTargetBounds()}),h=u,c=b(N(this.attachment),{width:s,height:l}),f=b(N(i),h),p=b(this.offset,{width:s,height:l}),g=b(this.targetOffset,h);c=v(c,p),f=v(f,g);for(var m=u.left+f.left-c.left,y=u.top+f.top-c.top,x=0;x<w.modules.length;++x){var k=w.modules[x],_=k.position.call(this,{left:m,top:y,targetAttachment:i,targetPos:u,elementPos:n,offset:c,targetOffset:f,manualOffset:p,manualTargetOffset:g,scrollbarSize:S,attachment:this.attachment});if(!1===_)return!1;void 0!==_&&"object"==typeof _&&(y=_.top,m=_.left)}var C={page:{top:y,left:m},viewport:{top:y-pageYOffset,bottom:pageYOffset-y-l+innerHeight,left:m-pageXOffset,right:pageXOffset-m-s+innerWidth}},D=this.target.ownerDocument,M=D.defaultView,S=void 0;return M.innerHeight>D.documentElement.clientHeight&&(S=this.cache("scrollbar-size",r),C.viewport.bottom-=S.height),M.innerWidth>D.documentElement.clientWidth&&(S=this.cache("scrollbar-size",r),C.viewport.right-=S.width),-1!==["","static"].indexOf(D.body.style.position)&&-1!==["","static"].indexOf(D.body.parentElement.style.position)||(C.page.bottom=D.body.scrollHeight-y-l,C.page.right=D.body.scrollWidth-m-s),void 0!==this.options.optimizations&&!1!==this.options.optimizations.moveElement&&void 0===this.targetModifier&&function(){var e=t.cache("target-offsetparent",function(){return a(t.target)}),i=t.cache("target-offsetparent-bounds",function(){return o(e)}),n=getComputedStyle(e),r=i,s={};if(["Top","Left","Bottom","Right"].forEach(function(t){s[t.toLowerCase()]=parseFloat(n["border"+t+"Width"])}),i.right=D.body.scrollWidth-i.left-r.width+s.right,i.bottom=D.body.scrollHeight-i.top-r.height+s.bottom,C.page.top>=i.top+s.top&&C.page.bottom>=i.bottom&&C.page.left>=i.left+s.left&&C.page.right>=i.right){var l=e.scrollTop,d=e.scrollLeft;C.offset={top:C.page.top-i.top+l-s.top,left:C.page.left-i.left+d-s.left}}}(),this.move(C),this.history.unshift(C),this.history.length>3&&this.history.pop(),e&&F(),!0}}},{key:"move",value:function(t){var e=this;if(void 0!==this.element.parentNode){var i={};for(var n in t){i[n]={};for(var o in t[n]){for(var r=!1,l=0;l<this.history.length;++l){var d=this.history[l];if(void 0!==d[n]&&!g(d[n][o],t[n][o])){r=!0;break}}r||(i[n][o]=!0)}}var u={top:"",left:"",right:"",bottom:""},h=function(t,i){if(!1!==(void 0!==e.options.optimizations?e.options.optimizations.gpu:null)){var n=void 0,o=void 0;t.top?(u.top=0,n=i.top):(u.bottom=0,n=-i.bottom),t.left?(u.left=0,o=i.left):(u.right=0,o=-i.right),window.matchMedia&&(window.matchMedia("only screen and (min-resolution: 1.3dppx)").matches||window.matchMedia("only screen and (-webkit-min-device-pixel-ratio: 1.3)").matches||(o=Math.round(o),n=Math.round(n))),u[E]="translateX("+o+"px) translateY("+n+"px)","msTransform"!==E&&(u[E]+=" translateZ(0)")}else t.top?u.top=i.top+"px":u.bottom=i.bottom+"px",t.left?u.left=i.left+"px":u.right=i.right+"px"},c=!1;if((i.page.top||i.page.bottom)&&(i.page.left||i.page.right)?(u.position="absolute",h(i.page,t.page)):(i.viewport.top||i.viewport.bottom)&&(i.viewport.left||i.viewport.right)?(u.position="fixed",h(i.viewport,t.viewport)):void 0!==i.offset&&i.offset.top&&i.offset.left?function(){u.position="absolute"
|
|
;var n=e.cache("target-offsetparent",function(){return a(e.target)});a(e.element)!==n&&T(function(){e.element.parentNode.removeChild(e.element),n.appendChild(e.element)}),h(i.offset,t.offset),c=!0}():(u.position="absolute",h({top:!0,left:!0},t.page)),!c)if(this.options.bodyElement)this.element.parentNode!==this.options.bodyElement&&this.options.bodyElement.appendChild(this.element);else{for(var f=!0,p=this.element.parentNode;p&&1===p.nodeType&&"BODY"!==p.tagName;){if("static"!==getComputedStyle(p).position){f=!1;break}p=p.parentNode}f||(this.element.parentNode.removeChild(this.element),this.element.ownerDocument.body.appendChild(this.element))}var m={},v=!1;for(var o in u){var b=u[o];this.element.style[o]!==b&&(v=!0,m[o]=b)}v&&T(function(){s(e.element.style,m),e.trigger("repositioned")})}}}]),u}(A);j.modules=[],w.position=R;var q=s(j,w),I=function(){function t(t,e){var i=[],n=!0,o=!1,a=void 0;try{for(var r,s=t[Symbol.iterator]();!(n=(r=s.next()).done)&&(i.push(r.value),!e||i.length!==e);n=!0);}catch(t){o=!0,a=t}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),O=w.Utils,o=O.getBounds,s=O.extend,f=O.updateClasses,T=O.defer,Y=["left","top","right","bottom"];w.modules.push({position:function(t){var e=this,i=t.top,n=t.left,a=t.targetAttachment;if(!this.options.constraints)return!0;var r=this.cache("element-bounds",function(){return o(e.element)}),l=r.height,d=r.width;if(0===d&&0===l&&void 0!==this.lastSize){var u=this.lastSize;d=u.width,l=u.height}var h=this.cache("target-bounds",function(){return e.getTargetBounds()}),c=h.height,p=h.width,g=[this.getClass("pinned"),this.getClass("out-of-bounds")];this.options.constraints.forEach(function(t){var e=t.outOfBoundsClass,i=t.pinnedClass;e&&g.push(e),i&&g.push(i)}),g.forEach(function(t){["left","top","right","bottom"].forEach(function(e){g.push(t+"-"+e)})});var m=[],v=s({},a),b=s({},this.attachment);return this.options.constraints.forEach(function(t){var o=t.to,r=t.attachment,s=t.pin;void 0===r&&(r="");var u=void 0,h=void 0;if(r.indexOf(" ")>=0){var f=r.split(" "),g=I(f,2);h=g[0],u=g[1]}else u=h=r;var x=y(e,o);"target"!==h&&"both"!==h||(i<x[1]&&"top"===v.top&&(i+=c,v.top="bottom"),i+l>x[3]&&"bottom"===v.top&&(i-=c,v.top="top")),"together"===h&&("top"===v.top&&("bottom"===b.top&&i<x[1]?(i+=c,v.top="bottom",i+=l,b.top="top"):"top"===b.top&&i+l>x[3]&&i-(l-c)>=x[1]&&(i-=l-c,v.top="bottom",b.top="bottom")),"bottom"===v.top&&("top"===b.top&&i+l>x[3]?(i-=c,v.top="top",i-=l,b.top="bottom"):"bottom"===b.top&&i<x[1]&&i+(2*l-c)<=x[3]&&(i+=l-c,v.top="top",b.top="top")),"middle"===v.top&&(i+l>x[3]&&"top"===b.top?(i-=l,b.top="bottom"):i<x[1]&&"bottom"===b.top&&(i+=l,b.top="top"))),"target"!==u&&"both"!==u||(n<x[0]&&"left"===v.left&&(n+=p,v.left="right"),n+d>x[2]&&"right"===v.left&&(n-=p,v.left="left")),"together"===u&&(n<x[0]&&"left"===v.left?"right"===b.left?(n+=p,v.left="right",n+=d,b.left="left"):"left"===b.left&&(n+=p,v.left="right",n-=d,b.left="right"):n+d>x[2]&&"right"===v.left?"left"===b.left?(n-=p,v.left="left",n-=d,b.left="right"):"right"===b.left&&(n-=p,v.left="left",n+=d,b.left="left"):"center"===v.left&&(n+d>x[2]&&"left"===b.left?(n-=d,b.left="right"):n<x[0]&&"right"===b.left&&(n+=d,b.left="left"))),"element"!==h&&"both"!==h||(i<x[1]&&"bottom"===b.top&&(i+=l,b.top="top"),i+l>x[3]&&"top"===b.top&&(i-=l,b.top="bottom")),"element"!==u&&"both"!==u||(n<x[0]&&("right"===b.left?(n+=d,b.left="left"):"center"===b.left&&(n+=d/2,b.left="left")),n+d>x[2]&&("left"===b.left?(n-=d,b.left="right"):"center"===b.left&&(n-=d/2,b.left="right"))),"string"==typeof s?s=s.split(",").map(function(t){return t.trim()}):!0===s&&(s=["top","left","right","bottom"]),s=s||[];var w=[],k=[];i<x[1]&&(s.indexOf("top")>=0?(i=x[1],w.push("top")):k.push("top")),i+l>x[3]&&(s.indexOf("bottom")>=0?(i=x[3]-l,w.push("bottom")):k.push("bottom")),n<x[0]&&(s.indexOf("left")>=0?(n=x[0],w.push("left")):k.push("left")),n+d>x[2]&&(s.indexOf("right")>=0?(n=x[2]-d,w.push("right")):k.push("right")),w.length&&function(){var t=void 0;t=void 0!==e.options.pinnedClass?e.options.pinnedClass:e.getClass("pinned"),m.push(t),w.forEach(function(e){m.push(t+"-"+e)})}(),k.length&&function(){var t=void 0;t=void 0!==e.options.outOfBoundsClass?e.options.outOfBoundsClass:e.getClass("out-of-bounds"),m.push(t),k.forEach(function(e){m.push(t+"-"+e)})}(),(w.indexOf("left")>=0||w.indexOf("right")>=0)&&(b.left=v.left=!1),(w.indexOf("top")>=0||w.indexOf("bottom")>=0)&&(b.top=v.top=!1),v.top===a.top&&v.left===a.left&&b.top===e.attachment.top&&b.left===e.attachment.left||(e.updateAttachClasses(b,v),e.trigger("update",{attachment:b,targetAttachment:v}))}),T(function(){!1!==e.options.addTargetClasses&&f(e.target,m,g),f(e.element,m,g)}),{top:i,left:n}}});var O=w.Utils,o=O.getBounds,f=O.updateClasses,T=O.defer;w.modules.push({position:function(t){var e=this,i=t.top,n=t.left,a=this.cache("element-bounds",function(){return o(e.element)}),r=a.height,s=a.width,l=this.getTargetBounds(),d=i+r,u=n+s,h=[];i<=l.bottom&&d>=l.top&&["left","right"].forEach(function(t){var e=l[t];e!==n&&e!==u||h.push(t)}),n<=l.right&&u>=l.left&&["top","bottom"].forEach(function(t){var e=l[t];e!==i&&e!==d||h.push(t)});var c=[],p=[],g=["left","top","right","bottom"];return c.push(this.getClass("abutted")),g.forEach(function(t){c.push(e.getClass("abutted")+"-"+t)}),h.length&&p.push(this.getClass("abutted")),h.forEach(function(t){p.push(e.getClass("abutted")+"-"+t)}),T(function(){!1!==e.options.addTargetClasses&&f(e.target,p,c),f(e.element,p,c)}),!0}});var I=function(){function t(t,e){var i=[],n=!0,o=!1,a=void 0;try{for(var r,s=t[Symbol.iterator]();!(n=(r=s.next()).done)&&(i.push(r.value),!e||i.length!==e);n=!0);}catch(t){o=!0,a=t}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();return w.modules.push({position:function(t){var e=t.top,i=t.left;if(this.options.shift){var n=this.options.shift;"function"==typeof this.options.shift&&(n=this.options.shift.call(this,{top:e,left:i}));var o=void 0,a=void 0;if("string"==typeof n){n=n.split(" "),n[1]=n[1]||n[0];var r=n,s=I(r,2);o=s[0],a=s[1],o=parseFloat(o,10),a=parseFloat(a,10)}else o=n.top,a=n.left;return e+=o,i+=a,{top:e,left:i}}}}),q}),function(e){e.fn.extend({slimScroll:function(i){var n={width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},o=e.extend(n,i);return this.each(function(){function n(t){if(d){var t=t||window.event,i=0;t.wheelDelta&&(i=-t.wheelDelta/120),t.detail&&(i=t.detail/3);var n=t.target||t.srcTarget||t.srcElement;e(n).closest("."+o.wrapperClass).is(x.parent())&&a(i,!0),t.preventDefault&&!y&&t.preventDefault(),y||(t.returnValue=!1)}}function a(t,e,i){y=!1;var n=t,a=x.outerHeight()-M.outerHeight();if(e&&(n=parseInt(M.css("top"))+t*parseInt(o.wheelStep)/100*M.outerHeight(),n=Math.min(Math.max(n,0),a),n=t>0?Math.ceil(n):Math.floor(n),M.css({top:n+"px"})),g=parseInt(M.css("top"))/(x.outerHeight()-M.outerHeight()),n=g*(x[0].scrollHeight-x.outerHeight()),i){n=t;var r=n/x[0].scrollHeight*x.outerHeight();r=Math.min(Math.max(r,0),a),M.css({top:r+"px"})}x.scrollTop(n),x.trigger("slimscrolling",~~n),s(),l()}function r(){p=Math.max(x.outerHeight()/x[0].scrollHeight*x.outerHeight(),b),M.css({height:p+"px"});var t=p==x.outerHeight()?"none":"block";M.css({display:t})}function s(){if(r(),clearTimeout(c),g==~~g){if(y=o.allowPageScroll,m!=g){var t=0==~~g?"top":"bottom";x.trigger("slimscroll",t)}}else y=!1;if(m=g,p>=x.outerHeight())return void(y=!0);M.stop(!0,!0).fadeIn("fast"),o.railVisible&&D.stop(!0,!0).fadeIn("fast")}function l(){o.alwaysVisible||(c=setTimeout(function(){o.disableFadeOut&&d||u||h||(M.fadeOut("slow"),D.fadeOut("slow"))},1e3))}var d,u,h,c,f,p,g,m,v="<div></div>",b=30,y=!1,x=e(this);if(x.parent().hasClass(o.wrapperClass)){var w=x.scrollTop();if(M=x.siblings("."+o.barClass),D=x.siblings("."+o.railClass),r(),e.isPlainObject(i)){if("height"in i&&"auto"==i.height){x.parent().css("height","auto"),x.css("height","auto");var k=x.parent().parent().height();x.parent().css("height",k),x.css("height",k)}else if("height"in i){var _=i.height;x.parent().css("height",_),x.css("height",_)}if("scrollTo"in i)w=parseInt(o.scrollTo);else if("scrollBy"in i)w+=parseInt(o.scrollBy);else if("destroy"in i)return M.remove(),D.remove(),void x.unwrap();a(w,!1,!0)}}else if(!(e.isPlainObject(i)&&"destroy"in i)){o.height="auto"==o.height?x.parent().height():o.height;var C=e(v).addClass(o.wrapperClass).css({position:"relative",overflow:"hidden",width:o.width,height:o.height});x.css({overflow:"hidden",width:o.width,height:o.height});var D=e(v).addClass(o.railClass).css({width:o.size,height:"100%",position:"absolute",top:0,display:o.alwaysVisible&&o.railVisible?"block":"none","border-radius":o.railBorderRadius,background:o.railColor,opacity:o.railOpacity,zIndex:90}),M=e(v).addClass(o.barClass).css({background:o.color,width:o.size,position:"absolute",top:0,opacity:o.opacity,display:o.alwaysVisible?"block":"none","border-radius":o.borderRadius,BorderRadius:o.borderRadius,MozBorderRadius:o.borderRadius,WebkitBorderRadius:o.borderRadius,zIndex:99}),S="right"==o.position?{right:o.distance}:{left:o.distance};D.css(S),M.css(S),x.wrap(C),x.parent().append(M),x.parent().append(D),o.railDraggable&&M.bind("mousedown",function(i){var n=e(document);return h=!0,t=parseFloat(M.css("top")),pageY=i.pageY,n.bind("mousemove.slimscroll",function(e){currTop=t+e.pageY-pageY,M.css("top",currTop),a(0,M.position().top,!1)}),n.bind("mouseup.slimscroll",function(t){h=!1,l(),n.unbind(".slimscroll")}),!1}).bind("selectstart.slimscroll",function(t){return t.stopPropagation(),t.preventDefault(),!1}),D.hover(function(){s()},function(){l()}),M.hover(function(){u=!0},function(){u=!1}),x.hover(function(){d=!0,s(),l()},function(){d=!1,l()}),x.bind("touchstart",function(t,e){t.originalEvent.touches.length&&(f=t.originalEvent.touches[0].pageY)}),x.bind("touchmove",function(t){if(y||t.originalEvent.preventDefault(),t.originalEvent.touches.length){a((f-t.originalEvent.touches[0].pageY)/o.touchScrollStep,!0),f=t.originalEvent.touches[0].pageY}}),r(),"bottom"===o.start?(M.css({top:x.outerHeight()-M.outerHeight()}),a(0,!0)):"top"!==o.start&&(a(e(o.start).position().top,null,!0),o.alwaysVisible||M.hide()),function(t){window.addEventListener?(t.addEventListener("DOMMouseScroll",n,!1),t.addEventListener("mousewheel",n,!1)):document.attachEvent("onmousewheel",n)}(this)}}),this}}),e.fn.extend({slimscroll:e.fn.slimScroll})}(jQuery),function(t,e){"use strict";t.ajaxPrefilter(function(t,e,i){if(t.iframe)return t.originalURL=t.url,"iframe"}),t.ajaxTransport("iframe",function(e,i,n){function o(){l.each(function(e,i){var n=t(i);n.data("clone").replaceWith(n)}),a.remove(),r.one("load",function(){r.remove()}),r.attr("src","javascript:false;")}var a=null,r=null,s="iframe-"+t.now(),l=t(e.files).filter(":file:enabled"),d=null;if(e.dataTypes.shift(),e.data=i.data,l.length)return a=t("<form enctype='multipart/form-data' method='post'></form>").hide().attr({action:e.originalURL,target:s}),"string"==typeof e.data&&e.data.length>0&&t.error("data must not be serialized"),t.each(e.data||{},function(e,i){t.isPlainObject(i)&&(e=i.name,i=i.value),t("<input type='hidden' />").attr({name:e,value:i}).appendTo(a)}),t("<input type='hidden' value='IFrame' name='X-Requested-With' />").appendTo(a),d=e.dataTypes[0]&&e.accepts[e.dataTypes[0]]?e.accepts[e.dataTypes[0]]+("*"!==e.dataTypes[0]?", */*; q=0.01":""):e.accepts["*"],t("<input type='hidden' name='X-HTTP-Accept'>").attr("value",d).appendTo(a),l.after(function(e){var i=t(this),n=i.clone().prop("disabled",!0);return i.data("clone",n),n}).next(),l.appendTo(a),{send:function(e,i){r=t("<iframe src='javascript:false;' name='"+s+"' id='"+s+"' style='display:none'></iframe>"),r.one("load",function(){r.one("load",function(){var t=this.contentWindow?this.contentWindow.document:this.contentDocument?this.contentDocument:this.document,e=t.documentElement?t.documentElement:t.body,n=e.getElementsByTagName("textarea")[0],a=n&&n.getAttribute("data-type")||null,r=n&&n.getAttribute("data-status")||200,s=n&&n.getAttribute("data-statusText")||"OK",l={html:e.innerHTML,text:a?n.value:e?e.textContent||e.innerText:null};o(),i(r,s,l,a?"Content-Type: "+a:null)}),a[0].submit()}),t("body").append(a,r)},abort:function(){null!==r&&(r.unbind("load").attr("src","javascript:false;"),o())}}})}(jQuery),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","jquery-ui/ui/widget"],t):"object"==typeof exports?t(require("jquery"),require("./vendor/jquery.ui.widget")):t(window.jQuery)}(function(t){"use strict";function e(e){var i="dragover"===e;return function(n){n.dataTransfer=n.originalEvent&&n.originalEvent.dataTransfer;var o=n.dataTransfer;o&&-1!==t.inArray("Files",o.types)&&!1!==this._trigger(e,t.Event(e,{delegatedEvent:n}))&&(n.preventDefault(),i&&(o.dropEffect="copy"))}}t.support.fileInput=!(new RegExp("(Android (1\\.[0156]|2\\.[01]))|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)|(w(eb)?OSBrowser)|(webOS)|(Kindle/(1\\.0|2\\.[05]|3\\.0))").test(window.navigator.userAgent)||t('<input type="file"/>').prop("disabled")),t.support.xhrFileUpload=!(!window.ProgressEvent||!window.FileReader),t.support.xhrFormDataFileUpload=!!window.FormData,t.support.blobSlice=window.Blob&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice),t.widget("blueimp.fileupload",{options:{dropZone:t(document),pasteZone:void 0,fileInput:void 0,replaceFileInput:!0,paramName:void 0,singleFileUploads:!0,limitMultiFileUploads:void 0,limitMultiFileUploadSize:void 0,limitMultiFileUploadSizeOverhead:512,sequentialUploads:!1,limitConcurrentUploads:void 0,forceIframeTransport:!1,redirect:void 0,redirectParamName:void 0,postMessage:void 0,multipart:!0,maxChunkSize:void 0,uploadedBytes:void 0,recalculateProgress:!0,progressInterval:100,bitrateInterval:500,autoUpload:!0,messages:{uploadedBytes:"Uploaded bytes exceed file size"},i18n:function(e,i){return e=this.messages[e]||e.toString(),i&&t.each(i,function(t,i){e=e.replace("{"+t+"}",i)}),e},formData:function(t){return t.serializeArray()},add:function(e,i){if(e.isDefaultPrevented())return!1;(i.autoUpload||!1!==i.autoUpload&&t(this).fileupload("option","autoUpload"))&&i.process().done(function(){i.submit()})},processData:!1,contentType:!1,cache:!1,timeout:0},_specialOptions:["fileInput","dropZone","pasteZone","multipart","forceIframeTransport"],_blobSlice:t.support.blobSlice&&function(){return(this.slice||this.webkitSlice||this.mozSlice).apply(this,arguments)},_BitrateTimer:function(){this.timestamp=Date.now?Date.now():(new Date).getTime(),this.loaded=0,this.bitrate=0,this.getBitrate=function(t,e,i){var n=t-this.timestamp;return(!this.bitrate||!i||n>i)&&(this.bitrate=(e-this.loaded)*(1e3/n)*8,this.loaded=e,this.timestamp=t),this.bitrate}},_isXHRUpload:function(e){return!e.forceIframeTransport&&(!e.multipart&&t.support.xhrFileUpload||t.support.xhrFormDataFileUpload)},_getFormData:function(e){var i;return"function"===t.type(e.formData)?e.formData(e.form):t.isArray(e.formData)?e.formData:"object"===t.type(e.formData)?(i=[],t.each(e.formData,function(t,e){i.push({name:t,value:e})}),i):[]},_getTotal:function(e){var i=0;return t.each(e,function(t,e){i+=e.size||1}),i},_initProgressObject:function(e){var i={loaded:0,total:0,bitrate:0};e._progress?t.extend(e._progress,i):e._progress=i},_initResponseObject:function(t){var e;if(t._response)for(e in t._response)t._response.hasOwnProperty(e)&&delete t._response[e];else t._response={}},_onProgress:function(e,i){if(e.lengthComputable){var n,o=Date.now?Date.now():(new Date).getTime();if(i._time&&i.progressInterval&&o-i._time<i.progressInterval&&e.loaded!==e.total)return;i._time=o,n=Math.floor(e.loaded/e.total*(i.chunkSize||i._progress.total))+(i.uploadedBytes||0),this._progress.loaded+=n-i._progress.loaded,this._progress.bitrate=this._bitrateTimer.getBitrate(o,this._progress.loaded,i.bitrateInterval),i._progress.loaded=i.loaded=n,i._progress.bitrate=i.bitrate=i._bitrateTimer.getBitrate(o,n,i.bitrateInterval),this._trigger("progress",t.Event("progress",{delegatedEvent:e}),i),this._trigger("progressall",t.Event("progressall",{delegatedEvent:e}),this._progress)}},_initProgressListener:function(e){var i=this,n=e.xhr?e.xhr():t.ajaxSettings.xhr();n.upload&&(t(n.upload).bind("progress",function(t){var n=t.originalEvent;t.lengthComputable=n.lengthComputable,t.loaded=n.loaded,t.total=n.total,i._onProgress(t,e)}),e.xhr=function(){return n})},_isInstanceOf:function(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"},_initXHRData:function(e){var i,n=this,o=e.files[0],a=e.multipart||!t.support.xhrFileUpload,r="array"===t.type(e.paramName)?e.paramName[0]:e.paramName;e.headers=t.extend({},e.headers),e.contentRange&&(e.headers["Content-Range"]=e.contentRange),a&&!e.blob&&this._isInstanceOf("File",o)||(e.headers["Content-Disposition"]='attachment; filename="'+encodeURI(o.uploadName||o.name)+'"'),a?t.support.xhrFormDataFileUpload&&(e.postMessage?(i=this._getFormData(e),e.blob?i.push({name:r,value:e.blob}):t.each(e.files,function(n,o){i.push({name:"array"===t.type(e.paramName)&&e.paramName[n]||r,value:o})})):(n._isInstanceOf("FormData",e.formData)?i=e.formData:(i=new FormData,t.each(this._getFormData(e),function(t,e){i.append(e.name,e.value)})),e.blob?i.append(r,e.blob,o.uploadName||o.name):t.each(e.files,function(o,a){(n._isInstanceOf("File",a)||n._isInstanceOf("Blob",a))&&i.append("array"===t.type(e.paramName)&&e.paramName[o]||r,a,a.uploadName||a.name)})),e.data=i):(e.contentType=o.type||"application/octet-stream",e.data=e.blob||o),e.blob=null},_initIframeSettings:function(e){var i=t("<a></a>").prop("href",e.url).prop("host");e.dataType="iframe "+(e.dataType||""),e.formData=this._getFormData(e),e.redirect&&i&&i!==location.host&&e.formData.push({name:e.redirectParamName||"redirect",value:e.redirect})},_initDataSettings:function(t){this._isXHRUpload(t)?(this._chunkedUpload(t,!0)||(t.data||this._initXHRData(t),this._initProgressListener(t)),t.postMessage&&(t.dataType="postmessage "+(t.dataType||""))):this._initIframeSettings(t)},_getParamName:function(e){var i=t(e.fileInput),n=e.paramName;return n?t.isArray(n)||(n=[n]):(n=[],i.each(function(){for(var e=t(this),i=e.prop("name")||"files[]",o=(e.prop("files")||[1]).length;o;)n.push(i),o-=1}),n.length||(n=[i.prop("name")||"files[]"])),n},_initFormSettings:function(e){e.form&&e.form.length||(e.form=t(e.fileInput.prop("form")),e.form.length||(e.form=t(this.options.fileInput.prop("form")))),e.paramName=this._getParamName(e),e.url||(e.url=e.form.prop("action")||location.href),e.type=(e.type||"string"===t.type(e.form.prop("method"))&&e.form.prop("method")||"").toUpperCase(),"POST"!==e.type&&"PUT"!==e.type&&"PATCH"!==e.type&&(e.type="POST"),e.formAcceptCharset||(e.formAcceptCharset=e.form.attr("accept-charset"))},_getAJAXSettings:function(e){var i=t.extend({},this.options,e);return this._initFormSettings(i),this._initDataSettings(i),i},_getDeferredState:function(t){return t.state?t.state():t.isResolved()?"resolved":t.isRejected()?"rejected":"pending"},_enhancePromise:function(t){return t.success=t.done,t.error=t.fail,t.complete=t.always,t},_getXHRPromise:function(e,i,n){var o=t.Deferred(),a=o.promise();return i=i||this.options.context||a,!0===e?o.resolveWith(i,n):!1===e&&o.rejectWith(i,n),a.abort=o.promise,this._enhancePromise(a)},_addConvenienceMethods:function(e,i){var n=this,o=function(e){return t.Deferred().resolveWith(n,e).promise()};i.process=function(e,a){return(e||a)&&(i._processQueue=this._processQueue=(this._processQueue||o([this])).then(function(){return i.errorThrown?t.Deferred().rejectWith(n,[i]).promise():o(arguments)}).then(e,a)),this._processQueue||o([this])},i.submit=function(){return"pending"!==this.state()&&(i.jqXHR=this.jqXHR=!1!==n._trigger("submit",t.Event("submit",{delegatedEvent:e}),this)&&n._onSend(e,this)),this.jqXHR||n._getXHRPromise()},i.abort=function(){return this.jqXHR?this.jqXHR.abort():(this.errorThrown="abort",n._trigger("fail",null,this),n._getXHRPromise(!1))},i.state=function(){return this.jqXHR?n._getDeferredState(this.jqXHR):this._processQueue?n._getDeferredState(this._processQueue):void 0},i.processing=function(){return!this.jqXHR&&this._processQueue&&"pending"===n._getDeferredState(this._processQueue)},i.progress=function(){return this._progress},i.response=function(){return this._response}},_getUploadedBytes:function(t){var e=t.getResponseHeader("Range"),i=e&&e.split("-"),n=i&&i.length>1&&parseInt(i[1],10);return n&&n+1},_chunkedUpload:function(e,i){e.uploadedBytes=e.uploadedBytes||0;var n,o,a=this,r=e.files[0],s=r.size,l=e.uploadedBytes,d=e.maxChunkSize||s,u=this._blobSlice,h=t.Deferred(),c=h.promise();return!(!(this._isXHRUpload(e)&&u&&(l||("function"===t.type(d)?d(e):d)<s))||e.data)&&(!!i||(l>=s?(r.error=e.i18n("uploadedBytes"),this._getXHRPromise(!1,e.context,[null,"error",r.error])):(o=function(){var i=t.extend({},e),c=i._progress.loaded;i.blob=u.call(r,l,l+("function"===t.type(d)?d(i):d),r.type),i.chunkSize=i.blob.size,i.contentRange="bytes "+l+"-"+(l+i.chunkSize-1)+"/"+s,a._initXHRData(i),a._initProgressListener(i),n=(!1!==a._trigger("chunksend",null,i)&&t.ajax(i)||a._getXHRPromise(!1,i.context)).done(function(n,r,d){l=a._getUploadedBytes(d)||l+i.chunkSize,c+i.chunkSize-i._progress.loaded&&a._onProgress(t.Event("progress",{lengthComputable:!0,loaded:l-i.uploadedBytes,total:l-i.uploadedBytes}),i),e.uploadedBytes=i.uploadedBytes=l,i.result=n,i.textStatus=r,i.jqXHR=d,a._trigger("chunkdone",null,i),a._trigger("chunkalways",null,i),l<s?o():h.resolveWith(i.context,[n,r,d])}).fail(function(t,e,n){i.jqXHR=t,i.textStatus=e,i.errorThrown=n,a._trigger("chunkfail",null,i),a._trigger("chunkalways",null,i),h.rejectWith(i.context,[t,e,n])})},this._enhancePromise(c),c.abort=function(){return n.abort()},o(),c)))},_beforeSend:function(t,e){0===this._active&&(this._trigger("start"),this._bitrateTimer=new this._BitrateTimer,this._progress.loaded=this._progress.total=0,this._progress.bitrate=0),this._initResponseObject(e),this._initProgressObject(e),e._progress.loaded=e.loaded=e.uploadedBytes||0,e._progress.total=e.total=this._getTotal(e.files)||1,e._progress.bitrate=e.bitrate=0,this._active+=1,this._progress.loaded+=e.loaded,this._progress.total+=e.total},_onDone:function(e,i,n,o){var a=o._progress.total,r=o._response;o._progress.loaded<a&&this._onProgress(t.Event("progress",{lengthComputable:!0,loaded:a,total:a}),o),r.result=o.result=e,r.textStatus=o.textStatus=i,r.jqXHR=o.jqXHR=n,this._trigger("done",null,o)},_onFail:function(t,e,i,n){var o=n._response;n.recalculateProgress&&(this._progress.loaded-=n._progress.loaded,this._progress.total-=n._progress.total),o.jqXHR=n.jqXHR=t,o.textStatus=n.textStatus=e,o.errorThrown=n.errorThrown=i,this._trigger("fail",null,n)},_onAlways:function(t,e,i,n){this._trigger("always",null,n)},_onSend:function(e,i){i.submit||this._addConvenienceMethods(e,i);var n,o,a,r,s=this,l=s._getAJAXSettings(i),d=function(){return s._sending+=1,l._bitrateTimer=new s._BitrateTimer,n=n||((o||!1===s._trigger("send",t.Event("send",{delegatedEvent:e}),l))&&s._getXHRPromise(!1,l.context,o)||s._chunkedUpload(l)||t.ajax(l)).done(function(t,e,i){s._onDone(t,e,i,l)}).fail(function(t,e,i){s._onFail(t,e,i,l)}).always(function(t,e,i){if(s._onAlways(t,e,i,l),s._sending-=1,s._active-=1,l.limitConcurrentUploads&&l.limitConcurrentUploads>s._sending)for(var n=s._slots.shift();n;){if("pending"===s._getDeferredState(n)){n.resolve();break}n=s._slots.shift()}0===s._active&&s._trigger("stop")})};return this._beforeSend(e,l),this.options.sequentialUploads||this.options.limitConcurrentUploads&&this.options.limitConcurrentUploads<=this._sending?(this.options.limitConcurrentUploads>1?(a=t.Deferred(),this._slots.push(a),r=a.then(d)):(this._sequence=this._sequence.then(d,d),r=this._sequence),r.abort=function(){return o=[void 0,"abort","abort"],n?n.abort():(a&&a.rejectWith(l.context,o),d())},this._enhancePromise(r)):d()},_onAdd:function(e,i){var n,o,a,r,s=this,l=!0,d=t.extend({},this.options,i),u=i.files,h=u.length,c=d.limitMultiFileUploads,f=d.limitMultiFileUploadSize,p=d.limitMultiFileUploadSizeOverhead,g=0,m=this._getParamName(d),v=0;if(!h)return!1;if(f&&void 0===u[0].size&&(f=void 0),(d.singleFileUploads||c||f)&&this._isXHRUpload(d))if(d.singleFileUploads||f||!c)if(!d.singleFileUploads&&f)for(a=[],n=[],r=0;r<h;r+=1)g+=u[r].size+p,(r+1===h||g+u[r+1].size+p>f||c&&r+1-v>=c)&&(a.push(u.slice(v,r+1)),o=m.slice(v,r+1),o.length||(o=m),n.push(o),v=r+1,g=0);else n=m;else for(a=[],n=[],r=0;r<h;r+=c)a.push(u.slice(r,r+c)),o=m.slice(r,r+c),o.length||(o=m),n.push(o);else a=[u],n=[m];return i.originalFiles=u,t.each(a||u,function(o,r){var d=t.extend({},i);return d.files=a?r:[r],d.paramName=n[o],s._initResponseObject(d),s._initProgressObject(d),s._addConvenienceMethods(e,d),l=s._trigger("add",t.Event("add",{delegatedEvent:e}),d)}),l},_replaceFileInput:function(e){var i=e.fileInput,n=i.clone(!0),o=i.is(document.activeElement);e.fileInputClone=n,t("<form></form>").append(n)[0].reset(),i.after(n).detach(),o&&n.focus(),t.cleanData(i.unbind("remove")),this.options.fileInput=this.options.fileInput.map(function(t,e){return e===i[0]?n[0]:e}),i[0]===this.element[0]&&(this.element=n)},_handleFileTreeEntry:function(e,i){var n,o=this,a=t.Deferred(),r=[],s=function(t){t&&!t.entry&&(t.entry=e),a.resolve([t])},l=function(t){o._handleFileTreeEntries(t,i+e.name+"/").done(function(t){a.resolve(t)}).fail(s)},d=function(){n.readEntries(function(t){t.length?(r=r.concat(t),d()):l(r)},s)};return i=i||"",e.isFile?e._file?(e._file.relativePath=i,a.resolve(e._file)):e.file(function(t){t.relativePath=i,a.resolve(t)},s):e.isDirectory?(n=e.createReader(),d()):a.resolve([]),a.promise()},_handleFileTreeEntries:function(e,i){var n=this;return t.when.apply(t,t.map(e,function(t){return n._handleFileTreeEntry(t,i)})).then(function(){return Array.prototype.concat.apply([],arguments)})},_getDroppedFiles:function(e){e=e||{};var i=e.items;return i&&i.length&&(i[0].webkitGetAsEntry||i[0].getAsEntry)?this._handleFileTreeEntries(t.map(i,function(t){var e;return t.webkitGetAsEntry?(e=t.webkitGetAsEntry(),e&&(e._file=t.getAsFile()),e):t.getAsEntry()})):t.Deferred().resolve(t.makeArray(e.files)).promise()},_getSingleFileInputFiles:function(e){e=t(e);var i,n,o=e.prop("webkitEntries")||e.prop("entries");if(o&&o.length)return this._handleFileTreeEntries(o);if(i=t.makeArray(e.prop("files")),i.length)void 0===i[0].name&&i[0].fileName&&t.each(i,function(t,e){e.name=e.fileName,e.size=e.fileSize});else{if(!(n=e.prop("value")))return t.Deferred().resolve([]).promise();i=[{name:n.replace(/^.*\\/,"")}]}return t.Deferred().resolve(i).promise()},_getFileInputFiles:function(e){return e instanceof t&&1!==e.length?t.when.apply(t,t.map(e,this._getSingleFileInputFiles)).then(function(){return Array.prototype.concat.apply([],arguments)}):this._getSingleFileInputFiles(e)},_onChange:function(e){var i=this,n={fileInput:t(e.target),form:t(e.target.form)};this._getFileInputFiles(n.fileInput).always(function(o){n.files=o,i.options.replaceFileInput&&i._replaceFileInput(n),!1!==i._trigger("change",t.Event("change",{delegatedEvent:e}),n)&&i._onAdd(e,n)})},_onPaste:function(e){var i=e.originalEvent&&e.originalEvent.clipboardData&&e.originalEvent.clipboardData.items,n={files:[]};i&&i.length&&(t.each(i,function(t,e){var i=e.getAsFile&&e.getAsFile();i&&n.files.push(i)}),!1!==this._trigger("paste",t.Event("paste",{delegatedEvent:e}),n)&&this._onAdd(e,n))},_onDrop:function(e){e.dataTransfer=e.originalEvent&&e.originalEvent.dataTransfer;var i=this,n=e.dataTransfer,o={};n&&n.files&&n.files.length&&(e.preventDefault(),this._getDroppedFiles(n).always(function(n){o.files=n,!1!==i._trigger("drop",t.Event("drop",{delegatedEvent:e}),o)&&i._onAdd(e,o)}))},_onDragOver:e("dragover"),_onDragEnter:e("dragenter"),_onDragLeave:e("dragleave"),_initEventHandlers:function(){this._isXHRUpload(this.options)&&(this._on(this.options.dropZone,{dragover:this._onDragOver,drop:this._onDrop,dragenter:this._onDragEnter,dragleave:this._onDragLeave}),this._on(this.options.pasteZone,{paste:this._onPaste})),t.support.fileInput&&this._on(this.options.fileInput,{change:this._onChange})},_destroyEventHandlers:function(){this._off(this.options.dropZone,"dragenter dragleave dragover drop"),this._off(this.options.pasteZone,"paste"),this._off(this.options.fileInput,"change")},_destroy:function(){this._destroyEventHandlers()},_setOption:function(e,i){var n=-1!==t.inArray(e,this._specialOptions);n&&this._destroyEventHandlers(),this._super(e,i),n&&(this._initSpecialOptions(),this._initEventHandlers())},_initSpecialOptions:function(){var e=this.options;void 0===e.fileInput?e.fileInput=this.element.is('input[type="file"]')?this.element:this.element.find('input[type="file"]'):e.fileInput instanceof t||(e.fileInput=t(e.fileInput)),e.dropZone instanceof t||(e.dropZone=t(e.dropZone)),e.pasteZone instanceof t||(e.pasteZone=t(e.pasteZone))},_getRegExp:function(t){var e=t.split("/"),i=e.pop();return e.shift(),new RegExp(e.join("/"),i)},_isRegExpOption:function(e,i){return"url"!==e&&"string"===t.type(i)&&/^\/.*\/[igm]{0,3}$/.test(i)},_initDataAttributes:function(){var e=this,i=this.options,n=this.element.data();t.each(this.element[0].attributes,function(t,o){var a,r=o.name.toLowerCase();/^data-/.test(r)&&(r=r.slice(5).replace(/-[a-z]/g,function(t){return t.charAt(1).toUpperCase()}),a=n[r],e._isRegExpOption(r,a)&&(a=e._getRegExp(a)),i[r]=a)})},_create:function(){this._initDataAttributes(),this._initSpecialOptions(),this._slots=[],this._sequence=this._getXHRPromise(!0),this._sending=this._active=0,this._initProgressObject(this),this._initEventHandlers()},active:function(){return this._active},progress:function(){return this._progress},add:function(e){var i=this;e&&!this.options.disabled&&(e.fileInput&&!e.files?this._getFileInputFiles(e.fileInput).always(function(t){e.files=t,i._onAdd(null,e)}):(e.files=t.makeArray(e.files),this._onAdd(null,e)))},send:function(e){if(e&&!this.options.disabled){if(e.fileInput&&!e.files){var i,n,o=this,a=t.Deferred(),r=a.promise();return r.abort=function(){return n=!0,i?i.abort():(a.reject(null,"abort","abort"),r)},this._getFileInputFiles(e.fileInput).always(function(t){if(!n){if(!t.length)return void a.reject();e.files=t,i=o._onSend(null,e),i.then(function(t,e,i){a.resolve(t,e,i)},function(t,e,i){a.reject(t,e,i)})}}),this._enhancePromise(r)}if(e.files=t.makeArray(e.files),e.files.length)return this._onSend(null,e)}return this._getXHRPromise(!1,e&&e.context)}})}),function(t,e){"function"==typeof define&&define.amd?define(["jquery"],function(t){return e(t)}):"object"==typeof exports?module.exports=e(require("jquery")):jQuery&&!jQuery.fn.colorpicker&&e(jQuery)}(0,function(t){"use strict";var e=function(i,n,o,a,r){this.fallbackValue=o?o&&void 0!==o.h?o:this.value={h:0,s:0,b:0,a:1}:null,this.fallbackFormat=a||"rgba",this.hexNumberSignPrefix=!0===r,this.value=this.fallbackValue,this.origFormat=null,this.predefinedColors=n||{},this.colors=t.extend({},e.webColors,this.predefinedColors),i&&(void 0!==i.h?this.value=i:this.setColor(String(i))),this.value||(this.value={h:0,s:0,b:0,a:1})};e.webColors={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",
|
|
chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32",transparent:"transparent"},e.prototype={constructor:e,colors:{},predefinedColors:{},getValue:function(){return this.value},setValue:function(t){this.value=t},_sanitizeNumber:function(t){return"number"==typeof t?t:isNaN(t)||null===t||""===t||void 0===t?1:""===t?0:void 0!==t.toLowerCase?(t.match(/^\./)&&(t="0"+t),Math.ceil(100*parseFloat(t))/100):1},isTransparent:function(t){return!(!t||!("string"==typeof t||t instanceof String))&&("transparent"===(t=t.toLowerCase().trim())||t.match(/#?00000000/)||t.match(/(rgba|hsla)\(0,0,0,0?\.?0\)/))},rgbaIsTransparent:function(t){return 0===t.r&&0===t.g&&0===t.b&&0===t.a},setColor:function(t){if(t=t.toLowerCase().trim()){if(this.isTransparent(t))return this.value={h:0,s:0,b:0,a:0},!0;var e=this.parse(t);e?(this.value=this.value={h:e.h,s:e.s,b:e.b,a:e.a},this.origFormat||(this.origFormat=e.format)):this.fallbackValue&&(this.value=this.fallbackValue)}return!1},setHue:function(t){this.value.h=1-t},setSaturation:function(t){this.value.s=t},setBrightness:function(t){this.value.b=1-t},setAlpha:function(t){this.value.a=Math.round(parseInt(100*(1-t),10)/100*100)/100},toRGB:function(t,e,i,n){0===arguments.length&&(t=this.value.h,e=this.value.s,i=this.value.b,n=this.value.a),t*=360;var o,a,r,s,l;return t=t%360/60,l=i*e,s=l*(1-Math.abs(t%2-1)),o=a=r=i-l,t=~~t,o+=[l,s,0,0,s,l][t],a+=[s,l,l,s,0,0][t],r+=[0,0,s,l,l,s][t],{r:Math.round(255*o),g:Math.round(255*a),b:Math.round(255*r),a:n}},toHex:function(t,e,i,n,o){arguments.length<=1&&(e=this.value.h,i=this.value.s,n=this.value.b,o=this.value.a);var a="#",r=this.toRGB(e,i,n,o);return this.rgbaIsTransparent(r)?"transparent":(t||(a=this.hexNumberSignPrefix?"#":""),a+((1<<24)+(parseInt(r.r)<<16)+(parseInt(r.g)<<8)+parseInt(r.b)).toString(16).slice(1))},toHSL:function(t,e,i,n){0===arguments.length&&(t=this.value.h,e=this.value.s,i=this.value.b,n=this.value.a);var o=t,a=(2-e)*i,r=e*i;return r/=a>0&&a<=1?a:2-a,a/=2,r>1&&(r=1),{h:isNaN(o)?0:o,s:isNaN(r)?0:r,l:isNaN(a)?0:a,a:isNaN(n)?0:n}},toAlias:function(t,e,i,n){var o,a=0===arguments.length?this.toHex(!0):this.toHex(!0,t,e,i,n),r="alias"===this.origFormat?a:this.toString(!1,this.origFormat);for(var s in this.colors)if((o=this.colors[s].toLowerCase().trim())===a||o===r)return s;return!1},RGBtoHSB:function(t,e,i,n){t/=255,e/=255,i/=255;var o,a,r,s;return r=Math.max(t,e,i),s=r-Math.min(t,e,i),o=0===s?null:r===t?(e-i)/s:r===e?(i-t)/s+2:(t-e)/s+4,o=(o+360)%6*60/360,a=0===s?0:s/r,{h:this._sanitizeNumber(o),s:a,b:r,a:this._sanitizeNumber(n)}},HueToRGB:function(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t},HSLtoRGB:function(t,e,i,n){e<0&&(e=0);var o;o=i<=.5?i*(1+e):i+e-i*e;var a=2*i-o,r=t+1/3,s=t,l=t-1/3;return[Math.round(255*this.HueToRGB(a,o,r)),Math.round(255*this.HueToRGB(a,o,s)),Math.round(255*this.HueToRGB(a,o,l)),this._sanitizeNumber(n)]},parse:function(e){if(0===arguments.length)return!1;var i,n,o=this,a=!1,r=void 0!==this.colors[e];return r&&(e=this.colors[e].toLowerCase().trim()),t.each(this.stringParsers,function(t,s){var l=s.re.exec(e);return!(i=l&&s.parse.apply(o,[l]))||(a={},n=r?"alias":s.format?s.format:o.getValidFallbackFormat(),a=n.match(/hsla?/)?o.RGBtoHSB.apply(o,o.HSLtoRGB.apply(o,i)):o.RGBtoHSB.apply(o,i),a instanceof Object&&(a.format=n),!1)}),a},getValidFallbackFormat:function(){var t=["rgba","rgb","hex","hsla","hsl"];return this.origFormat&&-1!==t.indexOf(this.origFormat)?this.origFormat:this.fallbackFormat&&-1!==t.indexOf(this.fallbackFormat)?this.fallbackFormat:"rgba"},toString:function(t,i,n){i=i||this.origFormat||this.fallbackFormat,n=n||!1;var o=!1;switch(i){case"rgb":return o=this.toRGB(),this.rgbaIsTransparent(o)?"transparent":"rgb("+o.r+","+o.g+","+o.b+")";case"rgba":return o=this.toRGB(),"rgba("+o.r+","+o.g+","+o.b+","+o.a+")";case"hsl":return o=this.toHSL(),"hsl("+Math.round(360*o.h)+","+Math.round(100*o.s)+"%,"+Math.round(100*o.l)+"%)";case"hsla":return o=this.toHSL(),"hsla("+Math.round(360*o.h)+","+Math.round(100*o.s)+"%,"+Math.round(100*o.l)+"%,"+o.a+")";case"hex":return this.toHex(t);case"alias":return o=this.toAlias(),!1===o?this.toString(t,this.getValidFallbackFormat()):n&&!(o in e.webColors)&&o in this.predefinedColors?this.predefinedColors[o]:o;default:return o}},stringParsers:[{re:/rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*?\)/,format:"rgb",parse:function(t){return[t[1],t[2],t[3],1]}},{re:/rgb\(\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*?\)/,format:"rgb",parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],1]}},{re:/rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d*(?:\.\d+)?)\s*)?\)/,format:"rgba",parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba\(\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*(?:,\s*(\d*(?:\.\d+)?)\s*)?\)/,format:"rgba",parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/hsl\(\s*(\d*(?:\.\d+)?)\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*?\)/,format:"hsl",parse:function(t){return[t[1]/360,t[2]/100,t[3]/100,t[4]]}},{re:/hsla\(\s*(\d*(?:\.\d+)?)\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*(?:,\s*(\d*(?:\.\d+)?)\s*)?\)/,format:"hsla",parse:function(t){return[t[1]/360,t[2]/100,t[3]/100,t[4]]}},{re:/#?([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,format:"hex",parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16),1]}},{re:/#?([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/,format:"hex",parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16),1]}}],colorNameToHex:function(t){return void 0!==this.colors[t.toLowerCase()]&&this.colors[t.toLowerCase()]}};var i={horizontal:!1,inline:!1,color:!1,format:!1,input:"input",container:!1,component:".add-on, .input-group-addon",fallbackColor:!1,fallbackFormat:"hex",hexNumberSignPrefix:!0,sliders:{saturation:{maxLeft:100,maxTop:100,callLeft:"setSaturation",callTop:"setBrightness"},hue:{maxLeft:0,maxTop:100,callLeft:!1,callTop:"setHue"},alpha:{maxLeft:0,maxTop:100,callLeft:!1,callTop:"setAlpha"}},slidersHorz:{saturation:{maxLeft:100,maxTop:100,callLeft:"setSaturation",callTop:"setBrightness"},hue:{maxLeft:100,maxTop:0,callLeft:"setHue",callTop:!1},alpha:{maxLeft:100,maxTop:0,callLeft:"setAlpha",callTop:!1}},template:'<div class="colorpicker dropdown-menu"><div class="colorpicker-saturation"><i><b></b></i></div><div class="colorpicker-hue"><i></i></div><div class="colorpicker-alpha"><i></i></div><div class="colorpicker-color"><div /></div><div class="colorpicker-selectors"></div></div>',align:"right",customClass:null,colorSelectors:null},n=function(e,n){this.element=t(e).addClass("colorpicker-element"),this.options=t.extend(!0,{},i,this.element.data(),n),this.component=this.options.component,this.component=!1!==this.component&&this.element.find(this.component),this.component&&0===this.component.length&&(this.component=!1),this.container=!0===this.options.container?this.element:this.options.container,this.container=!1!==this.container&&t(this.container),this.input=this.element.is("input")?this.element:!!this.options.input&&this.element.find(this.options.input),this.input&&0===this.input.length&&(this.input=!1),this.color=this.createColor(!1!==this.options.color?this.options.color:this.getValue()),this.format=!1!==this.options.format?this.options.format:this.color.origFormat,!1!==this.options.color&&(this.updateInput(this.color),this.updateData(this.color)),this.disabled=!1;var o=this.picker=t(this.options.template);if(this.options.customClass&&o.addClass(this.options.customClass),this.options.inline?o.addClass("colorpicker-inline colorpicker-visible"):o.addClass("colorpicker-hidden"),this.options.horizontal&&o.addClass("colorpicker-horizontal"),-1===["rgba","hsla","alias"].indexOf(this.format)&&!1!==this.options.format&&"transparent"!==this.getValue()||o.addClass("colorpicker-with-alpha"),"right"===this.options.align&&o.addClass("colorpicker-right"),!0===this.options.inline&&o.addClass("colorpicker-no-arrow"),this.options.colorSelectors){var a=this,r=a.picker.find(".colorpicker-selectors");r.length>0&&(t.each(this.options.colorSelectors,function(e,i){var n=t("<i />").addClass("colorpicker-selectors-color").css("background-color",i).data("class",e).data("alias",e);n.on("mousedown.colorpicker touchstart.colorpicker",function(e){e.preventDefault(),a.setValue("alias"===a.format?t(this).data("alias"):t(this).css("background-color"))}),r.append(n)}),r.show().addClass("colorpicker-visible"))}o.on("mousedown.colorpicker touchstart.colorpicker",t.proxy(function(t){t.target===t.currentTarget&&t.preventDefault()},this)),o.find(".colorpicker-saturation, .colorpicker-hue, .colorpicker-alpha").on("mousedown.colorpicker touchstart.colorpicker",t.proxy(this.mousedown,this)),o.appendTo(this.container?this.container:t("body")),!1!==this.input&&(this.input.on({"keyup.colorpicker":t.proxy(this.keyup,this)}),this.input.on({"change.colorpicker":t.proxy(this.change,this)}),!1===this.component&&this.element.on({"focus.colorpicker":t.proxy(this.show,this)}),!1===this.options.inline&&this.element.on({"focusout.colorpicker":t.proxy(this.hide,this)})),!1!==this.component&&this.component.on({"click.colorpicker":t.proxy(this.show,this)}),!1===this.input&&!1===this.component&&this.element.on({"click.colorpicker":t.proxy(this.show,this)}),!1!==this.input&&!1!==this.component&&"color"===this.input.attr("type")&&this.input.on({"click.colorpicker":t.proxy(this.show,this),"focus.colorpicker":t.proxy(this.show,this)}),this.update(),t(t.proxy(function(){this.element.trigger("create")},this))};n.Color=e,n.prototype={constructor:n,destroy:function(){this.picker.remove(),this.element.removeData("colorpicker","color").off(".colorpicker"),!1!==this.input&&this.input.off(".colorpicker"),!1!==this.component&&this.component.off(".colorpicker"),this.element.removeClass("colorpicker-element"),this.element.trigger({type:"destroy"})},reposition:function(){if(!1!==this.options.inline||this.options.container)return!1;var t=this.container&&this.container[0]!==window.document.body?"position":"offset",e=this.component||this.element,i=e[t]();"right"===this.options.align&&(i.left-=this.picker.outerWidth()-e.outerWidth()),this.picker.css({top:i.top+e.outerHeight(),left:i.left})},show:function(e){this.isDisabled()||(this.picker.addClass("colorpicker-visible").removeClass("colorpicker-hidden"),this.reposition(),t(window).on("resize.colorpicker",t.proxy(this.reposition,this)),!e||this.hasInput()&&"color"!==this.input.attr("type")||e.stopPropagation&&e.preventDefault&&(e.stopPropagation(),e.preventDefault()),!this.component&&this.input||!1!==this.options.inline||t(window.document).on({"mousedown.colorpicker":t.proxy(this.hide,this)}),this.element.trigger({type:"showPicker",color:this.color}))},hide:function(e){if(void 0!==e&&e.target&&(t(e.currentTarget).parents(".colorpicker").length>0||t(e.target).parents(".colorpicker").length>0))return!1;this.picker.addClass("colorpicker-hidden").removeClass("colorpicker-visible"),t(window).off("resize.colorpicker",this.reposition),t(window.document).off({"mousedown.colorpicker":this.hide}),this.update(),this.element.trigger({type:"hidePicker",color:this.color})},updateData:function(t){return t=t||this.color.toString(!1,this.format),this.element.data("color",t),t},updateInput:function(t){return t=t||this.color.toString(!1,this.format),!1!==this.input&&(this.input.prop("value",t),this.input.trigger("change")),t},updatePicker:function(t){void 0!==t&&(this.color=this.createColor(t));var e=!1===this.options.horizontal?this.options.sliders:this.options.slidersHorz,i=this.picker.find("i");if(0!==i.length)return!1===this.options.horizontal?(e=this.options.sliders,i.eq(1).css("top",e.hue.maxTop*(1-this.color.value.h)).end().eq(2).css("top",e.alpha.maxTop*(1-this.color.value.a))):(e=this.options.slidersHorz,i.eq(1).css("left",e.hue.maxLeft*(1-this.color.value.h)).end().eq(2).css("left",e.alpha.maxLeft*(1-this.color.value.a))),i.eq(0).css({top:e.saturation.maxTop-this.color.value.b*e.saturation.maxTop,left:this.color.value.s*e.saturation.maxLeft}),this.picker.find(".colorpicker-saturation").css("backgroundColor",this.color.toHex(!0,this.color.value.h,1,1,1)),this.picker.find(".colorpicker-alpha").css("backgroundColor",this.color.toHex(!0)),this.picker.find(".colorpicker-color, .colorpicker-color div").css("backgroundColor",this.color.toString(!0,this.format)),t},updateComponent:function(t){var e;if(e=void 0!==t?this.createColor(t):this.color,!1!==this.component){var i=this.component.find("i").eq(0);i.length>0?i.css({backgroundColor:e.toString(!0,this.format)}):this.component.css({backgroundColor:e.toString(!0,this.format)})}return e.toString(!1,this.format)},update:function(t){var e;return!1===this.getValue(!1)&&!0!==t||(e=this.updateComponent(),this.updateInput(e),this.updateData(e),this.updatePicker()),e},setValue:function(t){this.color=this.createColor(t),this.update(!0),this.element.trigger({type:"changeColor",color:this.color,value:t})},createColor:function(t){return new e(t||null,this.options.colorSelectors,this.options.fallbackColor?this.options.fallbackColor:this.color,this.options.fallbackFormat,this.options.hexNumberSignPrefix)},getValue:function(t){t=void 0===t?this.options.fallbackColor:t;var e;return e=this.hasInput()?this.input.val():this.element.data("color"),void 0!==e&&""!==e&&null!==e||(e=t),e},hasInput:function(){return!1!==this.input},isDisabled:function(){return this.disabled},disable:function(){return this.hasInput()&&this.input.prop("disabled",!0),this.disabled=!0,this.element.trigger({type:"disable",color:this.color,value:this.getValue()}),!0},enable:function(){return this.hasInput()&&this.input.prop("disabled",!1),this.disabled=!1,this.element.trigger({type:"enable",color:this.color,value:this.getValue()}),!0},currentSlider:null,mousePointer:{left:0,top:0},mousedown:function(e){!e.pageX&&!e.pageY&&e.originalEvent&&e.originalEvent.touches&&(e.pageX=e.originalEvent.touches[0].pageX,e.pageY=e.originalEvent.touches[0].pageY),e.stopPropagation(),e.preventDefault();var i=t(e.target),n=i.closest("div"),o=this.options.horizontal?this.options.slidersHorz:this.options.sliders;if(!n.is(".colorpicker")){if(n.is(".colorpicker-saturation"))this.currentSlider=t.extend({},o.saturation);else if(n.is(".colorpicker-hue"))this.currentSlider=t.extend({},o.hue);else{if(!n.is(".colorpicker-alpha"))return!1;this.currentSlider=t.extend({},o.alpha)}var a=n.offset();this.currentSlider.guide=n.find("i")[0].style,this.currentSlider.left=e.pageX-a.left,this.currentSlider.top=e.pageY-a.top,this.mousePointer={left:e.pageX,top:e.pageY},t(window.document).on({"mousemove.colorpicker":t.proxy(this.mousemove,this),"touchmove.colorpicker":t.proxy(this.mousemove,this),"mouseup.colorpicker":t.proxy(this.mouseup,this),"touchend.colorpicker":t.proxy(this.mouseup,this)}).trigger("mousemove")}return!1},mousemove:function(t){!t.pageX&&!t.pageY&&t.originalEvent&&t.originalEvent.touches&&(t.pageX=t.originalEvent.touches[0].pageX,t.pageY=t.originalEvent.touches[0].pageY),t.stopPropagation(),t.preventDefault();var e=Math.max(0,Math.min(this.currentSlider.maxLeft,this.currentSlider.left+((t.pageX||this.mousePointer.left)-this.mousePointer.left))),i=Math.max(0,Math.min(this.currentSlider.maxTop,this.currentSlider.top+((t.pageY||this.mousePointer.top)-this.mousePointer.top)));return this.currentSlider.guide.left=e+"px",this.currentSlider.guide.top=i+"px",this.currentSlider.callLeft&&this.color[this.currentSlider.callLeft].call(this.color,e/this.currentSlider.maxLeft),this.currentSlider.callTop&&this.color[this.currentSlider.callTop].call(this.color,i/this.currentSlider.maxTop),!1!==this.options.format||"setAlpha"!==this.currentSlider.callTop&&"setAlpha"!==this.currentSlider.callLeft||(1!==this.color.value.a?(this.format="rgba",this.color.origFormat="rgba"):(this.format="hex",this.color.origFormat="hex")),this.update(!0),this.element.trigger({type:"changeColor",color:this.color}),!1},mouseup:function(e){return e.stopPropagation(),e.preventDefault(),t(window.document).off({"mousemove.colorpicker":this.mousemove,"touchmove.colorpicker":this.mousemove,"mouseup.colorpicker":this.mouseup,"touchend.colorpicker":this.mouseup}),!1},change:function(t){this.keyup(t)},keyup:function(t){38===t.keyCode?(this.color.value.a<1&&(this.color.value.a=Math.round(100*(this.color.value.a+.01))/100),this.update(!0)):40===t.keyCode?(this.color.value.a>0&&(this.color.value.a=Math.round(100*(this.color.value.a-.01))/100),this.update(!0)):(this.color=this.createColor(this.input.val()),this.color.origFormat&&!1===this.options.format&&(this.format=this.color.origFormat),!1!==this.getValue(!1)&&(this.updateData(),this.updateComponent(),this.updatePicker())),this.element.trigger({type:"changeColor",color:this.color,value:this.input.val()})}},t.colorpicker=n,t.fn.colorpicker=function(e){var i=Array.prototype.slice.call(arguments,1),o=1===this.length,a=null,r=this.each(function(){var o=t(this),r=o.data("colorpicker"),s="object"==typeof e?e:{};r||(r=new n(this,s),o.data("colorpicker",r)),"string"==typeof e?t.isFunction(r[e])?a=r[e].apply(r,i):(i.length&&(r[e]=i[0]),a=r[e]):a=o});return o?a:r},t.fn.colorpicker.constructor=n}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t("object"==typeof exports?require("jquery"):jQuery)}(function(t,e){function i(){return new Date(Date.UTC.apply(Date,arguments))}function n(){var t=new Date;return i(t.getFullYear(),t.getMonth(),t.getDate())}function o(t,e){return t.getUTCFullYear()===e.getUTCFullYear()&&t.getUTCMonth()===e.getUTCMonth()&&t.getUTCDate()===e.getUTCDate()}function a(i,n){return function(){return n!==e&&t.fn.datepicker.deprecated(n),this[i].apply(this,arguments)}}function r(t){return t&&!isNaN(t.getTime())}function s(e,i){function n(t,e){return e.toLowerCase()}var o,a=t(e).data(),r={},s=new RegExp("^"+i.toLowerCase()+"([A-Z])");i=new RegExp("^"+i.toLowerCase());for(var l in a)i.test(l)&&(o=l.replace(s,n),r[o]=a[l]);return r}function l(e){var i={};if(m[e]||(e=e.split("-")[0],m[e])){var n=m[e];return t.each(g,function(t,e){e in n&&(i[e]=n[e])}),i}}var d=function(){var e={get:function(t){return this.slice(t)[0]},contains:function(t){for(var e=t&&t.valueOf(),i=0,n=this.length;i<n;i++)if(0<=this[i].valueOf()-e&&this[i].valueOf()-e<864e5)return i;return-1},remove:function(t){this.splice(t,1)},replace:function(e){e&&(t.isArray(e)||(e=[e]),this.clear(),this.push.apply(this,e))},clear:function(){this.length=0},copy:function(){var t=new d;return t.replace(this),t}};return function(){var i=[];return i.push.apply(i,arguments),t.extend(i,e),i}}(),u=function(e,i){t.data(e,"datepicker",this),this._process_options(i),this.dates=new d,this.viewDate=this.o.defaultViewDate,this.focusDate=null,this.element=t(e),this.isInput=this.element.is("input"),this.inputField=this.isInput?this.element:this.element.find("input"),this.component=!!this.element.hasClass("date")&&this.element.find(".add-on, .input-group-addon, .btn"),this.component&&0===this.component.length&&(this.component=!1),this.isInline=!this.component&&this.element.is("div"),this.picker=t(v.template),this._check_template(this.o.templates.leftArrow)&&this.picker.find(".prev").html(this.o.templates.leftArrow),this._check_template(this.o.templates.rightArrow)&&this.picker.find(".next").html(this.o.templates.rightArrow),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("datepicker-inline").appendTo(this.element):this.picker.addClass("datepicker-dropdown dropdown-menu"),this.o.rtl&&this.picker.addClass("datepicker-rtl"),this.o.calendarWeeks&&this.picker.find(".datepicker-days .datepicker-switch, thead .datepicker-title, tfoot .today, tfoot .clear").attr("colspan",function(t,e){return Number(e)+1}),this._process_options({startDate:this._o.startDate,endDate:this._o.endDate,daysOfWeekDisabled:this.o.daysOfWeekDisabled,daysOfWeekHighlighted:this.o.daysOfWeekHighlighted,datesDisabled:this.o.datesDisabled}),this._allow_update=!1,this.setViewMode(this.o.startView),this._allow_update=!0,this.fillDow(),this.fillMonths(),this.update(),this.isInline&&this.show()};u.prototype={constructor:u,_resolveViewName:function(e){return t.each(v.viewModes,function(i,n){if(e===i||-1!==t.inArray(e,n.names))return e=i,!1}),e},_resolveDaysOfWeek:function(e){return t.isArray(e)||(e=e.split(/[,\s]*/)),t.map(e,Number)},_check_template:function(i){try{if(i===e||""===i)return!1;if((i.match(/[<>]/g)||[]).length<=0)return!0;return t(i).length>0}catch(t){return!1}},_process_options:function(e){this._o=t.extend({},this._o,e);var o=this.o=t.extend({},this._o),a=o.language;m[a]||(a=a.split("-")[0],m[a]||(a=p.language)),o.language=a,o.startView=this._resolveViewName(o.startView),o.minViewMode=this._resolveViewName(o.minViewMode),o.maxViewMode=this._resolveViewName(o.maxViewMode),o.startView=Math.max(this.o.minViewMode,Math.min(this.o.maxViewMode,o.startView)),!0!==o.multidate&&(o.multidate=Number(o.multidate)||!1,!1!==o.multidate&&(o.multidate=Math.max(0,o.multidate))),o.multidateSeparator=String(o.multidateSeparator),o.weekStart%=7,o.weekEnd=(o.weekStart+6)%7;var r=v.parseFormat(o.format);o.startDate!==-1/0&&(o.startDate?o.startDate instanceof Date?o.startDate=this._local_to_utc(this._zero_time(o.startDate)):o.startDate=v.parseDate(o.startDate,r,o.language,o.assumeNearbyYear):o.startDate=-1/0),o.endDate!==1/0&&(o.endDate?o.endDate instanceof Date?o.endDate=this._local_to_utc(this._zero_time(o.endDate)):o.endDate=v.parseDate(o.endDate,r,o.language,o.assumeNearbyYear):o.endDate=1/0),o.daysOfWeekDisabled=this._resolveDaysOfWeek(o.daysOfWeekDisabled||[]),o.daysOfWeekHighlighted=this._resolveDaysOfWeek(o.daysOfWeekHighlighted||[]),o.datesDisabled=o.datesDisabled||[],t.isArray(o.datesDisabled)||(o.datesDisabled=o.datesDisabled.split(",")),o.datesDisabled=t.map(o.datesDisabled,function(t){return v.parseDate(t,r,o.language,o.assumeNearbyYear)});var s=String(o.orientation).toLowerCase().split(/\s+/g),l=o.orientation.toLowerCase();if(s=t.grep(s,function(t){return/^auto|left|right|top|bottom$/.test(t)}),o.orientation={x:"auto",y:"auto"},l&&"auto"!==l)if(1===s.length)switch(s[0]){case"top":case"bottom":o.orientation.y=s[0];break;case"left":case"right":o.orientation.x=s[0]}else l=t.grep(s,function(t){return/^left|right$/.test(t)}),o.orientation.x=l[0]||"auto",l=t.grep(s,function(t){return/^top|bottom$/.test(t)}),o.orientation.y=l[0]||"auto";else;if(o.defaultViewDate instanceof Date||"string"==typeof o.defaultViewDate)o.defaultViewDate=v.parseDate(o.defaultViewDate,r,o.language,o.assumeNearbyYear);else if(o.defaultViewDate){var d=o.defaultViewDate.year||(new Date).getFullYear(),u=o.defaultViewDate.month||0,h=o.defaultViewDate.day||1;o.defaultViewDate=i(d,u,h)}else o.defaultViewDate=n()},_events:[],_secondaryEvents:[],_applyEvents:function(t){for(var i,n,o,a=0;a<t.length;a++)i=t[a][0],2===t[a].length?(n=e,o=t[a][1]):3===t[a].length&&(n=t[a][1],o=t[a][2]),i.on(o,n)},_unapplyEvents:function(t){for(var i,n,o,a=0;a<t.length;a++)i=t[a][0],2===t[a].length?(o=e,n=t[a][1]):3===t[a].length&&(o=t[a][1],n=t[a][2]),i.off(n,o)},_buildEvents:function(){var e={keyup:t.proxy(function(e){-1===t.inArray(e.keyCode,[27,37,39,38,40,32,13,9])&&this.update()},this),keydown:t.proxy(this.keydown,this),paste:t.proxy(this.paste,this)};!0===this.o.showOnFocus&&(e.focus=t.proxy(this.show,this)),this.isInput?this._events=[[this.element,e]]:this.component&&this.inputField.length?this._events=[[this.inputField,e],[this.component,{click:t.proxy(this.show,this)}]]:this._events=[[this.element,{click:t.proxy(this.show,this),keydown:t.proxy(this.keydown,this)}]],this._events.push([this.element,"*",{blur:t.proxy(function(t){this._focused_from=t.target},this)}],[this.element,{blur:t.proxy(function(t){this._focused_from=t.target},this)}]),this.o.immediateUpdates&&this._events.push([this.element,{"changeYear changeMonth":t.proxy(function(t){this.update(t.date)},this)}]),this._secondaryEvents=[[this.picker,{click:t.proxy(this.click,this)}],[this.picker,".prev, .next",{click:t.proxy(this.navArrowsClick,this)}],[this.picker,".day:not(.disabled)",{click:t.proxy(this.dayCellClick,this)}],[t(window),{resize:t.proxy(this.place,this)}],[t(document),{"mousedown touchstart":t.proxy(function(t){this.element.is(t.target)||this.element.find(t.target).length||this.picker.is(t.target)||this.picker.find(t.target).length||this.isInline||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(e,i){var n=i||this.dates.get(-1),o=this._utc_to_local(n);this.element.trigger({type:e,date:o,viewMode:this.viewMode,dates:t.map(this.dates,this._utc_to_local),format:t.proxy(function(t,e){0===arguments.length?(t=this.dates.length-1,e=this.o.format):"string"==typeof t&&(e=t,t=this.dates.length-1),e=e||this.o.format;var i=this.dates.get(t);return v.formatDate(i,e,this.o.language)},this)})},show:function(){if(!(this.inputField.prop("disabled")||this.inputField.prop("readonly")&&!1===this.o.enableOnReadonly))return this.isInline||this.picker.appendTo(this.o.container),this.place(),this.picker.show(),this._attachSecondaryEvents(),this._trigger("show"),(window.navigator.msMaxTouchPoints||"ontouchstart"in document)&&this.o.disableTouchKeyboard&&t(this.element).blur(),this},hide:function(){return this.isInline||!this.picker.is(":visible")?this:(this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.setViewMode(this.o.startView),this.o.forceParse&&this.inputField.val()&&this.setValue(),this._trigger("hide"),this)},destroy:function(){return this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date,this},paste:function(e){var i;if(e.originalEvent.clipboardData&&e.originalEvent.clipboardData.types&&-1!==t.inArray("text/plain",e.originalEvent.clipboardData.types))i=e.originalEvent.clipboardData.getData("text/plain");else{if(!window.clipboardData)return;i=window.clipboardData.getData("Text")}this.setDate(i),this.update(),e.preventDefault()},_utc_to_local:function(t){if(!t)return t;var e=new Date(t.getTime()+6e4*t.getTimezoneOffset());return e.getTimezoneOffset()!==t.getTimezoneOffset()&&(e=new Date(t.getTime()+6e4*e.getTimezoneOffset())),e},_local_to_utc:function(t){return t&&new Date(t.getTime()-6e4*t.getTimezoneOffset())},_zero_time:function(t){return t&&new Date(t.getFullYear(),t.getMonth(),t.getDate())},_zero_utc_time:function(t){return t&&i(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate())},getDates:function(){return t.map(this.dates,this._utc_to_local)},getUTCDates:function(){return t.map(this.dates,function(t){return new Date(t)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){var t=this.dates.get(-1);return t!==e?new Date(t):null},clearDates:function(){this.inputField.val(""),this.update(),this._trigger("changeDate"),this.o.autoclose&&this.hide()},setDates:function(){var e=t.isArray(arguments[0])?arguments[0]:arguments;return this.update.apply(this,e),this._trigger("changeDate"),this.setValue(),this},setUTCDates:function(){var e=t.isArray(arguments[0])?arguments[0]:arguments;return this.setDates.apply(this,t.map(e,this._utc_to_local)),this},setDate:a("setDates"),setUTCDate:a("setUTCDates"),remove:a("destroy","Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead"),setValue:function(){var t=this.getFormattedDate();return this.inputField.val(t),this},getFormattedDate:function(i){i===e&&(i=this.o.format);var n=this.o.language;return t.map(this.dates,function(t){return v.formatDate(t,i,n)}).join(this.o.multidateSeparator)},getStartDate:function(){return this.o.startDate},setStartDate:function(t){return this._process_options({startDate:t}),this.update(),this.updateNavArrows(),this},getEndDate:function(){return this.o.endDate},setEndDate:function(t){return this._process_options({endDate:t}),this.update(),this.updateNavArrows(),this},setDaysOfWeekDisabled:function(t){return this._process_options({daysOfWeekDisabled:t}),this.update(),this},setDaysOfWeekHighlighted:function(t){return this._process_options({daysOfWeekHighlighted:t}),this.update(),this},setDatesDisabled:function(t){return this._process_options({datesDisabled:t}),this.update(),this},place:function(){if(this.isInline)return this;var e=this.picker.outerWidth(),i=this.picker.outerHeight(),n=t(this.o.container),o=n.width(),a="body"===this.o.container?t(document).scrollTop():n.scrollTop(),r=n.offset(),s=[0];this.element.parents().each(function(){var e=t(this).css("z-index");"auto"!==e&&0!==Number(e)&&s.push(Number(e))});var l=Math.max.apply(Math,s)+this.o.zIndexOffset,d=this.component?this.component.parent().offset():this.element.offset(),u=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),h=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),c=d.left-r.left,f=d.top-r.top;"body"!==this.o.container&&(f+=a),this.picker.removeClass("datepicker-orient-top datepicker-orient-bottom datepicker-orient-right datepicker-orient-left"),"auto"!==this.o.orientation.x?(this.picker.addClass("datepicker-orient-"+this.o.orientation.x),"right"===this.o.orientation.x&&(c-=e-h)):d.left<0?(this.picker.addClass("datepicker-orient-left"),c-=d.left-10):c+e>o?(this.picker.addClass("datepicker-orient-right"),
|
|
c+=h-e):this.o.rtl?this.picker.addClass("datepicker-orient-right"):this.picker.addClass("datepicker-orient-left");var p,g=this.o.orientation.y;if("auto"===g&&(p=-a+f-i,g=p<0?"bottom":"top"),this.picker.addClass("datepicker-orient-"+g),"top"===g?f-=i+parseInt(this.picker.css("padding-top")):f+=u,this.o.rtl){var m=o-(c+h);this.picker.css({top:f,right:m,zIndex:l})}else this.picker.css({top:f,left:c,zIndex:l});return this},_allow_update:!0,update:function(){if(!this._allow_update)return this;var e=this.dates.copy(),i=[],n=!1;return arguments.length?(t.each(arguments,t.proxy(function(t,e){e instanceof Date&&(e=this._local_to_utc(e)),i.push(e)},this)),n=!0):(i=this.isInput?this.element.val():this.element.data("date")||this.inputField.val(),i=i&&this.o.multidate?i.split(this.o.multidateSeparator):[i],delete this.element.data().date),i=t.map(i,t.proxy(function(t){return v.parseDate(t,this.o.format,this.o.language,this.o.assumeNearbyYear)},this)),i=t.grep(i,t.proxy(function(t){return!this.dateWithinRange(t)||!t},this),!0),this.dates.replace(i),this.o.updateViewDate&&(this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate?this.viewDate=new Date(this.o.endDate):this.viewDate=this.o.defaultViewDate),n?(this.setValue(),this.element.change()):this.dates.length&&String(e)!==String(this.dates)&&n&&(this._trigger("changeDate"),this.element.change()),!this.dates.length&&e.length&&(this._trigger("clearDate"),this.element.change()),this.fill(),this},fillDow:function(){if(this.o.showWeekDays){var e=this.o.weekStart,i="<tr>";for(this.o.calendarWeeks&&(i+='<th class="cw"> </th>');e<this.o.weekStart+7;)i+='<th class="dow',-1!==t.inArray(e,this.o.daysOfWeekDisabled)&&(i+=" disabled"),i+='">'+m[this.o.language].daysMin[e++%7]+"</th>";i+="</tr>",this.picker.find(".datepicker-days thead").append(i)}},fillMonths:function(){for(var t,e=this._utc_to_local(this.viewDate),i="",n=0;n<12;n++)t=e&&e.getMonth()===n?" focused":"",i+='<span class="month'+t+'">'+m[this.o.language].monthsShort[n]+"</span>";this.picker.find(".datepicker-months td").html(i)},setRange:function(e){e&&e.length?this.range=t.map(e,function(t){return t.valueOf()}):delete this.range,this.fill()},getClassNames:function(e){var i=[],a=this.viewDate.getUTCFullYear(),r=this.viewDate.getUTCMonth(),s=n();return e.getUTCFullYear()<a||e.getUTCFullYear()===a&&e.getUTCMonth()<r?i.push("old"):(e.getUTCFullYear()>a||e.getUTCFullYear()===a&&e.getUTCMonth()>r)&&i.push("new"),this.focusDate&&e.valueOf()===this.focusDate.valueOf()&&i.push("focused"),this.o.todayHighlight&&o(e,s)&&i.push("today"),-1!==this.dates.contains(e)&&i.push("active"),this.dateWithinRange(e)||i.push("disabled"),this.dateIsDisabled(e)&&i.push("disabled","disabled-date"),-1!==t.inArray(e.getUTCDay(),this.o.daysOfWeekHighlighted)&&i.push("highlighted"),this.range&&(e>this.range[0]&&e<this.range[this.range.length-1]&&i.push("range"),-1!==t.inArray(e.valueOf(),this.range)&&i.push("selected"),e.valueOf()===this.range[0]&&i.push("range-start"),e.valueOf()===this.range[this.range.length-1]&&i.push("range-end")),i},_fill_yearsView:function(i,n,o,a,r,s,l){for(var d,u,h,c="",f=o/10,p=this.picker.find(i),g=Math.floor(a/o)*o,m=g+9*f,v=Math.floor(this.viewDate.getFullYear()/f)*f,b=t.map(this.dates,function(t){return Math.floor(t.getUTCFullYear()/f)*f}),y=g-f;y<=m+f;y+=f)d=[n],u=null,y===g-f?d.push("old"):y===m+f&&d.push("new"),-1!==t.inArray(y,b)&&d.push("active"),(y<r||y>s)&&d.push("disabled"),y===v&&d.push("focused"),l!==t.noop&&(h=l(new Date(y,0,1)),h===e?h={}:"boolean"==typeof h?h={enabled:h}:"string"==typeof h&&(h={classes:h}),!1===h.enabled&&d.push("disabled"),h.classes&&(d=d.concat(h.classes.split(/\s+/))),h.tooltip&&(u=h.tooltip)),c+='<span class="'+d.join(" ")+'"'+(u?' title="'+u+'"':"")+">"+y+"</span>";p.find(".datepicker-switch").text(g+"-"+m),p.find("td").html(c)},fill:function(){var n,o,a=new Date(this.viewDate),r=a.getUTCFullYear(),s=a.getUTCMonth(),l=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,d=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,u=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,h=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,c=m[this.o.language].today||m.en.today||"",f=m[this.o.language].clear||m.en.clear||"",p=m[this.o.language].titleFormat||m.en.titleFormat;if(!isNaN(r)&&!isNaN(s)){this.picker.find(".datepicker-days .datepicker-switch").text(v.formatDate(a,p,this.o.language)),this.picker.find("tfoot .today").text(c).css("display",!0===this.o.todayBtn||"linked"===this.o.todayBtn?"table-cell":"none"),this.picker.find("tfoot .clear").text(f).css("display",!0===this.o.clearBtn?"table-cell":"none"),this.picker.find("thead .datepicker-title").text(this.o.title).css("display","string"==typeof this.o.title&&""!==this.o.title?"table-cell":"none"),this.updateNavArrows(),this.fillMonths();var g=i(r,s,0),b=g.getUTCDate();g.setUTCDate(b-(g.getUTCDay()-this.o.weekStart+7)%7);var y=new Date(g);g.getUTCFullYear()<100&&y.setUTCFullYear(g.getUTCFullYear()),y.setUTCDate(y.getUTCDate()+42),y=y.valueOf();for(var x,w,k=[];g.valueOf()<y;){if((x=g.getUTCDay())===this.o.weekStart&&(k.push("<tr>"),this.o.calendarWeeks)){var _=new Date(+g+(this.o.weekStart-x-7)%7*864e5),C=new Date(Number(_)+(11-_.getUTCDay())%7*864e5),D=new Date(Number(D=i(C.getUTCFullYear(),0,1))+(11-D.getUTCDay())%7*864e5),M=(C-D)/864e5/7+1;k.push('<td class="cw">'+M+"</td>")}w=this.getClassNames(g),w.push("day");var S=g.getUTCDate();this.o.beforeShowDay!==t.noop&&(o=this.o.beforeShowDay(this._utc_to_local(g)),o===e?o={}:"boolean"==typeof o?o={enabled:o}:"string"==typeof o&&(o={classes:o}),!1===o.enabled&&w.push("disabled"),o.classes&&(w=w.concat(o.classes.split(/\s+/))),o.tooltip&&(n=o.tooltip),o.content&&(S=o.content)),w=t.isFunction(t.uniqueSort)?t.uniqueSort(w):t.unique(w),k.push('<td class="'+w.join(" ")+'"'+(n?' title="'+n+'"':"")+' data-date="'+g.getTime().toString()+'">'+S+"</td>"),n=null,x===this.o.weekEnd&&k.push("</tr>"),g.setUTCDate(g.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").html(k.join(""));var T=m[this.o.language].monthsTitle||m.en.monthsTitle||"Months",F=this.picker.find(".datepicker-months").find(".datepicker-switch").text(this.o.maxViewMode<2?T:r).end().find("tbody span").removeClass("active");if(t.each(this.dates,function(t,e){e.getUTCFullYear()===r&&F.eq(e.getUTCMonth()).addClass("active")}),(r<l||r>u)&&F.addClass("disabled"),r===l&&F.slice(0,d).addClass("disabled"),r===u&&F.slice(h+1).addClass("disabled"),this.o.beforeShowMonth!==t.noop){var A=this;t.each(F,function(i,n){var o=new Date(r,i,1),a=A.o.beforeShowMonth(o);a===e?a={}:"boolean"==typeof a?a={enabled:a}:"string"==typeof a&&(a={classes:a}),!1!==a.enabled||t(n).hasClass("disabled")||t(n).addClass("disabled"),a.classes&&t(n).addClass(a.classes),a.tooltip&&t(n).prop("title",a.tooltip)})}this._fill_yearsView(".datepicker-years","year",10,r,l,u,this.o.beforeShowYear),this._fill_yearsView(".datepicker-decades","decade",100,r,l,u,this.o.beforeShowDecade),this._fill_yearsView(".datepicker-centuries","century",1e3,r,l,u,this.o.beforeShowCentury)}},updateNavArrows:function(){if(this._allow_update){var t,e,i=new Date(this.viewDate),n=i.getUTCFullYear(),o=i.getUTCMonth(),a=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,r=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,s=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,l=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,d=1;switch(this.viewMode){case 4:d*=10;case 3:d*=10;case 2:d*=10;case 1:t=Math.floor(n/d)*d<a,e=Math.floor(n/d)*d+d>s;break;case 0:t=n<=a&&o<r,e=n>=s&&o>l}this.picker.find(".prev").toggleClass("disabled",t),this.picker.find(".next").toggleClass("disabled",e)}},click:function(e){e.preventDefault(),e.stopPropagation();var o,a,r,s;o=t(e.target),o.hasClass("datepicker-switch")&&this.viewMode!==this.o.maxViewMode&&this.setViewMode(this.viewMode+1),o.hasClass("today")&&!o.hasClass("day")&&(this.setViewMode(0),this._setDate(n(),"linked"===this.o.todayBtn?null:"view")),o.hasClass("clear")&&this.clearDates(),o.hasClass("disabled")||(o.hasClass("month")||o.hasClass("year")||o.hasClass("decade")||o.hasClass("century"))&&(this.viewDate.setUTCDate(1),a=1,1===this.viewMode?(s=o.parent().find("span").index(o),r=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(s)):(s=0,r=Number(o.text()),this.viewDate.setUTCFullYear(r)),this._trigger(v.viewModes[this.viewMode-1].e,this.viewDate),this.viewMode===this.o.minViewMode?this._setDate(i(r,s,a)):(this.setViewMode(this.viewMode-1),this.fill())),this.picker.is(":visible")&&this._focused_from&&this._focused_from.focus(),delete this._focused_from},dayCellClick:function(e){var i=t(e.currentTarget),n=i.data("date"),o=new Date(n);this.o.updateViewDate&&(o.getUTCFullYear()!==this.viewDate.getUTCFullYear()&&this._trigger("changeYear",this.viewDate),o.getUTCMonth()!==this.viewDate.getUTCMonth()&&this._trigger("changeMonth",this.viewDate)),this._setDate(o)},navArrowsClick:function(e){var i=t(e.currentTarget),n=i.hasClass("prev")?-1:1;0!==this.viewMode&&(n*=12*v.viewModes[this.viewMode].navStep),this.viewDate=this.moveMonth(this.viewDate,n),this._trigger(v.viewModes[this.viewMode].e,this.viewDate),this.fill()},_toggle_multidate:function(t){var e=this.dates.contains(t);if(t||this.dates.clear(),-1!==e?(!0===this.o.multidate||this.o.multidate>1||this.o.toggleActive)&&this.dates.remove(e):!1===this.o.multidate?(this.dates.clear(),this.dates.push(t)):this.dates.push(t),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(t,e){e&&"date"!==e||this._toggle_multidate(t&&new Date(t)),(!e&&this.o.updateViewDate||"view"===e)&&(this.viewDate=t&&new Date(t)),this.fill(),this.setValue(),e&&"view"===e||this._trigger("changeDate"),this.inputField.trigger("change"),!this.o.autoclose||e&&"date"!==e||this.hide()},moveDay:function(t,e){var i=new Date(t);return i.setUTCDate(t.getUTCDate()+e),i},moveWeek:function(t,e){return this.moveDay(t,7*e)},moveMonth:function(t,e){if(!r(t))return this.o.defaultViewDate;if(!e)return t;var i,n,o=new Date(t.valueOf()),a=o.getUTCDate(),s=o.getUTCMonth(),l=Math.abs(e);if(e=e>0?1:-1,1===l)n=-1===e?function(){return o.getUTCMonth()===s}:function(){return o.getUTCMonth()!==i},i=s+e,o.setUTCMonth(i),i=(i+12)%12;else{for(var d=0;d<l;d++)o=this.moveMonth(o,e);i=o.getUTCMonth(),o.setUTCDate(a),n=function(){return i!==o.getUTCMonth()}}for(;n();)o.setUTCDate(--a),o.setUTCMonth(i);return o},moveYear:function(t,e){return this.moveMonth(t,12*e)},moveAvailableDate:function(t,e,i){do{if(t=this[i](t,e),!this.dateWithinRange(t))return!1;i="moveDay"}while(this.dateIsDisabled(t));return t},weekOfDateIsDisabled:function(e){return-1!==t.inArray(e.getUTCDay(),this.o.daysOfWeekDisabled)},dateIsDisabled:function(e){return this.weekOfDateIsDisabled(e)||t.grep(this.o.datesDisabled,function(t){return o(e,t)}).length>0},dateWithinRange:function(t){return t>=this.o.startDate&&t<=this.o.endDate},keydown:function(t){if(!this.picker.is(":visible"))return void(40!==t.keyCode&&27!==t.keyCode||(this.show(),t.stopPropagation()));var e,i,n=!1,o=this.focusDate||this.viewDate;switch(t.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),t.preventDefault(),t.stopPropagation();break;case 37:case 38:case 39:case 40:if(!this.o.keyboardNavigation||7===this.o.daysOfWeekDisabled.length)break;e=37===t.keyCode||38===t.keyCode?-1:1,0===this.viewMode?t.ctrlKey?(i=this.moveAvailableDate(o,e,"moveYear"))&&this._trigger("changeYear",this.viewDate):t.shiftKey?(i=this.moveAvailableDate(o,e,"moveMonth"))&&this._trigger("changeMonth",this.viewDate):37===t.keyCode||39===t.keyCode?i=this.moveAvailableDate(o,e,"moveDay"):this.weekOfDateIsDisabled(o)||(i=this.moveAvailableDate(o,e,"moveWeek")):1===this.viewMode?(38!==t.keyCode&&40!==t.keyCode||(e*=4),i=this.moveAvailableDate(o,e,"moveMonth")):2===this.viewMode&&(38!==t.keyCode&&40!==t.keyCode||(e*=4),i=this.moveAvailableDate(o,e,"moveYear")),i&&(this.focusDate=this.viewDate=i,this.setValue(),this.fill(),t.preventDefault());break;case 13:if(!this.o.forceParse)break;o=this.focusDate||this.dates.get(-1)||this.viewDate,this.o.keyboardNavigation&&(this._toggle_multidate(o),n=!0),this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(t.preventDefault(),t.stopPropagation(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}n&&(this.dates.length?this._trigger("changeDate"):this._trigger("clearDate"),this.inputField.trigger("change"))},setViewMode:function(t){this.viewMode=t,this.picker.children("div").hide().filter(".datepicker-"+v.viewModes[this.viewMode].clsName).show(),this.updateNavArrows(),this._trigger("changeViewMode",new Date(this.viewDate))}};var h=function(e,i){t.data(e,"datepicker",this),this.element=t(e),this.inputs=t.map(i.inputs,function(t){return t.jquery?t[0]:t}),delete i.inputs,this.keepEmptyValues=i.keepEmptyValues,delete i.keepEmptyValues,f.call(t(this.inputs),i).on("changeDate",t.proxy(this.dateUpdated,this)),this.pickers=t.map(this.inputs,function(e){return t.data(e,"datepicker")}),this.updateDates()};h.prototype={updateDates:function(){this.dates=t.map(this.pickers,function(t){return t.getUTCDate()}),this.updateRanges()},updateRanges:function(){var e=t.map(this.dates,function(t){return t.valueOf()});t.each(this.pickers,function(t,i){i.setRange(e)})},clearDates:function(){t.each(this.pickers,function(t,e){e.clearDates()})},dateUpdated:function(i){if(!this.updating){this.updating=!0;var n=t.data(i.target,"datepicker");if(n!==e){var o=n.getUTCDate(),a=this.keepEmptyValues,r=t.inArray(i.target,this.inputs),s=r-1,l=r+1,d=this.inputs.length;if(-1!==r){if(t.each(this.pickers,function(t,e){e.getUTCDate()||e!==n&&a||e.setUTCDate(o)}),o<this.dates[s])for(;s>=0&&o<this.dates[s];)this.pickers[s--].setUTCDate(o);else if(o>this.dates[l])for(;l<d&&o>this.dates[l];)this.pickers[l++].setUTCDate(o);this.updateDates(),delete this.updating}}}},destroy:function(){t.map(this.pickers,function(t){t.destroy()}),t(this.inputs).off("changeDate",this.dateUpdated),delete this.element.data().datepicker},remove:a("destroy","Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead")};var c=t.fn.datepicker,f=function(i){var n=Array.apply(null,arguments);n.shift();var o;if(this.each(function(){var e=t(this),a=e.data("datepicker"),r="object"==typeof i&&i;if(!a){var d=s(this,"date"),c=t.extend({},p,d,r),f=l(c.language),g=t.extend({},p,f,d,r);e.hasClass("input-daterange")||g.inputs?(t.extend(g,{inputs:g.inputs||e.find("input").toArray()}),a=new h(this,g)):a=new u(this,g),e.data("datepicker",a)}"string"==typeof i&&"function"==typeof a[i]&&(o=a[i].apply(a,n))}),o===e||o instanceof u||o instanceof h)return this;if(this.length>1)throw new Error("Using only allowed for the collection of a single element ("+i+" function)");return o};t.fn.datepicker=f;var p=t.fn.datepicker.defaults={assumeNearbyYear:!1,autoclose:!1,beforeShowDay:t.noop,beforeShowMonth:t.noop,beforeShowYear:t.noop,beforeShowDecade:t.noop,beforeShowCentury:t.noop,calendarWeeks:!1,clearBtn:!1,toggleActive:!1,daysOfWeekDisabled:[],daysOfWeekHighlighted:[],datesDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keepEmptyValues:!1,keyboardNavigation:!0,language:"en",minViewMode:0,maxViewMode:4,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-1/0,startView:0,todayBtn:!1,todayHighlight:!1,updateViewDate:!0,weekStart:0,disableTouchKeyboard:!1,enableOnReadonly:!0,showOnFocus:!0,zIndexOffset:10,container:"body",immediateUpdates:!1,title:"",templates:{leftArrow:"«",rightArrow:"»"},showWeekDays:!0},g=t.fn.datepicker.locale_opts=["format","rtl","weekStart"];t.fn.datepicker.Constructor=u;var m=t.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM yyyy"}},v={viewModes:[{names:["days","month"],clsName:"days",e:"changeMonth"},{names:["months","year"],clsName:"months",e:"changeYear",navStep:1},{names:["years","decade"],clsName:"years",e:"changeDecade",navStep:10},{names:["decades","century"],clsName:"decades",e:"changeCentury",navStep:100},{names:["centuries","millennium"],clsName:"centuries",e:"changeMillennium",navStep:1e3}],validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\u5e74\u6708\u65e5\[-`{-~\t\n\r]+/g,parseFormat:function(t){if("function"==typeof t.toValue&&"function"==typeof t.toDisplay)return t;var e=t.replace(this.validParts,"\0").split("\0"),i=t.match(this.validParts);if(!e||!e.length||!i||0===i.length)throw new Error("Invalid date format.");return{separators:e,parts:i}},parseDate:function(i,o,a,r){function s(t,e){return!0===e&&(e=10),t<100&&(t+=2e3)>(new Date).getFullYear()+e&&(t-=100),t}function l(){var t=this.slice(0,d[f].length),e=d[f].slice(0,t.length);return t.toLowerCase()===e.toLowerCase()}if(!i)return e;if(i instanceof Date)return i;if("string"==typeof o&&(o=v.parseFormat(o)),o.toValue)return o.toValue(i,o,a);var d,h,c,f,p,g={d:"moveDay",m:"moveMonth",w:"moveWeek",y:"moveYear"},b={yesterday:"-1d",today:"+0d",tomorrow:"+1d"};if(i in b&&(i=b[i]),/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/i.test(i)){for(d=i.match(/([\-+]\d+)([dmwy])/gi),i=new Date,f=0;f<d.length;f++)h=d[f].match(/([\-+]\d+)([dmwy])/i),c=Number(h[1]),p=g[h[2].toLowerCase()],i=u.prototype[p](i,c);return u.prototype._zero_utc_time(i)}d=i&&i.match(this.nonpunctuation)||[];var y,x,w={},k=["yyyy","yy","M","MM","m","mm","d","dd"],_={yyyy:function(t,e){return t.setUTCFullYear(r?s(e,r):e)},m:function(t,e){if(isNaN(t))return t;for(e-=1;e<0;)e+=12;for(e%=12,t.setUTCMonth(e);t.getUTCMonth()!==e;)t.setUTCDate(t.getUTCDate()-1);return t},d:function(t,e){return t.setUTCDate(e)}};_.yy=_.yyyy,_.M=_.MM=_.mm=_.m,_.dd=_.d,i=n();var C=o.parts.slice();if(d.length!==C.length&&(C=t(C).filter(function(e,i){return-1!==t.inArray(i,k)}).toArray()),d.length===C.length){var D;for(f=0,D=C.length;f<D;f++){if(y=parseInt(d[f],10),h=C[f],isNaN(y))switch(h){case"MM":x=t(m[a].months).filter(l),y=t.inArray(x[0],m[a].months)+1;break;case"M":x=t(m[a].monthsShort).filter(l),y=t.inArray(x[0],m[a].monthsShort)+1}w[h]=y}var M,S;for(f=0;f<k.length;f++)(S=k[f])in w&&!isNaN(w[S])&&(M=new Date(i),_[S](M,w[S]),isNaN(M)||(i=M))}return i},formatDate:function(e,i,n){if(!e)return"";if("string"==typeof i&&(i=v.parseFormat(i)),i.toDisplay)return i.toDisplay(e,i,n);var o={d:e.getUTCDate(),D:m[n].daysShort[e.getUTCDay()],DD:m[n].days[e.getUTCDay()],m:e.getUTCMonth()+1,M:m[n].monthsShort[e.getUTCMonth()],MM:m[n].months[e.getUTCMonth()],yy:e.getUTCFullYear().toString().substring(2),yyyy:e.getUTCFullYear()};o.dd=(o.d<10?"0":"")+o.d,o.mm=(o.m<10?"0":"")+o.m,e=[];for(var a=t.extend([],i.separators),r=0,s=i.parts.length;r<=s;r++)a.length&&e.push(a.shift()),e.push(o[i.parts[r]]);return e.join("")},headTemplate:'<thead><tr><th colspan="7" class="datepicker-title"></th></tr><tr><th class="prev">'+p.templates.leftArrow+'</th><th colspan="5" class="datepicker-switch"></th><th class="next">'+p.templates.rightArrow+"</th></tr></thead>",contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};v.template='<div class="datepicker"><div class="datepicker-days"><table class="table-condensed">'+v.headTemplate+"<tbody></tbody>"+v.footTemplate+'</table></div><div class="datepicker-months"><table class="table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+'</table></div><div class="datepicker-years"><table class="table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+'</table></div><div class="datepicker-decades"><table class="table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+'</table></div><div class="datepicker-centuries"><table class="table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+"</table></div></div>",t.fn.datepicker.DPGlobal=v,t.fn.datepicker.noConflict=function(){return t.fn.datepicker=c,this},t.fn.datepicker.version="1.8.0",t.fn.datepicker.deprecated=function(t){var e=window.console;e&&e.warn&&e.warn("DEPRECATED: "+t)},t(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(e){var i=t(this);i.data("datepicker")||(e.preventDefault(),f.call(i,"show"))}),t(function(){f.call(t('[data-provide="datepicker-inline"]'))})}),function(t){"use strict";function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}();!function(t){var n="ekkoLightbox",o=t.fn[n],a={title:"",footer:"",maxWidth:9999,maxHeight:9999,showArrows:!0,wrapping:!0,type:null,alwaysShowClose:!1,loadingMessage:'<div class="ekko-lightbox-loader"><div><div></div><div></div></div></div>',leftArrow:"<span>❮</span>",rightArrow:"<span>❯</span>",strings:{close:"Close",fail:"Failed to load image:",type:"Could not detect remote target type. Force the type using data-type"},doc:document,onShow:function(){},onShown:function(){},onHide:function(){},onHidden:function(){},onNavigate:function(){},onContentLoaded:function(){}},r=function(){function n(i,o){var r=this;e(this,n),this._config=t.extend({},a,o),this._$modalArrows=null,this._galleryIndex=0,this._galleryName=null,this._padding=null,this._border=null,this._titleIsShown=!1,this._footerIsShown=!1,this._wantedWidth=0,this._wantedHeight=0,this._touchstartX=0,this._touchendX=0,this._modalId="ekkoLightbox-"+Math.floor(1e3*Math.random()+1),this._$element=i instanceof jQuery?i:t(i),this._isBootstrap3=3==t.fn.modal.Constructor.VERSION[0];var s='<h4 class="modal-title">'+(this._config.title||" ")+"</h4>",l='<button type="button" class="close" data-dismiss="modal" aria-label="'+this._config.strings.close+'"><span aria-hidden="true">×</span></button>',d='<div class="modal-header'+(this._config.title||this._config.alwaysShowClose?"":" hide")+'">'+(this._isBootstrap3?l+s:s+l)+"</div>",u='<div class="modal-footer'+(this._config.footer?"":" hide")+'">'+(this._config.footer||" ")+"</div>",h='<div class="modal-dialog" role="document"><div class="modal-content">'+d+'<div class="modal-body"><div class="ekko-lightbox-container"><div class="ekko-lightbox-item fade in show"></div><div class="ekko-lightbox-item fade"></div></div></div>'+u+"</div></div>";t(this._config.doc.body).append('<div id="'+this._modalId+'" class="ekko-lightbox modal fade" tabindex="-1" tabindex="-1" role="dialog" aria-hidden="true">'+h+"</div>"),this._$modal=t("#"+this._modalId,this._config.doc),this._$modalDialog=this._$modal.find(".modal-dialog").first(),this._$modalContent=this._$modal.find(".modal-content").first(),this._$modalBody=this._$modal.find(".modal-body").first(),this._$modalHeader=this._$modal.find(".modal-header").first(),this._$modalFooter=this._$modal.find(".modal-footer").first(),this._$lightboxContainer=this._$modalBody.find(".ekko-lightbox-container").first(),this._$lightboxBodyOne=this._$lightboxContainer.find("> div:first-child").first(),this._$lightboxBodyTwo=this._$lightboxContainer.find("> div:last-child").first(),this._border=this._calculateBorders(),this._padding=this._calculatePadding(),this._galleryName=this._$element.data("gallery"),this._galleryName&&(this._$galleryItems=t(document.body).find('*[data-gallery="'+this._galleryName+'"]'),this._galleryIndex=this._$galleryItems.index(this._$element),t(document).on("keydown.ekkoLightbox",this._navigationalBinder.bind(this)),this._config.showArrows&&this._$galleryItems.length>1&&(this._$lightboxContainer.append('<div class="ekko-lightbox-nav-overlay"><a href="#">'+this._config.leftArrow+'</a><a href="#">'+this._config.rightArrow+"</a></div>"),this._$modalArrows=this._$lightboxContainer.find("div.ekko-lightbox-nav-overlay").first(),this._$lightboxContainer.on("click","a:first-child",function(t){return t.preventDefault(),r.navigateLeft()}),this._$lightboxContainer.on("click","a:last-child",function(t){return t.preventDefault(),r.navigateRight()}),this.updateNavigation())),this._$modal.on("show.bs.modal",this._config.onShow.bind(this)).on("shown.bs.modal",function(){return r._toggleLoading(!0),r._handle(),r._config.onShown.call(r)}).on("hide.bs.modal",this._config.onHide.bind(this)).on("hidden.bs.modal",function(){return r._galleryName&&(t(document).off("keydown.ekkoLightbox"),t(window).off("resize.ekkoLightbox")),r._$modal.remove(),r._config.onHidden.call(r)}).modal(this._config),t(window).on("resize.ekkoLightbox",function(){r._resize(r._wantedWidth,r._wantedHeight)}),this._$lightboxContainer.on("touchstart",function(){r._touchstartX=event.changedTouches[0].screenX}).on("touchend",function(){r._touchendX=event.changedTouches[0].screenX,r._swipeGesure()})}return i(n,null,[{key:"Default",get:function(){return a}}]),i(n,[{key:"element",value:function(){return this._$element}},{key:"modal",value:function(){return this._$modal}},{key:"navigateTo",value:function(e){if(e<0||e>this._$galleryItems.length-1)return this;this._galleryIndex=e,this.updateNavigation(),this._$element=t(this._$galleryItems.get(this._galleryIndex)),this._handle()}},{key:"navigateLeft",value:function(){if(this._$galleryItems&&1!==this._$galleryItems.length){if(0===this._galleryIndex){if(!this._config.wrapping)return;this._galleryIndex=this._$galleryItems.length-1}else this._galleryIndex--;return this._config.onNavigate.call(this,"left",this._galleryIndex),this.navigateTo(this._galleryIndex)}}},{key:"navigateRight",value:function(){if(this._$galleryItems&&1!==this._$galleryItems.length){if(this._galleryIndex===this._$galleryItems.length-1){if(!this._config.wrapping)return;this._galleryIndex=0}else this._galleryIndex++;return this._config.onNavigate.call(this,"right",this._galleryIndex),this.navigateTo(this._galleryIndex)}}},{key:"updateNavigation",value:function(){if(!this._config.wrapping){var t=this._$lightboxContainer.find("div.ekko-lightbox-nav-overlay");0===this._galleryIndex?t.find("a:first-child").addClass("disabled"):t.find("a:first-child").removeClass("disabled"),this._galleryIndex===this._$galleryItems.length-1?t.find("a:last-child").addClass("disabled"):t.find("a:last-child").removeClass("disabled")}}},{key:"close",value:function(){return this._$modal.modal("hide")}},{key:"_navigationalBinder",value:function(t){return t=t||window.event,39===t.keyCode?this.navigateRight():37===t.keyCode?this.navigateLeft():void 0}},{key:"_detectRemoteType",value:function(t,e){return e=e||!1,!e&&this._isImage(t)&&(e="image"),!e&&this._getYoutubeId(t)&&(e="youtube"),!e&&this._getVimeoId(t)&&(e="vimeo"),!e&&this._getInstagramId(t)&&(e="instagram"),(!e||["image","youtube","vimeo","instagram","video","url"].indexOf(e)<0)&&(e="url"),e}},{key:"_isImage",value:function(t){return t&&t.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)}},{key:"_containerToUse",value:function(){var t=this,e=this._$lightboxBodyTwo,i=this._$lightboxBodyOne;return this._$lightboxBodyTwo.hasClass("in")&&(e=this._$lightboxBodyOne,i=this._$lightboxBodyTwo),i.removeClass("in show"),setTimeout(function(){t._$lightboxBodyTwo.hasClass("in")||t._$lightboxBodyTwo.empty(),t._$lightboxBodyOne.hasClass("in")||t._$lightboxBodyOne.empty()},500),e.addClass("in show"),e}},{key:"_handle",value:function(){var t=this._containerToUse();this._updateTitleAndFooter();var e=this._$element.attr("data-remote")||this._$element.attr("href"),i=this._detectRemoteType(e,this._$element.attr("data-type")||!1);if(["image","youtube","vimeo","instagram","video","url"].indexOf(i)<0)return this._error(this._config.strings.type);switch(i){case"image":this._preloadImage(e,t),this._preloadImageByIndex(this._galleryIndex,3);break;case"youtube":this._showYoutubeVideo(e,t);break;case"vimeo":this._showVimeoVideo(this._getVimeoId(e),t);break;case"instagram":this._showInstagramVideo(this._getInstagramId(e),t);break;case"video":this._showHtml5Video(e,t);break;default:this._loadRemoteContent(e,t)}return this}},{key:"_getYoutubeId",value:function(t){if(!t)return!1;var e=t.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);return!(!e||11!==e[2].length)&&e[2]}},{key:"_getVimeoId",value:function(t){return!!(t&&t.indexOf("vimeo")>0)&&t}},{key:"_getInstagramId",value:function(t){return!!(t&&t.indexOf("instagram")>0)&&t}},{key:"_toggleLoading",value:function(e){return e=e||!1,e?(this._$modalDialog.css("display","none"),this._$modal.removeClass("in show"),t(".modal-backdrop").append(this._config.loadingMessage)):(this._$modalDialog.css("display","block"),this._$modal.addClass("in show"),t(".modal-backdrop").find(".ekko-lightbox-loader").remove()),this}},{key:"_calculateBorders",value:function(){return{top:this._totalCssByAttribute("border-top-width"),right:this._totalCssByAttribute("border-right-width"),bottom:this._totalCssByAttribute("border-bottom-width"),left:this._totalCssByAttribute("border-left-width")}}},{key:"_calculatePadding",value:function(){return{top:this._totalCssByAttribute("padding-top"),right:this._totalCssByAttribute("padding-right"),bottom:this._totalCssByAttribute("padding-bottom"),left:this._totalCssByAttribute("padding-left")}}},{key:"_totalCssByAttribute",value:function(t){return parseInt(this._$modalDialog.css(t),10)+parseInt(this._$modalContent.css(t),10)+parseInt(this._$modalBody.css(t),10)}},{key:"_updateTitleAndFooter",value:function(){var t=this._$element.data("title")||"",e=this._$element.data("footer")||"";return this._titleIsShown=!1,t||this._config.alwaysShowClose?(this._titleIsShown=!0,this._$modalHeader.css("display","").find(".modal-title").html(t||" ")):this._$modalHeader.css("display","none"),this._footerIsShown=!1,e?(this._footerIsShown=!0,this._$modalFooter.css("display","").html(e)):this._$modalFooter.css("display","none"),this}},{key:"_showYoutubeVideo",value:function(t,e){var i=this._getYoutubeId(t),n=t.indexOf("&")>0?t.substr(t.indexOf("&")):"",o=this._$element.data("width")||560,a=this._$element.data("height")||o/(560/315);return this._showVideoIframe("//www.youtube.com/embed/"+i+"?badge=0&autoplay=1&html5=1"+n,o,a,e)}},{key:"_showVimeoVideo",value:function(t,e){var i=this._$element.data("width")||500,n=this._$element.data("height")||i/(560/315);return this._showVideoIframe(t+"?autoplay=1",i,n,e)}},{key:"_showInstagramVideo",value:function(t,e){var i=this._$element.data("width")||612,n=i+80;return t="/"!==t.substr(-1)?t+"/":t,e.html('<iframe width="'+i+'" height="'+n+'" src="'+t+'embed/" frameborder="0" allowfullscreen></iframe>'),this._resize(i,n),this._config.onContentLoaded.call(this),this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this}},{key:"_showVideoIframe",value:function(t,e,i,n){return i=i||e,n.html('<div class="embed-responsive embed-responsive-16by9"><iframe width="'+e+'" height="'+i+'" src="'+t+'" frameborder="0" allowfullscreen class="embed-responsive-item"></iframe></div>'),this._resize(e,i),this._config.onContentLoaded.call(this),this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this}},{key:"_showHtml5Video",value:function(t,e){var i=this._$element.data("width")||560,n=this._$element.data("height")||i/(560/315)
|
|
;return e.html('<div class="embed-responsive embed-responsive-16by9"><video width="'+i+'" height="'+n+'" src="'+t+'" preload="auto" autoplay controls class="embed-responsive-item"></video></div>'),this._resize(i,n),this._config.onContentLoaded.call(this),this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this}},{key:"_loadRemoteContent",value:function(e,i){var n=this,o=this._$element.data("width")||560,a=this._$element.data("height")||560,r=this._$element.data("disableExternalCheck")||!1;return this._toggleLoading(!1),r||this._isExternal(e)?(i.html('<iframe src="'+e+'" frameborder="0" allowfullscreen></iframe>'),this._config.onContentLoaded.call(this)):i.load(e,t.proxy(function(){return n._$element.trigger("loaded.bs.modal")})),this._$modalArrows&&this._$modalArrows.css("display","none"),this._resize(o,a),this}},{key:"_isExternal",value:function(t){var e=t.match(/^([^:\/?#]+:)?(?:\/\/([^\/?#]*))?([^?#]+)?(\?[^#]*)?(#.*)?/);return"string"==typeof e[1]&&e[1].length>0&&e[1].toLowerCase()!==location.protocol||"string"==typeof e[2]&&e[2].length>0&&e[2].replace(new RegExp(":("+{"http:":80,"https:":443}[location.protocol]+")?$"),"")!==location.host}},{key:"_error",value:function(t){return console.error(t),this._containerToUse().html(t),this._resize(300,300),this}},{key:"_preloadImageByIndex",value:function(e,i){if(this._$galleryItems){var n=t(this._$galleryItems.get(e),!1);if(void 0!==n){var o=n.attr("data-remote")||n.attr("href");return("image"===n.attr("data-type")||this._isImage(o))&&this._preloadImage(o,!1),i>0?this._preloadImageByIndex(e+1,i-1):void 0}}}},{key:"_preloadImage",value:function(e,i){var n=this;i=i||!1;var o=new Image;return i&&function(){var a=setTimeout(function(){i.append(n._config.loadingMessage)},200);o.onload=function(){a&&clearTimeout(a),a=null;var e=t("<img />");return e.attr("src",o.src),e.addClass("img-fluid"),e.css("width","100%"),i.html(e),n._$modalArrows&&n._$modalArrows.css("display",""),n._resize(o.width,o.height),n._toggleLoading(!1),n._config.onContentLoaded.call(n)},o.onerror=function(){return n._toggleLoading(!1),n._error(n._config.strings.fail+" "+e)}}(),o.src=e,o}},{key:"_swipeGesure",value:function(){return this._touchendX<this._touchstartX?this.navigateRight():this._touchendX>this._touchstartX?this.navigateLeft():void 0}},{key:"_resize",value:function(e,i){i=i||e,this._wantedWidth=e,this._wantedHeight=i;var n=e/i,o=this._padding.left+this._padding.right+this._border.left+this._border.right,a=this._config.doc.body.clientWidth>575?20:0,r=this._config.doc.body.clientWidth>575?0:20,s=Math.min(e+o,this._config.doc.body.clientWidth-a,this._config.maxWidth);e+o>s?(i=(s-o-r)/n,e=s):e+=o;var l=0,d=0;this._footerIsShown&&(d=this._$modalFooter.outerHeight(!0)||55),this._titleIsShown&&(l=this._$modalHeader.outerHeight(!0)||67);var u=this._padding.top+this._padding.bottom+this._border.bottom+this._border.top,h=parseFloat(this._$modalDialog.css("margin-top"))+parseFloat(this._$modalDialog.css("margin-bottom")),c=Math.min(i,t(window).height()-u-h-l-d,this._config.maxHeight-u-l-d);i>c&&(e=Math.ceil(c*n)+o),this._$lightboxContainer.css("height",c),this._$modalDialog.css("flex",1).css("maxWidth",e);var f=this._$modal.data("bs.modal");if(f)try{f._handleUpdate()}catch(t){f.handleUpdate()}return this}}],[{key:"_jQueryInterface",value:function(e){var i=this;return e=e||{},this.each(function(){var o=t(i),a=t.extend({},n.Default,o.data(),"object"==typeof e&&e);new n(i,a)})}}]),n}();t.fn[n]=r._jQueryInterface,t.fn[n].Constructor=r,t.fn[n].noConflict=function(){return t.fn[n]=o,r._jQueryInterface}}(jQuery)}(jQuery),function(t){function e(t,e,o){var a=t[0],r=/er/.test(o)?g:/bl/.test(o)?f:h,s=o==m?{checked:a[h],disabled:a[f],indeterminate:"true"==t.attr(g)||"false"==t.attr(p)}:a[r];if(/^(ch|di|in)/.test(o)&&!s)i(t,r);else if(/^(un|en|de)/.test(o)&&s)n(t,r);else if(o==m)for(var l in s)s[l]?i(t,l,!0):n(t,l,!0);else e&&"toggle"!=o||(e||t[w]("ifClicked"),s?a[v]!==u&&n(t,r):i(t,r))}function i(e,i,o){var m=e[0],b=e.parent(),w=i==h,k=i==g,C=i==f,D=k?p:w?c:"enabled",M=a(e,D+r(m[v])),S=a(e,i+r(m[v]));if(!0!==m[i]){if(!o&&i==h&&m[v]==u&&m.name){var T=e.closest("form"),F='input[name="'+m.name+'"]';F=T.length?T.find(F):t(F),F.each(function(){this!==m&&t(this).data(l)&&n(t(this),i)})}k?(m[i]=!0,m[h]&&n(e,h,"force")):(o||(m[i]=!0),w&&m[g]&&n(e,g,!1)),s(e,w,i,o)}m[f]&&a(e,_,!0)&&b.find("."+d).css(_,"default"),b[y](S||a(e,i)||""),b.attr("role")&&!k&&b.attr("aria-"+(C?f:h),"true"),b[x](M||a(e,D)||"")}function n(t,e,i){var n=t[0],o=t.parent(),l=e==h,u=e==g,m=e==f,b=u?p:l?c:"enabled",w=a(t,b+r(n[v])),k=a(t,e+r(n[v]));!1!==n[e]&&(!u&&i&&"force"!=i||(n[e]=!1),s(t,l,b,i)),!n[f]&&a(t,_,!0)&&o.find("."+d).css(_,"pointer"),o[x](k||a(t,e)||""),o.attr("role")&&!u&&o.attr("aria-"+(m?f:h),"false"),o[y](w||a(t,b)||"")}function o(e,i){e.data(l)&&(e.parent().html(e.attr("style",e.data(l).s||"")),i&&e[w](i),e.off(".i").unwrap(),t(k+'[for="'+e[0].id+'"]').add(e.closest(k)).off(".i"))}function a(t,e,i){if(t.data(l))return t.data(l).o[e+(i?"":"Class")]}function r(t){return t.charAt(0).toUpperCase()+t.slice(1)}function s(t,e,i,n){n||(e&&t[w]("ifToggled"),t[w]("ifChanged")[w]("if"+r(i)))}var l="iCheck",d=l+"-helper",u="radio",h="checked",c="un"+h,f="disabled",p="determinate",g="in"+p,m="update",v="type",b="touchbegin.i touchend.i",y="addClass",x="removeClass",w="trigger",k="label",_="cursor",C=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);t.fn[l]=function(a,r){var s='input[type="checkbox"], input[type="'+u+'"]',c=t(),p=function(e){e.each(function(){var e=t(this);c=e.is(s)?c.add(e):c.add(e.find(s))})};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(a))return a=a.toLowerCase(),p(this),c.each(function(){var i=t(this);"destroy"==a?o(i,"ifDestroyed"):e(i,!0,a),t.isFunction(r)&&r()});if("object"!=typeof a&&a)return this;var _=t.extend({checkedClass:h,disabledClass:f,indeterminateClass:g,labelHover:!0},a),D=_.handle,M=_.hoverClass||"hover",S=_.focusClass||"focus",T=_.activeClass||"active",F=!!_.labelHover,A=_.labelHoverClass||"hover",I=0|(""+_.increaseArea).replace("%","");return"checkbox"!=D&&D!=u||(s='input[type="'+D+'"]'),I<-50&&(I=-50),p(this),c.each(function(){var a=t(this);o(a);var r,s=this,c=s.id,p=-I+"%",g=100+2*I+"%",D={position:"absolute",top:p,left:p,display:"block",width:g,height:g,margin:0,padding:0,background:"#fff",border:0,opacity:0},P=C?{position:"absolute",visibility:"hidden"}:I?D:{position:"absolute",opacity:0},O="checkbox"==s[v]?_.checkboxClass||"icheckbox":_.radioClass||"i"+u,E=t(k+'[for="'+c+'"]').add(a.closest(k)),L=!!_.aria,R=l+"-"+Math.random().toString(36).substr(2,6),B='<div class="'+O+'" '+(L?'role="'+s[v]+'" ':"");L&&E.each(function(){B+='aria-labelledby="',this.id?B+=this.id:(this.id=R,B+=R),B+='"'}),B=a.wrap(B+"/>")[w]("ifCreated").parent().append(_.insert),r=t('<ins class="'+d+'"/>').css(D).appendTo(B),a.data(l,{o:_,s:a.attr("style")}).css(P),!!_.inheritClass&&B[y](s.className||""),!!_.inheritID&&c&&B.attr("id",l+"-"+c),"static"==B.css("position")&&B.css("position","relative"),e(a,!0,m),E.length&&E.on("click.i mouseover.i mouseout.i "+b,function(i){var n=i[v],o=t(this);if(!s[f]){if("click"==n){if(t(i.target).is("a"))return;e(a,!1,!0)}else F&&(/ut|nd/.test(n)?(B[x](M),o[x](A)):(B[y](M),o[y](A)));if(!C)return!1;i.stopPropagation()}}),a.on("click.i focus.i blur.i keyup.i keydown.i keypress.i",function(t){var e=t[v],o=t.keyCode;return"click"!=e&&("keydown"==e&&32==o?(s[v]==u&&s[h]||(s[h]?n(a,h):i(a,h)),!1):void("keyup"==e&&s[v]==u?!s[h]&&i(a,h):/us|ur/.test(e)&&B["blur"==e?x:y](S)))}),r.on("click mousedown mouseup mouseover mouseout "+b,function(t){var i=t[v],n=/wn|up/.test(i)?T:M;if(!s[f]){if("click"==i?e(a,!1,!0):(/wn|er|in/.test(i)?B[y](n):B[x](n+" "+T),E.length&&F&&n==M&&E[/ut|nd/.test(i)?x:y](A)),!C)return!1;t.stopPropagation()}})})}}(window.jQuery||window.Zepto),function(t){function e(t){for(var e,i,n=t.length;n;e=parseInt(Math.random()*n),i=t[--n],t[n]=t[e],t[e]=i);return t}function i(t,e){return Math.floor(Math.random()*(e-t+1)+t)}var n=[],o=[],a=[],r=[],s=null,l={init:function(e,i){for(var d=t.extend({bind:"click",passwordElement:null,displayElement:null,passwordLength:16,uppercase:!0,lowercase:!0,numbers:!0,specialChars:!0,additionalSpecialChars:[],onPasswordGenerated:function(t){}},e),u=48;u<58;u++)n.push(u);for(u=65;u<91;u++)o.push(u);for(u=97;u<123;u++)a.push(u);return r=[33,35,64,36,38,42,91,93,123,125,92,47,63,58,59,95,45].concat(d.additionalSpecialChars),this.each(function(){s=t(this),s.bind(d.bind,function(t){t.preventDefault(),l.generatePassword(d)})})},generatePassword:function(s){var l=new Array,d=s.uppercase+s.lowercase+s.numbers+s.specialChars,u=0,h=new Array,c=Math.floor(s.passwordLength/d);if(s.uppercase){for(var f=0;f<c;f++)l.push(String.fromCharCode(o[i(0,o.length-1)]));h=h.concat(o),u++}if(s.numbers){for(var f=0;f<c;f++)l.push(String.fromCharCode(n[i(0,n.length-1)]));h=h.concat(n),u++}if(s.specialChars){for(var f=0;f<c;f++)l.push(String.fromCharCode(r[i(0,r.length-1)]));h=h.concat(r),u++}var p=s.passwordLength-u*c;if(s.lowercase)for(var f=0;f<p;f++)l.push(String.fromCharCode(a[i(0,a.length-1)]));else for(var f=0;f<p;f++)l.push(String.fromCharCode(h[i(0,h.length-1)]));l=e(l).join(""),null!==s.passwordElement&&t(s.passwordElement).val(l),null!==s.displayElement&&(t(s.displayElement).is("input")?t(s.displayElement).val(l):t(s.displayElement).text(l)),s.onPasswordGenerated(l)}};t.fn.pGenerator=function(e){return l[e]?l[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void t.error("Method "+e+" does not exist on jQuery.pGenerator"):l.init.apply(this,arguments)}}(jQuery),function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Chart=t()}}(function(){return function(){function t(e,i,n){function o(r,s){if(!i[r]){if(!e[r]){var l="function"==typeof require&&require;if(!s&&l)return l(r,!0);if(a)return a(r,!0);var d=new Error("Cannot find module '"+r+"'");throw d.code="MODULE_NOT_FOUND",d}var u=i[r]={exports:{}};e[r][0].call(u.exports,function(t){var i=e[r][1][t];return o(i||t)},u,u.exports,t,e,i,n)}return i[r].exports}for(var a="function"==typeof require&&require,r=0;r<n.length;r++)o(n[r]);return o}return t}()({1:[function(t,e,i){},{}],2:[function(t,e,i){function n(t){if(t){var e=/^#([a-fA-F0-9]{3})$/i,i=/^#([a-fA-F0-9]{6})$/i,n=/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i,o=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i,a=/(\w+)/,r=[0,0,0],s=1,l=t.match(e);if(l){l=l[1];for(var d=0;d<r.length;d++)r[d]=parseInt(l[d]+l[d],16)}else if(l=t.match(i)){l=l[1];for(var d=0;d<r.length;d++)r[d]=parseInt(l.slice(2*d,2*d+2),16)}else if(l=t.match(n)){for(var d=0;d<r.length;d++)r[d]=parseInt(l[d+1]);s=parseFloat(l[4])}else if(l=t.match(o)){for(var d=0;d<r.length;d++)r[d]=Math.round(2.55*parseFloat(l[d+1]));s=parseFloat(l[4])}else if(l=t.match(a)){if("transparent"==l[1])return[0,0,0,0];if(!(r=x[l[1]]))return}for(var d=0;d<r.length;d++)r[d]=b(r[d],0,255);return s=s||0==s?b(s,0,1):1,r[3]=s,r}}function o(t){if(t){var e=/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,i=t.match(e);if(i){var n=parseFloat(i[4]);return[b(parseInt(i[1]),0,360),b(parseFloat(i[2]),0,100),b(parseFloat(i[3]),0,100),b(isNaN(n)?1:n,0,1)]}}}function a(t){if(t){var e=/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,i=t.match(e);if(i){var n=parseFloat(i[4]);return[b(parseInt(i[1]),0,360),b(parseFloat(i[2]),0,100),b(parseFloat(i[3]),0,100),b(isNaN(n)?1:n,0,1)]}}}function r(t){var e=n(t);return e&&e.slice(0,3)}function s(t){var e=o(t);return e&&e.slice(0,3)}function l(t){var e=n(t);return e?e[3]:(e=o(t))?e[3]:(e=a(t))?e[3]:void 0}function d(t){return"#"+y(t[0])+y(t[1])+y(t[2])}function u(t,e){return e<1||t[3]&&t[3]<1?h(t,e):"rgb("+t[0]+", "+t[1]+", "+t[2]+")"}function h(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function c(t,e){return e<1||t[3]&&t[3]<1?f(t,e):"rgb("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%)"}function f(t,e){return"rgba("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%, "+(e||t[3]||1)+")"}function p(t,e){return e<1||t[3]&&t[3]<1?g(t,e):"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"}function g(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function m(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"}function v(t){return w[t.slice(0,3)]}function b(t,e,i){return Math.min(Math.max(e,t),i)}function y(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var x=t(6);e.exports={getRgba:n,getHsla:o,getRgb:r,getHsl:s,getHwb:a,getAlpha:l,hexString:d,rgbString:u,rgbaString:h,percentString:c,percentaString:f,hslString:p,hslaString:g,hwbString:m,keyword:v};var w={};for(var k in x)w[x[k]]=k},{6:6}],3:[function(t,e,i){var n=t(5),o=t(2),a=function(t){if(t instanceof a)return t;if(!(this instanceof a))return new a(t);this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1};var e;"string"==typeof t?(e=o.getRgba(t),e?this.setValues("rgb",e):(e=o.getHsla(t))?this.setValues("hsl",e):(e=o.getHwb(t))&&this.setValues("hwb",e)):"object"==typeof t&&(e=t,void 0!==e.r||void 0!==e.red?this.setValues("rgb",e):void 0!==e.l||void 0!==e.lightness?this.setValues("hsl",e):void 0!==e.v||void 0!==e.value?this.setValues("hsv",e):void 0!==e.w||void 0!==e.whiteness?this.setValues("hwb",e):void 0===e.c&&void 0===e.cyan||this.setValues("cmyk",e))};a.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var t=this.values;return 1!==t.alpha?t.hwb.concat([t.alpha]):t.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values;return t.rgb.concat([t.alpha])},hslaArray:function(){var t=this.values;return t.hsl.concat([t.alpha])},alpha:function(t){return void 0===t?this.values.alpha:(this.setValues("alpha",t),this)},red:function(t){return this.setChannel("rgb",0,t)},green:function(t){return this.setChannel("rgb",1,t)},blue:function(t){return this.setChannel("rgb",2,t)},hue:function(t){return t&&(t%=360,t=t<0?360+t:t),this.setChannel("hsl",0,t)},saturation:function(t){return this.setChannel("hsl",1,t)},lightness:function(t){return this.setChannel("hsl",2,t)},saturationv:function(t){return this.setChannel("hsv",1,t)},whiteness:function(t){return this.setChannel("hwb",1,t)},blackness:function(t){return this.setChannel("hwb",2,t)},value:function(t){return this.setChannel("hsv",2,t)},cyan:function(t){return this.setChannel("cmyk",0,t)},magenta:function(t){return this.setChannel("cmyk",1,t)},yellow:function(t){return this.setChannel("cmyk",2,t)},black:function(t){return this.setChannel("cmyk",3,t)},hexString:function(){return o.hexString(this.values.rgb)},rgbString:function(){return o.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return o.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return o.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return o.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return o.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return o.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return o.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var t=this.values.rgb;return t[0]<<16|t[1]<<8|t[2]},luminosity:function(){for(var t=this.values.rgb,e=[],i=0;i<t.length;i++){var n=t[i]/255;e[i]=n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),i=t.luminosity();return e>i?(e+.05)/(i+.05):(i+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,i=(e[0]+t)%360;return e[0]=i<0?360+i:i,this.setValues("hsl",e),this},mix:function(t,e){var i=this,n=t,o=void 0===e?.5:e,a=2*o-1,r=i.alpha()-n.alpha(),s=((a*r==-1?a:(a+r)/(1+a*r))+1)/2,l=1-s;return this.rgb(s*i.red()+l*n.red(),s*i.green()+l*n.green(),s*i.blue()+l*n.blue()).alpha(i.alpha()*o+n.alpha()*(1-o))},toJSON:function(){return this.rgb()},clone:function(){var t,e,i=new a,n=this.values,o=i.values;for(var r in n)n.hasOwnProperty(r)&&(t=n[r],e={}.toString.call(t),"[object Array]"===e?o[r]=t.slice(0):"[object Number]"===e?o[r]=t:console.error("unexpected color value:",t));return i}},a.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},a.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},a.prototype.getValues=function(t){for(var e=this.values,i={},n=0;n<t.length;n++)i[t.charAt(n)]=e[t][n];return 1!==e.alpha&&(i.a=e.alpha),i},a.prototype.setValues=function(t,e){var i,o=this.values,a=this.spaces,r=this.maxes,s=1;if(this.valid=!0,"alpha"===t)s=e;else if(e.length)o[t]=e.slice(0,t.length),s=e[t.length];else if(void 0!==e[t.charAt(0)]){for(i=0;i<t.length;i++)o[t][i]=e[t.charAt(i)];s=e.a}else if(void 0!==e[a[t][0]]){var l=a[t];for(i=0;i<t.length;i++)o[t][i]=e[l[i]];s=e.alpha}if(o.alpha=Math.max(0,Math.min(1,void 0===s?o.alpha:s)),"alpha"===t)return!1;var d;for(i=0;i<t.length;i++)d=Math.max(0,Math.min(r[t][i],o[t][i])),o[t][i]=Math.round(d);for(var u in a)u!==t&&(o[u]=n[t][u](o[t]));return!0},a.prototype.setSpace=function(t,e){var i=e[0];return void 0===i?this.getValues(t):("number"==typeof i&&(i=Array.prototype.slice.call(e)),this.setValues(t,i),this)},a.prototype.setChannel=function(t,e,i){var n=this.values[t];return void 0===i?n[e]:i===n[e]?this:(n[e]=i,this.setValues(t,n),this)},"undefined"!=typeof window&&(window.Color=a),e.exports=a},{2:2,5:5}],4:[function(t,e,i){function n(t){var e,i,n,o=t[0]/255,a=t[1]/255,r=t[2]/255,s=Math.min(o,a,r),l=Math.max(o,a,r),d=l-s;return l==s?e=0:o==l?e=(a-r)/d:a==l?e=2+(r-o)/d:r==l&&(e=4+(o-a)/d),e=Math.min(60*e,360),e<0&&(e+=360),n=(s+l)/2,i=l==s?0:n<=.5?d/(l+s):d/(2-l-s),[e,100*i,100*n]}function o(t){var e,i,n,o=t[0],a=t[1],r=t[2],s=Math.min(o,a,r),l=Math.max(o,a,r),d=l-s;return i=0==l?0:d/l*1e3/10,l==s?e=0:o==l?e=(a-r)/d:a==l?e=2+(r-o)/d:r==l&&(e=4+(o-a)/d),e=Math.min(60*e,360),e<0&&(e+=360),n=l/255*1e3/10,[e,i,n]}function a(t){var e=t[0],i=t[1],o=t[2],a=n(t)[0],r=1/255*Math.min(e,Math.min(i,o)),o=1-1/255*Math.max(e,Math.max(i,o));return[a,100*r,100*o]}function s(t){var e,i,n,o,a=t[0]/255,r=t[1]/255,s=t[2]/255;return o=Math.min(1-a,1-r,1-s),e=(1-a-o)/(1-o)||0,i=(1-r-o)/(1-o)||0,n=(1-s-o)/(1-o)||0,[100*e,100*i,100*n,100*o]}function l(t){return Q[JSON.stringify(t)]}function d(t){var e=t[0]/255,i=t[1]/255,n=t[2]/255;return e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,[100*(.4124*e+.3576*i+.1805*n),100*(.2126*e+.7152*i+.0722*n),100*(.0193*e+.1192*i+.9505*n)]}function u(t){var e,i,n,o=d(t),a=o[0],r=o[1],s=o[2];return a/=95.047,r/=100,s/=108.883,a=a>.008856?Math.pow(a,1/3):7.787*a+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,e=116*r-16,i=500*(a-r),n=200*(r-s),[e,i,n]}function h(t){return V(u(t))}function c(t){var e,i,n,o,a,r=t[0]/360,s=t[1]/100,l=t[2]/100;if(0==s)return a=255*l,[a,a,a];i=l<.5?l*(1+s):l+s-l*s,e=2*l-i,o=[0,0,0];for(var d=0;d<3;d++)n=r+1/3*-(d-1),n<0&&n++,n>1&&n--,a=6*n<1?e+6*(i-e)*n:2*n<1?i:3*n<2?e+(i-e)*(2/3-n)*6:e,o[d]=255*a;return o}function f(t){var e,i,n=t[0],o=t[1]/100,a=t[2]/100;return 0===a?[0,0,0]:(a*=2,o*=a<=1?a:2-a,i=(a+o)/2,e=2*o/(a+o),[n,100*e,100*i])}function p(t){return a(c(t))}function m(t){return s(c(t))}function v(t){return l(c(t))}function y(t){var e=t[0]/60,i=t[1]/100,n=t[2]/100,o=Math.floor(e)%6,a=e-Math.floor(e),r=255*n*(1-i),s=255*n*(1-i*a),l=255*n*(1-i*(1-a)),n=255*n;switch(o){case 0:return[n,l,r];case 1:return[s,n,r];case 2:return[r,n,l];case 3:return[r,s,n];case 4:return[l,r,n];case 5:return[n,r,s]}}function x(t){var e,i,n=t[0],o=t[1]/100,a=t[2]/100;return i=(2-o)*a,e=o*a,e/=i<=1?i:2-i,e=e||0,i/=2,[n,100*e,100*i]}function w(t){return a(y(t))}function k(t){return s(y(t))}function _(t){return l(y(t))}function C(t){var e,i,n,o,a=t[0]/360,s=t[1]/100,l=t[2]/100,d=s+l;switch(d>1&&(s/=d,l/=d),e=Math.floor(6*a),i=1-l,n=6*a-e,0!=(1&e)&&(n=1-n),o=s+n*(i-s),e){default:case 6:case 0:r=i,g=o,b=s;break;case 1:r=o,g=i,b=s;break;case 2:r=s,g=i,b=o;break;case 3:r=s,g=o,b=i;break;case 4:r=o,g=s,b=i;break;case 5:r=i,g=s,b=o}return[255*r,255*g,255*b]}function D(t){return n(C(t))}function M(t){return o(C(t))}function S(t){return s(C(t))}function T(t){return l(C(t))}function F(t){var e,i,n,o=t[0]/100,a=t[1]/100,r=t[2]/100,s=t[3]/100;return e=1-Math.min(1,o*(1-s)+s),i=1-Math.min(1,a*(1-s)+s),n=1-Math.min(1,r*(1-s)+s),[255*e,255*i,255*n]}function A(t){return n(F(t))}function I(t){return o(F(t))}function P(t){return a(F(t))}function O(t){return l(F(t))}function E(t){var e,i,n,o=t[0]/100,a=t[1]/100,r=t[2]/100;return e=3.2406*o+-1.5372*a+-.4986*r,i=-.9689*o+1.8758*a+.0415*r,n=.0557*o+-.204*a+1.057*r,e=e>.0031308?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,e=Math.min(Math.max(0,e),1),i=Math.min(Math.max(0,i),1),n=Math.min(Math.max(0,n),1),[255*e,255*i,255*n]}function L(t){var e,i,n,o=t[0],a=t[1],r=t[2];return o/=95.047,a/=100,r/=108.883,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,a=a>.008856?Math.pow(a,1/3):7.787*a+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,e=116*a-16,i=500*(o-a),n=200*(a-r),[e,i,n]}function R(t){return V(L(t))}function B(t){var e,i,n,o,a=t[0],r=t[1],s=t[2];return a<=8?(i=100*a/903.3,o=i/100*7.787+16/116):(i=100*Math.pow((a+16)/116,3),o=Math.pow(i/100,1/3)),e=e/95.047<=.008856?e=95.047*(r/500+o-16/116)/7.787:95.047*Math.pow(r/500+o,3),n=n/108.883<=.008859?n=108.883*(o-s/200-16/116)/7.787:108.883*Math.pow(o-s/200,3),[e,i,n]}function V(t){var e,i,n,o=t[0],a=t[1],r=t[2];return e=Math.atan2(r,a),i=360*e/2/Math.PI,i<0&&(i+=360),n=Math.sqrt(a*a+r*r),[o,n,i]}function U(t){return E(B(t))}function z(t){var e,i,n,o=t[0],a=t[1],r=t[2];return n=r/360*2*Math.PI,e=a*Math.cos(n),i=a*Math.sin(n),[o,e,i]}function N(t){return B(z(t))}function W(t){return U(z(t))}function H(t){return G[t]}function j(t){return n(H(t))}function q(t){return o(H(t))}function Y(t){return a(H(t))}function $(t){return s(H(t))}function X(t){return u(H(t))}function K(t){return d(H(t))}e.exports={rgb2hsl:n,rgb2hsv:o,rgb2hwb:a,rgb2cmyk:s,rgb2keyword:l,rgb2xyz:d,rgb2lab:u,rgb2lch:h,hsl2rgb:c,hsl2hsv:f,hsl2hwb:p,hsl2cmyk:m,hsl2keyword:v,hsv2rgb:y,hsv2hsl:x,hsv2hwb:w,hsv2cmyk:k,hsv2keyword:_,hwb2rgb:C,hwb2hsl:D,hwb2hsv:M,hwb2cmyk:S,hwb2keyword:T,cmyk2rgb:F,cmyk2hsl:A,cmyk2hsv:I,cmyk2hwb:P,cmyk2keyword:O,keyword2rgb:H,keyword2hsl:j,keyword2hsv:q,keyword2hwb:Y,keyword2cmyk:$,keyword2lab:X,keyword2xyz:K,xyz2rgb:E,xyz2lab:L,xyz2lch:R,lab2xyz:B,lab2rgb:U,lab2lch:V,lch2lab:z,lch2xyz:N,lch2rgb:W};var G={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Q={};for(var Z in G)Q[JSON.stringify(G[Z])]=Z},{}],5:[function(t,e,i){var n=t(4),o=function(){return new d};for(var a in n){o[a+"Raw"]=function(t){return function(e){return"number"==typeof e&&(e=Array.prototype.slice.call(arguments)),n[t](e)}}(a);var r=/(\w+)2(\w+)/.exec(a),s=r[1],l=r[2];o[s]=o[s]||{},o[s][l]=o[a]=function(t){return function(e){"number"==typeof e&&(e=Array.prototype.slice.call(arguments));var i=n[t](e);if("string"==typeof i||void 0===i)return i;for(var o=0;o<i.length;o++)i[o]=Math.round(i[o]);return i}}(a)}var d=function(){this.convs={}};d.prototype.routeSpace=function(t,e){var i=e[0];return void 0===i?this.getValues(t):("number"==typeof i&&(i=Array.prototype.slice.call(e)),this.setValues(t,i))},d.prototype.setValues=function(t,e){return this.space=t,this.convs={},this.convs[t]=e,this},d.prototype.getValues=function(t){var e=this.convs[t];if(!e){var i=this.space,n=this.convs[i];e=o[i][t](n),this.convs[t]=e}return e},["rgb","hsl","hsv","cmyk","keyword"].forEach(function(t){d.prototype[t]=function(e){return this.routeSpace(t,arguments)}}),e.exports=o},{4:4}],6:[function(t,e,i){"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],
|
|
palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},{}],7:[function(t,e,i){var n=t(29)();n.helpers=t(45),t(27)(n),n.defaults=t(25),n.Element=t(26),n.elements=t(40),n.Interaction=t(28),n.layouts=t(30),n.platform=t(48),n.plugins=t(31),n.Ticks=t(34),t(22)(n),t(23)(n),t(24)(n),t(33)(n),t(32)(n),t(35)(n),t(55)(n),t(53)(n),t(54)(n),t(56)(n),t(57)(n),t(58)(n),t(15)(n),t(16)(n),t(17)(n),t(18)(n),t(19)(n),t(20)(n),t(21)(n),t(8)(n),t(9)(n),t(10)(n),t(11)(n),t(12)(n),t(13)(n),t(14)(n);var o=t(49);for(var a in o)o.hasOwnProperty(a)&&n.plugins.register(o[a]);n.platform.initialize(),e.exports=n,"undefined"!=typeof window&&(window.Chart=n),n.Legend=o.legend._element,n.Title=o.title._element,n.pluginService=n.plugins,n.PluginBase=n.Element.extend({}),n.canvasHelpers=n.helpers.canvas,n.layoutService=n.layouts},{10:10,11:11,12:12,13:13,14:14,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,27:27,28:28,29:29,30:30,31:31,32:32,33:33,34:34,35:35,40:40,45:45,48:48,49:49,53:53,54:54,55:55,56:56,57:57,58:58,8:8,9:9}],8:[function(t,e,i){"use strict";e.exports=function(t){t.Bar=function(e,i){return i.type="bar",new t(e,i)}}},{}],9:[function(t,e,i){"use strict";e.exports=function(t){t.Bubble=function(e,i){return i.type="bubble",new t(e,i)}}},{}],10:[function(t,e,i){"use strict";e.exports=function(t){t.Doughnut=function(e,i){return i.type="doughnut",new t(e,i)}}},{}],11:[function(t,e,i){"use strict";e.exports=function(t){t.Line=function(e,i){return i.type="line",new t(e,i)}}},{}],12:[function(t,e,i){"use strict";e.exports=function(t){t.PolarArea=function(e,i){return i.type="polarArea",new t(e,i)}}},{}],13:[function(t,e,i){"use strict";e.exports=function(t){t.Radar=function(e,i){return i.type="radar",new t(e,i)}}},{}],14:[function(t,e,i){"use strict";e.exports=function(t){t.Scatter=function(e,i){return i.type="scatter",new t(e,i)}}},{}],15:[function(t,e,i){"use strict";function n(t,e){var i,n,o,a,r=t.isHorizontal()?t.width:t.height,s=t.getTicks();for(o=1,a=e.length;o<a;++o)r=Math.min(r,e[o]-e[o-1]);for(o=0,a=s.length;o<a;++o)n=t.getPixelForTick(o),r=o>0?Math.min(r,n-i):r,i=n;return r}function o(t,e,i){var n,o,a=i.barThickness,r=e.stackCount,s=e.pixels[t];return l.isNullOrUndef(a)?(n=e.min*i.categoryPercentage,o=i.barPercentage):(n=a*r,o=1),{chunk:n/r,ratio:o,start:s-n/2}}function a(t,e,i){var n,o,a=e.pixels,r=a[t],s=t>0?a[t-1]:null,l=t<a.length-1?a[t+1]:null,d=i.categoryPercentage;return null===s&&(s=r-(null===l?e.end-r:l-r)),null===l&&(l=r+r-s),n=r-(r-s)/2*d,o=(l-s)/2*d,{chunk:o/e.stackCount,ratio:i.barPercentage,start:n}}var r=t(25),s=t(40),l=t(45);r._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),r._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{position:"left",type:"category",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{callbacks:{title:function(t,e){var i="";return t.length>0&&(t[0].yLabel?i=t[0].yLabel:e.labels.length>0&&t[0].index<e.labels.length&&(i=e.labels[t[0].index])),i},label:function(t,e){return(e.datasets[t.datasetIndex].label||"")+": "+t.xLabel}},mode:"index",axis:"y"}}),e.exports=function(t){t.controllers.bar=t.DatasetController.extend({dataElementType:s.Rectangle,initialize:function(){var e,i=this;t.DatasetController.prototype.initialize.apply(i,arguments),e=i.getMeta(),e.stack=i.getDataset().stack,e.bar=!0},update:function(t){var e,i,n=this,o=n.getMeta().data;for(n._ruler=n.getRuler(),e=0,i=o.length;e<i;++e)n.updateElement(o[e],e,t)},updateElement:function(t,e,i){var n=this,o=n.chart,a=n.getMeta(),r=n.getDataset(),s=t.custom||{},d=o.options.elements.rectangle;t._xScale=n.getScaleForId(a.xAxisID),t._yScale=n.getScaleForId(a.yAxisID),t._datasetIndex=n.index,t._index=e,t._model={datasetLabel:r.label,label:o.data.labels[e],borderSkipped:s.borderSkipped?s.borderSkipped:d.borderSkipped,backgroundColor:s.backgroundColor?s.backgroundColor:l.valueAtIndexOrDefault(r.backgroundColor,e,d.backgroundColor),borderColor:s.borderColor?s.borderColor:l.valueAtIndexOrDefault(r.borderColor,e,d.borderColor),borderWidth:s.borderWidth?s.borderWidth:l.valueAtIndexOrDefault(r.borderWidth,e,d.borderWidth)},n.updateElementGeometry(t,e,i),t.pivot()},updateElementGeometry:function(t,e,i){var n=this,o=t._model,a=n.getValueScale(),r=a.getBasePixel(),s=a.isHorizontal(),l=n._ruler||n.getRuler(),d=n.calculateBarValuePixels(n.index,e),u=n.calculateBarIndexPixels(n.index,e,l);o.horizontal=s,o.base=i?r:d.base,o.x=s?i?r:d.head:u.center,o.y=s?u.center:i?r:d.head,o.height=s?u.size:void 0,o.width=s?void 0:u.size},getValueScaleId:function(){return this.getMeta().yAxisID},getIndexScaleId:function(){return this.getMeta().xAxisID},getValueScale:function(){return this.getScaleForId(this.getValueScaleId())},getIndexScale:function(){return this.getScaleForId(this.getIndexScaleId())},_getStacks:function(t){var e,i,n=this,o=n.chart,a=n.getIndexScale(),r=a.options.stacked,s=void 0===t?o.data.datasets.length:t+1,l=[];for(e=0;e<s;++e)i=o.getDatasetMeta(e),i.bar&&o.isDatasetVisible(e)&&(!1===r||!0===r&&-1===l.indexOf(i.stack)||void 0===r&&(void 0===i.stack||-1===l.indexOf(i.stack)))&&l.push(i.stack);return l},getStackCount:function(){return this._getStacks().length},getStackIndex:function(t,e){var i=this._getStacks(t),n=void 0!==e?i.indexOf(e):-1;return-1===n?i.length-1:n},getRuler:function(){var t,e,i,o=this,a=o.getIndexScale(),r=o.getStackCount(),s=o.index,d=a.isHorizontal(),u=d?a.left:a.top,h=u+(d?a.width:a.height),c=[];for(t=0,e=o.getMeta().data.length;t<e;++t)c.push(a.getPixelForValue(null,t,s));return i=l.isNullOrUndef(a.options.barThickness)?n(a,c):-1,{min:i,pixels:c,start:u,end:h,stackCount:r,scale:a}},calculateBarValuePixels:function(t,e){var i,n,o,a,r,s,l=this,d=l.chart,u=l.getMeta(),h=l.getValueScale(),c=d.data.datasets,f=h.getRightValue(c[t].data[e]),p=h.options.stacked,g=u.stack,m=0;if(p||void 0===p&&void 0!==g)for(i=0;i<t;++i)n=d.getDatasetMeta(i),n.bar&&n.stack===g&&n.controller.getValueScaleId()===h.id&&d.isDatasetVisible(i)&&(o=h.getRightValue(c[i].data[e]),(f<0&&o<0||f>=0&&o>0)&&(m+=o));return a=h.getPixelForValue(m),r=h.getPixelForValue(m+f),s=(r-a)/2,{size:s,base:a,head:r,center:r+s/2}},calculateBarIndexPixels:function(t,e,i){var n=this,r=i.scale.options,s="flex"===r.barThickness?a(e,i,r):o(e,i,r),d=n.getStackIndex(t,n.getMeta().stack),u=s.start+s.chunk*d+s.chunk/2,h=Math.min(l.valueOrDefault(r.maxBarThickness,1/0),s.chunk*s.ratio);return{base:u-h/2,head:u+h/2,center:u,size:h}},draw:function(){var t=this,e=t.chart,i=t.getValueScale(),n=t.getMeta().data,o=t.getDataset(),a=n.length,r=0;for(l.canvas.clipArea(e.ctx,e.chartArea);r<a;++r)isNaN(i.getRightValue(o.data[r]))||n[r].draw();l.canvas.unclipArea(e.ctx)},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t._index,n=t.custom||{},o=t._model;o.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:l.valueAtIndexOrDefault(e.hoverBackgroundColor,i,l.getHoverColor(o.backgroundColor)),o.borderColor=n.hoverBorderColor?n.hoverBorderColor:l.valueAtIndexOrDefault(e.hoverBorderColor,i,l.getHoverColor(o.borderColor)),o.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:l.valueAtIndexOrDefault(e.hoverBorderWidth,i,o.borderWidth)},removeHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t._index,n=t.custom||{},o=t._model,a=this.chart.options.elements.rectangle;o.backgroundColor=n.backgroundColor?n.backgroundColor:l.valueAtIndexOrDefault(e.backgroundColor,i,a.backgroundColor),o.borderColor=n.borderColor?n.borderColor:l.valueAtIndexOrDefault(e.borderColor,i,a.borderColor),o.borderWidth=n.borderWidth?n.borderWidth:l.valueAtIndexOrDefault(e.borderWidth,i,a.borderWidth)}}),t.controllers.horizontalBar=t.controllers.bar.extend({getValueScaleId:function(){return this.getMeta().xAxisID},getIndexScaleId:function(){return this.getMeta().yAxisID}})}},{25:25,40:40,45:45}],16:[function(t,e,i){"use strict";var n=t(25),o=t(40),a=t(45);n._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(t,e){var i=e.datasets[t.datasetIndex].label||"",n=e.datasets[t.datasetIndex].data[t.index];return i+": ("+t.xLabel+", "+t.yLabel+", "+n.r+")"}}}}),e.exports=function(t){t.controllers.bubble=t.DatasetController.extend({dataElementType:o.Point,update:function(t){var e=this,i=e.getMeta(),n=i.data;a.each(n,function(i,n){e.updateElement(i,n,t)})},updateElement:function(t,e,i){var n=this,o=n.getMeta(),a=t.custom||{},r=n.getScaleForId(o.xAxisID),s=n.getScaleForId(o.yAxisID),l=n._resolveElementOptions(t,e),d=n.getDataset().data[e],u=n.index,h=i?r.getPixelForDecimal(.5):r.getPixelForValue("object"==typeof d?d:NaN,e,u),c=i?s.getBasePixel():s.getPixelForValue(d,e,u);t._xScale=r,t._yScale=s,t._options=l,t._datasetIndex=u,t._index=e,t._model={backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,hitRadius:l.hitRadius,pointStyle:l.pointStyle,radius:i?0:l.radius,skip:a.skip||isNaN(h)||isNaN(c),x:h,y:c},t.pivot()},setHoverStyle:function(t){var e=t._model,i=t._options;e.backgroundColor=a.valueOrDefault(i.hoverBackgroundColor,a.getHoverColor(i.backgroundColor)),e.borderColor=a.valueOrDefault(i.hoverBorderColor,a.getHoverColor(i.borderColor)),e.borderWidth=a.valueOrDefault(i.hoverBorderWidth,i.borderWidth),e.radius=i.radius+i.hoverRadius},removeHoverStyle:function(t){var e=t._model,i=t._options;e.backgroundColor=i.backgroundColor,e.borderColor=i.borderColor,e.borderWidth=i.borderWidth,e.radius=i.radius},_resolveElementOptions:function(t,e){var i,n,o,r=this,s=r.chart,l=s.data.datasets,d=l[r.index],u=t.custom||{},h=s.options.elements.point,c=a.options.resolve,f=d.data[e],p={},g={chart:s,dataIndex:e,dataset:d,datasetIndex:r.index},m=["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle"];for(i=0,n=m.length;i<n;++i)o=m[i],p[o]=c([u[o],d[o],h[o]],g,e);return p.radius=c([u.radius,f?f.r:void 0,d.radius,h.radius],g,e),p}})}},{25:25,40:40,45:45}],17:[function(t,e,i){"use strict";var n=t(25),o=t(40),a=t(45);n._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');var i=t.data,n=i.datasets,o=i.labels;if(n.length)for(var a=0;a<n[0].data.length;++a)e.push('<li><span style="background-color:'+n[0].backgroundColor[a]+'"></span>'),o[a]&&e.push(o[a]),e.push("</li>");return e.push("</ul>"),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(i,n){var o=t.getDatasetMeta(0),r=e.datasets[0],s=o.data[n],l=s&&s.custom||{},d=a.valueAtIndexOrDefault,u=t.options.elements.arc;return{text:i,fillStyle:l.backgroundColor?l.backgroundColor:d(r.backgroundColor,n,u.backgroundColor),strokeStyle:l.borderColor?l.borderColor:d(r.borderColor,n,u.borderColor),lineWidth:l.borderWidth?l.borderWidth:d(r.borderWidth,n,u.borderWidth),hidden:isNaN(r.data[n])||o.data[n].hidden,index:n}}):[]}},onClick:function(t,e){var i,n,o,a=e.index,r=this.chart;for(i=0,n=(r.data.datasets||[]).length;i<n;++i)o=r.getDatasetMeta(i),o.data[a]&&(o.data[a].hidden=!o.data[a].hidden);r.update()}},cutoutPercentage:50,rotation:-.5*Math.PI,circumference:2*Math.PI,tooltips:{callbacks:{title:function(){return""},label:function(t,e){var i=e.labels[t.index],n=": "+e.datasets[t.datasetIndex].data[t.index];return a.isArray(i)?(i=i.slice(),i[0]+=n):i+=n,i}}}}),n._set("pie",a.clone(n.doughnut)),n._set("pie",{cutoutPercentage:0}),e.exports=function(t){t.controllers.doughnut=t.controllers.pie=t.DatasetController.extend({dataElementType:o.Arc,linkScales:a.noop,getRingIndex:function(t){for(var e=0,i=0;i<t;++i)this.chart.isDatasetVisible(i)&&++e;return e},update:function(t){var e=this,i=e.chart,n=i.chartArea,o=i.options,r=o.elements.arc,s=n.right-n.left-r.borderWidth,l=n.bottom-n.top-r.borderWidth,d=Math.min(s,l),u={x:0,y:0},h=e.getMeta(),c=o.cutoutPercentage,f=o.circumference;if(f<2*Math.PI){var p=o.rotation%(2*Math.PI);p+=2*Math.PI*(p>=Math.PI?-1:p<-Math.PI?1:0);var g=p+f,m={x:Math.cos(p),y:Math.sin(p)},v={x:Math.cos(g),y:Math.sin(g)},b=p<=0&&g>=0||p<=2*Math.PI&&2*Math.PI<=g,y=p<=.5*Math.PI&&.5*Math.PI<=g||p<=2.5*Math.PI&&2.5*Math.PI<=g,x=p<=-Math.PI&&-Math.PI<=g||p<=Math.PI&&Math.PI<=g,w=p<=.5*-Math.PI&&.5*-Math.PI<=g||p<=1.5*Math.PI&&1.5*Math.PI<=g,k=c/100,_={x:x?-1:Math.min(m.x*(m.x<0?1:k),v.x*(v.x<0?1:k)),y:w?-1:Math.min(m.y*(m.y<0?1:k),v.y*(v.y<0?1:k))},C={x:b?1:Math.max(m.x*(m.x>0?1:k),v.x*(v.x>0?1:k)),y:y?1:Math.max(m.y*(m.y>0?1:k),v.y*(v.y>0?1:k))},D={width:.5*(C.x-_.x),height:.5*(C.y-_.y)};d=Math.min(s/D.width,l/D.height),u={x:-.5*(C.x+_.x),y:-.5*(C.y+_.y)}}i.borderWidth=e.getMaxBorderWidth(h.data),i.outerRadius=Math.max((d-i.borderWidth)/2,0),i.innerRadius=Math.max(c?i.outerRadius/100*c:0,0),i.radiusLength=(i.outerRadius-i.innerRadius)/i.getVisibleDatasetCount(),i.offsetX=u.x*i.outerRadius,i.offsetY=u.y*i.outerRadius,h.total=e.calculateTotal(),e.outerRadius=i.outerRadius-i.radiusLength*e.getRingIndex(e.index),e.innerRadius=Math.max(e.outerRadius-i.radiusLength,0),a.each(h.data,function(i,n){e.updateElement(i,n,t)})},updateElement:function(t,e,i){var n=this,o=n.chart,r=o.chartArea,s=o.options,l=s.animation,d=(r.left+r.right)/2,u=(r.top+r.bottom)/2,h=s.rotation,c=s.rotation,f=n.getDataset(),p=i&&l.animateRotate?0:t.hidden?0:n.calculateCircumference(f.data[e])*(s.circumference/(2*Math.PI)),g=i&&l.animateScale?0:n.innerRadius,m=i&&l.animateScale?0:n.outerRadius,v=a.valueAtIndexOrDefault;a.extend(t,{_datasetIndex:n.index,_index:e,_model:{x:d+o.offsetX,y:u+o.offsetY,startAngle:h,endAngle:c,circumference:p,outerRadius:m,innerRadius:g,label:v(f.label,e,o.data.labels[e])}});var b=t._model;this.removeHoverStyle(t),i&&l.animateRotate||(b.startAngle=0===e?s.rotation:n.getMeta().data[e-1]._model.endAngle,b.endAngle=b.startAngle+b.circumference),t.pivot()},removeHoverStyle:function(e){t.DatasetController.prototype.removeHoverStyle.call(this,e,this.chart.options.elements.arc)},calculateTotal:function(){var t,e=this.getDataset(),i=this.getMeta(),n=0;return a.each(i.data,function(i,o){t=e.data[o],isNaN(t)||i.hidden||(n+=Math.abs(t))}),n},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){for(var e,i,n=0,o=this.index,a=t.length,r=0;r<a;r++)e=t[r]._model?t[r]._model.borderWidth:0,i=t[r]._chart?t[r]._chart.config.data.datasets[o].hoverBorderWidth:0,n=e>n?e:n,n=i>n?i:n;return n}})}},{25:25,40:40,45:45}],18:[function(t,e,i){"use strict";var n=t(25),o=t(40),a=t(45);n._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}}),e.exports=function(t){function e(t,e){return a.valueOrDefault(t.showLine,e.showLines)}t.controllers.line=t.DatasetController.extend({datasetElementType:o.Line,dataElementType:o.Point,update:function(t){var i,n,o,r=this,s=r.getMeta(),l=s.dataset,d=s.data||[],u=r.chart.options,h=u.elements.line,c=r.getScaleForId(s.yAxisID),f=r.getDataset(),p=e(f,u);for(p&&(o=l.custom||{},void 0!==f.tension&&void 0===f.lineTension&&(f.lineTension=f.tension),l._scale=c,l._datasetIndex=r.index,l._children=d,l._model={spanGaps:f.spanGaps?f.spanGaps:u.spanGaps,tension:o.tension?o.tension:a.valueOrDefault(f.lineTension,h.tension),backgroundColor:o.backgroundColor?o.backgroundColor:f.backgroundColor||h.backgroundColor,borderWidth:o.borderWidth?o.borderWidth:f.borderWidth||h.borderWidth,borderColor:o.borderColor?o.borderColor:f.borderColor||h.borderColor,borderCapStyle:o.borderCapStyle?o.borderCapStyle:f.borderCapStyle||h.borderCapStyle,borderDash:o.borderDash?o.borderDash:f.borderDash||h.borderDash,borderDashOffset:o.borderDashOffset?o.borderDashOffset:f.borderDashOffset||h.borderDashOffset,borderJoinStyle:o.borderJoinStyle?o.borderJoinStyle:f.borderJoinStyle||h.borderJoinStyle,fill:o.fill?o.fill:void 0!==f.fill?f.fill:h.fill,steppedLine:o.steppedLine?o.steppedLine:a.valueOrDefault(f.steppedLine,h.stepped),cubicInterpolationMode:o.cubicInterpolationMode?o.cubicInterpolationMode:a.valueOrDefault(f.cubicInterpolationMode,h.cubicInterpolationMode)},l.pivot()),i=0,n=d.length;i<n;++i)r.updateElement(d[i],i,t);for(p&&0!==l._model.tension&&r.updateBezierControlPoints(),i=0,n=d.length;i<n;++i)d[i].pivot()},getPointBackgroundColor:function(t,e){var i=this.chart.options.elements.point.backgroundColor,n=this.getDataset(),o=t.custom||{};return o.backgroundColor?i=o.backgroundColor:n.pointBackgroundColor?i=a.valueAtIndexOrDefault(n.pointBackgroundColor,e,i):n.backgroundColor&&(i=n.backgroundColor),i},getPointBorderColor:function(t,e){var i=this.chart.options.elements.point.borderColor,n=this.getDataset(),o=t.custom||{};return o.borderColor?i=o.borderColor:n.pointBorderColor?i=a.valueAtIndexOrDefault(n.pointBorderColor,e,i):n.borderColor&&(i=n.borderColor),i},getPointBorderWidth:function(t,e){var i=this.chart.options.elements.point.borderWidth,n=this.getDataset(),o=t.custom||{};return isNaN(o.borderWidth)?!isNaN(n.pointBorderWidth)||a.isArray(n.pointBorderWidth)?i=a.valueAtIndexOrDefault(n.pointBorderWidth,e,i):isNaN(n.borderWidth)||(i=n.borderWidth):i=o.borderWidth,i},updateElement:function(t,e,i){var n,o,r=this,s=r.getMeta(),l=t.custom||{},d=r.getDataset(),u=r.index,h=d.data[e],c=r.getScaleForId(s.yAxisID),f=r.getScaleForId(s.xAxisID),p=r.chart.options.elements.point;void 0!==d.radius&&void 0===d.pointRadius&&(d.pointRadius=d.radius),void 0!==d.hitRadius&&void 0===d.pointHitRadius&&(d.pointHitRadius=d.hitRadius),n=f.getPixelForValue("object"==typeof h?h:NaN,e,u),o=i?c.getBasePixel():r.calculatePointY(h,e,u),t._xScale=f,t._yScale=c,t._datasetIndex=u,t._index=e,t._model={x:n,y:o,skip:l.skip||isNaN(n)||isNaN(o),radius:l.radius||a.valueAtIndexOrDefault(d.pointRadius,e,p.radius),pointStyle:l.pointStyle||a.valueAtIndexOrDefault(d.pointStyle,e,p.pointStyle),backgroundColor:r.getPointBackgroundColor(t,e),borderColor:r.getPointBorderColor(t,e),borderWidth:r.getPointBorderWidth(t,e),tension:s.dataset._model?s.dataset._model.tension:0,steppedLine:!!s.dataset._model&&s.dataset._model.steppedLine,hitRadius:l.hitRadius||a.valueAtIndexOrDefault(d.pointHitRadius,e,p.hitRadius)}},calculatePointY:function(t,e,i){var n,o,a,r=this,s=r.chart,l=r.getMeta(),d=r.getScaleForId(l.yAxisID),u=0,h=0;if(d.options.stacked){for(n=0;n<i;n++)if(o=s.data.datasets[n],a=s.getDatasetMeta(n),"line"===a.type&&a.yAxisID===d.id&&s.isDatasetVisible(n)){var c=Number(d.getRightValue(o.data[e]));c<0?h+=c||0:u+=c||0}var f=Number(d.getRightValue(t));return f<0?d.getPixelForValue(h+f):d.getPixelForValue(u+f)}return d.getPixelForValue(t)},updateBezierControlPoints:function(){function t(t,e,i){return Math.max(Math.min(t,i),e)}var e,i,n,o,r,s=this,l=s.getMeta(),d=s.chart.chartArea,u=l.data||[];if(l.dataset._model.spanGaps&&(u=u.filter(function(t){return!t._model.skip})),"monotone"===l.dataset._model.cubicInterpolationMode)a.splineCurveMonotone(u);else for(e=0,i=u.length;e<i;++e)n=u[e],o=n._model,r=a.splineCurve(a.previousItem(u,e)._model,o,a.nextItem(u,e)._model,l.dataset._model.tension),o.controlPointPreviousX=r.previous.x,o.controlPointPreviousY=r.previous.y,o.controlPointNextX=r.next.x,o.controlPointNextY=r.next.y;if(s.chart.options.elements.line.capBezierPoints)for(e=0,i=u.length;e<i;++e)o=u[e]._model,o.controlPointPreviousX=t(o.controlPointPreviousX,d.left,d.right),o.controlPointPreviousY=t(o.controlPointPreviousY,d.top,d.bottom),o.controlPointNextX=t(o.controlPointNextX,d.left,d.right),o.controlPointNextY=t(o.controlPointNextY,d.top,d.bottom)},draw:function(){var t=this,i=t.chart,n=t.getMeta(),o=n.data||[],r=i.chartArea,s=o.length,l=0;for(a.canvas.clipArea(i.ctx,r),e(t.getDataset(),i.options)&&n.dataset.draw(),a.canvas.unclipArea(i.ctx);l<s;++l)o[l].draw(r)},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t._index,n=t.custom||{},o=t._model;o.radius=n.hoverRadius||a.valueAtIndexOrDefault(e.pointHoverRadius,i,this.chart.options.elements.point.hoverRadius),o.backgroundColor=n.hoverBackgroundColor||a.valueAtIndexOrDefault(e.pointHoverBackgroundColor,i,a.getHoverColor(o.backgroundColor)),o.borderColor=n.hoverBorderColor||a.valueAtIndexOrDefault(e.pointHoverBorderColor,i,a.getHoverColor(o.borderColor)),o.borderWidth=n.hoverBorderWidth||a.valueAtIndexOrDefault(e.pointHoverBorderWidth,i,o.borderWidth)},removeHoverStyle:function(t){var e=this,i=e.chart.data.datasets[t._datasetIndex],n=t._index,o=t.custom||{},r=t._model;void 0!==i.radius&&void 0===i.pointRadius&&(i.pointRadius=i.radius),r.radius=o.radius||a.valueAtIndexOrDefault(i.pointRadius,n,e.chart.options.elements.point.radius),r.backgroundColor=e.getPointBackgroundColor(t,n),r.borderColor=e.getPointBorderColor(t,n),r.borderWidth=e.getPointBorderWidth(t,n)}})}},{25:25,40:40,45:45}],19:[function(t,e,i){"use strict";var n=t(25),o=t(40),a=t(45);n._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');var i=t.data,n=i.datasets,o=i.labels;if(n.length)for(var a=0;a<n[0].data.length;++a)e.push('<li><span style="background-color:'+n[0].backgroundColor[a]+'"></span>'),o[a]&&e.push(o[a]),e.push("</li>");return e.push("</ul>"),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(i,n){var o=t.getDatasetMeta(0),r=e.datasets[0],s=o.data[n],l=s.custom||{},d=a.valueAtIndexOrDefault,u=t.options.elements.arc;return{text:i,fillStyle:l.backgroundColor?l.backgroundColor:d(r.backgroundColor,n,u.backgroundColor),strokeStyle:l.borderColor?l.borderColor:d(r.borderColor,n,u.borderColor),lineWidth:l.borderWidth?l.borderWidth:d(r.borderWidth,n,u.borderWidth),hidden:isNaN(r.data[n])||o.data[n].hidden,index:n}}):[]}},onClick:function(t,e){var i,n,o,a=e.index,r=this.chart;for(i=0,n=(r.data.datasets||[]).length;i<n;++i)o=r.getDatasetMeta(i),o.data[a].hidden=!o.data[a].hidden;r.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}}),e.exports=function(t){t.controllers.polarArea=t.DatasetController.extend({dataElementType:o.Arc,linkScales:a.noop,update:function(t){var e=this,i=e.chart,n=i.chartArea,o=e.getMeta(),r=i.options,s=r.elements.arc,l=Math.min(n.right-n.left,n.bottom-n.top);i.outerRadius=Math.max((l-s.borderWidth/2)/2,0),i.innerRadius=Math.max(r.cutoutPercentage?i.outerRadius/100*r.cutoutPercentage:1,0),i.radiusLength=(i.outerRadius-i.innerRadius)/i.getVisibleDatasetCount(),e.outerRadius=i.outerRadius-i.radiusLength*e.index,e.innerRadius=e.outerRadius-i.radiusLength,o.count=e.countVisibleElements(),a.each(o.data,function(i,n){e.updateElement(i,n,t)})},updateElement:function(t,e,i){for(var n=this,o=n.chart,r=n.getDataset(),s=o.options,l=s.animation,d=o.scale,u=o.data.labels,h=n.calculateCircumference(r.data[e]),c=d.xCenter,f=d.yCenter,p=0,g=n.getMeta(),m=0;m<e;++m)isNaN(r.data[m])||g.data[m].hidden||++p;var v=s.startAngle,b=t.hidden?0:d.getDistanceFromCenterForValue(r.data[e]),y=v+h*p,x=y+(t.hidden?0:h),w=l.animateScale?0:d.getDistanceFromCenterForValue(r.data[e]);a.extend(t,{_datasetIndex:n.index,_index:e,_scale:d,_model:{x:c,y:f,innerRadius:0,outerRadius:i?w:b,startAngle:i&&l.animateRotate?v:y,endAngle:i&&l.animateRotate?v:x,label:a.valueAtIndexOrDefault(u,e,u[e])}}),n.removeHoverStyle(t),t.pivot()},removeHoverStyle:function(e){t.DatasetController.prototype.removeHoverStyle.call(this,e,this.chart.options.elements.arc)},countVisibleElements:function(){var t=this.getDataset(),e=this.getMeta(),i=0;return a.each(e.data,function(e,n){isNaN(t.data[n])||e.hidden||i++}),i},calculateCircumference:function(t){var e=this.getMeta().count;return e>0&&!isNaN(t)?2*Math.PI/e:0}})}},{25:25,40:40,45:45}],20:[function(t,e,i){"use strict";var n=t(25),o=t(40),a=t(45);n._set("radar",{scale:{type:"radialLinear"},elements:{line:{tension:0}}}),e.exports=function(t){t.controllers.radar=t.DatasetController.extend({datasetElementType:o.Line,dataElementType:o.Point,linkScales:a.noop,update:function(t){var e=this,i=e.getMeta(),n=i.dataset,o=i.data,r=n.custom||{},s=e.getDataset(),l=e.chart.options.elements.line,d=e.chart.scale;void 0!==s.tension&&void 0===s.lineTension&&(s.lineTension=s.tension),a.extend(i.dataset,{_datasetIndex:e.index,_scale:d,_children:o,_loop:!0,_model:{tension:r.tension?r.tension:a.valueOrDefault(s.lineTension,l.tension),backgroundColor:r.backgroundColor?r.backgroundColor:s.backgroundColor||l.backgroundColor,borderWidth:r.borderWidth?r.borderWidth:s.borderWidth||l.borderWidth,borderColor:r.borderColor?r.borderColor:s.borderColor||l.borderColor,fill:r.fill?r.fill:void 0!==s.fill?s.fill:l.fill,borderCapStyle:r.borderCapStyle?r.borderCapStyle:s.borderCapStyle||l.borderCapStyle,borderDash:r.borderDash?r.borderDash:s.borderDash||l.borderDash,borderDashOffset:r.borderDashOffset?r.borderDashOffset:s.borderDashOffset||l.borderDashOffset,borderJoinStyle:r.borderJoinStyle?r.borderJoinStyle:s.borderJoinStyle||l.borderJoinStyle}}),i.dataset.pivot(),a.each(o,function(i,n){e.updateElement(i,n,t)},e),e.updateBezierControlPoints()},updateElement:function(t,e,i){var n=this,o=t.custom||{},r=n.getDataset(),s=n.chart.scale,l=n.chart.options.elements.point,d=s.getPointPositionForValue(e,r.data[e]);void 0!==r.radius&&void 0===r.pointRadius&&(r.pointRadius=r.radius),void 0!==r.hitRadius&&void 0===r.pointHitRadius&&(r.pointHitRadius=r.hitRadius),a.extend(t,{_datasetIndex:n.index,_index:e,_scale:s,_model:{x:i?s.xCenter:d.x,y:i?s.yCenter:d.y,tension:o.tension?o.tension:a.valueOrDefault(r.lineTension,n.chart.options.elements.line.tension),radius:o.radius?o.radius:a.valueAtIndexOrDefault(r.pointRadius,e,l.radius),backgroundColor:o.backgroundColor?o.backgroundColor:a.valueAtIndexOrDefault(r.pointBackgroundColor,e,l.backgroundColor),borderColor:o.borderColor?o.borderColor:a.valueAtIndexOrDefault(r.pointBorderColor,e,l.borderColor),borderWidth:o.borderWidth?o.borderWidth:a.valueAtIndexOrDefault(r.pointBorderWidth,e,l.borderWidth),pointStyle:o.pointStyle?o.pointStyle:a.valueAtIndexOrDefault(r.pointStyle,e,l.pointStyle),hitRadius:o.hitRadius?o.hitRadius:a.valueAtIndexOrDefault(r.pointHitRadius,e,l.hitRadius)}}),t._model.skip=o.skip?o.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var t=this.chart.chartArea,e=this.getMeta();a.each(e.data,function(i,n){var o=i._model,r=a.splineCurve(a.previousItem(e.data,n,!0)._model,o,a.nextItem(e.data,n,!0)._model,o.tension);o.controlPointPreviousX=Math.max(Math.min(r.previous.x,t.right),t.left),o.controlPointPreviousY=Math.max(Math.min(r.previous.y,t.bottom),t.top),o.controlPointNextX=Math.max(Math.min(r.next.x,t.right),t.left),o.controlPointNextY=Math.max(Math.min(r.next.y,t.bottom),t.top),i.pivot()})},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t.custom||{},n=t._index,o=t._model;o.radius=i.hoverRadius?i.hoverRadius:a.valueAtIndexOrDefault(e.pointHoverRadius,n,this.chart.options.elements.point.hoverRadius),o.backgroundColor=i.hoverBackgroundColor?i.hoverBackgroundColor:a.valueAtIndexOrDefault(e.pointHoverBackgroundColor,n,a.getHoverColor(o.backgroundColor)),o.borderColor=i.hoverBorderColor?i.hoverBorderColor:a.valueAtIndexOrDefault(e.pointHoverBorderColor,n,a.getHoverColor(o.borderColor)),o.borderWidth=i.hoverBorderWidth?i.hoverBorderWidth:a.valueAtIndexOrDefault(e.pointHoverBorderWidth,n,o.borderWidth)},removeHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t.custom||{},n=t._index,o=t._model,r=this.chart.options.elements.point;o.radius=i.radius?i.radius:a.valueAtIndexOrDefault(e.pointRadius,n,r.radius),o.backgroundColor=i.backgroundColor?i.backgroundColor:a.valueAtIndexOrDefault(e.pointBackgroundColor,n,r.backgroundColor),o.borderColor=i.borderColor?i.borderColor:a.valueAtIndexOrDefault(e.pointBorderColor,n,r.borderColor),o.borderWidth=i.borderWidth?i.borderWidth:a.valueAtIndexOrDefault(e.pointBorderWidth,n,r.borderWidth)}})}},{25:25,40:40,45:45}],21:[function(t,e,i){"use strict";t(25)._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},showLines:!1,tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}}),e.exports=function(t){t.controllers.scatter=t.controllers.line}},{25:25}],22:[function(t,e,i){"use strict";var n=t(25),o=t(26),a=t(45);n._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:a.noop,onComplete:a.noop}}),e.exports=function(t){t.Animation=o.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),t.animationService={frameDuration:17,animations:[],dropFrames:0,request:null,addAnimation:function(t,e,i,n){var o,a,r=this.animations;for(e.chart=t,n||(t.animating=!0),o=0,a=r.length;o<a;++o)if(r[o].chart===t)return void(r[o]=e);r.push(e),1===r.length&&this.requestAnimationFrame()},cancelAnimation:function(t){var e=a.findIndex(this.animations,function(e){return e.chart===t});-1!==e&&(this.animations.splice(e,1),t.animating=!1)},requestAnimationFrame:function(){var t=this;null===t.request&&(t.request=a.requestAnimFrame.call(window,function(){t.request=null,t.startDigest()}))},startDigest:function(){var t=this,e=Date.now(),i=0;t.dropFrames>1&&(i=Math.floor(t.dropFrames),t.dropFrames=t.dropFrames%1),t.advance(1+i);var n=Date.now();t.dropFrames+=(n-e)/t.frameDuration,t.animations.length>0&&t.requestAnimationFrame()},advance:function(t){for(var e,i,n=this.animations,o=0;o<n.length;)e=n[o],i=e.chart,e.currentStep=(e.currentStep||0)+t,e.currentStep=Math.min(e.currentStep,e.numSteps),a.callback(e.render,[i,e],i),a.callback(e.onAnimationProgress,[e],i),e.currentStep>=e.numSteps?(a.callback(e.onAnimationComplete,[e],i),i.animating=!1,n.splice(o,1)):++o}},Object.defineProperty(t.Animation.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(t.Animation.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}})}},{25:25,26:26,45:45}],23:[function(t,e,i){"use strict";var n=t(25),o=t(45),a=t(28),r=t(30),s=t(48),l=t(31);e.exports=function(t){function e(t){t=t||{};var e=t.data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=o.configMerge(n.global,n[t.type],t.options||{}),t}function i(e){var i=e.options;o.each(e.scales,function(t){r.removeBox(e,t)}),i=o.configMerge(t.defaults.global,t.defaults[e.config.type],i),e.options=e.config.options=i,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=i.tooltips,e.tooltip.initialize()}function d(t){
|
|
return"top"===t||"bottom"===t}t.types={},t.instances={},t.controllers={},o.extend(t.prototype,{construct:function(i,n){var a=this;n=e(n);var r=s.acquireContext(i,n),l=r&&r.canvas,d=l&&l.height,u=l&&l.width;if(a.id=o.uid(),a.ctx=r,a.canvas=l,a.config=n,a.width=u,a.height=d,a.aspectRatio=d?u/d:null,a.options=n.options,a._bufferedRender=!1,a.chart=a,a.controller=a,t.instances[a.id]=a,Object.defineProperty(a,"data",{get:function(){return a.config.data},set:function(t){a.config.data=t}}),!r||!l)return void console.error("Failed to create chart: can't acquire context from the given item");a.initialize(),a.update()},initialize:function(){var t=this;return l.notify(t,"beforeInit"),o.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.initToolTip(),l.notify(t,"afterInit"),t},clear:function(){return o.canvas.clear(this),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(t){var e=this,i=e.options,n=e.canvas,a=i.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(o.getMaximumWidth(n))),s=Math.max(0,Math.floor(a?r/a:o.getMaximumHeight(n)));if((e.width!==r||e.height!==s)&&(n.width=e.width=r,n.height=e.height=s,n.style.width=r+"px",n.style.height=s+"px",o.retinaScale(e,i.devicePixelRatio),!t)){var d={width:r,height:s};l.notify(e,"resize",[d]),e.options.onResize&&e.options.onResize(e,d),e.stop(),e.update(e.options.responsiveAnimationDuration)}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},i=t.scale;o.each(e.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),o.each(e.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),i&&(i.id=i.id||"scale")},buildOrUpdateScales:function(){var e=this,i=e.options,n=e.scales||{},a=[],r=Object.keys(n).reduce(function(t,e){return t[e]=!1,t},{});i.scales&&(a=a.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&&a.push({options:i.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),o.each(a,function(i){var a=i.options,s=a.id,l=o.valueOrDefault(a.type,i.dtype);d(a.position)!==d(i.dposition)&&(a.position=i.dposition),r[s]=!0;var u=null;if(s in n&&n[s].type===l)u=n[s],u.options=a,u.ctx=e.ctx,u.chart=e;else{var h=t.scaleService.getScaleConstructor(l);if(!h)return;u=new h({id:s,type:l,options:a,ctx:e.ctx,chart:e}),n[u.id]=u}u.mergeTicksOptions(),i.isDefault&&(e.scale=u)}),o.each(r,function(t,e){t||delete n[e]}),e.scales=n,t.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,i=[],n=[];return o.each(e.data.datasets,function(o,a){var r=e.getDatasetMeta(a),s=o.type||e.config.type;if(r.type&&r.type!==s&&(e.destroyDatasetMeta(a),r=e.getDatasetMeta(a)),r.type=s,i.push(r.type),r.controller)r.controller.updateIndex(a),r.controller.linkScales();else{var l=t.controllers[r.type];if(void 0===l)throw new Error('"'+r.type+'" is not a chart type.');r.controller=new l(e,a),n.push(r.controller)}},e),n},resetElements:function(){var t=this;o.each(t.data.datasets,function(e,i){t.getDatasetMeta(i).controller.reset()},t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),i(e),l._invalidate(e),!1!==l.notify(e,"beforeUpdate")){e.tooltip._data=e.data;var n=e.buildOrUpdateControllers();o.each(e.data.datasets,function(t,i){e.getDatasetMeta(i).controller.buildOrUpdateElements()},e),e.updateLayout(),e.options.animation&&e.options.animation.duration&&o.each(n,function(t){t.reset()}),e.updateDatasets(),e.tooltip.initialize(),e.lastActive=[],l.notify(e,"afterUpdate"),e._bufferedRender?e._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:e.render(t)}},updateLayout:function(){var t=this;!1!==l.notify(t,"beforeLayout")&&(r.update(this,this.width,this.height),l.notify(t,"afterScaleUpdate"),l.notify(t,"afterLayout"))},updateDatasets:function(){var t=this;if(!1!==l.notify(t,"beforeDatasetsUpdate")){for(var e=0,i=t.data.datasets.length;e<i;++e)t.updateDataset(e);l.notify(t,"afterDatasetsUpdate")}},updateDataset:function(t){var e=this,i=e.getDatasetMeta(t),n={meta:i,index:t};!1!==l.notify(e,"beforeDatasetUpdate",[n])&&(i.controller.update(),l.notify(e,"afterDatasetUpdate",[n]))},render:function(e){var i=this;e&&"object"==typeof e||(e={duration:e,lazy:arguments[1]});var n=e.duration,a=e.lazy;if(!1!==l.notify(i,"beforeRender")){var r=i.options.animation,s=function(t){l.notify(i,"afterRender"),o.callback(r&&r.onComplete,[t],i)};if(r&&(void 0!==n&&0!==n||void 0===n&&0!==r.duration)){var d=new t.Animation({numSteps:(n||r.duration)/16.66,easing:e.easing||r.easing,render:function(t,e){var i=o.easing.effects[e.easing],n=e.currentStep,a=n/e.numSteps;t.draw(i(a),a,n)},onAnimationProgress:r.onProgress,onAnimationComplete:s});t.animationService.addAnimation(i,d,n,a)}else i.draw(),s(new t.Animation({numSteps:0,chart:i}));return i}},draw:function(t){var e=this;e.clear(),o.isNullOrUndef(t)&&(t=1),e.transition(t),!1!==l.notify(e,"beforeDraw",[t])&&(o.each(e.boxes,function(t){t.draw(e.chartArea)},e),e.scale&&e.scale.draw(),e.drawDatasets(t),e._drawTooltip(t),l.notify(e,"afterDraw",[t]))},transition:function(t){for(var e=this,i=0,n=(e.data.datasets||[]).length;i<n;++i)e.isDatasetVisible(i)&&e.getDatasetMeta(i).controller.transition(t);e.tooltip.transition(t)},drawDatasets:function(t){var e=this;if(!1!==l.notify(e,"beforeDatasetsDraw",[t])){for(var i=(e.data.datasets||[]).length-1;i>=0;--i)e.isDatasetVisible(i)&&e.drawDataset(i,t);l.notify(e,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var i=this,n=i.getDatasetMeta(t),o={meta:n,index:t,easingValue:e};!1!==l.notify(i,"beforeDatasetDraw",[o])&&(n.controller.draw(e),l.notify(i,"afterDatasetDraw",[o]))},_drawTooltip:function(t){var e=this,i=e.tooltip,n={tooltip:i,easingValue:t};!1!==l.notify(e,"beforeTooltipDraw",[n])&&(i.draw(),l.notify(e,"afterTooltipDraw",[n]))},getElementAtEvent:function(t){return a.modes.single(this,t)},getElementsAtEvent:function(t){return a.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return a.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,i){var n=a.modes[e];return"function"==typeof n?n(this,t,i):[]},getDatasetAtEvent:function(t){return a.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this,i=e.data.datasets[t];i._meta||(i._meta={});var n=i._meta[e.id];return n||(n=i._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),n},getVisibleDatasetCount:function(){for(var t=0,e=0,i=this.data.datasets.length;e<i;++e)this.isDatasetVisible(e)&&t++;return t},isDatasetVisible:function(t){var e=this.getDatasetMeta(t);return"boolean"==typeof e.hidden?!e.hidden:!this.data.datasets[t].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(t){var e=this.id,i=this.data.datasets[t],n=i._meta&&i._meta[e];n&&(n.controller.destroy(),delete i._meta[e])},destroy:function(){var e,i,n=this,a=n.canvas;for(n.stop(),e=0,i=n.data.datasets.length;e<i;++e)n.destroyDatasetMeta(e);a&&(n.unbindEvents(),o.canvas.clear(n),s.releaseContext(n.ctx),n.canvas=null,n.ctx=null),l.notify(n,"destroy"),delete t.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var e=this;e.tooltip=new t.Tooltip({_chart:e,_chartInstance:e,_data:e.data,_options:e.options.tooltips},e)},bindEvents:function(){var t=this,e=t._listeners={},i=function(){t.eventHandler.apply(t,arguments)};o.each(t.options.events,function(n){s.addEventListener(t,n,i),e[n]=i}),t.options.responsive&&(i=function(){t.resize()},s.addEventListener(t,"resize",i),e.resize=i)},unbindEvents:function(){var t=this,e=t._listeners;e&&(delete t._listeners,o.each(e,function(e,i){s.removeEventListener(t,i,e)}))},updateHoverStyle:function(t,e,i){var n,o,a,r=i?"setHoverStyle":"removeHoverStyle";for(o=0,a=t.length;o<a;++o)(n=t[o])&&this.getDatasetMeta(n._datasetIndex).controller[r](n)},eventHandler:function(t){var e=this,i=e.tooltip;if(!1!==l.notify(e,"beforeEvent",[t])){e._bufferedRender=!0,e._bufferedRequest=null;var n=e.handleEvent(t);i&&(n=i._start?i.handleEvent(t):n|i.handleEvent(t)),l.notify(e,"afterEvent",[t]);var o=e._bufferedRequest;return o?e.render(o):n&&!e.animating&&(e.stop(),e.render(e.options.hover.animationDuration,!0)),e._bufferedRender=!1,e._bufferedRequest=null,e}},handleEvent:function(t){var e=this,i=e.options||{},n=i.hover,a=!1;return e.lastActive=e.lastActive||[],"mouseout"===t.type?e.active=[]:e.active=e.getElementsAtEventForMode(t,n.mode,n),o.callback(i.onHover||i.hover.onHover,[t.native,e.active],e),"mouseup"!==t.type&&"click"!==t.type||i.onClick&&i.onClick.call(e,t.native,e.active),e.lastActive.length&&e.updateHoverStyle(e.lastActive,n.mode,!1),e.active.length&&n.mode&&e.updateHoverStyle(e.active,n.mode,!0),a=!o.arrayEquals(e.active,e.lastActive),e.lastActive=e.active,a}}),t.Controller=t}},{25:25,28:28,30:30,31:31,45:45,48:48}],24:[function(t,e,i){"use strict";var n=t(45);e.exports=function(t){function e(t,e){if(t._chartjs)return void t._chartjs.listeners.push(e);Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),o.forEach(function(e){var i="onData"+e.charAt(0).toUpperCase()+e.slice(1),o=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),a=o.apply(this,e);return n.each(t._chartjs.listeners,function(t){"function"==typeof t[i]&&t[i].apply(t,e)}),a}})})}function i(t,e){var i=t._chartjs;if(i){var n=i.listeners,a=n.indexOf(e);-1!==a&&n.splice(a,1),n.length>0||(o.forEach(function(e){delete t[e]}),delete t._chartjs)}}var o=["push","pop","shift","splice","unshift"];t.DatasetController=function(t,e){this.initialize(t,e)},n.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){var i=this;i.chart=t,i.index=e,i.linkScales(),i.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),i=t.getDataset();null!==e.xAxisID&&e.xAxisID in t.chart.scales||(e.xAxisID=i.xAxisID||t.chart.options.scales.xAxes[0].id),null!==e.yAxisID&&e.yAxisID in t.chart.scales||(e.yAxisID=i.yAxisID||t.chart.options.scales.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},reset:function(){this.update(!0)},destroy:function(){this._data&&i(this._data,this)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,i=e.dataElementType;return i&&new i({_chart:e.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,i=this,n=i.getMeta(),o=i.getDataset().data||[],a=n.data;for(t=0,e=o.length;t<e;++t)a[t]=a[t]||i.createMetaData(t);n.dataset=n.dataset||i.createMetaDataset()},addElementAndReset:function(t){var e=this.createMetaData(t);this.getMeta().data.splice(t,0,e),this.updateElement(e,t,!0)},buildOrUpdateElements:function(){var t=this,n=t.getDataset(),o=n.data||(n.data=[]);t._data!==o&&(t._data&&i(t._data,t),e(o,t),t._data=o),t.resyncElements()},update:n.noop,transition:function(t){for(var e=this.getMeta(),i=e.data||[],n=i.length,o=0;o<n;++o)i[o].transition(t);e.dataset&&e.dataset.transition(t)},draw:function(){var t=this.getMeta(),e=t.data||[],i=e.length,n=0;for(t.dataset&&t.dataset.draw();n<i;++n)e[n].draw()},removeHoverStyle:function(t,e){var i=this.chart.data.datasets[t._datasetIndex],o=t._index,a=t.custom||{},r=n.valueAtIndexOrDefault,s=t._model;s.backgroundColor=a.backgroundColor?a.backgroundColor:r(i.backgroundColor,o,e.backgroundColor),s.borderColor=a.borderColor?a.borderColor:r(i.borderColor,o,e.borderColor),s.borderWidth=a.borderWidth?a.borderWidth:r(i.borderWidth,o,e.borderWidth)},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t._index,o=t.custom||{},a=n.valueAtIndexOrDefault,r=n.getHoverColor,s=t._model;s.backgroundColor=o.hoverBackgroundColor?o.hoverBackgroundColor:a(e.hoverBackgroundColor,i,r(s.backgroundColor)),s.borderColor=o.hoverBorderColor?o.hoverBorderColor:a(e.hoverBorderColor,i,r(s.borderColor)),s.borderWidth=o.hoverBorderWidth?o.hoverBorderWidth:a(e.hoverBorderWidth,i,s.borderWidth)},resyncElements:function(){var t=this,e=t.getMeta(),i=t.getDataset().data,n=e.data.length,o=i.length;o<n?e.data.splice(o,n-o):o>n&&t.insertElements(n,o-n)},insertElements:function(t,e){for(var i=0;i<e;++i)this.addElementAndReset(t+i)},onDataPush:function(){this.insertElements(this.getDataset().data.length-1,arguments.length)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(t,e){this.getMeta().data.splice(t,e),this.insertElements(t,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),t.DatasetController.extend=n.inherits}},{45:45}],25:[function(t,e,i){"use strict";var n=t(45);e.exports={_set:function(t,e){return n.merge(this[t]||(this[t]={}),e)}}},{45:45}],26:[function(t,e,i){"use strict";function n(t,e,i,n){var a,r,s,l,d,u,h,c,f,p=Object.keys(i);for(a=0,r=p.length;a<r;++a)if(s=p[a],u=i[s],e.hasOwnProperty(s)||(e[s]=u),(l=e[s])!==u&&"_"!==s[0]){if(t.hasOwnProperty(s)||(t[s]=l),d=t[s],(h=typeof u)===typeof d)if("string"===h){if(c=o(d),c.valid&&(f=o(u),f.valid)){e[s]=f.mix(c,n).rgbString();continue}}else if("number"===h&&isFinite(d)&&isFinite(u)){e[s]=d+(u-d)*n;continue}e[s]=u}}var o=t(3),a=t(45),r=function(t){a.extend(this,t),this.initialize.apply(this,arguments)};a.extend(r.prototype,{initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=a.clone(t._model)),t._start={},t},transition:function(t){var e=this,i=e._model,o=e._start,a=e._view;return i&&1!==t?(a||(a=e._view={}),o||(o=e._start={}),n(o,a,i,t),e):(e._view=i,e._start=null,e)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return a.isNumber(this._model.x)&&a.isNumber(this._model.y)}}),r.extend=a.inherits,e.exports=r},{3:3,45:45}],27:[function(t,e,i){"use strict";var n=t(3),o=t(25),a=t(45);e.exports=function(t){function e(t,e,i){var n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}function i(t){return void 0!==t&&null!==t&&"none"!==t}function r(t,n,o){var a=document.defaultView,r=t.parentNode,s=a.getComputedStyle(t)[n],l=a.getComputedStyle(r)[n],d=i(s),u=i(l),h=Number.POSITIVE_INFINITY;return d||u?Math.min(d?e(s,t,o):h,u?e(l,r,o):h):"none"}a.configMerge=function(){return a.merge(a.clone(arguments[0]),[].slice.call(arguments,1),{merger:function(e,i,n,o){var r=i[e]||{},s=n[e];"scales"===e?i[e]=a.scaleMerge(r,s):"scale"===e?i[e]=a.merge(r,[t.scaleService.getScaleDefaults(s.type),s]):a._merger(e,i,n,o)}})},a.scaleMerge=function(){return a.merge(a.clone(arguments[0]),[].slice.call(arguments,1),{merger:function(e,i,n,o){if("xAxes"===e||"yAxes"===e){var r,s,l,d=n[e].length;for(i[e]||(i[e]=[]),r=0;r<d;++r)l=n[e][r],s=a.valueOrDefault(l.type,"xAxes"===e?"category":"linear"),r>=i[e].length&&i[e].push({}),!i[e][r].type||l.type&&l.type!==i[e][r].type?a.merge(i[e][r],[t.scaleService.getScaleDefaults(s),l]):a.merge(i[e][r],l)}else a._merger(e,i,n,o)}})},a.where=function(t,e){if(a.isArray(t)&&Array.prototype.filter)return t.filter(e);var i=[];return a.each(t,function(t){e(t)&&i.push(t)}),i},a.findIndex=Array.prototype.findIndex?function(t,e,i){return t.findIndex(e,i)}:function(t,e,i){i=void 0===i?t:i;for(var n=0,o=t.length;n<o;++n)if(e.call(i,t[n],n,t))return n;return-1},a.findNextWhere=function(t,e,i){a.isNullOrUndef(i)&&(i=-1);for(var n=i+1;n<t.length;n++){var o=t[n];if(e(o))return o}},a.findPreviousWhere=function(t,e,i){a.isNullOrUndef(i)&&(i=t.length);for(var n=i-1;n>=0;n--){var o=t[n];if(e(o))return o}},a.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},a.almostEquals=function(t,e,i){return Math.abs(t-e)<i},a.almostWhole=function(t,e){var i=Math.round(t);return i-e<t&&i+e>t},a.max=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.max(t,e)},Number.NEGATIVE_INFINITY)},a.min=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.min(t,e)},Number.POSITIVE_INFINITY)},a.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return t=+t,0===t||isNaN(t)?t:t>0?1:-1},a.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},a.toRadians=function(t){return t*(Math.PI/180)},a.toDegrees=function(t){return t*(180/Math.PI)},a.getAngleFromPoint=function(t,e){var i=e.x-t.x,n=e.y-t.y,o=Math.sqrt(i*i+n*n),a=Math.atan2(n,i);return a<-.5*Math.PI&&(a+=2*Math.PI),{angle:a,distance:o}},a.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},a.aliasPixel=function(t){return t%2==0?0:.5},a.splineCurve=function(t,e,i,n){var o=t.skip?e:t,a=e,r=i.skip?e:i,s=Math.sqrt(Math.pow(a.x-o.x,2)+Math.pow(a.y-o.y,2)),l=Math.sqrt(Math.pow(r.x-a.x,2)+Math.pow(r.y-a.y,2)),d=s/(s+l),u=l/(s+l);d=isNaN(d)?0:d,u=isNaN(u)?0:u;var h=n*d,c=n*u;return{previous:{x:a.x-h*(r.x-o.x),y:a.y-h*(r.y-o.y)},next:{x:a.x+c*(r.x-o.x),y:a.y+c*(r.y-o.y)}}},a.EPSILON=Number.EPSILON||1e-14,a.splineCurveMonotone=function(t){var e,i,n,o,r=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),s=r.length;for(e=0;e<s;++e)if(n=r[e],!n.model.skip){if(i=e>0?r[e-1]:null,(o=e<s-1?r[e+1]:null)&&!o.model.skip){var l=o.model.x-n.model.x;n.deltaK=0!==l?(o.model.y-n.model.y)/l:0}!i||i.model.skip?n.mK=n.deltaK:!o||o.model.skip?n.mK=i.deltaK:this.sign(i.deltaK)!==this.sign(n.deltaK)?n.mK=0:n.mK=(i.deltaK+n.deltaK)/2}var d,u,h,c;for(e=0;e<s-1;++e)n=r[e],o=r[e+1],n.model.skip||o.model.skip||(a.almostEquals(n.deltaK,0,this.EPSILON)?n.mK=o.mK=0:(d=n.mK/n.deltaK,u=o.mK/n.deltaK,(c=Math.pow(d,2)+Math.pow(u,2))<=9||(h=3/Math.sqrt(c),n.mK=d*h*n.deltaK,o.mK=u*h*n.deltaK)));var f;for(e=0;e<s;++e)n=r[e],n.model.skip||(i=e>0?r[e-1]:null,o=e<s-1?r[e+1]:null,i&&!i.model.skip&&(f=(n.model.x-i.model.x)/3,n.model.controlPointPreviousX=n.model.x-f,n.model.controlPointPreviousY=n.model.y-f*n.mK),o&&!o.model.skip&&(f=(o.model.x-n.model.x)/3,n.model.controlPointNextX=n.model.x+f,n.model.controlPointNextY=n.model.y+f*n.mK))},a.nextItem=function(t,e,i){return i?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},a.previousItem=function(t,e,i){return i?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},a.niceNum=function(t,e){var i=Math.floor(a.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)},a.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)}}(),a.getRelativePosition=function(t,e){var i,n,o=t.originalEvent||t,r=t.currentTarget||t.srcElement,s=r.getBoundingClientRect(),l=o.touches;l&&l.length>0?(i=l[0].clientX,n=l[0].clientY):(i=o.clientX,n=o.clientY);var d=parseFloat(a.getStyle(r,"padding-left")),u=parseFloat(a.getStyle(r,"padding-top")),h=parseFloat(a.getStyle(r,"padding-right")),c=parseFloat(a.getStyle(r,"padding-bottom")),f=s.right-s.left-d-h,p=s.bottom-s.top-u-c;return i=Math.round((i-s.left-d)/f*r.width/e.currentDevicePixelRatio),n=Math.round((n-s.top-u)/p*r.height/e.currentDevicePixelRatio),{x:i,y:n}},a.getConstraintWidth=function(t){return r(t,"max-width","clientWidth")},a.getConstraintHeight=function(t){return r(t,"max-height","clientHeight")},a.getMaximumWidth=function(t){var e=t.parentNode;if(!e)return t.clientWidth;var i=parseInt(a.getStyle(e,"padding-left"),10),n=parseInt(a.getStyle(e,"padding-right"),10),o=e.clientWidth-i-n,r=a.getConstraintWidth(t);return isNaN(r)?o:Math.min(o,r)},a.getMaximumHeight=function(t){var e=t.parentNode;if(!e)return t.clientHeight;var i=parseInt(a.getStyle(e,"padding-top"),10),n=parseInt(a.getStyle(e,"padding-bottom"),10),o=e.clientHeight-i-n,r=a.getConstraintHeight(t);return isNaN(r)?o:Math.min(o,r)},a.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},a.retinaScale=function(t,e){var i=t.currentDevicePixelRatio=e||window.devicePixelRatio||1;if(1!==i){var n=t.canvas,o=t.height,a=t.width;n.height=o*i,n.width=a*i,t.ctx.scale(i,i),n.style.height||n.style.width||(n.style.height=o+"px",n.style.width=a+"px")}},a.fontString=function(t,e,i){return e+" "+t+"px "+i},a.longestText=function(t,e,i,n){n=n||{};var o=n.data=n.data||{},r=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(o=n.data={},r=n.garbageCollect=[],n.font=e),t.font=e;var s=0;a.each(i,function(e){void 0!==e&&null!==e&&!0!==a.isArray(e)?s=a.measureText(t,o,r,s,e):a.isArray(e)&&a.each(e,function(e){void 0===e||null===e||a.isArray(e)||(s=a.measureText(t,o,r,s,e))})});var l=r.length/2;if(l>i.length){for(var d=0;d<l;d++)delete o[r[d]];r.splice(0,l)}return s},a.measureText=function(t,e,i,n,o){var a=e[o];return a||(a=e[o]=t.measureText(o).width,i.push(o)),a>n&&(n=a),n},a.numberOfLabelLines=function(t){var e=1;return a.each(t,function(t){a.isArray(t)&&t.length>e&&(e=t.length)}),e},a.color=n?function(t){return t instanceof CanvasGradient&&(t=o.global.defaultColor),n(t)}:function(t){return console.error("Color.js not found!"),t},a.getHoverColor=function(t){return t instanceof CanvasPattern?t:a.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}:d.getRelativePosition(t,e)}function o(t,e){var i,n,o,a,r,s=t.data.datasets;for(n=0,a=s.length;n<a;++n)if(t.isDatasetVisible(n))for(i=t.getDatasetMeta(n),o=0,r=i.data.length;o<r;++o){var l=i.data[o];l._view.skip||e(l)}}function a(t,e){var i=[];return o(t,function(t){t.inRange(e.x,e.y)&&i.push(t)}),i}function r(t,e,i,n){var a=Number.POSITIVE_INFINITY,r=[];return o(t,function(t){if(!i||t.inRange(e.x,e.y)){var o=t.getCenterPoint(),s=n(e,o);s<a?(r=[t],a=s):s===a&&r.push(t)}}),r}function s(t){var e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,n){var o=e?Math.abs(t.x-n.x):0,a=i?Math.abs(t.y-n.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(a,2))}}function l(t,e,i){var o=n(e,t);i.axis=i.axis||"x";var l=s(i.axis),d=i.intersect?a(t,o):r(t,o,!1,l),u=[];return d.length?(t.data.datasets.forEach(function(e,i){if(t.isDatasetVisible(i)){var n=t.getDatasetMeta(i),o=n.data[d[0]._index];o&&!o._view.skip&&u.push(o)}}),u):[]}var d=t(45);e.exports={modes:{single:function(t,e){var i=n(e,t),a=[];return o(t,function(t){if(t.inRange(i.x,i.y))return a.push(t),a}),a.slice(0,1)},label:l,index:l,dataset:function(t,e,i){var o=n(e,t);i.axis=i.axis||"xy";var l=s(i.axis),d=i.intersect?a(t,o):r(t,o,!1,l);return d.length>0&&(d=t.getDatasetMeta(d[0]._datasetIndex).data),d},"x-axis":function(t,e){return l(t,e,{intersect:!1})},point:function(t,e){return a(t,n(e,t))},nearest:function(t,e,i){var o=n(e,t);i.axis=i.axis||"xy";var a=s(i.axis),l=r(t,o,i.intersect,a);return l.length>1&&l.sort(function(t,e){var i=t.getArea(),n=e.getArea(),o=i-n;return 0===o&&(o=t._datasetIndex-e._datasetIndex),o}),l.slice(0,1)},x:function(t,e,i){var a=n(e,t),r=[],s=!1;return o(t,function(t){t.inXRange(a.x)&&r.push(t),t.inRange(a.x,a.y)&&(s=!0)}),i.intersect&&!s&&(r=[]),r},y:function(t,e,i){var a=n(e,t),r=[],s=!1;return o(t,function(t){t.inYRange(a.y)&&r.push(t),t.inRange(a.x,a.y)&&(s=!0)}),i.intersect&&!s&&(r=[]),r}}}},{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 a.where(t,function(t){return t.position===e})}function o(t,e){t.forEach(function(t,e){return t._tmpIndex_=e,t}),t.sort(function(t,i){var n=e?i:t,o=e?t:i;return n.weight===o.weight?n._tmpIndex_-o._tmpIndex_:n.weight-o.weight}),t.forEach(function(t){delete t._tmpIndex_})}var a=t(45);e.exports={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,t.boxes.push(e)},removeBox:function(t,e){var i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure:function(t,e,i){for(var n,o=["fullWidth","position","weight"],a=o.length,r=0;r<a;++r)n=o[r],i.hasOwnProperty(n)&&(e[n]=i[n])},update:function(t,e,i){function r(t){var e,i=t.isHorizontal();i?(e=t.update(t.fullWidth?w:S,M),T-=e.height):(e=t.update(D,T),S-=e.width),F.push({horizontal:i,minSize:e,box:t})}function s(t){var e=a.findNextWhere(F,function(e){return e.box===t});if(e)if(t.isHorizontal()){var i={left:Math.max(E,A),right:Math.max(L,I),top:0,bottom:0};t.update(t.fullWidth?w:S,k/2,i)}else t.update(e.minSize.width,T)}function l(t){var e=a.findNextWhere(F,function(e){return e.box===t}),i={left:0,right:0,top:R,bottom:B};e&&t.update(e.minSize.width,T,i)}function d(t){t.isHorizontal()?(t.left=t.fullWidth?c:E,t.right=t.fullWidth?e-f:E+S,t.top=H,t.bottom=H+t.height,H=t.bottom):(t.left=W,t.right=W+t.width,t.top=R,t.bottom=R+T,W=t.right)}if(t){var u=t.options.layout||{},h=a.options.toPadding(u.padding),c=h.left,f=h.right,p=h.top,g=h.bottom,m=n(t.boxes,"left"),v=n(t.boxes,"right"),b=n(t.boxes,"top"),y=n(t.boxes,"bottom"),x=n(t.boxes,"chartArea");o(m,!0),o(v,!1),o(b,!0),o(y,!1);var w=e-c-f,k=i-p-g,_=w/2,C=k/2,D=(e-_)/(m.length+v.length),M=(i-C)/(b.length+y.length),S=w,T=k,F=[];a.each(m.concat(v,b,y),r);var A=0,I=0,P=0,O=0;a.each(b.concat(y),function(t){if(t.getPadding){var e=t.getPadding();A=Math.max(A,e.left),I=Math.max(I,e.right)}}),a.each(m.concat(v),function(t){if(t.getPadding){var e=t.getPadding();P=Math.max(P,e.top),O=Math.max(O,e.bottom)}});var E=c,L=f,R=p,B=g;a.each(m.concat(v),s),a.each(m,function(t){E+=t.width}),a.each(v,function(t){L+=t.width}),a.each(b.concat(y),s),a.each(b,function(t){R+=t.height}),a.each(y,function(t){B+=t.height}),a.each(m.concat(v),l),E=c,L=f,R=p,B=g,a.each(m,function(t){E+=t.width}),a.each(v,function(t){L+=t.width}),a.each(b,function(t){R+=t.height}),a.each(y,function(t){B+=t.height});var V=Math.max(A-E,0);E+=V,L+=Math.max(I-L,0);var U=Math.max(P-R,0);R+=U,B+=Math.max(O-B,0);var z=i-R-B,N=e-E-L;N===S&&z===T||(a.each(m,function(t){t.height=z}),a.each(v,function(t){t.height=z}),a.each(b,function(t){t.fullWidth||(t.width=N)}),a.each(y,function(t){t.fullWidth||(t.width=N)}),T=z,S=N);var W=c+V,H=p+U;a.each(m.concat(b),d),W+=S,H+=T,a.each(v,d),a.each(y,d),t.chartArea={left:E,top:R,right:E+S,bottom:R+T},a.each(x,function(e){e.left=t.chartArea.left,e.top=t.chartArea.top,e.right=t.chartArea.right,e.bottom=t.chartArea.bottom,e.update(S,T)})}}}},{45:45}],31:[function(t,e,i){"use strict";var n=t(25),o=t(45);n._set("global",{plugins:{}}),e.exports={_plugins:[],_cacheId:0,register:function(t){var e=this._plugins;[].concat(t).forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),this._cacheId++},unregister:function(t){var e=this._plugins;[].concat(t).forEach(function(t){var i=e.indexOf(t);-1!==i&&e.splice(i,1)}),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e,i){var n,o,a,r,s,l=this.descriptors(t),d=l.length;for(n=0;n<d;++n)if(o=l[n],a=o.plugin,"function"==typeof(s=a[e])&&(r=[t].concat(i||[]),r.push(o.options),!1===s.apply(a,r)))return!1;return!0},descriptors:function(t){var e=t.$plugins||(t.$plugins={});if(e.id===this._cacheId)return e.descriptors;var i=[],a=[],r=t&&t.config||{},s=r.options&&r.options.plugins||{};return this._plugins.concat(r.plugins||[]).forEach(function(t){if(-1===i.indexOf(t)){var e=t.id,r=s[e];!1!==r&&(!0===r&&(r=o.clone(n.global.plugins[e])),i.push(t),a.push({plugin:t,options:r||{}}))}}),e.descriptors=a,e.id=this._cacheId,a},_invalidate:function(t){delete t.$plugins}}},{25:25,45:45}],32:[function(t,e,i){"use strict";function n(t){var e,i,n=[];for(e=0,i=t.length;e<i;++e)n.push(t[e].label);return n}function o(t,e,i){var n=t.getPixelForTick(e);return i&&(n-=0===e?(t.getPixelForTick(1)-n)/2:(n-t.getPixelForTick(e-1))/2),n}var a=t(25),r=t(26),s=t(45),l=t(34);a._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",lineHeight:1.2,padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:l.formatters.values,minor:{},major:{}}}),e.exports=function(t){function e(t,e,i){return s.isArray(e)?s.longestText(t,i,e):t.measureText(e).width}function i(t){var e=s.valueOrDefault,i=a.global,n=e(t.fontSize,i.defaultFontSize),o=e(t.fontStyle,i.defaultFontStyle),r=e(t.fontFamily,i.defaultFontFamily);return{size:n,style:o,family:r,font:s.fontString(n,o,r)}}function l(t){return s.options.toLineHeight(s.valueOrDefault(t.lineHeight,1.2),s.valueOrDefault(t.fontSize,a.global.defaultFontSize))}t.Scale=r.extend({getPadding:function(){var t=this;return{left:t.paddingLeft||0,top:t.paddingTop||0,right:t.paddingRight||0,bottom:t.paddingBottom||0}},getTicks:function(){return this._ticks},mergeTicksOptions:function(){var t=this.options.ticks;!1===t.minor&&(t.minor={display:!1}),!1===t.major&&(t.major={display:!1});for(var e in t)"major"!==e&&"minor"!==e&&(void 0===t.minor[e]&&(t.minor[e]=t[e]),void 0===t.major[e]&&(t.major[e]=t[e]))},beforeUpdate:function(){s.callback(this.options.beforeUpdate,[this])},update:function(t,e,i){var n,o,a,r,l,d,u=this;for(u.beforeUpdate(),u.maxWidth=t,u.maxHeight=e,u.margins=s.extend({left:0,right:0,top:0,bottom:0},i),u.longestTextCache=u.longestTextCache||{},u.beforeSetDimensions(),u.setDimensions(),u.afterSetDimensions(),u.beforeDataLimits(),u.determineDataLimits(),u.afterDataLimits(),u.beforeBuildTicks(),l=u.buildTicks()||[],u.afterBuildTicks(),u.beforeTickToLabelConversion(),a=u.convertTicksToLabels(l)||u.ticks,u.afterTickToLabelConversion(),u.ticks=a,n=0,o=a.length;n<o;++n)r=a[n],d=l[n],d?d.label=r:l.push(d={label:r,major:!1});return u._ticks=l,u.beforeCalculateTickRotation(),u.calculateTickRotation(),u.afterCalculateTickRotation(),u.beforeFit(),u.fit(),u.afterFit(),u.afterUpdate(),u.minSize},afterUpdate:function(){s.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){s.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0},afterSetDimensions:function(){s.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){s.callback(this.options.beforeDataLimits,[this])},determineDataLimits:s.noop,afterDataLimits:function(){s.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){s.callback(this.options.beforeBuildTicks,[this])},buildTicks:s.noop,afterBuildTicks:function(){s.callback(this.options.afterBuildTicks,[this])},beforeTickToLabelConversion:function(){
|
|
s.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this,e=t.options.ticks;t.ticks=t.ticks.map(e.userCallback||e.callback,this)},afterTickToLabelConversion:function(){s.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){s.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t=this,e=t.ctx,o=t.options.ticks,a=n(t._ticks),r=i(o);e.font=r.font;var l=o.minRotation||0;if(a.length&&t.options.display&&t.isHorizontal())for(var d,u=s.longestText(e,r.font,a,t.longestTextCache),h=u,c=t.getPixelForTick(1)-t.getPixelForTick(0)-6;h>c&&l<o.maxRotation;){var f=s.toRadians(l);if(d=Math.cos(f),Math.sin(f)*u>t.maxHeight){l--;break}l++,h=d*u}t.labelRotation=l},afterCalculateTickRotation:function(){s.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){s.callback(this.options.beforeFit,[this])},fit:function(){var t=this,o=t.minSize={width:0,height:0},a=n(t._ticks),r=t.options,d=r.ticks,u=r.scaleLabel,h=r.gridLines,c=r.display,f=t.isHorizontal(),p=i(d),g=r.gridLines.tickMarkLength;if(o.width=f?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:c&&h.drawTicks?g:0,o.height=f?c&&h.drawTicks?g:0:t.maxHeight,u.display&&c){var m=l(u),v=s.options.toPadding(u.padding),b=m+v.height;f?o.height+=b:o.width+=b}if(d.display&&c){var y=s.longestText(t.ctx,p.font,a,t.longestTextCache),x=s.numberOfLabelLines(a),w=.5*p.size,k=t.options.ticks.padding;if(f){t.longestLabelWidth=y;var _=s.toRadians(t.labelRotation),C=Math.cos(_),D=Math.sin(_),M=D*y+p.size*x+w*(x-1)+w;o.height=Math.min(t.maxHeight,o.height+M+k),t.ctx.font=p.font;var S=e(t.ctx,a[0],p.font),T=e(t.ctx,a[a.length-1],p.font);0!==t.labelRotation?(t.paddingLeft="bottom"===r.position?C*S+3:C*w+3,t.paddingRight="bottom"===r.position?C*w+3:C*T+3):(t.paddingLeft=S/2+3,t.paddingRight=T/2+3)}else d.mirror?y=0:y+=k+w,o.width=Math.min(t.maxWidth,o.width+y),t.paddingTop=p.size/2,t.paddingBottom=p.size/2}t.handleMargins(),t.width=o.width,t.height=o.height},handleMargins:function(){var t=this;t.margins&&(t.paddingLeft=Math.max(t.paddingLeft-t.margins.left,0),t.paddingTop=Math.max(t.paddingTop-t.margins.top,0),t.paddingRight=Math.max(t.paddingRight-t.margins.right,0),t.paddingBottom=Math.max(t.paddingBottom-t.margins.bottom,0))},afterFit:function(){s.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(s.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:s.noop,getPixelForValue:s.noop,getValueForPixel:s.noop,getPixelForTick:function(t){var e=this,i=e.options.offset;if(e.isHorizontal()){var n=e.width-(e.paddingLeft+e.paddingRight),o=n/Math.max(e._ticks.length-(i?0:1),1),a=o*t+e.paddingLeft;i&&(a+=o/2);var r=e.left+Math.round(a);return r+=e.isFullWidth()?e.margins.left:0}var s=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(s/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var i=e.width-(e.paddingLeft+e.paddingRight),n=i*t+e.paddingLeft,o=e.left+Math.round(n);return o+=e.isFullWidth()?e.margins.left:0}return e.top+t*e.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this,e=t.min,i=t.max;return t.beginAtZero?0:e<0&&i<0?i:e>0&&i>0?e:0},_autoSkip:function(t){var e,i,n,o,a,r=this,l=r.isHorizontal(),d=r.options.ticks.minor,u=t.length,h=s.toRadians(r.labelRotation),c=Math.cos(h),f=r.longestLabelWidth*c,p=[];for(d.maxTicksLimit&&(a=d.maxTicksLimit),l&&(e=!1,(f+d.autoSkipPadding)*u>r.width-(r.paddingLeft+r.paddingRight)&&(e=1+Math.floor((f+d.autoSkipPadding)*u/(r.width-(r.paddingLeft+r.paddingRight)))),a&&u>a&&(e=Math.max(e,Math.floor(u/a)))),i=0;i<u;i++)n=t[i],o=e>1&&i%e>0||i%e==0&&i+e>=u,o&&i!==u-1&&delete n.label,p.push(n);return p},draw:function(t){var e=this,n=e.options;if(n.display){var r=e.ctx,d=a.global,u=n.ticks.minor,h=n.ticks.major||u,c=n.gridLines,f=n.scaleLabel,p=0!==e.labelRotation,g=e.isHorizontal(),m=u.autoSkip?e._autoSkip(e.getTicks()):e.getTicks(),v=s.valueOrDefault(u.fontColor,d.defaultFontColor),b=i(u),y=s.valueOrDefault(h.fontColor,d.defaultFontColor),x=i(h),w=c.drawTicks?c.tickMarkLength:0,k=s.valueOrDefault(f.fontColor,d.defaultFontColor),_=i(f),C=s.options.toPadding(f.padding),D=s.toRadians(e.labelRotation),M=[],S=e.options.gridLines.lineWidth,T="right"===n.position?e.right:e.right-S-w,F="right"===n.position?e.right+w:e.right,A="bottom"===n.position?e.top+S:e.bottom-w-S,I="bottom"===n.position?e.top+S+w:e.bottom+S;if(s.each(m,function(i,a){if(!s.isNullOrUndef(i.label)){var r,l,h,f,v=i.label;a===e.zeroLineIndex&&n.offset===c.offsetGridLines?(r=c.zeroLineWidth,l=c.zeroLineColor,h=c.zeroLineBorderDash,f=c.zeroLineBorderDashOffset):(r=s.valueAtIndexOrDefault(c.lineWidth,a),l=s.valueAtIndexOrDefault(c.color,a),h=s.valueOrDefault(c.borderDash,d.borderDash),f=s.valueOrDefault(c.borderDashOffset,d.borderDashOffset));var b,y,x,k,_,C,P,O,E,L,R="middle",B="middle",V=u.padding;if(g){var U=w+V;"bottom"===n.position?(B=p?"middle":"top",R=p?"right":"center",L=e.top+U):(B=p?"middle":"bottom",R=p?"left":"center",L=e.bottom-U);var z=o(e,a,c.offsetGridLines&&m.length>1);z<e.left&&(l="rgba(0,0,0,0)"),z+=s.aliasPixel(r),E=e.getPixelForTick(a)+u.labelOffset,b=x=_=P=z,y=A,k=I,C=t.top,O=t.bottom+S}else{var N,W="left"===n.position;u.mirror?(R=W?"left":"right",N=V):(R=W?"right":"left",N=w+V),E=W?e.right-N:e.left+N;var H=o(e,a,c.offsetGridLines&&m.length>1);H<e.top&&(l="rgba(0,0,0,0)"),H+=s.aliasPixel(r),L=e.getPixelForTick(a)+u.labelOffset,b=T,x=F,_=t.left,P=t.right+S,y=k=C=O=H}M.push({tx1:b,ty1:y,tx2:x,ty2:k,x1:_,y1:C,x2:P,y2:O,labelX:E,labelY:L,glWidth:r,glColor:l,glBorderDash:h,glBorderDashOffset:f,rotation:-1*D,label:v,major:i.major,textBaseline:B,textAlign:R})}}),s.each(M,function(t){if(c.display&&(r.save(),r.lineWidth=t.glWidth,r.strokeStyle=t.glColor,r.setLineDash&&(r.setLineDash(t.glBorderDash),r.lineDashOffset=t.glBorderDashOffset),r.beginPath(),c.drawTicks&&(r.moveTo(t.tx1,t.ty1),r.lineTo(t.tx2,t.ty2)),c.drawOnChartArea&&(r.moveTo(t.x1,t.y1),r.lineTo(t.x2,t.y2)),r.stroke(),r.restore()),u.display){r.save(),r.translate(t.labelX,t.labelY),r.rotate(t.rotation),r.font=t.major?x.font:b.font,r.fillStyle=t.major?y:v,r.textBaseline=t.textBaseline,r.textAlign=t.textAlign;var i=t.label;if(s.isArray(i))for(var n=i.length,o=1.5*b.size,a=e.isHorizontal()?0:-o*(n-1)/2,l=0;l<n;++l)r.fillText(""+i[l],0,a),a+=o;else r.fillText(i,0,0);r.restore()}}),f.display){var P,O,E=0,L=l(f)/2;if(g)P=e.left+(e.right-e.left)/2,O="bottom"===n.position?e.bottom-L-C.bottom:e.top+L+C.top;else{var R="left"===n.position;P=R?e.left+L+C.top:e.right-L-C.top,O=e.top+(e.bottom-e.top)/2,E=R?-.5*Math.PI:.5*Math.PI}r.save(),r.translate(P,O),r.rotate(E),r.textAlign="center",r.textBaseline="middle",r.fillStyle=k,r.font=_.font,r.fillText(f.labelString,0,0),r.restore()}if(c.drawBorder){r.lineWidth=s.valueAtIndexOrDefault(c.lineWidth,0),r.strokeStyle=s.valueAtIndexOrDefault(c.color,0);var B=e.left,V=e.right+S,U=e.top,z=e.bottom+S,N=s.aliasPixel(r.lineWidth);g?(U=z="top"===n.position?e.bottom:e.top,U+=N,z+=N):(B=V="left"===n.position?e.right:e.left,B+=N,V+=N),r.beginPath(),r.moveTo(B,U),r.lineTo(V,z),r.stroke()}}}})}},{25:25,26:26,34:34,45:45}],33:[function(t,e,i){"use strict";var n=t(25),o=t(45),a=t(30);e.exports=function(t){t.scaleService={constructors:{},defaults:{},registerScaleType:function(t,e,i){this.constructors[t]=e,this.defaults[t]=o.clone(i)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(t){return this.defaults.hasOwnProperty(t)?o.merge({},[n.scale,this.defaults[t]]):{}},updateScaleDefaults:function(t,e){var i=this;i.defaults.hasOwnProperty(t)&&(i.defaults[t]=o.extend(i.defaults[t],e))},addScalesToLayout:function(t){o.each(t.scales,function(e){e.fullWidth=e.options.fullWidth,e.position=e.options.position,e.weight=e.options.weight,a.addBox(t,e)})}}}},{25:25,30:30,45:45}],34:[function(t,e,i){"use strict";var n=t(45);e.exports={formatters:{values:function(t){return n.isArray(t)?t:""+t},linear:function(t,e,i){var o=i.length>3?i[2]-i[1]:i[1]-i[0];Math.abs(o)>1&&t!==Math.floor(t)&&(o=t-Math.floor(t));var a=n.log10(Math.abs(o)),r="";if(0!==t){var s=-1*Math.floor(a);s=Math.max(Math.min(s,20),0),r=t.toFixed(s)}else r="0";return r},logarithmic:function(t,e,i){var o=t/Math.pow(10,Math.floor(n.log10(t)));return 0===t?"0":1===o||2===o||5===o||0===e||e===i.length-1?t.toExponential():""}}}},{45:45}],35:[function(t,e,i){"use strict";var n=t(25),o=t(26),a=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:a.noop,title:function(t,e){var i="",n=e.labels,o=n?n.length:0;if(t.length>0){var a=t[0];a.xLabel?i=a.xLabel:o>0&&a.index<o&&(i=n[a.index])}return i},afterTitle:a.noop,beforeBody:a.noop,beforeLabel:a.noop,label:function(t,e){var i=e.datasets[t.datasetIndex].label||"";return i&&(i+=": "),i+=t.yLabel},labelColor:function(t,e){var i=e.getDatasetMeta(t.datasetIndex),n=i.data[t.index],o=n._view;return{borderColor:o.borderColor,backgroundColor:o.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:a.noop,afterBody:a.noop,beforeFooter:a.noop,footer:a.noop,afterFooter:a.noop}}}),e.exports=function(t){function e(t,e){var i=a.color(t);return i.alpha(e*i.alpha()).rgbaString()}function i(t,e){return e&&(a.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function r(t){var e=t._xScale,i=t._yScale||t._scale,n=t._index,o=t._datasetIndex;return{xLabel:e?e.getLabelForIndex(n,o):"",yLabel:i?i.getLabelForIndex(n,o):"",index:n,datasetIndex:o,x:t._model.x,y:t._model.y}}function s(t){var e=n.global,i=a.valueOrDefault;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,bodyFontColor:t.bodyFontColor,_bodyFontFamily:i(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:i(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:i(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:i(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:i(t.titleFontStyle,e.defaultFontStyle),titleFontSize:i(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:i(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:i(t.footerFontStyle,e.defaultFontStyle),footerFontSize:i(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function l(t,e){var i=t._chart.ctx,n=2*e.yPadding,o=0,r=e.body,s=r.reduce(function(t,e){return t+e.before.length+e.lines.length+e.after.length},0);s+=e.beforeBody.length+e.afterBody.length;var l=e.title.length,d=e.footer.length,u=e.titleFontSize,h=e.bodyFontSize,c=e.footerFontSize;n+=l*u,n+=l?(l-1)*e.titleSpacing:0,n+=l?e.titleMarginBottom:0,n+=s*h,n+=s?(s-1)*e.bodySpacing:0,n+=d?e.footerMarginTop:0,n+=d*c,n+=d?(d-1)*e.footerSpacing:0;var f=0,p=function(t){o=Math.max(o,i.measureText(t).width+f)};return i.font=a.fontString(u,e._titleFontStyle,e._titleFontFamily),a.each(e.title,p),i.font=a.fontString(h,e._bodyFontStyle,e._bodyFontFamily),a.each(e.beforeBody.concat(e.afterBody),p),f=e.displayColors?h+2:0,a.each(r,function(t){a.each(t.before,p),a.each(t.lines,p),a.each(t.after,p)}),f=0,i.font=a.fontString(c,e._footerFontStyle,e._footerFontFamily),a.each(e.footer,p),o+=2*e.xPadding,{width:o,height:n}}function d(t,e){var i=t._model,n=t._chart,o=t._chart.chartArea,a="center",r="center";i.y<e.height?r="top":i.y>n.height-e.height&&(r="bottom");var s,l,d,u,h,c=(o.left+o.right)/2,f=(o.top+o.bottom)/2;"center"===r?(s=function(t){return t<=c},l=function(t){return t>c}):(s=function(t){return t<=e.width/2},l=function(t){return t>=n.width-e.width/2}),d=function(t){return t+e.width+i.caretSize+i.caretPadding>n.width},u=function(t){return t-e.width-i.caretSize-i.caretPadding<0},h=function(t){return t<=f?"top":"bottom"},s(i.x)?(a="left",d(i.x)&&(a="center",r=h(i.y))):l(i.x)&&(a="right",u(i.x)&&(a="center",r=h(i.y)));var p=t._options;return{xAlign:p.xAlign?p.xAlign:a,yAlign:p.yAlign?p.yAlign:r}}function u(t,e,i,n){var o=t.x,a=t.y,r=t.caretSize,s=t.caretPadding,l=t.cornerRadius,d=i.xAlign,u=i.yAlign,h=r+s,c=l+s;return"right"===d?o-=e.width:"center"===d&&(o-=e.width/2,o+e.width>n.width&&(o=n.width-e.width),o<0&&(o=0)),"top"===u?a+=h:a-="bottom"===u?e.height+h:e.height/2,"center"===u?"left"===d?o+=h:"right"===d&&(o-=h):"left"===d?o-=c:"right"===d&&(o+=c),{x:o,y:a}}t.Tooltip=o.extend({initialize:function(){this._model=s(this._options),this._lastActive=[]},getTitle:function(){var t=this,e=t._options,n=e.callbacks,o=n.beforeTitle.apply(t,arguments),a=n.title.apply(t,arguments),r=n.afterTitle.apply(t,arguments),s=[];return s=i(s,o),s=i(s,a),s=i(s,r)},getBeforeBody:function(){var t=this._options.callbacks.beforeBody.apply(this,arguments);return a.isArray(t)?t:void 0!==t?[t]:[]},getBody:function(t,e){var n=this,o=n._options.callbacks,r=[];return a.each(t,function(t){var a={before:[],lines:[],after:[]};i(a.before,o.beforeLabel.call(n,t,e)),i(a.lines,o.label.call(n,t,e)),i(a.after,o.afterLabel.call(n,t,e)),r.push(a)}),r},getAfterBody:function(){var t=this._options.callbacks.afterBody.apply(this,arguments);return a.isArray(t)?t:void 0!==t?[t]:[]},getFooter:function(){var t=this,e=t._options.callbacks,n=e.beforeFooter.apply(t,arguments),o=e.footer.apply(t,arguments),a=e.afterFooter.apply(t,arguments),r=[];return r=i(r,n),r=i(r,o),r=i(r,a)},update:function(e){var i,n,o=this,h=o._options,c=o._model,f=o._model=s(h),p=o._active,g=o._data,m={xAlign:c.xAlign,yAlign:c.yAlign},v={x:c.x,y:c.y},b={width:c.width,height:c.height},y={x:c.caretX,y:c.caretY};if(p.length){f.opacity=1;var x=[],w=[];y=t.Tooltip.positioners[h.position].call(o,p,o._eventPosition);var k=[];for(i=0,n=p.length;i<n;++i)k.push(r(p[i]));h.filter&&(k=k.filter(function(t){return h.filter(t,g)})),h.itemSort&&(k=k.sort(function(t,e){return h.itemSort(t,e,g)})),a.each(k,function(t){x.push(h.callbacks.labelColor.call(o,t,o._chart)),w.push(h.callbacks.labelTextColor.call(o,t,o._chart))}),f.title=o.getTitle(k,g),f.beforeBody=o.getBeforeBody(k,g),f.body=o.getBody(k,g),f.afterBody=o.getAfterBody(k,g),f.footer=o.getFooter(k,g),f.x=Math.round(y.x),f.y=Math.round(y.y),f.caretPadding=h.caretPadding,f.labelColors=x,f.labelTextColors=w,f.dataPoints=k,b=l(this,f),m=d(this,b),v=u(f,b,m,o._chart)}else f.opacity=0;return f.xAlign=m.xAlign,f.yAlign=m.yAlign,f.x=v.x,f.y=v.y,f.width=b.width,f.height=b.height,f.caretX=y.x,f.caretY=y.y,o._model=f,e&&h.custom&&h.custom.call(o,f),o},drawCaret:function(t,e){var i=this._chart.ctx,n=this._view,o=this.getCaretPosition(t,e,n);i.lineTo(o.x1,o.y1),i.lineTo(o.x2,o.y2),i.lineTo(o.x3,o.y3)},getCaretPosition:function(t,e,i){var n,o,a,r,s,l,d=i.caretSize,u=i.cornerRadius,h=i.xAlign,c=i.yAlign,f=t.x,p=t.y,g=e.width,m=e.height;if("center"===c)s=p+m/2,"left"===h?(n=f,o=n-d,a=n,r=s+d,l=s-d):(n=f+g,o=n+d,a=n,r=s-d,l=s+d);else if("left"===h?(o=f+u+d,n=o-d,a=o+d):"right"===h?(o=f+g-u-d,n=o-d,a=o+d):(o=i.caretX,n=o-d,a=o+d),"top"===c)r=p,s=r-d,l=r;else{r=p+m,s=r+d,l=r;var v=a;a=n,n=v}return{x1:n,x2:o,x3:a,y1:r,y2:s,y3:l}},drawTitle:function(t,i,n,o){var r=i.title;if(r.length){n.textAlign=i._titleAlign,n.textBaseline="top";var s=i.titleFontSize,l=i.titleSpacing;n.fillStyle=e(i.titleFontColor,o),n.font=a.fontString(s,i._titleFontStyle,i._titleFontFamily);var d,u;for(d=0,u=r.length;d<u;++d)n.fillText(r[d],t.x,t.y),t.y+=s+l,d+1===r.length&&(t.y+=i.titleMarginBottom-l)}},drawBody:function(t,i,n,o){var r=i.bodyFontSize,s=i.bodySpacing,l=i.body;n.textAlign=i._bodyAlign,n.textBaseline="top",n.font=a.fontString(r,i._bodyFontStyle,i._bodyFontFamily);var d=0,u=function(e){n.fillText(e,t.x+d,t.y),t.y+=r+s};n.fillStyle=e(i.bodyFontColor,o),a.each(i.beforeBody,u);var h=i.displayColors;d=h?r+2:0,a.each(l,function(s,l){var d=e(i.labelTextColors[l],o);n.fillStyle=d,a.each(s.before,u),a.each(s.lines,function(a){h&&(n.fillStyle=e(i.legendColorBackground,o),n.fillRect(t.x,t.y,r,r),n.lineWidth=1,n.strokeStyle=e(i.labelColors[l].borderColor,o),n.strokeRect(t.x,t.y,r,r),n.fillStyle=e(i.labelColors[l].backgroundColor,o),n.fillRect(t.x+1,t.y+1,r-2,r-2),n.fillStyle=d),u(a)}),a.each(s.after,u)}),d=0,a.each(i.afterBody,u),t.y-=s},drawFooter:function(t,i,n,o){var r=i.footer;r.length&&(t.y+=i.footerMarginTop,n.textAlign=i._footerAlign,n.textBaseline="top",n.fillStyle=e(i.footerFontColor,o),n.font=a.fontString(i.footerFontSize,i._footerFontStyle,i._footerFontFamily),a.each(r,function(e){n.fillText(e,t.x,t.y),t.y+=i.footerFontSize+i.footerSpacing}))},drawBackground:function(t,i,n,o,a){n.fillStyle=e(i.backgroundColor,a),n.strokeStyle=e(i.borderColor,a),n.lineWidth=i.borderWidth;var r=i.xAlign,s=i.yAlign,l=t.x,d=t.y,u=o.width,h=o.height,c=i.cornerRadius;n.beginPath(),n.moveTo(l+c,d),"top"===s&&this.drawCaret(t,o),n.lineTo(l+u-c,d),n.quadraticCurveTo(l+u,d,l+u,d+c),"center"===s&&"right"===r&&this.drawCaret(t,o),n.lineTo(l+u,d+h-c),n.quadraticCurveTo(l+u,d+h,l+u-c,d+h),"bottom"===s&&this.drawCaret(t,o),n.lineTo(l+c,d+h),n.quadraticCurveTo(l,d+h,l,d+h-c),"center"===s&&"left"===r&&this.drawCaret(t,o),n.lineTo(l,d+c),n.quadraticCurveTo(l,d,l+c,d),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var i={width:e.width,height:e.height},n={x:e.x,y:e.y},o=Math.abs(e.opacity<.001)?0:e.opacity,a=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&a&&(this.drawBackground(n,e,t,i,o),n.x+=e.xPadding,n.y+=e.yPadding,this.drawTitle(n,e,t,o),this.drawBody(n,e,t,o),this.drawFooter(n,e,t,o))}},handleEvent:function(t){var e=this,i=e._options,n=!1;return e._lastActive=e._lastActive||[],"mouseout"===t.type?e._active=[]:e._active=e._chart.getElementsAtEventForMode(t,i.mode,i),n=!a.arrayEquals(e._active,e._lastActive),n&&(e._lastActive=e._active,(i.enabled||i.custom)&&(e._eventPosition={x:t.x,y:t.y},e.update(!0),e.pivot())),n}}),t.Tooltip.positioners={average:function(t){if(!t.length)return!1;var e,i,n=0,o=0,a=0;for(e=0,i=t.length;e<i;++e){var r=t[e];if(r&&r.hasValue()){var s=r.tooltipPosition();n+=s.x,o+=s.y,++a}}return{x:Math.round(n/a),y:Math.round(o/a)}},nearest:function(t,e){var i,n,o,r=e.x,s=e.y,l=Number.POSITIVE_INFINITY;for(i=0,n=t.length;i<n;++i){var d=t[i];if(d&&d.hasValue()){var u=d.getCenterPoint(),h=a.distanceBetweenPoints(e,u);h<l&&(l=h,o=d)}}if(o){var c=o.tooltipPosition();r=c.x,s=c.y}return{x:r,y:s}}}}},{25:25,26:26,45:45}],36:[function(t,e,i){"use strict";var n=t(25),o=t(26),a=t(45);n._set("global",{elements:{arc:{backgroundColor:n.global.defaultColor,borderColor:"#fff",borderWidth:2}}}),e.exports=o.extend({inLabelRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hoverRadius,2)},inRange:function(t,e){var i=this._view;if(i){for(var n=a.getAngleFromPoint(i,{x:t,y:e}),o=n.angle,r=n.distance,s=i.startAngle,l=i.endAngle;l<s;)l+=2*Math.PI;for(;o>l;)o-=2*Math.PI;for(;o<s;)o+=2*Math.PI;var d=o>=s&&o<=l,u=r>=i.innerRadius&&r<=i.outerRadius;return d&&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),o=t(26),a=t(45),r=n.global;n._set("global",{elements:{line:{tension:.4,backgroundColor:r.defaultColor,borderWidth:3,borderColor:r.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}}),e.exports=o.extend({draw:function(){var t,e,i,n,o=this,s=o._view,l=o._chart.ctx,d=s.spanGaps,u=o._children.slice(),h=r.elements.line,c=-1;for(o._loop&&u.length&&u.push(u[0]),l.save(),l.lineCap=s.borderCapStyle||h.borderCapStyle,l.setLineDash&&l.setLineDash(s.borderDash||h.borderDash),l.lineDashOffset=s.borderDashOffset||h.borderDashOffset,l.lineJoin=s.borderJoinStyle||h.borderJoinStyle,l.lineWidth=s.borderWidth||h.borderWidth,l.strokeStyle=s.borderColor||r.defaultColor,l.beginPath(),c=-1,t=0;t<u.length;++t)e=u[t],i=a.previousItem(u,t),n=e._view,0===t?n.skip||(l.moveTo(n.x,n.y),c=t):(i=-1===c?i:u[c],n.skip||(c!==t-1&&!d||-1===c?l.moveTo(n.x,n.y):a.canvas.lineTo(l,i._view,e._view),c=t));l.stroke(),l.restore()}})},{25:25,26:26,45:45}],38:[function(t,e,i){"use strict";function n(t){var e=this._view;return!!e&&Math.abs(t-e.x)<e.radius+e.hitRadius}function o(t){var e=this._view;return!!e&&Math.abs(t-e.y)<e.radius+e.hitRadius}var a=t(25),r=t(26),s=t(45),l=a.global.defaultColor;a._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:l,borderColor:l,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}}),e.exports=r.extend({inRange:function(t,e){var i=this._view;return!!i&&Math.pow(t-i.x,2)+Math.pow(e-i.y,2)<Math.pow(i.hitRadius+i.radius,2)},inLabelRange:n,inXRange:n,inYRange:o,getCenterPoint:function(){var t=this._view;return{x:t.x,y:t.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y,padding:t.radius+t.borderWidth}},draw:function(t){var e=this._view,i=this._model,n=this._chart.ctx,o=e.pointStyle,r=e.radius,d=e.x,u=e.y,h=s.color,c=0;e.skip||(n.strokeStyle=e.borderColor||l,n.lineWidth=s.valueOrDefault(e.borderWidth,a.global.elements.point.borderWidth),n.fillStyle=e.backgroundColor||l,void 0!==t&&(i.x<t.left||1.01*t.right<i.x||i.y<t.top||1.01*t.bottom<i.y)&&(i.x<t.left?c=(d-i.x)/(t.left-i.x):1.01*t.right<i.x?c=(i.x-d)/(i.x-t.right):i.y<t.top?c=(u-i.y)/(t.top-i.y):1.01*t.bottom<i.y&&(c=(i.y-u)/(i.y-t.bottom)),c=Math.round(100*c)/100,n.strokeStyle=h(n.strokeStyle).alpha(c).rgbString(),n.fillStyle=h(n.fillStyle).alpha(c).rgbString()),s.canvas.drawPoint(n,o,r,d,u))}})},{25:25,26:26,45:45}],39:[function(t,e,i){"use strict";function n(t){return void 0!==t._view.width}function o(t){var e,i,o,a,r=t._view;if(n(t)){var s=r.width/2;e=r.x-s,i=r.x+s,o=Math.min(r.y,r.base),a=Math.max(r.y,r.base)}else{var l=r.height/2;e=Math.min(r.x,r.base),i=Math.max(r.x,r.base),o=r.y-l,a=r.y+l}return{left:e,top:o,right:i,bottom:a}}var a=t(25),r=t(26);a._set("global",{elements:{rectangle:{backgroundColor:a.global.defaultColor,borderColor:a.global.defaultColor,borderSkipped:"bottom",borderWidth:0}}}),e.exports=r.extend({draw:function(){function t(t){return v[(y+t)%4]}var e,i,n,o,a,r,s,l=this._chart.ctx,d=this._view,u=d.borderWidth;if(d.horizontal?(e=d.base,i=d.x,n=d.y-d.height/2,o=d.y+d.height/2,a=i>e?1:-1,r=1,s=d.borderSkipped||"left"):(e=d.x-d.width/2,i=d.x+d.width/2,n=d.y,o=d.base,a=1,r=o>n?1:-1,s=d.borderSkipped||"bottom"),u){var h=Math.min(Math.abs(e-i),Math.abs(n-o));u=u>h?h:u;var c=u/2,f=e+("left"!==s?c*a:0),p=i+("right"!==s?-c*a:0),g=n+("top"!==s?c*r:0),m=o+("bottom"!==s?-c*r:0);f!==p&&(n=g,o=m),g!==m&&(e=f,i=p)}l.beginPath(),l.fillStyle=d.backgroundColor,l.strokeStyle=d.borderColor,l.lineWidth=u;var v=[[e,o],[e,n],[i,n],[i,o]],b=["bottom","left","top","right"],y=b.indexOf(s,0);-1===y&&(y=0);var x=t(0);l.moveTo(x[0],x[1]);for(var w=1;w<4;w++)x=t(w),l.lineTo(x[0],x[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=o(this);i=t>=n.left&&t<=n.right&&e>=n.top&&e<=n.bottom}return i},inLabelRange:function(t,e){var i=this;if(!i._view)return!1;var a=o(i);return n(i)?t>=a.left&&t<=a.right:e>=a.top&&e<=a.bottom},inXRange:function(t){var e=o(this);return t>=e.left&&t<=e.right},inYRange:function(t){var e=o(this);return t>=e.top&&t<=e.bottom},getCenterPoint:function(){var t,e,i=this._view;return n(this)?(t=i.x,e=(i.y+i.base)/2):(t=(i.x+i.base)/2,e=i.y),{x:t,y:e}},getArea:function(){var t=this._view;return t.width*Math.abs(t.y-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}})},{25:25,26:26}],40:[function(t,e,i){"use strict";e.exports={},e.exports.Arc=t(36),e.exports.Line=t(37),e.exports.Point=t(38),e.exports.Rectangle=t(39)},{36:36,37:37,38:38,39:39}],41:[function(t,e,i){"use strict";var n=t(42),i=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,i,n,o,a){if(a){var r=Math.min(a,n/2),s=Math.min(a,o/2);t.moveTo(e+r,i),t.lineTo(e+n-r,i),t.quadraticCurveTo(e+n,i,e+n,i+s),t.lineTo(e+n,i+o-s),t.quadraticCurveTo(e+n,i+o,e+n-r,i+o),t.lineTo(e+r,i+o),t.quadraticCurveTo(e,i+o,e,i+o-s),t.lineTo(e,i+s),t.quadraticCurveTo(e,i,e+r,i)}else t.rect(e,i,n,o)},drawPoint:function(t,e,i,n,o){var a,r,s,l,d,u;if(e&&"object"==typeof e&&("[object HTMLImageElement]"===(a=e.toString())||"[object HTMLCanvasElement]"===a))return void t.drawImage(e,n-e.width/2,o-e.height/2,e.width,e.height);if(!(isNaN(i)||i<=0)){switch(e){default:t.beginPath(),t.arc(n,o,i,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),r=3*i/Math.sqrt(3),d=r*Math.sqrt(3)/2,t.moveTo(n-r/2,o+d/3),t.lineTo(n+r/2,o+d/3),t.lineTo(n,o-2*d/3),t.closePath(),t.fill();break;case"rect":u=1/Math.SQRT2*i,t.beginPath(),t.fillRect(n-u,o-u,2*u,2*u),t.strokeRect(n-u,o-u,2*u,2*u);break;case"rectRounded":var h=i/Math.SQRT2,c=n-h,f=o-h,p=Math.SQRT2*i;t.beginPath(),this.roundedRect(t,c,f,p,p,i/2),t.closePath(),t.fill();break;case"rectRot":u=1/Math.SQRT2*i,t.beginPath(),t.moveTo(n-u,o),t.lineTo(n,o+u),t.lineTo(n+u,o),t.lineTo(n,o-u),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(n,o+i),t.lineTo(n,o-i),t.moveTo(n-i,o),t.lineTo(n+i,o),t.closePath();break;case"crossRot":t.beginPath(),s=Math.cos(Math.PI/4)*i,l=Math.sin(Math.PI/4)*i,t.moveTo(n-s,o-l),t.lineTo(n+s,o+l),t.moveTo(n-s,o+l),t.lineTo(n+s,o-l),t.closePath();break;case"star":t.beginPath(),t.moveTo(n,o+i),t.lineTo(n,o-i),t.moveTo(n-i,o),t.lineTo(n+i,o),s=Math.cos(Math.PI/4)*i,l=Math.sin(Math.PI/4)*i,t.moveTo(n-s,o-l),t.lineTo(n+s,o+l),t.moveTo(n-s,o+l),t.lineTo(n+s,o-l),t.closePath();break;case"line":t.beginPath(),t.moveTo(n-i,o),t.lineTo(n+i,o),t.closePath();break;case"dash":t.beginPath(),t.moveTo(n,o),t.lineTo(n+i,o),t.closePath()}t.stroke()}},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,i,n){return i.steppedLine?("after"===i.steppedLine&&!n||"after"!==i.steppedLine&&n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y),void t.lineTo(i.x,i.y)):i.tension?void t.bezierCurveTo(n?e.controlPointPreviousX:e.controlPointNextX,n?e.controlPointPreviousY:e.controlPointNextY,n?i.controlPointNextX:i.controlPointPreviousX,n?i.controlPointNextY:i.controlPointPreviousY,i.x,i.y):void t.lineTo(i.x,i.y)}};n.clear=i.clear,n.drawRoundedRectangle=function(t){t.beginPath(),i.roundedRect.apply(i,arguments),t.closePath()}},{42:42}],42:[function(t,e,i){"use strict";var n={noop:function(){},uid:function(){var t=0;return function(){return t++}}(),isNullOrUndef:function(t){return null===t||void 0===t},isArray:Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,i){return n.valueOrDefault(n.isArray(t)?t[e]:t,i)},callback:function(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)},each:function(t,e,i,o){var a,r,s;if(n.isArray(t))if(r=t.length,o)for(a=r-1;a>=0;a--)e.call(i,t[a],a);else for(a=0;a<r;a++)e.call(i,t[a],a);else if(n.isObject(t))for(s=Object.keys(t),r=s.length,a=0;a<r;a++)e.call(i,t[s[a]],s[a])},arrayEquals:function(t,e){var i,o,a,r;if(!t||!e||t.length!==e.length)return!1;for(i=0,o=t.length;i<o;++i)if(a=t[i],r=e[i],a instanceof Array&&r instanceof Array){if(!n.arrayEquals(a,r))return!1}else if(a!==r)return!1;return!0},clone:function(t){if(n.isArray(t))return t.map(n.clone);if(n.isObject(t)){for(var e={},i=Object.keys(t),o=i.length,a=0;a<o;++a)e[i[a]]=n.clone(t[i[a]]);return e}return t},_merger:function(t,e,i,o){var a=e[t],r=i[t];n.isObject(a)&&n.isObject(r)?n.merge(a,r,o):e[t]=n.clone(r)},_mergerIf:function(t,e,i){var o=e[t],a=i[t];n.isObject(o)&&n.isObject(a)?n.mergeIf(o,a):e.hasOwnProperty(t)||(e[t]=n.clone(a))},merge:function(t,e,i){var o,a,r,s,l,d=n.isArray(e)?e:[e],u=d.length;if(!n.isObject(t))return t;for(i=i||{},o=i.merger||n._merger,a=0;a<u;++a)if(e=d[a],n.isObject(e))for(r=Object.keys(e),l=0,s=r.length;l<s;++l)o(r[l],t,e,i);return t},mergeIf:function(t,e){return n.merge(t,e,{merger:n._mergerIf})},extend:function(t){for(var e=function(e,i){t[i]=e},i=1,o=arguments.length;i<o;++i)n.each(arguments[i],e);return t},inherits:function(t){var e=this,i=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},o=function(){this.constructor=i};return o.prototype=e.prototype,i.prototype=new o,i.extend=n.inherits,t&&n.extend(i.prototype,t),i.__super__=e.prototype,i}};e.exports=n,n.callCallback=n.callback,n.indexOf=function(t,e,i){return Array.prototype.indexOf.call(t,e,i)},n.getValueOrDefault=n.valueOrDefault,n.getValueAtIndexOrDefault=n.valueAtIndexOrDefault},{}],43:[function(t,e,i){"use strict";var n=t(42),o={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return(t-=1)*t*t+1},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-((t-=1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return(t-=1)*t*t*t*t+1},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return 1-Math.cos(t*(Math.PI/2))},easeOutSine:function(t){return Math.sin(t*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInExpo:function(t){return 0===t?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return 1===t?1:1-Math.pow(2,-10*t)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return t>=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){
|
|
return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1===t?1:(i||(i=.3),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i))},easeOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1===t?1:(i||(i=.3),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/i)+1)},easeInOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:2==(t/=.5)?1:(i||(i=.45),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),t<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-o.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*o.easeInBounce(2*t):.5*o.easeOutBounce(2*t-1)+.5}};e.exports={effects:o},n.easingEffects=o},{42:42}],44:[function(t,e,i){"use strict";var n=t(42);e.exports={toLineHeight:function(t,e){var i=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t},toPadding:function(t){var e,i,o,a;return n.isObject(t)?(e=+t.top||0,i=+t.right||0,o=+t.bottom||0,a=+t.left||0):e=i=o=a=+t||0,{top:e,right:i,bottom:o,left:a,height:e+o,width:a+i}},resolve:function(t,e,i){var o,a,r;for(o=0,a=t.length;o<a;++o)if(void 0!==(r=t[o])&&(void 0!==e&&"function"==typeof r&&(r=r(e)),void 0!==i&&n.isArray(r)&&(r=r[i]),void 0!==r))return r}}},{42:42}],45:[function(t,e,i){"use strict";e.exports=t(42),e.exports.easing=t(43),e.exports.canvas=t(41),e.exports.options=t(44)},{41:41,42:42,43:43,44:44}],46:[function(t,e,i){e.exports={acquireContext:function(t){return t&&t.canvas&&(t=t.canvas),t&&t.getContext("2d")||null}}},{}],47:[function(t,e,i){"use strict";function n(t,e){var i=m.getStyle(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?Number(n[1]):void 0}function o(t,e){var i=t.style,o=t.getAttribute("height"),a=t.getAttribute("width");if(t[v]={initial:{height:o,width:a,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",null===a||""===a){var r=n(t,"width");void 0!==r&&(t.width=r)}if(null===o||""===o)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var s=n(t,"height");void 0!==r&&(t.height=s)}return t}function a(t,e,i){t.addEventListener(e,i,C)}function r(t,e,i){t.removeEventListener(e,i,C)}function s(t,e,i,n,o){return{type:t,chart:e,native:o||null,x:void 0!==i?i:null,y:void 0!==n?n:null}}function l(t,e){var i=k[t.type]||t.type,n=m.getRelativePosition(t,e);return s(i,e,n.x,n.y,t)}function d(t,e){var i=!1,n=[];return function(){n=Array.prototype.slice.call(arguments),e=e||this,i||(i=!0,m.requestAnimFrame.call(window,function(){i=!1,t.apply(e,n)}))}}function u(t){var e=document.createElement("div"),i=b+"size-monitor",n="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1;";e.style.cssText=n,e.className=i,e.innerHTML='<div class="'+i+'-expand" style="'+n+'"><div style="position:absolute;width:1000000px;height:1000000px;left:0;top:0"></div></div><div class="'+i+'-shrink" style="'+n+'"><div style="position:absolute;width:200%;height:200%;left:0; top:0"></div></div>';var o=e.childNodes[0],r=e.childNodes[1];e._reset=function(){o.scrollLeft=1e6,o.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6};var s=function(){e._reset(),t()};return a(o,"scroll",s.bind(o,"expand")),a(r,"scroll",s.bind(r,"shrink")),e}function h(t,e){var i=t[v]||(t[v]={}),n=i.renderProxy=function(t){t.animationName===x&&e()};m.each(w,function(e){a(t,e,n)}),i.reflow=!!t.offsetParent,t.classList.add(y)}function c(t){var e=t[v]||{},i=e.renderProxy;i&&(m.each(w,function(e){r(t,e,i)}),delete e.renderProxy),t.classList.remove(y)}function f(t,e,i){var n=t[v]||(t[v]={}),o=n.resizer=u(d(function(){if(n.resizer)return e(s("resize",i))}));h(t,function(){if(n.resizer){var e=t.parentNode;e&&e!==o.parentNode&&e.insertBefore(o,e.firstChild),o._reset()}})}function p(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-",y=b+"render-monitor",x=b+"render-animation",w=["animationstart","webkitAnimationStart"],k={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},_=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}(),C=!!_&&{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 "+x+"{"+t+"}@keyframes "+x+"{"+t+"}."+y+"{-webkit-animation:"+x+" 0.001s;animation:"+x+" 0.001s;}")},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(o(t,e),i):null},releaseContext:function(t){var e=t.canvas;if(e[v]){var i=e[v].initial;["height","width"].forEach(function(t){var n=i[t];m.isNullOrUndef(n)?e.removeAttribute(t):e.setAttribute(t,n)}),m.each(i.style||{},function(t,i){e.style[i]=t}),e.width=e.width,delete e[v]}},addEventListener:function(t,e,i){var n=t.canvas;if("resize"===e)return void f(n,i,t);var o=i[v]||(i[v]={});a(n,e,(o.proxies||(o.proxies={}))[t.id+"_"+e]=function(e){i(l(e,t))})},removeEventListener:function(t,e,i){var n=t.canvas;if("resize"===e)return void p(n);var o=i[v]||{},a=o.proxies||{},s=a[t.id+"_"+e];s&&r(n,e,s)}},m.addEvent=a,m.removeEvent=r},{45:45}],48:[function(t,e,i){"use strict";var n=t(45),o=t(46),a=t(47),r=a._enabled?a:o;e.exports=n.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},r)},{45:45,46:46,47:47}],49:[function(t,e,i){"use strict";e.exports={},e.exports.filler=t(50),e.exports.legend=t(51),e.exports.title=t(52)},{50:50,51:51,52:52}],50:[function(t,e,i){"use strict";function n(t,e,i){var n,o=t._model||{},a=o.fill;if(void 0===a&&(a=!!o.backgroundColor),!1===a||null===a)return!1;if(!0===a)return"origin";if(n=parseFloat(a,10),isFinite(n)&&Math.floor(n)===n)return"-"!==a[0]&&"+"!==a[0]||(n=e+n),!(n===e||n<0||n>=i)&&n;switch(a){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return a;default:return!1}}function o(t){var e,i=t.el._model||{},n=t.el._scale||{},o=t.fill,a=null;if(isFinite(o))return null;if("start"===o?a=void 0===i.scaleBottom?n.bottom:i.scaleBottom:"end"===o?a=void 0===i.scaleTop?n.top:i.scaleTop:void 0!==i.scaleZero?a=i.scaleZero:n.getBasePosition?a=n.getBasePosition():n.getBasePixel&&(a=n.getBasePixel()),void 0!==a&&null!==a){if(void 0!==a.x&&void 0!==a.y)return a;if("number"==typeof a&&isFinite(a))return e=n.isHorizontal(),{x:e?a:null,y:e?null:a}}return null}function a(t,e,i){var n,o=t[e],a=o.fill,r=[e];if(!i)return a;for(;!1!==a&&-1===r.indexOf(a);){if(!isFinite(a))return a;if(!(n=t[a]))return!1;if(n.visible)return a;r.push(a),a=n.fill}return!1}function r(t){var e=t.fill,i="dataset";return!1===e?null:(isFinite(e)||(i="boundary"),f[i](t))}function s(t){return t&&!t.skip}function l(t,e,i,n,o){var a;if(n&&o){for(t.moveTo(e[0].x,e[0].y),a=1;a<n;++a)c.canvas.lineTo(t,e[a-1],e[a]);for(t.lineTo(i[o-1].x,i[o-1].y),a=o-1;a>0;--a)c.canvas.lineTo(t,i[a],i[a-1],!0)}}function d(t,e,i,n,o,a){var r,d,u,h,c,f,p,g=e.length,m=n.spanGaps,v=[],b=[],y=0,x=0;for(t.beginPath(),r=0,d=g+!!a;r<d;++r)u=r%g,h=e[u]._view,c=i(h,u,n),f=s(h),p=s(c),f&&p?(y=v.push(h),x=b.push(c)):y&&x&&(m?(f&&v.push(h),p&&b.push(c)):(l(t,v,b,y,x),y=x=0,v=[],b=[]));l(t,v,b,y,x),t.closePath(),t.fillStyle=o,t.fill()}var u=t(25),h=t(40),c=t(45);u._set("global",{plugins:{filler:{propagate:!0}}});var f={dataset:function(t){var e=t.fill,i=t.chart,n=i.getDatasetMeta(e),o=n&&i.isDatasetVisible(e),a=o&&n.dataset._children||[],r=a.length||0;return r?function(t,e){return e<r&&a[e]._view||null}:null},boundary:function(t){var e=t.boundary,i=e?e.x:null,n=e?e.y:null;return function(t){return{x:null===i?t.x:i,y:null===n?t.y:n}}}};e.exports={id:"filler",afterDatasetsUpdate:function(t,e){var i,s,l,d,u=(t.data.datasets||[]).length,c=e.propagate,f=[];for(s=0;s<u;++s)i=t.getDatasetMeta(s),l=i.dataset,d=null,l&&l._model&&l instanceof h.Line&&(d={visible:t.isDatasetVisible(s),fill:n(l,s,u),chart:t,el:l}),i.$filler=d,f.push(d);for(s=0;s<u;++s)(d=f[s])&&(d.fill=a(f,s,c),d.boundary=o(d),d.mapper=r(d))},beforeDatasetDraw:function(t,e){var i=e.meta.$filler;if(i){var n=t.ctx,o=i.el,a=o._view,r=o._children||[],s=i.mapper,l=a.backgroundColor||u.global.defaultColor;s&&l&&r.length&&(c.canvas.clipArea(n,t.chartArea),d(n,r,s,a,l,o._loop),c.canvas.unclipArea(n))}}}},{25:25,40:40,45:45}],51:[function(t,e,i){"use strict";function n(t,e){return t.usePointStyle?e*Math.SQRT2:t.boxWidth}function o(t,e){var i=new u({ctx:t.ctx,options:e,chart:t});l.configure(t,i,e),l.addBox(t,i),t.legend=i}var a=t(25),r=t(26),s=t(45),l=t(30),d=s.noop;a._set("global",{legend:{display:!0,position:"top",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var i=e.datasetIndex,n=this.chart,o=n.getDatasetMeta(i);o.hidden=null===o.hidden?!n.data.datasets[i].hidden:null,n.update()},onHover:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data;return s.isArray(e.datasets)?e.datasets.map(function(e,i){return{text:e.label,fillStyle:s.isArray(e.backgroundColor)?e.backgroundColor[0]:e.backgroundColor,hidden:!t.isDatasetVisible(i),lineCap:e.borderCapStyle,lineDash:e.borderDash,lineDashOffset:e.borderDashOffset,lineJoin:e.borderJoinStyle,lineWidth:e.borderWidth,strokeStyle:e.borderColor,pointStyle:e.pointStyle,datasetIndex:i}},this):[]}}},legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');for(var i=0;i<t.data.datasets.length;i++)e.push('<li><span style="background-color:'+t.data.datasets[i].backgroundColor+'"></span>'),t.data.datasets[i].label&&e.push(t.data.datasets[i].label),e.push("</li>");return e.push("</ul>"),e.join("")}});var u=r.extend({initialize:function(t){s.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:d,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:d,beforeSetDimensions:d,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:d,beforeBuildLabels:d,buildLabels:function(){var t=this,e=t.options.labels||{},i=s.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:d,beforeFit:d,fit:function(){var t=this,e=t.options,i=e.labels,o=e.display,r=t.ctx,l=a.global,d=s.valueOrDefault,u=d(i.fontSize,l.defaultFontSize),h=d(i.fontStyle,l.defaultFontStyle),c=d(i.fontFamily,l.defaultFontFamily),f=s.fontString(u,h,c),p=t.legendHitBoxes=[],g=t.minSize,m=t.isHorizontal();if(m?(g.width=t.maxWidth,g.height=o?10:0):(g.width=o?10:0,g.height=t.maxHeight),o)if(r.font=f,m){var v=t.lineWidths=[0],b=t.legendItems.length?u+i.padding:0;r.textAlign="left",r.textBaseline="top",s.each(t.legendItems,function(e,o){var a=n(i,u),s=a+u/2+r.measureText(e.text).width;v[v.length-1]+s+i.padding>=t.width&&(b+=u+i.padding,v[v.length]=t.left),p[o]={left:0,top:0,width:s,height:u},v[v.length-1]+=s+i.padding}),g.height+=b}else{var y=i.padding,x=t.columnWidths=[],w=i.padding,k=0,_=0,C=u+y;s.each(t.legendItems,function(t,e){var o=n(i,u),a=o+u/2+r.measureText(t.text).width;_+C>g.height&&(w+=k+i.padding,x.push(k),k=0,_=0),k=Math.max(k,a),_+=C,p[e]={left:0,top:0,width:a,height:u}}),w+=k,x.push(k),g.width+=w}t.width=g.width,t.height=g.height},afterFit:d,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,i=e.labels,o=a.global,r=o.elements.line,l=t.width,d=t.lineWidths;if(e.display){var u,h=t.ctx,c=s.valueOrDefault,f=c(i.fontColor,o.defaultFontColor),p=c(i.fontSize,o.defaultFontSize),g=c(i.fontStyle,o.defaultFontStyle),m=c(i.fontFamily,o.defaultFontFamily),v=s.fontString(p,g,m);h.textAlign="left",h.textBaseline="middle",h.lineWidth=.5,h.strokeStyle=f,h.fillStyle=f,h.font=v;var b=n(i,p),y=t.legendHitBoxes,x=function(t,i,n){if(!(isNaN(b)||b<=0)){h.save(),h.fillStyle=c(n.fillStyle,o.defaultColor),h.lineCap=c(n.lineCap,r.borderCapStyle),h.lineDashOffset=c(n.lineDashOffset,r.borderDashOffset),h.lineJoin=c(n.lineJoin,r.borderJoinStyle),h.lineWidth=c(n.lineWidth,r.borderWidth),h.strokeStyle=c(n.strokeStyle,o.defaultColor);var a=0===c(n.lineWidth,r.borderWidth);if(h.setLineDash&&h.setLineDash(c(n.lineDash,r.borderDash)),e.labels&&e.labels.usePointStyle){var l=p*Math.SQRT2/2,d=l/Math.SQRT2,u=t+d,f=i+d;s.canvas.drawPoint(h,n.pointStyle,l,u,f)}else a||h.strokeRect(t,i,b,p),h.fillRect(t,i,b,p);h.restore()}},w=function(t,e,i,n){var o=p/2,a=b+o+t,r=e+o;h.fillText(i.text,a,r),i.hidden&&(h.beginPath(),h.lineWidth=2,h.moveTo(a,r),h.lineTo(a+n,r),h.stroke())},k=t.isHorizontal();u=k?{x:t.left+(l-d[0])/2,y:t.top+i.padding,line:0}:{x:t.left+i.padding,y:t.top+i.padding,line:0};var _=p+i.padding;s.each(t.legendItems,function(e,n){var o=h.measureText(e.text).width,a=b+p/2+o,r=u.x,s=u.y;k?r+a>=l&&(s=u.y+=_,u.line++,r=u.x=t.left+(l-d[u.line])/2):s+_>t.bottom&&(r=u.x=r+t.columnWidths[u.line]+i.padding,s=u.y=t.top+i.padding,u.line++),x(r,s,e),y[n].left=r,y[n].top=s,w(r,s,e,o),k?u.x+=a+i.padding:u.y+=_})}},handleEvent:function(t){var e=this,i=e.options,n="mouseup"===t.type?"click":t.type,o=!1;if("mousemove"===n){if(!i.onHover)return}else{if("click"!==n)return;if(!i.onClick)return}var a=t.x,r=t.y;if(a>=e.left&&a<=e.right&&r>=e.top&&r<=e.bottom)for(var s=e.legendHitBoxes,l=0;l<s.length;++l){var d=s[l];if(a>=d.left&&a<=d.left+d.width&&r>=d.top&&r<=d.top+d.height){if("click"===n){i.onClick.call(e,t.native,e.legendItems[l]),o=!0;break}if("mousemove"===n){i.onHover.call(e,t.native,e.legendItems[l]),o=!0;break}}}return o}});e.exports={id:"legend",_element:u,beforeInit:function(t){var e=t.options.legend;e&&o(t,e)},beforeUpdate:function(t){var e=t.options.legend,i=t.legend;e?(s.mergeIf(e,a.global.legend),i?(l.configure(t,i,e),i.options=e):o(t,e)):i&&(l.removeBox(t,i),delete t.legend)},afterEvent:function(t,e){var i=t.legend;i&&i.handleEvent(e)}}},{25:25,26:26,30:30,45:45}],52:[function(t,e,i){"use strict";function n(t,e){var i=new d({ctx:t.ctx,options:e,chart:t});s.configure(t,i,e),s.addBox(t,i),t.titleBlock=i}var o=t(25),a=t(26),r=t(45),s=t(30),l=r.noop;o._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}});var d=a.extend({initialize:function(t){var e=this;r.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=r.valueOrDefault,i=t.options,n=i.display,a=e(i.fontSize,o.global.defaultFontSize),s=t.minSize,l=r.isArray(i.text)?i.text.length:1,d=r.options.toLineHeight(i.lineHeight,a),u=n?l*d+2*i.padding:0;t.isHorizontal()?(s.width=t.maxWidth,s.height=u):(s.width=u,s.height=t.maxHeight),t.width=s.width,t.height=s.height},afterFit:l,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,i=r.valueOrDefault,n=t.options,a=o.global;if(n.display){var s,l,d,u=i(n.fontSize,a.defaultFontSize),h=i(n.fontStyle,a.defaultFontStyle),c=i(n.fontFamily,a.defaultFontFamily),f=r.fontString(u,h,c),p=r.options.toLineHeight(n.lineHeight,u),g=p/2+n.padding,m=0,v=t.top,b=t.left,y=t.bottom,x=t.right;e.fillStyle=i(n.fontColor,a.defaultFontColor),e.font=f,t.isHorizontal()?(l=b+(x-b)/2,d=v+g,s=x-b):(l="left"===n.position?b+g:x-g,d=v+(y-v)/2,s=y-v,m=Math.PI*("left"===n.position?-.5:.5)),e.save(),e.translate(l,d),e.rotate(m),e.textAlign="center",e.textBaseline="middle";var w=n.text;if(r.isArray(w))for(var k=0,_=0;_<w.length;++_)e.fillText(w[_],0,k,s),k+=p;else e.fillText(w,0,0,s);e.restore()}}});e.exports={id:"title",_element:d,beforeInit:function(t){var e=t.options.title;e&&n(t,e)},beforeUpdate:function(t){var e=t.options.title,i=t.titleBlock;e?(r.mergeIf(e,o.global.title),i?(s.configure(t,i,e),i.options=e):n(t,e)):i&&(s.removeBox(t,i),delete t.titleBlock)}}},{25:25,26:26,30:30,45:45}],53:[function(t,e,i){"use strict";e.exports=function(t){var e={position:"bottom"},i=t.Scale.extend({getLabels:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels},determineDataLimits:function(){var t=this,e=t.getLabels();t.minIndex=0,t.maxIndex=e.length-1;var i;void 0!==t.options.ticks.min&&(i=e.indexOf(t.options.ticks.min),t.minIndex=-1!==i?i:t.minIndex),void 0!==t.options.ticks.max&&(i=e.indexOf(t.options.ticks.max),t.maxIndex=-1!==i?i:t.maxIndex),t.min=e[t.minIndex],t.max=e[t.maxIndex]},buildTicks:function(){var t=this,e=t.getLabels();t.ticks=0===t.minIndex&&t.maxIndex===e.length-1?e:e.slice(t.minIndex,t.maxIndex+1)},getLabelForIndex:function(t,e){var i=this,n=i.chart.data,o=i.isHorizontal();return n.yLabels&&!o?i.getRightValue(n.datasets[e].data[t]):i.ticks[t-i.minIndex]},getPixelForValue:function(t,e){var i,n=this,o=n.options.offset,a=Math.max(n.maxIndex+1-n.minIndex-(o?0:1),1);if(void 0!==t&&null!==t&&(i=n.isHorizontal()?t.x:t.y),void 0!==i||void 0!==t&&isNaN(e)){var r=n.getLabels();t=i||t;var s=r.indexOf(t);e=-1!==s?s:e}if(n.isHorizontal()){var l=n.width/a,d=l*(e-n.minIndex);return o&&(d+=l/2),n.left+Math.round(d)}var u=n.height/a,h=u*(e-n.minIndex);return o&&(h+=u/2),n.top+Math.round(h)},getPixelForTick:function(t){return this.getPixelForValue(this.ticks[t],t+this.minIndex,null)},getValueForPixel:function(t){var e=this,i=e.options.offset,n=Math.max(e._ticks.length-(i?0:1),1),o=e.isHorizontal(),a=(o?e.width:e.height)/n;return t-=o?e.left:e.top,i&&(t-=a/2),(t<=0?0:Math.round(t/a))+e.minIndex},getBasePixel:function(){return this.bottom}});t.scaleService.registerScaleType("category",i,e)}},{}],54:[function(t,e,i){"use strict";var n=t(25),o=t(45),a=t(34);e.exports=function(t){var e={position:"left",ticks:{callback:a.formatters.linear}},i=t.LinearScaleBase.extend({determineDataLimits:function(){function t(t){return s?t.xAxisID===e.id:t.yAxisID===e.id}var e=this,i=e.options,n=e.chart,a=n.data,r=a.datasets,s=e.isHorizontal();e.min=null,e.max=null;var l=i.stacked;if(void 0===l&&o.each(r,function(e,i){if(!l){var o=n.getDatasetMeta(i);n.isDatasetVisible(i)&&t(o)&&void 0!==o.stack&&(l=!0)}}),i.stacked||l){var d={};o.each(r,function(a,r){var s=n.getDatasetMeta(r),l=[s.type,void 0===i.stacked&&void 0===s.stack?r:"",s.stack].join(".");void 0===d[l]&&(d[l]={positiveValues:[],negativeValues:[]});var u=d[l].positiveValues,h=d[l].negativeValues;n.isDatasetVisible(r)&&t(s)&&o.each(a.data,function(t,n){var o=+e.getRightValue(t);isNaN(o)||s.data[n].hidden||(u[n]=u[n]||0,h[n]=h[n]||0,i.relativePoints?u[n]=100:o<0?h[n]+=o:u[n]+=o)})}),o.each(d,function(t){var i=t.positiveValues.concat(t.negativeValues),n=o.min(i),a=o.max(i);e.min=null===e.min?n:Math.min(e.min,n),e.max=null===e.max?a:Math.max(e.max,a)})}else o.each(r,function(i,a){var r=n.getDatasetMeta(a);n.isDatasetVisible(a)&&t(r)&&o.each(i.data,function(t,i){var n=+e.getRightValue(t);isNaN(n)||r.data[i].hidden||(null===e.min?e.min=n:n<e.min&&(e.min=n),null===e.max?e.max=n:n>e.max&&(e.max=n))})});e.min=isFinite(e.min)&&!isNaN(e.min)?e.min:0,e.max=isFinite(e.max)&&!isNaN(e.max)?e.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var t,e=this,i=e.options.ticks;if(e.isHorizontal())t=Math.min(i.maxTicksLimit?i.maxTicksLimit:11,Math.ceil(e.width/50));else{var a=o.valueOrDefault(i.fontSize,n.global.defaultFontSize);t=Math.min(i.maxTicksLimit?i.maxTicksLimit:11,Math.ceil(e.height/(2*a)))}return t},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e=this,i=e.start,n=+e.getRightValue(t),o=e.end-i;return e.isHorizontal()?e.left+e.width/o*(n-i):e.bottom-e.height/o*(n-i)},getValueForPixel:function(t){var e=this,i=e.isHorizontal(),n=i?e.width:e.height,o=(i?t-e.left:e.bottom-t)/n;return e.start+(e.end-e.start)*o},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",i,e)}},{25:25,34:34,45:45}],55:[function(t,e,i){"use strict";function n(t,e){var i,n=[];if(t.stepSize&&t.stepSize>0)i=t.stepSize;else{var a=o.niceNum(e.max-e.min,!1);i=o.niceNum(a/(t.maxTicks-1),!0)}var r=Math.floor(e.min/i)*i,s=Math.ceil(e.max/i)*i;t.min&&t.max&&t.stepSize&&o.almostWhole((t.max-t.min)/t.stepSize,i/1e3)&&(r=t.min,s=t.max);var l=(s-r)/i;l=o.almostEquals(l,Math.round(l),i/1e3)?Math.round(l):Math.ceil(l);var d=1;i<1&&(d=Math.pow(10,i.toString().length-2),r=Math.round(r*d)/d,s=Math.round(s*d)/d),n.push(void 0!==t.min?t.min:r);for(var u=1;u<l;++u)n.push(Math.round((r+u*i)*d)/d);return n.push(void 0!==t.max?t.max:s),n}var o=t(45);e.exports=function(t){var e=o.noop;t.LinearScaleBase=t.Scale.extend({getRightValue:function(e){return"string"==typeof e?+e:t.Scale.prototype.getRightValue.call(this,e)},handleTickRangeOptions:function(){var t=this,e=t.options,i=e.ticks;if(i.beginAtZero){var n=o.sign(t.min),a=o.sign(t.max);n<0&&a<0?t.max=0:n>0&&a>0&&(t.min=0)}var r=void 0!==i.min||void 0!==i.suggestedMin,s=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)),r!==s&&t.min>=t.max&&(r?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,a=t.getTickLimit();a=Math.max(2,a);var r={maxTicks:a,min:i.min,max:i.max,stepSize:o.valueOrDefault(i.fixedStepSize,i.stepSize)},s=t.ticks=n(r,t);t.handleDirectionalChanges(),t.max=o.max(s),t.min=o.min(s),i.reverse?(s.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,a=[],r=o.valueOrDefault,s=r(t.min,Math.pow(10,Math.floor(o.log10(e.min)))),l=Math.floor(o.log10(e.max)),d=Math.ceil(e.max/Math.pow(10,l));0===s?(i=Math.floor(o.log10(e.minNotZero)),n=Math.floor(e.minNotZero/Math.pow(10,i)),a.push(s),s=n*Math.pow(10,i)):(i=Math.floor(o.log10(s)),n=Math.floor(s/Math.pow(10,i)));var u=i<0?Math.pow(10,Math.abs(i)):1;do{a.push(s),++n,10===n&&(n=1,++i,u=i>=0?1:u),s=Math.round(n*Math.pow(10,i)*u)/u}while(i<l||i===l&&n<d);var h=r(t.max,s);return a.push(h),a}var o=t(45),a=t(34);e.exports=function(t){var e={position:"left",ticks:{callback:a.formatters.logarithmic}},i=t.Scale.extend({determineDataLimits:function(){function t(t){return s?t.xAxisID===e.id:t.yAxisID===e.id}var e=this,i=e.options,n=e.chart,a=n.data,r=a.datasets,s=e.isHorizontal();e.min=null,e.max=null,e.minNotZero=null;var l=i.stacked;if(void 0===l&&o.each(r,function(e,i){if(!l){var o=n.getDatasetMeta(i);n.isDatasetVisible(i)&&t(o)&&void 0!==o.stack&&(l=!0)}}),i.stacked||l){var d={};o.each(r,function(a,r){var s=n.getDatasetMeta(r),l=[s.type,void 0===i.stacked&&void 0===s.stack?r:"",s.stack].join(".");n.isDatasetVisible(r)&&t(s)&&(void 0===d[l]&&(d[l]=[]),o.each(a.data,function(t,i){var n=d[l],o=+e.getRightValue(t);isNaN(o)||s.data[i].hidden||o<0||(n[i]=n[i]||0,n[i]+=o)}))}),o.each(d,function(t){if(t.length>0){var i=o.min(t),n=o.max(t);e.min=null===e.min?i:Math.min(e.min,i),e.max=null===e.max?n:Math.max(e.max,n)}})}else o.each(r,function(i,a){var r=n.getDatasetMeta(a);n.isDatasetVisible(a)&&t(r)&&o.each(i.data,function(t,i){var n=+e.getRightValue(t);isNaN(n)||r.data[i].hidden||n<0||(null===e.min?e.min=n:n<e.min&&(e.min=n),null===e.max?e.max=n:n>e.max&&(e.max=n),0!==n&&(null===e.minNotZero||n<e.minNotZero)&&(e.minNotZero=n))})});this.handleTickRangeOptions()},handleTickRangeOptions:function(){var t=this,e=t.options,i=e.ticks,n=o.valueOrDefault;t.min=n(i.min,t.min),t.max=n(i.max,t.max),t.min===t.max&&(0!==t.min&&null!==t.min?(t.min=Math.pow(10,Math.floor(o.log10(t.min))-1),t.max=Math.pow(10,Math.floor(o.log10(t.max))+1)):(t.min=1,t.max=10)),null===t.min&&(t.min=Math.pow(10,Math.floor(o.log10(t.max))-1)),null===t.max&&(t.max=0!==t.min?Math.pow(10,Math.floor(o.log10(t.min))+1):10),null===t.minNotZero&&(t.min>0?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(o.log10(t.max))):t.minNotZero=1)},buildTicks:function(){var t=this,e=t.options,i=e.ticks,a=!t.isHorizontal(),r={min:i.min,max:i.max},s=t.ticks=n(r,t);t.max=o.max(s),t.min=o.min(s),i.reverse?(a=!a,t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),a&&s.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),t.Scale.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){return this.getPixelForValue(this.tickValues[t])},_getFirstTickValue:function(t){var e=Math.floor(o.log10(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},getPixelForValue:function(e){var i,n,a,r,s,l=this,d=l.options.ticks.reverse,u=o.log10,h=l._getFirstTickValue(l.minNotZero),c=0;return e=+l.getRightValue(e),d?(a=l.end,r=l.start,s=-1):(a=l.start,r=l.end,s=1),l.isHorizontal()?(i=l.width,n=d?l.right:l.left):(i=l.height,s*=-1,n=d?l.top:l.bottom),e!==a&&(0===a&&(c=o.getValueOrDefault(l.options.ticks.fontSize,t.defaults.global.defaultFontSize),i-=c,a=h),0!==e&&(c+=i/(u(r)-u(a))*(u(e)-u(a))),n+=s*c),n},getValueForPixel:function(e){var i,n,a,r,s=this,l=s.options.ticks.reverse,d=o.log10,u=s._getFirstTickValue(s.minNotZero);if(l?(n=s.end,a=s.start):(n=s.start,a=s.end),s.isHorizontal()?(i=s.width,r=l?s.right-e:e-s.left):(i=s.height,r=l?e-s.top:s.bottom-e),r!==n){if(0===n){var h=o.getValueOrDefault(s.options.ticks.fontSize,t.defaults.global.defaultFontSize);r-=h,i-=h,n=u}r*=d(a)-d(n),r/=i,r=Math.pow(10,d(n)+r)}return r}});t.scaleService.registerScaleType("logarithmic",i,e)}},{34:34,45:45}],57:[function(t,e,i){"use strict";var n=t(25),o=t(45),a=t(34);e.exports=function(t){function e(t){var e=t.options;return e.angleLines.display||e.pointLabels.display?t.chart.data.labels.length:0}function i(t){var e=t.options.pointLabels,i=o.valueOrDefault(e.fontSize,m.defaultFontSize),n=o.valueOrDefault(e.fontStyle,m.defaultFontStyle),a=o.valueOrDefault(e.fontFamily,m.defaultFontFamily);return{size:i,style:n,family:a,font:o.fontString(i,n,a)}}function r(t,e,i){return o.isArray(i)?{w:o.longestText(t,t.font,i),h:i.length*e+1.5*(i.length-1)*e}:{w:t.measureText(i).width,h:e}}function s(t,e,i,n,o){return t===n||t===o?{start:e-i/2,end:e+i/2}:t<n||t>o?{start:e-i-5,end:e}:{start:e,end:e+i+5}}function l(t){var n,a,l,d=i(t),u=Math.min(t.height/2,t.width/2),h={r:t.width,l:0,t:t.height,b:0},c={};t.ctx.font=d.font,t._pointLabelSizes=[];var f=e(t);for(n=0;n<f;n++){l=t.getPointPosition(n,u),a=r(t.ctx,d.size,t.pointLabels[n]||""),t._pointLabelSizes[n]=a;var p=t.getIndexAngle(n),g=o.toDegrees(p)%360,m=s(g,l.x,a.w,0,180),v=s(g,l.y,a.h,90,270);m.start<h.l&&(h.l=m.start,c.l=p),m.end>h.r&&(h.r=m.end,c.r=p),v.start<h.t&&(h.t=v.start,c.t=p),v.end>h.b&&(h.b=v.end,c.b=p)}t.setReductions(u,h,c)}function d(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 h(t,e,i,n){if(o.isArray(e))for(var a=i.y,r=1.5*n,s=0;s<e.length;++s)t.fillText(e[s],i.x,a),a+=r;else t.fillText(e,i.x,i.y)}function c(t,e,i){90===t||270===t?i.y-=e.h/2:(t>270||t<90)&&(i.y-=e.h)}function f(t){var n=t.ctx,a=t.options,r=a.angleLines,s=a.pointLabels;n.lineWidth=r.lineWidth,n.strokeStyle=r.color;var l=t.getDistanceFromCenterForValue(a.ticks.reverse?t.min:t.max),d=i(t);n.textBaseline="top";for(var f=e(t)-1;f>=0;f--){if(r.display){var p=t.getPointPosition(f,l);n.beginPath(),n.moveTo(t.xCenter,t.yCenter),n.lineTo(p.x,p.y),n.stroke(),n.closePath()}if(s.display){var g=t.getPointPosition(f,l+5),v=o.valueAtIndexOrDefault(s.fontColor,f,m.defaultFontColor);n.font=d.font,n.fillStyle=v;var b=t.getIndexAngle(f),y=o.toDegrees(b);n.textAlign=u(y),c(y,t._pointLabelSizes[f],g),h(n,t.pointLabels[f]||"",g,d.size)}}}function p(t,i,n,a){var r=t.ctx;if(r.strokeStyle=o.valueAtIndexOrDefault(i.color,a-1),r.lineWidth=o.valueAtIndexOrDefault(i.lineWidth,a-1),t.options.gridLines.circular)r.beginPath(),r.arc(t.xCenter,t.yCenter,n,0,2*Math.PI),r.closePath(),r.stroke();else{var s=e(t);if(0===s)return;r.beginPath();var l=t.getPointPosition(0,n);r.moveTo(l.x,l.y);for(var d=1;d<s;d++)l=t.getPointPosition(d,n),r.lineTo(l.x,l.y);r.closePath(),r.stroke()}}function g(t){return o.isNumber(t)?t:0}var m=n.global,v={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:a.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}},b=t.LinearScaleBase.extend({setDimensions:function(){var t=this,e=t.options,i=e.ticks;t.width=t.maxWidth,t.height=t.maxHeight,t.xCenter=Math.round(t.width/2),t.yCenter=Math.round(t.height/2);var n=o.min([t.height,t.width]),a=o.valueOrDefault(i.fontSize,m.defaultFontSize);t.drawingArea=e.display?n/2-(a/2+i.backdropPaddingY):n/2},determineDataLimits:function(){var t=this,e=t.chart,i=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;o.each(e.data.datasets,function(a,r){if(e.isDatasetVisible(r)){var s=e.getDatasetMeta(r);o.each(a.data,function(e,o){var a=+t.getRightValue(e);isNaN(a)||s.data[o].hidden||(i=Math.min(a,i),n=Math.max(a,n))})}}),t.min=i===Number.POSITIVE_INFINITY?0:i,t.max=n===Number.NEGATIVE_INFINITY?0:n,t.handleTickRangeOptions()},getTickLimit:function(){var t=this.options.ticks,e=o.valueOrDefault(t.fontSize,m.defaultFontSize);return Math.min(t.maxTicksLimit?t.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*e)))},convertTicksToLabels:function(){var e=this
|
|
;t.LinearScaleBase.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map(e.options.pointLabels.callback,e)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){this.options.pointLabels.display?l(this):d(this)},setReductions:function(t,e,i){var n=this,o=e.l/Math.sin(i.l),a=Math.max(e.r-n.width,0)/Math.sin(i.r),r=-e.t/Math.cos(i.t),s=-Math.max(e.b-n.height,0)/Math.cos(i.b);o=g(o),a=g(a),r=g(r),s=g(s),n.drawingArea=Math.min(Math.round(t-(o+a)/2),Math.round(t-(r+s)/2)),n.setCenterPoint(o,a,r,s)},setCenterPoint:function(t,e,i,n){var o=this,a=o.width-e-o.drawingArea,r=t+o.drawingArea,s=i+o.drawingArea,l=o.height-n-o.drawingArea;o.xCenter=Math.round((r+a)/2+o.left),o.yCenter=Math.round((s+l)/2+o.top)},getIndexAngle:function(t){return t*(2*Math.PI/e(this))+(this.chart.options&&this.chart.options.startAngle?this.chart.options.startAngle:0)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(null===t)return 0;var i=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*i:(t-e.min)*i},getPointPosition:function(t,e){var i=this,n=i.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(n)*e)+i.xCenter,y:Math.round(Math.sin(n)*e)+i.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this,e=t.min,i=t.max;return t.getPointPositionForValue(0,t.beginAtZero?0:e<0&&i<0?i:e>0&&i>0?e:0)},draw:function(){var t=this,e=t.options,i=e.gridLines,n=e.ticks,a=o.valueOrDefault;if(e.display){var r=t.ctx,s=this.getIndexAngle(0),l=a(n.fontSize,m.defaultFontSize),d=a(n.fontStyle,m.defaultFontStyle),u=a(n.fontFamily,m.defaultFontFamily),h=o.fontString(l,d,u);o.each(t.ticks,function(e,o){if(o>0||n.reverse){var d=t.getDistanceFromCenterForValue(t.ticksAsNumbers[o]);if(i.display&&0!==o&&p(t,i,d,o),n.display){var u=a(n.fontColor,m.defaultFontColor);if(r.font=h,r.save(),r.translate(t.xCenter,t.yCenter),r.rotate(s),n.showLabelBackdrop){var c=r.measureText(e).width;r.fillStyle=n.backdropColor,r.fillRect(-c/2-n.backdropPaddingX,-d-l/2-n.backdropPaddingY,c+2*n.backdropPaddingX,l+2*n.backdropPaddingY)}r.textAlign="center",r.textBaseline="middle",r.fillStyle=u,r.fillText(e,0,-d),r.restore()}}}),(e.angleLines.display||e.pointLabels.display)&&f(t)}}});t.scaleService.registerScaleType("radialLinear",b,v)}},{25:25,34:34,45:45}],58:[function(t,e,i){"use strict";function n(t,e){return t-e}function o(t){var e,i,n,o={},a=[];for(e=0,i=t.length;e<i;++e)n=t[e],o[n]||(o[n]=!0,a.push(n));return a}function a(t,e,i,n){if("linear"===n||!t.length)return[{time:e,pos:0},{time:i,pos:1}];var o,a,r,s,l,d=[],u=[e];for(o=0,a=t.length;o<a;++o)(s=t[o])>e&&s<i&&u.push(s);for(u.push(i),o=0,a=u.length;o<a;++o)l=u[o+1],r=u[o-1],s=u[o],void 0!==r&&void 0!==l&&Math.round((l+r)/2)===s||d.push({time:s,pos:o/(a-1)});return d}function r(t,e,i){for(var n,o,a,r=0,s=t.length-1;r>=0&&r<=s;){if(n=r+s>>1,o=t[n-1]||null,a=t[n],!o)return{lo:null,hi:a};if(a[e]<i)r=n+1;else{if(!(o[e]>i))return{lo:o,hi:a};s=n-1}}return{lo:a,hi:null}}function s(t,e,i,n){var o=r(t,e,i),a=o.lo?o.hi?o.lo:t[t.length-2]:t[0],s=o.lo?o.hi?o.hi:t[t.length-1]:t[1],l=s[e]-a[e],d=l?(i-a[e])/l:0,u=(s[n]-a[n])*d;return a[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 d(t,e){if(x.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 o,a,r,s=e-t,l=_[i],d=l.size,u=l.steps;if(!u)return Math.ceil(s/(n*d));for(o=0,a=u.length;o<a&&(r=u[o],!(Math.ceil(s/(d*r))<=n));++o);return r}function h(t,e,i,n){var o,a,r,s=C.length;for(o=C.indexOf(t);o<s-1;++o)if(a=_[C[o]],r=a.steps?a.steps[a.steps.length-1]:k,a.common&&Math.ceil((i-e)/(r*a.size))<=n)return C[o];return C[s-1]}function c(t,e,i,n){var o,a,r=b.duration(b(n).diff(b(i))),s=C.length;for(o=s-1;o>=C.indexOf(e);o--)if(a=C[o],_[a].common&&r.as(a)>=t.length)return a;return C[e?C.indexOf(e):0]}function f(t){for(var e=C.indexOf(t)+1,i=C.length;e<i;++e)if(_[C[e]].common)return C[e]}function p(t,e,i,n){var o,a=n.time,r=a.unit||h(a.minUnit,t,e,i),s=f(r),l=x.valueOrDefault(a.stepSize,a.unitStepSize),d="week"===r&&a.isoWeekday,c=n.ticks.major.enabled,p=_[r],g=b(t),m=b(e),v=[];for(l||(l=u(t,e,r,i)),d&&(g=g.isoWeekday(d),m=m.isoWeekday(d)),g=g.startOf(d?"day":r),m=m.startOf(d?"day":r),m<e&&m.add(1,r),o=b(g),c&&s&&!d&&!a.round&&(o.startOf(s),o.add(~~((g-o)/(p.size*l))*l,r));o<m;o.add(l,r))v.push(+o);return v.push(+o),v}function g(t,e,i,n,o){var a,r,l=0,d=0;return o.offset&&e.length&&(o.time.min||(a=e.length>1?e[1]:n,r=e[0],l=(s(t,"time",a,"pos")-s(t,"time",r,"pos"))/2),o.time.max||(a=e[e.length-1],r=e.length>1?e[e.length-2]:i,d=(s(t,"time",a,"pos")-s(t,"time",r,"pos"))/2)),{left:l,right:d}}function m(t,e){var i,n,o,a,r=[];for(i=0,n=t.length;i<n;++i)o=t[i],a=!!e&&o===+b(o).startOf(e),r.push({value:o,major:a});return r}function v(t,e){var i,n,o,a=t.length;for(i=0;i<a;i++){if(n=l(t[i],e),0!==n.millisecond())return"MMM D, YYYY h:mm:ss.SSS a";0===n.second()&&0===n.minute()&&0===n.hour()||(o=!0)}return o?"MMM D, YYYY h:mm:ss a":"MMM D, YYYY"}var b=t(1);b="function"==typeof b?b:window.moment;var y=t(25),x=t(45),w=Number.MIN_SAFE_INTEGER||-9007199254740991,k=Number.MAX_SAFE_INTEGER||9007199254740991,_={millisecond:{common:!0,size:1,steps:[1,2,5,10,20,50,100,250,500]},second:{common:!0,size:1e3,steps:[1,2,5,10,30]},minute:{common:!0,size:6e4,steps:[1,2,5,10,30]},hour:{common:!0,size:36e5,steps:[1,2,3,6,12]},day:{common:!0,size:864e5,steps:[1,2,5]},week:{common:!1,size:6048e5,steps:[1,2,3,4]},month:{common:!0,size:2628e6,steps:[1,2,3]},quarter:{common:!1,size:7884e6,steps:[1,2,3,4]},year:{common:!0,size:3154e7}},C=Object.keys(_);e.exports=function(t){var e={position:"bottom",distribution:"linear",bounds:"data",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}},i=t.Scale.extend({initialize:function(){if(!b)throw new Error("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com");this.mergeTicksOptions(),t.Scale.prototype.initialize.call(this)},update:function(){var e=this,i=e.options;return i.time&&i.time.format&&console.warn("options.time.format is deprecated and replaced by options.time.parser."),t.Scale.prototype.update.apply(e,arguments)},getRightValue:function(e){return e&&void 0!==e.t&&(e=e.t),t.Scale.prototype.getRightValue.call(this,e)},determineDataLimits:function(){var t,e,i,a,r,s,l=this,u=l.chart,h=l.options.time,c=h.unit||"day",f=k,p=w,g=[],m=[],v=[];for(t=0,i=u.data.labels.length;t<i;++t)v.push(d(u.data.labels[t],l));for(t=0,i=(u.data.datasets||[]).length;t<i;++t)if(u.isDatasetVisible(t))if(r=u.data.datasets[t].data,x.isObject(r[0]))for(m[t]=[],e=0,a=r.length;e<a;++e)s=d(r[e],l),g.push(s),m[t][e]=s;else g.push.apply(g,v),m[t]=v.slice(0);else m[t]=[];v.length&&(v=o(v).sort(n),f=Math.min(f,v[0]),p=Math.max(p,v[v.length-1])),g.length&&(g=o(g).sort(n),f=Math.min(f,g[0]),p=Math.max(p,g[g.length-1])),f=d(h.min,l)||f,p=d(h.max,l)||p,f=f===k?+b().startOf(c):f,p=p===w?+b().endOf(c)+1:p,l.min=Math.min(f,p),l.max=Math.max(f+1,p),l._horizontal=l.isHorizontal(),l._table=[],l._timestamps={data:g,datasets:m,labels:v}},buildTicks:function(){var t,e,i,n=this,o=n.min,r=n.max,s=n.options,l=s.time,u=[],h=[];switch(s.ticks.source){case"data":u=n._timestamps.data;break;case"labels":u=n._timestamps.labels;break;case"auto":default:u=p(o,r,n.getLabelCapacity(o),s)}for("ticks"===s.bounds&&u.length&&(o=u[0],r=u[u.length-1]),o=d(l.min,n)||o,r=d(l.max,n)||r,t=0,e=u.length;t<e;++t)(i=u[t])>=o&&i<=r&&h.push(i);return n.min=o,n.max=r,n._unit=l.unit||c(h,l.minUnit,n.min,n.max),n._majorUnit=f(n._unit),n._table=a(n._timestamps.data,o,r,s.distribution),n._offsets=g(n._table,h,o,r,s),n._labelFormat=v(n._timestamps.data,l),m(h,n._majorUnit)},getLabelForIndex:function(t,e){var i=this,n=i.chart.data,o=i.options.time,a=n.labels&&t<n.labels.length?n.labels[t]:"",r=n.datasets[e].data[t];return x.isObject(r)&&(a=i.getRightValue(r)),o.tooltipFormat?l(a,o).format(o.tooltipFormat):"string"==typeof a?a:l(a,o).format(i._labelFormat)},tickFormatFunction:function(t,e,i,n){var o=this,a=o.options,r=t.valueOf(),s=a.time.displayFormats,l=s[o._unit],d=o._majorUnit,u=s[d],h=t.clone().startOf(d).valueOf(),c=a.ticks.major,f=c.enabled&&d&&u&&r===h,p=t.format(n||(f?u:l)),g=f?c:a.ticks.minor,m=x.valueOrDefault(g.callback,g.userCallback);return m?m(p,e,i):p},convertTicksToLabels:function(t){var e,i,n=[];for(e=0,i=t.length;e<i;++e)n.push(this.tickFormatFunction(b(t[e].value),e,t));return n},getPixelForOffset:function(t){var e=this,i=e._horizontal?e.width:e.height,n=e._horizontal?e.left:e.top,o=s(e._table,"time",t,"pos");return n+i*(e._offsets.left+o)/(e._offsets.left+1+e._offsets.right)},getPixelForValue:function(t,e,i){var n=this,o=null;if(void 0!==e&&void 0!==i&&(o=n._timestamps.datasets[i][e]),null===o&&(o=d(t,n)),null!==o)return n.getPixelForOffset(o)},getPixelForTick:function(t){var e=this.getTicks();return t>=0&&t<e.length?this.getPixelForOffset(e[t].value):null},getValueForPixel:function(t){var e=this,i=e._horizontal?e.width:e.height,n=e._horizontal?e.left:e.top,o=(i?(t-n)/i:0)*(e._offsets.left+1+e._offsets.left)-e._offsets.right,a=s(e._table,"pos",o,"time");return b(a)},getLabelWidth:function(t){var e=this,i=e.options.ticks,n=e.ctx.measureText(t).width,o=x.toRadians(i.maxRotation),a=Math.cos(o),r=Math.sin(o);return n*a+x.valueOrDefault(i.fontSize,y.global.defaultFontSize)*r},getLabelCapacity:function(t){var e=this,i=e.options.time.displayFormats.millisecond,n=e.tickFormatFunction(b(t),0,[],i),o=e.getLabelWidth(n),a=e.isHorizontal()?e.width:e.height,r=Math.floor(a/o);return r>0?r:1}});t.scaleService.registerScaleType("time",i,e)}},{1:1,25:25,45:45}]},{},[7])(7)}),function(t,e){"function"==typeof define&&define.amd?define([],function(){return t.SignaturePad=e()}):"object"==typeof exports?module.exports=e():t.SignaturePad=e()}(this,function(){return function(t){"use strict";var e=function(t,e){var i=this,n=e||{};this.velocityFilterWeight=n.velocityFilterWeight||.7,this.minWidth=n.minWidth||.5,this.maxWidth=n.maxWidth||2.5,this.dotSize=n.dotSize||function(){return(this.minWidth+this.maxWidth)/2},this.penColor=n.penColor||"black",this.backgroundColor=n.backgroundColor||"rgba(0,0,0,0)",this.onEnd=n.onEnd,this.onBegin=n.onBegin,this._canvas=t,this._ctx=t.getContext("2d"),this.clear(),this._handleMouseDown=function(t){1===t.which&&(i._mouseButtonDown=!0,i._strokeBegin(t))},this._handleMouseMove=function(t){i._mouseButtonDown&&i._strokeUpdate(t)},this._handleMouseUp=function(t){1===t.which&&i._mouseButtonDown&&(i._mouseButtonDown=!1,i._strokeEnd(t))},this._handleTouchStart=function(t){if(1==t.targetTouches.length){var e=t.changedTouches[0];i._strokeBegin(e)}},this._handleTouchMove=function(t){t.preventDefault();var e=t.targetTouches[0];i._strokeUpdate(e)},this._handleTouchEnd=function(t){t.target===i._canvas&&(t.preventDefault(),i._strokeEnd(t))},this._handleMouseEvents(),this._handleTouchEvents()};e.prototype.clear=function(){var t=this._ctx,e=this._canvas;t.fillStyle=this.backgroundColor,t.clearRect(0,0,e.width,e.height),t.fillRect(0,0,e.width,e.height),this._reset()},e.prototype.toDataURL=function(t,e){var i=this._canvas;return i.toDataURL.apply(i,arguments)},e.prototype.fromDataURL=function(t){var e=this,i=new Image,n=window.devicePixelRatio||1,o=this._canvas.width/n,a=this._canvas.height/n;this._reset(),i.src=t,i.onload=function(){e._ctx.drawImage(i,0,0,o,a)},this._isEmpty=!1},e.prototype._strokeUpdate=function(t){var e=this._createPoint(t);this._addPoint(e)},e.prototype._strokeBegin=function(t){this._reset(),this._strokeUpdate(t),"function"==typeof this.onBegin&&this.onBegin(t)},e.prototype._strokeDraw=function(t){var e=this._ctx,i="function"==typeof this.dotSize?this.dotSize():this.dotSize;e.beginPath(),this._drawPoint(t.x,t.y,i),e.closePath(),e.fill()},e.prototype._strokeEnd=function(t){var e=this.points.length>2,i=this.points[0];!e&&i&&this._strokeDraw(i),"function"==typeof this.onEnd&&this.onEnd(t)},e.prototype._handleMouseEvents=function(){this._mouseButtonDown=!1,this._canvas.addEventListener("mousedown",this._handleMouseDown),this._canvas.addEventListener("mousemove",this._handleMouseMove),t.addEventListener("mouseup",this._handleMouseUp)},e.prototype._handleTouchEvents=function(){this._canvas.style.msTouchAction="none",this._canvas.style.touchAction="none",this._canvas.addEventListener("touchstart",this._handleTouchStart),this._canvas.addEventListener("touchmove",this._handleTouchMove),this._canvas.addEventListener("touchend",this._handleTouchEnd)},e.prototype.on=function(){this._handleMouseEvents(),this._handleTouchEvents()},e.prototype.off=function(){this._canvas.removeEventListener("mousedown",this._handleMouseDown),this._canvas.removeEventListener("mousemove",this._handleMouseMove),t.removeEventListener("mouseup",this._handleMouseUp),this._canvas.removeEventListener("touchstart",this._handleTouchStart),this._canvas.removeEventListener("touchmove",this._handleTouchMove),this._canvas.removeEventListener("touchend",this._handleTouchEnd)},e.prototype.isEmpty=function(){return this._isEmpty},e.prototype._reset=function(){this.points=[],this._lastVelocity=0,this._lastWidth=(this.minWidth+this.maxWidth)/2,this._isEmpty=!0,this._ctx.fillStyle=this.penColor},e.prototype._createPoint=function(t){var e=this._canvas.getBoundingClientRect();return new i(t.clientX-e.left,t.clientY-e.top)},e.prototype._addPoint=function(t){var e,i,o,a,r=this.points;r.push(t),r.length>2&&(3===r.length&&r.unshift(r[0]),a=this._calculateCurveControlPoints(r[0],r[1],r[2]),e=a.c2,a=this._calculateCurveControlPoints(r[1],r[2],r[3]),i=a.c1,o=new n(r[1],e,i,r[2]),this._addCurve(o),r.shift())},e.prototype._calculateCurveControlPoints=function(t,e,n){var o=t.x-e.x,a=t.y-e.y,r=e.x-n.x,s=e.y-n.y,l={x:(t.x+e.x)/2,y:(t.y+e.y)/2},d={x:(e.x+n.x)/2,y:(e.y+n.y)/2},u=Math.sqrt(o*o+a*a),h=Math.sqrt(r*r+s*s),c=l.x-d.x,f=l.y-d.y,p=h/(u+h),g={x:d.x+c*p,y:d.y+f*p},m=e.x-g.x,v=e.y-g.y;return{c1:new i(l.x+m,l.y+v),c2:new i(d.x+m,d.y+v)}},e.prototype._addCurve=function(t){var e,i,n=t.startPoint,o=t.endPoint;e=o.velocityFrom(n),e=this.velocityFilterWeight*e+(1-this.velocityFilterWeight)*this._lastVelocity,i=this._strokeWidth(e),this._drawCurve(t,this._lastWidth,i),this._lastVelocity=e,this._lastWidth=i},e.prototype._drawPoint=function(t,e,i){var n=this._ctx;n.moveTo(t,e),n.arc(t,e,i,0,2*Math.PI,!1),this._isEmpty=!1},e.prototype._drawCurve=function(t,e,i){var n,o,a,r,s,l,d,u,h,c,f,p=this._ctx,g=i-e;for(n=Math.floor(t.length()),p.beginPath(),a=0;a<n;a++)r=a/n,s=r*r,l=s*r,d=1-r,u=d*d,h=u*d,c=h*t.startPoint.x,c+=3*u*r*t.control1.x,c+=3*d*s*t.control2.x,c+=l*t.endPoint.x,f=h*t.startPoint.y,f+=3*u*r*t.control1.y,f+=3*d*s*t.control2.y,f+=l*t.endPoint.y,o=e+l*g,this._drawPoint(c,f,o);p.closePath(),p.fill()},e.prototype._strokeWidth=function(t){return Math.max(this.maxWidth/(t+1),this.minWidth)};var i=function(t,e,i){this.x=t,this.y=e,this.time=i||(new Date).getTime()};i.prototype.velocityFrom=function(t){return this.time!==t.time?this.distanceTo(t)/(this.time-t.time):1},i.prototype.distanceTo=function(t){return Math.sqrt(Math.pow(this.x-t.x,2)+Math.pow(this.y-t.y,2))};var n=function(t,e,i,n){this.startPoint=t,this.control1=e,this.control2=i,this.endPoint=n};return n.prototype.length=function(){var t,e,i,n,o,a,r,s,l=0;for(t=0;t<=10;t++)e=t/10,i=this._point(e,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),n=this._point(e,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y),t>0&&(r=i-o,s=n-a,l+=Math.sqrt(r*r+s*s)),o=i,a=n;return l},n.prototype._point=function(t,e,i,n,o){return e*(1-t)*(1-t)*(1-t)+3*i*(1-t)*(1-t)*t+3*n*(1-t)*t*t+o*t*t*t},e}(document)}),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 o=function(){return!1},a=null,r={numHalted:0,haltValidation:function(e){this.numHalted++,t.formUtils.haltValidation=!0,e.unbind("submit",o).bind("submit",o).find('*[type="submit"]').addClass("disabled").attr("disabled","disabled")},unHaltValidation:function(e){0===--this.numHalted&&(t.formUtils.haltValidation=!1,e.unbind("submit",o).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?(a=t,this.haltedFormValidation||(r.haltValidation(),this.haltedFormValidation=!0),null):this.hasRun?this.result:(a=t,r.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&&(r.unHaltValidation(this.$form),"submit"===a?this.$form.trigger("submit"):this.$input.trigger("validation.revalidate"))},n.loadInstance=function(t,e,i){var o,a=e.get(0);return a.asyncValidators||(a.asyncValidators={}),a.asyncValidators[t]?o=a.asyncValidators[t]:(o=new n(i,e),a.asyncValidators[t]=o),o},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),o=i.validatorFunction;i.async=!0,i.validatorFunction=function(t,e,a,r,s,l){return n.loadInstance(this.name,e,s).run(l,function(n){o.apply(i,[n,t,e,a,r,s,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 o=t.formUtils.validators["validate_"+n];o&&o.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 o(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"),o=t('input[name="'+n+'"]',e),a=o.is(":checked"),r=(t.formUtils.getValue(o)||"").toString(),s=i.valAttr("if-checked-value");(!a||s&&s!==r)&&i.valAttr("skipped",!0)})}function a(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){a(e),i(e),n(e)}).on("validatorsLoaded formValidationSetup",function(e,i){i||(i=t("form")),o(i)})}(t),function(t){"use strict";var e={resolveErrorMessage:function(t,e,i,n,o){var a=n.validationErrorMsgAttribute+"-"+i.replace("validate_",""),r=t.attr(a);return r||(r=t.attr(n.validationErrorMsgAttribute))||(r="function"!=typeof e.errorMessageKey?o[e.errorMessageKey]:o[e.errorMessageKey(n)])||(r=e.errorMessage),r},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 o=i.inlineErrorMessageCallback(t,!1,i);o&&o.html("")}else n.find("."+i.errorMessageClass).remove()},removeAllMessagesAndStyling:function(i,n){if("function"==typeof n.submitErrorMessageCallback){var o=n.submitErrorMessageCallback(i,!1,n);o&&o.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 o,a=document.getElementById(e.attr("name")+"_err_msg"),r=!1,s=function(n){t.formUtils.$win.trigger("validationErrorDisplay",[e,n]),n.html(i)},l=function(){var a=!1;r.find("."+n.errorMessageClass).each(function(){if(this.inputReferer===e[0])return a=t(this),!1}),a?i?s(a):a.remove():""!==i&&(o=t('<div class="'+n.errorMessageClass+' alert"></div>'),s(o),o[0].inputReferer=e[0],r.prepend(o))};if(a)t.formUtils.warn("Using deprecated element reference "+a.id),r=t(a),l();else if("function"==typeof n.inlineErrorMessageCallback){if(!(r=n.inlineErrorMessageCallback(e,i,n)))return;l()}else{var d=this.getParentContainer(e);o=d.find("."+n.errorMessageClass+".help-block"),0===o.length&&(o=t("<span></span>").addClass("help-block").addClass(n.errorMessageClass),o.appendTo(d)),s(o)}},setMessageInTopOfForm:function(e,i,n,o){var a='<div class="{errorMessageClass} alert alert-danger"><strong>{errorTitle}</strong><ul>{fields}</ul></div>',r=!1;if("function"!=typeof n.submitErrorMessageCallback||(r=n.submitErrorMessageCallback(e,i,n))){var s={errorTitle:o.errorTitle,fields:"",errorMessageClass:n.errorMessageClass};t.each(i,function(t,e){s.fields+="<li>"+e+"</li>"}),t.each(s,function(t,e){a=a.replace("{"+t+"}",e)}),r?r.html(a):e.children().eq(0).before(t(a))}}};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,o=this.find("*[data-validation]");return o.each(function(){var o=t(this);if(o.is("[type=radio]")){var a=n.find('[type=radio][name="'+o.attr("name")+'"]');a.bind("blur.validation",function(){o.validateInputOnBlur(e,i,!0,"blur")}),i.validateCheckboxRadioOnClick&&a.bind("click.validation",function(){o.validateInputOnBlur(e,i,!0,"click")})}}),o.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),o=n.valAttr("event");o&&n.unbind(o+".validation").bind(o+".validation",function(n){9!==(n||{}).keyCode&&t(this).validateInputOnBlur(e,i,!0,o)})}),this}},t.fn.showHelpOnFocus=function(e){return e||(e="data-validation-help"),this.find("textarea,input").each(function(){var i=t(this),o="jquery_form_help_"+ ++n,a=i.attr(e);i.removeClass("has-help-text").unbind("focus.help").unbind("blur.help"),a&&i.addClass("has-help-txt").bind("focus.help",function(){var e=i.parent().find("."+o);0===e.length&&(e=t("<span />").addClass(o).addClass("help").addClass("help-block").text(a).hide(),i.after(e)),e.fadeIn()}).bind("blur.help",function(){t(this).parent().find("."+o).fadeOut("slow")})}),this},t.fn.validate=function(e,i,n){var o=t.extend({},t.formUtils.LANG,n||{});this.each(function(){var n=t(this),a=n.closest("form").get(0)||{},r=a.validationConfig||t.formUtils.defaultConfig();n.one("validation",function(t,i){"function"==typeof e&&e(i,this,t)}),n.validateInputOnBlur(o,t.extend({},r,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,o,a){if(t.formUtils.eventType=a,this.willPostponeValidation()){var r=this,s=this.valAttr("postpone")||200;return e.postponedValidation=function(){r.validateInputOnBlur(i,n,o,a),e.postponedValidation=!1},setTimeout(function(){e.postponedValidation&&e.postponedValidation()},s),this}i=t.extend({},t.formUtils.LANG,i||{}),t.formUtils.dialogs.removeInputStylingAndMessage(this,n);var l=this,d=l.closest("form"),u=t.formUtils.validateInput(l,i,n,d,a),h=function(){l.validateInputOnBlur(i,n,!1,"blur.revalidated")};return"blur"===a&&l.unbind("validation.revalidate",h).one("validation.revalidate",h),o&&l.removeKeyUpValidation(),u.shouldChangeDisplay&&(u.isValid?t.formUtils.dialogs.applyInputSuccessStyling(l,n):t.formUtils.dialogs.setInlineMessage(l,u.errorMsg,n)),!u.isValid&&o&&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 o=this;return setTimeout(function(){o.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 a=function(e,o){t.inArray(e,s)<0&&s.push(e),l.push(o),o.valAttr("current-error",e),n&&t.formUtils.dialogs.applyInputErrorStyling(o,i)},r=[],s=[],l=[],d=this,u=function(e,n){return"submit"===n||"button"===n||"reset"===n||t.inArray(e,i.ignore||[])>-1};if(n&&t.formUtils.dialogs.removeAllMessagesAndStyling(d,i),d.find("input,textarea,select").filter(':not([type="submit"],[type="button"])').each(function(){var n=t(this),o=n.attr("type"),s="radio"===o||"checkbox"===o,l=n.attr("name");if(!u(l,o)&&(!s||t.inArray(l,r)<0)){s&&r.push(l);var h=t.formUtils.validateInput(n,e,i,d,"submit");h.isValid?h.isValid&&h.shouldChangeDisplay&&(n.valAttr("current-error",!1),t.formUtils.dialogs.applyInputSuccessStyling(n,i)):a(h.errorMsg,n)}}),"function"==typeof i.onValidate){var h=i.onValidate(d);t.isArray(h)?t.each(h,function(t,e){a(e.message,e.element)}):h&&h.element&&h.message&&a(h.message,h.element)}return t.formUtils.isValidatingEntireForm=!1,l.length>0&&n&&("top"===i.errorMessagePosition?t.formUtils.dialogs.setMessageInTopOfForm(d,s,i,e):t.each(l,function(e,n){t.formUtils.dialogs.setInlineMessage(n,n.valAttr("current-error"),i)}),i.scrollToTopOnError&&t.formUtils.$win.scrollTop(d.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 o=function(e,i){var o=t.split(e),a=o.length,r=function(){0===--a&&(t.formUtils.isLoadingModules=!1,"function"==typeof n&&n())};a>0&&(t.formUtils.isLoadingModules=!0);var s="?_="+(new Date).getTime(),l=document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0];t.each(o,function(e,n){if(n=t.trim(n),0===n.length||t.formUtils.hasLoadedModule(n))r();else{var o=i+n+(".js"===n.slice(-3)?"":".js"),a=document.createElement("SCRIPT");"function"==typeof define&&define.amd?require([o+(".dev.js"===o.slice(-7)?s:"")],r):(a.type="text/javascript",a.onload=r,a.src=o+(".dev.js"===o.slice(-7)?s:""),a.onerror=function(){t.formUtils.warn("Unable to load form validation module "+o,!0),r()},a.onreadystatechange=function(){"complete"!==this.readyState&&"loaded"!==this.readyState||(r(),this.onload=null,this.onreadystatechange=null)},l.appendChild(a))}})};if(i)o(e,i);else{var a=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&&(o(e,i),!0)};a()||t(function(){a()||"function"==typeof n&&n()})}}})}(t),function(t){"use strict";t.split=function(e,i,n){n=void 0===n||!0===n;var o="[,|"+(n?"\\s":"")+"-]\\s*",a=new RegExp(o,"g");if("function"!=typeof i){if(!e)return[];var r=[];return t.each(e.split(i||a),function(e,i){i=t.trim(i),i.length&&r.push(i)}),r}e&&t.each(e.split(a),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 o=t(n);o.trigger("formValidationSetup",[o,e]),o.find(".has-help-txt").unbind("focus.validation").unbind("blur.validation"),o.removeClass("has-validation-callback").unbind("submit.validation").unbind("reset.validation").find("input[data-validation],textarea[data-validation]").unbind("blur.validation"),o.bind("submit.validation",function(i){var n=t(this),o=function(){return i.stopImmediatePropagation(),!1};if(t.formUtils.haltValidation)return o();if(t.formUtils.isLoadingModules)return setTimeout(function(){n.trigger("submit.validation")},200),o();var a=n.isValid(e.language,e)
|
|
;return t.formUtils.haltValidation?o():a&&"function"==typeof e.onSuccess?!1===e.onSuccess(n)?o():void 0:a||"function"!=typeof e.onError?!!a||o():(e.onError(n),o())}).bind("reset.validation",function(){t.formUtils.dialogs.removeAllMessagesAndStyling(o,e)}).addClass("has-validation-callback"),e.showHelpOnFocus&&o.showHelpOnFocus(),e.addSuggestions&&o.addSuggestions(),e.validateOnBlur&&(o.validateOnBlur(e.language,e),o.bind("html5ValidationAttrsFound",function(){o.validateOnBlur(e.language,e)})),e.validateOnEvent&&o.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:'<div class="{errorMessageClass} alert alert-danger">{messages}</div>',messages:"<strong>{errorTitle}</strong><ul>{fields}</ul>",field:"<li>{msg}</li>"},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,o,a){n=n||t.formUtils.defaultConfig(),i=i||t.formUtils.LANG,o.length||(o=e.parent());var r=this.getValue(e);e.valAttr("skipped",!1).one("beforeValidation",function(){(e.attr("disabled")||!e.is(":visible")&&!n.validateHiddenInputs)&&e.valAttr("skipped",1)}).trigger("beforeValidation",[r,i,n]);var s="true"===e.valAttr("optional"),l=!r&&s,d=e.attr(n.validationRuleAttribute),u=!0,h="",c={isValid:!0,shouldChangeDisplay:!0,errorMsg:""};if(!d||l||e.valAttr("skipped"))return c.shouldChangeDisplay=n.addValidClassOnAll,c;var f=e.valAttr("ignore");return f&&t.each(f.split(""),function(t,e){r=r.replace(new RegExp("\\"+e,"g"),"")}),t.split(d,function(s){0!==s.indexOf("validate_")&&(s="validate_"+s);var l=t.formUtils.validators[s];if(!l)throw new Error('Using undefined validator "'+s+'". Maybe you have forgotten to load the module that "'+s+'" belongs to?');if("validate_checkbox_group"===s&&(e=o.find('[name="'+e.attr("name")+'"]:eq(0)')),("keyup"!==a||l.validateOnKeyUp)&&(u=l.validatorFunction(r,e,n,i,o,a)),!u)return n.validateOnBlur&&e.validateOnKeyUp(i,n),h=t.formUtils.dialogs.resolveErrorMessage(e,l,s,n,i),!1}),!1===u?(e.trigger("validation",!1),c.errorMsg=h,c.isValid=!1,c.shouldChangeDisplay=!0):null===u?c.shouldChangeDisplay=!1:(e.trigger("validation",!0),c.shouldChangeDisplay=!0),"function"==typeof n.onElementValidate&&null!==h&&n.onElementValidate(c.isValid,e,o,h),e.trigger("afterValidation",[c,a]),c},parseDate:function(e,i,n){var o,a,r,s,l=i.replace(/[a-zA-Z]/gi,"").substring(0,1),d="^",u=i.split(l||null);if(t.each(u,function(t,e){d+=(t>0?"\\"+l:"")+"(\\d{"+e.length+"})"}),d+="$",n){var h=[];t.each(e.split(l),function(t,e){1===e.length&&(e="0"+e),h.push(e)}),e=h.join(l)}if(null===(o=e.match(new RegExp(d))))return!1;var c=function(e,i,n){for(var o=0;o<i.length;o++)if(i[o].substring(0,1)===e)return t.formUtils.parseDateInt(n[o+1]);return-1};return r=c("m",u,o),a=c("d",u,o),s=c("y",u,o),!(2===r&&a>28&&(s%4!=0||s%100==0&&s%400!=0)||2===r&&a>29&&(s%4==0||s%100!=0&&s%400==0)||r>12||0===r)&&(!(this.isShortMonth(r)&&a>30||!this.isShortMonth(r)&&a>31||0===a)&&[s,r,a])},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),o=0,a=function(){var t=e.val().length;if(t>n){var a=e.scrollTop();e.val(e.val().substring(0,n)),e.scrollTop(a)}o=n-t,o<0&&(o=0),i.text(o)};t(e).bind("keydown keyup keypress focus blur",a).bind("cut paste",function(){setTimeout(a,100)}),t(document).bind("ready",a)},numericRangeCheck:function(e,i){var n=t.split(i),o=parseInt(i.substr(3),10);return 1===n.length&&-1===i.indexOf("min")&&-1===i.indexOf("max")&&(n=[i,i]),2===n.length&&(e<parseInt(n[0],10)||e>parseInt(n[1],10))?["out",n[0],n[1]]:0===i.indexOf("min")&&e<o?["min",o]:0===i.indexOf("max")&&e>o?["max",o]:["ok"]},_numSuggestionElements:0,_selectedSuggestion:null,_previousTypedVal:null,suggest:function(e,n,o){var a={css:{maxHeight:"150px",background:"#FFF",lineHeight:"150%",textDecoration:"underline",overflowX:"hidden",overflowY:"auto",border:"#CCC solid 1px",borderTop:"none",cursor:"pointer"},activeSuggestionCSS:{background:"#E9E9E9"}},r=function(t,e){var i=e.offset();t.css({width:e.outerWidth(),left:i.left+"px",top:i.top+e.outerHeight()+"px"})};o&&t.extend(a,o),a.css.position="absolute",a.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");r(e,t(".suggestions-"+i).eq(0))})}),this._numSuggestionElements++;var s=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=[],o=t.trim(i.val()).toLocaleLowerCase();if(o!==t.formUtils._previousTypedVal){t.formUtils._previousTypedVal=o;var l=!1,d=i.valAttr("suggestion-nr"),u=t(".jquery-form-suggestion-"+d);if(u.scrollTop(0),""!==o){var h=o.length>2;t.each(i.data("suggestions"),function(t,e){var i=e.toLocaleLowerCase();if(i===o)return n.push("<strong>"+e+"</strong>"),l=!0,!1;(0===i.indexOf(o)||h&&i.indexOf(o)>-1)&&n.push(e.replace(new RegExp(o,"gi"),"<strong>$&</strong>"))})}l||0===n.length&&u.length>0?u.hide():n.length>0&&0===u.length?(u=t("<div></div>").css(a.css).appendTo("body"),e.addClass("suggestions-"+d),u.attr("data-suggest-container",d).addClass("jquery-form-suggestions").addClass("jquery-form-suggestion-"+d)):n.length>0&&!u.is(":visible")&&u.show(),n.length>0&&o.length!==n[0].length&&(r(u,i),u.html(""),t.each(n,function(e,n){t("<div></div>").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"),s(i)})}))}}).unbind("keydown.validation").bind("keydown.validation",function(e){var i,n,o=e.keyCode?e.keyCode:e.which,r=t(this);if(13===o&&null!==t.formUtils._selectedSuggestion){if(i=r.valAttr("suggestion-nr"),n=t(".jquery-form-suggestion-"+i),n.length>0){var l=n.find("div").eq(t.formUtils._selectedSuggestion).text();r.val(l),r.trigger("change"),s(r),e.preventDefault()}}else{i=r.valAttr("suggestion-nr"),n=t(".jquery-form-suggestion-"+i);var d=n.children();if(d.length>0&&t.inArray(o,[38,40])>-1){38===o?(null===t.formUtils._selectedSuggestion?t.formUtils._selectedSuggestion=d.length-1:t.formUtils._selectedSuggestion--,t.formUtils._selectedSuggestion<0&&(t.formUtils._selectedSuggestion=d.length-1)):40===o&&(null===t.formUtils._selectedSuggestion?t.formUtils._selectedSuggestion=0:t.formUtils._selectedSuggestion++,t.formUtils._selectedSuggestion>d.length-1&&(t.formUtils._selectedSuggestion=0));var u=n.innerHeight(),h=n.scrollTop(),c=n.children().eq(0).outerHeight(),f=c*t.formUtils._selectedSuggestion;return(f<h||f>h+u)&&n.scrollTop(f),d.removeClass("active-suggestion").css("background","none").eq(t.formUtils._selectedSuggestion).addClass("active-suggestion").css(a.activeSuggestionCSS),e.preventDefault(),!1}}}).unbind("blur.suggest").bind("blur.suggest",function(){s(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],o=i[1];if(n&&o){if(0===n.indexOf('"')){var a=n.length;if(n=n.replace(/\"/g,""),n.length!==a-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,o,a){switch(i.attr("type")){case"checkbox":return i.is(":checked");case"radio":return a.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,o){var a=i.valAttr("length"),r=i.attr("type");if(void 0===a)return alert('Please add attribute "data-validation-length" to '+i[0].nodeName+" named "+i.attr("name")),!0;var s,l="file"===r&&void 0!==i.get(0).files?i.get(0).files.length:e.length,d=t.formUtils.numericRangeCheck(l,a);switch(d[0]){case"out":this.errorMessage=o.lengthBadStart+a+o.lengthBadEnd,s=!1;break;case"min":this.errorMessage=o.lengthTooShortStart+d[1]+o.lengthBadEnd,s=!1;break;case"max":this.errorMessage=o.lengthTooLongStart+d[1]+o.lengthBadEnd,s=!1;break;default:s=!0}return s},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,o,a=e.valAttr("allowing")||"",r=e.valAttr("decimal-separator")||i.decimalSeparator,s=!1,l=e.valAttr("step")||"",d=!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===a.indexOf("number")&&(a+=",number"),-1===a.indexOf("negative")&&0===t.indexOf("-"))return!1;if(a.indexOf("range")>-1&&(n=parseFloat(a.substring(a.indexOf("[")+1,a.indexOf(";"))),o=parseFloat(a.substring(a.indexOf(";")+1,a.indexOf("]"))),s=!0),""!==l&&(d=!0),","===r){if(t.indexOf(".")>-1)return!1;t=t.replace(",",".")}if(""===t.replace(/[0-9-]/g,"")&&(!s||t>=n&&t<=o)&&(!d||t%l==0))return!0;if(a.indexOf("float")>-1&&null!==t.match(new RegExp("^([0-9-]+)\\.([0-9]+)$"))&&(!s||t>=n&&t<=o)&&(!d||t%l==0))return!0}return!1},errorMessage:"",errorMessageKey:"badInt"}),t.formUtils.addValidator({name:"alphanumeric",validatorFunction:function(e,i,n,o){var a=i.valAttr("allowing"),r="",s=!1;if(a){r="^([a-zA-Z0-9"+a+"]+)$";var l=a.replace(/\\/g,"");l.indexOf(" ")>-1&&(s=!0,l=l.replace(" ",""),l+=o.andSpaces||t.formUtils.LANG.andSpaces),o.badAlphaNumericAndExtraAndSpaces&&o.badAlphaNumericAndExtra?this.errorMessage=s?o.badAlphaNumericAndExtraAndSpaces+l:o.badAlphaNumericAndExtra+l+o.badAlphaNumericExtra:this.errorMessage=o.badAlphaNumeric+o.badAlphaNumericExtra+l}else r="^([a-zA-Z0-9]+)$",this.errorMessage=o.badAlphaNumeric;return new RegExp(r).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 o=i.valAttr("format")||n.dateFormat||"yyyy-mm-dd",a="false"===i.valAttr("require-leading-zero");return!1!==t.formUtils.parseDate(e,o,a)},errorMessage:"",errorMessageKey:"badDate"}),t.formUtils.addValidator({name:"checkbox_group",validatorFunction:function(e,i,n,o,a){var r=!0,s=i.attr("name"),l=t('input[type=checkbox][name^="'+s+'"]',a),d=l.filter(":checked").length,u=i.valAttr("qty");if(void 0===u){var h=i.get(0).nodeName;alert('Attribute "data-validation-qty" is missing from '+h+" named "+i.attr("name"))}var c=t.formUtils.numericRangeCheck(d,u);switch(c[0]){case"out":this.errorMessage=o.groupCheckedRangeStart+u+o.groupCheckedEnd,r=!1;break;case"min":this.errorMessage=o.groupCheckedTooFewStart+c[1]+(o.groupCheckedTooFewEnd||o.groupCheckedEnd),r=!1;break;case"max":this.errorMessage=o.groupCheckedTooManyStart+c[1]+(o.groupCheckedTooManyEnd||o.groupCheckedEnd),r=!1;break;default:r=!0}if(!r){var f=function(){l.unbind("click",f),l.filter("*[data-validation]").validateInputOnBlur(o,n,!1,"blur")};l.bind("click",f)}return r}})}(t)});
|