!function(t,e){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,(function(t,e){"use strict";var i=[],n=Object.getPrototypeOf,o=i.slice,r=i.flat?function(t){return i.flat.call(t)}:function(t){return i.concat.apply([],t)},s=i.push,a=i.indexOf,l={},u=l.toString,c=l.hasOwnProperty,h=c.toString,d=h.call(Object),f={},p=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType},g=function(t){return null!=t&&t===t.window},m=t.document,v={type:!0,src:!0,nonce:!0,noModule:!0};function b(t,e,i){var n,o,r=(i=i||m).createElement("script");if(r.text=t,e)for(n in v)(o=e[n]||e.getAttribute&&e.getAttribute(n))&&r.setAttribute(n,o);i.head.appendChild(r).parentNode.removeChild(r)}function y(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?l[u.call(t)]||"object":typeof t}var _="3.5.0",x=function(t,e){return new x.fn.init(t,e)};function w(t){var e=!!t&&"length"in t&&t.length,i=y(t);return!p(t)&&!g(t)&&("array"===i||0===e||"number"==typeof e&&0+~]|"+q+")"+q+"*"),$=new RegExp(q+"|>"),U=new RegExp(H),Y=new RegExp("^"+R+"$"),K={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+F),PSEUDO:new RegExp("^"+H),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+q+"*(even|odd|(([+-]|)(\\d*)n|)"+q+"*(?:([+-]|)"+q+"*(\\d+)|))"+q+"*\\)|)","i"),bool:new RegExp("^(?:"+j+")$","i"),needsContext:new RegExp("^"+q+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+q+"*((?:-\\d)?\\d*)"+q+"*\\)|)(?=[^-]|$)","i")},X=/HTML$/i,G=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,tt=/[+~]/,et=new RegExp("\\\\[\\da-fA-F]{1,6}"+q+"?|\\\\([^\\r\\n\\f])","g"),it=function(t,e){var i="0x"+t.slice(1)-65536;return e||(i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320))},nt=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ot=function(t,e){return e?"\0"===t?"\ufffd":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},rt=function(){d()},st=_t((function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{N.apply(P=I.call(x.childNodes),x.childNodes)}catch(e){N={apply:P.length?function(t,e){E.apply(t,I.call(e))}:function(t,e){for(var i=t.length,n=0;t[i++]=e[n++];);t.length=i-1}}}function at(t,e,n,o){var r,a,u,c,h,p,v,b=e&&e.ownerDocument,x=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==x&&9!==x&&11!==x)return n;if(!o&&(d(e),e=e||f,g)){if(11!==x&&(h=J.exec(t)))if(r=h[1]){if(9===x){if(!(u=e.getElementById(r)))return n;if(u.id===r)return n.push(u),n}else if(b&&(u=b.getElementById(r))&&y(e,u)&&u.id===r)return n.push(u),n}else{if(h[2])return N.apply(n,e.getElementsByTagName(t)),n;if((r=h[3])&&i.getElementsByClassName&&e.getElementsByClassName)return N.apply(n,e.getElementsByClassName(r)),n}if(i.qsa&&!S[t+" "]&&(!m||!m.test(t))&&(1!==x||"object"!==e.nodeName.toLowerCase())){if(v=t,b=e,1===x&&($.test(t)||V.test(t))){for((b=tt.test(t)&&vt(e.parentNode)||e)===e&&i.scope||((c=e.getAttribute("id"))?c=c.replace(nt,ot):e.setAttribute("id",c=_)),a=(p=s(t)).length;a--;)p[a]=(c?"#"+c:":scope")+" "+yt(p[a]);v=p.join(",")}try{return N.apply(n,b.querySelectorAll(v)),n}catch(e){S(t,!0)}finally{c===_&&e.removeAttribute("id")}}}return l(t.replace(B,"$1"),e,n,o)}function lt(){var t=[];return function e(i,o){return t.push(i+" ")>n.cacheLength&&delete e[t.shift()],e[i+" "]=o}}function ut(t){return t[_]=!0,t}function ct(t){var e=f.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ht(t,e){for(var i=t.split("|"),o=i.length;o--;)n.attrHandle[i[o]]=e}function dt(t,e){var i=e&&t,n=i&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(n)return n;if(i)for(;i=i.nextSibling;)if(i===e)return-1;return t?1:-1}function ft(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function pt(t){return function(e){var i=e.nodeName.toLowerCase();return("input"===i||"button"===i)&&e.type===t}}function gt(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&st(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function mt(t){return ut((function(e){return e=+e,ut((function(i,n){for(var o,r=t([],i.length,e),s=r.length;s--;)i[o=r[s]]&&(i[o]=!(n[o]=i[o]))}))}))}function vt(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in i=at.support={},r=at.isXML=function(t){var e=(t.ownerDocument||t).documentElement;return!X.test(t.namespaceURI||e&&e.nodeName||"HTML")},d=at.setDocument=function(t){var e,o,s=t?t.ownerDocument||t:x;return s!=f&&9===s.nodeType&&s.documentElement&&(p=(f=s).documentElement,g=!r(f),x!=f&&(o=f.defaultView)&&o.top!==o&&(o.addEventListener?o.addEventListener("unload",rt,!1):o.attachEvent&&o.attachEvent("onunload",rt)),i.scope=ct((function(t){return p.appendChild(t).appendChild(f.createElement("div")),void 0!==t.querySelectorAll&&!t.querySelectorAll(":scope fieldset div").length})),i.attributes=ct((function(t){return t.className="i",!t.getAttribute("className")})),i.getElementsByTagName=ct((function(t){return t.appendChild(f.createComment("")),!t.getElementsByTagName("*").length})),i.getElementsByClassName=Q.test(f.getElementsByClassName),i.getById=ct((function(t){return p.appendChild(t).id=_,!f.getElementsByName||!f.getElementsByName(_).length})),i.getById?(n.filter.ID=function(t){var e=t.replace(et,it);return function(t){return t.getAttribute("id")===e}},n.find.ID=function(t,e){if(void 0!==e.getElementById&&g){var i=e.getElementById(t);return i?[i]:[]}}):(n.filter.ID=function(t){var e=t.replace(et,it);return function(t){var i=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return i&&i.value===e}},n.find.ID=function(t,e){if(void 0!==e.getElementById&&g){var i,n,o,r=e.getElementById(t);if(r){if((i=r.getAttributeNode("id"))&&i.value===t)return[r];for(o=e.getElementsByName(t),n=0;r=o[n++];)if((i=r.getAttributeNode("id"))&&i.value===t)return[r]}return[]}}),n.find.TAG=i.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):i.qsa?e.querySelectorAll(t):void 0}:function(t,e){var i,n=[],o=0,r=e.getElementsByTagName(t);if("*"===t){for(;i=r[o++];)1===i.nodeType&&n.push(i);return n}return r},n.find.CLASS=i.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&g)return e.getElementsByClassName(t)},v=[],m=[],(i.qsa=Q.test(f.querySelectorAll))&&(ct((function(t){var e;p.appendChild(t).innerHTML="",t.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+q+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||m.push("\\["+q+"*(?:value|"+j+")"),t.querySelectorAll("[id~="+_+"-]").length||m.push("~="),(e=f.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||m.push("\\["+q+"*name"+q+"*="+q+"*(?:''|\"\")"),t.querySelectorAll(":checked").length||m.push(":checked"),t.querySelectorAll("a#"+_+"+*").length||m.push(".#.+[+~]"),t.querySelectorAll("\\\f"),m.push("[\\r\\n\\f]")})),ct((function(t){t.innerHTML="";var e=f.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&m.push("name"+q+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),p.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),m.push(",.*:")}))),(i.matchesSelector=Q.test(b=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&ct((function(t){i.disconnectedMatch=b.call(t,"*"),b.call(t,"[s!='']:x"),v.push("!=",H)})),m=m.length&&new RegExp(m.join("|")),v=v.length&&new RegExp(v.join("|")),e=Q.test(p.compareDocumentPosition),y=e||Q.test(p.contains)?function(t,e){var i=9===t.nodeType?t.documentElement:t,n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},M=e?function(t,e){if(t===e)return h=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!i.sortDetached&&e.compareDocumentPosition(t)===n?t==f||t.ownerDocument==x&&y(x,t)?-1:e==f||e.ownerDocument==x&&y(x,e)?1:c?L(c,t)-L(c,e):0:4&n?-1:1)}:function(t,e){if(t===e)return h=!0,0;var i,n=0,o=t.parentNode,r=e.parentNode,s=[t],a=[e];if(!o||!r)return t==f?-1:e==f?1:o?-1:r?1:c?L(c,t)-L(c,e):0;if(o===r)return dt(t,e);for(i=t;i=i.parentNode;)s.unshift(i);for(i=e;i=i.parentNode;)a.unshift(i);for(;s[n]===a[n];)n++;return n?dt(s[n],a[n]):s[n]==x?-1:a[n]==x?1:0}),f},at.matches=function(t,e){return at(t,null,null,e)},at.matchesSelector=function(t,e){if(d(t),i.matchesSelector&&g&&!S[e+" "]&&(!v||!v.test(e))&&(!m||!m.test(e)))try{var n=b.call(t,e);if(n||i.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){S(e,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(et,it),t[3]=(t[3]||t[4]||t[5]||"").replace(et,it),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||at.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&at.error(t[0]),t},PSEUDO:function(t){var e,i=!t[6]&&t[2];return K.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":i&&U.test(i)&&(e=s(i,!0))&&(e=i.indexOf(")",i.length-e)-i.length)&&(t[0]=t[0].slice(0,e),t[2]=i.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(et,it).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=C[t+" "];return e||(e=new RegExp("(^|"+q+")"+t+"("+q+"|$)"))&&C(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,i){return function(n){var o=at.attr(n,t);return null==o?"!="===e:!e||(o+="","="===e?o===i:"!="===e?o!==i:"^="===e?i&&0===o.indexOf(i):"*="===e?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function A(t,e,i){return p(e)?x.grep(t,(function(t,n){return!!e.call(t,n,t)!==i})):e.nodeType?x.grep(t,(function(t){return t===e!==i})):"string"!=typeof e?x.grep(t,(function(t){return-1)[^>]*|#([\w-]+))$/;(x.fn.init=function(t,e,i){var n,o;if(!t)return this;if(i=i||P,"string"==typeof t){if(!(n="<"===t[0]&&">"===t[t.length-1]&&3<=t.length?[null,t,null]:D.exec(t))||!n[1]&&e)return!e||e.jquery?(e||i).find(t):this.constructor(e).find(t);if(n[1]){if(x.merge(this,x.parseHTML(n[1],(e=e instanceof x?e[0]:e)&&e.nodeType?e.ownerDocument||e:m,!0)),M.test(n[1])&&x.isPlainObject(e))for(n in e)p(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}return(o=m.getElementById(n[2]))&&(this[0]=o,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):p(t)?void 0!==i.ready?i.ready(t):t(x):x.makeArray(t,this)}).prototype=x.fn,P=x(m);var E=/^(?:parents|prev(?:Until|All))/,N={children:!0,contents:!0,next:!0,prev:!0};function I(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}x.fn.extend({has:function(t){var e=x(t,this),i=e.length;return this.filter((function(){for(var t=0;t\x20\t\r\n\f]*)/i,pt=/^$|^module$|\/(?:java|ecma)script/i;ct=m.createDocumentFragment().appendChild(m.createElement("div")),(ht=m.createElement("input")).setAttribute("type","radio"),ht.setAttribute("checked","checked"),ht.setAttribute("name","t"),ct.appendChild(ht),f.checkClone=ct.cloneNode(!0).cloneNode(!0).lastChild.checked,ct.innerHTML="",f.noCloneChecked=!!ct.cloneNode(!0).lastChild.defaultValue,ct.innerHTML="",f.option=!!ct.lastChild;var gt={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function mt(t,e){var i;return i=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&S(t,e)?x.merge([t],i):i}function vt(t,e){for(var i=0,n=t.length;i",""]);var bt=/<|&#?\w+;/;function yt(t,e,i,n,o){for(var r,s,a,l,u,c,h=e.createDocumentFragment(),d=[],f=0,p=t.length;f\s*$/g;function Dt(t,e){return S(t,"table")&&S(11!==e.nodeType?e:e.firstChild,"tr")&&x(t).children("tbody")[0]||t}function Et(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Nt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function It(t,e){var i,n,o,r,s,a;if(1===e.nodeType){if(X.hasData(t)&&(a=X.get(t).events))for(o in X.remove(e,"handle events"),a)for(i=0,n=a[o].length;i").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",i=function(t){e.remove(),i=null,t&&o("error"===t.type?404:200,t.type)}),m.head.appendChild(e[0])},abort:function(){i&&i()}}}));var $e,Ue=[],Ye=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ue.pop()||x.expando+"_"+ke.guid++;return this[t]=!0,t}}),x.ajaxPrefilter("json jsonp",(function(e,i,n){var o,r,s,a=!1!==e.jsonp&&(Ye.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ye.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return o=e.jsonpCallback=p(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ye,"$1"+o):!1!==e.jsonp&&(e.url+=(Ce.test(e.url)?"&":"?")+e.jsonp+"="+o),e.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},e.dataTypes[0]="json",r=t[o],t[o]=function(){s=arguments},n.always((function(){void 0===r?x(t).removeProp(o):t[o]=r,e[o]&&(e.jsonpCallback=i.jsonpCallback,Ue.push(o)),s&&p(r)&&r(s[0]),s=r=void 0})),"script"})),f.createHTMLDocument=(($e=m.implementation.createHTMLDocument("").body).innerHTML="
",2===$e.childNodes.length),x.parseHTML=function(t,e,i){return"string"!=typeof t?[]:("boolean"==typeof e&&(i=e,e=!1),e||(f.createHTMLDocument?((n=(e=m.implementation.createHTMLDocument("")).createElement("base")).href=m.location.href,e.head.appendChild(n)):e=m),r=!i&&[],(o=M.exec(t))?[e.createElement(o[1])]:(o=yt([t],e,r),r&&r.length&&x(r).remove(),x.merge([],o.childNodes)));var n,o,r},x.fn.load=function(t,e,i){var n,o,r,s=this,a=t.indexOf(" ");return-1").append(x.parseHTML(t)).find(n):t)})).always(i&&function(t,e){s.each((function(){i.apply(this,r||[t.responseText,e,t])}))}),this},x.expr.pseudos.animated=function(t){return x.grep(x.timers,(function(e){return t===e.elem})).length},x.offset={setOffset:function(t,e,i){var n,o,r,s,a,l,u=x.css(t,"position"),c=x(t),h={};"static"===u&&(t.style.position="relative"),a=c.offset(),r=x.css(t,"top"),l=x.css(t,"left"),("absolute"===u||"fixed"===u)&&-1<(r+l).indexOf("auto")?(s=(n=c.position()).top,o=n.left):(s=parseFloat(r)||0,o=parseFloat(l)||0),p(e)&&(e=e.call(t,i,x.extend({},a))),null!=e.top&&(h.top=e.top-a.top+s),null!=e.left&&(h.left=e.left-a.left+o),"using"in e?e.using.call(t,h):("number"==typeof h.top&&(h.top+="px"),"number"==typeof h.left&&(h.left+="px"),c.css(h))}},x.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){x.offset.setOffset(this,t,e)}));var e,i,n=this[0];return n?n.getClientRects().length?{top:(e=n.getBoundingClientRect()).top+(i=n.ownerDocument.defaultView).pageYOffset,left:e.left+i.pageXOffset}:{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,i,n=this[0],o={top:0,left:0};if("fixed"===x.css(n,"position"))e=n.getBoundingClientRect();else{for(e=this.offset(),i=n.ownerDocument,t=n.offsetParent||i.documentElement;t&&(t===i.body||t===i.documentElement)&&"static"===x.css(t,"position");)t=t.parentNode;t&&t!==n&&1===t.nodeType&&((o=x(t).offset()).top+=x.css(t,"borderTopWidth",!0),o.left+=x.css(t,"borderLeftWidth",!0))}return{top:e.top-o.top-x.css(n,"marginTop",!0),left:e.left-o.left-x.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===x.css(t,"position");)t=t.offsetParent;return t||nt}))}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var i="pageYOffset"===e;x.fn[t]=function(n){return B(this,(function(t,n,o){var r;if(g(t)?r=t:9===t.nodeType&&(r=t.defaultView),void 0===o)return r?r[e]:t[n];r?r.scrollTo(i?r.pageXOffset:o,i?o:r.pageYOffset):t[n]=o}),t,n,arguments.length)}})),x.each(["top","left"],(function(t,e){x.cssHooks[e]=Bt(f.pixelPosition,(function(t,i){if(i)return i=zt(t,e),qt.test(i)?x(t).position()[e]+"px":i}))})),x.each({Height:"height",Width:"width"},(function(t,e){x.each({padding:"inner"+t,content:e,"":"outer"+t},(function(i,n){x.fn[n]=function(o,r){var s=arguments.length&&(i||"boolean"!=typeof o),a=i||(!0===o||!0===r?"margin":"border");return B(this,(function(e,i,o){var r;return g(e)?0===n.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+t],r["scroll"+t],e.body["offset"+t],r["offset"+t],r["client"+t])):void 0===o?x.css(e,i,a):x.style(e,i,o,a)}),e,s?o:void 0,s)}}))})),x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){x.fn[e]=function(t){return this.on(e,t)}})),x.fn.extend({bind:function(t,e,i){return this.on(t,null,e,i)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,i,n){return this.on(e,t,i,n)},undelegate:function(t,e,i){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",i)},hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),x.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(t,e){x.fn[e]=function(t,i){return 01&&(o-=1)),[360*o,100*r,100*u]},o.rgb.hwb=function(t){var e=t[0],i=t[1],n=t[2];return[o.rgb.hsl(t)[0],1/255*Math.min(e,Math.min(i,n))*100,100*(n=1-1/255*Math.max(e,Math.max(i,n)))]},o.rgb.cmyk=function(t){var e,i=t[0]/255,n=t[1]/255,o=t[2]/255;return[100*((1-i-(e=Math.min(1-i,1-n,1-o)))/(1-e)||0),100*((1-n-e)/(1-e)||0),100*((1-o-e)/(1-e)||0),100*e]},o.rgb.keyword=function(t){var n=i[t];if(n)return n;var o,r,s,a=1/0;for(var l in e)if(e.hasOwnProperty(l)){var u=(r=t,s=e[l],Math.pow(r[0]-s[0],2)+Math.pow(r[1]-s[1],2)+Math.pow(r[2]-s[2],2));u.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)+.1805*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)),100*(.2126*e+.7152*i+.0722*n),100*(.0193*e+.1192*i+.9505*n)]},o.rgb.lab=function(t){var e=o.rgb.xyz(t),i=e[0],n=e[1],r=e[2];return n/=100,r/=108.883,i=(i/=95.047)>.008856?Math.pow(i,1/3):7.787*i+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(i-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},o.hsl.rgb=function(t){var e,i,n,o,r,s=t[0]/360,a=t[1]/100,l=t[2]/100;if(0===a)return[r=255*l,r,r];e=2*l-(i=l<.5?l*(1+a):l+a-l*a),o=[0,0,0];for(var u=0;u<3;u++)(n=s+1/3*-(u-1))<0&&n++,n>1&&n--,o[u]=255*(r=6*n<1?e+6*(i-e)*n:2*n<1?i:3*n<2?e+(i-e)*(2/3-n)*6:e);return o},o.hsl.hsv=function(t){var e=t[0],i=t[1]/100,n=t[2]/100,o=i,r=Math.max(n,.01);return i*=(n*=2)<=1?n:2-n,o*=r<=1?r:2-r,[e,100*(0===n?2*o/(r+o):2*i/(n+i)),(n+i)/2*100]},o.hsv.rgb=function(t){var e=t[0]/60,i=t[1]/100,n=t[2]/100,o=Math.floor(e)%6,r=e-Math.floor(e),s=255*n*(1-i),a=255*n*(1-i*r),l=255*n*(1-i*(1-r));switch(n*=255,o){case 0:return[n,l,s];case 1:return[a,n,s];case 2:return[s,n,l];case 3:return[s,a,n];case 4:return[l,s,n];case 5:return[n,s,a]}},o.hsv.hsl=function(t){var e,i,n,o=t[0],r=t[1]/100,s=t[2]/100,a=Math.max(s,.01);return n=(2-r)*s,i=r*a,[o,100*(i=(i/=(e=(2-r)*a)<=1?e:2-e)||0),100*(n/=2)]},o.hwb.rgb=function(t){var e,i,n,o,r,s,a,l=t[0]/360,u=t[1]/100,c=t[2]/100,h=u+c;switch(h>1&&(u/=h,c/=h),n=6*l-(e=Math.floor(6*l)),0!=(1&e)&&(n=1-n),o=u+n*((i=1-c)-u),e){default:case 6:case 0:r=i,s=o,a=u;break;case 1:r=o,s=i,a=u;break;case 2:r=u,s=i,a=o;break;case 3:r=u,s=o,a=i;break;case 4:r=o,s=u,a=i;break;case 5:r=i,s=u,a=o}return[255*r,255*s,255*a]},o.cmyk.rgb=function(t){var e=t[1]/100,i=t[2]/100,n=t[3]/100;return[255*(1-Math.min(1,t[0]/100*(1-n)+n)),255*(1-Math.min(1,e*(1-n)+n)),255*(1-Math.min(1,i*(1-n)+n))]},o.xyz.rgb=function(t){var e,i,n,o=t[0]/100,r=t[1]/100,s=t[2]/100;return i=-.9689*o+1.8758*r+.0415*s,n=.0557*o+-.204*r+1.057*s,e=(e=3.2406*o+-1.5372*r+-.4986*s)>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:12.92*i,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,[255*(e=Math.min(Math.max(0,e),1)),255*(i=Math.min(Math.max(0,i),1)),255*(n=Math.min(Math.max(0,n),1))]},o.xyz.lab=function(t){var e=t[0],i=t[1],n=t[2];return i/=100,n/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116)-16,500*(e-i),200*(i-(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116))]},o.lab.xyz=function(t){var e,i,n;e=t[1]/500+(i=(t[0]+16)/116),n=i-t[2]/200;var o=Math.pow(i,3),r=Math.pow(e,3),s=Math.pow(n,3);return i=o>.008856?o:(i-16/116)/7.787,e=r>.008856?r:(e-16/116)/7.787,n=s>.008856?s:(n-16/116)/7.787,[e*=95.047,i*=100,n*=108.883]},o.lab.lch=function(t){var e,i=t[0],n=t[1],o=t[2];return(e=360*Math.atan2(o,n)/2/Math.PI)<0&&(e+=360),[i,Math.sqrt(n*n+o*o),e]},o.lch.lab=function(t){var e,i=t[1];return e=t[2]/360*2*Math.PI,[t[0],i*Math.cos(e),i*Math.sin(e)]},o.rgb.ansi16=function(t){var e=t[0],i=t[1],n=t[2],r=1 in arguments?arguments[1]:o.rgb.hsv(t)[2];if(0===(r=Math.round(r/50)))return 30;var s=30+(Math.round(n/255)<<2|Math.round(i/255)<<1|Math.round(e/255));return 2===r&&(s+=60),s},o.hsv.ansi16=function(t){return o.rgb.ansi16(o.hsv.rgb(t),t[2])},o.rgb.ansi256=function(t){var e=t[0],i=t[1],n=t[2];return e===i&&i===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(i/255*5)+Math.round(n/255*5)},o.ansi16.rgb=function(t){var e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),[e=e/10.5*255,e,e];var i=.5*(1+~~(t>50));return[(1&e)*i*255,(e>>1&1)*i*255,(e>>2&1)*i*255]},o.ansi256.rgb=function(t){if(t>=232){var e=10*(t-232)+8;return[e,e,e]}var i;return t-=16,[Math.floor(t/36)/5*255,Math.floor((i=t%36)/6)/5*255,i%6/5*255]},o.rgb.hex=function(t){var e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},o.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var i=e[0];3===e[0].length&&(i=i.split("").map((function(t){return t+t})).join(""));var n=parseInt(i,16);return[n>>16&255,n>>8&255,255&n]},o.rgb.hcg=function(t){var e,i=t[0]/255,n=t[1]/255,o=t[2]/255,r=Math.max(Math.max(i,n),o),s=Math.min(Math.min(i,n),o),a=r-s;return e=a<=0?0:r===i?(n-o)/a%6:r===n?2+(o-i)/a:4+(i-n)/a+4,e/=6,[360*(e%=1),100*a,100*(a<1?s/(1-a):0)]},o.hsl.hcg=function(t){var e,i=t[1]/100,n=t[2]/100,o=0;return(e=n<.5?2*i*n:2*i*(1-n))<1&&(o=(n-.5*e)/(1-e)),[t[0],100*e,100*o]},o.hsv.hcg=function(t){var e=t[2]/100,i=t[1]/100*e,n=0;return i<1&&(n=(e-i)/(1-i)),[t[0],100*i,100*n]},o.hcg.rgb=function(t){var e=t[1]/100,i=t[2]/100;if(0===e)return[255*i,255*i,255*i];var n,o=[0,0,0],r=t[0]/360%1*6,s=r%1,a=1-s;switch(Math.floor(r)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=a,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=a,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=a}return[255*(e*o[0]+(n=(1-e)*i)),255*(e*o[1]+n),255*(e*o[2]+n)]},o.hcg.hsv=function(t){var e=t[1]/100,i=e+t[2]/100*(1-e),n=0;return i>0&&(n=e/i),[t[0],100*n,100*i]},o.hcg.hsl=function(t){var e=t[1]/100,i=t[2]/100*(1-e)+.5*e,n=0;return i>0&&i<.5?n=e/(2*i):i>=.5&&i<1&&(n=e/(2*(1-i))),[t[0],100*n,100*i]},o.hcg.hwb=function(t){var e=t[1]/100,i=e+t[2]/100*(1-e);return[t[0],100*(i-e),100*(1-i)]},o.hwb.hcg=function(t){var e=1-t[2]/100,i=e-t[1]/100,n=0;return i<1&&(n=(e-i)/(1-i)),[t[0],100*i,100*n]},o.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},o.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},o.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},o.gray.hsl=o.gray.hsv=function(t){return[0,0,t[0]]},o.gray.hwb=function(t){return[0,100,t[0]]},o.gray.cmyk=function(t){return[0,0,0,t[0]]},o.gray.lab=function(t){return[t[0],0,0]},o.gray.hex=function(t){var e=255&Math.round(t[0]/100*255),i=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(i.length)+i},o.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}}));function n(t){var e=function(){for(var t={},e=Object.keys(i),n=e.length,o=0;o1&&(e=Array.prototype.slice.call(arguments));var i=t(e);if("object"==typeof i)for(var n=i.length,o=0;o1&&(e=Array.prototype.slice.call(arguments)),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(n)}))}));var a=s,l={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]},u={getRgba:c,getHsla:h,getRgb:function(t){var e=c(t);return e&&e.slice(0,3)},getHsl:function(t){var e=h(t);return e&&e.slice(0,3)},getHwb:d,getAlpha:function(t){var e=c(t);return e?e[3]:(e=h(t))?e[3]:(e=d(t))?e[3]:void 0},hexString:function(t,e){return e=void 0!==e&&3===t.length?e:t[3],"#"+v(t[0])+v(t[1])+v(t[2])+(e>=0&&e<1?v(Math.round(255*e)):"")},rgbString:function(t,e){return e<1||t[3]&&t[3]<1?f(t,e):"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:f,percentString:function(t,e){return e<1||t[3]&&t[3]<1?p(t,e):"rgb("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%)"},percentaString:p,hslString:function(t,e){return e<1||t[3]&&t[3]<1?g(t,e):"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:g,hwbString:function(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:"")+")"},keyword:function(t){return b[t.slice(0,3)]}};function c(t){if(t){var e=[0,0,0],i=1,n=t.match(/^#([a-fA-F0-9]{3,4})$/i),o="";if(n){o=(n=n[1])[3];for(var r=0;ri?(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=t,n=void 0===e?.5:e,o=2*n-1,r=this.alpha()-i.alpha(),s=((o*r==-1?o:(o+r)/(1+o*r))+1)/2,a=1-s;return this.rgb(s*this.red()+a*i.red(),s*this.green()+a*i.green(),s*this.blue()+a*i.blue()).alpha(this.alpha()*n+i.alpha()*(1-n))},toJSON:function(){return this.rgb()},clone:function(){var t,e,i=new _,n=this.values,o=i.values;for(var r in n)n.hasOwnProperty(r)&&("[object Array]"===(e={}.toString.call(t=n[r]))?o[r]=t.slice(0):"[object Number]"===e?o[r]=t:console.error("unexpected color value:",t));return i}},_.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},_.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},_.prototype.getValues=function(t){for(var e=this.values,i={},n=0;n=0;o--)e.call(i,t[o],o);else for(o=0;o=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1===t?1:(i||(i=.3),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i))},easeOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1===t?1:(i||(i=.3),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/i)+1)},easeInOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:2==(t/=.5)?1:(i||(i=.45),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),t<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-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}},T={effects:O};C.easingEffects=O;var S=Math.PI,M=S/180,A=2*S,P=S/2,D=S/4,E=2*S/3,N={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,i,n,o,r){if(r){var s=Math.min(r,o/2,n/2),a=e+s,l=i+s,u=e+n-s,c=i+o-s;t.moveTo(e,l),ae.left-1e-6&&t.xe.top-1e-6&&t.y0&&this.requestAnimationFrame()},advance:function(){for(var t,e,i,n,o=this.animations,r=0;r=i?(z.callback(t.onAnimationComplete,[t],e),e.animating=!1,o.splice(r,1)):++r}},G=z.options.resolve,Z=["push","pop","shift","splice","unshift"];function Q(t,e){var i=t._chartjs;if(i){var n=i.listeners,o=n.indexOf(e);-1!==o&&n.splice(o,1),n.length>0||(Z.forEach((function(e){delete t[e]})),delete t._chartjs)}}var J=function(t,e){this.initialize(t,e)};z.extend(J.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(t,e){var i=this;i.chart=t,i.index=e,i.linkScales(),i.addElements(),i._type=i.getMeta().type},updateIndex:function(t){this.index=t},linkScales:function(){var t=this.getMeta(),e=this.chart,i=e.scales,n=this.getDataset(),o=e.options.scales;null!==t.xAxisID&&t.xAxisID in i&&!n.xAxisID||(t.xAxisID=n.xAxisID||o.xAxes[0].id),null!==t.yAxisID&&t.yAxisID in i&&!n.yAxisID||(t.yAxisID=n.yAxisID||o.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]},_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())},reset:function(){this._update(!0)},destroy:function(){this._data&&Q(this._data,this)},createMetaDataset:function(){var t=this.datasetElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(t){var e=this.dataElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index,_index:t})},addElements:function(){var t,e,i=this.getMeta(),n=this.getDataset().data||[],o=i.data;for(t=0,e=n.length;ti&&this.insertElements(i,n-i)},insertElements:function(t,e){for(var i=0;io?t.arc(s,a,e.innerRadius-o,n+(r=o/e.innerRadius),i-r,!0):t.arc(s,a,o,n+Math.PI/2,i-Math.PI/2),t.closePath(),t.clip()}j._set("global",{elements:{arc:{backgroundColor:j.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var nt=U.extend({_type:"arc",inLabelRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)a;)o-=et;for(;o=s&&o<=a&&r>=i.innerRadius&&r<=i.outerRadius}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,e=this._chart.ctx,i=this._view,n="inner"===i.borderAlign?.33:0,o={x:i.x,y:i.y,innerRadius:i.innerRadius,outerRadius:Math.max(i.outerRadius-n,0),pixelMargin:n,startAngle:i.startAngle,endAngle:i.endAngle,fullCircles:Math.floor(i.circumference/et)};if(e.save(),e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,o.fullCircles){for(o.endAngle=o.startAngle+et,e.beginPath(),e.arc(o.x,o.y,o.outerRadius,o.startAngle,o.endAngle),e.arc(o.x,o.y,o.innerRadius,o.endAngle,o.startAngle,!0),e.closePath(),t=0;t=r.left&&e<=r.right)&&(o||i>=r.top&&i<=r.bottom)}j._set("global",{elements:{rectangle:{backgroundColor:ht,borderColor:ht,borderSkipped:"bottom",borderWidth:0}}});var mt=U.extend({_type:"rectangle",draw:function(){var t=this._chart.ctx,e=this._view,i=function(t){var e=ft(t),i=e.right-e.left,n=e.bottom-e.top,o=function(t,e,i){var n,o,r,s,a=t.borderWidth,l=function(t){var e=t.borderSkipped,i={};return e?(t.horizontal?t.base>t.x&&(e=pt(e,"left","right")):t.basei?i:n,r:l.right||o<0?0:o>e?e:o,b:l.bottom||r<0?0:r>i?i:r,l:l.left||s<0?0:s>e?e:s}}(t,i/2,n/2);return{outer:{x:e.left,y:e.top,w:i,h:n},inner:{x:e.left+o.l,y:e.top+o.t,w:i-o.l-o.r,h:n-o.t-o.b}}}(e),n=i.outer,o=i.inner;t.fillStyle=e.backgroundColor,t.fillRect(n.x,n.y,n.w,n.h),n.w===o.w&&n.h===o.h||(t.save(),t.beginPath(),t.rect(n.x,n.y,n.w,n.h),t.clip(),t.fillStyle=e.borderColor,t.rect(o.x,o.y,o.w,o.h),t.fill("evenodd"),t.restore())},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return gt(this._view,t,e)},inLabelRange:function(t,e){var i=this._view;return dt(i)?gt(i,t,null):gt(i,null,e)},inXRange:function(t){return gt(this._view,t,null)},inYRange:function(t){return gt(this._view,null,t)},getCenterPoint:function(){var t,e,i=this._view;return dt(i)?(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 dt(t)?t.width*Math.abs(t.y-t.base):t.height*Math.abs(t.x-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}}),vt={},bt=st,yt=ct,_t=mt;vt.Arc=nt,vt.Line=bt,vt.Point=yt,vt.Rectangle=_t;var xt=z._deprecated,wt=z.valueOrDefault;j._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),j._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var kt=tt.extend({dataElementType:vt.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var t,e,i=this;tt.prototype.initialize.apply(i,arguments),(t=i.getMeta()).stack=i.getDataset().stack,t.bar=!0,e=i._getIndexScale().options,xt("bar chart",e.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),xt("bar chart",e.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),xt("bar chart",e.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),xt("bar chart",i._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),xt("bar chart",e.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(t){var e,i,n=this.getMeta().data;for(this._ruler=this.getRuler(),e=0,i=n.length;e=0&&g.min>=0?g.min:g.max,_=void 0===g.start?g.end:g.max>=0&&g.min>=0?g.max-g.min:g.min-g.max,x=p.length;if(v||void 0===v&&void 0!==b)for(n=0;n=0&&u.max>=0?u.max:u.min,(g.min<0&&r<0||g.max>=0&&r>0)&&(y+=r));return s=h.getPixelForValue(y),l=(a=h.getPixelForValue(y+_))-s,void 0!==m&&Math.abs(l)=0&&!d||_<0&&d?s-m:s+m),{size:l,base:s,head:a,center:a+l/2}},calculateBarIndexPixels:function(t,e,i,n){var o="flex"===n.barThickness?function(t,e,i){var n,o=e.pixels,r=o[t],s=t>0?o[t-1]:null,a=t0?Math.min(s,Math.abs(n-i)):s,i=n;return s}(e.scale,e.pixels):-1;return z.isNullOrUndef(r)?(n=l*i.categoryPercentage,o=i.barPercentage):(n=r*s,o=1),{chunk:n/s,ratio:o,start:a-n/2}}(e,i,n),r=this.getStackIndex(t,this.getMeta().stack),s=o.start+o.chunk*r+o.chunk/2,a=Math.min(wt(n.maxBarThickness,1/0),o.chunk*o.ratio);return{base:s-a/2,head:s+a/2,center:s,size:a}},draw:function(){var t=this.chart,e=this._getValueScale(),i=this.getMeta().data,n=this.getDataset(),o=i.length,r=0;for(z.canvas.clipArea(t.ctx,t.chartArea);r=Mt?-At:m<-Mt?At:0)+p,b=Math.cos(m),y=Math.sin(m),_=Math.cos(v),x=Math.sin(v),w=m<=0&&v>=0||v>=At,k=m<=Pt&&v>=Pt||v>=At+Pt,C=m<=-Pt&&v>=-Pt||v>=Mt+Pt,O=m===-Mt||v>=Mt?-1:Math.min(b,b*f,_,_*f),T=C?-1:Math.min(y,y*f,x,x*f),S=w?1:Math.max(b,b*f,_,_*f),M=k?1:Math.max(y,y*f,x,x*f);a=(S-O)/2,l=(M-T)/2,u=-(S+O)/2,c=-(M+T)/2}for(e=0,i=d.length;e0&&!isNaN(t)?At*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,i,n,o,r,s,a,l,u=0,c=this.chart;if(!t)for(e=0,i=c.data.datasets.length;e(u=(a=s.borderWidth)>u?a:u)?l:u);return u},setHoverStyle:function(t){var e=t._model,i=t._options,n=z.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=St(i.hoverBackgroundColor,n(i.backgroundColor)),e.borderColor=St(i.hoverBorderColor,n(i.borderColor)),e.borderWidth=St(i.hoverBorderWidth,i.borderWidth)},_getRingWeightOffset:function(t){for(var e=0,i=0;i0&&Lt(l[t-1]._model,a)&&(i.controlPointPreviousX=u(i.controlPointPreviousX,a.left,a.right),i.controlPointPreviousY=u(i.controlPointPreviousY,a.top,a.bottom)),t0&&(r=t.getDatasetMeta(r[0]._datasetIndex).data),r},"x-axis":function(t,e){return Zt(t,e,{intersect:!1})},point:function(t,e){return Kt(t,Ut(e,t))},nearest:function(t,e,i){var n=Ut(e,t);i.axis=i.axis||"xy";var o=Gt(i.axis);return Xt(t,n,i.intersect,o)},x:function(t,e,i){var n=Ut(e,t),o=[],r=!1;return Yt(t,(function(t){t.inXRange(n.x)&&o.push(t),t.inRange(n.x,n.y)&&(r=!0)})),i.intersect&&!r&&(o=[]),o},y:function(t,e,i){var n=Ut(e,t),o=[],r=!1;return Yt(t,(function(t){t.inYRange(n.y)&&o.push(t),t.inRange(n.x,n.y)&&(r=!0)})),i.intersect&&!r&&(o=[]),o}}},Jt=z.extend;function te(t,e){return z.where(t,(function(t){return t.pos===e}))}function ee(t,e){return t.sort((function(t,i){var n=e?i:t,o=e?t:i;return n.weight===o.weight?n.index-o.index:n.weight-o.weight}))}function ie(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function ne(t,e,i){var n,o,r=i.box,s=t.maxPadding;if(i.size&&(t[i.pos]-=i.size),i.size=i.horizontal?r.height:r.width,t[i.pos]+=i.size,r.getPadding){var a=r.getPadding();s.top=Math.max(s.top,a.top),s.left=Math.max(s.left,a.left),s.bottom=Math.max(s.bottom,a.bottom),s.right=Math.max(s.right,a.right)}if(n=e.outerWidth-ie(s,t,"left","right"),o=e.outerHeight-ie(s,t,"top","bottom"),n!==t.w||o!==t.h)return t.w=n,t.h=o,i.horizontal?n!==t.w:o!==t.h}function oe(t,e){var i=e.maxPadding;return function(t){var n={left:0,top:0,right:0,bottom:0};return t.forEach((function(t){n[t]=Math.max(e[t],i[t])})),n}(t?["left","right"]:["top","bottom"])}function re(t,e,i){var n,o,r,s,a,l,u=[];for(n=0,o=t.length;ndiv{position:absolute;width:1000000px;height:1000000px;left:0;top:0}.chartjs-size-monitor-shrink>div{position:absolute;width:200%;height:200%;left:0;top:0}"}))&&ae.default||ae,ce="$chartjs",he="chartjs-size-monitor",de="chartjs-render-monitor",fe=["animationstart","webkitAnimationStart"],pe={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function ge(t,e){var i=z.getStyle(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?Number(n[1]):void 0}var me=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}()&&{passive:!0};function ve(t,e,i){t.addEventListener(e,i,me)}function be(t,e,i){t.removeEventListener(e,i,me)}function ye(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 _e(t){var e=document.createElement("div");return e.className=t||"",e}var xe={disableCSSInjection:!1,_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,_ensureLoaded:function(t){if(!this.disableCSSInjection){var e=t.getRootNode?t.getRootNode():document;!function(t,e){var i=t[ce]||(t[ce]={});if(!i.containsStyles){i.containsStyles=!0,e="/* Chart.js */\n"+e;var n=document.createElement("style");n.setAttribute("type","text/css"),n.appendChild(document.createTextNode(e)),t.appendChild(n)}}(e.host?e:document.head,ue)}},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?(this._ensureLoaded(t),function(t,e){var i=t.style,n=t.getAttribute("height"),o=t.getAttribute("width");if(t[ce]={initial:{height:n,width:o,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",null===o||""===o){var r=ge(t,"width");void 0!==r&&(t.width=r)}if(null===n||""===n)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var s=ge(t,"height");void 0!==r&&(t.height=s)}}(t,e),i):null},releaseContext:function(t){var e=t.canvas;if(e[ce]){var i=e[ce].initial;["height","width"].forEach((function(t){var n=i[t];z.isNullOrUndef(n)?e.removeAttribute(t):e.setAttribute(t,n)})),z.each(i.style||{},(function(t,i){e.style[i]=t})),e.width=e.width,delete e[ce]}},addEventListener:function(t,e,i){var n=t.canvas;if("resize"!==e){var o=i[ce]||(i[ce]={});ve(n,e,(o.proxies||(o.proxies={}))[t.id+"_"+e]=function(e){i(function(t,e){var i=pe[t.type]||t.type,n=z.getRelativePosition(t,e);return ye(i,e,n.x,n.y,t)}(e,t))})}else!function(t,e,i){var n,o,r,s,a=t[ce]||(t[ce]={}),l=a.resizer=function(t){var e=_e(he),i=_e(he+"-expand"),n=_e(he+"-shrink");i.appendChild(_e()),n.appendChild(_e()),e.appendChild(i),e.appendChild(n),e._reset=function(){i.scrollLeft=1e6,i.scrollTop=1e6,n.scrollLeft=1e6,n.scrollTop=1e6};var o=function(){e._reset(),t()};return ve(i,"scroll",o.bind(i,"expand")),ve(n,"scroll",o.bind(n,"shrink")),e}((n=function(){if(a.resizer){var n=i.options.maintainAspectRatio&&t.parentNode,o=n?n.clientWidth:0;e(ye("resize",i)),n&&n.clientWidth0){var r=t[0];r.label?i=r.label:r.xLabel?i=r.xLabel:o>0&&r.index-1?t.split("\n"):t}function Pe(t){var e=j.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,rtl:t.rtl,textDirection:t.textDirection,bodyFontColor:t.bodyFontColor,_bodyFontFamily:Oe(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:Oe(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:Oe(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:Oe(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:Oe(t.titleFontStyle,e.defaultFontStyle),titleFontSize:Oe(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:Oe(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:Oe(t.footerFontStyle,e.defaultFontStyle),footerFontSize:Oe(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 De(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function Ee(t){return Me([],Ae(t))}var Ne=U.extend({initialize:function(){this._model=Pe(this._options),this._lastActive=[]},getTitle:function(){var t=this,e=t._options,i=e.callbacks,n=i.beforeTitle.apply(t,arguments),o=i.title.apply(t,arguments),r=i.afterTitle.apply(t,arguments),s=[];return s=Me(s,Ae(n)),s=Me(s,Ae(o)),Me(s,Ae(r))},getBeforeBody:function(){return Ee(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,e){var i=this,n=i._options.callbacks,o=[];return z.each(t,(function(t){var r={before:[],lines:[],after:[]};Me(r.before,Ae(n.beforeLabel.call(i,t,e))),Me(r.lines,n.label.call(i,t,e)),Me(r.after,Ae(n.afterLabel.call(i,t,e))),o.push(r)})),o},getAfterBody:function(){return Ee(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this,e=t._options.callbacks,i=e.beforeFooter.apply(t,arguments),n=e.footer.apply(t,arguments),o=e.afterFooter.apply(t,arguments),r=[];return r=Me(r,Ae(i)),r=Me(r,Ae(n)),Me(r,Ae(o))},update:function(t){var e,i,n,o,r,s,a,l,u,c,h=this,d=h._options,f=h._model,p=h._model=Pe(d),g=h._active,m=h._data,v={xAlign:f.xAlign,yAlign:f.yAlign},b={x:f.x,y:f.y},y={width:f.width,height:f.height},_={x:f.caretX,y:f.caretY};if(g.length){p.opacity=1;var x=[],w=[];_=Se[d.position].call(h,g,h._eventPosition);var k=[];for(e=0,i=g.length;en.width&&(o=n.width-e.width),o<0&&(o=0)),"top"===l?r+=u:r-="bottom"===l?e.height+u:e.height/2,"center"===l?"left"===a?o+=u:"right"===a&&(o-=u):"left"===a?o-=c:"right"===a&&(o+=c),{x:o,y:r}}(p,y=function(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),a=e.title.length,l=e.footer.length,u=e.titleFontSize,c=e.bodyFontSize,h=e.footerFontSize;n+=a*u,n+=a?(a-1)*e.titleSpacing:0,n+=a?e.titleMarginBottom:0,n+=(s+=e.beforeBody.length+e.afterBody.length)*c,n+=s?(s-1)*e.bodySpacing:0,n+=l?e.footerMarginTop:0,n+=l*h,n+=l?(l-1)*e.footerSpacing:0;var d=0,f=function(t){o=Math.max(o,i.measureText(t).width+d)};return i.font=z.fontString(u,e._titleFontStyle,e._titleFontFamily),z.each(e.title,f),i.font=z.fontString(c,e._bodyFontStyle,e._bodyFontFamily),z.each(e.beforeBody.concat(e.afterBody),f),d=e.displayColors?c+2:0,z.each(r,(function(t){z.each(t.before,f),z.each(t.lines,f),z.each(t.after,f)})),d=0,i.font=z.fontString(h,e._footerFontStyle,e._footerFontFamily),z.each(e.footer,f),{width:o+=2*e.xPadding,height:n}}(this,p),v=function(t,e){var i,n,o,r,s,a=t._model,l=t._chart,u=t._chart.chartArea,c="center",h="center";a.yl.height-e.height&&(h="bottom");var d=(u.left+u.right)/2,f=(u.top+u.bottom)/2;"center"===h?(i=function(t){return t<=d},n=function(t){return t>d}):(i=function(t){return t<=e.width/2},n=function(t){return t>=l.width-e.width/2}),o=function(t){return t+e.width+a.caretSize+a.caretPadding>l.width},r=function(t){return t-e.width-a.caretSize-a.caretPadding<0},s=function(t){return t<=f?"top":"bottom"},i(a.x)?(c="left",o(a.x)&&(c="center",h=s(a.y))):n(a.x)&&(c="right",r(a.x)&&(c="center",h=s(a.y)));var p=t._options;return{xAlign:p.xAlign?p.xAlign:c,yAlign:p.yAlign?p.yAlign:h}}(this,y),h._chart)}else p.opacity=0;return p.xAlign=v.xAlign,p.yAlign=v.yAlign,p.x=b.x,p.y=b.y,p.width=y.width,p.height=y.height,p.caretX=_.x,p.caretY=_.y,h._model=p,t&&d.custom&&d.custom.call(h,p),h},drawCaret:function(t,e){var i=this._chart.ctx,n=this.getCaretPosition(t,e,this._view);i.lineTo(n.x1,n.y1),i.lineTo(n.x2,n.y2),i.lineTo(n.x3,n.y3)},getCaretPosition:function(t,e,i){var n,o,r,s,a,l,u=i.caretSize,c=i.cornerRadius,h=i.xAlign,d=i.yAlign,f=t.x,p=t.y,g=e.width,m=e.height;if("center"===d)a=p+m/2,"left"===h?(o=(n=f)-u,r=n,s=a+u,l=a-u):(o=(n=f+g)+u,r=n,s=a-u,l=a+u);else if("left"===h?(n=(o=f+c+u)-u,r=o+u):"right"===h?(n=(o=f+g-c-u)-u,r=o+u):(n=(o=i.caretX)-u,r=o+u),"top"===d)a=(s=p)-u,l=s;else{a=(s=p+m)+u,l=s;var v=r;r=n,n=v}return{x1:n,x2:o,x3:r,y1:s,y2:a,y3:l}},drawTitle:function(t,e,i){var n,o,r,s=e.title,a=s.length;if(a){var l=Te(e.rtl,e.x,e.width);for(t.x=De(e,e._titleAlign),i.textAlign=l.textAlign(e._titleAlign),i.textBaseline="middle",n=e.titleFontSize,o=e.titleSpacing,i.fillStyle=e.titleFontColor,i.font=z.fontString(n,e._titleFontStyle,e._titleFontFamily),r=0;r0&&i.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;this._options.enabled&&(e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length)&&(t.save(),t.globalAlpha=o,this.drawBackground(n,e,t,i),n.y+=e.yPadding,z.rtl.overrideTextDirection(t,e.textDirection),this.drawTitle(n,e,t),this.drawBody(n,e,t),this.drawFooter(n,e,t),z.rtl.restoreTextDirection(t,e.textDirection),t.restore())}},handleEvent:function(t){var e,i=this,n=i._options;return i._lastActive=i._lastActive||[],"mouseout"===t.type?i._active=[]:(i._active=i._chart.getElementsAtEventForMode(t,n.mode,n),n.reverse&&i._active.reverse()),(e=!z.arrayEquals(i._active,i._lastActive))&&(i._lastActive=i._active,(n.enabled||n.custom)&&(i._eventPosition={x:t.x,y:t.y},i.update(!0),i.pivot())),e}});Ne.positioners=Se;var Ie=z.valueOrDefault;function Le(){return z.merge({},[].slice.call(arguments),{merger:function(t,e,i,n){if("xAxes"===t||"yAxes"===t){var o,r,s,a=i[t].length;for(e[t]||(e[t]=[]),o=0;o=e[t].length&&e[t].push({}),z.merge(e[t][o],!e[t][o].type||s.type&&s.type!==e[t][o].type?[Ce.getScaleDefaults(r),s]:s)}else z._merger(t,e,i,n)}})}function je(){return z.merge({},[].slice.call(arguments),{merger:function(t,e,i,n){var o=e[t]||{},r=i[t];"scales"===t?e[t]=Le(o,r):"scale"===t?e[t]=z.merge(o,[Ce.getScaleDefaults(r.type),r]):z._merger(t,e,i,n)}})}function qe(t){var e=t.options;z.each(t.scales,(function(e){le.removeBox(t,e)})),e=je(j.global,j[t.config.type],e),t.options=t.config.options=e,t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.tooltip._options=e.tooltips,t.tooltip.initialize()}function Re(t,e,i){var n,o=function(t){return t.id===n};do{n=e+i++}while(z.findIndex(t,o)>=0);return n}function Fe(t){return"top"===t||"bottom"===t}function He(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}j._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var ze=function(t,e){return this.construct(t,e),this};z.extend(ze.prototype,{construct:function(t,e){var i=this;e=function(t){var e=(t=t||{}).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=je(j.global,j[t.type],t.options||{}),t}(e);var n=we.acquireContext(t,e),o=n&&n.canvas,r=o&&o.height,s=o&&o.width;i.id=z.uid(),i.ctx=n,i.canvas=o,i.config=e,i.width=s,i.height=r,i.aspectRatio=r?s/r:null,i.options=e.options,i._bufferedRender=!1,i._layers=[],i.chart=i,i.controller=i,ze.instances[i.id]=i,Object.defineProperty(i,"data",{get:function(){return i.config.data},set:function(t){i.config.data=t}}),n&&o?(i.initialize(),i.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return ke.notify(t,"beforeInit"),z.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.initToolTip(),ke.notify(t,"afterInit"),t},clear:function(){return z.canvas.clear(this),this},stop:function(){return X.cancelAnimation(this),this},resize:function(t){var e=this,i=e.options,n=e.canvas,o=i.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(z.getMaximumWidth(n))),s=Math.max(0,Math.floor(o?r/o:z.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",z.retinaScale(e,i.devicePixelRatio),!t)){var a={width:r,height:s};ke.notify(e,"resize",[a]),i.onResize&&i.onResize(e,a),e.stop(),e.update({duration:i.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},i=t.scale;z.each(e.xAxes,(function(t,i){t.id||(t.id=Re(e.xAxes,"x-axis-",i))})),z.each(e.yAxes,(function(t,i){t.id||(t.id=Re(e.yAxes,"y-axis-",i))})),i&&(i.id=i.id||"scale")},buildOrUpdateScales:function(){var t=this,e=t.options,i=t.scales||{},n=[],o=Object.keys(i).reduce((function(t,e){return t[e]=!1,t}),{});e.scales&&(n=n.concat((e.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(e.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),e.scale&&n.push({options:e.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),z.each(n,(function(e){var n=e.options,r=n.id,s=Ie(n.type,e.dtype);Fe(n.position)!==Fe(e.dposition)&&(n.position=e.dposition),o[r]=!0;var a=null;if(r in i&&i[r].type===s)(a=i[r]).options=n,a.ctx=t.ctx,a.chart=t;else{var l=Ce.getScaleConstructor(s);if(!l)return;a=new l({id:r,type:s,options:n,ctx:t.ctx,chart:t}),i[a.id]=a}a.mergeTicksOptions(),e.isDefault&&(t.scale=a)})),z.each(o,(function(t,e){t||delete i[e]})),t.scales=i,Ce.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t,e,i=this,n=[],o=i.data.datasets;for(t=0,e=o.length;t=0;--i)this.drawDataset(e[i],t);ke.notify(this,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var i={meta:t,index:t.index,easingValue:e};!1!==ke.notify(this,"beforeDatasetDraw",[i])&&(t.controller.draw(e),ke.notify(this,"afterDatasetDraw",[i]))},_drawTooltip:function(t){var e=this.tooltip,i={tooltip:e,easingValue:t};!1!==ke.notify(this,"beforeTooltipDraw",[i])&&(e.draw(),ke.notify(this,"afterTooltipDraw",[i]))},getElementAtEvent:function(t){return Qt.modes.single(this,t)},getElementsAtEvent:function(t){return Qt.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return Qt.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,i){var n=Qt.modes[e];return"function"==typeof n?n(this,t,i):[]},getDatasetAtEvent:function(t){return Qt.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this.data.datasets[t];e._meta||(e._meta={});var i=e._meta[this.id];return i||(i=e._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e.order||0,index:t}),i},getVisibleDatasetCount:function(){for(var t=0,e=0,i=this.data.datasets.length;e3?i[2]-i[1]:i[1]-i[0];Math.abs(n)>1&&t!==Math.floor(t)&&(n=t-Math.floor(t));var o=z.log10(Math.abs(n)),r="";if(0!==t)if(Math.max(Math.abs(i[0]),Math.abs(i[i.length-1]))<1e-4){var s=z.log10(Math.abs(t)),a=Math.floor(s)-Math.floor(o);a=Math.max(Math.min(a,20),0),r=t.toExponential(a)}else{var l=-1*Math.floor(o);l=Math.max(Math.min(l,20),0),r=t.toFixed(l)}else r="0";return r},logarithmic:function(t,e,i){var n=t/Math.pow(10,Math.floor(z.log10(t)));return 0===t?"0":1===n||2===n||5===n||0===e||e===i.length-1?t.toExponential():""}}},Ye=z.isArray,Ke=z.isNullOrUndef,Xe=z.valueOrDefault,Ge=z.valueAtIndexOrDefault;function Ze(t,e,i){var n,o=t.getTicks().length,r=Math.min(e,o-1),s=t.getPixelForTick(r),a=t._startPixel,l=t._endPixel;if(!(i&&(n=1===o?Math.max(s-a,l-s):0===e?(t.getPixelForTick(1)-s)/2:(s-t.getPixelForTick(r-1))/2,(s+=rl+1e-6)))return s}function Qe(t){return t.drawTicks?t.tickMarkLength:0}function Je(t){var e,i;return t.display?(e=z.options._parseFont(t),i=z.options.toPadding(t.padding),e.lineHeight+i.height):0}function ti(t,e){return z.extend(z.options._parseFont({fontFamily:Xe(e.fontFamily,t.fontFamily),fontSize:Xe(e.fontSize,t.fontSize),fontStyle:Xe(e.fontStyle,t.fontStyle),lineHeight:Xe(e.lineHeight,t.lineHeight)}),{color:z.options.resolve([e.fontColor,t.fontColor,j.global.defaultFontColor])})}function ei(t){var e=ti(t,t.minor);return{minor:e,major:t.major.enabled?ti(t,t.major):e}}function ii(t){var e,i,n,o=[];for(i=0,n=t.length;i=d||c<=1||!a.isHorizontal()?a.labelRotation=h:(e=(t=a._getLabelSizes()).widest.width,i=t.highest.height-t.highest.offset,n=Math.min(a.maxWidth,a.chart.width-e),e+6>(o=l.offset?a.maxWidth/c:n/(c-1))&&(o=n/(c-(l.offset?.5:1)),r=a.maxHeight-Qe(l.gridLines)-u.padding-Je(l.scaleLabel),s=Math.sqrt(e*e+i*i),f=z.toDegrees(Math.min(Math.asin(Math.min((t.highest.height+6)/o,1)),Math.asin(Math.min(r/s,1))-Math.asin(i/s))),f=Math.max(h,Math.min(d,f))),a.labelRotation=f)},afterCalculateTickRotation:function(){z.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){z.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},i=t.chart,n=t.options,o=n.ticks,r=n.scaleLabel,s=n.gridLines,a=t._isVisible(),l="bottom"===n.position,u=t.isHorizontal();if(u?e.width=t.maxWidth:a&&(e.width=Qe(s)+Je(r)),u?a&&(e.height=Qe(s)+Je(r)):e.height=t.maxHeight,o.display&&a){var c=ei(o),h=t._getLabelSizes(),d=h.first,f=h.last,p=h.widest,g=h.highest,m=.4*c.minor.lineHeight,v=o.padding;if(u){var b=0!==t.labelRotation,y=z.toRadians(t.labelRotation),_=Math.cos(y),x=Math.sin(y);e.height=Math.min(t.maxHeight,e.height+(x*p.width+_*(g.height-(b?g.offset:0))+(b?0:m))+v);var w,k,C=t.getPixelForTick(0)-t.left,O=t.right-t.getPixelForTick(t.getTicks().length-1);b?(w=l?_*d.width+x*d.offset:x*(d.height-d.offset),k=l?x*(f.height-f.offset):_*f.width+x*f.offset):(w=d.width/2,k=f.width/2),t.paddingLeft=Math.max((w-C)*t.width/(t.width-C),0)+3,t.paddingRight=Math.max((k-O)*t.width/(t.width-O),0)+3}else e.width=Math.min(t.maxWidth,e.width+(o.mirror?0:p.width+v+m)),t.paddingTop=d.height/2,t.paddingBottom=f.height/2}t.handleMargins(),u?(t.width=t._length=i.width-t.margins.left-t.margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=i.height-t.margins.top-t.margins.bottom)},handleMargins:function(){var t=this;t.margins&&(t.margins.left=Math.max(t.paddingLeft,t.margins.left),t.margins.top=Math.max(t.paddingTop,t.margins.top),t.margins.right=Math.max(t.paddingRight,t.margins.right),t.margins.bottom=Math.max(t.paddingBottom,t.margins.bottom))},afterFit:function(){z.callback(this.options.afterFit,[this])},isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(Ke(t))return NaN;if(("number"==typeof t||t instanceof Number)&&!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},_convertTicksToLabels:function(t){var e,i,n,o=this;for(o.ticks=t.map((function(t){return t.value})),o.beforeTickToLabelConversion(),e=o.convertTicksToLabels(t)||o.ticks,o.afterTickToLabelConversion(),i=0,n=t.length;ie){for(i=0;ii-1?null:this.getPixelForDecimal(t*n+(e?n/2:0))},getPixelForDecimal:function(t){return this._reversePixels&&(t=1-t),this._startPixel+t*this._length},getDecimalForPixel:function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:t>0&&e>0?t:0},_autoSkip:function(t){var e,i,n,o,r=this.options.ticks,s=r.maxTicksLimit||this._length/this._tickSize()+1,a=r.major.enabled?function(t){var e,i,n=[];for(e=0,i=t.length;es)return function(t,e,i){var n,o,r=0,s=e[0];for(i=Math.ceil(i),n=0;nu)return r;return Math.max(u,1)}(a,t,0,s),l>0){for(e=0,i=l-1;e1?(c-u)/(l-1):null)?0:u-o,u),ni(t,n,c,z.isNullOrUndef(o)?t.length:c+o),ii(t)}return ni(t,n),ii(t)},_tickSize:function(){var t=this.options.ticks,e=z.toRadians(this.labelRotation),i=Math.abs(Math.cos(e)),n=Math.abs(Math.sin(e)),o=this._getLabelSizes(),r=t.autoSkipPadding||0,s=o?o.widest.width+r:0,a=o?o.highest.height+r:0;return this.isHorizontal()?a*i>s*n?s/i:a/n:a*n=0&&(s=t),void 0!==r&&(t=i.indexOf(r))>=0&&(a=t),e.minIndex=s,e.maxIndex=a,e.min=i[s],e.max=i[a]},buildTicks:function(){var t=this._getLabels(),e=this.minIndex,i=this.maxIndex;this.ticks=0===e&&i===t.length-1?t:t.slice(e,i+1)},getLabelForIndex:function(t,e){var i=this.chart;return i.getDatasetMeta(e).controller._getValueScaleId()===this.id?this.getRightValue(i.data.datasets[e].data[t]):this._getLabels()[t]},_configure:function(){var t=this,e=t.options.offset,i=t.ticks;ri.prototype._configure.call(t),t.isHorizontal()||(t._reversePixels=!t._reversePixels),i&&(t._startValue=t.minIndex-(e?.5:0),t._valueRange=Math.max(i.length-(e?0:1),1))},getPixelForValue:function(t,e,i){var n,o,r,s=this;return si(e)||si(i)||(t=s.chart.data.datasets[i].data[e]),si(t)||(n=s.isHorizontal()?t.x:t.y),(void 0!==n||void 0!==t&&isNaN(e))&&(o=s._getLabels(),t=z.valueOrDefault(n,t),e=-1!==(r=o.indexOf(t))?r:e,isNaN(e)&&(e=t)),s.getPixelForDecimal((e-s._startValue)/s._valueRange)},getPixelForTick:function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t],t+this.minIndex)},getValueForPixel:function(t){var e=Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange);return Math.min(Math.max(e,0),this.ticks.length-1)},getBasePixel:function(){return this.bottom}});ai._defaults={position:"bottom"};var li=z.isNullOrUndef,ui=ri.extend({getRightValue:function(t){return"string"==typeof t?+t:ri.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var i=z.sign(t.min),n=z.sign(t.max);i<0&&n<0?t.max=0:i>0&&n>0&&(t.min=0)}var o=void 0!==e.min||void 0!==e.suggestedMin,r=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(t.min=null===t.min?e.suggestedMin:Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(t.max=null===t.max?e.suggestedMax:Math.max(t.max,e.suggestedMax)),o!==r&&t.min>=t.max&&(o?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:function(){var t,e=this.options.ticks,i=e.stepSize,n=e.maxTicksLimit;return i?t=Math.ceil(this.max/i)-Math.floor(this.min/i)+1:(t=this._computeTickLimit(),n=n||11),n&&(t=Math.min(n,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:z.noop,buildTicks:function(){var t=this,e=t.options.ticks,i=t.getTickLimit(),n={maxTicks:i=Math.max(2,i),min:e.min,max:e.max,precision:e.precision,stepSize:z.valueOrDefault(e.fixedStepSize,e.stepSize)},o=t.ticks=function(t,e){var i,n,o,r,s=[],a=t.stepSize,l=a||1,u=t.maxTicks-1,c=t.min,h=t.max,d=t.precision,f=e.min,p=e.max,g=z.niceNum((p-f)/u/l)*l;if(g<1e-14&&li(c)&&li(h))return[f,p];(r=Math.ceil(p/g)-Math.floor(f/g))>u&&(g=z.niceNum(r*g/u/l)*l),a||li(d)?i=Math.pow(10,z._decimalPlaces(g)):(i=Math.pow(10,d),g=Math.ceil(g*i)/i),n=Math.floor(f/g)*g,o=Math.ceil(p/g)*g,a&&(!li(c)&&z.almostWhole(c/g,g/1e3)&&(n=c),!li(h)&&z.almostWhole(h/g,g/1e3)&&(o=h)),r=z.almostEquals(r=(o-n)/g,Math.round(r),g/1e3)?Math.round(r):Math.ceil(r),n=Math.round(n*i)/i,o=Math.round(o*i)/i,s.push(li(c)?n:c);for(var m=1;me.length-1?null:this.getPixelForValue(e[t])}});fi._defaults=ci;var pi=z.valueOrDefault,gi=z.math.log10,mi={position:"left",ticks:{callback:Ue.formatters.logarithmic}};function vi(t,e){return z.isFinite(t)&&t>=0?t:e}var bi=ri.extend({determineDataLimits:function(){var t,e,i,n,o,r,s=this,a=s.options,l=s.chart,u=l.data.datasets,c=s.isHorizontal();function h(t){return c?t.xAxisID===s.id:t.yAxisID===s.id}s.min=Number.POSITIVE_INFINITY,s.max=Number.NEGATIVE_INFINITY,s.minNotZero=Number.POSITIVE_INFINITY;var d=a.stacked;if(void 0===d)for(t=0;t0){var e=z.min(t),i=z.max(t);s.min=Math.min(s.min,e),s.max=Math.max(s.max,i)}}))}else for(t=0;t0?t.min:t.max<1?Math.pow(10,Math.floor(gi(t.max))):1)},buildTicks:function(){var t=this,e=t.options.ticks,i=!t.isHorizontal(),n={min:vi(e.min),max:vi(e.max)},o=t.ticks=function(t,e){var i,n,o=[],r=pi(t.min,Math.pow(10,Math.floor(gi(e.min)))),s=Math.floor(gi(e.max)),a=Math.ceil(e.max/Math.pow(10,s));0===r?(i=Math.floor(gi(e.minNotZero)),n=Math.floor(e.minNotZero/Math.pow(10,i)),o.push(r),r=n*Math.pow(10,i)):(i=Math.floor(gi(r)),n=Math.floor(r/Math.pow(10,i)));var l=i<0?Math.pow(10,Math.abs(i)):1;do{o.push(r),10==++n&&(n=1,l=++i>=0?1:l),r=Math.round(n*Math.pow(10,i)*l)/l}while(ie.length-1?null:this.getPixelForValue(e[t])},_getFirstTickValue:function(t){var e=Math.floor(gi(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},_configure:function(){var t=this,e=t.min,i=0;ri.prototype._configure.call(t),0===e&&(e=t._getFirstTickValue(t.minNotZero),i=pi(t.options.ticks.fontSize,j.global.defaultFontSize)/t._length),t._startValue=gi(e),t._valueOffset=i,t._valueRange=(gi(t.max)-gi(e))/(1-i)},getPixelForValue:function(t){var e=this,i=0;return(t=+e.getRightValue(t))>e.min&&t>0&&(i=(gi(t)-e._startValue)/e._valueRange+e._valueOffset),e.getPixelForDecimal(i)},getValueForPixel:function(t){var e=this,i=e.getDecimalForPixel(t);return 0===i&&0===e.min?0:Math.pow(10,e._startValue+(i-e._valueOffset)*e._valueRange)}});bi._defaults=mi;var yi=z.valueOrDefault,_i=z.valueAtIndexOrDefault,xi=z.options.resolve,wi={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:Ue.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function ki(t){var e=t.ticks;return e.display&&t.display?yi(e.fontSize,j.global.defaultFontSize)+2*e.backdropPaddingY:0}function Ci(t,e,i,n,o){return t===n||t===o?{start:e-i/2,end:e+i/2}:to?{start:e-i,end:e}:{start:e,end:e+i}}function Oi(t){return 0===t||180===t?"center":t<180?"left":"right"}function Ti(t,e,i,n){var o,r,s=i.y+n/2;if(z.isArray(e))for(o=0,r=e.length;o270||t<90)&&(i.y-=e.h)}function Mi(t){return z.isNumber(t)?t:0}var Ai=ui.extend({setDimensions:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=ki(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2},determineDataLimits:function(){var t=this,e=t.chart,i=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;z.each(e.data.datasets,(function(o,r){if(e.isDatasetVisible(r)){var s=e.getDatasetMeta(r);z.each(o.data,(function(e,o){var r=+t.getRightValue(e);isNaN(r)||s.data[o].hidden||(i=Math.min(r,i),n=Math.max(r,n))}))}})),t.min=i===Number.POSITIVE_INFINITY?0:i,t.max=n===Number.NEGATIVE_INFINITY?0:n,t.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/ki(this.options))},convertTicksToLabels:function(){var t=this;ui.prototype.convertTicksToLabels.call(t),t.pointLabels=t.chart.data.labels.map((function(){var e=z.callback(t.options.pointLabels.callback,arguments,t);return e||0===e?e:""}))},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t=this.options;t.display&&t.pointLabels.display?function(t){var e,i,n,o=z.options._parseFont(t.options.pointLabels),r={l:0,r:t.width,t:0,b:t.height-t.paddingTop},s={};t.ctx.font=o.string,t._pointLabelSizes=[];var a,l,u,c=t.chart.data.labels.length;for(e=0;er.r&&(r.r=f.end,s.r=h),p.startr.b&&(r.b=p.end,s.b=h)}t.setReductions(t.drawingArea,r,s)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(t,e,i){var n=this,o=e.l/Math.sin(i.l),r=Math.max(e.r-n.width,0)/Math.sin(i.r),s=-e.t/Math.cos(i.t),a=-Math.max(e.b-(n.height-n.paddingTop),0)/Math.cos(i.b);o=Mi(o),r=Mi(r),s=Mi(s),a=Mi(a),n.drawingArea=Math.min(Math.floor(t-(o+r)/2),Math.floor(t-(s+a)/2)),n.setCenterPoint(o,r,s,a)},setCenterPoint:function(t,e,i,n){var o=this,r=i+o.drawingArea,s=o.height-o.paddingTop-n-o.drawingArea;o.xCenter=Math.floor((t+o.drawingArea+(o.width-e-o.drawingArea))/2+o.left),o.yCenter=Math.floor((r+s)/2+o.top+o.paddingTop)},getIndexAngle:function(t){var e=this.chart,i=(t*(360/e.data.labels.length)+((e.options||{}).startAngle||0))%360;return(i<0?i+360:i)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(z.isNullOrUndef(t))return NaN;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.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(i)*e+this.xCenter,y:Math.sin(i)*e+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(t){var e=this.min,i=this.max;return this.getPointPositionForValue(t||0,this.beginAtZero?0:e<0&&i<0?i:e>0&&i>0?e:0)},_drawGrid:function(){var t,e,i,n=this,o=n.ctx,r=n.options,s=r.gridLines,a=r.angleLines,l=yi(a.lineWidth,s.lineWidth),u=yi(a.color,s.color);if(r.pointLabels.display&&function(t){var e=t.ctx,i=t.options,n=i.pointLabels,o=ki(i),r=t.getDistanceFromCenterForValue(i.ticks.reverse?t.min:t.max),s=z.options._parseFont(n);e.save(),e.font=s.string,e.textBaseline="middle";for(var a=t.chart.data.labels.length-1;a>=0;a--){var l=t.getPointPosition(a,r+(0===a?o/2:0)+5),u=_i(n.fontColor,a,j.global.defaultFontColor);e.fillStyle=u;var c=t.getIndexAngle(a),h=z.toDegrees(c);e.textAlign=Oi(h),Si(h,t._pointLabelSizes[a],l),Ti(e,t.pointLabels[a],l,s.lineHeight)}e.restore()}(n),s.display&&z.each(n.ticks,(function(t,i){0!==i&&(e=n.getDistanceFromCenterForValue(n.ticksAsNumbers[i]),function(t,e,i,n){var o,r=t.ctx,s=e.circular,a=t.chart.data.labels.length,l=_i(e.color,n-1),u=_i(e.lineWidth,n-1);if((s||a)&&l&&u){if(r.save(),r.strokeStyle=l,r.lineWidth=u,r.setLineDash&&(r.setLineDash(e.borderDash||[]),r.lineDashOffset=e.borderDashOffset||0),r.beginPath(),s)r.arc(t.xCenter,t.yCenter,i,0,2*Math.PI);else{o=t.getPointPosition(0,i),r.moveTo(o.x,o.y);for(var c=1;c=0;t--)e=n.getDistanceFromCenterForValue(r.ticks.reverse?n.min:n.max),i=n.getPointPosition(t,e),o.beginPath(),o.moveTo(n.xCenter,n.yCenter),o.lineTo(i.x,i.y),o.stroke();o.restore()}},_drawLabels:function(){var t=this,e=t.ctx,i=t.options.ticks;if(i.display){var n,o,r=t.getIndexAngle(0),s=z.options._parseFont(i),a=yi(i.fontColor,j.global.defaultFontColor);e.save(),e.font=s.string,e.translate(t.xCenter,t.yCenter),e.rotate(r),e.textAlign="center",e.textBaseline="middle",z.each(t.ticks,(function(r,l){(0!==l||i.reverse)&&(n=t.getDistanceFromCenterForValue(t.ticksAsNumbers[l]),i.showLabelBackdrop&&(o=e.measureText(r).width,e.fillStyle=i.backdropColor,e.fillRect(-o/2-i.backdropPaddingX,-n-s.size/2-i.backdropPaddingY,o+2*i.backdropPaddingX,s.size+2*i.backdropPaddingY)),e.fillStyle=a,e.fillText(r,0,-n))})),e.restore()}},_drawTitle:z.noop});Ai._defaults=wi;var Pi=z._deprecated,Di=z.options.resolve,Ei=z.valueOrDefault,Ni=Number.MIN_SAFE_INTEGER||-9007199254740991,Ii=Number.MAX_SAFE_INTEGER||9007199254740991,Li={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},ji=Object.keys(Li);function qi(t,e){return t-e}function Ri(t){return z.valueOrDefault(t.time.min,t.ticks.min)}function Fi(t){return z.valueOrDefault(t.time.max,t.ticks.max)}function Hi(t,e,i,n){var o=function(t,e,i){for(var n,o,r,s=0,a=t.length-1;s>=0&&s<=a;){if(o=t[(n=s+a>>1)-1]||null,r=t[n],!o)return{lo:null,hi:r};if(r[e]i))return{lo:o,hi:r};a=n-1}}return{lo:r,hi:null}}(t,e,i),r=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],a=s[e]-r[e];return r[n]+(s[n]-r[n])*(a?(i-r[e])/a:0)}function zi(t,e){var i=t._adapter,n=t.options.time,o=n.parser,r=o||n.format,s=e;return"function"==typeof o&&(s=o(s)),z.isFinite(s)||(s="string"==typeof r?i.parse(s,r):i.parse(s)),null!==s?+s:(o||"function"!=typeof r||(s=r(e),z.isFinite(s)||(s=i.parse(s))),s)}function Bi(t,e){if(z.isNullOrUndef(e))return null;var i=t.options.time,n=zi(t,t.getRightValue(e));return null===n?n:(i.round&&(n=+t._adapter.startOf(n,i.round)),n)}function Wi(t,e,i,n){var o,r,s,a=ji.length;for(o=ji.indexOf(t);o=0&&(e[r].major=!0);return e}(t,r,s,i):r}var $i=ri.extend({initialize:function(){this.mergeTicksOptions(),ri.prototype.initialize.call(this)},update:function(){var t=this,e=t.options,i=e.time||(e.time={}),n=t._adapter=new $e._date(e.adapters.date);return Pi("time scale",i.format,"time.format","time.parser"),Pi("time scale",i.min,"time.min","ticks.min"),Pi("time scale",i.max,"time.max","ticks.max"),z.mergeIf(i.displayFormats,n.formats()),ri.prototype.update.apply(t,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),ri.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t,e,i,n,o,r,s,a=this,l=a.chart,u=a._adapter,c=a.options,h=c.time.unit||"day",d=Ii,f=Ni,p=[],g=[],m=[],v=a._getLabels();for(t=0,i=v.length;t1?function(t){var e,i,n,o={},r=[];for(e=0,i=t.length;e1e5*u)throw e+" and "+i+" are too far apart with stepSize of "+u+" "+l;for(o=h;o=o&&i<=r&&c.push(i);return n.min=o,n.max=r,n._unit=l.unit||(a.autoSkip?Wi(l.minUnit,n.min,n.max,h):function(t,e,i,n,o){var r,s;for(r=ji.length-1;r>=ji.indexOf(i);r--)if(Li[s=ji[r]].common&&t._adapter.diff(o,n,s)>=e-1)return s;return ji[i?ji.indexOf(i):0]}(n,c.length,l.minUnit,n.min,n.max)),n._majorUnit=a.major.enabled&&"year"!==n._unit?function(t){for(var e=ji.indexOf(t)+1,i=ji.length;ee&&a=0&&t0?a:1}});$i._defaults={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};var Ui={category:ai,linear:fi,logarithmic:bi,radialLinear:Ai,time:$i},Yi={datetime:"MMM D, YYYY, h:mm:ss a",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"};$e._date.override("function"==typeof t?{_id:"moment",formats:function(){return Yi},parse:function(e,i){return"string"==typeof e&&"string"==typeof i?e=t(e,i):e instanceof t||(e=t(e)),e.isValid()?e.valueOf():null},format:function(e,i){return t(e).format(i)},add:function(e,i,n){return t(e).add(i,n).valueOf()},diff:function(e,i,n){return t(e).diff(t(i),n)},startOf:function(e,i,n){return e=t(e),"isoWeek"===i?e.isoWeekday(n).valueOf():e.startOf(i).valueOf()},endOf:function(e,i){return t(e).endOf(i).valueOf()},_create:function(e){return t(e)}}:{}),j._set("global",{plugins:{filler:{propagate:!0}}});var Ki={dataset:function(t){var e=t.fill,i=t.chart,n=i.getDatasetMeta(e),o=n&&i.isDatasetVisible(e)&&n.dataset._children||[],r=o.length||0;return r?function(t,e){return e=i)&&n;switch(r){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return r;default:return!1}}function Gi(t){return(t.el._scale||{}).getPointPositionForValue?function(t){var e,i,n,o,r,s=t.el._scale,a=s.options,l=s.chart.data.labels.length,u=t.fill,c=[];if(!l)return null;for(i=a.ticks.reverse?s.min:s.max,n=s.getPointPositionForValue(0,e=a.ticks.reverse?s.max:s.min),o=0;o0;--r)z.canvas.lineTo(t,i[r],i[r-1],!0);else for(s=i[0].cx,a=i[0].cy,l=Math.sqrt(Math.pow(i[0].x-s,2)+Math.pow(i[0].y-a,2)),r=o-1;r>0;--r)t.arc(s,a,l,i[r].angle,i[r-1].angle,!0)}}function en(t,e,i,n,o,r){var s,a,l,u,c,h,d,f,p=e.length,g=n.spanGaps,m=[],v=[],b=0,y=0;for(t.beginPath(),s=0,a=p;s=0;--i)(e=l[i].$filler)&&e.visible&&(o=(n=e.el)._view,r=n._children||[],a=o.backgroundColor||j.global.defaultColor,(s=e.mapper)&&a&&r.length&&(z.canvas.clipArea(u,t.chartArea),en(u,r,s,o,a,n._loop),z.canvas.unclipArea(u)))}},on=z.rtl.getRtlAdapter,rn=z.noop,sn=z.valueOrDefault;function an(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}j._set("global",{legend:{display:!0,position:"top",align:"center",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,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data.datasets,i=t.options.legend||{},n=i.labels&&i.labels.usePointStyle;return t._getSortedDatasetMetas().map((function(i){var o=i.controller.getStyle(n?0:void 0);return{text:e[i.index].label,fillStyle:o.backgroundColor,hidden:!t.isDatasetVisible(i.index),lineCap:o.borderCapStyle,lineDash:o.borderDash,lineDashOffset:o.borderDashOffset,lineJoin:o.borderJoinStyle,lineWidth:o.borderWidth,strokeStyle:o.borderColor,pointStyle:o.pointStyle,rotation:o.rotation,datasetIndex:i.index}}),this)}}},legendCallback:function(t){var e,i,n,o=document.createElement("ul"),r=t.data.datasets;for(o.setAttribute("class",t.id+"-legend"),e=0,i=r.length;el.width)&&(h+=s+i.padding,c[c.length-(e>0?0:1)]=0),a[e]={left:0,top:0,width:n,height:s},c[c.length-1]+=n+i.padding})),l.height+=h}else{var d=i.padding,f=t.columnWidths=[],p=t.columnHeights=[],g=i.padding,m=0,v=0;z.each(t.legendItems,(function(t,e){var n=an(i,s)+s/2+o.measureText(t.text).width;e>0&&v+s+2*d>l.height&&(g+=m+i.padding,f.push(m),p.push(v),m=0,v=0),m=Math.max(m,n),v+=s+d,a[e]={left:0,top:0,width:n,height:s}})),g+=m,f.push(m),p.push(v),l.width+=g}t.width=l.width,t.height=l.height}else t.width=l.width=t.height=l.height=0},afterFit:rn,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,i=e.labels,n=j.global,o=n.defaultColor,r=n.elements.line,s=t.height,a=t.columnHeights,l=t.width,u=t.lineWidths;if(e.display){var c,h=on(e.rtl,t.left,t.minSize.width),d=t.ctx,f=sn(i.fontColor,n.defaultFontColor),p=z.options._parseFont(i),g=p.size;d.textAlign=h.textAlign("left"),d.textBaseline="middle",d.lineWidth=.5,d.strokeStyle=f,d.fillStyle=f,d.font=p.string;var m=an(i,g),v=t.legendHitBoxes,b=function(t,n){switch(e.align){case"start":return i.padding;case"end":return t-n;default:return(t-n+i.padding)/2}},y=t.isHorizontal();c=y?{x:t.left+b(l,u[0]),y:t.top+i.padding,line:0}:{x:t.left+i.padding,y:t.top+b(s,a[0]),line:0},z.rtl.overrideTextDirection(t.ctx,e.textDirection);var _=g+i.padding;z.each(t.legendItems,(function(e,n){var f=d.measureText(e.text).width,p=m+g/2+f,x=c.x,w=c.y;h.setWidth(t.minSize.width),y?n>0&&x+p+i.padding>t.left+t.minSize.width&&(w=c.y+=_,c.line++,x=c.x=t.left+b(l,u[c.line])):n>0&&w+_>t.top+t.minSize.height&&(x=c.x=x+t.columnWidths[c.line]+i.padding,c.line++,w=c.y=t.top+b(s,a[c.line]));var k=h.x(x);!function(t,e,n){if(!(isNaN(m)||m<=0)){d.save();var s=sn(n.lineWidth,r.borderWidth);if(d.fillStyle=sn(n.fillStyle,o),d.lineCap=sn(n.lineCap,r.borderCapStyle),d.lineDashOffset=sn(n.lineDashOffset,r.borderDashOffset),d.lineJoin=sn(n.lineJoin,r.borderJoinStyle),d.lineWidth=s,d.strokeStyle=sn(n.strokeStyle,o),d.setLineDash&&d.setLineDash(sn(n.lineDash,r.borderDash)),i&&i.usePointStyle){var a=m*Math.SQRT2/2,l=h.xPlus(t,m/2);z.canvas.drawPoint(d,n.pointStyle,a,l,e+g/2,n.rotation)}else d.fillRect(h.leftForLtr(t,m),e,m,g),0!==s&&d.strokeRect(h.leftForLtr(t,m),e,m,g);d.restore()}}(k,w,e),v[n].left=h.leftForLtr(k,v[n].width),v[n].top=w,function(t,e,i,n){var o=g/2,r=h.xPlus(t,m+o),s=e+o;d.fillText(i.text,r,s),i.hidden&&(d.beginPath(),d.lineWidth=2,d.moveTo(r,s),d.lineTo(h.xPlus(r,n),s),d.stroke())}(k,w,e,f),y?c.x+=p+i.padding:c.y+=_})),z.rtl.restoreTextDirection(t.ctx,e.textDirection)}},_getLegendItemAt:function(t,e){var i,n,o,r=this;if(t>=r.left&&t<=r.right&&e>=r.top&&e<=r.bottom)for(o=r.legendHitBoxes,i=0;i=(n=o[i]).left&&t<=n.left+n.width&&e>=n.top&&e<=n.top+n.height)return r.legendItems[i];return null},handleEvent:function(t){var e,i=this,n=i.options,o="mouseup"===t.type?"click":t.type;if("mousemove"===o){if(!n.onHover&&!n.onLeave)return}else{if("click"!==o)return;if(!n.onClick)return}e=i._getLegendItemAt(t.x,t.y),"click"===o?e&&n.onClick&&n.onClick.call(i,t.native,e):(n.onLeave&&e!==i._hoveredItem&&(i._hoveredItem&&n.onLeave.call(i,t.native,i._hoveredItem),i._hoveredItem=e),n.onHover&&e&&n.onHover.call(i,t.native,e))}});function un(t,e){var i=new ln({ctx:t.ctx,options:e,chart:t});le.configure(t,i,e),le.addBox(t,i),t.legend=i}var cn={id:"legend",_element:ln,beforeInit:function(t){var e=t.options.legend;e&&un(t,e)},beforeUpdate:function(t){var e=t.options.legend,i=t.legend;e?(z.mergeIf(e,j.global.legend),i?(le.configure(t,i,e),i.options=e):un(t,e)):i&&(le.removeBox(t,i),delete t.legend)},afterEvent:function(t,e){var i=t.legend;i&&i.handleEvent(e)}},hn=z.noop;j._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var dn=U.extend({initialize:function(t){z.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:hn,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:hn,beforeSetDimensions:hn,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:hn,beforeBuildLabels:hn,buildLabels:hn,afterBuildLabels:hn,beforeFit:hn,fit:function(){var t,e=this,i=e.options,n=e.minSize={},o=e.isHorizontal();i.display?(t=(z.isArray(i.text)?i.text.length:1)*z.options._parseFont(i).lineHeight+2*i.padding,e.width=n.width=o?e.maxWidth:t,e.height=n.height=o?t:e.maxHeight):e.width=n.width=e.height=n.height=0},afterFit:hn,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,i=t.options;if(i.display){var n,o,r,s=z.options._parseFont(i),a=s.lineHeight,l=a/2+i.padding,u=0,c=t.top,h=t.left,d=t.bottom,f=t.right;e.fillStyle=z.valueOrDefault(i.fontColor,j.global.defaultFontColor),e.font=s.string,t.isHorizontal()?(o=h+(f-h)/2,r=c+l,n=f-h):(o="left"===i.position?h+l:f-l,r=c+(d-c)/2,n=d-c,u=Math.PI*("left"===i.position?-.5:.5)),e.save(),e.translate(o,r),e.rotate(u),e.textAlign="center",e.textBaseline="middle";var p=i.text;if(z.isArray(p))for(var g=0,m=0;m=0;n--){var o=t[n];if(e(o))return o}},z.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},z.almostEquals=function(t,e,i){return Math.abs(t-e)=t},z.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},z.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},z.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},z.toRadians=function(t){return t*(Math.PI/180)},z.toDegrees=function(t){return t*(180/Math.PI)},z._decimalPlaces=function(t){if(z.isFinite(t)){for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i}},z.getAngleFromPoint=function(t,e){var i=e.x-t.x,n=e.y-t.y,o=Math.sqrt(i*i+n*n),r=Math.atan2(n,i);return r<-.5*Math.PI&&(r+=2*Math.PI),{angle:r,distance:o}},z.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},z.aliasPixel=function(t){return t%2==0?0:.5},z._alignPixel=function(t,e,i){var n=t.currentDevicePixelRatio,o=i/2;return Math.round((e-o)*n)/n+o},z.splineCurve=function(t,e,i,n){var o=t.skip?e:t,r=e,s=i.skip?e:i,a=Math.sqrt(Math.pow(r.x-o.x,2)+Math.pow(r.y-o.y,2)),l=Math.sqrt(Math.pow(s.x-r.x,2)+Math.pow(s.y-r.y,2)),u=a/(a+l),c=l/(a+l),h=n*(u=isNaN(u)?0:u),d=n*(c=isNaN(c)?0:c);return{previous:{x:r.x-h*(s.x-o.x),y:r.y-h*(s.y-o.y)},next:{x:r.x+d*(s.x-o.x),y:r.y+d*(s.y-o.y)}}},z.EPSILON=Number.EPSILON||1e-14,z.splineCurveMonotone=function(t){var e,i,n,o,r,s,a,l,u,c=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),h=c.length;for(e=0;e0?c[e-1]:null,(o=e0?c[e-1]:null)&&!i.model.skip&&(n.model.controlPointPreviousX=n.model.x-(u=(n.model.x-i.model.x)/3),n.model.controlPointPreviousY=n.model.y-u*n.mK),o&&!o.model.skip&&(n.model.controlPointNextX=n.model.x+(u=(o.model.x-n.model.x)/3),n.model.controlPointNextY=n.model.y+u*n.mK))},z.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]},z.previousItem=function(t,e,i){return i?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},z.niceNum=function(t,e){var i=Math.floor(z.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)},z.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},z.getRelativePosition=function(t,e){var i,n,o=t.originalEvent||t,r=t.target||t.srcElement,s=r.getBoundingClientRect(),a=o.touches;a&&a.length>0?(i=a[0].clientX,n=a[0].clientY):(i=o.clientX,n=o.clientY);var l=parseFloat(z.getStyle(r,"padding-left")),u=parseFloat(z.getStyle(r,"padding-top")),c=parseFloat(z.getStyle(r,"padding-right")),h=parseFloat(z.getStyle(r,"padding-bottom")),d=s.bottom-s.top-u-h;return{x:i=Math.round((i-s.left-l)/(s.right-s.left-l-c)*r.width/e.currentDevicePixelRatio),y:n=Math.round((n-s.top-u)/d*r.height/e.currentDevicePixelRatio)}},z.getConstraintWidth=function(t){return i(t,"max-width","clientWidth")},z.getConstraintHeight=function(t){return i(t,"max-height","clientHeight")},z._calculatePadding=function(t,e,i){return(e=z.getStyle(t,e)).indexOf("%")>-1?i*parseInt(e,10)/100:parseInt(e,10)},z._getParentNode=function(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e},z.getMaximumWidth=function(t){var e=z._getParentNode(t);if(!e)return t.clientWidth;var i=e.clientWidth,n=i-z._calculatePadding(e,"padding-left",i)-z._calculatePadding(e,"padding-right",i),o=z.getConstraintWidth(t);return isNaN(o)?n:Math.min(n,o)},z.getMaximumHeight=function(t){var e=z._getParentNode(t);if(!e)return t.clientHeight;var i=e.clientHeight,n=i-z._calculatePadding(e,"padding-top",i)-z._calculatePadding(e,"padding-bottom",i),o=z.getConstraintHeight(t);return isNaN(o)?n:Math.min(n,o)},z.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},z.retinaScale=function(t,e){var i=t.currentDevicePixelRatio=e||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==i){var n=t.canvas,o=t.height,r=t.width;n.height=o*i,n.width=r*i,t.ctx.scale(i,i),n.style.height||n.style.width||(n.style.height=o+"px",n.style.width=r+"px")}},z.fontString=function(t,e,i){return e+" "+t+"px "+i},z.longestText=function(t,e,i,n){var o=(n=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,a,l,u,c,h=0,d=i.length;for(s=0;si.length){for(s=0;sn&&(n=r),n},z.numberOfLabelLines=function(t){var e=1;return z.each(t,(function(t){z.isArray(t)&&t.length>e&&(e=t.length)})),e},z.color=w?function(t){return t instanceof CanvasGradient&&(t=j.global.defaultColor),w(t)}:function(t){return console.error("Color.js not found!"),t},z.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:z.color(t).saturate(.5).darken(.1).rgbString()}}(),Be._adapters=$e,Be.Animation=K,Be.animationService=X,Be.controllers=$t,Be.DatasetController=tt,Be.defaults=j,Be.Element=U,Be.elements=vt,Be.Interaction=Qt,Be.layouts=le,Be.platform=we,Be.plugins=ke,Be.Scale=ri,Be.scaleService=Ce,Be.Ticks=Ue,Be.Tooltip=Ne,Be.helpers.each(Ui,(function(t,e){Be.scaleService.registerScaleType(e,t,t._defaults)})),pn)pn.hasOwnProperty(bn)&&Be.plugins.register(pn[bn]);Be.platform.initialize();var yn=Be;return"undefined"!=typeof window&&(window.Chart=Be),Be.Chart=Be,Be.Legend=pn.legend._element,Be.Title=pn.title._element,Be.pluginService=Be.plugins,Be.PluginBase=Be.Element.extend({}),Be.canvasHelpers=Be.helpers.canvas,Be.layoutService=Be.layouts,Be.LinearScaleBase=ui,Be.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],(function(t){Be[t]=function(e,i){return new Be(e,Be.helpers.merge(i||{},{type:t.charAt(0).toLowerCase()+t.slice(1)}))}})),yn})),util={},util.focus=function(t){document.getElementById(t).focus()};const common={};function JSONToCSVConvertor(t,e,i){var n="object"!=typeof t?JSON.parse(t):t,o="";if(o+=e+"\r\n\n",i){var r="";for(var s in n[0])r+=s+",";o+=(r=r.slice(0,-1))+"\r\n"}for(var a=0;at.id==u))?u=void 0:(u=c.parentid,e.parant=void 0===e.parant?c.label:c.label+" > "+e.parant);r+=1,void 0===o[e.parant]?o[e.parant]={index:r,size:1}:o[e.parant].size=o[e.parant].size+1,n.push(e)}return[n,o]},common.setDefaultVal=function(t,e){return null!=t&&"0"!=t&&t?t:e},common.load=function(t,e){$(t).waitMe({effect:"pulse",text:e})},common.hideload=function(t){$(t).waitMe("hide")},defcom={},defcom.imgerror=function(t){return t.onerror="",t.src="./assets/img/no-image-selected.png",!0},function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}((function(t){function e(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=i(t("
"))}function i(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",i,(function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")})).on("mouseover",i,n)}function n(){t.datepicker._isDisabledDatepicker(f.inline?f.dpDiv.parent()[0]:f.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))}function o(e,i){for(var n in t.extend(e,i),i)null==i[n]&&(e[n]=i[n]);return e}function r(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.ui=t.ui||{},t.ui.version="1.12.1";var s,a=0,l=Array.prototype.slice;t.cleanData=(s=t.cleanData,function(e){var i,n,r;for(r=0;null!=(n=e[r]);r++)try{(i=t._data(n,"events"))&&i.remove&&t(n).triggerHandler("remove")}catch(o){}s(e)}),t.widget=function(e,i,n){var o,r,s,a={},l=e.split(".")[0],u=l+"-"+(e=e.split(".")[1]);return n||(n=i,i=t.Widget),t.isArray(n)&&(n=t.extend.apply(null,[{}].concat(n))),t.expr[":"][u.toLowerCase()]=function(e){return!!t.data(e,u)},t[l]=t[l]||{},o=t[l][e],r=t[l][e]=function(t,e){return this._createWidget?void(arguments.length&&this._createWidget(t,e)):new r(t,e)},t.extend(r,o,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),(s=new i).options=t.widget.extend({},s.options),t.each(n,(function(e,n){return t.isFunction(n)?void(a[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function o(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,r=this._superApply;return this._super=t,this._superApply=o,e=n.apply(this,arguments),this._super=i,this._superApply=r,e}}()):void(a[e]=n)})),r.prototype=t.widget.extend(s,{widgetEventPrefix:o&&s.widgetEventPrefix||e},a,{constructor:r,namespace:l,widgetName:e,widgetFullName:u}),o?(t.each(o._childConstructors,(function(e,i){var n=i.prototype;t.widget(n.namespace+"."+n.widgetName,r,i._proto)})),delete o._childConstructors):i._childConstructors.push(r),t.widget.bridge(e,r),r},t.widget.extend=function(e){for(var i,n,o=l.call(arguments,1),r=0,s=o.length;s>r;r++)for(i in o[r])n=o[r][i],o[r].hasOwnProperty(i)&&void 0!==n&&(e[i]=t.isPlainObject(n)?t.isPlainObject(e[i])?t.widget.extend({},e[i],n):t.widget.extend({},n):n);return e},t.widget.bridge=function(e,i){var n=i.prototype.widgetFullName||e;t.fn[e]=function(o){var r="string"==typeof o,s=l.call(arguments,1),a=this;return r?this.length||"instance"!==o?this.each((function(){var i,r=t.data(this,n);return"instance"===o?(a=r,!1):r?t.isFunction(r[o])&&"_"!==o.charAt(0)?(i=r[o].apply(r,s))!==r&&void 0!==i?(a=i&&i.jquery?a.pushStack(i.get()):i,!1):void 0:t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+o+"'")})):a=void 0:(s.length&&(o=t.widget.extend.apply(null,[o].concat(s))),this.each((function(){var e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new i(o,this))}))),a}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=a++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,(function(t,i){e._removeClass(i,t)})),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var n,o,r,s=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(s={},n=e.split("."),e=n.shift(),n.length){for(o=s[e]=t.widget.extend({},this.options[e]),r=0;n.length-1>r;r++)o[n[r]]=o[n[r]]||{},o=o[n[r]];if(e=n.pop(),1===arguments.length)return void 0===o[e]?null:o[e];o[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];s[e]=i}return this._setOptions(s),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,n,o;for(i in e)o=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&o&&o.length&&(n=t(o.get()),this._removeClass(o,i),n.addClass(this._classes({element:n,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,r){var s,a;for(a=0;i.length>a;a++)s=o.classesElementLookup[i[a]]||t(),s=t(e.add?t.unique(s.get().concat(e.element.get())):s.not(e.element).get()),o.classesElementLookup[i[a]]=s,n.push(i[a]),r&&e.classes[i[a]]&&n.push(e.classes[i[a]])}var n=[],o=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),n.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,(function(n,o){-1!==t.inArray(e.target,o)&&(i.classesElementLookup[n]=t(o.not(e.target).get()))}))},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,n){var o="string"==typeof t||null===t,r={extra:o?e:i,keys:o?t:e,element:o?this.element:t,add:n="boolean"==typeof n?n:i};return r.element.toggleClass(this._classes(r),n),this},_on:function(e,i,n){var o,r=this;"boolean"!=typeof e&&(n=i,i=e,e=!1),n?(i=o=t(i),this.bindings=this.bindings.add(i)):(n=i,i=this.element,o=this.widget()),t.each(n,(function(n,s){function a(){return e||!0!==r.options.disabled&&!t(this).hasClass("ui-state-disabled")?("string"==typeof s?r[s]:s).apply(r,arguments):void 0}"string"!=typeof s&&(a.guid=s.guid=s.guid||a.guid||t.guid++);var l=n.match(/^([\w:-]*)\s*(.*)$/),u=l[1]+r.eventNamespace,c=l[2];c?o.on(u,c,a):i.on(u,a)}))},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){var i=this;return setTimeout((function(){return("string"==typeof t?i[t]:t).apply(i,arguments)}),e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,n){var o,r,s=this.options[e];if(n=n||{},(i=t.Event(i)).type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],r=i.originalEvent)for(o in r)o in i||(i[o]=r[o]);return this.element.trigger(i,n),!(t.isFunction(s)&&!1===s.apply(this.element[0],[i].concat(n))||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},(function(e,i){t.Widget.prototype["_"+e]=function(n,o,r){"string"==typeof o&&(o={effect:o});var s,a=o?!0===o||"number"==typeof o?i:o.effect||i:e;"number"==typeof(o=o||{})&&(o={duration:o}),s=!t.isEmptyObject(o),o.complete=r,o.delay&&n.delay(o.delay),s&&t.effects&&t.effects.effect[a]?n[e](o):a!==e&&n[a]?n[a](o.duration,o.easing,r):n.queue((function(i){t(this)[e](),r&&r.call(n[0]),i()}))}})),function(){function e(t,e,i){return[parseFloat(t[0])*(h.test(t[0])?e/100:1),parseFloat(t[1])*(h.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var o,r=Math.max,s=Math.abs,a=/left|center|right/,l=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,h=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==o)return o;var e,i,n=t("
"),r=n.children()[0];return t("body").append(n),e=r.offsetWidth,n.css("overflow","scroll"),e===(i=r.offsetWidth)&&(i=n[0].clientWidth),n.remove(),o=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),n=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),o="scroll"===i||"auto"===i&&e.widthi?"left":e>0?"right":"center",vertical:0>a?"top":n>0?"bottom":"middle"};u>f&&f>s(e+i)&&(h.horizontal="center"),c>p&&p>s(n+a)&&(h.vertical="middle"),h.important=r(s(e),s(i))>r(s(n),s(a))?"horizontal":"vertical",o.using.call(this,t,h)}),l.offset(t.extend(O,{using:a}))}))},t.ui.position={fit:{left:function(t,e){var i=e.within,n=i.isWindow?i.scrollLeft:i.offset.left,o=i.width,s=t.left-e.collisionPosition.marginLeft,a=n-s,l=s+e.collisionWidth-o-n;e.collisionWidth>o?a>0&&0>=l?t.left+=a-(t.left+a+e.collisionWidth-o-n):t.left=l>0&&0>=a?n:a>l?n+o-e.collisionWidth:n:a>0?t.left+=a:l>0?t.left-=l:t.left=r(t.left-s,t.left)},top:function(t,e){var i=e.within,n=i.isWindow?i.scrollTop:i.offset.top,o=e.within.height,s=t.top-e.collisionPosition.marginTop,a=n-s,l=s+e.collisionHeight-o-n;e.collisionHeight>o?a>0&&0>=l?t.top+=a-(t.top+a+e.collisionHeight-o-n):t.top=l>0&&0>=a?n:a>l?n+o-e.collisionHeight:n:a>0?t.top+=a:l>0?t.top-=l:t.top=r(t.top-s,t.top)}},flip:{left:function(t,e){var i,n,o=e.within,r=o.width,a=o.isWindow?o.scrollLeft:o.offset.left,l=t.left-e.collisionPosition.marginLeft,u=l-a,c=l+e.collisionWidth-r-a,h="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,d="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>u?(0>(i=t.left+h+d+f+e.collisionWidth-r-(o.offset.left+o.scrollLeft))||s(u)>i)&&(t.left+=h+d+f):c>0&&((n=t.left-e.collisionPosition.marginLeft+h+d+f-a)>0||c>s(n))&&(t.left+=h+d+f)},top:function(t,e){var i,n,o=e.within,r=o.height,a=o.isWindow?o.scrollTop:o.offset.top,l=t.top-e.collisionPosition.marginTop,u=l-a,c=l+e.collisionHeight-r-a,h="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,d="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,f=-2*e.offset[1];0>u?(0>(n=t.top+h+d+f+e.collisionHeight-r-(o.offset.top+o.scrollTop))||s(u)>n)&&(t.top+=h+d+f):c>0&&((i=t.top-e.collisionPosition.marginTop+h+d+f-a)>0||c>s(i))&&(t.top+=h+d+f)}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo((function(e){return function(i){return!!t.data(i,e)}})):function(e,i,n){return!!t.data(e,n[3])}}),t.fn.extend({disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(t+".ui-disableSelection",(function(t){t.preventDefault()}))}}(),enableSelection:function(){return this.off(".ui-disableSelection")}});var u="ui-effects-",c="ui-effects-style",h="ui-effects-animated",d=t;t.effects={effect:{}},function(t,e){function i(t,e,i){var n=c[e.type]||{};return null==t?i||!e.def?null:e.def:(t=n.floor?~~t:parseFloat(t),isNaN(t)?e.def:n.mod?(t+n.mod)%n.mod:0>t?0:t>n.max?n.max:t)}function n(i){var n=l(),o=n._rgba=[];return i=i.toLowerCase(),f(a,(function(t,r){var s,a=r.re.exec(i),l=a&&r.parse(a),c=r.space||"rgba";return l?(s=n[c](l),n[u[c].cache]=s[u[c].cache],o=n._rgba=s._rgba,!1):e})),o.length?("0,0,0,0"===o.join()&&t.extend(o,r.transparent),n):r[i]}function o(t,e,i){return 1>6*(i=(i+1)%1)?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var r,s=/^([\-+])=\s*(\d+\.?\d*)/,a=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],l=t.Color=function(e,i,n,o){return new t.Color.fn.parse(e,i,n,o)},u={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},c={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},h=l.support={},d=t("

")[0],f=t.each;d.style.cssText="background-color:rgba(1,1,1,.5)",h.rgba=d.style.backgroundColor.indexOf("rgba")>-1,f(u,(function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}})),l.fn=t.extend(l.prototype,{parse:function(o,s,a,c){if(o===e)return this._rgba=[null,null,null,null],this;(o.jquery||o.nodeType)&&(o=t(o).css(s),s=e);var h=this,d=t.type(o),p=this._rgba=[];return s!==e&&(o=[o,s,a,c],d="array"),"string"===d?this.parse(n(o)||r._default):"array"===d?(f(u.rgba.props,(function(t,e){p[e.idx]=i(o[e.idx],e)})),this):"object"===d?(f(u,o instanceof l?function(t,e){o[e.cache]&&(h[e.cache]=o[e.cache].slice())}:function(e,n){var r=n.cache;f(n.props,(function(t,e){if(!h[r]&&n.to){if("alpha"===t||null==o[t])return;h[r]=n.to(h._rgba)}h[r][e.idx]=i(o[t],e,!0)})),h[r]&&0>t.inArray(null,h[r].slice(0,3))&&(h[r][3]=1,n.from&&(h._rgba=n.from(h[r])))}),this):e},is:function(t){var i=l(t),n=!0,o=this;return f(u,(function(t,r){var s,a=i[r.cache];return a&&(s=o[r.cache]||r.to&&r.to(o._rgba)||[],f(r.props,(function(t,i){return null!=a[i.idx]?n=a[i.idx]===s[i.idx]:e}))),n})),n},_space:function(){var t=[],e=this;return f(u,(function(i,n){e[n.cache]&&t.push(i)})),t.pop()},transition:function(t,e){var n=l(t),o=n._space(),r=u[o],s=0===this.alpha()?l("transparent"):this,a=s[r.cache]||r.to(s._rgba),h=a.slice();return n=n[r.cache],f(r.props,(function(t,o){var r=o.idx,s=a[r],l=n[r],u=c[o.type]||{};null!==l&&(null===s?h[r]=l:(u.mod&&(l-s>u.mod/2?s+=u.mod:s-l>u.mod/2&&(s-=u.mod)),h[r]=i((l-s)*e+s,o)))})),this[o](h)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),n=i.pop(),o=l(e)._rgba;return l(t.map(i,(function(t,e){return(1-n)*o[e]+n*t})))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,(function(t,e){return null==t?e>2?1:0:t}));return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),(function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t}));return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),n=i.pop();return e&&i.push(~~(255*n)),"#"+t.map(i,(function(t){return 1===(t=(t||0).toString(16)).length?"0"+t:t})).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,u.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i=t[0]/255,n=t[1]/255,o=t[2]/255,r=t[3],s=Math.max(i,n,o),a=Math.min(i,n,o),l=s-a,u=s+a,c=.5*u;return e=0===l?0:.5>=c?l/u:l/(2-u),[Math.round(a===s?0:i===s?60*(n-o)/l+360:n===s?60*(o-i)/l+120:60*(i-n)/l+240)%360,e,c,null==r?1:r]},u.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],n=t[2],r=t[3],s=.5>=n?n*(1+i):n+i-n*i,a=2*n-s;return[Math.round(255*o(a,s,e+1/3)),Math.round(255*o(a,s,e)),Math.round(255*o(a,s,e-1/3)),r]},f(u,(function(n,o){var r=o.props,a=o.cache,u=o.to,c=o.from;l.fn[n]=function(n){if(u&&!this[a]&&(this[a]=u(this._rgba)),n===e)return this[a].slice();var o,s=t.type(n),h="array"===s||"object"===s?n:arguments,d=this[a].slice();return f(r,(function(t,e){var n=h["object"===s?t:e.idx];null==n&&(n=d[e.idx]),d[e.idx]=i(n,e)})),c?((o=l(c(d)))[a]=d,o):l(d)},f(r,(function(e,i){l.fn[e]||(l.fn[e]=function(o){var r,a=t.type(o),l="alpha"===e?this._hsla?"hsla":"rgba":n,u=this[l](),c=u[i.idx];return"undefined"===a?c:("function"===a&&(o=o.call(this,c),a=t.type(o)),null==o&&i.empty?this:("string"===a&&(r=s.exec(o))&&(o=c+parseFloat(r[2])*("+"===r[1]?1:-1)),u[i.idx]=o,this[l](u)))})}))})),l.hook=function(e){var i=e.split(" ");f(i,(function(e,i){t.cssHooks[i]={set:function(e,o){var r,s,u="";if("transparent"!==o&&("string"!==t.type(o)||(r=n(o)))){if(o=l(r||o),!h.rgba&&1!==o._rgba[3]){for(s="backgroundColor"===i?e.parentNode:e;(""===u||"transparent"===u)&&s&&s.style;)try{u=t.css(s,"backgroundColor"),s=s.parentNode}catch(a){}o=o.blend(u&&"transparent"!==u?u:"_default")}o=o.toRgbaString()}try{e.style[i]=o}catch(a){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=l(e.elem,i),e.end=l(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}}))},l.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],(function(i,n){e["border"+n+"Color"]=t})),e}},r=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(d),function(){function e(e){var i,n,o=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,r={};if(o&&o.length&&o[0]&&o[o[0]])for(n=o.length;n--;)"string"==typeof o[i=o[n]]&&(r[t.camelCase(i)]=o[i]);else for(i in o)"string"==typeof o[i]&&(r[i]=o[i]);return r}function i(e,i){var n,r,s={};for(n in i)e[n]!==(r=i[n])&&(o[n]||(t.fx.step[n]||!isNaN(parseFloat(r)))&&(s[n]=r));return s}var n=["add","remove","toggle"],o={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],(function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(d.style(t.elem,i,t.end),t.setAttr=!0)}})),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(o,r,s,a){var l=t.speed(r,s,a);return this.queue((function(){var r,s=t(this),a=s.attr("class")||"",u=l.children?s.find("*").addBack():s;u=u.map((function(){return{el:t(this),start:e(this)}})),(r=function(){t.each(n,(function(t,e){o[e]&&s[e+"Class"](o[e])}))})(),u=u.map((function(){return this.end=e(this.el[0]),this.diff=i(this.start,this.end),this})),s.attr("class",a),u=u.map((function(){var e=this,i=t.Deferred(),n=t.extend({},l,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,n),i.promise()})),t.when.apply(t,u.get()).done((function(){r(),t.each(arguments,(function(){var e=this.el;t.each(this.diff,(function(t){e.css(t,"")}))})),l.complete.call(s[0])}))}))},t.fn.extend({addClass:function(e){return function(i,n,o,r){return n?t.effects.animateClass.call(this,{add:i},n,o,r):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,n,o,r){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},n,o,r):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(i,n,o,r,s){return"boolean"==typeof n||void 0===n?o?t.effects.animateClass.call(this,n?{add:i}:{remove:i},o,r,s):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:i},n,o,r)}}(t.fn.toggleClass),switchClass:function(e,i,n,o,r){return t.effects.animateClass.call(this,{add:i,remove:e},n,o,r)}})}(),function(){function e(e,i,n,o){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(o=i,n=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(o=n,n=i,i={}),t.isFunction(n)&&(o=n,n=null),i&&t.extend(e,i),n=n||i.duration,e.duration=t.fx.off?0:"number"==typeof n?n:n in t.fx.speeds?t.fx.speeds[n]:t.fx.speeds._default,e.complete=o||i.complete,e}function i(e){return!(e&&"number"!=typeof e&&!t.fx.speeds[e])||"string"==typeof e&&!t.effects.effect[e]||!!t.isFunction(e)||"object"==typeof e&&!e.effect}function n(t,e){var i=e.outerWidth(),n=e.outerHeight(),o=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(t)||["",0,i,n,0];return{top:parseFloat(o[1])||0,right:"auto"===o[2]?i:parseFloat(o[2]),bottom:"auto"===o[3]?n:parseFloat(o[3]),left:parseFloat(o[4])||0}}t.expr&&t.expr.filters&&t.expr.filters.animated&&(t.expr.filters.animated=function(e){return function(i){return!!t(i).data(h)||e(i)}}(t.expr.filters.animated)),!1!==t.uiBackCompat&&t.extend(t.effects,{save:function(t,e){for(var i=0,n=e.length;n>i;i++)null!==e[i]&&t.data(u+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,n=0,o=e.length;o>n;n++)null!==e[n]&&(i=t.data(u+e[n]),t.css(e[n],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),float:e.css("float")},n=t("

").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),o={width:e.width(),height:e.height()},r=document.activeElement;return e.wrap(n),(e[0]===r||t.contains(e[0],r))&&t(r).trigger("focus"),n=e.parent(),"static"===e.css("position")?(n.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],(function(t,n){i[n]=e.css(n),isNaN(parseInt(i[n],10))&&(i[n]="auto")})),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(o),n.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).trigger("focus")),e}}),t.extend(t.effects,{version:"1.12.1",define:function(e,i,n){return n||(n=i,i="effect"),t.effects.effect[e]=n,t.effects.effect[e].mode=i,n},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var n="horizontal"!==i?(e||100)/100:1,o="vertical"!==i?(e||100)/100:1;return{height:t.height()*o,width:t.width()*n,outerHeight:t.outerHeight()*o,outerWidth:t.outerWidth()*n}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var n=t.queue();e>1&&n.splice.apply(n,[1,0].concat(n.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(c,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(c)||"",t.removeData(c)},mode:function(t,e){var i=t.is(":hidden");return"toggle"===e&&(e=i?"show":"hide"),(i?"hide"===e:"show"===e)&&(e="none"),e},getBaseline:function(t,e){var i,n;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":n=0;break;case"center":n=.5;break;case"right":n=1;break;default:n=t[1]/e.width}return{x:n,y:i}},createPlaceholder:function(e){var i,n=e.css("position"),o=e.position();return e.css({marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()),/^(static|relative)/.test(n)&&(n="absolute",i=t("<"+e[0].nodeName+">").insertAfter(e).css({display:/^(inline|ruby)/.test(e.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight"),float:e.css("float")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass("ui-effects-placeholder"),e.data(u+"placeholder",i)),e.css({position:n,left:o.left,top:o.top}),i},removePlaceholder:function(t){var e=u+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(e){t.effects.restoreStyle(e),t.effects.removePlaceholder(e)},setTransition:function(e,i,n,o){return o=o||{},t.each(i,(function(t,i){var r=e.cssUnit(i);r[0]>0&&(o[i]=r[0]*n+r[1])})),o}}),t.fn.extend({effect:function(){function i(e){function i(){t.isFunction(l)&&l.call(s[0]),t.isFunction(e)&&e()}var s=t(this);n.mode=c.shift(),!1===t.uiBackCompat||r?"none"===n.mode?(s[u](),i()):o.call(s[0],n,(function(){s.removeData(h),t.effects.cleanUp(s),"hide"===n.mode&&s.hide(),i()})):(s.is(":hidden")?"hide"===u:"show"===u)?(s[u](),i()):o.call(s[0],n,i)}var n=e.apply(this,arguments),o=t.effects.effect[n.effect],r=o.mode,s=n.queue,a=s||"fx",l=n.complete,u=n.mode,c=[],d=function(e){var i=t(this),n=t.effects.mode(i,u)||r;i.data(h,!0),c.push(n),r&&("show"===n||n===r&&"hide"===n)&&i.show(),r&&"none"===n||t.effects.saveStyle(i),t.isFunction(e)&&e()};return t.fx.off||!o?u?this[u](n.duration,l):this.each((function(){l&&l.call(this)})):!1===s?this.each(d).each(i):this.queue(a,d).queue(a,i)},show:function(t){return function(n){if(i(n))return t.apply(this,arguments);var o=e.apply(this,arguments);return o.mode="show",this.effect.call(this,o)}}(t.fn.show),hide:function(t){return function(n){if(i(n))return t.apply(this,arguments);var o=e.apply(this,arguments);return o.mode="hide",this.effect.call(this,o)}}(t.fn.hide),toggle:function(t){return function(n){if(i(n)||"boolean"==typeof n)return t.apply(this,arguments);var o=e.apply(this,arguments);return o.mode="toggle",this.effect.call(this,o)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),n=[];return t.each(["em","px","%","pt"],(function(t,e){i.indexOf(e)>0&&(n=[parseFloat(i),e])})),n},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):n(this.css("clip"),this)},transfer:function(e,i){var n=t(this),o=t(e.to),r="fixed"===o.css("position"),s=t("body"),a=r?s.scrollTop():0,l=r?s.scrollLeft():0,u=o.offset(),c={top:u.top-a,left:u.left-l,height:o.innerHeight(),width:o.innerWidth()},h=n.offset(),d=t("
").appendTo("body").addClass(e.className).css({top:h.top-a,left:h.left-l,height:n.innerHeight(),width:n.innerWidth(),position:r?"fixed":"absolute"}).animate(c,e.duration,e.easing,(function(){d.remove(),t.isFunction(i)&&i()}))}}),t.fx.step.clip=function(e){e.clipInit||(e.start=t(e.elem).cssClip(),"string"==typeof e.end&&(e.end=n(e.end,e.elem)),e.clipInit=!0),t(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],(function(t,i){e[i]=function(e){return Math.pow(e,t+2)}})),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,(function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}}))}(),t.effects.define("blind","hide",(function(e,i){var n={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},o=t(this),r=e.direction||"up",s=o.cssClip(),a={clip:t.extend({},s)},l=t.effects.createPlaceholder(o);a.clip[n[r][0]]=a.clip[n[r][1]],"show"===e.mode&&(o.cssClip(a.clip),l&&l.css(t.effects.clipToBox(a)),a.clip=s),l&&l.animate(t.effects.clipToBox(a),e.duration,e.easing),o.animate(a,{queue:!1,duration:e.duration,easing:e.easing,complete:i})})),t.effects.define("bounce",(function(e,i){var n,o,r,s=t(this),a=e.mode,l="hide"===a,u="show"===a,c=e.direction||"up",h=e.distance,d=e.times||5,f=2*d+(u||l?1:0),p=e.duration/f,g=e.easing,m="up"===c||"down"===c?"top":"left",v="up"===c||"left"===c,b=0,y=s.queue().length;for(t.effects.createPlaceholder(s),r=s.css(m),h||(h=s["top"===m?"outerHeight":"outerWidth"]()/3),u&&((o={opacity:1})[m]=r,s.css("opacity",0).css(m,v?2*-h:2*h).animate(o,p,g)),l&&(h/=Math.pow(2,d-1)),(o={})[m]=r;d>b;b++)(n={})[m]=(v?"-=":"+=")+h,s.animate(n,p,g).animate(o,p,g),h=l?2*h:h/2;l&&((n={opacity:0})[m]=(v?"-=":"+=")+h,s.animate(n,p,g)),s.queue(i),t.effects.unshift(s,y,f+1)})),t.effects.define("clip","hide",(function(e,i){var n,o={},r=t(this),s=e.direction||"vertical",a="both"===s,l=a||"horizontal"===s,u=a||"vertical"===s;n=r.cssClip(),o.clip={top:u?(n.bottom-n.top)/2:n.top,right:l?(n.right-n.left)/2:n.right,bottom:u?(n.bottom-n.top)/2:n.bottom,left:l?(n.right-n.left)/2:n.left},t.effects.createPlaceholder(r),"show"===e.mode&&(r.cssClip(o.clip),o.clip=n),r.animate(o,{queue:!1,duration:e.duration,easing:e.easing,complete:i})})),t.effects.define("drop","hide",(function(e,i){var n,o=t(this),r="show"===e.mode,s=e.direction||"left",a="up"===s||"down"===s?"top":"left",l="up"===s||"left"===s?"-=":"+=",u="+="===l?"-=":"+=",c={opacity:0};t.effects.createPlaceholder(o),n=e.distance||o["top"===a?"outerHeight":"outerWidth"](!0)/2,c[a]=l+n,r&&(o.css(c),c[a]=u+n,c.opacity=1),o.animate(c,{queue:!1,duration:e.duration,easing:e.easing,complete:i})})),t.effects.define("explode","hide",(function(e,i){function n(){v.push(this),v.length===c*h&&(d.css({visibility:"visible"}),t(v).remove(),i())}var o,r,s,a,l,u,c=e.pieces?Math.round(Math.sqrt(e.pieces)):3,h=c,d=t(this),f="show"===e.mode,p=d.show().css("visibility","hidden").offset(),g=Math.ceil(d.outerWidth()/h),m=Math.ceil(d.outerHeight()/c),v=[];for(o=0;c>o;o++)for(a=p.top+o*m,u=o-(c-1)/2,r=0;h>r;r++)s=p.left+r*g,l=r-(h-1)/2,d.clone().appendTo("body").wrap("
").css({position:"absolute",visibility:"visible",left:-r*g,top:-o*m}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:g,height:m,left:s+(f?l*g:0),top:a+(f?u*m:0),opacity:f?0:1}).animate({left:s+(f?0:l*g),top:a+(f?0:u*m),opacity:f?1:0},e.duration||500,e.easing,n)})),t.effects.define("fade","toggle",(function(e,i){var n="show"===e.mode;t(this).css("opacity",n?0:1).animate({opacity:n?1:0},{queue:!1,duration:e.duration,easing:e.easing,complete:i})})),t.effects.define("fold","hide",(function(e,i){var n=t(this),o=e.mode,r="show"===o,s="hide"===o,a=e.size||15,l=/([0-9]+)%/.exec(a),u=e.horizFirst?["right","bottom"]:["bottom","right"],c=e.duration/2,h=t.effects.createPlaceholder(n),d=n.cssClip(),f={clip:t.extend({},d)},p={clip:t.extend({},d)},g=[d[u[0]],d[u[1]]],m=n.queue().length;l&&(a=parseInt(l[1],10)/100*g[s?0:1]),f.clip[u[0]]=a,p.clip[u[0]]=a,p.clip[u[1]]=0,r&&(n.cssClip(p.clip),h&&h.css(t.effects.clipToBox(p)),p.clip=d),n.queue((function(i){h&&h.animate(t.effects.clipToBox(f),c,e.easing).animate(t.effects.clipToBox(p),c,e.easing),i()})).animate(f,c,e.easing).animate(p,c,e.easing).queue(i),t.effects.unshift(n,m,4)})),t.effects.define("highlight","show",(function(e,i){var n=t(this),o={backgroundColor:n.css("backgroundColor")};"hide"===e.mode&&(o.opacity=0),t.effects.saveStyle(n),n.css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(o,{queue:!1,duration:e.duration,easing:e.easing,complete:i})})),t.effects.define("size",(function(e,i){var n,o,r,s=t(this),a=["fontSize"],l=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],u=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],c=e.mode,h="effect"!==c,d=e.scale||"both",f=e.origin||["middle","center"],p=s.css("position"),g=s.position(),m=t.effects.scaledDimensions(s),v=e.from||m,b=e.to||t.effects.scaledDimensions(s,0);t.effects.createPlaceholder(s),"show"===c&&(r=v,v=b,b=r),o={from:{y:v.height/m.height,x:v.width/m.width},to:{y:b.height/m.height,x:b.width/m.width}},("box"===d||"both"===d)&&(o.from.y!==o.to.y&&(v=t.effects.setTransition(s,l,o.from.y,v),b=t.effects.setTransition(s,l,o.to.y,b)),o.from.x!==o.to.x&&(v=t.effects.setTransition(s,u,o.from.x,v),b=t.effects.setTransition(s,u,o.to.x,b))),("content"===d||"both"===d)&&o.from.y!==o.to.y&&(v=t.effects.setTransition(s,a,o.from.y,v),b=t.effects.setTransition(s,a,o.to.y,b)),f&&(n=t.effects.getBaseline(f,m),v.top=(m.outerHeight-v.outerHeight)*n.y+g.top,v.left=(m.outerWidth-v.outerWidth)*n.x+g.left,b.top=(m.outerHeight-b.outerHeight)*n.y+g.top,b.left=(m.outerWidth-b.outerWidth)*n.x+g.left),s.css(v),("content"===d||"both"===d)&&(l=l.concat(["marginTop","marginBottom"]).concat(a),u=u.concat(["marginLeft","marginRight"]),s.find("*[width]").each((function(){var i=t(this),n=t.effects.scaledDimensions(i),r={height:n.height*o.from.y,width:n.width*o.from.x,outerHeight:n.outerHeight*o.from.y,outerWidth:n.outerWidth*o.from.x},s={height:n.height*o.to.y,width:n.width*o.to.x,outerHeight:n.height*o.to.y,outerWidth:n.width*o.to.x};o.from.y!==o.to.y&&(r=t.effects.setTransition(i,l,o.from.y,r),s=t.effects.setTransition(i,l,o.to.y,s)),o.from.x!==o.to.x&&(r=t.effects.setTransition(i,u,o.from.x,r),s=t.effects.setTransition(i,u,o.to.x,s)),h&&t.effects.saveStyle(i),i.css(r),i.animate(s,e.duration,e.easing,(function(){h&&t.effects.restoreStyle(i)}))}))),s.animate(b,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){var e=s.offset();0===b.opacity&&s.css("opacity",v.opacity),h||(s.css("position","static"===p?"relative":p).offset(e),t.effects.saveStyle(s)),i()}})})),t.effects.define("scale",(function(e,i){var n=t(this),o=e.mode,r=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"effect"!==o?0:100),s=t.extend(!0,{from:t.effects.scaledDimensions(n),to:t.effects.scaledDimensions(n,r,e.direction||"both"),origin:e.origin||["middle","center"]},e);e.fade&&(s.from.opacity=1,s.to.opacity=0),t.effects.effect.size.call(this,s,i)})),t.effects.define("puff","hide",(function(e,i){var n=t.extend(!0,{},e,{fade:!0,percent:parseInt(e.percent,10)||150});t.effects.effect.scale.call(this,n,i)})),t.effects.define("pulsate","show",(function(e,i){var n=t(this),o=e.mode,r="show"===o,s=2*(e.times||5)+(r||"hide"===o?1:0),a=e.duration/s,l=0,u=1,c=n.queue().length;for((r||!n.is(":visible"))&&(n.css("opacity",0).show(),l=1);s>u;u++)n.animate({opacity:l},a,e.easing),l=1-l;n.animate({opacity:l},a,e.easing),n.queue(i),t.effects.unshift(n,c,s+1)})),t.effects.define("shake",(function(e,i){var n=1,o=t(this),r=e.direction||"left",s=e.distance||20,a=e.times||3,l=2*a+1,u=Math.round(e.duration/l),c="up"===r||"down"===r?"top":"left",h="up"===r||"left"===r,d={},f={},p={},g=o.queue().length;for(t.effects.createPlaceholder(o),d[c]=(h?"-=":"+=")+s,f[c]=(h?"+=":"-=")+2*s,p[c]=(h?"-=":"+=")+2*s,o.animate(d,u,e.easing);a>n;n++)o.animate(f,u,e.easing).animate(p,u,e.easing);o.animate(f,u,e.easing).animate(d,u/2,e.easing).queue(i),t.effects.unshift(o,g,l+1)})),t.effects.define("slide","show",(function(e,i){var n,o,r=t(this),s={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},a=e.mode,l=e.direction||"left",u="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l,h=e.distance||r["top"===u?"outerHeight":"outerWidth"](!0),d={};t.effects.createPlaceholder(r),n=r.cssClip(),o=r.position()[u],d[u]=(c?-1:1)*h+o,d.clip=r.cssClip(),d.clip[s[l][1]]=d.clip[s[l][0]],"show"===a&&(r.cssClip(d.clip),r.css(u,d[u]),d.clip=n,d[u]=o),r.animate(d,{queue:!1,duration:e.duration,easing:e.easing,complete:i})})),!1!==t.uiBackCompat&&t.effects.define("transfer",(function(e,i){t(this).transfer(e,i)})),t.ui.focusable=function(e,i){var n,o,r,s,a,l=e.nodeName.toLowerCase();return"area"===l?(o=(n=e.parentNode).name,!(!e.href||!o||"map"!==n.nodeName.toLowerCase())&&(r=t("img[usemap='#"+o+"']")).length>0&&r.is(":visible")):(/^(input|select|textarea|button|object)$/.test(l)?(s=!e.disabled)&&(a=t(e).closest("fieldset")[0])&&(s=!a.disabled):s="a"===l&&e.href||i,s&&t(e).is(":visible")&&function(t){for(var e=t.css("visibility");"inherit"===e;)e=(t=t.parent()).css("visibility");return"hidden"!==e}(t(e)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}}),t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout((function(){var i=e.data("ui-form-reset-instances");t.each(i,(function(){this.refresh()}))}))},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],(function(e,i){function n(e,i,n,r){return t.each(o,(function(){i-=parseFloat(t.css(e,"padding"+this))||0,n&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),r&&(i-=parseFloat(t.css(e,"margin"+this))||0)})),i}var o="Width"===i?["Left","Right"]:["Top","Bottom"],r=i.toLowerCase(),s={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?s["inner"+i].call(this):this.each((function(){t(this).css(r,n(this,e)+"px")}))},t.fn["outer"+i]=function(e,o){return"number"!=typeof e?s["outer"+i].call(this,e):this.each((function(){t(this).css(r,n(this,e,!0,o)+"px")}))}})),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,.\/:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,i,n,o,r;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(o=this.eq(0).parents("label"),(n=this.attr("id"))&&(r=(e=this.eq(0).parents().last()).add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(n)+"']",o=o.add(r.find(i).addBack(i))),this.pushStack(o))},t.fn.scrollParent=function(e){var i=this.css("position"),n="absolute"===i,o=e?/(auto|scroll|hidden)/:/(auto|scroll)/,r=this.parents().filter((function(){var e=t(this);return(!n||"static"!==e.css("position"))&&o.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))})).eq(0);return"fixed"!==i&&r.length?r:t(this[0].ownerDocument||document)},t.extend(t.expr[":"],{tabbable:function(e){var i=t.attr(e,"tabindex"),n=null!=i;return(!n||i>=0)&&t.ui.focusable(e,n)}}),t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each((function(){this.id||(this.id="ui-id-"+ ++t)}))}}(),removeUniqueId:function(){return this.each((function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")}))}}),t.widget("ui.accordion",{version:"1.12.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:"> li > :first-child, > :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),e.collapsible||!1!==e.active&&null!=e.active||(e.active=0),this._processPanels(),0>e.active&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t()}},_createIcons:function(){var e,i,n=this.options.icons;n&&(e=t(""),this._addClass(e,"ui-accordion-header-icon","ui-icon "+n.header),e.prependTo(this.headers),i=this.active.children(".ui-accordion-header-icon"),this._removeClass(i,n.header)._addClass(i,null,n.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?void this._activate(e):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||!1!==this.options.active||this._activate(0),void("icons"===t&&(this._destroyIcons(),e&&this._createIcons())))},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!t)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,n=this.headers.length,o=this.headers.index(e.target),r=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:r=this.headers[(o+1)%n];break;case i.LEFT:case i.UP:r=this.headers[(o-1+n)%n];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:r=this.headers[0];break;case i.END:r=this.headers[n-1]}r&&(t(e.target).attr("tabIndex",-1),t(r).attr("tabIndex",0),t(r).trigger("focus"),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().trigger("focus")},refresh:function(){var e=this.options;this._processPanels(),!1===e.active&&!0===e.collapsible||!this.headers.length?(e.active=!1,this.active=t()):!1===e.active?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var e,i=this.options,n=i.heightStyle,o=this.element.parent();this.active=this._findActive(i.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each((function(){var e=t(this),i=e.uniqueId().attr("id"),n=e.next(),o=n.uniqueId().attr("id");e.attr("aria-controls",o),n.attr("aria-labelledby",i)})).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(i.event),"fill"===n?(e=o.height(),this.element.siblings(":visible").each((function(){var i=t(this),n=i.css("position");"absolute"!==n&&"fixed"!==n&&(e-=i.outerHeight(!0))})),this.headers.each((function(){e-=t(this).outerHeight(!0)})),this.headers.next().each((function(){t(this).height(Math.max(0,e-t(this).innerHeight()+t(this).height()))})).css("overflow","auto")):"auto"===n&&(e=0,this.headers.next().each((function(){var i=t(this).is(":visible");i||t(this).show(),e=Math.max(e,t(this).css("height","").height()),i||t(this).hide()})).height(e))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&this._eventHandler({target:i=i||this.active[0],currentTarget:i,preventDefault:t.noop})},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),(function(t,e){i[e]="_eventHandler"})),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i,n,o=this.options,r=this.active,s=t(e.currentTarget),a=s[0]===r[0],l=a&&o.collapsible,u=l?t():s.next(),c=r.next(),h={oldHeader:r,oldPanel:c,newHeader:l?t():s,newPanel:u};e.preventDefault(),a&&!o.collapsible||!1===this._trigger("beforeActivate",e,h)||(o.active=!l&&this.headers.index(s),this.active=a?t():s,this._toggle(h),this._removeClass(r,"ui-accordion-header-active","ui-state-active"),o.icons&&(i=r.children(".ui-accordion-header-icon"),this._removeClass(i,null,o.icons.activeHeader)._addClass(i,null,o.icons.header)),a||(this._removeClass(s,"ui-accordion-header-collapsed")._addClass(s,"ui-accordion-header-active","ui-state-active"),o.icons&&(n=s.children(".ui-accordion-header-icon"),this._removeClass(n,null,o.icons.header)._addClass(n,null,o.icons.activeHeader)),this._addClass(s.next(),"ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,n=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=n,this.options.animate?this._animate(i,n,e):(n.hide(),i.show(),this._toggleComplete(e)),n.attr({"aria-hidden":"true"}),n.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&n.length?n.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter((function(){return 0===parseInt(t(this).attr("tabIndex"),10)})).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,e,i){var n,o,r,s=this,a=0,l=t.css("box-sizing"),u=t.length&&(!e.length||t.index()",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var i=t(e.target),n=t(t.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&n.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var i=t(e.target).closest(".ui-menu-item"),n=t(e.currentTarget);i[0]===n[0]&&(this._removeClass(n.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,n))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay((function(){!t.contains(this.element[0],t.ui.safeActiveElement(this.document[0]))&&this.collapseAll(e)}))},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),e.children().each((function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()}))},_keydown:function(e){var i,n,o,r,s=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:s=!1,n=this.previousFilter||"",r=!1,o=e.keyCode>=96&&105>=e.keyCode?""+(e.keyCode-96):String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),o===n?r=!0:o=n+o,i=this._filterMenuItems(o),(i=r&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i).length||(o=String.fromCharCode(e.keyCode),i=this._filterMenuItems(o)),i.length?(this.focus(e,i),this.previousFilter=o,this.filterTimer=this._delay((function(){delete this.previousFilter}),1e3)):delete this.previousFilter}s&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i,n,o,r=this,s=this.options.icons.submenu,a=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),i=a.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each((function(){var e=t(this),i=e.prev(),n=t("").data("ui-menu-submenu-caret",!0);r._addClass(n,"ui-menu-icon","ui-icon "+s),i.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",i.attr("id"))})),this._addClass(i,"ui-menu","ui-widget ui-widget-content ui-front"),(e=a.add(this.element).find(this.options.items)).not(".ui-menu-item").each((function(){var e=t(this);r._isDivider(e)&&r._addClass(e,"ui-menu-divider","ui-widget-content")})),o=(n=e.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(n,"ui-menu-item")._addClass(o,"ui-menu-item-wrapper"),e.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t+""),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,n,o;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),n=this.active.children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",n.attr("id")),o=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(o,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay((function(){this._close()}),this.delay),(i=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,n,o,r,s,a;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,n=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,o=e.offset().top-this.activeMenu.offset().top-i-n,r=this.activeMenu.scrollTop(),s=this.activeMenu.height(),a=e.outerHeight(),0>o?this.activeMenu.scrollTop(r+o):o+a>s&&this.activeMenu.scrollTop(r+o-s+a))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay((function(){this._close(),this._open(t)}),this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay((function(){var n=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));n.length||(n=this.element),this._close(n),this.blur(e),this._removeClass(n.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=n}),this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay((function(){this.focus(t,e)})))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var n;this.active&&(n="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),n&&n.length&&this.active||(n=this.activeMenu.find(this.options.items)[e]()),this.focus(i,n)},nextPage:function(e){var i,n,o;return this.active?void(this.isLastItem()||(this._hasScroll()?(n=this.active.offset().top,o=this.element.height(),this.active.nextAll(".ui-menu-item").each((function(){return 0>(i=t(this)).offset().top-n-o})),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]()))):void this.next(e)},previousPage:function(e){var i,n,o;return this.active?void(this.isFirstItem()||(this._hasScroll()?(n=this.active.offset().top,o=this.element.height(),this.active.prevAll(".ui-menu-item").each((function(){return(i=t(this)).offset().top-n+o>0})),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first()))):void this.next(e)},_hasScroll:function(){return this.element.outerHeight()",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,i,n,o=this.element[0].nodeName.toLowerCase(),r="textarea"===o,s="input"===o;this.isMultiLine=r||!s&&this._isContentEditable(this.element),this.valueMethod=this.element[r||s?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(o){if(this.element.prop("readOnly"))return e=!0,n=!0,void(i=!0);e=!1,n=!1,i=!1;var r=t.ui.keyCode;switch(o.keyCode){case r.PAGE_UP:e=!0,this._move("previousPage",o);break;case r.PAGE_DOWN:e=!0,this._move("nextPage",o);break;case r.UP:e=!0,this._keyEvent("previous",o);break;case r.DOWN:e=!0,this._keyEvent("next",o);break;case r.ENTER:this.menu.active&&(e=!0,o.preventDefault(),this.menu.select(o));break;case r.TAB:this.menu.active&&this.menu.select(o);break;case r.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(o),o.preventDefault());break;default:i=!0,this._searchTimeout(o)}},keypress:function(n){if(e)return e=!1,void((!this.isMultiLine||this.menu.element.is(":visible"))&&n.preventDefault());if(!i){var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:this._move("previousPage",n);break;case o.PAGE_DOWN:this._move("nextPage",n);break;case o.UP:this._keyEvent("previous",n);break;case o.DOWN:this._keyEvent("next",n)}}},input:function(t){return n?(n=!1,void t.preventDefault()):void this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(t),void this._change(t))}}),this._initSource(),this.menu=t("