!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Popper=e()}(this,function(){"use strict";function a(t){return t&&"[object Function]"==={}.toString.call(t)}function _(t,e){if(1!==t.nodeType)return[];var i=getComputedStyle(t,null);return e?i[e]:i}function d(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function p(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=_(t),i=e.overflow,n=e.overflowX,o=e.overflowY;return/(auto|scroll|overlay)/.test(i+o+n)?t:p(d(t))}function b(t){if(!t)return document.documentElement;for(var e=$(10)?document.body:null,i=t.offsetParent;i===e&&t.nextElementSibling;)i=(t=t.nextElementSibling).offsetParent;var n=i&&i.nodeName;return n&&"BODY"!==n&&"HTML"!==n?-1!==["TD","TABLE"].indexOf(i.nodeName)&&"static"===_(i,"position")?b(i):i:t?t.ownerDocument.documentElement:document.documentElement}function u(t){return null===t.parentNode?t:u(t.parentNode)}function f(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var i=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,n=i?t:e,o=i?e:t,r=document.createRange();r.setStart(n,0),r.setEnd(o,0);var a,s,l=r.commonAncestorContainer;if(t!==l&&e!==l||n.contains(o))return"BODY"===(s=(a=l).nodeName)||"HTML"!==s&&b(a.firstElementChild)!==a?b(l):l;var c=u(t);return c.host?f(c.host,e):f(t,u(e).host)}function g(t){var e="top"===(1=n.clientWidth&&i>=n.clientHeight}),u=0o[t]&&!n.escapeWithReference&&(i=N(r[e],o[t]-("right"===t?r.width:r.height))),q({},e,i)}};return i.forEach(function(t){var e=-1===["left","top"].indexOf(t)?"secondary":"primary";r=V({},r,a[e](t))}),t.offsets.popper=r,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,i=e.popper,n=e.reference,o=t.placement.split("-")[0],r=O,a=-1!==["top","bottom"].indexOf(o),s=a?"right":"bottom",l=a?"left":"top",c=a?"width":"height";return i[s]r(n[s])&&(t.offsets.popper[l]=r(n[s])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var i;if(!M(t.instance.modifiers,"arrow","keepTogether"))return t;var n=e.element;if("string"==typeof n){if(!(n=t.instance.popper.querySelector(n)))return t}else if(!t.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var o=t.placement.split("-")[0],r=t.offsets,a=r.popper,s=r.reference,l=-1!==["left","right"].indexOf(o),c=l?"height":"width",u=l?"Top":"Left",h=u.toLowerCase(),d=l?"left":"top",f=l?"bottom":"right",p=C(n)[c];s[f]-pa[f]&&(t.offsets.popper[h]+=s[h]+p-a[f]),t.offsets.popper=x(t.offsets.popper);var g=s[h]+s[c]/2-p/2,m=_(t.instance.popper),v=parseFloat(m["margin"+u],10),b=parseFloat(m["border"+u+"Width"],10),y=g-t.offsets.popper[h]-v-b;return y=F(N(a[c]-p,y),0),t.arrowElement=n,t.offsets.arrow=(q(i={},h,Math.round(y)),q(i,d,""),i),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(p,g){if(t(p.instance.modifiers,"inner"))return p;if(p.flipped&&p.placement===p.originalPlacement)return p;var m=k(p.instance.popper,p.instance.reference,g.padding,g.boundariesElement,p.positionFixed),v=p.placement.split("-")[0],b=S(v),y=p.placement.split("-")[1]||"",_=[];switch(g.behavior){case K:_=[v,b];break;case Q:_=o(v);break;case X:_=o(v,!0);break;default:_=g.behavior}return _.forEach(function(t,e){if(v!==t||_.length===e+1)return p;v=p.placement.split("-")[0],b=S(v);var i,n=p.offsets.popper,o=p.offsets.reference,r=O,a="left"===v&&r(n.right)>r(o.left)||"right"===v&&r(n.left)r(o.top)||"bottom"===v&&r(n.top)r(m.right),c=r(n.top)r(m.bottom),h="left"===v&&s||"right"===v&&l||"top"===v&&c||"bottom"===v&&u,d=-1!==["top","bottom"].indexOf(v),f=!!g.flipVariations&&(d&&"start"===y&&s||d&&"end"===y&&l||!d&&"start"===y&&c||!d&&"end"===y&&u);(a||h||f)&&(p.flipped=!0,(a||h)&&(v=_[e+1]),f&&(y="end"===(i=y)?"start":"start"===i?"end":i),p.placement=v+(y?"-"+y:""),p.offsets.popper=V({},p.offsets.popper,T(p.instance.popper,p.offsets.reference,p.placement)),p=A(p.instance.modifiers,p,"flip"))}),p},behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,i=e.split("-")[0],n=t.offsets,o=n.popper,r=n.reference,a=-1!==["left","right"].indexOf(i),s=-1===["top","left"].indexOf(i);return o[a?"left":"top"]=r[i]-(s?o[a?"width":"height"]:0),t.placement=S(e),t.offsets.popper=x(o),t}},hide:{order:800,enabled:!0,fn:function(t){if(!M(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,i=D(t.instance.modifiers,function(t){return"preventOverflow"===t.name}).boundaries;if(e.bottomi.right||e.top>i.bottom||e.right+~]|"+L+")"+L+"*"),q=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(H),U=new RegExp("^"+R+"$"),Y={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+H),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+F+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},K=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,X=/^[^{]+\{\s*\[native \w/,G=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,J=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),tt=function(t,e,i){var n="0x"+e-65536;return n!=n||i?e:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)},et=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,it=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},nt=function(){w()},ot=bt(function(t){return!0===t.disabled&&("form"in t||"label"in t)},{dir:"parentNode",next:"legend"});try{P.apply(e=N.call(b.childNodes),b.childNodes),e[b.childNodes.length].nodeType}catch(i){P={apply:e.length?function(t,e){M.apply(t,N.call(e))}:function(t,e){for(var i=t.length,n=0;t[i++]=e[n++];);t.length=i-1}}}function rt(t,e,i,n){var o,r,a,s,l,c,u,h=e&&e.ownerDocument,d=e?e.nodeType:9;if(i=i||[],"string"!=typeof t||!t||1!==d&&9!==d&&11!==d)return i;if(!n&&((e?e.ownerDocument||e:b)!==k&&w(e),e=e||k,C)){if(11!==d&&(l=G.exec(t)))if(o=l[1]){if(9===d){if(!(a=e.getElementById(o)))return i;if(a.id===o)return i.push(a),i}else if(h&&(a=h.getElementById(o))&&v(e,a)&&a.id===o)return i.push(a),i}else{if(l[2])return P.apply(i,e.getElementsByTagName(t)),i;if((o=l[3])&&f.getElementsByClassName&&e.getElementsByClassName)return P.apply(i,e.getElementsByClassName(o)),i}if(f.qsa&&!D[t+" "]&&(!m||!m.test(t))){if(1!==d)h=e,u=t;else if("object"!==e.nodeName.toLowerCase()){for((s=e.getAttribute("id"))?s=s.replace(et,it):e.setAttribute("id",s=S),r=(c=p(t)).length;r--;)c[r]="#"+s+" "+vt(c[r]);u=c.join(","),h=J.test(t)&>(e.parentNode)||e}if(u)try{return P.apply(i,h.querySelectorAll(u)),i}catch(t){}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,i,n)}function at(){var n=[];return function t(e,i){return n.push(e+" ")>_.cacheLength&&delete t[n.shift()],t[e+" "]=i}}function st(t){return t[S]=!0,t}function lt(t){var e=k.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ct(t,e){for(var i=t.split("|"),n=i.length;n--;)_.attrHandle[i[n]]=e}function ut(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 ht(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function dt(i){return function(t){var e=t.nodeName.toLowerCase();return("input"===e||"button"===e)&&t.type===i}}function ft(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ot(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function pt(a){return st(function(r){return r=+r,st(function(t,e){for(var i,n=a([],t.length,r),o=n.length;o--;)t[i=n[o]]&&(t[i]=!(e[i]=t[i]))})})}function gt(t){return t&&void 0!==t.getElementsByTagName&&t}for(t in f=rt.support={},o=rt.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},w=rt.setDocument=function(t){var e,i,n=t?t.ownerDocument||t:b;return n!==k&&9===n.nodeType&&n.documentElement&&(a=(k=n).documentElement,C=!o(k),b!==k&&(i=k.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",nt,!1):i.attachEvent&&i.attachEvent("onunload",nt)),f.attributes=lt(function(t){return t.className="i",!t.getAttribute("className")}),f.getElementsByTagName=lt(function(t){return t.appendChild(k.createComment("")),!t.getElementsByTagName("*").length}),f.getElementsByClassName=X.test(k.getElementsByClassName),f.getById=lt(function(t){return a.appendChild(t).id=S,!k.getElementsByName||!k.getElementsByName(S).length}),f.getById?(_.filter.ID=function(t){var e=t.replace(Z,tt);return function(t){return t.getAttribute("id")===e}},_.find.ID=function(t,e){if(void 0!==e.getElementById&&C){var i=e.getElementById(t);return i?[i]:[]}}):(_.filter.ID=function(t){var i=t.replace(Z,tt);return function(t){var e=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return e&&e.value===i}},_.find.ID=function(t,e){if(void 0!==e.getElementById&&C){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[]}}),_.find.TAG=f.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):f.qsa?e.querySelectorAll(t):void 0}:function(t,e){var i,n=[],o=0,r=e.getElementsByTagName(t);if("*"!==t)return r;for(;i=r[o++];)1===i.nodeType&&n.push(i);return n},_.find.CLASS=f.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&C)return e.getElementsByClassName(t)},s=[],m=[],(f.qsa=X.test(k.querySelectorAll))&&(lt(function(t){a.appendChild(t).innerHTML="",t.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+L+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||m.push("\\["+L+"*(?:value|"+F+")"),t.querySelectorAll("[id~="+S+"-]").length||m.push("~="),t.querySelectorAll(":checked").length||m.push(":checked"),t.querySelectorAll("a#"+S+"+*").length||m.push(".#.+[+~]")}),lt(function(t){t.innerHTML="";var e=k.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&m.push("name"+L+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),a.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),m.push(",.*:")})),(f.matchesSelector=X.test(u=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&<(function(t){f.disconnectedMatch=u.call(t,"*"),u.call(t,"[s!='']:x"),s.push("!=",H)}),m=m.length&&new RegExp(m.join("|")),s=s.length&&new RegExp(s.join("|")),e=X.test(a.compareDocumentPosition),v=e||X.test(a.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},A=e?function(t,e){if(t===e)return c=!0,0;var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i||(1&(i=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!f.sortDetached&&e.compareDocumentPosition(t)===i?t===k||t.ownerDocument===b&&v(b,t)?-1:e===k||e.ownerDocument===b&&v(b,e)?1:l?O(l,t)-O(l,e):0:4&i?-1:1)}:function(t,e){if(t===e)return c=!0,0;var i,n=0,o=t.parentNode,r=e.parentNode,a=[t],s=[e];if(!o||!r)return t===k?-1:e===k?1:o?-1:r?1:l?O(l,t)-O(l,e):0;if(o===r)return ut(t,e);for(i=t;i=i.parentNode;)a.unshift(i);for(i=e;i=i.parentNode;)s.unshift(i);for(;a[n]===s[n];)n++;return n?ut(a[n],s[n]):a[n]===b?-1:s[n]===b?1:0}),k},rt.matches=function(t,e){return rt(t,null,null,e)},rt.matchesSelector=function(t,e){if((t.ownerDocument||t)!==k&&w(t),e=e.replace(q,"='$1']"),f.matchesSelector&&C&&!D[e+" "]&&(!s||!s.test(e))&&(!m||!m.test(e)))try{var i=u.call(t,e);if(i||f.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(t){}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(Z,tt),t[3]=(t[3]||t[4]||t[5]||"").replace(Z,tt),"~="===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]||rt.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]&&rt.error(t[0]),t},PSEUDO:function(t){var e,i=!t[6]&&t[2];return Y.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":i&&V.test(i)&&(e=p(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(Z,tt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=d[t+" "];return e||(e=new RegExp("(^|"+L+")"+t+"("+L+"|$)"))&&d(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(i,n,o){return function(t){var e=rt.attr(t,i);return null==e?"!="===n:!n||(e+="","="===n?e===o:"!="===n?e!==o:"^="===n?o&&0===e.indexOf(o):"*="===n?o&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function E(t,i,n){return b(i)?S.grep(t,function(t,e){return!!i.call(t,e,t)!==n}):i.nodeType?S.grep(t,function(t){return t===i!==n}):"string"!=typeof i?S.grep(t,function(t){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(t,e,i){var n,o;if(!t)return this;if(i=i||I,"string"!=typeof t)return t.nodeType?(this[0]=t,this.length=1,this):b(t)?void 0!==i.ready?i.ready(t):t(S):S.makeArray(t,this);if(!(n="<"===t[0]&&">"===t[t.length-1]&&3<=t.length?[null,t,null]:M.exec(t))||!n[1]&&e)return!e||e.jquery?(e||i).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof S?e[0]:e,S.merge(this,S.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:C,!0)),A.test(n[1])&&S.isPlainObject(e))for(n in e)b(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}return(o=C.getElementById(n[2]))&&(this[0]=o,this.length=1),this}).prototype=S.fn,I=S(C);var P=/^(?:parents|prev(?:Until|All))/,N={children:!0,contents:!0,next:!0,prev:!0};function O(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}S.fn.extend({has:function(t){var e=S(t,this),i=e.length;return this.filter(function(){for(var t=0;t\x20\t\r\n\f]+)/i,ut=/^$|^module$|\/(?:java|ecma)script/i,ht={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function dt(t,e){var i;return i=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&D(t,e)?S.merge([t],i):i}function ft(t,e){for(var i=0,n=t.length;ix",v.noCloneChecked=!!pt.cloneNode(!0).lastChild.defaultValue;var bt=C.documentElement,yt=/^key/,_t=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,xt=/^([^.]*)(?:\.(.+)|)/;function wt(){return!0}function kt(){return!1}function Ct(){try{return C.activeElement}catch(t){}}function St(t,e,i,n,o,r){var a,s;if("object"==typeof e){for(s in"string"!=typeof i&&(n=n||i,i=void 0),e)St(t,s,i,n,e[s],r);return t}if(null==n&&null==o?(o=i,n=i=void 0):null==o&&("string"==typeof i?(o=n,n=void 0):(o=n,n=i,i=void 0)),!1===o)o=kt;else if(!o)return t;return 1===r&&(a=o,(o=function(t){return S().off(t),a.apply(this,arguments)}).guid=a.guid||(a.guid=S.guid++)),t.each(function(){S.event.add(this,e,o,n,i)})}S.event={global:{},add:function(e,t,i,n,o){var r,a,s,l,c,u,h,d,f,p,g,m=Q.get(e);if(m)for(i.handler&&(i=(r=i).handler,o=r.selector),o&&S.find.matchesSelector(bt,o),i.guid||(i.guid=S.guid++),(l=m.events)||(l=m.events={}),(a=m.handle)||(a=m.handle=function(t){return void 0!==S&&S.event.triggered!==t.type?S.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(F)||[""]).length;c--;)f=g=(s=xt.exec(t[c])||[])[1],p=(s[2]||"").split(".").sort(),f&&(h=S.event.special[f]||{},f=(o?h.delegateType:h.bindType)||f,h=S.event.special[f]||{},u=S.extend({type:f,origType:g,data:n,handler:i,guid:i.guid,selector:o,needsContext:o&&S.expr.match.needsContext.test(o),namespace:p.join(".")},r),(d=l[f])||((d=l[f]=[]).delegateCount=0,h.setup&&!1!==h.setup.call(e,n,p,a)||e.addEventListener&&e.addEventListener(f,a)),h.add&&(h.add.call(e,u),u.handler.guid||(u.handler.guid=i.guid)),o?d.splice(d.delegateCount++,0,u):d.push(u),S.event.global[f]=!0)},remove:function(t,e,i,n,o){var r,a,s,l,c,u,h,d,f,p,g,m=Q.hasData(t)&&Q.get(t);if(m&&(l=m.events)){for(c=(e=(e||"").match(F)||[""]).length;c--;)if(f=g=(s=xt.exec(e[c])||[])[1],p=(s[2]||"").split(".").sort(),f){for(h=S.event.special[f]||{},d=l[f=(n?h.delegateType:h.bindType)||f]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=r=d.length;r--;)u=d[r],!o&&g!==u.origType||i&&i.guid!==u.guid||s&&!s.test(u.namespace)||n&&n!==u.selector&&("**"!==n||!u.selector)||(d.splice(r,1),u.selector&&d.delegateCount--,h.remove&&h.remove.call(t,u));a&&!d.length&&(h.teardown&&!1!==h.teardown.call(t,p,m.handle)||S.removeEvent(t,f,m.handle),delete l[f])}else for(f in l)S.event.remove(t,f+e[c],i,n,!0);S.isEmptyObject(l)&&Q.remove(t,"handle events")}},dispatch:function(t){var e,i,n,o,r,a,s=S.event.fix(t),l=new Array(arguments.length),c=(Q.get(this,"events")||{})[s.type]||[],u=S.event.special[s.type]||{};for(l[0]=s,e=1;e\x20\t\r\n\f]*)[^>]*)\/>/gi,Dt=/\s*$/g;function It(t,e){return D(t,"table")&&D(11!==e.nodeType?e:e.firstChild,"tr")&&S(t).children("tbody")[0]||t}function Mt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Pt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Nt(t,e){var i,n,o,r,a,s,l,c;if(1===e.nodeType){if(Q.hasData(t)&&(r=Q.access(t),a=Q.set(e,r),c=r.events))for(o in delete a.handle,a.events={},c)for(i=0,n=c[o].length;i")},clone:function(t,e,i){var n,o,r,a,s,l,c,u=t.cloneNode(!0),h=S.contains(t.ownerDocument,t);if(!(v.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||S.isXMLDoc(t)))for(a=dt(u),n=0,o=(r=dt(t)).length;n").prop({charset:i.scriptCharset,src:i.url}).on("load error",o=function(t){n.remove(),o=null,t&&e("error"===t.type?404:200,t.type)}),C.head.appendChild(n[0])},abort:function(){o&&o()}}});var $e,ze=[],qe=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=ze.pop()||S.expando+"_"+_e++;return this[t]=!0,t}}),S.ajaxPrefilter("json jsonp",function(t,e,i){var n,o,r,a=!1!==t.jsonp&&(qe.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&qe.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return n=t.jsonpCallback=b(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(qe,"$1"+n):!1!==t.jsonp&&(t.url+=(xe.test(t.url)?"&":"?")+t.jsonp+"="+n),t.converters["script json"]=function(){return r||S.error(n+" was not called"),r[0]},t.dataTypes[0]="json",o=k[n],k[n]=function(){r=arguments},i.always(function(){void 0===o?S(k).removeProp(n):k[n]=o,t[n]&&(t.jsonpCallback=e.jsonpCallback,ze.push(n)),r&&b(o)&&o(r[0]),r=o=void 0}),"script"}),v.createHTMLDocument=(($e=C.implementation.createHTMLDocument("").body).innerHTML="
",2===$e.childNodes.length),S.parseHTML=function(t,e,i){return"string"!=typeof t?[]:("boolean"==typeof e&&(i=e,e=!1),e||(v.createHTMLDocument?((n=(e=C.implementation.createHTMLDocument("")).createElement("base")).href=C.location.href,e.head.appendChild(n)):e=C),r=!i&&[],(o=A.exec(t))?[e.createElement(o[1])]:(o=vt([t],e,r),r&&r.length&&S(r).remove(),S.merge([],o.childNodes)));var n,o,r},S.fn.load=function(t,e,i){var n,o,r,a=this,s=t.indexOf(" ");return-1").append(S.parseHTML(t)).find(n):t)}).always(i&&function(t,e){a.each(function(){i.apply(this,r||[t.responseText,e,t])})}),this},S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){S.fn[e]=function(t){return this.on(e,t)}}),S.expr.pseudos.animated=function(e){return S.grep(S.timers,function(t){return e===t.elem}).length},S.offset={setOffset:function(t,e,i){var n,o,r,a,s,l,c=S.css(t,"position"),u=S(t),h={};"static"===c&&(t.style.position="relative"),s=u.offset(),r=S.css(t,"top"),l=S.css(t,"left"),o=("absolute"===c||"fixed"===c)&&-1<(r+l).indexOf("auto")?(a=(n=u.position()).top,n.left):(a=parseFloat(r)||0,parseFloat(l)||0),b(e)&&(e=e.call(t,i,S.extend({},s))),null!=e.top&&(h.top=e.top-s.top+a),null!=e.left&&(h.left=e.left-s.left+o),"using"in e?e.using.call(t,h):u.css(h)}},S.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){S.offset.setOffset(this,e,t)});var t,i,n=this[0];return n?n.getClientRects().length?(t=n.getBoundingClientRect(),i=n.ownerDocument.defaultView,{top:t.top+i.pageYOffset,left:t.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"===S.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"===S.css(t,"position");)t=t.parentNode;t&&t!==n&&1===t.nodeType&&((o=S(t).offset()).top+=S.css(t,"borderTopWidth",!0),o.left+=S.css(t,"borderLeftWidth",!0))}return{top:e.top-o.top-S.css(n,"marginTop",!0),left:e.left-o.left-S.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===S.css(t,"position");)t=t.offsetParent;return t||bt})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,o){var r="pageYOffset"===o;S.fn[e]=function(t){return $(this,function(t,e,i){var n;if(y(t)?n=t:9===t.nodeType&&(n=t.defaultView),void 0===i)return n?n[o]:t[e];n?n.scrollTo(r?n.pageXOffset:i,r?i:n.pageYOffset):t[e]=i},e,t,arguments.length)}}),S.each(["top","left"],function(t,i){S.cssHooks[i]=jt(v.pixelPosition,function(t,e){if(e)return e=Ht(t,i),Lt.test(e)?S(t).position()[i]+"px":e})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(n,r){S.fn[r]=function(t,e){var i=arguments.length&&(n||"boolean"!=typeof t),o=n||(!0===t||!0===e?"margin":"border");return $(this,function(t,e,i){var n;return y(t)?0===r.indexOf("outer")?t["inner"+a]:t.document.documentElement["client"+a]:9===t.nodeType?(n=t.documentElement,Math.max(t.body["scroll"+a],n["scroll"+a],t.body["offset"+a],n["offset"+a],n["client"+a])):void 0===i?S.css(t,e,o):S.style(t,e,i,o)},s,i?t:void 0,i)}})}),S.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,i){S.fn[i]=function(t,e){return 0this._items.length-1||t<0))if(this._isSliding)be(this._element).one(De.SLID,function(){return e.to(t)});else{if(i===t)return this.pause(),void this.cycle();var n=idocument.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},t._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},t._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right
',trigger:"hover focus",title:"",delay:0,html:!(gt={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"}),selector:!(pt={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)"}),placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent"},bt={HIDE:"hide"+ht,HIDDEN:"hidden"+ht,SHOW:(vt="show")+ht,SHOWN:"shown"+ht,INSERTED:"inserted"+ht,CLICK:"click"+ht,FOCUSIN:"focusin"+ht,FOCUSOUT:"focusout"+ht,MOUSEENTER:"mouseenter"+ht,MOUSELEAVE:"mouseleave"+ht},yt="fade",_t="show",xt="hover",wt="focus",kt=function(){function c(t,e){if(void 0===u)throw new TypeError("Bootstrap tooltips require Popper.js (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var t=c.prototype;return t.enable=function(){this._isEnabled=!0},t.disable=function(){this._isEnabled=!1},t.toggleEnabled=function(){this._isEnabled=!this._isEnabled},t.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,i=lt(t.currentTarget).data(e);i||(i=new this.constructor(t.currentTarget,this._getDelegateConfig()),lt(t.currentTarget).data(e,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(lt(this.getTipElement()).hasClass(_t))return void this._leave(null,this);this._enter(null,this)}},t.dispose=function(){clearTimeout(this._timeout),lt.removeData(this.element,this.constructor.DATA_KEY),lt(this.element).off(this.constructor.EVENT_KEY),lt(this.element).closest(".modal").off("hide.bs.modal"),this.tip&<(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,(this._activeTrigger=null)!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},t.show=function(){var e=this;if("none"===lt(this.element).css("display"))throw new Error("Please use show on visible elements");var t=lt.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){lt(this.element).trigger(t);var i=lt.contains(this.element.ownerDocument.documentElement,this.element);if(t.isDefaultPrevented()||!i)return;var n=this.getTipElement(),o=je.getUID(this.constructor.NAME);n.setAttribute("id",o),this.element.setAttribute("aria-describedby",o),this.setContent(),this.config.animation&<(n).addClass(yt);var r="function"==typeof this.config.placement?this.config.placement.call(this,n,this.element):this.config.placement,a=this._getAttachment(r);this.addAttachmentClass(a);var s=!1===this.config.container?document.body:lt(this.config.container);lt(n).data(this.constructor.DATA_KEY,this),lt.contains(this.element.ownerDocument.documentElement,this.tip)||lt(n).appendTo(s),lt(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new u(this.element,n,{placement:a,modifiers:{offset:{offset:this.config.offset},flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){e._handlePopperPlacementChange(t)}}),lt(n).addClass(_t),"ontouchstart"in document.documentElement&<("body").children().on("mouseover",null,lt.noop);var l=function(){e.config.animation&&e._fixTransition();var t=e._hoverState;e._hoverState=null,lt(e.element).trigger(e.constructor.Event.SHOWN),"out"===t&&e._leave(null,e)};je.supportsTransitionEnd()&<(this.tip).hasClass(yt)?lt(this.tip).one(je.TRANSITION_END,l).emulateTransitionEnd(c._TRANSITION_DURATION):l()}},t.hide=function(t){var e=this,i=this.getTipElement(),n=lt.Event(this.constructor.Event.HIDE),o=function(){e._hoverState!==vt&&i.parentNode&&i.parentNode.removeChild(i),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),lt(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};lt(this.element).trigger(n),n.isDefaultPrevented()||(lt(i).removeClass(_t),"ontouchstart"in document.documentElement&<("body").children().off("mouseover",null,lt.noop),this._activeTrigger.click=!1,this._activeTrigger[wt]=!1,this._activeTrigger[xt]=!1,je.supportsTransitionEnd()&<(this.tip).hasClass(yt)?lt(i).one(je.TRANSITION_END,o).emulateTransitionEnd(150):o(),this._hoverState="")},t.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},t.isWithContent=function(){return Boolean(this.getTitle())},t.addAttachmentClass=function(t){lt(this.getTipElement()).addClass("bs-tooltip-"+t)},t.getTipElement=function(){return this.tip=this.tip||lt(this.config.template)[0],this.tip},t.setContent=function(){var t=lt(this.getTipElement());this.setElementContent(t.find(".tooltip-inner"),this.getTitle()),t.removeClass(yt+" "+_t)},t.setElementContent=function(t,e){var i=this.config.html;"object"==typeof e&&(e.nodeType||e.jquery)?i?lt(e).parent().is(t)||t.empty().append(e):t.text(lt(e).text()):t[i?"html":"text"](e)},t.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},t._getAttachment=function(t){return gt[t.toUpperCase()]},t._setListeners=function(){var n=this;this.config.trigger.split(" ").forEach(function(t){if("click"===t)lt(n.element).on(n.constructor.Event.CLICK,n.config.selector,function(t){return n.toggle(t)});else if("manual"!==t){var e=t===xt?n.constructor.Event.MOUSEENTER:n.constructor.Event.FOCUSIN,i=t===xt?n.constructor.Event.MOUSELEAVE:n.constructor.Event.FOCUSOUT;lt(n.element).on(e,n.config.selector,function(t){return n._enter(t)}).on(i,n.config.selector,function(t){return n._leave(t)})}lt(n.element).closest(".modal").on("hide.bs.modal",function(){return n.hide()})}),this.config.selector?this.config=h({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},t._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},t._enter=function(t,e){var i=this.constructor.DATA_KEY;(e=e||lt(t.currentTarget).data(i))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),lt(t.currentTarget).data(i,e)),t&&(e._activeTrigger["focusin"===t.type?wt:xt]=!0),lt(e.getTipElement()).hasClass(_t)||e._hoverState===vt?e._hoverState=vt:(clearTimeout(e._timeout),e._hoverState=vt,e.config.delay&&e.config.delay.show?e._timeout=setTimeout(function(){e._hoverState===vt&&e.show()},e.config.delay.show):e.show())},t._leave=function(t,e){var i=this.constructor.DATA_KEY;(e=e||lt(t.currentTarget).data(i))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),lt(t.currentTarget).data(i,e)),t&&(e._activeTrigger["focusout"===t.type?wt:xt]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState="out",e.config.delay&&e.config.delay.hide?e._timeout=setTimeout(function(){"out"===e._hoverState&&e.hide()},e.config.delay.hide):e.hide())},t._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},t._getConfig=function(t){return"number"==typeof(t=h({},this.constructor.Default,lt(this.element).data(),t)).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),je.typeCheckConfig(ct,t,this.constructor.DefaultType),t},t._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},t._cleanTipClass=function(){var t=lt(this.getTipElement()),e=t.attr("class").match(ft);null!==e&&0

'}),rt=h({},Ye.DefaultType,{content:"(string|element|function)"}),at={HIDE:"hide"+et,HIDDEN:"hidden"+et,SHOW:"show"+et,SHOWN:"shown"+et,INSERTED:"inserted"+et,CLICK:"click"+et,FOCUSIN:"focusin"+et,FOCUSOUT:"focusout"+et,MOUSEENTER:"mouseenter"+et,MOUSELEAVE:"mouseleave"+et},st=function(t){var e,i;function n(){return t.apply(this,arguments)||this}i=t,(e=n).prototype=Object.create(i.prototype),(e.prototype.constructor=e).__proto__=i;var o=n.prototype;return o.isWithContent=function(){return this.getTitle()||this._getContent()},o.addAttachmentClass=function(t){J(this.getTipElement()).addClass("bs-popover-"+t)},o.getTipElement=function(){return this.tip=this.tip||J(this.config.template)[0],this.tip},o.setContent=function(){var t=J(this.getTipElement());this.setElementContent(t.find(".popover-header"),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(".popover-body"),e),t.removeClass("fade show")},o._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},o._cleanTipClass=function(){var t=J(this.getTipElement()),e=t.attr("class").match(nt);null!==e&&0=this._offsets[o]&&(void 0===this._offsets[o+1]||t li > .active",M=function(){function n(t){this._element=t}var t=n.prototype;return t.show=function(){var i=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&k(this._element).hasClass(A)||k(this._element).hasClass("disabled"))){var t,n,e=k(this._element).closest(".nav, .list-group")[0],o=je.getSelectorFromElement(this._element);if(e){var r="UL"===e.nodeName?I:E;n=(n=k.makeArray(k(e).find(r)))[n.length-1]}var a=k.Event(D.HIDE,{relatedTarget:this._element}),s=k.Event(D.SHOW,{relatedTarget:n});if(n&&k(n).trigger(a),k(this._element).trigger(s),!s.isDefaultPrevented()&&!a.isDefaultPrevented()){o&&(t=k(o)[0]),this._activate(this._element,e);var l=function(){var t=k.Event(D.HIDDEN,{relatedTarget:i._element}),e=k.Event(D.SHOWN,{relatedTarget:n});k(n).trigger(t),k(i._element).trigger(e)};t?this._activate(t,t.parentNode,l):l()}}},t.dispose=function(){k.removeData(this._element,C),this._element=null},t._activate=function(t,e,i){var n=this,o=("UL"===e.nodeName?k(e).find(I):k(e).children(E))[0],r=i&&je.supportsTransitionEnd()&&o&&k(o).hasClass("fade"),a=function(){return n._transitionComplete(t,o,i)};o&&r?k(o).one(je.TRANSITION_END,a).emulateTransitionEnd(150):a()},t._transitionComplete=function(t,e,i){if(e){k(e).removeClass("show "+A);var n=k(e.parentNode).find("> .dropdown-menu .active")[0];n&&k(n).removeClass(A),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}if(k(t).addClass(A),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),je.reflow(t),k(t).addClass("show"),t.parentNode&&k(t.parentNode).hasClass("dropdown-menu")){var o=k(t).closest(".dropdown")[0];o&&k(o).find(".dropdown-toggle").addClass(A),t.setAttribute("aria-expanded",!0)}i&&i()},n._jQueryInterface=function(i){return this.each(function(){var t=k(this),e=t.data(C);if(e||(e=new n(this),t.data(C,e)),"string"==typeof i){if(void 0===e[i])throw new TypeError('No method named "'+i+'"');e[i]()}})},a(n,null,[{key:"VERSION",get:function(){return"4.0.0"}}]),n}(),k(document).on(D.CLICK_DATA_API,'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',function(t){t.preventDefault(),M._jQueryInterface.call(k(this),"show")}),k.fn.tab=M._jQueryInterface,k.fn.tab.Constructor=M,k.fn.tab.noConflict=function(){return k.fn.tab=T,M._jQueryInterface},M);!function(t){if(void 0===t)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1===e[0]&&9===e[1]&&e[2]<1||4<=e[0])throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(e),t.Util=je,t.Alert=Be,t.Button=$e,t.Carousel=ze,t.Collapse=qe,t.Dropdown=Ve,t.Modal=Ue,t.Popover=Ke,t.Scrollspy=Qe,t.Tab=Xe,t.Tooltip=Ye,Object.defineProperty(t,"__esModule",{value:!0})}),function(t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Chart=t()}(function(){return function r(a,s,l){function c(e,t){if(!s[e]){if(!a[e]){var i="function"==typeof require&&require;if(!t&&i)return i(e,!0);if(u)return u(e,!0);var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}var o=s[e]={exports:{}};a[e][0].call(o.exports,function(t){return c(a[e][1][t]||t)},o,o.exports,r,a,s,l)}return s[e].exports}for(var u="function"==typeof require&&require,t=0;t');var i=t.data,n=i.datasets,o=i.labels;if(n.length)for(var r=0;r'),o[r]&&e.push(o[r]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(l){var c=l.data;return c.labels.length&&c.datasets.length?c.labels.map(function(t,e){var i=l.getDatasetMeta(0),n=c.datasets[0],o=i.data[e],r=o&&o.custom||{},a=I.valueAtIndexOrDefault,s=l.options.elements.arc;return{text:t,fillStyle:r.backgroundColor?r.backgroundColor:a(n.backgroundColor,e,s.backgroundColor),strokeStyle:r.borderColor?r.borderColor:a(n.borderColor,e,s.borderColor),lineWidth:r.borderWidth?r.borderWidth:a(n.borderWidth,e,s.borderWidth),hidden:isNaN(n.data[e])||i.data[e].hidden,index:e}}):[]}},onClick:function(t,e){var i,n,o,r=e.index,a=this.chart;for(i=0,n=(a.data.datasets||[]).length;i=Math.PI?-1:f<-Math.PI?1:0))+d,g=Math.cos(f),m=Math.sin(f),v=Math.cos(p),b=Math.sin(p),y=f<=0&&0<=p||f<=2*Math.PI&&2*Math.PI<=p,_=f<=.5*Math.PI&&.5*Math.PI<=p||f<=2.5*Math.PI&&2.5*Math.PI<=p,x=f<=-Math.PI&&-Math.PI<=p||f<=Math.PI&&Math.PI<=p,w=f<=.5*-Math.PI&&.5*-Math.PI<=p||f<=1.5*Math.PI&&1.5*Math.PI<=p,k=h/100,C=x?-1:Math.min(g*(g<0?1:k),v*(v<0?1:k)),S=w?-1:Math.min(m*(m<0?1:k),b*(b<0?1:k)),T=y?1:Math.max(g*(0(n=n');var i=t.data,n=i.datasets,o=i.labels;if(n.length)for(var r=0;r'),o[r]&&e.push(o[r]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(s){var l=s.data;return l.labels.length&&l.datasets.length?l.labels.map(function(t,e){var i=s.getDatasetMeta(0),n=l.datasets[0],o=i.data[e].custom||{},r=_.valueAtIndexOrDefault,a=s.options.elements.arc;return{text:t,fillStyle:o.backgroundColor?o.backgroundColor:r(n.backgroundColor,e,a.backgroundColor),strokeStyle:o.borderColor?o.borderColor:r(n.borderColor,e,a.borderColor),lineWidth:o.borderWidth?o.borderWidth:r(n.borderWidth,e,a.borderWidth),hidden:isNaN(n.data[e])||i.data[e].hidden,index:e}}):[]}},onClick:function(t,e){var i,n,o,r=e.index,a=this.chart;for(i=0,n=(a.data.datasets||[]).length;i=e.numSteps?(r.callback(e.onAnimationComplete,[e],i),i.animating=!1,n.splice(o,1)):++o}},Object.defineProperty(t.Animation.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(t.Animation.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}})}},{25:25,26:26,45:45}],23:[function(t,e,i){"use strict";var u=t(25),h=t(45),o=t(28),d=t(48);e.exports=function(c){function s(t){return"top"===t||"bottom"===t}var l=c.plugins;c.types={},c.instances={},c.controllers={},h.extend(c.prototype,{construct:function(t,e){var i,n,o=this;(n=(i=(i=e)||{}).data=i.data||{}).datasets=n.datasets||[],n.labels=n.labels||[],i.options=h.configMerge(u.global,u[i.type],i.options||{}),e=i;var r=d.acquireContext(t,e),a=r&&r.canvas,s=a&&a.height,l=a&&a.width;o.id=h.uid(),o.ctx=r,o.canvas=a,o.config=e,o.width=l,o.height=s,o.aspectRatio=s?l/s:null,o.options=e.options,o._bufferedRender=!1,(o.chart=o).controller=o,c.instances[o.id]=o,Object.defineProperty(o,"data",{get:function(){return o.config.data},set:function(t){o.config.data=t}}),r&&a?(o.initialize(),o.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return l.notify(t,"beforeInit"),h.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildScales(),t.initToolTip(),l.notify(t,"afterInit"),t},clear:function(){return h.canvas.clear(this),this},stop:function(){return c.animationService.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(h.getMaximumWidth(n))),a=Math.max(0,Math.floor(o?r/o:h.getMaximumHeight(n)));if((e.width!==r||e.height!==a)&&(n.width=e.width=r,n.height=e.height=a,n.style.width=r+"px",n.style.height=a+"px",h.retinaScale(e,i.devicePixelRatio),!t)){var s={width:r,height:a};l.notify(e,"resize",[s]),e.options.onResize&&e.options.onResize(e,s),e.stop(),e.update(e.options.responsiveAnimationDuration)}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},i=t.scale;h.each(e.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),h.each(e.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),i&&(i.id=i.id||"scale")},buildScales:function(){var r=this,t=r.options,a=r.scales={},e=[];t.scales&&(e=e.concat((t.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(t.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),t.scale&&e.push({options:t.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),h.each(e,function(t){var e=t.options,i=h.valueOrDefault(e.type,t.dtype),n=c.scaleService.getScaleConstructor(i);if(n){s(e.position)!==s(t.dposition)&&(e.position=t.dposition);var o=new n({id:e.id,options:e,ctx:r.ctx,chart:r});(a[o.id]=o).mergeTicksOptions(),t.isDefault&&(r.scale=o)}}),c.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var r=this,a=[],s=[];return h.each(r.data.datasets,function(t,e){var i=r.getDatasetMeta(e),n=t.type||r.config.type;if(i.type&&i.type!==n&&(r.destroyDatasetMeta(e),i=r.getDatasetMeta(e)),i.type=n,a.push(i.type),i.controller)i.controller.updateIndex(e);else{var o=c.controllers[i.type];if(void 0===o)throw new Error('"'+i.type+'" is not a chart type.');i.controller=new o(r,e),s.push(i.controller)}},r),s},resetElements:function(){var i=this;h.each(i.data.datasets,function(t,e){i.getDatasetMeta(e).controller.reset()},i)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e,i,n=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),(i=(e=n).options).scale?e.scale.options=i.scale:i.scales&&i.scales.xAxes.concat(i.scales.yAxes).forEach(function(t){e.scales[t.id].options=t}),e.tooltip._options=i.tooltips,!1!==l.notify(n,"beforeUpdate")){n.tooltip._data=n.data;var o=n.buildOrUpdateControllers();h.each(n.data.datasets,function(t,e){n.getDatasetMeta(e).controller.buildOrUpdateElements()},n),n.updateLayout(),h.each(o,function(t){t.reset()}),n.updateDatasets(),n.tooltip.initialize(),n.lastActive=[],l.notify(n,"afterUpdate"),n._bufferedRender?n._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:n.render(t)}},updateLayout:function(){!1!==l.notify(this,"beforeLayout")&&(c.layoutService.update(this,this.width,this.height),l.notify(this,"afterScaleUpdate"),l.notify(this,"afterLayout"))},updateDatasets:function(){if(!1!==l.notify(this,"beforeDatasetsUpdate")){for(var t=0,e=this.data.datasets.length;t=e[t].length&&e[t].push({}),!e[t][o].type||a.type&&a.type!==e[t][o].type?p.merge(e[t][o],[l.scaleService.getScaleDefaults(r),a]):p.merge(e[t][o],a)}else p._merger(t,e,i,n)}})},p.where=function(t,e){if(p.isArray(t)&&Array.prototype.filter)return t.filter(e);var i=[];return p.each(t,function(t){e(t)&&i.push(t)}),i},p.findIndex=Array.prototype.findIndex?function(t,e,i){return t.findIndex(e,i)}:function(t,e,i){i=void 0===i?t:i;for(var n=0,o=t.length;n=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},p.previousItem=function(t,e,i){return i?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},p.niceNum=function(t,e){var i=Math.floor(p.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)},p.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)},p.getRelativePosition=function(t,e){var i,n,o=t.originalEvent||t,r=t.currentTarget||t.srcElement,a=r.getBoundingClientRect(),s=o.touches;n=s&&0i.length){for(var l=0;le&&(e=t.length)}),e},p.color=n?function(t){return t instanceof CanvasGradient&&(t=o.global.defaultColor),n(t)}:function(t){return console.error("Color.js not found!"),t},p.getHoverColor=function(t){return t instanceof CanvasPattern?t:p.color(t).saturate(.5).darken(.1).rgbString()}}},{25:25,3:3,45:45}],28:[function(t,e,i){"use strict";function s(t,e){return t.native?{x:t.x,y:t.y}:o.getRelativePosition(t,e)}function l(t,e){var i,n,o,r,a;for(n=0,r=t.data.datasets.length;nt.maxHeight){r--;break}r++,l=a*s}t.labelRotation=r},afterCalculateTickRotation:function(){$.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){$.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},i=C(t._ticks),n=t.options,o=n.ticks,r=n.scaleLabel,a=n.gridLines,s=n.display,l=t.isHorizontal(),c=w(o),u=n.gridLines.tickMarkLength;if(e.width=l?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:s&&a.drawTicks?u:0,e.height=l?s&&a.drawTicks?u:0:t.maxHeight,r.display&&s){var h=k(r)+$.options.toPadding(r.padding).height;l?e.height+=h:e.width+=h}if(o.display&&s){var d=$.longestText(t.ctx,c.font,i,t.longestTextCache),f=$.numberOfLabelLines(i),p=.5*c.size,g=t.options.ticks.padding;if(l){t.longestLabelWidth=d;var m=$.toRadians(t.labelRotation),v=Math.cos(m),b=Math.sin(m)*d+c.size*f+p*(f-1)+p;e.height=Math.min(t.maxHeight,e.height+b+g),t.ctx.font=c.font;var y=x(t.ctx,i[0],c.font),_=x(t.ctx,i[i.length-1],c.font);0!==t.labelRotation?(t.paddingLeft="bottom"===n.position?v*y+3:v*p+3,t.paddingRight="bottom"===n.position?v*p+3:v*_+3):(t.paddingLeft=y/2+3,t.paddingRight=_/2+3)}else o.mirror?d=0:d+=g+p,e.width=Math.min(t.maxWidth,e.width+d),t.paddingTop=c.size/2,t.paddingBottom=c.size/2}t.handleMargins(),t.width=e.width,t.height=e.height},handleMargins:function(){var t=this;t.margins&&(t.paddingLeft=Math.max(t.paddingLeft-t.margins.left,0),t.paddingTop=Math.max(t.paddingTop-t.margins.top,0),t.paddingRight=Math.max(t.paddingRight-t.margins.right,0),t.paddingBottom=Math.max(t.paddingBottom-t.margins.bottom,0))},afterFit:function(){$.callback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if($.isNullOrUndef(t))return NaN;if("number"==typeof t&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},getLabelForIndex:$.noop,getPixelForValue:$.noop,getValueForPixel:$.noop,getPixelForTick:function(t){var e=this,i=e.options.offset;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(i?0:1),1),o=n*t+e.paddingLeft;return i&&(o+=n/2),e.left+Math.round(o)+(e.isFullWidth()?e.margins.left:0)}var r=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(r/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var i=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft;return e.left+Math.round(i)+(e.isFullWidth()?e.margins.left:0)}return e.top+t*e.height},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:0r.width-(r.paddingLeft+r.paddingRight)&&(e=1+Math.floor((h+s.autoSkipPadding)*l/(r.width-(r.paddingLeft+r.paddingRight)))),o&&on.height-e.height&&(a="bottom");var s,l,c,u,h,d=(o.left+o.right)/2,f=(o.top+o.bottom)/2;l="center"===a?(s=function(t){return t<=d},function(t){return d=n.width-e.width/2}),c=function(t){return t+e.width>n.width},u=function(t){return t-e.width<0},h=function(t){return t<=f?"top":"bottom"},s(i.x)?(r="left",c(i.x)&&(r="center",a=h(i.y))):l(i.x)&&(r="right",u(i.x)&&(r="center",a=h(i.y)));var p=t._options;return{xAlign:p.xAlign?p.xAlign:r,yAlign:p.yAlign?p.yAlign:a}}(this,A),a=n.x,s=n.y,l=n.caretSize,c=n.caretPadding,u=n.cornerRadius,h=r.xAlign,d=r.yAlign,f=l+c,p=u+c,"right"===h?a-=o.width:"center"===h&&(a-=o.width/2),"top"===d?s+=f:s-="bottom"===d?o.height+f:o.height/2,"center"===d?"left"===h?a+=f:"right"===h&&(a-=f):"left"===h?a-=p:"right"===h&&(a+=p),D={x:a,y:s}}else k.opacity=0;return k.xAlign=T.xAlign,k.yAlign=T.yAlign,k.x=D.x,k.y=D.y,k.width=A.width,k.height=A.height,k.caretX=E.x,k.caretY=E.y,_._model=k,t&&x.custom&&x.custom.call(_,k),_},drawCaret:function(t,e){var i=this._chart.ctx,n=this._view,o=this.getCaretPosition(t,e,n);i.lineTo(o.x1,o.y1),i.lineTo(o.x2,o.y2),i.lineTo(o.x3,o.y3)},getCaretPosition:function(t,e,i){var n,o,r,a,s,l,c=i.caretSize,u=i.cornerRadius,h=i.xAlign,d=i.yAlign,f=t.x,p=t.y,g=e.width,m=e.height;if("center"===d)s=p+m/2,l="left"===h?(o=(n=f)-c,r=n,a=s+c,s-c):(o=(n=f+g)+c,r=n,a=s-c,s+c);else if(r=(n="left"===h?(o=f+u+c)-c:"right"===h?(o=f+g-u-c)-c:(o=f+g/2)-c,o+c),"top"===d)s=(a=p)-c,l=a;else{s=(a=p+m)+c,l=a;var v=r;r=n,n=v}return{x1:n,x2:o,x3:r,y1:a,y2:s,y3:l}},drawTitle:function(t,e,i,n){var o=e.title;if(o.length){i.textAlign=e._titleAlign,i.textBaseline="top";var r,a,s=e.titleFontSize,l=e.titleSpacing;for(i.fillStyle=d(e.titleFontColor,n),i.font=F.fontString(s,e._titleFontStyle,e._titleFontFamily),r=0,a=o.length;r=i.innerRadius&&r<=i.outerRadius;return l&&c}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,i=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,i=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},draw:function(){var t=this._chart.ctx,e=this._view,i=e.startAngle,n=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,i,n),t.arc(e.x,e.y,e.innerRadius,n,i,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})},{25:25,26:26,45:45}],37:[function(t,e,i){"use strict";var n=t(25),o=t(26),u=t(45),h=n.global;n._set("global",{elements:{line:{tension:.4,backgroundColor:h.defaultColor,borderWidth:3,borderColor:h.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}}),e.exports=o.extend({draw:function(){var t,e,i,n,o=this._view,r=this._chart.ctx,a=o.spanGaps,s=this._children.slice(),l=h.elements.line,c=-1;for(this._loop&&s.length&&s.push(s[0]),r.save(),r.lineCap=o.borderCapStyle||l.borderCapStyle,r.setLineDash&&r.setLineDash(o.borderDash||l.borderDash),r.lineDashOffset=o.borderDashOffset||l.borderDashOffset,r.lineJoin=o.borderJoinStyle||l.borderJoinStyle,r.lineWidth=o.borderWidth||l.borderWidth,r.strokeStyle=o.borderColor||h.defaultColor,r.beginPath(),c=-1,t=0;tn?1:-1,c.borderSkipped||"bottom"),u){var h=Math.min(Math.abs(e-i),Math.abs(n-o)),d=(u=h=n.left&&t<=n.right&&e>=n.top&&e<=n.bottom}return i},inLabelRange:function(t,e){if(!this._view)return!1;var i=o(this);return l(this)?t>=i.left&&t<=i.right:e>=i.top&&e<=i.bottom},inXRange:function(t){var e=o(this);return t>=e.left&&t<=e.right},inYRange:function(t){var e=o(this);return t>=e.top&&t<=e.bottom},getCenterPoint:function(){var t,e,i=this._view;return e=l(this)?(t=i.x,(i.y+i.base)/2):(t=(i.x+i.base)/2,i.y),{x:t,y:e}},getArea:function(){var t=this._view;return t.width*Math.abs(t.y-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}})},{25:25,26:26}],40:[function(t,e,i){"use strict";e.exports={},e.exports.Arc=t(36),e.exports.Line=t(37),e.exports.Point=t(38),e.exports.Rectangle=t(39)},{36:36,37:37,38:38,39:39}],41:[function(t,e,i){"use strict";var n=t(42);i=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,i,n,o,r){if(r){var a=Math.min(r,n/2),s=Math.min(r,o/2);t.moveTo(e+a,i),t.lineTo(e+n-a,i),t.quadraticCurveTo(e+n,i,e+n,i+s),t.lineTo(e+n,i+o-s),t.quadraticCurveTo(e+n,i+o,e+n-a,i+o),t.lineTo(e+a,i+o),t.quadraticCurveTo(e,i+o,e,i+o-s),t.lineTo(e,i+s),t.quadraticCurveTo(e,i,e+a,i)}else t.rect(e,i,n,o)},drawPoint:function(t,e,i,n,o){var r,a,s,l,c,u;if(!e||"object"!=typeof e||"[object HTMLImageElement]"!==(r=e.toString())&&"[object HTMLCanvasElement]"!==r){if(!(isNaN(i)||i<=0)){switch(e){default:t.beginPath(),t.arc(n,o,i,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),c=(a=3*i/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(n-a/2,o+c/3),t.lineTo(n+a/2,o+c/3),t.lineTo(n,o-2*c/3),t.closePath(),t.fill();break;case"rect":u=1/Math.SQRT2*i,t.beginPath(),t.fillRect(n-u,o-u,2*u,2*u),t.strokeRect(n-u,o-u,2*u,2*u);break;case"rectRounded":var h=i/Math.SQRT2,d=n-h,f=o-h,p=Math.SQRT2*i;t.beginPath(),this.roundedRect(t,d,f,p,p,i/2),t.closePath(),t.fill();break;case"rectRot":u=1/Math.SQRT2*i,t.beginPath(),t.moveTo(n-u,o),t.lineTo(n,o+u),t.lineTo(n+u,o),t.lineTo(n,o-u),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(n,o+i),t.lineTo(n,o-i),t.moveTo(n-i,o),t.lineTo(n+i,o),t.closePath();break;case"crossRot":t.beginPath(),s=Math.cos(Math.PI/4)*i,l=Math.sin(Math.PI/4)*i,t.moveTo(n-s,o-l),t.lineTo(n+s,o+l),t.moveTo(n-s,o+l),t.lineTo(n+s,o-l),t.closePath();break;case"star":t.beginPath(),t.moveTo(n,o+i),t.lineTo(n,o-i),t.moveTo(n-i,o),t.lineTo(n+i,o),s=Math.cos(Math.PI/4)*i,l=Math.sin(Math.PI/4)*i,t.moveTo(n-s,o-l),t.lineTo(n+s,o+l),t.moveTo(n-s,o+l),t.lineTo(n+s,o-l),t.closePath();break;case"line":t.beginPath(),t.moveTo(n-i,o),t.lineTo(n+i,o),t.closePath();break;case"dash":t.beginPath(),t.moveTo(n,o),t.lineTo(n+i,o),t.closePath()}t.stroke()}}else t.drawImage(e,n-e.width/2,o-e.height/2,e.width,e.height)},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,i,n){if(i.steppedLine)return"after"===i.steppedLine&&!n||"after"!==i.steppedLine&&n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y),void t.lineTo(i.x,i.y);i.tension?t.bezierCurveTo(n?e.controlPointPreviousX:e.controlPointNextX,n?e.controlPointPreviousY:e.controlPointNextY,n?i.controlPointNextX:i.controlPointPreviousX,n?i.controlPointNextY:i.controlPointPreviousY,i.x,i.y):t.lineTo(i.x,i.y)}};n.clear=i.clear,n.drawRoundedRectangle=function(t){t.beginPath(),i.roundedRect.apply(i,arguments),t.closePath()}},{42:42}],42:[function(t,e,i){"use strict";var n,u={noop:function(){},uid:(n=0,function(){return n++}),isNullOrUndef:function(t){return null==t},isArray:Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,i){return u.valueOrDefault(u.isArray(t)?t[e]:t,i)},callback:function(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)},each:function(t,e,i,n){var o,r,a;if(u.isArray(t))if(r=t.length,n)for(o=r-1;0<=o;o--)e.call(i,t[o],o);else for(o=0;o
';var o=e.childNodes[0],r=e.childNodes[1];e._reset=function(){o.scrollLeft=1e6,o.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6};var a=function(){e._reset(),t()};return f(o,"scroll",a.bind(o,"expand")),f(r,"scroll",a.bind(r,"shrink")),e}((r=!(n=function(){if(h.resizer)return t(p("resize",i))}),a=[],function(){a=Array.prototype.slice.call(arguments),o=o||this,r||(r=!0,g.requestAnimFrame.call(window,function(){r=!1,n.apply(o,a)}))}));l=function(){if(h.resizer){var t=e.parentNode;t&&t!==d.parentNode&&t.insertBefore(d,t.firstChild),d._reset()}},c=(s=e)[m]||(s[m]={}),u=c.renderProxy=function(t){t.animationName===y&&l()},g.each(_,function(t){f(s,t,u)}),c.reflow=!!s.offsetParent,s.classList.add(b)}function r(t){var e,i,n,o=t[m]||{},r=o.resizer;delete o.resizer,i=(e=t)[m]||{},(n=i.renderProxy)&&(g.each(_,function(t){a(e,t,n)}),delete i.renderProxy),e.classList.remove(b),r&&r.parentNode&&r.parentNode.removeChild(r)}var g=t(45),m="$chartjs",v="chartjs-",b=v+"render-monitor",y=v+"render-animation",_=["animationstart","webkitAnimationStart"],l={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},o=!!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};e.exports={_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,initialize:function(){var t,e,i,n="from{opacity:0.99}to{opacity:1}";e="@-webkit-keyframes "+y+"{"+n+"}@keyframes "+y+"{"+n+"}."+b+"{-webkit-animation:"+y+" 0.001s;animation:"+y+" 0.001s;}",i=(t=this)._style||document.createElement("style"),t._style||(e="/* Chart.js */\n"+e,(t._style=i).setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(i)),i.appendChild(document.createTextNode(e))},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?(function(t,e){var i=t.style,n=t.getAttribute("height"),o=t.getAttribute("width");if(t[m]={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=s(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 a=s(t,"height");void 0!==r&&(t.height=a)}}(t,e),i):null},releaseContext:function(t){var i=t.canvas;if(i[m]){var n=i[m].initial;["height","width"].forEach(function(t){var e=n[t];g.isNullOrUndef(e)?i.removeAttribute(t):i.setAttribute(t,e)}),g.each(n.style||{},function(t,e){i.style[e]=t}),i.width=i.width,delete i[m]}},addEventListener:function(r,t,a){var e=r.canvas;if("resize"!==t){var i=a[m]||(a[m]={});f(e,t,(i.proxies||(i.proxies={}))[r.id+"_"+t]=function(t){var e,i,n,o;a((i=r,n=l[(e=t).type]||e.type,o=g.getRelativePosition(e,i),p(n,i,o.x,o.y,e)))})}else n(e,a,r)},removeEventListener:function(t,e,i){var n=t.canvas;if("resize"!==e){var o=((i[m]||{}).proxies||{})[t.id+"_"+e];o&&a(n,e,o)}else r(n)}},g.addEvent=f,g.removeEvent=a},{45:45}],48:[function(t,e,i){"use strict";var n=t(45),o=t(46),r=t(47),a=r._enabled?r:o;e.exports=n.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},a)},{45:45,46:46,47:47}],49:[function(t,e,i){"use strict";var c=t(25),m=t(40),u=t(45);c._set("global",{plugins:{filler:{propagate:!0}}}),e.exports=function(){function d(t,e,i){var n,o=t._model||{},r=o.fill;if(void 0===r&&(r=!!o.backgroundColor),!1===r||null===r)return!1;if(!0===r)return"origin";if(n=parseFloat(r,10),isFinite(n)&&Math.floor(n)===n)return"-"!==r[0]&&"+"!==r[0]||(n=e+n),!(n===e||n<0||i<=n)&&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 f(t){var e,i=t.el._model||{},n=t.el._scale||{},o=t.fill,r=null;if(isFinite(o))return null;if("start"===o?r=void 0===i.scaleBottom?n.bottom:i.scaleBottom:"end"===o?r=void 0===i.scaleTop?n.top:i.scaleTop:void 0!==i.scaleZero?r=i.scaleZero:n.getBasePosition?r=n.getBasePosition():n.getBasePixel&&(r=n.getBasePixel()),null!=r){if(void 0!==r.x&&void 0!==r.y)return r;if("number"==typeof r&&isFinite(r))return{x:(e=n.isHorizontal())?r:null,y:e?null:r}}return null}function p(t,e,i){var n,o=t[e].fill,r=[e];if(!i)return o;for(;!1!==o&&-1===r.indexOf(o);){if(!isFinite(o))return o;if(!(n=t[o]))return!1;if(n.visible)return o;r.push(o),o=n.fill}return!1}function y(t){return t&&!t.skip}function _(t,e,i,n,o){var r;if(n&&o){for(t.moveTo(e[0].x,e[0].y),r=1;r');for(var i=0;i'),t.data.datasets[i].label&&e.push(t.data.datasets[i].label),e.push("");return e.push(""),e.join("")}}),e.exports=function(n){function T(t,e){return t.usePointStyle?e*Math.SQRT2:t.boxWidth}function o(t,e){var i=new n.Legend({ctx:t.ctx,options:e,chart:t});r.configure(t,i,e),r.addBox(t,i),t.legend=i}var r=n.layoutService,t=A.noop;return n.Legend=a.extend({initialize:function(t){A.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:t,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:t,beforeSetDimensions:t,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:t,beforeBuildLabels:t,buildLabels:function(){var e=this,i=e.options.labels||{},t=A.callback(i.generateLabels,[e.chart],e)||[];i.filter&&(t=t.filter(function(t){return i.filter(t,e.chart.data)})),e.options.reverse&&t.reverse(),e.legendItems=t},afterBuildLabels:t,beforeFit:t,fit:function(){var n=this,t=n.options,o=t.labels,e=t.display,r=n.ctx,i=D.global,a=A.valueOrDefault,s=a(o.fontSize,i.defaultFontSize),l=a(o.fontStyle,i.defaultFontStyle),c=a(o.fontFamily,i.defaultFontFamily),u=A.fontString(s,l,c),h=n.legendHitBoxes=[],d=n.minSize,f=n.isHorizontal();if(d.height=f?(d.width=n.maxWidth,e?10:0):(d.width=e?10:0,n.maxHeight),e)if(r.font=u,f){var p=n.lineWidths=[0],g=n.legendItems.length?s+o.padding:0;r.textAlign="left",r.textBaseline="top",A.each(n.legendItems,function(t,e){var i=T(o,s)+s/2+r.measureText(t.text).width;p[p.length-1]+i+o.padding>=n.width&&(g+=s+o.padding,p[p.length]=n.left),h[e]={left:0,top:0,width:i,height:s},p[p.length-1]+=i+o.padding}),d.height+=g}else{var m=o.padding,v=n.columnWidths=[],b=o.padding,y=0,_=0,x=s+m;A.each(n.legendItems,function(t,e){var i=T(o,s)+s/2+r.measureText(t.text).width;_+x>d.height&&(b+=y+o.padding,v.push(y),_=y=0),y=Math.max(y,i),_+=x,h[e]={left:0,top:0,width:i,height:s}}),b+=y,v.push(y),d.width+=b}n.width=d.width,n.height=d.height},afterFit:t,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var h=this,d=h.options,f=d.labels,p=D.global,g=p.elements.line,m=h.width,v=h.lineWidths;if(d.display){var b,y=h.ctx,_=A.valueOrDefault,t=_(f.fontColor,p.defaultFontColor),x=_(f.fontSize,p.defaultFontSize),e=_(f.fontStyle,p.defaultFontStyle),i=_(f.fontFamily,p.defaultFontFamily),n=A.fontString(x,e,i);y.textAlign="left",y.textBaseline="middle",y.lineWidth=.5,y.strokeStyle=t,y.fillStyle=t,y.font=n;var w=T(f,x),k=h.legendHitBoxes,C=h.isHorizontal();b=C?{x:h.left+(m-v[0])/2,y:h.top+f.padding,line:0}:{x:h.left+f.padding,y:h.top+f.padding,line:0};var S=x+f.padding;A.each(h.legendItems,function(t,e){var i,n,o,r,a,s=y.measureText(t.text).width,l=w+x/2+s,c=b.x,u=b.y;C?m<=c+l&&(u=b.y+=S,b.line++,c=b.x=h.left+(m-v[b.line])/2):u+S>h.bottom&&(c=b.x=c+h.columnWidths[b.line]+f.padding,u=b.y=h.top+f.padding,b.line++),function(t,e,i){if(!(isNaN(w)||w<=0)){y.save(),y.fillStyle=_(i.fillStyle,p.defaultColor),y.lineCap=_(i.lineCap,g.borderCapStyle),y.lineDashOffset=_(i.lineDashOffset,g.borderDashOffset),y.lineJoin=_(i.lineJoin,g.borderJoinStyle),y.lineWidth=_(i.lineWidth,g.borderWidth),y.strokeStyle=_(i.strokeStyle,p.defaultColor);var n=0===_(i.lineWidth,g.borderWidth);if(y.setLineDash&&y.setLineDash(_(i.lineDash,g.borderDash)),d.labels&&d.labels.usePointStyle){var o=x*Math.SQRT2/2,r=o/Math.SQRT2,a=t+r,s=e+r;A.canvas.drawPoint(y,i.pointStyle,o,a,s)}else n||y.strokeRect(t,e,w,x),y.fillRect(t,e,w,x);y.restore()}}(c,u,t),k[e].left=c,k[e].top=u,i=t,n=s,r=w+(o=x/2)+c,a=u+o,y.fillText(i.text,r,a),i.hidden&&(y.beginPath(),y.lineWidth=2,y.moveTo(r,a),y.lineTo(r+n,a),y.stroke()),C?b.x+=l+f.padding:b.y+=S})}},handleEvent:function(t){var e=this,i=e.options,n="mouseup"===t.type?"click":t.type,o=!1;if("mousemove"===n){if(!i.onHover)return}else{if("click"!==n)return;if(!i.onClick)return}var r=t.x,a=t.y;if(r>=e.left&&r<=e.right&&a>=e.top&&a<=e.bottom)for(var s=e.legendHitBoxes,l=0;l=c.left&&r<=c.left+c.width&&a>=c.top&&a<=c.top+c.height){if("click"===n){i.onClick.call(e,t.native,e.legendItems[l]),o=!0;break}if("mousemove"===n){i.onHover.call(e,t.native,e.legendItems[l]),o=!0;break}}}return o}}),{id:"legend",beforeInit:function(t){var e=t.options.legend;e&&o(t,e)},beforeUpdate:function(t){var e=t.options.legend,i=t.legend;e?(A.mergeIf(e,D.global.legend),i?(r.configure(t,i,e),i.options=e):o(t,e)):i&&(r.removeBox(t,i),delete t.legend)},afterEvent:function(t,e){var i=t.legend;i&&i.handleEvent(e)}}}},{25:25,26:26,45:45}],51:[function(t,e,i){"use strict";var x=t(25),a=t(26),w=t(45);x._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}}),e.exports=function(n){function o(t,e){var i=new n.Title({ctx:t.ctx,options:e,chart:t});r.configure(t,i,e),r.addBox(t,i),t.titleBlock=i}var r=n.layoutService,t=w.noop;return n.Title=a.extend({initialize:function(t){w.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:t,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:t,beforeSetDimensions:t,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:t,beforeBuildLabels:t,buildLabels:t,afterBuildLabels:t,beforeFit:t,fit:function(){var t=w.valueOrDefault,e=this.options,i=e.display,n=t(e.fontSize,x.global.defaultFontSize),o=this.minSize,r=w.isArray(e.text)?e.text.length:1,a=w.options.toLineHeight(e.lineHeight,n),s=i?r*a+2*e.padding:0;this.isHorizontal()?(o.width=this.maxWidth,o.height=s):(o.width=s,o.height=this.maxHeight),this.width=o.width,this.height=o.height},afterFit:t,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this.ctx,e=w.valueOrDefault,i=this.options,n=x.global;if(i.display){var o,r,a,s=e(i.fontSize,n.defaultFontSize),l=e(i.fontStyle,n.defaultFontStyle),c=e(i.fontFamily,n.defaultFontFamily),u=w.fontString(s,l,c),h=w.options.toLineHeight(i.lineHeight,s),d=h/2+i.padding,f=0,p=this.top,g=this.left,m=this.bottom,v=this.right;t.fillStyle=e(i.fontColor,n.defaultFontColor),t.font=u,this.isHorizontal()?(r=g+(v-g)/2,a=p+d,o=v-g):(r="left"===i.position?g+d:v-d,a=p+(m-p)/2,o=m-p,f=Math.PI*("left"===i.position?-.5:.5)),t.save(),t.translate(r,a),t.rotate(f),t.textAlign="center",t.textBaseline="middle";var b=i.text;if(w.isArray(b))for(var y=0,_=0;_s.max&&(s.max=i))})});s.min=isFinite(s.min)&&!isNaN(s.min)?s.min:0,s.max=isFinite(s.max)&&!isNaN(s.max)?s.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var t,e=this.options.ticks;if(this.isHorizontal())t=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(this.width/50));else{var i=h.valueOrDefault(e.fontSize,n.global.defaultFontSize);t=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(this.height/(2*i)))}return t},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e,i=this.start,n=+this.getRightValue(t),o=this.end-i;return e=this.isHorizontal()?this.left+this.width/o*(n-i):this.bottom-this.height/o*(n-i),Math.round(e)},getValueForPixel:function(t){var e=this.isHorizontal(),i=e?this.width:this.height,n=(e?t-this.left:this.bottom-t)/i;return this.start+(this.end-this.start)*n},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",i,e)}},{25:25,34:34,45:45}],54:[function(t,e,i){"use strict";var a=t(45),r=t(34);e.exports=function(e){var t=a.noop;e.LinearScaleBase=e.Scale.extend({getRightValue:function(t){return"string"==typeof t?+t:e.Scale.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var i=a.sign(t.min),n=a.sign(t.max);i<0&&n<0?t.max=0:0=t.max&&(o?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:t,handleDirectionalChanges:t,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,stepSize:a.valueOrDefault(e.fixedStepSize,e.stepSize)},o=t.ticks=r.generators.linear(n,t);t.handleDirectionalChanges(),t.max=a.max(o),t.min=a.min(o),e.reverse?(o.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){this.ticksAsNumbers=this.ticks.slice(),this.zeroLineIndex=this.ticks.indexOf(0),e.Scale.prototype.convertTicksToLabels.call(this)}})}},{34:34,45:45}],55:[function(t,e,i){"use strict";var h=t(45),o=t(34);e.exports=function(t){var e={position:"left",ticks:{callback:o.formatters.logarithmic}},i=t.Scale.extend({determineDataLimits:function(){function a(t){return n?t.xAxisID===s.id:t.yAxisID===s.id}var s=this,l=s.options,t=l.ticks,c=s.chart,e=c.data.datasets,i=h.valueOrDefault,n=s.isHorizontal();s.min=null,s.max=null,s.minNotZero=null;var o=l.stacked;if(void 0===o&&h.each(e,function(t,e){if(!o){var i=c.getDatasetMeta(e);c.isDatasetVisible(e)&&a(i)&&void 0!==i.stack&&(o=!0)}}),l.stacked||o){var u={};h.each(e,function(t,e){var o=c.getDatasetMeta(e),r=[o.type,void 0===l.stacked&&void 0===o.stack?e:"",o.stack].join(".");c.isDatasetVisible(e)&&a(o)&&(void 0===u[r]&&(u[r]=[]),h.each(t.data,function(t,e){var i=u[r],n=+s.getRightValue(t);isNaN(n)||o.data[e].hidden||(i[e]=i[e]||0,l.relativePoints?i[e]=100:i[e]+=n)}))}),h.each(u,function(t){var e=h.min(t),i=h.max(t);s.min=null===s.min?e:Math.min(s.min,e),s.max=null===s.max?i:Math.max(s.max,i)})}else h.each(e,function(t,e){var n=c.getDatasetMeta(e);c.isDatasetVisible(e)&&a(n)&&h.each(t.data,function(t,e){var i=+s.getRightValue(t);isNaN(i)||n.data[e].hidden||(null===s.min?s.min=i:is.max&&(s.max=i),0!==i&&(null===s.minNotZero||ia.r&&(a.r=p.end,s.r=d),g.starta.b&&(a.b=g.end,s.b=d)}t.setReductions(r,a,s)}(this):(t=this,e=Math.min(t.height/2,t.width/2),t.drawingArea=Math.round(e),t.setCenterPoint(0,0,0,0))},setReductions:function(t,e,i){var n=e.l/Math.sin(i.l),o=Math.max(e.r-this.width,0)/Math.sin(i.r),r=-e.t/Math.cos(i.t),a=-Math.max(e.b-this.height,0)/Math.cos(i.b);n=s(n),o=s(o),r=s(r),a=s(a),this.drawingArea=Math.min(Math.round(t-(n+o)/2),Math.round(t-(r+a)/2)),this.setCenterPoint(n,o,r,a)},setCenterPoint:function(t,e,i,n){var o=this,r=o.width-e-o.drawingArea,a=t+o.drawingArea,s=i+o.drawingArea,l=o.height-n-o.drawingArea;o.xCenter=Math.round((a+r)/2+o.left),o.yCenter=Math.round((s+l)/2+o.top)},getIndexAngle:function(t){return t*(2*Math.PI/b(this))+(this.chart.options&&this.chart.options.startAngle?this.chart.options.startAngle:0)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){if(null===t)return 0;var e=this.drawingArea/(this.max-this.min);return this.options.ticks.reverse?(this.max-t)*e:(t-this.min)*e},getPointPosition:function(t,e){var i=this.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(i)*e)+this.xCenter,y:Math.round(Math.sin(i)*e)+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this.min,e=this.max;return this.getPointPositionForValue(0,this.beginAtZero?0:t<0&&e<0?e:0>1)-1]||null,r=t[n],!o)return{lo:null,hi:r};if(r[e]i))return{lo:o,hi:r};s=n-1}}return{lo:r,hi:null}}(t,e,i),r=o.lo?o.hi?o.lo:t[t.length-2]:t[0],a=o.lo?o.hi?o.hi:t[t.length-1]:t[1],s=a[e]-r[e],l=s?(i-r[e])/s:0,c=(a[n]-r[n])*l;return r[n]+c}function a(t,e){var i=e.parser,n=e.parser||e.format;return"function"==typeof i?i(t):"string"==typeof t&&"string"==typeof n?k(t,n):(t instanceof k||(t=k(t)),t.isValid()?t:"function"==typeof n?n(t):t)}function _(t,e){if(m.isNullOrUndef(t))return null;var i=e.options.time,n=a(e.getRightValue(t),i);return n.isValid()?(i.round&&n.startOf(i.round),n.valueOf()):null}function x(t){for(var e=S.indexOf(t)+1,i=S.length;e=f&&i<=p&&b.push(i);return d.min=f,d.max=p,d._unit=m.unit||function(t,e,i,n){var o,r,a=k.duration(k(n).diff(k(i)));for(o=S.length-1;o>=S.indexOf(e);o--)if(r=S[o],C[r].common&&a.as(r)>=t.length)return r;return S[e?S.indexOf(e):0]}(b,m.minUnit,d.min,d.max),d._majorUnit=x(d._unit),d._table=function(t,e,i,n){if("linear"===n||!t.length)return[{time:e,pos:0},{time:i,pos:1}];var o,r,a,s,l,c=[],u=[e];for(o=0,r=t.length;oe&&s>>0;if(0===n)return-1;var o=+e||0;if(1/0===Math.abs(o)&&(o=0),n<=o)return-1;for(o=Math.max(0<=o?o:n-Math.abs(o),0);o!",o[0]),(o={type:o.data("type"),min:o.data("min"),max:o.data("max"),from:o.data("from"),to:o.data("to"),step:o.data("step"),min_interval:o.data("minInterval"),max_interval:o.data("maxInterval"),drag_interval:o.data("dragInterval"),values:o.data("values"),from_fixed:o.data("fromFixed"),from_min:o.data("fromMin"),from_max:o.data("fromMax"),from_shadow:o.data("fromShadow"),to_fixed:o.data("toFixed"),to_min:o.data("toMin"),to_max:o.data("toMax"),to_shadow:o.data("toShadow"),prettify_enabled:o.data("prettifyEnabled"),prettify_separator:o.data("prettifySeparator"),force_edges:o.data("forceEdges"),keyboard:o.data("keyboard"),grid:o.data("grid"),grid_margin:o.data("gridMargin"),grid_num:o.data("gridNum"),grid_snap:o.data("gridSnap"),hide_min_max:o.data("hideMinMax"),hide_from_to:o.data("hideFromTo"),prefix:o.data("prefix"),postfix:o.data("postfix"),max_postfix:o.data("maxPostfix"),decorate_both:o.data("decorateBoth"),values_separator:o.data("valuesSeparator"),input_values_separator:o.data("inputValuesSeparator"),disable:o.data("disable"),block:o.data("block"),extra_classes:o.data("extraClasses")}).values=o.values&&o.values.split(","),o)o.hasOwnProperty(n)&&(o[n]!==l&&""!==o[n]||delete o[n]);t!==l&&""!==t&&((t=t.split(o.input_values_separator||e.input_values_separator||";"))[0]&&t[0]==+t[0]&&(t[0]=+t[0]),t[1]&&t[1]==+t[1]&&(t[1]=+t[1]),e&&e.values&&e.values.length?(i.from=t[0]&&e.values.indexOf(t[0]),i.to=t[1]&&e.values.indexOf(t[1])):(i.from=t[0]&&+t[0],i.to=t[1]&&+t[1])),r.extend(i,e),r.extend(i,o),this.options=i,this.update_check={},this.validate(),this.result={input:this.$cache.input,slider:null,min:this.options.min,max:this.options.max,from:this.options.from,from_percent:0,from_value:null,to:this.options.to,to_percent:0,to_value:null},this.init()};c.prototype={init:function(t){this.no_diapason=!1,this.coords.p_step=this.convertToPercent(this.options.step,!0),this.target="base",this.toggleInput(),this.append(),this.setMinMax(),t?(this.force_redraw=!0,this.calc(!0),this.callOnUpdate()):(this.force_redraw=!0,this.calc(!0),this.callOnStart()),this.updateScene()},append:function(){this.$cache.input.before(''),this.$cache.input.prop("readonly",!0),this.$cache.cont=this.$cache.input.prev(),this.result.slider=this.$cache.cont,this.$cache.cont.html('01000'),this.$cache.rs=this.$cache.cont.find(".irs"),this.$cache.min=this.$cache.cont.find(".irs-min"),this.$cache.max=this.$cache.cont.find(".irs-max"),this.$cache.from=this.$cache.cont.find(".irs-from"),this.$cache.to=this.$cache.cont.find(".irs-to"),this.$cache.single=this.$cache.cont.find(".irs-single"),this.$cache.bar=this.$cache.cont.find(".irs-bar"),this.$cache.line=this.$cache.cont.find(".irs-line"),this.$cache.grid=this.$cache.cont.find(".irs-grid"),"single"===this.options.type?(this.$cache.cont.append(''),this.$cache.edge=this.$cache.cont.find(".irs-bar-edge"),this.$cache.s_single=this.$cache.cont.find(".single"),this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.shad_single=this.$cache.cont.find(".shadow-single")):(this.$cache.cont.append(''),this.$cache.s_from=this.$cache.cont.find(".from"),this.$cache.s_to=this.$cache.cont.find(".to"),this.$cache.shad_from=this.$cache.cont.find(".shadow-from"),this.$cache.shad_to=this.$cache.cont.find(".shadow-to"),this.setTopHandler()),this.options.hide_from_to&&(this.$cache.from[0].style.display="none",this.$cache.to[0].style.display="none",this.$cache.single[0].style.display="none"),this.appendGrid(),this.options.disable?(this.appendDisableMask(),this.$cache.input[0].disabled=!0):(this.$cache.input[0].disabled=!1,this.removeDisableMask(),this.bindEvents()),this.options.disable||(this.options.block?this.appendDisableMask():this.removeDisableMask()),this.options.drag_interval&&(this.$cache.bar[0].style.cursor="move")},setTopHandler:function(){var t=this.options.max,e=this.options.to;this.options.from>this.options.min&&e===t?this.$cache.s_from.addClass("type_last"):e'),this.$cache.cont.addClass("irs-disabled")},removeDisableMask:function(){this.$cache.cont.remove(".irs-disable-mask"),this.$cache.cont.removeClass("irs-disabled")},remove:function(){this.$cache.cont.remove(),this.$cache.cont=null,this.$cache.line.off("keydown.irs_"+this.plugin_count),this.$cache.body.off("touchmove.irs_"+this.plugin_count),this.$cache.body.off("mousemove.irs_"+this.plugin_count),this.$cache.win.off("touchend.irs_"+this.plugin_count),this.$cache.win.off("mouseup.irs_"+this.plugin_count),o&&(this.$cache.body.off("mouseup.irs_"+this.plugin_count),this.$cache.body.off("mouseleave.irs_"+this.plugin_count)),this.$cache.grid_labels=[],this.coords.big=[],this.coords.big_w=[],this.coords.big_p=[],this.coords.big_x=[],cancelAnimationFrame(this.raf_id)},bindEvents:function(){this.no_diapason||(this.$cache.body.on("touchmove.irs_"+this.plugin_count,this.pointerMove.bind(this)),this.$cache.body.on("mousemove.irs_"+this.plugin_count,this.pointerMove.bind(this)),this.$cache.win.on("touchend.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.win.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.line.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.line.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.line.on("focus.irs_"+this.plugin_count,this.pointerFocus.bind(this)),this.options.drag_interval&&"double"===this.options.type?(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"both")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"both"))):(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))),"single"===this.options.type?(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.shad_single.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.edge.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_single.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))):(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))),this.options.keyboard&&this.$cache.line.on("keydown.irs_"+this.plugin_count,this.key.bind(this,"keyboard")),o&&(this.$cache.body.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.body.on("mouseleave.irs_"+this.plugin_count,this.pointerUp.bind(this))))},pointerFocus:function(t){if(!this.target){var e="single"===this.options.type?this.$cache.single:this.$cache.from;t=e.offset().left,t+=e.width()/2-1,this.pointerClick("single",{preventDefault:function(){},pageX:t})}},pointerMove:function(t){this.dragging&&(this.coords.x_pointer=(t.pageX||t.originalEvent.touches&&t.originalEvent.touches[0].pageX)-this.coords.x_gap,this.calc())},pointerUp:function(t){this.current_plugin===this.plugin_count&&this.is_active&&(this.is_active=!1,this.$cache.cont.find(".state_hover").removeClass("state_hover"),this.force_redraw=!0,o&&r("*").prop("unselectable",!1),this.updateScene(),this.restoreOriginalMinInterval(),(r.contains(this.$cache.cont[0],t.target)||this.dragging)&&this.callOnFinish(),this.dragging=!1)},pointerDown:function(t,e){e.preventDefault();var i=e.pageX||e.originalEvent.touches&&e.originalEvent.touches[0].pageX;2!==e.button&&("both"===t&&this.setTempMinInterval(),t||(t=this.target||"from"),this.current_plugin=this.plugin_count,this.target=t,this.dragging=this.is_active=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=i-this.coords.x_gap,this.calcPointerPercent(),this.changeLevel(t),o&&r("*").prop("unselectable",!0),this.$cache.line.trigger("focus"),this.updateScene())},pointerClick:function(t,e){e.preventDefault();var i=e.pageX||e.originalEvent.touches&&e.originalEvent.touches[0].pageX;2!==e.button&&(this.current_plugin=this.plugin_count,this.target=t,this.is_click=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=+(i-this.coords.x_gap).toFixed(),this.force_redraw=!0,this.calc(),this.$cache.line.trigger("focus"))},key:function(t,e){if(!(this.current_plugin!==this.plugin_count||e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)){switch(e.which){case 83:case 65:case 40:case 37:e.preventDefault(),this.moveByKey(!1);break;case 87:case 68:case 38:case 39:e.preventDefault(),this.moveByKey(!0)}return!0}},moveByKey:function(t){var e=this.coords.p_pointer,i=(this.options.max-this.options.min)/100;i=this.options.step/i;this.coords.x_pointer=this.toFixed(this.coords.w_rs/100*(t?e+i:e-i)),this.is_key=!0,this.calc()},setMinMax:function(){if(this.options)if(this.options.hide_min_max)this.$cache.min[0].style.display="none",this.$cache.max[0].style.display="none";else{if(this.options.values.length)this.$cache.min.html(this.decorate(this.options.p_values[this.options.min])),this.$cache.max.html(this.decorate(this.options.p_values[this.options.max]));else{var t=this._prettify(this.options.min),e=this._prettify(this.options.max);this.result.min_pretty=t,this.result.max_pretty=e,this.$cache.min.html(this.decorate(t,this.options.min)),this.$cache.max.html(this.decorate(e,this.options.max))}this.labels.w_min=this.$cache.min.outerWidth(!1),this.labels.w_max=this.$cache.max.outerWidth(!1)}},setTempMinInterval:function(){var t=this.result.to-this.result.from;null===this.old_min_interval&&(this.old_min_interval=this.options.min_interval),this.options.min_interval=t},restoreOriginalMinInterval:function(){null!==this.old_min_interval&&(this.options.min_interval=this.old_min_interval,this.old_min_interval=null)},calc:function(t){if(this.options&&(this.calc_count++,(10===this.calc_count||t)&&(this.calc_count=0,this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.calcHandlePercent()),this.coords.w_rs)){switch(this.calcPointerPercent(),t=this.getHandleX(),"both"===this.target&&(this.coords.p_gap=0,t=this.getHandleX()),"click"===this.target&&(this.coords.p_gap=this.coords.p_handle/2,t=this.getHandleX(),this.target=this.options.drag_interval?"both_one":this.chooseHandle(t)),this.target){case"base":var e=(this.options.max-this.options.min)/100;t=(this.result.from-this.options.min)/e,e=(this.result.to-this.options.min)/e,this.coords.p_single_real=this.toFixed(t),this.coords.p_from_real=this.toFixed(t),this.coords.p_to_real=this.toFixed(e),this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real),this.target=null;break;case"single":if(this.options.from_fixed)break;this.coords.p_single_real=this.convertToRealPercent(t),this.coords.p_single_real=this.calcWithStep(this.coords.p_single_real),this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max),this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real);break;case"from":if(this.options.from_fixed)break;this.coords.p_from_real=this.convertToRealPercent(t),this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real),this.coords.p_from_real>this.coords.p_to_real&&(this.coords.p_from_real=this.coords.p_to_real),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_real=this.checkMaxInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);break;case"to":if(this.options.to_fixed)break;this.coords.p_to_real=this.convertToRealPercent(t),this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real),this.coords.p_to_realthis.coords.w_rs&&(this.coords.x_pointer=this.coords.w_rs),this.coords.p_pointer=this.toFixed(this.coords.x_pointer/this.coords.w_rs*100)):this.coords.p_pointer=0},convertToRealPercent:function(t){return t/(100-this.coords.p_handle)*100},convertToFakePercent:function(t){return t/100*(100-this.coords.p_handle)},getHandleX:function(){var t=100-this.coords.p_handle,e=this.toFixed(this.coords.p_pointer-this.coords.p_gap);return e<0?e=0:t=this.coords.p_from_real+(this.coords.p_to_real-this.coords.p_from_real)/2?this.options.to_fixed?"from":"to":this.options.from_fixed?"to":"from"},calcMinMax:function(){this.coords.w_rs&&(this.labels.p_min=this.labels.w_min/this.coords.w_rs*100,this.labels.p_max=this.labels.w_max/this.coords.w_rs*100)},calcLabels:function(){this.coords.w_rs&&!this.options.hide_from_to&&("single"===this.options.type?(this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=this.coords.p_single_fake+this.coords.p_handle/2-this.labels.p_single_fake/2):(this.labels.w_from=this.$cache.from.outerWidth(!1),this.labels.p_from_fake=this.labels.w_from/this.coords.w_rs*100,this.labels.p_from_left=this.coords.p_from_fake+this.coords.p_handle/2-this.labels.p_from_fake/2,this.labels.p_from_left=this.toFixed(this.labels.p_from_left),this.labels.p_from_left=this.checkEdges(this.labels.p_from_left,this.labels.p_from_fake),this.labels.w_to=this.$cache.to.outerWidth(!1),this.labels.p_to_fake=this.labels.w_to/this.coords.w_rs*100,this.labels.p_to_left=this.coords.p_to_fake+this.coords.p_handle/2-this.labels.p_to_fake/2,this.labels.p_to_left=this.toFixed(this.labels.p_to_left),this.labels.p_to_left=this.checkEdges(this.labels.p_to_left,this.labels.p_to_fake),this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=(this.labels.p_from_left+this.labels.p_to_left+this.labels.p_to_fake)/2-this.labels.p_single_fake/2,this.labels.p_single_left=this.toFixed(this.labels.p_single_left)),this.labels.p_single_left=this.checkEdges(this.labels.p_single_left,this.labels.p_single_fake))},updateScene:function(){this.raf_id&&(cancelAnimationFrame(this.raf_id),this.raf_id=null),clearTimeout(this.update_tm),this.update_tm=null,this.options&&(this.drawHandles(),this.is_active?this.raf_id=requestAnimationFrame(this.updateScene.bind(this)):this.update_tm=setTimeout(this.updateScene.bind(this),300))},drawHandles:function(){this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.coords.w_rs&&(this.coords.w_rs!==this.coords.w_rs_old&&(this.target="base",this.is_resize=!0),(this.coords.w_rs!==this.coords.w_rs_old||this.force_redraw)&&(this.setMinMax(),this.calc(!0),this.drawLabels(),this.options.grid&&(this.calcGridMargin(),this.calcGridLabels()),this.force_redraw=!0,this.coords.w_rs_old=this.coords.w_rs,this.drawShadow()),this.coords.w_rs&&(this.dragging||this.force_redraw||this.is_key)&&((this.old_from!==this.result.from||this.old_to!==this.result.to||this.force_redraw||this.is_key)&&(this.drawLabels(),this.$cache.bar[0].style.left=this.coords.p_bar_x+"%",this.$cache.bar[0].style.width=this.coords.p_bar_w+"%","single"===this.options.type?this.$cache.s_single[0].style.left=this.coords.p_single_fake+"%":(this.$cache.s_from[0].style.left=this.coords.p_from_fake+"%",this.$cache.s_to[0].style.left=this.coords.p_to_fake+"%",(this.old_from!==this.result.from||this.force_redraw)&&(this.$cache.from[0].style.left=this.labels.p_from_left+"%"),(this.old_to!==this.result.to||this.force_redraw)&&(this.$cache.to[0].style.left=this.labels.p_to_left+"%")),this.$cache.single[0].style.left=this.labels.p_single_left+"%",this.writeToInput(),this.old_from===this.result.from&&this.old_to===this.result.to||this.is_start||(this.$cache.input.trigger("change"),this.$cache.input.trigger("input")),this.old_from=this.result.from,this.old_to=this.result.to,this.is_resize||this.is_update||this.is_start||this.is_finish||this.callOnChange(),(this.is_key||this.is_click)&&(this.is_click=this.is_key=!1,this.callOnFinish()),this.is_finish=this.is_resize=this.is_update=!1),this.force_redraw=this.is_click=this.is_key=this.is_start=!1))},drawLabels:function(){if(this.options){var t=this.options.values.length,e=this.options.p_values;if(!this.options.hide_from_to)if("single"===this.options.type){if(t)t=this.decorate(e[this.result.from]);else{var i=this._prettify(this.result.from);t=this.decorate(i,this.result.from)}this.$cache.single.html(t),this.calcLabels(),this.$cache.min[0].style.visibility=this.labels.p_single_left100-this.labels.p_max-1?"hidden":"visible"}else{e=t?(this.options.decorate_both?(t=this.decorate(e[this.result.from]),t+=this.options.values_separator,t+=this.decorate(e[this.result.to])):t=this.decorate(e[this.result.from]+this.options.values_separator+e[this.result.to]),i=this.decorate(e[this.result.from]),this.decorate(e[this.result.to])):(i=this._prettify(this.result.from),e=this._prettify(this.result.to),this.options.decorate_both?(t=this.decorate(i,this.result.from),t+=this.options.values_separator,t+=this.decorate(e,this.result.to)):t=this.decorate(i+this.options.values_separator+e,this.result.to),i=this.decorate(i,this.result.from),this.decorate(e,this.result.to)),this.$cache.single.html(t),this.$cache.from.html(i),this.$cache.to.html(e),this.calcLabels(),t=Math.min(this.labels.p_single_left,this.labels.p_from_left),i=this.labels.p_single_left+this.labels.p_single_fake;e=this.labels.p_to_left+this.labels.p_to_fake;var n=Math.max(i,e);this.labels.p_from_left+this.labels.p_from_fake>=this.labels.p_to_left?(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",n=this.result.from===this.result.to?("from"===this.target?this.$cache.from[0].style.visibility="visible":"to"===this.target?this.$cache.to[0].style.visibility="visible":this.target||(this.$cache.from[0].style.visibility="visible"),this.$cache.single[0].style.visibility="hidden",e):(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",Math.max(i,e))):(this.$cache.from[0].style.visibility="visible",this.$cache.to[0].style.visibility="visible",this.$cache.single[0].style.visibility="hidden"),this.$cache.min[0].style.visibility=t100-this.labels.p_max-1?"hidden":"visible"}}},drawShadow:function(){var t=this.options,e=this.$cache,i="number"==typeof t.from_min&&!isNaN(t.from_min),n="number"==typeof t.from_max&&!isNaN(t.from_max),o="number"==typeof t.to_min&&!isNaN(t.to_min),r="number"==typeof t.to_max&&!isNaN(t.to_max);"single"===t.type?t.from_shadow&&(i||n)?(i=this.convertToPercent(i?t.from_min:t.min),n=this.convertToPercent(n?t.from_max:t.max)-i,i=this.toFixed(i-this.coords.p_handle/100*i),n=this.toFixed(n-this.coords.p_handle/100*n),i+=this.coords.p_handle/2,e.shad_single[0].style.display="block",e.shad_single[0].style.left=i+"%",e.shad_single[0].style.width=n+"%"):e.shad_single[0].style.display="none":(t.from_shadow&&(i||n)?(i=this.convertToPercent(i?t.from_min:t.min),n=this.convertToPercent(n?t.from_max:t.max)-i,i=this.toFixed(i-this.coords.p_handle/100*i),n=this.toFixed(n-this.coords.p_handle/100*n),i+=this.coords.p_handle/2,e.shad_from[0].style.display="block",e.shad_from[0].style.left=i+"%",e.shad_from[0].style.width=n+"%"):e.shad_from[0].style.display="none",t.to_shadow&&(o||r)?(o=this.convertToPercent(o?t.to_min:t.min),t=this.convertToPercent(r?t.to_max:t.max)-o,o=this.toFixed(o-this.coords.p_handle/100*o),t=this.toFixed(t-this.coords.p_handle/100*t),o+=this.coords.p_handle/2,e.shad_to[0].style.display="block",e.shad_to[0].style.left=o+"%",e.shad_to[0].style.width=t+"%"):e.shad_to[0].style.display="none")},writeToInput:function(){"single"===this.options.type?(this.options.values.length?this.$cache.input.prop("value",this.result.from_value):this.$cache.input.prop("value",this.result.from),this.$cache.input.data("from",this.result.from)):(this.options.values.length?this.$cache.input.prop("value",this.result.from_value+this.options.input_values_separator+this.result.to_value):this.$cache.input.prop("value",this.result.from+this.options.input_values_separator+this.result.to),this.$cache.input.data("from",this.result.from),this.$cache.input.data("to",this.result.to))},callOnStart:function(){this.writeToInput(),this.options.onStart&&"function"==typeof this.options.onStart&&(this.options.scope?this.options.onStart.call(this.options.scope,this.result):this.options.onStart(this.result))},callOnChange:function(){this.writeToInput(),this.options.onChange&&"function"==typeof this.options.onChange&&(this.options.scope?this.options.onChange.call(this.options.scope,this.result):this.options.onChange(this.result))},callOnFinish:function(){this.writeToInput(),this.options.onFinish&&"function"==typeof this.options.onFinish&&(this.options.scope?this.options.onFinish.call(this.options.scope,this.result):this.options.onFinish(this.result))},callOnUpdate:function(){this.writeToInput(),this.options.onUpdate&&"function"==typeof this.options.onUpdate&&(this.options.scope?this.options.onUpdate.call(this.options.scope,this.result):this.options.onUpdate(this.result))},toggleInput:function(){this.$cache.input.toggleClass("irs-hidden-input"),this.has_tab_index?this.$cache.input.prop("tabindex",-1):this.$cache.input.removeProp("tabindex"),this.has_tab_index=!this.has_tab_index},convertToPercent:function(t,e){var i=this.options.max-this.options.min;return i?this.toFixed((e?t:t-this.options.min)/(i/100)):(this.no_diapason=!0,0)},convertToValue:function(t){var e,i,n=this.options.min,o=this.options.max,r=n.toString().split(".")[1],a=o.toString().split(".")[1],s=0,l=0;return 0===t?this.options.min:100===t?this.options.max:(r&&(s=e=r.length),a&&(s=i=a.length),e&&i&&(s=i<=e?e:i),n<0&&(n=+(n+(l=Math.abs(n))).toFixed(s),o=+(o+l).toFixed(s)),t=(o-n)/100*t+n,t=(n=this.options.step.toString().split(".")[1])?+t.toFixed(n.length):(t/=this.options.step,+(t*=this.options.step).toFixed(0)),l&&(t-=l),(l=n?+t.toFixed(n.length):this.toFixed(t))this.options.max&&(l=this.options.max),l)},calcWithStep:function(t){var e=Math.round(t/this.coords.p_step)*this.coords.p_step;return 100n.max_interval&&(t=e-n.max_interval):t-e>n.max_interval&&(t=e+n.max_interval),this.convertToPercent(t)):t},checkDiapason:function(t,e,i){t=this.convertToValue(t);var n=this.options;return"number"!=typeof e&&(e=n.min),"number"!=typeof i&&(i=n.max),te.max&&(e.from=e.max)):(e.frome.max&&(e.from=e.max),e.toe.max&&(e.to=e.max),this.update_check.from&&(this.update_check.from!==e.from&&e.from>e.to&&(e.from=e.to),this.update_check.to!==e.to&&e.toe.to&&(e.from=e.to),e.toe.from_max&&(e.from=e.from_max),"number"==typeof e.to_min&&e.toe.to_max&&(e.to=e.to_max),i&&(i.min!==e.min&&(i.min=e.min),i.max!==e.max&&(i.max=e.max),(i.fromi.max)&&(i.from=e.from),(i.toi.max)&&(i.to=e.to)),("number"!=typeof e.min_interval||isNaN(e.min_interval)||!e.min_interval||e.min_interval<0)&&(e.min_interval=0),("number"!=typeof e.max_interval||isNaN(e.max_interval)||!e.max_interval||e.max_interval<0)&&(e.max_interval=0),e.min_interval&&e.min_interval>e.max-e.min&&(e.min_interval=e.max-e.min),e.max_interval&&e.max_interval>e.max-e.min&&(e.max_interval=e.max-e.min)},decorate:function(t,e){var i="",n=this.options;return n.prefix&&(i+=n.prefix),i+=t,n.max_postfix&&(n.values.length&&t===n.p_values[n.max]?(i+=n.max_postfix,n.postfix&&(i+=" ")):e===n.max&&(i+=n.max_postfix,n.postfix&&(i+=" "))),n.postfix&&(i+=n.postfix),i},updateFrom:function(){this.result.from=this.options.from,this.result.from_percent=this.convertToPercent(this.result.from),this.result.from_pretty=this._prettify(this.result.from),this.options.values&&(this.result.from_value=this.options.values[this.result.from])},updateTo:function(){this.result.to=this.options.to,this.result.to_percent=this.convertToPercent(this.result.to),this.result.to_pretty=this._prettify(this.result.to),this.options.values&&(this.result.to_value=this.options.values[this.result.to])},updateResult:function(){this.result.min=this.options.min,this.result.max=this.options.max,this.updateFrom(),this.updateTo()},appendGrid:function(){if(this.options.grid){var t,e=this.options,i=e.max-e.min,n=e.grid_num,o=4,r="";if(this.calcGridMargin(),e.grid_snap)if(50'}r+='',t=this.convertToValue(l),r+=''+(t=e.values.length?e.p_values[t]:this._prettify(t))+""}this.coords.big_num=Math.ceil(n+1),this.$cache.cont.addClass("irs-with-grid"),this.$cache.grid.html(r),this.cacheGridLabels()}},cacheGridLabels:function(){var t,e=this.coords.big_num;for(t=0;t100+this.coords.grid_gap&&(i[n-1]=100+this.coords.grid_gap,e[n-1]=this.toFixed(i[n-1]-this.coords.big_p[n-1]),this.coords.big_x[n-1]=this.toFixed(this.coords.big_p[n-1]-this.coords.grid_gap))),this.calcGridCollision(2,e,i),this.calcGridCollision(4,e,i),t=0;t