diff --git a/CHANGELOG.md b/CHANGELOG.md index aefe2ffd..0e595d0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,13 @@ +### 3.3.1: Maintenance Release + + - Revert to uglify (for now) to fix color-picker failure. Issue #791 + ### 3.3.0: Milestone Release - Expose manifest.json display property in settingsjs ui section so can be set fullscreen if desired. - Change gulp build tool to use gulp-terser for later nodejs version support - - Fix datepicker to use chaneg not blur to stop Safari sending double messages + - Fix datepicker to use change not blur to stop Safari sending double messages - Update justgage library to include and expose differential mode (either side of a centre point). - Fix initial drawing of gauge not registering value correctly. Issue #788 diff --git a/dist/dashboard.appcache b/dist/dashboard.appcache index 2b56e8d5..4473ce5a 100644 --- a/dist/dashboard.appcache +++ b/dist/dashboard.appcache @@ -1,5 +1,5 @@ CACHE MANIFEST -# Time: Sat Dec 31 2022 12:52:21 GMT+0000 (Greenwich Mean Time) +# Time: Tue Jan 03 2023 15:45:18 GMT+0000 (Greenwich Mean Time) CACHE: i18n.js @@ -26,4 +26,4 @@ loading.html NETWORK: * -# hash: 07bf360fe1eb14f187742aa95f70a4f1e8886bc6be2a67d69996855d92cc8800 +# hash: 4e1747f9d470381b38d72b730cdfbe144f536fa6303dece638a15db835a4612e diff --git a/dist/js/app.min.js b/dist/js/app.min.js index d2d35d06..b8a38cbc 100644 --- a/dist/js/app.min.js +++ b/dist/js/app.min.js @@ -15,8 +15,9 @@ /* See the License for the specific language governing permissions and */ /* limitations under the License. */ /* */ -/*! jQuery v3.6.3 | (c) OpenJS Foundation and other contributors | jquery.org/license */ -!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,y=n.hasOwnProperty,a=y.toString,l=a.call(Object),v={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},S=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||S).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.3",E=function(e,t){return new E.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,S)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&v(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!y||!y.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ve(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=E)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{if(d.cssSupportsSelector&&!CSS.supports("selector(:is("+c+"))"))throw new Error;return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===E&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[E]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ye(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ve(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,S=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.cssSupportsSelector=ce(function(){return CSS.supports("selector(*)")&&C.querySelectorAll(":is(:jqfake)")&&!CSS.supports("selector(:is(*,:jqfake))")}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=E,!C.getElementsByName||!C.getElementsByName(E).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&S){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&S){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&S)return t.getElementsByClassName(e)},s=[],y=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+E+"-]").length||y.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||y.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+E+"+*").length||y.push(".#.+[+~]"),e.querySelectorAll("\\\f"),y.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),d.cssSupportsSelector||y.push(":has"),y=y.length&&new RegExp(y.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),v=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType&&e.documentElement||e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&v(p,e)?-1:t==C||t.ownerDocument==p&&v(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&S&&!N[t+" "]&&(!s||!s.test(t))&&(!y||!y.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?E.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?E.grep(e,function(e){return e===n!==r}):"string"!=typeof n?E.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(E.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof E?t[0]:t,E.merge(this,E.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:S,!0)),N.test(r[1])&&E.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=S.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(E):E.makeArray(e,this)}).prototype=E.fn,D=E(S);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}E.fn.extend({has:function(e){var t=E(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=S.createDocumentFragment().appendChild(S.createElement("div")),(fe=S.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),v.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",v.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",v.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?E.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&E(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),S.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;E.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||E.expando+"_"+Ct.guid++;return this[e]=!0,e}}),E.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||E.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?E(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),v.createHTMLDocument=((Ut=S.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),E.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=S.implementation.createHTMLDocument("")).createElement("base")).href=S.location.href,t.head.appendChild(r)):t=S),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&E(o).remove(),E.merge([],i.childNodes)));var r,i,o},E.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(E.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},E.expr.pseudos.animated=function(t){return E.grep(E.timers,function(e){return t===e.elem}).length},E.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=E.css(e,"position"),c=E(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=E.css(e,"top"),u=E.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,E.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},E.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){E.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===E.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===E.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=E(e).offset()).top+=E.css(e,"borderTopWidth",!0),i.left+=E.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-E.css(r,"marginTop",!0),left:t.left-i.left-E.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===E.css(e,"position"))e=e.offsetParent;return e||re})}}),E.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;E.fn[t]=function(e){return B(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),E.each(["top","left"],function(e,n){E.cssHooks[n]=_e(v.pixelPosition,function(e,t){if(t)return t=Be(e,n),Pe.test(t)?E(e).position()[n]+"px":t})}),E.each({Height:"height",Width:"width"},function(a,s){E.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){E.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return B(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?E.css(e,t,i):E.style(e,t,n,i)},s,n?e:void 0,n)}})}),E.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){E.fn[t]=function(e){return this.on(t,e)}}),E.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),E.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(e,n){E.fn[n]=function(e,t){return 0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,S)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&v(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!y||!y.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ve(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=E)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{if(d.cssSupportsSelector&&!CSS.supports("selector("+c+")"))throw new Error;return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===E&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[E]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ye(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ve(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,S=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.cssSupportsSelector=ce(function(){return CSS.supports("selector(*)")&&C.querySelectorAll(":is(:jqfake)")&&!CSS.supports("selector(:is(*,:jqfake))")}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=E,!C.getElementsByName||!C.getElementsByName(E).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&S){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&S){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&S)return t.getElementsByClassName(e)},s=[],y=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+E+"-]").length||y.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||y.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+E+"+*").length||y.push(".#.+[+~]"),e.querySelectorAll("\\\f"),y.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),d.cssSupportsSelector||y.push(":has"),y=y.length&&new RegExp(y.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),v=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType&&e.documentElement||e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&v(p,e)?-1:t==C||t.ownerDocument==p&&v(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&S&&!N[t+" "]&&(!s||!s.test(t))&&(!y||!y.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?E.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?E.grep(e,function(e){return e===n!==r}):"string"!=typeof n?E.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(E.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof E?t[0]:t,E.merge(this,E.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:S,!0)),N.test(r[1])&&E.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=S.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(E):E.makeArray(e,this)}).prototype=E.fn,D=E(S);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}E.fn.extend({has:function(e){var t=E(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=S.createDocumentFragment().appendChild(S.createElement("div")),(fe=S.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),v.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",v.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",v.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?E.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&E(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),S.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;E.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||E.expando+"_"+Ct.guid++;return this[e]=!0,e}}),E.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||E.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?E(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),v.createHTMLDocument=((Ut=S.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),E.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=S.implementation.createHTMLDocument("")).createElement("base")).href=S.location.href,t.head.appendChild(r)):t=S),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&E(o).remove(),E.merge([],i.childNodes)));var r,i,o},E.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(E.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},E.expr.pseudos.animated=function(t){return E.grep(E.timers,function(e){return t===e.elem}).length},E.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=E.css(e,"position"),c=E(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=E.css(e,"top"),u=E.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,E.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},E.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){E.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===E.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===E.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=E(e).offset()).top+=E.css(e,"borderTopWidth",!0),i.left+=E.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-E.css(r,"marginTop",!0),left:t.left-i.left-E.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===E.css(e,"position"))e=e.offsetParent;return e||re})}}),E.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;E.fn[t]=function(e){return B(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),E.each(["top","left"],function(e,n){E.cssHooks[n]=_e(v.pixelPosition,function(e,t){if(t)return t=Be(e,n),Pe.test(t)?E(e).position()[n]+"px":t})}),E.each({Height:"height",Width:"width"},function(a,s){E.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){E.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return B(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?E.css(e,t,i):E.style(e,t,n,i)},s,n?e:void 0,n)}})}),E.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){E.fn[t]=function(e){return this.on(t,e)}}),E.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),E.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(e,n){E.fn[n]=function(e,t){return 0l&&(y=b,I=i,r=c,b=M+l*(n&&M "element" is required');if("string"==typeof t&&!(t=document.querySelector(t)))throw new Error('SVGMorpheus > "element" query is not related to an existing DOM node');if(e&&typeof e!=typeof{})throw new Error('SVGMorpheus > "options" parameter must be an object');if(e=e||{},a&&"function"!=typeof a)throw new Error('SVGMorpheus > "callback" parameter must be a function');var o=this;this._icons={},this._curIconId=e.iconId||"",this._toIconId="",this._curIconItems=[],this._fromIconItems=[],this._toIconItems=[],this._morphNodes=[],this._morphG,this._startTime,this._defDuration=e.duration||750,this._defEasing=e.easing||"quad-in-out",this._defRotation=e.rotation||"clock",this._defCallback=a||function(){},this._duration=this._defDuration,this._easing=this._defEasing,this._rotation=this._defRotation,this._callback=this._defCallback,this._rafid,this._fnTick=function(t){o._startTime||(o._startTime=t);t=Math.min((t-o._startTime)/o._duration,1);o._updateAnimationProgress(t),t<1?o._rafid=s(o._fnTick):""!=o._toIconId&&o._animationEnd()},"SVG"===t.nodeName.toUpperCase()?this._svgDoc=t:this._svgDoc=t.getSVGDocument(),this._svgDoc?o._init():t.addEventListener("load",function(){o._svgDoc=t.getSVGDocument(),o._init()},!1)}return a.prototype._init=function(){if("SVG"!==this._svgDoc.nodeName.toUpperCase()&&(this._svgDoc=this._svgDoc.getElementsByTagName("svg")[0]),this._svgDoc){for(var t,e,a,o,s="",r=this._svgDoc.childNodes.length-1;0<=r;r--){var n=this._svgDoc.childNodes[r];if("G"===n.nodeName.toUpperCase()&&(t=n.getAttribute("id"))){for(e=[],a=0,o=n.childNodes.length;a "options" parameter must be an object');if(e=e||{},a&&"function"!=typeof a)throw new Error('SVGMorpheus.to() > "callback" parameter must be a function');o(this._rafid),this._duration=e.duration||this._defDuration,this._easing=e.easing||this._defEasing,this._rotation=e.rotation||this._defRotation,this._callback=a||this._defCallback,this._setupAnimation(t),this._rafid=s(this._fnTick)}},a.prototype.registerEasing=function(t,e){u[t]=e},a}(); /** * Less - Leaner CSS v3.13.1 * http://lesscss.org @@ -570,6 +572,9 @@ if(t==e.dx){for((r||f>e.dy)&&(f=e.dy);++u',(J=K.firstChild).style.behavior="url(#default#VML)",!J||"object"!=typeof J.adj)return e.type=d;K=null}function tt(t){if("function"==typeof t||Object(t)!==t)return t;var e=new t.constructor;for(var r in t)t[o](r)&&(e[r]=tt(t[r]));return e}e.svg=!(e.vml="VML"==e.type),e._Paper=u,e.fn=i=u.prototype=e.prototype,e._id=0,e.is=function(t,e){return"finite"==(e=b.call(e))?!N[o](+t):"array"==e?t instanceof Array:"null"==e&&null===t||e==typeof t&&null!==t||"object"==e&&t===Object(t)||"array"==e&&Array.isArray&&Array.isArray(t)||M.call(t).slice(8,-1).toLowerCase()==e},e.angle=function(t,r,i,n,a,s){if(null==a){var o=t-i,l=r-n;return o||l?(180+180*_.atan2(-l,-o)/S+360)%360:0}return e.angle(t,r,a,s)-e.angle(i,n,a,s)},e.rad=function(t){return t%360*S/180},e.deg=function(t){return Math.round(180*t/S%360*1e3)/1e3},e.snapTo=function(t,r,i){if(i=e.is(i,"finite")?i:10,e.is(t,A)){for(var n=t.length;n--;)if(B(t[n]-r)<=i)return t[n]}else{var a=r%(t=+t);if(at-i)return r-a+t}return r};var et,rt;e.createUUID=(et=/[xy]/g,rt=function(t){var e=16*_.random()|0;return("x"==t?e:3&e|8).toString(16)},function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(et,rt).toUpperCase()});e.setWindow=function(r){t("raphael.setWindow",e,l.win,r),l.win=r,l.doc=l.win.document,e._engine.initWin&&e._engine.initWin(l.win)};var it=function(t){if(e.vml){var r,i=/^\s+|\s+$/g;try{var n=new ActiveXObject("htmlfile");n.write(""),n.close(),r=n.body}catch(t){r=createPopup().document.body}var a=r.createTextRange();it=ht(function(t){try{r.style.color=x(t).replace(i,d);var e=a.queryCommandValue("ForeColor");return"#"+("000000"+(e=(255&e)<<16|65280&e|(16711680&e)>>>16).toString(16)).slice(-6)}catch(t){return"none"}})}else{var s=l.doc.createElement("i");s.title="Raphaël Colour Picker",s.style.display="none",l.doc.body.appendChild(s),it=ht(function(t){return s.style.color=t,l.doc.defaultView.getComputedStyle(s,d).getPropertyValue("color")})}return it(t)},nt=function(){return"hsb("+[this.h,this.s,this.b]+")"},at=function(){return"hsl("+[this.h,this.s,this.l]+")"},st=function(){return this.hex},ot=function(t,r,i){if(null==r&&e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(i=t.b,r=t.g,t=t.r),null==r&&e.is(t,"string")){var n=e.getRGB(t);t=n.r,r=n.g,i=n.b}return(t>1||r>1||i>1)&&(t/=255,r/=255,i/=255),[t,r,i]},lt=function(t,r,i,n){var a={r:t*=255,g:r*=255,b:i*=255,hex:e.rgb(t,r,i),toString:st};return e.is(n,"finite")&&(a.opacity=n),a};function ht(t,e,r){return function i(){var n=Array.prototype.slice.call(arguments,0),a=n.join("␀"),s=i.cache=i.cache||{},l=i.count=i.count||[];return s[o](a)?(function(t,e){for(var r=0,i=t.length;r=1e3&&delete s[l.shift()],l.push(a),s[a]=t[c](e,n),r?r(s[a]):s[a])}}e.color=function(t){var r;return e.is(t,"object")&&"h"in t&&"s"in t&&"b"in t?(r=e.hsb2rgb(t),t.r=r.r,t.g=r.g,t.b=r.b,t.hex=r.hex):e.is(t,"object")&&"h"in t&&"s"in t&&"l"in t?(r=e.hsl2rgb(t),t.r=r.r,t.g=r.g,t.b=r.b,t.hex=r.hex):(e.is(t,"string")&&(t=e.getRGB(t)),e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t?(r=e.rgb2hsl(t),t.h=r.h,t.s=r.s,t.l=r.l,r=e.rgb2hsb(t),t.v=r.b):(t={hex:"none"}).r=t.g=t.b=t.h=t.s=t.v=t.l=-1),t.toString=st,t},e.hsb2rgb=function(t,e,r,i){var n,a,s,o,l;return this.is(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(r=t.b,e=t.s,i=t.o,t=t.h),o=(l=r*e)*(1-B((t=(t*=360)%360/60)%2-1)),n=a=s=r-l,lt(n+=[l,o,0,0,o,l][t=~~t],a+=[o,l,l,o,0,0][t],s+=[0,0,o,l,l,o][t],i)},e.hsl2rgb=function(t,e,r,i){var n,a,s,o,l;return this.is(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(r=t.l,e=t.s,t=t.h),(t>1||e>1||r>1)&&(t/=360,e/=100,r/=100),o=(l=2*e*(r<.5?r:1-r))*(1-B((t=(t*=360)%360/60)%2-1)),n=a=s=r-l/2,lt(n+=[l,o,0,0,o,l][t=~~t],a+=[o,l,l,o,0,0][t],s+=[0,0,o,l,l,o][t],i)},e.rgb2hsb=function(t,e,r){var i,n;return t=(r=ot(t,e,r))[0],e=r[1],r=r[2],{h:((0==(n=(i=w(t,e,r))-k(t,e,r))?null:i==t?(e-r)/n:i==e?(r-t)/n+2:(t-e)/n+4)+360)%6*60/360,s:0==n?0:n/i,b:i,toString:nt}},e.rgb2hsl=function(t,e,r){var i,n,a,s;return t=(r=ot(t,e,r))[0],e=r[1],r=r[2],i=((n=w(t,e,r))+(a=k(t,e,r)))/2,{h:((0==(s=n-a)?null:n==t?(e-r)/s:n==e?(r-t)/s+2:(t-e)/s+4)+360)%6*60/360,s:0==s?0:i<.5?s/(2*i):s/(2-2*i),l:i,toString:at}},e._path2string=function(){return this.join(",").replace(O,"$1")};e._preload=function(t,e){var r=l.doc.createElement("img");r.style.cssText="position:absolute;left:-9999em;top:-9999em",r.onload=function(){e.call(this),this.onload=null,l.doc.body.removeChild(this)},r.onerror=function(){l.doc.body.removeChild(this)},l.doc.body.appendChild(r),r.src=t};function ut(){return this.hex}function ct(t,e){for(var r=[],i=0,n=t.length;n-2*!e>i;i+=2){var a=[{x:+t[i-2],y:+t[i-1]},{x:+t[i],y:+t[i+1]},{x:+t[i+2],y:+t[i+3]},{x:+t[i+4],y:+t[i+5]}];e?i?n-4==i?a[3]={x:+t[0],y:+t[1]}:n-2==i&&(a[2]={x:+t[0],y:+t[1]},a[3]={x:+t[2],y:+t[3]}):a[0]={x:+t[n-2],y:+t[n-1]}:n-4==i?a[3]=a[2]:i||(a[0]={x:+t[i],y:+t[i+1]}),r.push(["C",(-a[0].x+6*a[1].x+a[2].x)/6,(-a[0].y+6*a[1].y+a[2].y)/6,(a[1].x+6*a[2].x-a[3].x)/6,(a[1].y+6*a[2].y-a[3].y)/6,a[2].x,a[2].y])}return r}e.getRGB=ht(function(t){if(!t||(t=x(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:ut};if("none"==t)return{r:-1,g:-1,b:-1,hex:"none",toString:ut};!q[o](t.toLowerCase().substring(0,2))&&"#"!=t.charAt()&&(t=it(t));var r,i,n,a,s,l,h=t.match(E);return h?(h[2]&&(n=F(h[2].substring(5),16),i=F(h[2].substring(3,5),16),r=F(h[2].substring(1,3),16)),h[3]&&(n=F((s=h[3].charAt(3))+s,16),i=F((s=h[3].charAt(2))+s,16),r=F((s=h[3].charAt(1))+s,16)),h[4]&&(l=h[4][v](D),r=z(l[0]),"%"==l[0].slice(-1)&&(r*=2.55),i=z(l[1]),"%"==l[1].slice(-1)&&(i*=2.55),n=z(l[2]),"%"==l[2].slice(-1)&&(n*=2.55),"rgba"==h[1].toLowerCase().slice(0,4)&&(a=z(l[3])),l[3]&&"%"==l[3].slice(-1)&&(a/=100)),h[5]?(l=h[5][v](D),r=z(l[0]),"%"==l[0].slice(-1)&&(r*=2.55),i=z(l[1]),"%"==l[1].slice(-1)&&(i*=2.55),n=z(l[2]),"%"==l[2].slice(-1)&&(n*=2.55),("deg"==l[0].slice(-3)||"°"==l[0].slice(-1))&&(r/=360),"hsba"==h[1].toLowerCase().slice(0,4)&&(a=z(l[3])),l[3]&&"%"==l[3].slice(-1)&&(a/=100),e.hsb2rgb(r,i,n,a)):h[6]?(l=h[6][v](D),r=z(l[0]),"%"==l[0].slice(-1)&&(r*=2.55),i=z(l[1]),"%"==l[1].slice(-1)&&(i*=2.55),n=z(l[2]),"%"==l[2].slice(-1)&&(n*=2.55),("deg"==l[0].slice(-3)||"°"==l[0].slice(-1))&&(r/=360),"hsla"==h[1].toLowerCase().slice(0,4)&&(a=z(l[3])),l[3]&&"%"==l[3].slice(-1)&&(a/=100),e.hsl2rgb(r,i,n,a)):((h={r:r,g:i,b:n,toString:ut}).hex="#"+(16777216|n|i<<8|r<<16).toString(16).slice(1),e.is(a,"finite")&&(h.opacity=a),h)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:ut}},e),e.hsb=ht(function(t,r,i){return e.hsb2rgb(t,r,i).hex}),e.hsl=ht(function(t,r,i){return e.hsl2rgb(t,r,i).hex}),e.rgb=ht(function(t,e,r){function i(t){return t+.5|0}return"#"+(16777216|i(r)|i(e)<<8|i(t)<<16).toString(16).slice(1)}),e.getColor=function(t){var e=this.getColor.start=this.getColor.start||{h:0,s:1,b:t||.75},r=this.hsb2rgb(e.h,e.s,e.b);return e.h+=.075,e.h>1&&(e.h=0,e.s-=.2,e.s<=0&&(this.getColor.start={h:0,s:1,b:e.b})),r.hex},e.getColor.reset=function(){delete this.start},e.parsePathString=function(t){if(!t)return null;var r=ft(t);if(r.arr)return mt(r.arr);var i={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},n=[];return e.is(t,A)&&e.is(t[0],A)&&(n=mt(t)),n.length||x(t).replace(V,function(t,e,r){var a=[],s=e.toLowerCase();if(r.replace(Y,function(t,e){e&&a.push(+e)}),"m"==s&&a.length>2&&(n.push([e][f](a.splice(0,2))),s="l",e="m"==e?"l":"L"),"r"==s)n.push([e][f](a));else for(;a.length>=i[s]&&(n.push([e][f](a.splice(0,i[s]))),i[s]););}),n.toString=e._path2string,r.arr=mt(n),n},e.parseTransformString=ht(function(t){if(!t)return null;var r=[];return e.is(t,A)&&e.is(t[0],A)&&(r=mt(t)),r.length||x(t).replace(W,function(t,e,i){var n=[];b.call(e);i.replace(Y,function(t,e){e&&n.push(+e)}),r.push([e][f](n))}),r.toString=e._path2string,r},this,function(t){if(!t)return t;for(var e=[],r=0;r1?1:l<0?0:l)/2,u=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],c=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],f=0,p=0;p<12;p++){var d=h*u[p]+h,g=pt(d,t,r,n,s),x=pt(d,e,i,a,o),v=g*g+x*x;f+=c[p]*_.sqrt(v)}return h*f}function gt(t,e,r,i,n,a,s,o){if(!(w(t,r)w(n,s)||w(e,i)w(a,o))){var l=(t-r)*(a-o)-(e-i)*(n-s);if(l){var h=((t*i-e*r)*(n-s)-(t-r)*(n*o-a*s))/l,u=((t*i-e*r)*(a-o)-(e-i)*(n*o-a*s))/l,c=+h.toFixed(2),f=+u.toFixed(2);if(!(c<+k(t,r).toFixed(2)||c>+w(t,r).toFixed(2)||c<+k(n,s).toFixed(2)||c>+w(n,s).toFixed(2)||f<+k(e,i).toFixed(2)||f>+w(e,i).toFixed(2)||f<+k(a,o).toFixed(2)||f>+w(a,o).toFixed(2)))return{x:h,y:u}}}}function xt(t,r,i){var n=e.bezierBBox(t),a=e.bezierBBox(r);if(!e.isBBoxIntersect(n,a))return i?0:[];for(var s=dt.apply(0,t),o=dt.apply(0,r),l=w(~~(s/5),1),h=w(~~(o/5),1),u=[],c=[],f={},p=i?0:[],d=0;d=0&&T<=1.001&&A>=0&&A<=1.001&&(i?p++:p.push({x:S.x,y:S.y,t1:k(T,1),t2:k(A,1)}))}}return p}function vt(t,r,i){t=e._path2curve(t),r=e._path2curve(r);for(var n,a,s,o,l,h,u,c,f,p,d=i?0:[],g=0,x=t.length;gy||v=t.x&&e<=t.x2&&r>=t.y&&r<=t.y2},e.isBBoxIntersect=function(t,r){var i=e.isPointInsideBBox;return i(r,t.x,t.y)||i(r,t.x2,t.y)||i(r,t.x,t.y2)||i(r,t.x2,t.y2)||i(t,r.x,r.y)||i(t,r.x2,r.y)||i(t,r.x,r.y2)||i(t,r.x2,r.y2)||(t.xr.x||r.xt.x)&&(t.yr.y||r.yt.y)},e.pathIntersection=function(t,e){return vt(t,e)},e.pathIntersectionNumber=function(t,e){return vt(t,e,1)},e.isPointInsidePath=function(t,r,i){var n=e.pathBBox(t);return e.isPointInsideBBox(n,r,i)&&vt(t,[["M",r,i],["H",n.x2+10]],1)%2==1},e._removedFactory=function(e){return function(){t("raphael.log",null,"Raphaël: you are calling to method “"+e+"” of removed object",e)}};var yt=e.pathBBox=function(t){var e=ft(t);if(e.bbox)return tt(e.bbox);if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0};for(var r,i=0,n=0,a=[],s=[],o=0,l=(t=Tt(t)).length;o1&&(r*=m=_.sqrt(m),i*=m);var b=r*r,w=i*i,k=(a==s?-1:1)*_.sqrt(B((b*w-b*y*y-w*x*x)/(b*y*y+w*x*x))),C=k*r*y/i+(t+o)/2,T=k*-i*x/r+(e+l)/2,A=_.asin(((e-T)/i).toFixed(9)),M=_.asin(((l-T)/i).toFixed(9));(A=tM&&(A-=2*S),!s&&M>A&&(M-=2*S)}var E=M-A;if(B(E)>c){var N=M,L=o,P=l;M=A+c*(s&&M>A?1:-1),o=C+r*_.cos(M),l=T+i*_.sin(M),d=Bt(o,l,r,i,n,0,s,L,P,[M,N,C,T])}E=M-A;var z=_.cos(A),F=_.sin(A),R=_.cos(M),j=_.sin(M),I=_.tan(E/4),D=4/3*r*I,q=4/3*i*I,O=[t,e],V=[t+D*F,e-q*z],W=[o+D*j,l-q*R],Y=[o,l];if(V[0]=2*O[0]-V[0],V[1]=2*O[1]-V[1],h)return[V,W,Y][f](d);for(var G=[],H=0,X=(d=[V,W,Y][f](d).join()[v](",")).length;H"1e12"&&(p=.5),B(d)>"1e12"&&(d=.5),p>0&&p<1&&(l=Ct(t,e,r,i,n,a,s,o,p),x.push(l.x),g.push(l.y)),d>0&&d<1&&(l=Ct(t,e,r,i,n,a,s,o,d),x.push(l.x),g.push(l.y)),h=a-2*i+e-(o-2*a+i),f=e-i,p=(-(u=2*(i-e)-2*(a-i))+_.sqrt(u*u-4*h*f))/2/h,d=(-u-_.sqrt(u*u-4*h*f))/2/h,B(p)>"1e12"&&(p=.5),B(d)>"1e12"&&(d=.5),p>0&&p<1&&(l=Ct(t,e,r,i,n,a,s,o,p),x.push(l.x),g.push(l.y)),d>0&&d<1&&(l=Ct(t,e,r,i,n,a,s,o,d),x.push(l.x),g.push(l.y)),{min:{x:k[c](0,x),y:k[c](0,g)},max:{x:w[c](0,x),y:w[c](0,g)}}}),Tt=e._path2curve=ht(function(t,e){var r=!e&&ft(t);if(!e&&r.curve)return mt(r.curve);for(var i=_t(t),n=e&&_t(e),a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},s={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},o=function(t,e,r){var i,n;if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in{T:1,Q:1})&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][f](Bt[c](0,[e.x,e.y][f](t.slice(1))));break;case"S":"C"==r||"S"==r?(i=2*e.x-e.bx,n=2*e.y-e.by):(i=e.x,n=e.y),t=["C",i,n][f](t.slice(1));break;case"T":"Q"==r||"T"==r?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"][f](kt(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][f](kt(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][f](wt(e.x,e.y,t[1],t[2]));break;case"H":t=["C"][f](wt(e.x,e.y,t[1],e.y));break;case"V":t=["C"][f](wt(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][f](wt(e.x,e.y,e.X,e.Y))}return t},l=function(t,e){if(t[e].length>7){t[e].shift();for(var r=t[e];r.length;)u[e]="A",n&&(p[e]="A"),t.splice(e++,0,["C"][f](r.splice(0,6)));t.splice(e,1),v=w(i.length,n&&n.length||0)}},h=function(t,e,r,a,s){t&&e&&"M"==t[s][0]&&"M"!=e[s][0]&&(e.splice(s,0,["M",a.x,a.y]),r.bx=0,r.by=0,r.x=t[s][1],r.y=t[s][2],v=w(i.length,n&&n.length||0))},u=[],p=[],d="",g="",x=0,v=w(i.length,n&&n.length||0);x.01;)h=dt(t,e,r,i,n,a,s,o,c+=(hn){if(r&&!f.start){if(c+=["C"+(u=Xt(s,o,l[1],l[2],l[3],l[4],l[5],l[6],n-p)).start.x,u.start.y,u.m.x,u.m.y,u.x,u.y],a)return c;f.start=c,c=["M"+u.x,u.y+"C"+u.n.x,u.n.y,u.end.x,u.end.y,l[5],l[6]].join(),p+=h,s=+l[5],o=+l[6];continue}if(!t&&!r)return{x:(u=Xt(s,o,l[1],l[2],l[3],l[4],l[5],l[6],n-p)).x,y:u.y,alpha:u.alpha}}p+=h,s=+l[5],o=+l[6]}c+=l.shift()+l}return f.end=c,(u=t?p:r?f:e.findDotsAtSegment(s,o,l[0],l[1],l[2],l[3],l[4],l[5],1)).alpha&&(u={x:u.x,y:u.y,alpha:u.alpha}),u}},$t=Ut(1),Zt=Ut(),Qt=Ut(0,1);e.getTotalLength=$t,e.getPointAtLength=Zt,e.getSubpath=function(t,e,r){if(this.getTotalLength(t)-r<1e-6)return Qt(t,e).end;var i=Qt(t,r,1);return e?Qt(i,e).end:i},Wt.getTotalLength=function(){var t=this.getPath();if(t)return this.node.getTotalLength?this.node.getTotalLength():$t(t)},Wt.getPointAtLength=function(t){var e=this.getPath();if(e)return Zt(e,t)},Wt.getPath=function(){var t,r=e._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return r&&(t=r(this)),t},Wt.getSubpath=function(t,r){var i=this.getPath();if(i)return e.getSubpath(i,t,r)};var Jt=e.easing_formulas={linear:function(t){return t},"<":function(t){return C(t,1.7)},">":function(t){return C(t,.48)},"<>":function(t){var e=.48-t/1.04,r=_.sqrt(.1734+e*e),i=r-e,n=-r-e,a=C(B(i),1/3)*(i<0?-1:1)+C(B(n),1/3)*(n<0?-1:1)+.5;return 3*(1-a)*a*a+a*a*a},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},elastic:function(t){return t==!!t?t:C(2,-10*t)*_.sin(2*S*(t-.075)/.3)+1},bounce:function(t){var e=7.5625,r=2.75;return t<1/r?e*t*t:t<2/r?e*(t-=1.5/r)*t+.75:t<2.5/r?e*(t-=2.25/r)*t+.9375:e*(t-=2.625/r)*t+.984375}};Jt.easeIn=Jt["ease-in"]=Jt["<"],Jt.easeOut=Jt["ease-out"]=Jt[">"],Jt.easeInOut=Jt["ease-in-out"]=Jt["<>"],Jt["back-in"]=Jt.backIn,Jt["back-out"]=Jt.backOut;var Kt=[],te=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,16)},ee=function(){for(var r=+new Date,i=0;i1&&!n.next){for(s in d)d[o](s)&&(y[s]=n.totalOrigin[s]);n.el.attr(y),ae(n.anim,n.el,n.anim.percents[0],null,n.totalOrigin,n.repeat-1)}n.next&&!n.stop&&ae(n.anim,n.el,n.next,null,n.totalOrigin,n.repeat)}}}Kt.length&&te(ee)},re=function(t){return t>255?255:t<0?0:t};function ie(t,e,r,i,n,a){var s=3*e,o=3*(i-e)-s,l=1-s-o,h=3*r,u=3*(n-r)-h,c=1-h-u;function f(t){return((l*t+o)*t+s)*t}return function(t,e){var r=function(t,e){var r,i,n,a,h,u;for(n=t,u=0;u<8;u++){if(a=f(n)-t,B(a)i)return i;for(;ra?r=n:i=n,n=(i-r)/2+r}return n}(t,e);return((c*r+u)*r+h)*r}(t,1/(200*a))}function ne(t,e){var r=[],i={};if(this.ms=e,this.times=1,t){for(var n in t)t[o](n)&&(i[z(n)]=t[n],r.push(z(n)));r.sort(H)}this.anim=i,this.top=r[r.length-1],this.percents=r}function ae(r,i,a,s,l,h){a=z(a);var u,c,p,d,g,y,m=r.ms,b={},_={},w={};if(s)for(B=0,C=Kt.length;Bs*r.top){a=r.percents[B],g=r.percents[B-1]||0,m=m/r.top*(a-g),d=r.percents[B+1],u=r.anim[a];break}s&&i.attr(r.anim[r.percents[B]])}if(u){if(c)c.initstatus=s,c.start=new Date-c.ms*s;else{for(var S in u)if(u[o](S)&&(I[o](S)||i.paper.customAttributes[o](S)))switch(b[S]=i.attr(S),null==b[S]&&(b[S]=j[S]),_[S]=u[S],I[S]){case T:w[S]=(_[S]-b[S])/m;break;case"colour":b[S]=e.getRGB(b[S]);var A=e.getRGB(_[S]);w[S]={r:(A.r-b[S].r)/m,g:(A.g-b[S].g)/m,b:(A.b-b[S].b)/m};break;case"path":var M=Tt(b[S],_[S]),E=M[1];for(b[S]=M[0],w[S]=[],B=0,C=b[S].length;Bh&&(h=c)}!t[h+="%"].callback&&(t[h].callback=n)}return new ne(t,r)},Wt.animate=function(t,r,i,n){if(this.removed)return n&&n.call(this),this;var a=t instanceof ne?t:e.animation(t,r,i,n);return ae(a,this,a.percents[0],null,this.attr()),this},Wt.setTime=function(t,e){return t&&null!=e&&this.status(t,k(e,t.ms)/t.ms),this},Wt.status=function(t,e){var r,i,n=[],a=0;if(null!=e)return ae(t,this,-1,k(e,1)),this;for(r=Kt.length;a1)for(var i=0,n=r.length;i.5)-1;l(f-.5,2)+l(p-.5,2)>.25&&(p=a.sqrt(.25-l(f-.5,2))*n+.5)&&.5!=p&&(p=p.toFixed(5)-1e-5*n)}return c})).split(/\s*\-\s*/),"linear"==h){var b=n.shift();if(b=-i(b),isNaN(b))return null;var _=[0,0,a.cos(t.rad(b)),a.sin(t.rad(b))],w=1/(s(o(_[2]),o(_[3]))||1);_[2]*=w,_[3]*=w,_[2]<0&&(_[0]=-_[2],_[2]=0),_[3]<0&&(_[1]=-_[3],_[3]=0)}var k=t._parseDots(n);if(!k)return null;if(u=u.replace(/[\(\)\s,\xb0#]/g,"_"),e.gradient&&u!=e.gradient.id&&(g.defs.removeChild(e.gradient),delete e.gradient),!e.gradient){m=x(h+"Gradient",{id:u}),e.gradient=m,x(m,"radial"==h?{fx:f,fy:p}:{x1:_[0],y1:_[1],x2:_[2],y2:_[3],gradientTransform:e.matrix.invert()}),g.defs.appendChild(m);for(var B=0,C=k.length;B1?P.opacity/100:P.opacity});case"stroke":P=t.getRGB(g),l.setAttribute(d,P.hex),"stroke"==d&&P[e]("opacity")&&x(l,{"stroke-opacity":P.opacity>1?P.opacity/100:P.opacity}),"stroke"==d&&i._.arrows&&("startString"in i._.arrows&&b(i,i._.arrows.startString),"endString"in i._.arrows&&b(i,i._.arrows.endString,1));break;case"gradient":("circle"==i.type||"ellipse"==i.type||"r"!=r(g).charAt())&&v(i,g);break;case"opacity":u.gradient&&!u[e]("stroke-opacity")&&x(l,{"stroke-opacity":g>1?g/100:g});case"fill-opacity":if(u.gradient){(z=t._g.doc.getElementById(l.getAttribute("fill").replace(/^url\(#|\)$/g,c)))&&(F=z.getElementsByTagName("stop"),x(F[F.length-1],{"stop-opacity":g}));break}default:"font-size"==d&&(g=n(g,10)+"px");var R=d.replace(/(\-.)/g,function(t){return t.substring(1).toUpperCase()});l.style[R]=g,i._.dirty=1,l.setAttribute(d,g)}}B(i,a),l.style.visibility=f},B=function(i,a){if("text"==i.type&&(a[e]("text")||a[e]("font")||a[e]("font-size")||a[e]("x")||a[e]("y"))){var s=i.attrs,o=i.node,l=o.firstChild?n(t._g.doc.defaultView.getComputedStyle(o.firstChild,c).getPropertyValue("font-size"),10):10;if(a[e]("text")){for(s.text=a.text;o.firstChild;)o.removeChild(o.firstChild);for(var h,u=r(a.text).split("\n"),f=[],p=0,d=u.length;p"));var U=H.getBoundingClientRect();T.W=g.w=(U.right-U.left)/100,T.H=g.h=(U.bottom-U.top)/100,T.X=g.x,T.Y=g.y+T.H/2,("x"in l||"y"in l)&&(T.path.v=t.format("m{0},{1}l{2},{1}",a(g.x*y),a(g.y*y),a(g.x*y)+1));for(var $=["x","y","text","font","font-family","font-weight","font-style","font-size"],Z=0,Q=$.length;Z.25&&(r=n.sqrt(.25-o(e-.5,2))*(2*(r>.5)-1)+.5),h=e+c+r),f})).split(/\s*\-\s*/),"linear"==l){var u=a.shift();if(u=-i(u),isNaN(u))return null}var p=t._parseDots(a);if(!p)return null;if(e=e.shape||e.node,p.length){e.removeChild(s),s.on=!0,s.method="none",s.color=p[0].color,s.color2=p[p.length-1].color;for(var d=[],g=0,x=p.length;g')}}catch(t){k=function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},t._engine.initWin(t._g.win),t._engine.create=function(){var e=t._getContainer.apply(0,arguments),r=e.container,i=e.height,n=e.width,a=e.x,s=e.y;if(!r)throw new Error("VML container not found.");var o=new t._Paper,l=o.canvas=t._g.doc.createElement("div"),h=l.style;return a=a||0,s=s||0,n=n||512,i=i||342,o.width=n,o.height=i,n==+n&&(n+="px"),i==+i&&(i+="px"),o.coordsize=216e5+c+216e5,o.coordorigin="0 0",o.span=t._g.doc.createElement("span"),o.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",l.appendChild(o.span),h.cssText=t.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",n,i),1==r?(t._g.doc.body.appendChild(l),h.left=a+"px",h.top=s+"px",h.position="absolute"):r.firstChild?r.insertBefore(l,r.firstChild):r.appendChild(l),o.renderfix=function(){},o},t.prototype.clear=function(){t.eve("raphael.clear",this),this.canvas.innerHTML=f,this.span=t._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},t.prototype.remove=function(){for(var e in t.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas),this)this[e]="function"==typeof this[e]?t._removedFactory(e):null;return!0};var M=t.st;for(var E in A)A[e](E)&&!M[e](E)&&(M[E]=function(t){return function(){var e=arguments;return this.forEach(function(r){r[t].apply(r,e)})}}(E))}}.apply(e,i))||(t.exports=n)}])}); +!function(e,n){"function"==typeof define&&define.amd?define(["raphael"],function(t){return e.JustGage=n(t)}):"object"==typeof module&&module.exports?module.exports=e.JustGage=n(require("raphael")):e.JustGage=n(Raphael)}("undefined"!=typeof window?window:this,function(V){function t(t){const C=this;if(C.events={},N(t))return console.log("* justgage: Make sure to pass options to the constructor!"),!1;if(N(t.id)){if(N(t.parentNode))return console.log("* justgage: Make sure to pass the existing element id or parentNode to the constructor."),!1;C.node=t.parentNode}else if(C.node=document.getElementById(t.id),!C.node)return console.log("* justgage: No element with id : %s found",t.id),!1;var e=C.node.dataset||{},n=!N(t.defaults)&&t.defaults;!1!==n&&delete(t=function(e){e=e||{};for(let t=1;t"),refreshAnimationTime:T("refreshAnimationTime",t,e,700),refreshAnimationType:T("refreshAnimationType",t,e,">"),donutStartAngle:T("donutStartAngle",t,e,90),valueMinFontSize:T("valueMinFontSize",t,e,16),labelMinFontSize:T("labelMinFontSize",t,e,10),minLabelMinFontSize:T("minLabelMinFontSize",t,e,10),maxLabelMinFontSize:T("maxLabelMinFontSize",t,e,10),hideValue:T("hideValue",t,e,!1),hideMinMax:T("hideMinMax",t,e,!1),showInnerShadow:T("showInnerShadow",t,e,!1),humanFriendly:T("humanFriendly",t,e,!1),noGradient:T("noGradient",t,e,!1),donut:T("donut",t,e,!1),differential:T("differential",t,e,!1),relativeGaugeSize:T("relativeGaugeSize",t,e,!1),counter:T("counter",t,e,!1),decimals:T("decimals",t,e,0),customSectors:T("customSectors",t,e,{}),formatNumber:T("formatNumber",t,e,!1),pointer:T("pointer",t,e,!1),pointerOptions:T("pointerOptions",t,e,{}),displayRemaining:T("displayRemaining",t,e,!1)};let i,o,a,l,r,c,f,s,m,g,u,d,p,x,h,b,v,M,y,F=(C.config.value>C.config.max&&(C.config.value=C.config.max),C.config.valueo?(l=o,a=l):l=(i,o,a=i),c=(i-a)/2,f=(o-l)/2,s=16o?(l=o,(a=2*l)>i&&(r=a/i,a/=r,l/=r)):l=iC.config.valueMinFontSize?l/6.5:C.config.valueMinFontSize,m=c+a/2,g=f+l/1.275,u=l/16>C.config.labelMinFontSize?l/16:C.config.labelMinFontSize,d=c+a/2,p=g+s/2+5,x=l/16>C.config.minLabelMinFontSize?l/16:C.config.minLabelMinFontSize,h=c+a/10+a/6.666666666666667*C.config.gaugeWidthScale/2,b=p,l/16>C.config.maxLabelMinFontSize?l/16:C.config.maxLabelMinFontSize),c+a-a/10-a/6.666666666666667*C.config.gaugeWidthScale/2),p),C.params={canvasW:i,canvasH:o,widgetW:a,widgetH:l,dx:c,dy:f,valueFontSize:s,valueX:m,valueY:g,labelFontSize:u,labelX:d,labelY:p,minFontSize:x,minX:h,minY:b,maxFontSize:v,maxX:M,maxY:y},C.canvas.customAttributes.pki=function(t,e){let n=C.config.min,i=C.config.max;var o=C.params.widgetW,a=C.params.widgetH,l=C.params.dx,r=C.params.dy,c=C.config.gaugeWidthScale,f=C.config.donut;let s,m,g,u,d,p,x,h,b,v;return n<0&&!e&&(i-=n,t-=n,n=0),f?(s=(1-2*(t-n)/(i-n))*Math.PI,m=o/2-o/30,g=m-o/6.666666666666667*c,u=o/2+l,d=a/2+r,p=u+m*Math.cos(s),x=d-m*Math.sin(s),h=u+g*Math.cos(s),b=d-g*Math.sin(s),v="M"+(u-g)+","+d+" ",v+="L"+(u-m)+","+d+" ",t-n>(i-n)/2&&(v+="A"+m+","+m+" 0 0 1 "+(u+m)+","+d+" "),v=(v+="A"+m+","+m+" 0 0 1 "+p+","+x+" ")+"L"+h+","+b+" ",t-n>(i-n)/2&&(v+="A"+g+","+g+" 0 0 0 "+(u+g)+","+d+" "),{path:v=v+("A"+g+","+g+" 0 0 0 "+(u-g)+","+d+" ")+"Z "}):e?(s=(1-(t-n)/(i-n))*Math.PI,m=o/2-o/10,g=m-o/6.666666666666667*c,u=o/2+l,d=a/1.25+r,p=u+m*Math.cos(s),x=d-m*Math.sin(s),h=u+g*Math.cos(s),b=d-g*Math.sin(s),f=n+(i-n)/2,v="M"+u+","+(d-g)+" ",{path:v=(v=(v=(v+="L"+u+","+(d-m)+" ")+("A"+m+","+m+" 0 0 "+(t=a.ranges[t].lo&&e<=a.ranges[t].hi)return a.ranges[t].color}t=i.length;if(1===t)return i[0];var d=o?1/t:1/(t-1),p=[];for(let t=0;t=n.length?n.length-1:i,Math.round(t*e)/e+n[i]}function E(t){t=t.toString().split(".");return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),t.join(".")}function Y(t,e){let n="";return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,"").getPropertyValue(e):t.currentStyle&&(e=e.replace(/-(\w)/g,function(t,e){return e.toUpperCase()}),n=t.currentStyle[e]),n}t.prototype.bindEvent=function(t,e){t+="."+this.level.id,this.events[t]&&V.eve.off(t,this.events[t]),V.eve.on(t,e),this.events[t]=e},t.prototype.refresh=function(t,e,n,i){var o=this;let a;e=r(e)?e:null,n=r(n)?n:null,null!==(i=i||null)&&(o.config.label=i,o.txtLabel.attr({text:o.config.label}),L(o.txtLabel,o.params.labelFontSize,o.params.labelY)),null!==n&&(o.config.min=n,o.txtMinimum=o.config.min,o.config.minTxt?o.txtMinimum=o.config.minTxt:o.config.humanFriendly?o.txtMinimum=k(o.config.min,o.config.humanFriendlyDecimal):o.config.formatNumber&&(o.txtMinimum=E(o.config.min)),o.config.reverse?(o.txtMax.attr({text:o.txtMinimum}),L(o.txtMax,o.params.minFontSize,o.params.minY)):(o.txtMin.attr({text:o.txtMinimum}),L(o.txtMin,o.params.minFontSize,o.params.minY))),null!==e&&(o.config.max=e,o.txtMaximum=o.config.max,o.config.maxTxt?o.txtMaximum=o.config.maxTxt:o.config.humanFriendly?o.txtMaximum=k(o.config.max,o.config.humanFriendlyDecimal):o.config.formatNumber&&(o.txtMaximum=E(o.config.max)),o.config.reverse?(o.txtMin.attr({text:o.txtMaximum}),L(o.txtMin,o.params.maxFontSize,o.params.maxY)):(o.txtMax.attr({text:o.txtMaximum}),L(o.txtMax,o.params.maxFontSize,o.params.maxY)));i=O(t=+(t=+(a=t)>+o.config.max?+o.config.max:t)<+o.config.min?+o.config.min:t,(t-o.config.min)/(o.config.max-o.config.min),o.config.levelColors,o.config.noGradient,o.config.customSectors);a=o.config.textRenderer&&!1!==o.config.textRenderer(a)?o.config.textRenderer(a):o.config.humanFriendly?k(a,o.config.humanFriendlyDecimal)+o.config.symbol:o.config.formatNumber?E((+a).toFixed(o.config.decimals))+o.config.symbol:o.config.displayRemaining?(o.config.max-a).toFixed(o.config.decimals)+o.config.symbol:(+a).toFixed(o.config.decimals)+o.config.symbol,o.originalValue=a,o.config.value=+t,o.config.counter||(o.txtValue.attr({text:a}),L(o.txtValue,o.params.valueFontSize,o.params.valueY));let l=o.config.value;o.config.reverse&&(l=+o.config.max+ +o.config.min-+o.config.value),o.level.animate({pki:[l,o.config.differential],fill:i},o.config.refreshAnimationTime,o.config.refreshAnimationType,o.config.onAnimationEnd),o.config.pointer&&o.needle.animate({ndl:[l]},o.config.refreshAnimationTime,o.config.refreshAnimationType)},t.prototype.update=function(t,e){if(t instanceof Object)for(const n in t)e=t[n],i(this,n,e);else i(this,t,e)},t.prototype.destroy=function(){this.node&&this.node.parentNode&&(this.node.innerHTML="");for(const t in this.events)V.eve.off(t,this.events[t]);this.events={}},t.prototype.generateShadow=function(t,e){var n=this,i="inner-shadow-"+(n.config.id||n.config.classId),o=document.createElementNS(t,"filter"),e=(o.setAttribute("id",i),e.appendChild(o),document.createElementNS(t,"feOffset")),e=(e.setAttribute("dx",0),e.setAttribute("dy",n.config.shadowVerticalOffset),o.appendChild(e),document.createElementNS(t,"feGaussianBlur")),e=(e.setAttribute("result","offset-blur"),e.setAttribute("stdDeviation",n.config.shadowSize),o.appendChild(e),document.createElementNS(t,"feComposite")),e=(e.setAttribute("operator","out"),e.setAttribute("in","SourceGraphic"),e.setAttribute("in2","offset-blur"),e.setAttribute("result","inverse"),o.appendChild(e),document.createElementNS(t,"feFlood")),e=(e.setAttribute("flood-color","black"),e.setAttribute("flood-opacity",n.config.shadowOpacity),e.setAttribute("result","color"),o.appendChild(e),document.createElementNS(t,"feComposite")),e=(e.setAttribute("operator","in"),e.setAttribute("in","color"),e.setAttribute("in2","inverse"),e.setAttribute("result","shadow"),o.appendChild(e),document.createElementNS(t,"feComposite"));e.setAttribute("operator","over"),e.setAttribute("in","shadow"),e.setAttribute("in2","SourceGraphic"),o.appendChild(e),n.config.showInnerShadow&&(n.canvas.canvas.childNodes[2].setAttribute("filter","url(#"+i+")"),n.canvas.canvas.childNodes[3].setAttribute("filter","url(#"+i+")"))};const I=function(){let t=3;for(var e=document.createElement("div"),n=e.getElementsByTagName("i");n[0];)e.innerHTML="\x3c!--[if gt IE "+ ++t+"]>>1)+720)%360;--e;)n.h=(n.h+a)%360,i.push(u(n));return i}function E(t,e){e=e||6;for(var t=u(t).toHsv(),r=t.h,n=t.s,a=t.v,i=[],s=1/e;e--;)i.push(u({h:r,s:n,v:a})),a=(a+s)%1;return i}function m(t){return t=parseFloat(t),t=isNaN(t)||t<0||1e.dy)&&(f=e.dy);++u
')}o=o&&o.hasOwnProperty("default")?o.default:o;var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},i=(function(){function o(o){this.value=o}function t(t){function e(n,r){try{var s=t[n](r),l=s.value;l instanceof o?Promise.resolve(l.value).then(function(o){e("next",o)},function(o){e("throw",o)}):i(s.done?"return":"normal",s.value)}catch(o){i("throw",o)}}function i(o,t){switch(o){case"return":n.resolve({value:t,done:!0});break;case"throw":n.reject(t);break;default:n.resolve({value:t,done:!1})}(n=n.next)?e(n.key,n.arg):r=null}var n,r;this._invoke=function(o,t){return new Promise(function(i,s){var l={key:o,arg:t,resolve:i,reject:s,next:null};r?r=r.next=l:(n=r=l,e(o,t))})},"function"!=typeof t.return&&(this.return=void 0)}"function"==typeof Symbol&&Symbol.asyncIterator&&(t.prototype[Symbol.asyncIterator]=function(){return this}),t.prototype.next=function(o){return this._invoke("next",o)},t.prototype.throw=function(o){return this._invoke("throw",o)},t.prototype.return=function(o){return this._invoke("return",o)}}(),function(o,t){if(!(o instanceof t))throw new TypeError("Cannot call a class as a function")}),n=function(){function o(o,t){for(var e=0;e1?parseFloat(o[1]):NaN,this.updateModel=!0,this.initWatchers(),this.initConfig(),this.initMouseEvents()}},{key:"initConfig",value:function(){this.options||(this.options={}),this.mergeOptions(this.options,this.ColorPickerOptions),this.is_open=this.options.inline,this.options.inline&&(this.options.close.show=!1),this.pickerDimensions={width:150,height:150},this.sliderDimensions={width:this.options.horizontal?this.pickerDimensions.width:20,height:this.options.horizontal?20:this.pickerDimensions.height}}},{key:"mergeOptions",value:function(o,t){for(var i in t)t.hasOwnProperty(i)&&(o&&o.hasOwnProperty(i)?"object"===e(t[i])&&this.mergeOptions(o[i],t[i]):o[i]=t[i])}},{key:"initWatchers",value:function(){var o=this;this.$scope.$watch("AngularColorPickerController.internalNgModel",this.watchInternalNgModel.bind(this)),this.$scope.$watch("AngularColorPickerController.ngModel",this.watchNgModel.bind(this)),this.$scope.$watch("AngularColorPickerController.options.swatchPos",function(t){void 0!==t&&(o.initConfig(),o.$timeout(function(){o.updateSwatchBackground()}))}),this.$scope.$watchGroup(["AngularColorPickerController.options.format","AngularColorPickerController.options.alpha","AngularColorPickerController.options.case","AngularColorPickerController.options.round","AngularColorPickerController.options.restrictToFormat","AngularColorPickerController.options.preserveInputFormat","AngularColorPickerController.options.allowEmpty","AngularColorPickerController.options.horizontal","AngularColorPickerController.options.dynamicHue","AngularColorPickerController.options.dynamicSaturation","AngularColorPickerController.options.dynamicLightness","AngularColorPickerController.options.dynamicAlpha"],function(t){void 0!==t&&(o.initConfig(),o.update())}),this.$scope.$watchGroup(["AngularColorPickerController.options.disabled","AngularColorPickerController.options.swatchBootstrap","AngularColorPickerController.options.swatchOnly","AngularColorPickerController.options.swatch","AngularColorPickerController.options.pos","AngularColorPickerController.options.inline","AngularColorPickerController.options.placeholder"],function(t){void 0!==t&&o.initConfig()}),this.$scope.$watch("AngularColorPickerController.api",this.setupApi.bind(this)),this.$scope.$watch("AngularColorPickerController.swatchColor",this.updateSwatchBackground.bind(this)),this.$scope.$watch("AngularColorPickerController.hue",function(){o.valueUpdate("hue")}),this.$scope.$watch("AngularColorPickerController.saturation",function(){o.valueUpdate("saturation")}),this.$scope.$watch("AngularColorPickerController.lightness",function(){o.valueUpdate("lightness")}),this.$scope.$watch("AngularColorPickerController.opacity",function(){o.valueUpdate("opacity")})}},{key:"watchInternalNgModel",value:function(o,t){this.colorMouse||this.watchNgModelSet(o)}},{key:"watchNgModel",value:function(o,t){void 0===o||this.hasOwnProperty("initialNgModel")||(this.initialNgModel=o),this.checkDirty(o),this.internalNgModel=this.ngModelOptions.getterSetter?this.ngModel():this.ngModel,this.colorMouse||this.watchNgModelSet(o)}},{key:"watchNgModelSet",value:function(t){var e=this;if(void 0!==t&&null!==t){var i=o(t),n=this.isColorValid(i);n&&(this.setColorValue(i),this.updateModel=!1,this.$timeout(function(){e.updateModel=!0})),this.$scope.control[0].$setValidity("color",n)}else null!==t&&""!==t||(this.hue=0,this.saturation=void 0,this.lightness=void 0,this.opacity=void 0),this.swatchColor=""}},{key:"initMouseEvents",value:function(){var o=this,t={mouseDown:this.onMouseDown.bind(this),mouseUp:this.onMouseUp.bind(this),mouseMove:this.onMouseMove.bind(this),keyUp:this.onKeyUp.bind(this)};this.$document.on("mousedown",t.mouseDown),this.$document.on("mouseup",t.mouseUp),this.$document.on("mousemove",t.mouseMove),this.$document.on("touchstart",t.mouseDown),this.$document.on("touchend",t.mouseUp),this.$document.on("touchmove",t.mouseMove),this.$document.on("keyup",t.keyUp),this.find(".color-picker-grid").on("click",function(t){o.onClick("color",t)}),this.find(".color-picker-grid").on("touchend",function(t){o.onClick("color",t)}),this.find(".color-picker-hue").on("click",function(t){o.onClick("hue",t)}),this.find(".color-picker-hue").on("touchend",function(t){o.onClick("hue",t)}),this.find(".color-picker-saturation").on("click",function(t){o.onClick("saturation",t)}),this.find(".color-picker-saturation").on("touchend",function(t){o.onClick("saturation",t)}),this.find(".color-picker-lightness").on("click",function(t){o.onClick("lightness",t)}),this.find(".color-picker-lightness").on("touchend",function(t){o.onClick("lightness",t)}),this.find(".color-picker-opacity").on("click",function(t){o.onClick("opacity",t)}),this.find(".color-picker-opacity").on("touchend",function(t){o.onClick("opacity",t)}),this.find(".color-picker-input").on("focusin",this.onFocus.bind(this)),this.find(".color-picker-input").on("focusout",this.onBlur.bind(this)),this.$scope.$on("$destroy",function(){o.$document.off("mousedown",t.mouseDown),o.$document.off("mouseup",t.mouseUp),o.$document.off("mousemove",t.mouseMove),o.$document.off("touchstart",t.mouseDown),o.$document.off("touchend",t.mouseUp),o.$document.off("touchmove",t.mouseMove),o.$document.off("keyup",t.keyUp),o.eventApiDispatch("onDestroy")})}},{key:"onMouseDown",value:function(o){if(this.has_moused_moved=!1,this.options.disabled||0===this.find(o.target).length)return!0;for(var t=0;tn?this[o]=n:this[o]<0&&(this[o]=0)}},{key:"valueUpdate",value:function(o){if(void 0!==this[o]){if("saturation"===o)this[o+"Pos"]=this[o];else{var t=this.getMaxFromType(o);this[o+"Pos"]=100*(1-this[o]/t)}this[o+"Pos"]<0?this[o+"Pos"]=0:this[o+"Pos"]>100&&(this[o+"Pos"]=100),this.options.round&&(this.getRoundPos(),this.updateRoundPos()),this[o+"PosUpdate"](),this.update()}}},{key:"huePosUpdate",value:function(){var o=angular.element(this.$element[0].querySelector(".color-picker-hue .color-picker-slider"));this.options.horizontal?o.css({left:this.sliderDimensions.width*this.huePos/100+"px",top:0}):o.css({left:0,top:this.sliderDimensions.height*this.huePos/100+"px"})}},{key:"updateHueBackground",value:function(t){var e=this.find(".color-picker-hue .color-picker-overlay"),i=this.options.horizontal?"left":"top",n=this.getColorValue(this.options.dynamicHue),r=this.getColorValue(this.options.dynamicHue),s=this.getColorValue(this.options.dynamicHue),l=this.getColorValue(this.options.dynamicHue),a=this.getColorValue(this.options.dynamicHue),c=this.getColorValue(this.options.dynamicHue),h=this.getColorValue(this.options.dynamicHue);n.h=0,r.h=60,s.h=120,l.h=180,a.h=240,c.h=300,h.h=359,e.css({background:"linear-gradient(to "+i+", "+o(n).toRgbString()+" 0%, "+o(r).toRgbString()+" 17%, "+o(s).toRgbString()+" 33%, "+o(l).toRgbString()+" 50%, "+o(a).toRgbString()+" 67%, "+o(c).toRgbString()+" 83%, "+o(h).toRgbString()+" 100%)"})}},{key:"saturationPosUpdate",value:function(){var o;this.options.round||(o=angular.element(this.$element[0].querySelector(".color-picker-grid .color-picker-picker"))).css({left:this.pickerDimensions.height*this.saturationPos/100+"px"}),o=angular.element(this.$element[0].querySelector(".color-picker-saturation .color-picker-slider")),this.options.horizontal?o.css({left:this.sliderDimensions.width*(100-this.saturationPos)/100+"px",top:0}):o.css({left:0,top:this.sliderDimensions.height*(100-this.saturationPos)/100+"px"})}},{key:"updateSaturationBackground",value:function(t){var e=this.find(".color-picker-saturation .color-picker-overlay"),i=this.options.horizontal?"right":"bottom",n=this.getColorValue(this.options.dynamicSaturation),r=this.getColorValue(this.options.dynamicSaturation);n.s="100%",r.s="0%",e.css({background:"linear-gradient(to "+i+", "+o(n).toRgbString()+" 0%, "+o(r).toRgbString()+" 100%)"})}},{key:"lightnessPosUpdate",value:function(){var o;this.options.round||(o=angular.element(this.$element[0].querySelector(".color-picker-grid .color-picker-picker"))).css({top:this.pickerDimensions.width*this.lightnessPos/100+"px"}),o=angular.element(this.$element[0].querySelector(".color-picker-lightness .color-picker-slider")),this.options.horizontal?o.css({left:this.sliderDimensions.width*this.lightnessPos/100+"px",top:0}):o.css({left:0,top:this.sliderDimensions.height*this.lightnessPos/100+"px"})}},{key:"updateLightnessBackground",value:function(t){var e=this.find(".color-picker-lightness .color-picker-overlay"),i=this.options.horizontal?"right":"bottom",n=this.getColorValue(this.options.dynamicLightness),r=this.getColorValue(this.options.dynamicLightness),s=this.getColorValue(this.options.dynamicLightness);this.options.round?(n.l=100,r.l=50,s.l=0):(n.v=100,r.v=50,s.v=0),e.css({background:"linear-gradient(to "+i+", "+o(n).toRgbString()+" 0%, "+o(r).toRgbString()+" 50%, "+o(s).toRgbString()+" 100%)"})}},{key:"opacityPosUpdate",value:function(){var o=angular.element(this.$element[0].querySelector(".color-picker-opacity .color-picker-slider"));this.options.horizontal?o.css({left:this.sliderDimensions.width*this.opacityPos/100+"px",top:0}):o.css({left:0,top:this.sliderDimensions.height*this.opacityPos/100+"px"})}},{key:"updateOpacityBackground",value:function(t){var e=this.find(".color-picker-opacity .color-picker-overlay"),i=this.options.horizontal?"right":"bottom",n=this.getColorValue(this.options.dynamicAlpha),r=this.getColorValue(this.options.dynamicAlpha);n.a=1,r.a=0,e.css({background:"linear-gradient(to "+i+", "+o(n).toRgbString()+" 0%, "+o(r).toRgbString()+" 100%)"})}},{key:"colorChange",value:function(o){this.stopEvent(o);var t=this.find(".color-picker-grid-inner"),e=this.getEventPos(o),i=this.offset(t);this.options.round?this.colorChangeRound(t,i,e):this.colorChangeSquare(t,i,e)}},{key:"colorChangeRound",value:function(o,t,e){var i=2*(e.pageX-t.left)/o.prop("offsetWidth")-1,n=-2*(e.pageY-t.top)/o.prop("offsetHeight")+1,r=Math.atan2(n,i),s=Math.round(57.29577951308233*r);s<0&&(s+=360),this.hue=s;var l=Math.sqrt(i*i+n*n);l>1?l=1:l<0&&(l=0),this.saturation=100*l,void 0===this.lightness&&(this.lightness=50)}},{key:"colorChangeSquare",value:function(o,t,e){this.saturation=(e.pageX-t.left)/o.prop("offsetWidth")*100,this.lightness=100*(1-(e.pageY-t.top)/o.prop("offsetHeight")),this.saturation>100?this.saturation=100:this.saturation<0&&(this.saturation=0),this.lightness>100?this.lightness=100:this.lightness<0&&(this.lightness=0)}},{key:"updateGridBackground",value:function(t){var e=this.find(".color-picker-grid .color-picker-overlay"),i=this.getColorValue();this.options.round?i.s="0%":(i.s="100%",i.v="100%",i.a=1),e.css({"background-color":o(i).toRgbString(),opacity:t.getAlpha()}),this.find(".color-picker-grid .color-picker-grid-inner").css({opacity:t.getAlpha()})}},{key:"updateSwatchBackground",value:function(){angular.element(this.$element[0].querySelector(".color-picker-swatch")).css({"background-color":this.swatchColor})}},{key:"isColorValid",value:function(o){var t=o.isValid();if(t&&this.options.restrictToFormat&&(t=o.getFormat()===this.getTinyColorFormat()),!t&&this.options.allowEmpty){var e=o.getOriginalInput();void 0!==e&&null!==e&&""!==e||(t=!0)}return t}},{key:"getTinyColorFormat",value:function(){return"hexString"===this.options.format?"hex":"hex8String"===this.options.format?"hex8":this.options.format}},{key:"areAllValuesSet",value:function(){return void 0!==this.hue&&void 0!==this.saturation&&void 0!==this.lightness}},{key:"getColorValue",value:function(){var o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],e={h:this.hue,s:o?this.saturation+"%":"100%",v:o?this.lightness+"%":"100%"};return this.options.round&&(e={h:this.hue,s:o?this.saturation+"%":"100%",l:o?this.lightness+"%":"50%"}),t&&(e.a=o?this.opacity/100:1),e}},{key:"setColorValue",value:function(o){var t=!this.anyMouseEvents(),e=this.options.round?o.toHsl():o.toHsv();(t||this.hueMouse)&&(this.hue=e.h),(t||this.saturationMouse)&&(this.saturation=100*e.s),(t||this.lightnessMouse)&&(this.lightness=100*(this.options.round?e.l:e.v)),this.options.alpha&&(t||this.opacityMouse)&&(this.opacity=100*e.a)}},{key:"checkDirty",value:function(o){this.hasOwnProperty("initialNgModel")&&(o===this.initialNgModel?"function"==typeof this.$scope.control[0].$setPristine&&this.$scope.control[0].$setPristine():"function"==typeof this.$scope.control[0].$setDirty&&this.$scope.control[0].$setDirty())}},{key:"stopEvent",value:function(o){o.stopPropagation(),o.preventDefault()}},{key:"getRoundPos",value:function(){var o=.01745329251994*this.hue,t=Math.cos(o)*this.saturation,e=-Math.sin(o)*this.saturation;this.xPos=.5*(t+100),this.yPos=.5*(e+100);if(Math.pow(50-this.xPos,2)+Math.pow(50-this.yPos,2)>Math.pow(50,2)){var i=Math.atan2(this.yPos-50,this.xPos-50);this.xPos=50*Math.cos(i)+50,this.yPos=50*Math.sin(i)+50}}},{key:"updateRoundPos",value:function(){angular.element(this.$element[0].querySelector(".color-picker-grid .color-picker-picker")).css({left:this.pickerDimensions.width*this.xPos/100+"px",top:this.pickerDimensions.height*this.yPos/100+"px"})}},{key:"getEventPos",value:function(o){if(0===o.type.search("touch")){if(o.originalEvent&&o.originalEvent.changedTouches)return o.originalEvent.changedTouches[0];if(o.changedTouches)return o.changedTouches[0]}return o}},{key:"calculateSliderPos",value:function(o,t,e){return this.options.horizontal?Math.round((1-(t.pageX-this.offset(o).left)/o.prop("offsetWidth"))*e):Math.round((1-(t.pageY-this.offset(o).top)/o.prop("offsetHeight"))*e)}},{key:"eventApiDispatch",value:function(o,t){this.eventApi&&"function"==typeof this.eventApi[o]&&(t||(t=[]),t.unshift(this.internalNgModel),t.unshift(this.api),this.eventApi[o].apply(this,t))}},{key:"find",value:function(o){var t,e=this.wrapper?this.wrapper[0]:this.$element[0],i=[];if(!o)return i;if("string"==typeof o){if(1!==(t=e.nodeType)&&9!==t)return[];i=e.querySelectorAll(o)}else e.contains(o)&&i.push(o);return angular.element(i)}},{key:"offset",value:function(o){var t,e,i,n,r=o[0];if(r)return r.getClientRects().length?(i=r.getBoundingClientRect()).width||i.height?(n=r.ownerDocument,e=this.getWindowElements(n),t=n.documentElement,this.chrome&&this.android_version<6&&screen.width<=768?{top:i.top-t.clientTop,left:i.left-t.clientLeft}:{top:i.top+e.pageYOffset-t.clientTop,left:i.left+e.pageXOffset-t.clientLeft}):i:{top:0,left:0}}},{key:"getWindowElements",value:function(o){return null!==o&&o===o.window?o:9===o.nodeType&&o.defaultView}},{key:"anyMouseEvents",value:function(){return this.colorMouse||this.hueMouse||this.saturationMouse||this.lightnessMouse||this.opacityMouse}},{key:"getMaxFromType",value:function(o){return"hue"===o?360:100}}]),t}();r.$inject=["$scope","$element","$document","$timeout","ColorPickerOptions"],t.$inject=["$templateCache"];return angular.module("color.picker",[]).service("ColorPickerOptions",function o(){return i(this,o),{id:void 0,name:void 0,required:!1,disabled:!1,placeholder:"",inputClass:"",restrictToFormat:!1,preserveInputFormat:!1,allowEmpty:!1,format:"hsl",case:"upper",hue:!0,saturation:!1,lightness:!1,alpha:!0,dynamicHue:!0,dynamicSaturation:!0,dynamicLightness:!0,dynamicAlpha:!0,round:!1,pos:"bottom left",inline:!1,horizontal:!1,swatch:!0,swatchOnly:!1,swatchPos:"left",swatchBootstrap:!0,show:{swatch:!0,focus:!0},hide:{blur:!0,escape:!0,click:!0},close:{show:!1,label:"Close",class:""},clear:{show:!1,label:"Clear",class:""},reset:{show:!1,label:"Reset",class:""}}}).directive("colorPicker",function(){return{restrict:"E",require:["^ngModel"],scope:{ngModel:"=",options:"=?",api:"=?",eventApi:"=?"},bindToController:!0,templateUrl:"template/color-picker/directive.html",controller:r,controllerAs:"AngularColorPickerController",link:function(o,t,e,i){o.control=i,o.init()}}}).run(t)}); -//this is an empty file so that the gulp build task doesn't fail -/*! - * SVG Morpheus v0.3.0 - * https://github.com/alexk111/SVG-Morpheus - * - * Copyright (c) 2016 Alex Kaul - * License: MIT - * - * Generated at Saturday, May 7th, 2016, 4:52:57 PM - */ -var SVGMorpheus=function(){"use strict";var t={"circ-in":function(t){return-1*(Math.sqrt(1-t*t)-1)},"circ-out":function(t){return Math.sqrt(1-(t-=1)*t)},"circ-in-out":function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},"cubic-in":function(t){return t*t*t},"cubic-out":function(t){return--t*t*t+1},"cubic-in-out":function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},"elastic-in":function(t){var e=1.70158,r=0,a=1;if(0==t)return 0;if(1==t)return 1;if(r||(r=.3),aa;a+=2){var o=[{x:+t[a-2],y:+t[a-1]},{x:+t[a],y:+t[a+1]},{x:+t[a+2],y:+t[a+3]},{x:+t[a+4],y:+t[a+5]}];e?a?s-4==a?o[3]={x:+t[0],y:+t[1]}:s-2==a&&(o[2]={x:+t[0],y:+t[1]},o[3]={x:+t[2],y:+t[3]}):o[0]={x:+t[s-2],y:+t[s-1]}:s-4==a?o[3]=o[2]:a||(o[0]={x:+t[a],y:+t[a+1]}),r.push(["C",(-o[0].x+6*o[1].x+o[2].x)/6,(-o[0].y+6*o[1].y+o[2].y)/6,(o[1].x+6*o[2].x-o[3].x)/6,(o[1].y+6*o[2].y-o[3].y)/6,o[2].x,o[2].y])}return r},f=function(t,e,r,a,s){if(null==s&&null==a&&(a=r),t=+t,e=+e,r=+r,a=+a,null!=s)var o=Math.PI/180,n=t+r*Math.cos(-a*o),i=t+r*Math.cos(-s*o),c=[["M",n,e+r*Math.sin(-a*o)],["A",r,r,0,+(s-a>180),0,i,e+r*Math.sin(-s*o)]];else c=[["M",t,e],["m",0,-a],["a",r,a,0,1,1,0,2*a],["a",r,a,0,1,1,0,-2*a],["z"]];return c},m=function(t){if(!(t=function(t){if(!t)return null;if(typeof t==typeof[])return t;var e={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},r=[];return String(t).replace(u,(function(t,a,s){var o=[],n=a.toLowerCase();if(s.replace(l,(function(t,e){e&&o.push(+e)})),"m"==n&&o.length>2&&(r.push([a].concat(o.splice(0,2))),n="l",a="m"==a?"l":"L"),"o"==n&&1==o.length&&r.push([a,o[0]]),"r"==n)r.push([a].concat(o));else for(;o.length>=e[n]&&(r.push([a].concat(o.splice(0,e[n]))),e[n]););})),r}(t))||!t.length)return[["M",0,0]];var e,r=[],a=0,s=0,o=0,n=0,i=0;"M"==t[0][0]&&(o=a=+t[0][1],n=s=+t[0][2],i++,r[0]=["M",a,s]);for(var c,h,m=3==t.length&&"M"==t[0][0]&&"R"==t[1][0].toUpperCase()&&"Z"==t[2][0].toUpperCase(),y=i,I=t.length;y1&&(r*=_=Math.sqrt(_),a*=_);var g=r*r,M=a*a,b=(o==n?-1:1)*Math.sqrt(Math.abs((g*M-g*I*I-M*y*y)/(g*I*I+M*y*y))),v=b*r*I/a+(t+i)/2,x=b*-a*y/r+(e+c)/2,w=Math.asin(((e-x)/a).toFixed(9)),k=Math.asin(((c-x)/a).toFixed(9));w=tk&&(w-=2*Math.PI),!n&&k>w&&(k-=2*Math.PI)}var A=k-w;if(Math.abs(A)>l){var C=k,N=i,q=c;k=w+l*(n&&k>w?1:-1),i=v+r*Math.cos(k),c=x+a*Math.sin(k),f=d(i,c,r,a,s,0,n,N,q,[k,C,v,x])}A=k-w;var P=Math.cos(w),F=Math.sin(w),E=Math.cos(k),S=Math.sin(k),D=Math.tan(A/4),G=4/3*r*D,L=4/3*a*D,T=[t,e],V=[t+G*F,e-L*P],R=[i+G*S,c-L*E],U=[i,c];if(V[0]=2*T[0]-V[0],V[1]=2*T[1]-V[1],h)return[V,R,U].concat(f);for(var z=[],O=0,j=(f=[V,R,U].concat(f).join().split(",")).length;O7){t[e].shift();for(var s=t[e];s.length;)h[e]="A",a&&(u[e]="A"),t.splice(e++,0,["C"].concat(s.splice(0,6)));t.splice(e,1),_=Math.max(r.length,a&&a.length||0)}},c=function(t,e,s,o,n){t&&e&&"M"==t[n][0]&&"M"!=e[n][0]&&(e.splice(n,0,["M",o.x,o.y]),s.bx=0,s.by=0,s.x=t[n][1],s.y=t[n][2],_=Math.max(r.length,a&&a.length||0))},h=[],u=[],l="",p="",f=0,_=Math.max(r.length,a&&a.length||0);f<_;f++){r[f]&&(l=r[f][0]),"C"!=l&&(h[f]=l,f&&(p=h[f-1])),r[f]=n(r[f],s,p),"A"!=h[f]&&"C"==l&&(h[f]="C"),i(r,f),a&&(a[f]&&(l=a[f][0]),"C"!=l&&(u[f]=l,f&&(p=u[f-1])),a[f]=n(a[f],o,p),"A"!=u[f]&&"C"==l&&(u[f]="C"),i(a,f)),c(r,a,s,o,f),c(a,r,o,s,f);var g=r[f],M=a&&a[f],b=g.length,v=a&&M.length;s.x=g[b-2],s.y=g[b-1],s.bx=parseFloat(g[b-4])||s.x,s.by=parseFloat(g[b-3])||s.y,o.bx=a&&(parseFloat(M[v-4])||o.x),o.by=a&&(parseFloat(M[v-3])||o.y),o.x=a&&M[v-2],o.y=a&&M[v-1]}return a?[r,a]:r},g=function(t,e,r,a,s,o,n,i){for(var c,h,u,l,p,f,m,y,I=[],d=[[],[]],_=0;_<2;++_)if(0==_?(h=6*t-12*r+6*s,c=-3*t+9*r-9*s+3*n,u=3*r-3*t):(h=6*e-12*a+6*o,c=-3*e+9*a-9*o+3*i,u=3*a-3*e),Math.abs(c)<1e-12){if(Math.abs(h)<1e-12)continue;0<(l=-u/h)&&l<1&&I.push(l)}else m=h*h-4*u*c,y=Math.sqrt(m),m<0||(0<(p=(-h+y)/(2*c))&&p<1&&I.push(p),0<(f=(-h-y)/(2*c))&&f<1&&I.push(f));for(var g,M=I.length,b=M;M--;)g=1-(l=I[M]),d[0][M]=g*g*g*t+3*g*g*l*r+3*g*l*l*s+l*l*l*n,d[1][M]=g*g*g*e+3*g*g*l*a+3*g*l*l*o+l*l*l*i;return d[0][b]=t,d[1][b]=e,d[0][b+1]=n,d[1][b+1]=i,d[0].length=d[1].length=b+2,{min:{x:Math.min.apply(0,d[0]),y:Math.min.apply(0,d[1])},max:{x:Math.max.apply(0,d[0]),y:Math.max.apply(0,d[1])}}},M=function(t){for(var e,r=0,a=0,s=[],o=[],n=0,i=t.length;n1||e>1||r>1)&&(t/=360,e/=100,r/=100),t=(t*=360)%360/60,i=(c=2*e*(r<.5?r:1-r))*(1-Math.abs(t%2-1)),s=o=n=r-c/2,C(s+=[c,i,0,0,i,c][t=~~t],o+=[i,c,c,i,0,0][t],n+=[0,0,i,c,c,i][t],a)}(e,r,a,s)):(e=Math.min(Math.round(e),255),r=Math.min(Math.round(r),255),a=Math.min(Math.round(a),255),s=Math.min(Math.max(s,0),1),(I={r:e,g:r,b:a}).opacity=isFinite(s)?s:1,I)):{r:-1,g:-1,b:-1,opacity:-1,error:1}};function q(t,r,a){if(!t)throw new Error('SVGMorpheus > "element" is required');if("string"==typeof t&&!(t=document.querySelector(t)))throw new Error('SVGMorpheus > "element" query is not related to an existing DOM node');if(r&&typeof r!=typeof{})throw new Error('SVGMorpheus > "options" parameter must be an object');if(r=r||{},a&&"function"!=typeof a)throw new Error('SVGMorpheus > "callback" parameter must be a function');var s=this;this._icons={},this._curIconId=r.iconId||"",this._toIconId="",this._curIconItems=[],this._fromIconItems=[],this._toIconItems=[],this._morphNodes=[],this._morphG,this._startTime,this._defDuration=r.duration||750,this._defEasing=r.easing||"quad-in-out",this._defRotation=r.rotation||"clock",this._defCallback=a||function(){},this._duration=this._defDuration,this._easing=this._defEasing,this._rotation=this._defRotation,this._callback=this._defCallback,this._rafid,this._fnTick=function(t){s._startTime||(s._startTime=t);var r=Math.min((t-s._startTime)/s._duration,1);s._updateAnimationProgress(r),r<1?s._rafid=e(s._fnTick):""!=s._toIconId&&s._animationEnd()},"SVG"===t.nodeName.toUpperCase()?this._svgDoc=t:this._svgDoc=t.getSVGDocument(),this._svgDoc?s._init():t.addEventListener("load",(function(){s._svgDoc=t.getSVGDocument(),s._init()}),!1)}return q.prototype._init=function(){if("SVG"!==this._svgDoc.nodeName.toUpperCase()&&(this._svgDoc=this._svgDoc.getElementsByTagName("svg")[0]),this._svgDoc){var t,e,r,a,s,o,n,i="";for(t=this._svgDoc.childNodes.length-1;t>=0;t--){var c=this._svgDoc.childNodes[t];if("G"===c.nodeName.toUpperCase()&&(e=c.getAttribute("id"))){for(r=[],s=0,o=c.childNodes.length;s0&&(n={id:e,items:r},this._icons[e]=n),this._morphG?this._svgDoc.removeChild(c):(i=e,this._morphG=document.createElementNS("http://www.w3.org/2000/svg","g"),this._svgDoc.replaceChild(this._morphG,c))}}var S=this._curIconId||i;""!==S&&(this._setupAnimation(S),this._updateAnimationProgress(1),this._animationEnd())}},q.prototype._setupAnimation=function(t){if(t&&this._icons[t]){var e,r;for(this._toIconId=t,this._startTime=void 0,this._fromIconItems=c(this._curIconItems),this._toIconItems=c(this._icons[t].items),e=0,r=this._morphNodes.length;e=0;t--){var e=this._morphNodes[t];this._icons[this._toIconId].items[t]?e.node.setAttribute("d",this._icons[this._toIconId].items[t].path):(e.node.parentNode.removeChild(e.node),this._morphNodes.splice(t,1))}this._curIconId=this._toIconId,this._toIconId="",this._callback()},q.prototype.to=function(t,a,s){if(t!==this._toIconId){if(a&&typeof a!=typeof{})throw new Error('SVGMorpheus.to() > "options" parameter must be an object');if(a=a||{},s&&"function"!=typeof s)throw new Error('SVGMorpheus.to() > "callback" parameter must be a function');r(this._rafid),this._duration=a.duration||this._defDuration,this._easing=a.easing||this._defEasing,this._rotation=a.rotation||this._defRotation,this._callback=s||this._defCallback,this._setupAnimation(t),this._rafid=e(this._fnTick)}},q.prototype.registerEasing=function(e,r){t[e]=r},q}(); -!function(t,n){"function"==typeof define&&define.amd?define(["raphael"],(function(e){return t.JustGage=n(e)})):"object"==typeof module&&module.exports?module.exports=t.JustGage=n(require("raphael")):t.JustGage=n(Raphael)}("undefined"!=typeof window?window:this,(function(t){const n=function(n){const e=this;if(e.events={},o(n))return console.log("* justgage: Make sure to pass options to the constructor!"),!1;if(o(n.id)){if(o(n.parentNode))return console.log("* justgage: Make sure to pass the existing element id or parentNode to the constructor."),!1;e.node=n.parentNode}else if(e.node=document.getElementById(n.id),!e.node)return console.log("* justgage: No element with id : %s found",n.id),!1;const r=e.node.dataset?e.node.dataset:{},c=!o(n.defaults)&&n.defaults;let d,p,x,h,b,M,v,y,F,S,w,A,z,V,T,C,N,O,L;!1!==c&&(n=function(t){t=t||{};for(let n=1;n"),refreshAnimationTime:i("refreshAnimationTime",n,r,700),refreshAnimationType:i("refreshAnimationType",n,r,">"),donutStartAngle:i("donutStartAngle",n,r,90),valueMinFontSize:i("valueMinFontSize",n,r,16),labelMinFontSize:i("labelMinFontSize",n,r,10),minLabelMinFontSize:i("minLabelMinFontSize",n,r,10),maxLabelMinFontSize:i("maxLabelMinFontSize",n,r,10),hideValue:i("hideValue",n,r,!1),hideMinMax:i("hideMinMax",n,r,!1),showInnerShadow:i("showInnerShadow",n,r,!1),humanFriendly:i("humanFriendly",n,r,!1),noGradient:i("noGradient",n,r,!1),donut:i("donut",n,r,!1),differential:i("differential",n,r,!1),relativeGaugeSize:i("relativeGaugeSize",n,r,!1),counter:i("counter",n,r,!1),decimals:i("decimals",n,r,0),customSectors:i("customSectors",n,r,{}),formatNumber:i("formatNumber",n,r,!1),pointer:i("pointer",n,r,!1),pointerOptions:i("pointerOptions",n,r,{}),displayRemaining:i("displayRemaining",n,r,!1)},e.config.value>e.config.max&&(e.config.value=e.config.max),e.config.valuep?(h=p,x=h):(x=d,h=x),M=(d-x)/2,v=(p-h)/2,y=h/6.4>16?h/5.4:18,F=M+x/2,S=""!==e.config.label?v+h/1.85:v+h/1.7,w=h/16>10?h/16:10,A=M+x/2,z=S+w,V=h/16>10?h/16:10,T=M+x/10+x/6.666666666666667*e.config.gaugeWidthScale/2,C=z,N=h/16>10?h/16:10,O=M+x-x/10-x/6.666666666666667*e.config.gaugeWidthScale/2,L=z):(d>p?(h=p,x=2*h,x>d&&(b=x/d,x/=b,h/=b)):de.config.valueMinFontSize?h/6.5:e.config.valueMinFontSize,F=M+x/2,S=v+h/1.275,w=h/16>e.config.labelMinFontSize?h/16:e.config.labelMinFontSize,A=M+x/2,z=S+y/2+5,V=h/16>e.config.minLabelMinFontSize?h/16:e.config.minLabelMinFontSize,T=M+x/10+x/6.666666666666667*e.config.gaugeWidthScale/2,C=z,N=h/16>e.config.maxLabelMinFontSize?h/16:e.config.maxLabelMinFontSize,O=M+x-x/10-x/6.666666666666667*e.config.gaugeWidthScale/2,L=z),e.params={canvasW:d,canvasH:p,widgetW:x,widgetH:h,dx:M,dy:v,valueFontSize:y,valueX:F,valueY:S,labelFontSize:w,labelX:A,labelY:z,minFontSize:V,minX:T,minY:C,maxFontSize:N,maxX:O,maxY:L},e.canvas.customAttributes.pki=function(t,n){let i=e.config.min,o=e.config.max;const a=e.params.widgetW,l=e.params.widgetH,r=e.params.dx,c=e.params.dy,s=e.config.gaugeWidthScale;let f,m,g,u,d,p,x,h,b,M,v,y;if(i<0&&!n&&(o-=i,t-=i,i=0),e.config.donut)return f=(1-2*(t-i)/(o-i))*Math.PI,m=a/2-a/30,g=m-a/6.666666666666667*s,u=a/2+r,d=l/2+c,h=u+m*Math.cos(f),b=d-m*Math.sin(f),M=u+g*Math.cos(f),v=d-g*Math.sin(f),y="M"+(u-g)+","+d+" ",y+="L"+(u-m)+","+d+" ",t-i>(o-i)/2&&(y+="A"+m+","+m+" 0 0 1 "+(u+m)+","+d+" "),y+="A"+m+","+m+" 0 0 1 "+h+","+b+" ",y+="L"+M+","+v+" ",t-i>(o-i)/2&&(y+="A"+g+","+g+" 0 0 0 "+(u+g)+","+d+" "),y+="A"+g+","+g+" 0 0 0 "+(u-g)+","+d+" ",y+="Z ",{path:y};if(n){f=(1-(t-i)/(o-i))*Math.PI,m=a/2-a/10,g=m-a/6.666666666666667*s,u=a/2+r,d=l/1.25+c,h=u+m*Math.cos(f),b=d-m*Math.sin(f),M=u+g*Math.cos(f),v=d-g*Math.sin(f);const n=i+(o-i)/2;return p=t0;if(i=i||h,h){!0===o.percents&&(t=100*n);for(let n=0;n=o.ranges[n].lo&&t<=o.ranges[n].hi)return o.ranges[n].color}const b=e.length;if(1===b)return e[0];const M=i?1/b:1/(b-1),v=[];for(let t=0;t9)&&t.node.firstChild.attributes.dy&&(t.node.firstChild.attributes.dy.value=0)}function r(t){return"#"===t.charAt(0)?t.substring(1,7):t}function c(t){return"string"==typeof t&&/^#([0-9A-Fa-f]{3}){1,2}$/.test(t)}function s(t,n){const e=Math.pow(10,n),i=" KMGTPE";let o=0;const a=1e3;for(;(t>=a||t<=-a)&&++o=i.length?i.length-1:o,Math.round(t*e)/e+i[o]}function f(t){const n=t.toString().split(".");return n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),n.join(".")}function m(t,n){let e="";return document.defaultView&&document.defaultView.getComputedStyle?e=document.defaultView.getComputedStyle(t,"").getPropertyValue(n):t.currentStyle&&(n=n.replace(/-(\w)/g,(function(t,n){return n.toUpperCase()})),e=t.currentStyle[n]),e}function g(t){void 0!==document.createElementNS?t():setTimeout((function(){g(t)}),100)}n.prototype.bindEvent=function(n,e){n+="."+this.level.id,this.events[n]&&t.eve.off(n,this.events[n]),t.eve.on(n,e),this.events[n]=e},n.prototype.refresh=function(t,n,e,i){const o=this;let r;n=d(n)?n:null,e=d(e)?e:null,null!==(i=i||null)&&(o.config.label=i,o.txtLabel.attr({text:o.config.label}),l(o.txtLabel,o.params.labelFontSize,o.params.labelY)),null!==e&&(o.config.min=e,o.txtMinimum=o.config.min,o.config.minTxt?o.txtMinimum=o.config.minTxt:o.config.humanFriendly?o.txtMinimum=s(o.config.min,o.config.humanFriendlyDecimal):o.config.formatNumber&&(o.txtMinimum=f(o.config.min)),o.config.reverse?(o.txtMax.attr({text:o.txtMinimum}),l(o.txtMax,o.params.minFontSize,o.params.minY)):(o.txtMin.attr({text:o.txtMinimum}),l(o.txtMin,o.params.minFontSize,o.params.minY))),null!==n&&(o.config.max=n,o.txtMaximum=o.config.max,o.config.maxTxt?o.txtMaximum=o.config.maxTxt:o.config.humanFriendly?o.txtMaximum=s(o.config.max,o.config.humanFriendlyDecimal):o.config.formatNumber&&(o.txtMaximum=f(o.config.max)),o.config.reverse?(o.txtMin.attr({text:o.txtMaximum}),l(o.txtMin,o.params.maxFontSize,o.params.maxY)):(o.txtMax.attr({text:o.txtMaximum}),l(o.txtMax,o.params.maxFontSize,o.params.maxY))),r=t,1*t>1*o.config.max&&(t=1*o.config.max),1*t<1*o.config.min&&(t=1*o.config.min);const c=a(t,(t-o.config.min)/(o.config.max-o.config.min),o.config.levelColors,o.config.noGradient,o.config.customSectors);r=o.config.textRenderer&&!1!==o.config.textRenderer(r)?o.config.textRenderer(r):o.config.humanFriendly?s(r,o.config.humanFriendlyDecimal)+o.config.symbol:o.config.formatNumber?f((1*r).toFixed(o.config.decimals))+o.config.symbol:o.config.displayRemaining?(1*(o.config.max-r)).toFixed(o.config.decimals)+o.config.symbol:(1*r).toFixed(o.config.decimals)+o.config.symbol,o.originalValue=r,o.config.value=1*t,o.config.counter||(o.txtValue.attr({text:r}),l(o.txtValue,o.params.valueFontSize,o.params.valueY));let m=o.config.value;o.config.reverse&&(m=1*o.config.max+1*o.config.min-1*o.config.value),o.level.animate({pki:[m,o.config.differential],fill:c},o.config.refreshAnimationTime,o.config.refreshAnimationType,o.config.onAnimationEnd),o.config.pointer&&o.needle.animate({ndl:[m]},o.config.refreshAnimationTime,o.config.refreshAnimationType)},n.prototype.update=function(t,n){const i=this;if(t instanceof Object)for(const o in t)e(i,o,n=t[o]);else e(i,t,n)},n.prototype.destroy=function(){this.node&&this.node.parentNode&&(this.node.innerHTML="");for(const n in this.events)t.eve.off(n,this.events[n]);this.events={}},n.prototype.generateShadow=function(t,n){const e=this,i="inner-shadow-"+(e.config.id||e.config.classId),o=document.createElementNS(t,"filter");o.setAttribute("id",i),n.appendChild(o);const a=document.createElementNS(t,"feOffset");a.setAttribute("dx",0),a.setAttribute("dy",e.config.shadowVerticalOffset),o.appendChild(a);const l=document.createElementNS(t,"feGaussianBlur");l.setAttribute("result","offset-blur"),l.setAttribute("stdDeviation",e.config.shadowSize),o.appendChild(l);const r=document.createElementNS(t,"feComposite");r.setAttribute("operator","out"),r.setAttribute("in","SourceGraphic"),r.setAttribute("in2","offset-blur"),r.setAttribute("result","inverse"),o.appendChild(r);const c=document.createElementNS(t,"feFlood");c.setAttribute("flood-color","black"),c.setAttribute("flood-opacity",e.config.shadowOpacity),c.setAttribute("result","color"),o.appendChild(c);const s=document.createElementNS(t,"feComposite");s.setAttribute("operator","in"),s.setAttribute("in","color"),s.setAttribute("in2","inverse"),s.setAttribute("result","shadow"),o.appendChild(s);const f=document.createElementNS(t,"feComposite");f.setAttribute("operator","over"),f.setAttribute("in","shadow"),f.setAttribute("in2","SourceGraphic"),o.appendChild(f),e.config.showInnerShadow&&(e.canvas.canvas.childNodes[2].setAttribute("filter","url(#"+i+")"),e.canvas.canvas.childNodes[3].setAttribute("filter","url(#"+i+")"))};const u=function(){let t=3;const n=document.createElement("div"),e=n.getElementsByTagName("i");for(;e[0];)n.innerHTML="\x3c!--[if gt IE "+ ++t+"]>4?t:void 0}();function d(t){return null!=t&&!isNaN(t)}return n})); -/*! - * @license Open source under BSD 2-clause (http://choosealicense.com/licenses/bsd-2-clause/) - * Copyright (c) 2015, Curtis Bratton - * All rights reserved. - * - * Liquid Fill Gauge v1.1 - */ -function liquidFillGaugeDefaultSettings(){return{minValue:0,maxValue:100,circleThickness:.05,circleFillGap:.05,circleColor:"#178BCA",waveHeight:.05,waveCount:1,waveRiseTime:1e3,waveAnimateTime:18e3,waveRise:!0,waveHeightScaling:!0,waveAnimate:!0,waveColor:"#178BCA",waveOffset:0,textVertPosition:.5,textSize:.8,valueCountUp:!0,displayPercent:!1,textColor:"#045681",waveTextColor:"#A4DBf8"}}function loadLiquidFillGauge(t,a,e){null==e&&(e=liquidFillGaugeDefaultSettings());var n=d3.select("#"+t);n.selectAll("g").remove();var r,i=Math.min(parseInt(n.style("width")),parseInt(n.style("height")))/2,l=parseInt(n.style("width"))/2-i,o=parseInt(n.style("height"))/2-i,s=Math.max(e.minValue,Math.min(e.maxValue,a))/e.maxValue;r=e.waveHeightScaling?d3.scale.linear().range([0,e.waveHeight,0]).domain([0,50,100]):d3.scale.linear().range([e.waveHeight,e.waveHeight]).domain([0,100]);var u=e.textSize*i/2,d=parseFloat(a).toFixed(2),c=e.valueCountUp?e.minValue:d,m=e.units||"",v=e.circleThickness*i,p=v+e.circleFillGap*i,f=i-p,x=f*r(100*s),h=2*f/e.waveCount,w=1+e.waveCount,g=h*w,F=function(t){return Math.round(t)};parseFloat(d)!=parseFloat(F(d))&&(F=function(t){return parseFloat(t).toFixed(1)}),parseFloat(d)!=parseFloat(F(d))&&(F=function(t){return parseFloat(t).toFixed(2)});for(var T=[],C=0;C<=40*w;C++)T.push({x:C/(40*w),y:C/40});var y=d3.scale.linear().range([0,2*Math.PI]).domain([0,1]),A=d3.scale.linear().range([0,i]).domain([0,i]),M=d3.scale.linear().range([0,g]).domain([0,1]),P=d3.scale.linear().range([0,x]).domain([0,1]),R=d3.scale.linear().range([p+2*f+x,p-x]).domain([0,1]),V=d3.scale.linear().range([0,g-2*f]).domain([0,1]),I=d3.scale.linear().range([p+2*f,p+.7*u]).domain([0,1]),G=n.append("g").attr("transform","translate("+l+","+o+")"),H=d3.svg.arc().startAngle(y(0)).endAngle(y(1)).outerRadius(A(i)).innerRadius(A(i-v));G.append("path").attr("d",H).style("fill",e.circleColor).attr("transform","translate("+i+","+i+")");var S=G.append("text").text(F(c)+m).attr("class","liquidFillGaugeText").attr("text-anchor","middle").attr("font-size",u+"px").style("fill",e.textColor).attr("transform","translate("+i+","+I(e.textVertPosition)+")"),q=d3.svg.area().x((function(t){return M(t.x)})).y0((function(t){return P(Math.sin(2*Math.PI*e.waveOffset*-1+2*Math.PI*(1-e.waveCount)+2*t.y*Math.PI))})).y1((function(t){return 2*f+x})),z=G.append("defs").append("clipPath").attr("id","clipWave"+t),B=z.append("path").datum(T).attr("d",q).attr("T",0),D=G.append("g").attr("clip-path","url(#clipWave"+t+")");D.append("circle").attr("cx",i).attr("cy",i).attr("r",f).style("fill",e.waveColor);var O=D.append("text").text(F(c)+m).attr("class","liquidFillGaugeText").attr("text-anchor","middle").attr("font-size",u+"px").style("fill",e.waveTextColor).attr("transform","translate("+i+","+I(e.textVertPosition)+")");if(e.valueCountUp){var U=function(){var t=d3.interpolate(this.textContent,d);return function(a){this.textContent=F(t(a))+m}};S.transition().duration(e.waveRiseTime).tween("text",U),O.transition().duration(e.waveRiseTime).tween("text",U)}var k=p+2*f-g;function W(){B.attr("transform","translate("+V(B.attr("T"))+",0)"),B.transition().duration(e.waveAnimateTime*(1-B.attr("T"))).ease("linear").attr("transform","translate("+V(1)+",0)").attr("T",1).each("end",(function(){B.attr("T",0),W(e.waveAnimateTime)}))}return e.waveRise?z.attr("transform","translate("+k+","+R(0)+")").transition().duration(e.waveRiseTime).attr("transform","translate("+k+","+R(s)+")").each("start",(function(){B.attr("transform","translate(1,0)")})):z.attr("transform","translate("+k+","+R(s)+")"),e.waveAnimate&&W(),new function(){this.update=function(t){var a=parseFloat(t).toFixed(2),n=function(t){return Math.round(t)};parseFloat(a)!=parseFloat(n(a))&&(n=function(t){return parseFloat(t).toFixed(1)}),parseFloat(a)!=parseFloat(n(a))&&(n=function(t){return parseFloat(t).toFixed(2)});var i=function(){var a=d3.interpolate(this.textContent,parseFloat(t).toFixed(2));return function(t){this.textContent=n(a(t))+m}};S.transition().duration(e.waveRiseTime).tween("text",i),O.transition().duration(e.waveRiseTime).tween("text",i);var l,o=Math.max(e.minValue,Math.min(e.maxValue,t))/e.maxValue,s=f*r(100*o),u=d3.scale.linear().range([p+2*f+s,p-s]).domain([0,1])(o),d=d3.scale.linear().range([0,g]).domain([0,1]),c=d3.scale.linear().range([0,s]).domain([0,1]);l=e.waveHeightScaling?d3.svg.area().x((function(t){return d(t.x)})).y0((function(t){return c(Math.sin(2*Math.PI*e.waveOffset*-1+2*Math.PI*(1-e.waveCount)+2*t.y*Math.PI))})).y1((function(t){return 2*f+s})):q;var v=e.waveAnimate?V(1):0;B.transition().duration(0).transition().duration(e.waveAnimate?e.waveAnimateTime*(1-B.attr("T")):e.waveRiseTime).ease("linear").attr("d",l).attr("transform","translate("+v+",0)").attr("T","1").each("end",(function(){e.waveAnimate&&(B.attr("transform","translate("+V(0)+",0)"),W(e.waveAnimateTime))})),z.transition().duration(e.waveRiseTime).attr("transform","translate("+k+","+u+")")}}} -!function(t){function e(t,n){if(n=n||{},(t=t||"")instanceof e)return t;if(!(this instanceof e))return new e(t,n);var a=r(t);this._originalInput=t,this._r=a.r,this._g=a.g,this._b=a.b,this._a=a.a,this._roundA=L(100*this._a)/100,this._format=n.format||a.format,this._gradientType=n.gradientType,this._r<1&&(this._r=L(this._r)),this._g<1&&(this._g=L(this._g)),this._b<1&&(this._b=L(this._b)),this._ok=a.ok,this._tc_id=I++}function r(t){var e={r:0,g:0,b:0},r=1,n=null,a=null,s=null,o=!1,f=!1;return"string"==typeof t&&(t=function(t){t=t.replace(q,"").replace(M,"").toLowerCase();var e,r=!1;if(T[t])t=T[t],r=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};return(e=O.rgb.exec(t))?{r:e[1],g:e[2],b:e[3]}:(e=O.rgba.exec(t))?{r:e[1],g:e[2],b:e[3],a:e[4]}:(e=O.hsl.exec(t))?{h:e[1],s:e[2],l:e[3]}:(e=O.hsla.exec(t))?{h:e[1],s:e[2],l:e[3],a:e[4]}:(e=O.hsv.exec(t))?{h:e[1],s:e[2],v:e[3]}:(e=O.hsva.exec(t))?{h:e[1],s:e[2],v:e[3],a:e[4]}:(e=O.hex8.exec(t))?{r:w(e[1]),g:w(e[2]),b:w(e[3]),a:F(e[4]),format:r?"name":"hex8"}:(e=O.hex6.exec(t))?{r:w(e[1]),g:w(e[2]),b:w(e[3]),format:r?"name":"hex"}:(e=O.hex4.exec(t))?{r:w(e[1]+""+e[1]),g:w(e[2]+""+e[2]),b:w(e[3]+""+e[3]),a:F(e[4]+""+e[4]),format:r?"name":"hex8"}:!!(e=O.hex3.exec(t))&&{r:w(e[1]+""+e[1]),g:w(e[2]+""+e[2]),b:w(e[3]+""+e[3]),format:r?"name":"hex"}}(t)),"object"==typeof t&&(C(t.r)&&C(t.g)&&C(t.b)?(e=function(t,e,r){return{r:255*x(t,255),g:255*x(e,255),b:255*x(r,255)}}(t.r,t.g,t.b),o=!0,f="%"===String(t.r).substr(-1)?"prgb":"rgb"):C(t.h)&&C(t.s)&&C(t.v)?(n=H(t.s),a=H(t.v),e=i(t.h,n,a),o=!0,f="hsv"):C(t.h)&&C(t.s)&&C(t.l)&&(n=H(t.s),s=H(t.l),e=function(t,e,r){function n(t,e,r){return 0>r&&(r+=1),r>1&&(r-=1),1/6>r?t+6*(e-t)*r:.5>r?e:2/3>r?t+(e-t)*(2/3-r)*6:t}var a,i,s;if(t=x(t,360),e=x(e,100),r=x(r,100),0===e)a=i=s=r;else{var o=.5>r?r*(1+e):r+e-r*e,f=2*r-o;a=n(f,o,t+1/3),i=n(f,o,t),s=n(f,o,t-1/3)}return{r:255*a,g:255*i,b:255*s}}(t.h,n,s),o=!0,f="hsl"),t.hasOwnProperty("a")&&(r=t.a)),r=A(r),{ok:o,format:t.format||f,r:N(255,z(e.r,0)),g:N(255,z(e.g,0)),b:N(255,z(e.b,0)),a:r}}function n(t,e,r){t=x(t,255),e=x(e,255),r=x(r,255);var n,a,i=z(t,e,r),s=N(t,e,r),o=(i+s)/2;if(i==s)n=a=0;else{var f=i-s;switch(a=o>.5?f/(2-i-s):f/(i+s),i){case t:n=(e-r)/f+(r>e?6:0);break;case e:n=(r-t)/f+2;break;case r:n=(t-e)/f+4}n/=6}return{h:n,s:a,l:o}}function a(t,e,r){t=x(t,255),e=x(e,255),r=x(r,255);var n,a,i=z(t,e,r),s=N(t,e,r),o=i,f=i-s;if(a=0===i?0:f/i,i==s)n=0;else{switch(i){case t:n=(e-r)/f+(r>e?6:0);break;case e:n=(r-t)/f+2;break;case r:n=(t-e)/f+4}n/=6}return{h:n,s:a,v:o}}function i(e,r,n){e=6*x(e,360),r=x(r,100),n=x(n,100);var a=t.floor(e),i=e-a,s=n*(1-r),o=n*(1-i*r),f=n*(1-(1-i)*r),h=a%6;return{r:255*[n,o,s,s,f,n][h],g:255*[f,n,n,o,s,s][h],b:255*[s,s,f,n,n,o][h]}}function s(t,e,r,n){var a=[S(L(t).toString(16)),S(L(e).toString(16)),S(L(r).toString(16))];return n&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function o(t,e,r,n){return[S(R(n)),S(L(t).toString(16)),S(L(e).toString(16)),S(L(r).toString(16))].join("")}function f(t,r){r=0===r?0:r||10;var n=e(t).toHsl();return n.s-=r/100,n.s=k(n.s),e(n)}function h(t,r){r=0===r?0:r||10;var n=e(t).toHsl();return n.s+=r/100,n.s=k(n.s),e(n)}function l(t){return e(t).desaturate(100)}function u(t,r){r=0===r?0:r||10;var n=e(t).toHsl();return n.l+=r/100,n.l=k(n.l),e(n)}function c(t,r){r=0===r?0:r||10;var n=e(t).toRgb();return n.r=z(0,N(255,n.r-L(-r/100*255))),n.g=z(0,N(255,n.g-L(-r/100*255))),n.b=z(0,N(255,n.b-L(-r/100*255))),e(n)}function g(t,r){r=0===r?0:r||10;var n=e(t).toHsl();return n.l-=r/100,n.l=k(n.l),e(n)}function b(t,r){var n=e(t).toHsl(),a=(n.h+r)%360;return n.h=0>a?360+a:a,e(n)}function d(t){var r=e(t).toHsl();return r.h=(r.h+180)%360,e(r)}function _(t){var r=e(t).toHsl(),n=r.h;return[e(t),e({h:(n+120)%360,s:r.s,l:r.l}),e({h:(n+240)%360,s:r.s,l:r.l})]}function p(t){var r=e(t).toHsl(),n=r.h;return[e(t),e({h:(n+90)%360,s:r.s,l:r.l}),e({h:(n+180)%360,s:r.s,l:r.l}),e({h:(n+270)%360,s:r.s,l:r.l})]}function m(t){var r=e(t).toHsl(),n=r.h;return[e(t),e({h:(n+72)%360,s:r.s,l:r.l}),e({h:(n+216)%360,s:r.s,l:r.l})]}function v(t,r,n){r=r||6,n=n||30;var a=e(t).toHsl(),i=360/n,s=[e(t)];for(a.h=(a.h-(i*r>>1)+720)%360;--r;)a.h=(a.h+i)%360,s.push(e(a));return s}function y(t,r){r=r||6;for(var n=e(t).toHsv(),a=n.h,i=n.s,s=n.v,o=[],f=1/r;r--;)o.push(e({h:a,s:i,v:s})),s=(s+f)%1;return o}function A(t){return t=parseFloat(t),(isNaN(t)||0>t||t>1)&&(t=1),t}function x(e,r){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(e)&&(e="100%");var n=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(e);return e=N(r,z(0,parseFloat(e))),n&&(e=parseInt(e*r,10)/100),t.abs(e-r)<1e-6?1:e%r/parseFloat(r)}function k(t){return N(1,z(0,t))}function w(t){return parseInt(t,16)}function S(t){return 1==t.length?"0"+t:""+t}function H(t){return 1>=t&&(t=100*t+"%"),t}function R(e){return t.round(255*parseFloat(e)).toString(16)}function F(t){return w(t)/255}function C(t){return!!O.CSS_UNIT.exec(t)}var q=/^\s+/,M=/\s+$/,I=0,L=t.round,N=t.min,z=t.max,E=t.random;e.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var e,r,n,a=this.toRgb();return e=a.r/255,r=a.g/255,n=a.b/255,.2126*(.03928>=e?e/12.92:t.pow((e+.055)/1.055,2.4))+.7152*(.03928>=r?r/12.92:t.pow((r+.055)/1.055,2.4))+.0722*(.03928>=n?n/12.92:t.pow((n+.055)/1.055,2.4))},setAlpha:function(t){return this._a=A(t),this._roundA=L(100*this._a)/100,this},toHsv:function(){var t=a(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=a(this._r,this._g,this._b),e=L(360*t.h),r=L(100*t.s),n=L(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=n(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=n(this._r,this._g,this._b),e=L(360*t.h),r=L(100*t.s),a=L(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+a+"%)":"hsla("+e+", "+r+"%, "+a+"%, "+this._roundA+")"},toHex:function(t){return s(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,r,n,a){var i=[S(L(t).toString(16)),S(L(e).toString(16)),S(L(r).toString(16)),S(R(n))];return a&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:L(this._r),g:L(this._g),b:L(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+L(this._r)+", "+L(this._g)+", "+L(this._b)+")":"rgba("+L(this._r)+", "+L(this._g)+", "+L(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:L(100*x(this._r,255))+"%",g:L(100*x(this._g,255))+"%",b:L(100*x(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+L(100*x(this._r,255))+"%, "+L(100*x(this._g,255))+"%, "+L(100*x(this._b,255))+"%)":"rgba("+L(100*x(this._r,255))+"%, "+L(100*x(this._g,255))+"%, "+L(100*x(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(j[s(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var r="#"+o(this._r,this._g,this._b,this._a),n=r,a=this._gradientType?"GradientType = 1, ":"";if(t){var i=e(t);n="#"+o(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+r+",endColorstr="+n+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0;return!e&&n&&("hex"===t||"hex6"===t||"hex3"===t||"hex4"===t||"hex8"===t||"name"===t)?"name"===t&&0===this._a?this.toName():this.toRgbString():("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),("hex"===t||"hex6"===t)&&(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return e(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(u,arguments)},brighten:function(){return this._applyModification(c,arguments)},darken:function(){return this._applyModification(g,arguments)},desaturate:function(){return this._applyModification(f,arguments)},saturate:function(){return this._applyModification(h,arguments)},greyscale:function(){return this._applyModification(l,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(v,arguments)},complement:function(){return this._applyCombination(d,arguments)},monochromatic:function(){return this._applyCombination(y,arguments)},splitcomplement:function(){return this._applyCombination(m,arguments)},triad:function(){return this._applyCombination(_,arguments)},tetrad:function(){return this._applyCombination(p,arguments)}},e.fromRatio=function(t,r){if("object"==typeof t){var n={};for(var a in t)t.hasOwnProperty(a)&&(n[a]="a"===a?t[a]:H(t[a]));t=n}return e(t,r)},e.equals=function(t,r){return!(!t||!r)&&e(t).toRgbString()==e(r).toRgbString()},e.random=function(){return e.fromRatio({r:E(),g:E(),b:E()})},e.mix=function(t,r,n){n=0===n?0:n||50;var a=e(t).toRgb(),i=e(r).toRgb(),s=n/100;return e({r:(i.r-a.r)*s+a.r,g:(i.g-a.g)*s+a.g,b:(i.b-a.b)*s+a.b,a:(i.a-a.a)*s+a.a})},e.readability=function(r,n){var a=e(r),i=e(n);return(t.max(a.getLuminance(),i.getLuminance())+.05)/(t.min(a.getLuminance(),i.getLuminance())+.05)},e.isReadable=function(t,r,n){var a,i,s=e.readability(t,r);switch(i=!1,a=function(t){var e,r;return"AA"!==(e=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==e&&(e="AA"),"small"!==(r=(t.size||"small").toLowerCase())&&"large"!==r&&(r="small"),{level:e,size:r}}(n),a.level+a.size){case"AAsmall":case"AAAlarge":i=s>=4.5;break;case"AAlarge":i=s>=3;break;case"AAAsmall":i=s>=7}return i},e.mostReadable=function(t,r,n){var a,i,s,o,f=null,h=0;i=(n=n||{}).includeFallbackColors,s=n.level,o=n.size;for(var l=0;lh&&(h=a,f=e(r[l]));return e.isReadable(t,f,{level:s,size:o})||!i?f:(n.includeFallbackColors=!1,e.mostReadable(t,["#fff","#000"],n))};var T=e.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},j=e.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(T),O=function(){var t="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",e="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",r="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+e),rgba:new RegExp("rgba"+r),hsl:new RegExp("hsl"+e),hsla:new RegExp("hsla"+r),hsv:new RegExp("hsv"+e),hsva:new RegExp("hsva"+r),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();"undefined"!=typeof module&&module.exports?module.exports=e:"function"==typeof define&&define.amd?define((function(){return e})):window.tinycolor=e}(Math); -"function"!=typeof Object.assign&&(Object.assign=function(e){"use strict";if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n1)for(var n=+w+e;n!=w;n+=e)if((n%=t)<0&&(n+=t),!g.menu[n].disabled&&!g.menu[n].hidden)return g.select(n),void(w=n)}function y(e){var t=Object.keys(e.themeState),n={};if(!0!==g.allowAngularTheme)for(var a=0;a");i.append(t);if(["meta[charset]",'meta[name="viewport"]','meta[name="apple-mobile-web-app-capable"]','meta[name="apple-mobile-web-app-status-bar-style"]','meta[name="apple-mobile-web-app-title"]','meta[name="mobile-web-app-capable"]','link[rel="icon"]','link[rel="shortcut icon"]','link[rel="apple-touch-icon"]'].forEach((function(a){var o=i.find(a);if(o.length>0){var r=n.find(a)[0];g.headOriginalElements.push({id:e,expression:a,html:r}),angular.element(r).replaceWith(o[0]),(t=i.html()).trim()}})),""!==t){n.append(t);for(var r=[],l=a;l0&&e("left")&&e("left").close(),w=t,n.emit("ui-change",w),a.path(t)},this.open=function(n,a){void 0===n.link?this.select(a):("newtab"===n.target?t.open(n.link,n.name):"thistab"===n.target?t.open(n.link,"_self"):("string"==typeof g.menu[a].link&&(g.menu[a].link=s.trustAsResourceUrl(g.menu[a].link)),g.select(a)),e("left").close())},m.location=a,this.getMenuName=function(e){return void 0!==e.link?e.name:e.header},n.connect((function(e,t){var r;b=!1,n.emit("ui-params",a.search()),g.menu=e.menu,g.globals=e.globals,g.nothing=!1,e.site&&(r=g.name=e.site.name,g.hideToolbar="true"==e.site.hideToolbar,g.allowSwipe=e.site.allowSwipe,g.lockMenu=e.site.lockMenu,void 0===e.site.allowTempTheme?g.allowTempTheme=!0:(g.allowTempTheme="true"==e.site.allowTempTheme,g.allowAngularTheme="none"==e.site.allowTempTheme),dateFormat=e.site.dateFormat||"DD/MM/YYYY",e.site.hasOwnProperty("sizes")&&(sizes.setSizes(e.site.sizes),g.sizes=e.site.sizes)),e.theme&&e.theme.angularTheme&&(u.theme("default").primaryPalette(e.theme.angularTheme.primary||"indigo").accentPalette(e.theme.angularTheme.accents||"blue").warnPalette(e.theme.angularTheme.warn||"red").backgroundPalette(e.theme.angularTheme.background||"grey"),"dark"===e.theme.angularTheme.palette&&(u.theme("default").dark(),g.isDark=!0),c.generateTheme("default"),g.angularColors=u._THEMES.default.colors),o[0].theme=e.theme,e.title&&(r=e.title),o[0].title=r||"Node-RED Dashboard",$("meta[name=apple-mobile-web-app-title]").attr("content",r||"Node-RED");var l=parseInt(a.path().substr(1));"speechSynthesis"in window&&(f=window.speechSynthesis.getVoices(),window.speechSynthesis.onvoiceschanged=function(){f=window.speechSynthesis.getVoices()});var m=function(){g.selectedTab&&"object"==typeof g.selectedTab.theme?(g.selectedTab.theme.themeState["widget-borderColor"]=g.selectedTab.theme.themeState["widget-borderColor"]||g.selectedTab.theme.themeState["group-backgroundColor"],y(g.selectedTab.theme)):"object"==typeof e.theme&&e.theme.themeState["base-color"].value&&y(e.theme),null!==g.selectedTab&&void 0!==g.selectedTab.link&&(g.selectedTab.link=s.trustAsResourceUrl(g.selectedTab.link)),e.hasOwnProperty("theme")?$("meta[name=theme-color]").attr("content",e.theme.themeState["page-titlebar-backgroundColor"].value||"#097479"):$("meta[name=theme-color]").attr("content","#097479"),i.hide(),g.headElementsAppended.forEach((function(e){S(e)})),g.headElementsAppended=[],g.headOriginalElements.forEach((function(e){k(e)})),g.globals.length>0&&g.globals.forEach((function(e){void 0!==e.format&&""!==e.format&&O(e.id,e.format)})),n.emit("ui-change",l),function(){var e=!1;for(var t in g.menu)if(g.menu.hasOwnProperty(t))for(var n in"undefined"!=typeof localStorage&&("true"==localStorage.getItem("th"+t+g.menu[t].header)&&(!0===g.menu[t].hidden?localStorage.removeItem("th"+t+g.menu[t].header):g.menu[t].hidden=!0,e=!0),"false"==localStorage.getItem("th"+t+g.menu[t].header)&&(!1===g.menu[t].hidden?localStorage.removeItem("th"+t+g.menu[t].header):g.menu[t].hidden=!1,e=!0),"true"==localStorage.getItem("td"+t+g.menu[t].header)&&(!0===g.menu[t].disabled?localStorage.removeItem("td"+t+g.menu[t].header):g.menu[t].disabled=!0,e=!0),"false"==localStorage.getItem("td"+t+g.menu[t].header)&&(!1===g.menu[t].disabled?localStorage.removeItem("td"+t+g.menu[t].header):g.menu[t].disabled=!1,e=!0)),g.menu[t].items)if(g.menu[t].items.hasOwnProperty(n)){var a=(g.menu[t].header+" "+g.menu[t].items[n].header.name).replace(/ /g,"_");"undefined"!=typeof localStorage&&"true"==localStorage.getItem("g"+a)&&(g.menu[t].items[n].header.config.hidden=!0,e=!0)}!0===e&&$(window).trigger("resize")}(),t()};!isNaN(l)&&l=0&&g.headElementsAppended.splice(n,1),O(e.id,t)}(t,e.msg.template)}else{if(void 0===(t=C(e.id,g.menu)))return;for(var r in e)if(e.hasOwnProperty(r)){if("id"===r)continue;t[r]=e[r]}t.hasOwnProperty("me")&&t.me.hasOwnProperty("processInput")?t.me.processInput(e):t.hasOwnProperty("isOptionsValid")&&t.hasOwnProperty("newOptions")&&(t.options=t.newOptions)}m.$apply()})),n.on("disconnect",(function(e){!b&&doVisualUpdates&&(i.show({template:'
✘   Connection lost
',position:"top right",hideDelay:6e6}),b=!0)})),n.on("connect_error",(function(e){"TransportError"===e.type&&401===e.description&&function(){if(!((new Date).getTime()-(e=window.location.search.match(/[?&]random=([^&]*)/),1*(e&&e[1]||0))<6e4)){var e,t=window.location.search;(t=t.replace(/[?&]random=([^&]*)/,"")).startsWith("?")||(t="?"+t),t+="&random="+(new Date).getTime();var n=window.location.origin;n+=window.location.pathname,n+=t,n+=window.location.hash,window.location=n}}()})),n.on("show-toast",(function(e){if(!0!==e.raw){var t=document.createElement("div");t.textContent=e.message,e.message=t.innerHTML}if(!0===e.dialog){var a;if(""==e.message)return void r.cancel();e.cancel&&e.prompt?(a=r.prompt().title(e.title).htmlContent(e.message).initialValue("").ariaLabel(e.ok+" or "+e.cancel).ok(e.ok).cancel(e.cancel))._options.focusOnOpen=!1:e.cancel?(a=r.confirm().title(e.title).htmlContent(e.message).ariaLabel(e.ok+" or "+e.cancel).ok(e.ok).cancel(e.cancel))._options.focusOnOpen=!1:a=r.alert().title(e.title).htmlContent(e.message).ariaLabel(e.ok).ok(e.ok),a._options.template='

{{ dialog.title }}

{{::dialog.mdTextContent}}

{{ dialog.cancel }}{{ dialog.ok }}
',r.show(a,{panelClass:"nr-dashboard-dialog"}).then((function(t){e.msg.payload=e.ok,!0!==t&&(e.msg.payload=t),null==t&&(e.msg.payload=""),n.emit({id:e.id,value:e})}),(function(){e.msg.payload=e.cancel,n.emit({id:e.id,value:e})}))}else if(e.hasOwnProperty("message")||e.hasOwnProperty("title")){var o=l.$new();o.toast=e,e.hasOwnProperty("message")&&""==e.message&&(e.displayTime=1);var s={scope:o,templateUrl:"partials/toast.html",hideDelay:e.displayTime,position:e.position,toastClass:e.toastClass};i.show(s)}})),n.on("ui-control",(function(e){if(!e.hasOwnProperty("socketid")||e.socketid===n.id){if(e.hasOwnProperty("control")){var t=C(e.id,g.menu);for(var a in e.control)e.control.hasOwnProperty(a)&&t.hasOwnProperty(a)&&(t[a]=e.control[a])}if(e.hasOwnProperty("tabs")&&"object"==typeof e.tabs)for(var o in g.menu)g.menu.hasOwnProperty(o)&&(g.menu[o].name&&(g.menu[o].header=g.menu[o].name),e.tabs.hasOwnProperty("show")&&P(e.tabs.show,g.menu[o].header)&&(g.menu[o].hidden=!1,localStorage.setItem("th"+o+g.menu[o].header,!1)),e.tabs.hasOwnProperty("hide")&&P(e.tabs.hide,g.menu[o].header)&&(g.menu[o].hidden=!0,localStorage.setItem("th"+o+g.menu[o].header,!0)),e.tabs.hasOwnProperty("enable")&&P(e.tabs.enable,g.menu[o].header)&&(g.menu[o].disabled=!1,localStorage.setItem("td"+o+g.menu[o].header,!1)),e.tabs.hasOwnProperty("disable")&&P(e.tabs.disable,g.menu[o].header)&&(g.menu[o].disabled=!0,localStorage.setItem("td"+o+g.menu[o].header,!0)));if(e.hasOwnProperty("tab")){if("string"==typeof e.tab){if(""===e.tab&&n.emit("ui-refresh",{}),"+1"===e.tab)return v(1),void m.$apply();if("-1"===e.tab)return v(-1),void m.$apply();for(var i in g.menu){if(e.tab==g.menu[i].header)return g.menu[i].disabled||g.select(i),void m.$apply();if(e.tab==g.menu[i].name)return g.menu[i].disabled||g.open(g.menu[i],i),void m.$apply()}}var r=parseInt(e.tab);if(Number.isNaN(r)||r<0)return;if(r-1&&(g.menu[l].items[d].header.config.hidden=void 0,localStorage.removeItem("g"+u),s=u),e.group.hasOwnProperty("hide")&&e.group.hide.indexOf(u)>-1&&(g.menu[l].items[d].header.config.hidden=!0,localStorage.setItem("g"+u,!0)),e.group.hasOwnProperty("close")&&e.group.close.indexOf(u)>-1&&"undefined"!=typeof localStorage&&"false"==localStorage.getItem(u)&&$("#"+u+" > div > p > span > i").trigger("click"),e.group.hasOwnProperty("open")&&e.group.open.indexOf(u)>-1&&"undefined"!=typeof localStorage&&"true"==localStorage.getItem(u)&&$("#"+u+" > div > p > span > i").trigger("click"),$(window).trigger("resize")}e.group.hasOwnProperty("focus")&&s&&setTimeout((function(){(s=$(window)[0].document.getElementById(s))&&s.scrollIntoView()}),50)}m.$apply()}})),n.on("ui-audio",(function(e){if(e.reset)h?(h.disconnect(),h.stop(0),h=null,n.emit("ui-audio","reset")):window.speechSynthesis.speaking&&(window.speechSynthesis.cancel(),n.emit("ui-audio","reset"));else{if(!e.always){var t;for(var o in g.menu)e.tabname===g.menu[o].header&&(t=o);if(t!=parseInt(a.path().substr(1)))return}if(e.hasOwnProperty("tts"))if(f.length>0){var r=new SpeechSynthesisUtterance(e.tts);r.onerror=function(e){n.emit("ui-audio","error: "+e.error)},r.onend=function(){n.emit("ui-audio","complete")};for(var s=0;s");r.append(o);if(["meta[charset]",'meta[name="viewport"]','meta[name="apple-mobile-web-app-capable"]','meta[name="apple-mobile-web-app-status-bar-style"]','meta[name="apple-mobile-web-app-title"]','meta[name="mobile-web-app-capable"]','link[rel="icon"]','link[rel="shortcut icon"]','link[rel="apple-touch-icon"]'].forEach(function(e){var t,n=r.find(e);0
✘   Connection lost
',position:"top right",hideDelay:6e6}),k=!0)}),m.on("connect_error",function(e){var t;"TransportError"!==e.type||401!==e.description||(new Date).getTime()-+((e=window.location.search.match(/[?&]random=([^&]*)/))&&e[1]||0)<6e4||((e=(e=window.location.search).replace(/[?&]random=([^&]*)/,"")).startsWith("?")||(e="?"+e),e+="&random="+(new Date).getTime(),t=(t=(t=window.location.origin)+window.location.pathname+e)+window.location.hash,window.location=t)}),m.on("show-toast",function(t){var e,n;!0!==t.raw&&((e=document.createElement("div")).textContent=t.message,t.message=e.innerHTML),!0===t.dialog?""==t.message?o.cancel():(t.cancel&&t.prompt?(n=o.prompt().title(t.title).htmlContent(t.message).initialValue("").ariaLabel(t.ok+" or "+t.cancel).ok(t.ok).cancel(t.cancel))._options.focusOnOpen=!1:t.cancel?(n=o.confirm().title(t.title).htmlContent(t.message).ariaLabel(t.ok+" or "+t.cancel).ok(t.ok).cancel(t.cancel))._options.focusOnOpen=!1:n=o.alert().title(t.title).htmlContent(t.message).ariaLabel(t.ok).ok(t.ok),n._options.template='

{{ dialog.title }}

{{::dialog.mdTextContent}}

{{ dialog.cancel }}{{ dialog.ok }}
',o.show(n,{panelClass:"nr-dashboard-dialog"}).then(function(e){t.msg.payload=t.ok,!0!==e&&(t.msg.payload=e),null==e&&(t.msg.payload=""),m.emit({id:t.id,value:t})},function(){t.msg.payload=t.cancel,m.emit({id:t.id,value:t})})):(t.hasOwnProperty("message")||t.hasOwnProperty("title"))&&(((e=u.$new()).toast=t).hasOwnProperty("message")&&""==t.message&&(t.displayTime=1),n={scope:e,templateUrl:"partials/toast.html",hideDelay:t.displayTime,position:t.position,toastClass:t.toastClass},d.show(n))}),m.on("ui-control",function(e){if(!e.hasOwnProperty("socketid")||e.socketid===m.id){if(e.hasOwnProperty("control")){var t,n=I(e.id,y.menu);for(t in e.control)e.control.hasOwnProperty(t)&&n.hasOwnProperty(t)&&(n[t]=e.control[t])}if(e.hasOwnProperty("tabs")&&"object"==typeof e.tabs)for(var a in y.menu)y.menu.hasOwnProperty(a)&&(y.menu[a].name&&(y.menu[a].header=y.menu[a].name),e.tabs.hasOwnProperty("show")&&F(e.tabs.show,y.menu[a].header)&&(y.menu[a].hidden=!1,localStorage.setItem("th"+a+y.menu[a].header,!1)),e.tabs.hasOwnProperty("hide")&&F(e.tabs.hide,y.menu[a].header)&&(y.menu[a].hidden=!0,localStorage.setItem("th"+a+y.menu[a].header,!0)),e.tabs.hasOwnProperty("enable")&&F(e.tabs.enable,y.menu[a].header)&&(y.menu[a].disabled=!1,localStorage.setItem("td"+a+y.menu[a].header,!1)),e.tabs.hasOwnProperty("disable"))&&F(e.tabs.disable,y.menu[a].header)&&(y.menu[a].disabled=!0,localStorage.setItem("td"+a+y.menu[a].header,!0));if(e.hasOwnProperty("tab")){if("string"==typeof e.tab){if(""===e.tab&&m.emit("ui-refresh",{}),"+1"===e.tab)return S(1),void h.$apply();if("-1"===e.tab)return S(-1),void h.$apply();for(var o in y.menu){if(e.tab==y.menu[o].header)return y.menu[o].disabled||y.select(o),void h.$apply();if(e.tab==y.menu[o].name)return y.menu[o].disabled||y.open(y.menu[o],o),void h.$apply()}}var i=parseInt(e.tab);if(Number.isNaN(i)||i<0)return;if(i div > p > span > i").trigger("click"),e.group.hasOwnProperty("open")&&-1 div > p > span > i").trigger("click"),$(window).trigger("resize"));e.group.hasOwnProperty("focus")&&l&&setTimeout(function(){(l=$(window)[0].document.getElementById(l))&&l.scrollIntoView()},50)}h.$apply()}}),m.on("ui-audio",function(t){if(t.reset)b?(b.disconnect(),b.stop(0),b=null,m.emit("ui-audio","reset")):window.speechSynthesis.speaking&&(window.speechSynthesis.cancel(),m.emit("ui-audio","reset"));else{if(!t.always){var e,n;for(n in y.menu)t.tabname===y.menu[n].header&&(e=n);if(e!=parseInt(l.path().substr(1)))return}if(t.hasOwnProperty("tts"))if(0",scope:!0,link:function(e,t,n,l){e.templateUrl="components/ui-component/templates/"+l.item.type+".html",l.init()}}}]),angular.module("ui").directive("includeReplace",(function(){return{require:"ngInclude",restrict:"A",link:function(e,t,n){t.replaceWith(t.children())}}})); -angular.module("ui").controller("uiComponentController",["$scope","UiEvents","$interpolate","$interval",function(e,t,i,n){this.$onInit=function(){var a,m=this;"string"==typeof m.item.format&&(-1===m.item.format.indexOf("constructor")?m.item.getText=i(m.item.format).bind(null,m.item):m.item.getText=function(){return m.item.format}),"string"==typeof m.item.label&&(-1===m.item.label.indexOf("constructor")?(m.item.getLabel=i(m.item.label).bind(null,m.item),m.item.safeLabel="nr-dashboard-widget-"+m.item.label.replace(/\W/g,"_")):m.item.getText=function(){return m.item.label}),"string"==typeof m.item.tooltip&&(-1===m.item.tooltip.indexOf("constructor")?m.item.getTooltip=i(m.item.tooltip).bind(null,m.item):m.item.getText=function(){return m.item.tooltip}),"string"==typeof m.item.color&&(-1===m.item.color.indexOf("constructor")?m.item.getColor=i(m.item.color).bind(null,m.item):m.item.getText=function(){return m.item.color}),"string"==typeof m.item.icon&&(-1===m.item.icon.indexOf("constructor")?m.item.getIcon=i(m.item.icon).bind(null,m.item):m.item.getText=function(){return m.item.icon}),"string"==typeof m.item.units&&(-1===m.item.units.indexOf("constructor")?m.item.getUnits=i(m.item.units).bind(null,m.item):m.item.getText=function(){return m.item.units}),m.init=function(){switch(m.item.type){case"button":m.buttonClick=function(e){o({id:m.item.id,value:m.item.value,event:{clientX:e.originalEvent.clientX,clientY:e.originalEvent.clientY,bbox:[e.originalEvent.clientX-e.originalEvent.layerX,e.originalEvent.clientY-e.originalEvent.layerY+e.currentTarget.clientHeight,e.originalEvent.clientX-e.originalEvent.layerX+e.currentTarget.clientWidth,e.originalEvent.clientY-e.originalEvent.layerY]}},0)};break;case"switch":m.switchClick=function(){o({id:m.item.id,value:!m.item.value},0)};break;case"dropdown":m.searchTerm="",m.selectAll=!1,m.changed=!1,m.itemChanged=function(){m.searchTerm="",m.item.multiple?m.changed=!0:m.valueChanged(0)},m.checkAll=function(){var e=m.item.options.filter((function(e){return e.label.toLowerCase().includes(m.searchTerm.toLowerCase())}));m.item.value=m.selectAll?e.map((function(e){return e.value})):[],m.valueChanged(0)},m.closed=function(){m.changed&&(m.changed=!1,m.valueChanged(0))},m.item.me=m,m.processInput=function(e){l(e)};break;case"numeric":var i=function(e){m.item.value=parseFloat(m.item.value),isNaN(m.item.value)&&(m.item.value=m.item.min),e>0?(m.item.value==m.item.max&&1==m.item.wrap?m.item.value=m.item.min:m.item.valuem.item.min&&(m.item.value=Math.round(1e4*Math.max(m.item.value+e,m.item.min))/1e4),m.item.value>m.item.max&&(m.item.value=m.item.max))},a=9.5*(Math.round(1e4*(m.item.min+m.item.step))/1e4).toString().length,u=9.5*(Math.round(1e4*(m.item.max+m.item.step))/1e4).toString().length;m.item.minWidth=a>u?a:u;var r=null;m.newValue=function(){isNaN(parseFloat(m.item.value))||(m.item.valuem.item.max&&(m.item.value=m.item.max),t.emit({id:m.item.id,value:m.item.value}))},m.periodicChange=function(e){i(e);var t=0;r=n((function(){++t>75?i(250*e):t>50?i(50*e):t>35?i(10*e):t>25?i(2*e):(t>15||t>5&&t%2)&&i(e)}),100)},m.stopPeriodic=function(){r&&(n.cancel(r),r=null,m.valueChanged(0))};break;case"chart":m.item.theme=e.main.selectedTab.theme;break;case"colour-picker":(m.item.width<4||!m.item.showValue&&!m.item.showPicker)&&(m.item.showPicker=!1,m.item.showValue=!1,m.item.showSwatch=!0),m.item.showPicker&&m.item.height<4&&(m.item.height=m.item.showSwatch||m.item.showValue?4:3),m.item.options={format:m.item.format,inline:m.item.showPicker,hue:m.item.showHue,alpha:m.item.showAlpha,lightness:m.item.showLightness,swatch:m.item.showSwatch,swatchOnly:m.item.width<2||!m.item.showValue,swatchPos:"right",pos:"bottom right",case:"lower",round:!m.item.square,pickerOnly:m.item.showPicker&&!(m.item.showSwatch||m.item.showValue)},m.item.key=function(e){13!==e.charCode&&13!==e.which&&9!==e.charCode&&9!==e.which||(t.emit({id:m.item.id,value:m.item.value}),m.api&&m.api.close())},m.item.eventapi={onChange:function(e,t,i){void 0!==i&&m.valueChanged(0)},onOpen:function(e,t){m.api=e}},e.$watch("me.item.value",(function(){m.item.oldValue||(m.item.oldValue=m.item.value),"true"===m.item.dynOutput&&m.item.value!==m.item.oldValue&&(m.item.oldValue=m.item.value,m.valueChanged(20))}));break;case"text-input":case"text-input-CR":-1!=m.item.mode.indexOf("time")&&(m.processInput=function(e){var t=new Date(e.value);if(isNaN(e.value)){var i=e.value.match(/^(\d\d):(\d\d)/);if(null==i){var n=Date.parse(e.value);isNaN(n)&&(n=Date.now()),t=new Date(n)}else t=new Date("1970-01-01 "+i[1]+":"+i[2]+":00Z")}t.setMilliseconds(0),t.setSeconds(0),e.value=t,m.item.value=e.value},m.item.me=m),"week"!==m.item.mode&&"month"!==m.item.mode||(m.processInput=function(e){var t=new Date(e.value);if(isNaN(e.value)){var i=Date.parse(e.value);isNaN(i)&&(i=Date.now()),t=new Date(i)}t.setMilliseconds(0),t.setSeconds(0),e.value=t,m.item.value=e.value},m.item.me=m);break;case"date-picker":void 0!==m.item.ddd&&("number"!=typeof m.item.ddd&&"string"!=typeof m.item.ddd||(m.item.ddd=new Date(m.item.ddd))),m.processInput=function(e){e.value=new Date(e.value),m.item.ddd=e.value},m.setDate=function(){m.item.value=m.item.ddd,m.valueChanged(0)},m.item.me=m;break;case"form":m.processInput=function(e){if("object"==typeof e.value)for(var t in e.value)if(m.item.formValue.hasOwnProperty(t))for(var i in m.item.options)"date"!==m.item.options[i].type&&"time"!==m.item.options[i].type||m.item.options[i].value!==t||(e.value[t]=new Date(e.value[t])),m.item.formValue[t]=e.value[t]},m.item.extraRows=0,m.item.options.map((function(e){"multiline"==e.type&&e.rows>1&&(m.item.extraRows+=e.rows-1)})),m.item.rowCount=1==m.item.splitLayout?Math.ceil(m.item.options.length/2):m.item.options.length,m.item.rowCount+=""==m.item.label?1:2,m.item.rowCount+=m.item.extraRows,m.item.rowHeight=((m.item.rowCount-1)*m.item.sy+(""==m.item.label?.3*m.item.sy:1.2*m.item.sy)+(m.item.rowCount-1)*m.item.cy)/m.item.rowCount,m.stop=function(e){13!==e.charCode&&13!==e.which||(e.preventDefault(),e.stopPropagation())},m.submit=function(){m.item.value=JSON.parse(JSON.stringify(m.item.formValue)),m.valueChanged(0),m.reset()},m.reset=function(){for(var t in m.item.options)"checkbox"===m.item.options[t].type||"switch"===m.item.options[t].type?m.item.formValue[m.item.options[t].value]=!1:m.item.formValue[m.item.options[t].value]="";e.$$childTail.form.$setUntouched(),e.$$childTail.form.$setPristine()},m.item.me=m;break;case"template":m.setFormat=function(e){m.item.format=e},void 0!==m.item.msg&&void 0!==m.item.msg.template&&m.setFormat(m.item.msg.template);break;case"slider":m.wheel=function(e){e.preventDefault(),e.originalEvent.deltaY>0&&(m.item.value+=m.item.step,m.item.value>m.item.max&&(m.item.value=m.item.max)),e.originalEvent.deltaY<0&&(m.item.value-=m.item.step,m.item.value',n=o.$watchGroup(["me.item.min","me.item.max","me.item.units","me.item.waveoptions","me.item.options"],(function(){l&&l();var a=liquidFillGaugeDefaultSettings();a.minValue=s.min,a.maxValue=s.max,a.units=s.units,a.textVertPosition=.33,a.waveHeight=.09,a.waveRise=!1,a.waveCount=2,a.displayPercent=!1;var n=s.waveoptions;a.circleColor=n.circleColor[r],a.waveColor=n.waveColor[r],a.textColor=n.textColor[r],a.waveTextColor=n.waveTextColor[r],void 0===a.circleColor&&(a.circleColor=t),void 0===a.waveColor&&(a.waveColor=t),void 0===a.textColor&&(a.textColor=i),void 0===a.waveTextColor&&(a.waveTextColor=i),null!==s.options&&Object.keys(s.options).forEach((function(e){a[e]=s.options[e]})),e=loadLiquidFillGauge("gauge"+u,s.value,a),l=o.$watch("me.item.value",(function(o){o=s.getText(),(isNaN(o)||""===o)&&(o=a.minValue),e.update(o)}))}))):n=o.$watchGroup(["me.item.min","me.item.max","me.item.seg1","me.item.seg2","me.item.colors","me.item.reverse","me.item.options"],(function(){l&&l(),document.getElementById("gauge_"+u).innerHTML="";var t={id:"gauge_"+u,value:s.value,min:s.min,max:s.max,reverse:s.reverse,hideMinMax:s.hideMinMax,differential:s.diff,levelColors:s.reverse?s.colors.reverse():s.colors,valueMinFontSize:12,minLabelMinFontSize:8,labelMinFontSize:8,titleFontFamily:"inherit",valueFontFamily:"inherit",label:s.units,pointer:!0,relativeGaugeSize:!1,textRenderer:function(){return s.getText()||""}};if("donut"===s.gtype&&(t.donut=!0,t.pointer=!1),void 0===t.gaugeWidthScale&&delete t.gaugeWidthScale,void 0===t.gaugeColor&&(t.gaugeColor="rgba(127,127,127,0.5)"),void 0===t.pointerOptions&&(t.pointerOptions={color:a}),"compass"===s.gtype)t.donut=!0,t.gaugeWidthScale=.3,t.pointer=!0,t.refreshAnimationTime=5,t.pointerOptions={toplength:12,bottomlength:16,bottomwidth:8,color:void 0},t.gaugeColor=s.gageoptions.compassColor[r],t.levelColors=[s.gageoptions.compassColor[r]],void 0===t.gaugeColor&&(t.gaugeColor=i),void 0===t.pointerOptions.color&&(t.pointerOptions.color=i);else{var n=s.seg1,m=s.seg2;if(!isNaN(parseFloat(n))&&!isNaN(parseFloat(m))){var g=s.colors;t.customSectors={percents:!1,ranges:[{color:g[0],lo:t.min,hi:n},{color:g[1],lo:n,hi:m},{color:g[2],lo:m,hi:t.max}]},t.noGradient=!0}}t.valueFontColor=s.gageoptions.valueFontColor[r],t.labelFontColor=s.gageoptions.valueFontColor[r],null!==s.options&&Object.keys(s.options).forEach((function(e){t[e]=s.options[e]})),(e=new JustGage(t)).refreshLabel=function(e){e&&"string"==typeof e&&this.txtLabel.attr({text:e})};var c="";l=o.$watch("me.item.value",(function(o){"object"==typeof o&&(o=s.getText()),isNaN(o=parseFloat(o))&&(o=t.min),s.getUnits()!==c&&(c=s.getUnits(),t.label=c,e.refreshLabel(c)),e.refresh(o)}))}))}))}),5)}}}]); -function loadConfiguration(e,o){var a=o.config||{data:[],series:[],labels:[],nodata:!0},t=o.$eval("me.item"),s=parseFloat(t.ymin),i=parseFloat(t.ymax),n=t.xformat,l=o.$eval("main.selectedTab.theme.themeState"),r=t.useUTC||!1;a.options={animation:t.animation,spanGaps:t.spanGaps,scales:{},legend:!1,responsive:!0,maintainAspectRatio:!1,useDifferentColor:t.useDifferentColor},"pie"===e&&(a.options.cutoutPercentage=t.cutout||0,a.options.elements={arc:{borderWidth:0}});var c=(t.colors||["#1F77B4","#AEC7E8","#FF7F0E","#2CA02C","#98DF8A","#D62728","#FF9896","#9467BD","#C5B0D5"]).concat(["#7EB3C6","#BB9A61","#3F8FB9","#57A13F","#BC5879","#6DC2DF","#D7D185","#91CA96","#DEB64D","#31615A","#B46E3F","#9B2FAA","#61A240","#AA3167","#9D6D5E","#3498DB","#EC7063","#DAF7A6","#FFC300","#D98880","#48C9B0","#7FB3D5","#F9E79F","#922B21"]);if(a.colours=a.colours||c,o.barColours=[],o.lineColours=[],c.forEach((function(e,a){o.lineColours.push({backgroundColor:e,borderColor:e}),o.barColours.push({backgroundColor:c,borderColor:"#888",borderWidth:1})})),"line"===e)switch(a.options.scales.xAxes=[{type:"time",scaleLabel:{fontColor:"#fff",display:!0}}],"auto"!==n&&(a.options.scales.xAxes[0].time={displayFormats:{millisecond:n,second:n,minute:n,hour:n,day:n,week:n,month:n,quarter:n,year:n}}),!0===r&&(a.options.scales.xAxes[0].time.parser=function(e){return moment.utc(e)}),a.options.tooltips={mode:"x-axis",position:"cursor",bodyFontSize:10,bodySpacing:0,callbacks:{title:function(e,o){var a=e[0].xLabel;if(a=new Date(a).getTime(),isNaN(a)||a<1e6)return a;for(var t=1;ta&&(a=e[t].xLabel);var s=moment(a);return!0===r&&(s=moment.utc(a)),"auto"!==n?s.format(n):s.calendar(null,{sameDay:"HH:mm:ss",nextDay:"HH:mm",lastDay:"HH:mm",lastWeek:"MMM D, hA",sameElse:"lll"})}}},a.options.hover={mode:"x-axis"},a.options.elements={line:{fill:!1},point:{radius:t.dot?2:0,hitRadius:4,hoverRadius:4}},t.interpolate){case"cubic":a.options.elements.line.cubicInterpolationMode="default";break;case"monotone":a.options.elements.line.cubicInterpolationMode="monotone";break;case"linear":a.options.elements.line.tension=0;break;case"bezier":a.options.elements.line.tension=.4;break;case"step":a.options.elements.line.stepped=!0}else if("bar"===e||"horizontalBar"===e)a.options.scales.xAxes=[{}];else if("radar"===e&&(a.options={scale:{ticks:{beginAtZero:!0,showLabelBackdrop:!1}}},isNaN(s)||(a.options.scale.ticks.min=s),isNaN(i)||(a.options.scale.ticks.max=i),l)){var u=l["widget-textColor"].value,p=tinycolor(u).toRgb(),d="rgba("+p.r+","+p.g+","+p.b+",0.1)",g="rgba("+p.r+","+p.g+","+p.b+",0.3)",f="rgba("+p.r+","+p.g+","+p.b+",0.6)";a.options.scale.ticks.fontColor=f,a.options.scale.ticks.fontSize=8,a.options.scale.pointLabels={fontColor:u,fontSize:14},a.options.scale.gridLines={color:d},a.options.scale.angleLines={color:g}}if("pie"!==e&&"polar-area"!==e&&"radar"!==e){if(a.options.scales.yAxes=[{}],a.options.scales.xAxes[0].ticks={},a.options.scales.yAxes[0].ticks={},"line"!==e&&"bar"!==e||(a.options.scales.yAxes[0].ticks.autoSkip=!0,a.options.scales.yAxes[0].ticks.callback=function(e,o,a){var t=navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.language;return e.toLocaleString(t)},isNaN(s)||(a.options.scales.yAxes[0].ticks.min=s),isNaN(i)||(a.options.scales.yAxes[0].ticks.max=i),isNaN(s)||isNaN(i)||(a.options.scales.yAxes[0].ticks.stepSize=(i-s)/4),"bar"===e&&(a.options.scales.yAxes[0].ticks.beginAtZero=!0)),"horizontalBar"===e&&(a.options.scales.xAxes[0].ticks.beginAtZero=!0,isNaN(s)||(a.options.scales.xAxes[0].ticks.min=s),isNaN(i)||(a.options.scales.xAxes[0].ticks.max=i),a.options.scales.xAxes[0].ticks.callback=function(e,o,a){var t=navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.language;return e.toLocaleString(t)}),l){a.options.scales.xAxes[0].ticks.fontColor=a.options.scales.yAxes[0].ticks.fontColor=l["widget-textColor"].value;var m=tinycolor(l["widget-textColor"].value).toRgb(),x="rgba("+m.r+","+m.g+","+m.b+",0.1)";a.options.scales.xAxes[0].gridLines=a.options.scales.yAxes[0].gridLines={color:x,zeroLineColor:x}}a.options.scales.xAxes[0].ticks.maxRotation=0,a.options.scales.xAxes[0].ticks.autoSkipPadding=4,a.options.scales.xAxes[0].ticks.autoSkip=!0}return!0!==t.legend&&"true"!==t.legend||(a.overrides=[],a.options.legend={display:!0,position:"top",labels:{boxWidth:10,fontSize:12,padding:8},onClick:function(o,t){var s,i=t.datasetIndex||0,n=this.chart;if("pie"===e||"polar-area"===e)for(var l=0;l1&&(e.parseTime(e.ticks[o]).diff(e.parseTime(e.ticks[o-1]))0)if(t=t[0],o.hasOwnProperty("config")||(o.config=loadConfiguration(e,o)),o.config.nodata=!1,"line"===e&&t.update){var s=t.values.series,i=o.config.series.indexOf(s);-1===i&&(o.config.series.push(s),i=o.config.series.indexOf(s),o.config.data.push([])),i>o.config.data.length&&o.config.data.push([]),t.remove&&o.config.data[i].splice(0,t.remove),o.config.data[i].push(t.values.data)}else{if("line"===e){if(void 0===t.values.data[0][0]){for(var n=!1,l=1;l1||a?o.config.colours=o.lineColours:o.config.colours=o.barColours),"pie"===e)o.config.colours=o.barColours;else if("polar-area"===e&&o.config.options&&o.config.options.useDifferentColor){o.config.colours=o.barColours;var r=[];o.barColours.map((function(e){var o=Object.assign({},e),a=[];o.backgroundColor.map((function(e){var o=.7/t.values.series.length+.1,s=tinycolor(e).toRgb(),i="rgba("+s.r+","+s.g+","+s.b+","+o+")";a.push(i)})),o.backgroundColor=a,r.push(o)})),o.config.colours=r}o.config.data=t.values.data,o.config.series=t.values.series,o.config.labels=t.values.labels}else delete o.config,o.config=loadConfiguration(e,o)}))}),0),e((function(){o.$broadcast("$resize")}),50)}}}]); -angular.module("ui").directive("uiCardPanel",["$timeout","$rootScope",function(e,l){return{restrict:"E",transclude:!0,templateUrl:"components/ui-card-panel/ui-card-panel.html",controller:"uiCardPanelController",controllerAs:"ctrl",link:function(o,a,r,t){o.collapsed="true"==("undefined"!=typeof localStorage&&localStorage.getItem(r.id)||!1);var n=a.find(".nr-dashboard-cardcontainer"),c=0;t.init(n),o.collapseCard=function(){o.collapsed=!o.collapsed,"undefined"!=typeof localStorage&&localStorage.setItem(r.id,o.collapsed),n.slideToggle(c),e((function(){$(window).trigger("resize")}),c),c=parseInt(r.slideToggleDuration,10)||150,l.$emit("collapse",r.id,!o.collapsed)},!0===o.collapsed&&(o.collapsed=!1,e((function(){a.find(".nr-dashboard-cardcarat").trigger("click")}),20))}}}]); -angular.module("ui").controller("uiCardPanelController",["uiSizes","$timeout","$scope",function(r,t,i){var n=this;n.width=r.columns(i.group)*r.sx+2*r.px+(r.columns(i.group)-1)*r.cx;var e,a=r.columns(i.group);n.init=function(r){e=r};var o,u=!1;function f(t,n,e,a){for(var u=0;ut.y?1:n.x-t.x}function intersectBlock(n,t){return!(t.x>n.x||t.x+t.wn.y+n.h||t.y+t.h=w.x&&v.y<=w.y&&v.y+v.h>=w.y){f=!1;break}}f&&(u[t]=w,y.push(w))}t=l.x+":"+(l.y+c+n.gy),u[t]||(y.push({x:l.x,y:l.y+c+n.gy,w:l.w,h:l.h,used:!1}),u[t]=y[y.length-1]),l.w=a,l.h=c;break}}x||(s.forEach((function(n){i=Math.max(i,n.y+n.h)})),(o=u["0:"+(i+n.gy)])||(o={x:0,y:i+n.gy},u["0:"+(i+n.gy)]=o),o.used=!0,o.group=h,o.assigned=!0,o.w=a,o.h=c,y.push(o),s.push(o),t="0:"+(o.y+c+n.gy),u[t]||(y.push({x:0,y:o.y+c+n.gy,w:e,h:1/0}),u[t]=y[y.length-1]));y.sort(blockSort)})),s.forEach((function(n){h=Math.max(h,n.x+n.w),i=Math.max(i,n.y+n.h)}));var a=Math.max(0,n.gx+(e-h)/2);s.forEach((function(n){n.group.css({left:a+n.x,top:n.y}).addClass("visible")})),r.css("min-height",i+n.gy+3)}(),o=!1}),10))}}angular.module("ui").directive("uiMasonry",["$window",function(n){return{restrict:"A",controller:MasonryController,link:function(t,r,o,e){e.init(r),angular.element(n).on("resize",(function(){e.refreshLayout()}))}}}]),MasonryController.$inject=["uiSizes","$timeout"]; -var iconFontOddEven=!1;angular.module("ui").directive("uiIcon",(function(){var i=/^https?:\/\//i,n=/^fa-/i,o=/^wi-/i,t=/^mi-/i,c=/^icofont-/i,e=/^iconify-/i;return{restrict:"E",templateUrl:"components/ui-icon/ui-icon.html",scope:{icon:"@"},link:function(a){a.$watch("icon",(function(r){""!==r&&(n.test(r)?a.iconType="fa":o.test(r)?a.iconType="wi":t.test(r)?a.iconType="mi":c.test(r)?a.iconType="icofont":e.test(r)?(a.iconType=iconFontOddEven?"iconify":"iconify1",iconFontOddEven=!iconFontOddEven):i.test(r)?(a.iconType="image",a.url=r):a.iconType="angular-material")}))}}})); -angular.module("ui").filter("chartGetRange",(function(){return function(n,t){t=[parseFloat(t[0]),parseFloat(t[1])];var a=Math.abs(t[0])>=0?t[0]:d3.min(n,(function(n){return d3.min(n.values,(function(n){return n[1]}))})),r=Math.abs(t[1])>=0?t[1]:d3.max(n,(function(n){return d3.max(n.values,(function(n){return n[1]}))}));return[Math.floor(a),Math.ceil(r)]}})); -angular.module("ui").filter("trusted",["$sce",function(t){return function(u){return t.trustAsHtml(u)}}]); -angular.module("ui").filter("spaceToUnderscore",(function(){return function(e){return e.replace(/ /g,"_")}})),angular.module("ui").filter("underscoreToSpace",(function(){return function(e){return e.replace(/_/g," ")}})); -// Placeholder only - This is NOT a sustainable solution to i18n localisation -// Replace/overwrite this file with an angular-locale_... file of your choice from the npm angular-i18n project -// Then edit dashboard.appcache - (for example add a digit to the hash) -// Stop, start Node-RED and refresh the browser page twice to flush the cache. +angular.module("ui").directive("uiTemplate",["$compile","$rootScope","UiEvents",function($compile,$rootScope,events){function createInnerScope(n){var e=$rootScope.$new();return e.send=function(e){events.emit({id:n,msg:e})},e}return function(scope,element,attrs){var id=scope.$eval("me.item.id"),innerScope;scope.$watch(attrs.uiTemplate,function(value){var oldMsg,ic=(innerScope&&(oldMsg=innerScope.msg,innerScope.$destroy()),innerScope=createInnerScope(id),innerScope.theme=scope.$eval("me.item.theme"),window.scope=innerScope,element.html(value),delete window.scope,void 0!==oldMsg&&(innerScope.msg=oldMsg),scope.$eval("me.item.initController")),func;ic&&(func=eval("("+ic+")"),func(innerScope,events)),innerScope.width=scope.$eval("me.item.width"),innerScope.height=scope.$eval("me.item.height"),innerScope.label=scope.$eval("me.item.label"),$compile(element.contents())(innerScope)}),scope.$watch("me.item.msg",function(e){innerScope&&void 0!==(innerScope.msg=e)&&void 0!==e.template&&scope.$parent.me.setFormat(e.template)}),scope.$on("$destroy",function(){innerScope&&innerScope.$destroy()})}}]); +angular.module("ui").directive("uiHighlight",function(){return{restrict:"A",link:function(i,o,t){t.$observe("uiHighlight",function(i){i?o.css("border-bottom","5px solid "+i):o.css("border-bottom",void 0)})}}}); +angular.module("ui").directive("colorPickerInputWrapper",function(){return{restrict:"C",link:function(r,i,n){r.AngularColorPickerController.options.pickerOnly&&i.hide()}}}); +angular.module("ui").directive("uiComponent",["$http","$compile","$templateCache","$q",function(e,t,n,l){return{restrict:"E",bindToController:{item:"="},replace:!0,controller:"uiComponentController",controllerAs:"me",template:"
",scope:!0,link:function(e,t,n,l){e.templateUrl="components/ui-component/templates/"+l.item.type+".html",l.init()}}}]),angular.module("ui").directive("includeReplace",function(){return{require:"ngInclude",restrict:"A",link:function(e,t,n){t.replaceWith(t.children())}}}); +angular.module("ui").controller("uiComponentController",["$scope","UiEvents","$interpolate","$interval",function(l,u,e,r){this.$onInit=function(){var i,m=this,a=("string"==typeof m.item.format&&(-1===m.item.format.indexOf("constructor")?m.item.getText=e(m.item.format).bind(null,m.item):m.item.getText=function(){return m.item.format}),"string"==typeof m.item.label&&(-1===m.item.label.indexOf("constructor")?(m.item.getLabel=e(m.item.label).bind(null,m.item),m.item.safeLabel="nr-dashboard-widget-"+m.item.label.replace(/\W/g,"_")):m.item.getText=function(){return m.item.label}),"string"==typeof m.item.tooltip&&(-1===m.item.tooltip.indexOf("constructor")?m.item.getTooltip=e(m.item.tooltip).bind(null,m.item):m.item.getText=function(){return m.item.tooltip}),"string"==typeof m.item.color&&(-1===m.item.color.indexOf("constructor")?m.item.getColor=e(m.item.color).bind(null,m.item):m.item.getText=function(){return m.item.color}),"string"==typeof m.item.icon&&(-1===m.item.icon.indexOf("constructor")?m.item.getIcon=e(m.item.icon).bind(null,m.item):m.item.getText=function(){return m.item.icon}),"string"==typeof m.item.units&&(-1===m.item.units.indexOf("constructor")?m.item.getUnits=e(m.item.units).bind(null,m.item):m.item.getText=function(){return m.item.units}),m.init=function(){switch(m.item.type){case"button":m.buttonClick=function(e){a({id:m.item.id,value:m.item.value,event:{clientX:e.originalEvent.clientX,clientY:e.originalEvent.clientY,bbox:[e.originalEvent.clientX-e.originalEvent.layerX,e.originalEvent.clientY-e.originalEvent.layerY+e.currentTarget.clientHeight,e.originalEvent.clientX-e.originalEvent.layerX+e.currentTarget.clientWidth,e.originalEvent.clientY-e.originalEvent.layerY]}},0)};break;case"switch":m.switchClick=function(){a({id:m.item.id,value:!m.item.value},0)};break;case"dropdown":m.searchTerm="",m.selectAll=!1,m.changed=!1,m.itemChanged=function(){m.searchTerm="",m.item.multiple?m.changed=!0:m.valueChanged(0)},m.checkAll=function(){var e=m.item.options.filter(function(e){return e.label.toLowerCase().includes(m.searchTerm.toLowerCase())});m.item.value=m.selectAll?e.map(function(e){return e.value}):[],m.valueChanged(0)},m.closed=function(){m.changed&&(m.changed=!1,m.valueChanged(0))},(m.item.me=m).processInput=function(e){o(e)};break;case"numeric":function i(e){m.item.value=parseFloat(m.item.value),isNaN(m.item.value)&&(m.item.value=m.item.min),0m.item.min&&(m.item.value=Math.round(1e4*Math.max(m.item.value+e,m.item.min))/1e4),m.item.value>m.item.max)&&(m.item.value=m.item.max)}var e=9.5*(Math.round(1e4*(m.item.min+m.item.step))/1e4).toString().length,t=9.5*(Math.round(1e4*(m.item.max+m.item.step))/1e4).toString().length,n=(m.item.minWidth=tm.item.max&&(m.item.value=m.item.max),u.emit({id:m.item.id,value:m.item.value}))},m.periodicChange=function(e){i(e);var t=0;n=r(function(){75<++t?i(250*e):50m.item.max)&&(m.item.value=m.item.max),e.originalEvent.deltaY<0&&(m.item.value-=m.item.step,m.item.value',c.$watchGroup(["me.item.min","me.item.max","me.item.units","me.item.waveoptions","me.item.options"],function(){m&&m();var o=liquidFillGaugeDefaultSettings(),e=(o.minValue=l.min,o.maxValue=l.max,o.units=l.units,o.textVertPosition=.33,o.waveHeight=.09,o.waveRise=!1,o.waveCount=2,o.displayPercent=!1,l.waveoptions);o.circleColor=e.circleColor[g],o.waveColor=e.waveColor[g],o.textColor=e.textColor[g],o.waveTextColor=e.waveTextColor[g],void 0===o.circleColor&&(o.circleColor=t),void 0===o.waveColor&&(o.waveColor=t),void 0===o.textColor&&(o.textColor=s),void 0===o.waveTextColor&&(o.waveTextColor=s),null!==l.options&&Object.keys(l.options).forEach(function(e){o[e]=l.options[e]}),r=loadLiquidFillGauge("gauge"+n,l.value,o),m=c.$watch("me.item.value",function(e){e=l.getText(),!isNaN(e)&&""!==e||(e=o.minValue),r.update(e)})})):c.$watchGroup(["me.item.min","me.item.max","me.item.seg1","me.item.seg2","me.item.colors","me.item.reverse","me.item.options"],function(){m&&m(),document.getElementById("gauge_"+n).innerHTML="";var e,o,t,i={id:"gauge_"+n,value:l.value,min:l.min,max:l.max,reverse:l.reverse,hideMinMax:l.hideMinMax,differential:l.diff,levelColors:l.reverse?l.colors.reverse():l.colors,valueMinFontSize:12,minLabelMinFontSize:8,labelMinFontSize:8,titleFontFamily:"inherit",valueFontFamily:"inherit",label:l.units,pointer:!0,relativeGaugeSize:!1,textRenderer:function(){return l.getText()||""}},a=("donut"===l.gtype&&(i.donut=!0,i.pointer=!1),void 0===i.gaugeWidthScale&&delete i.gaugeWidthScale,void 0===i.gaugeColor&&(i.gaugeColor="rgba(127,127,127,0.5)"),void 0===i.pointerOptions&&(i.pointerOptions={color:u}),"compass"===l.gtype?(i.donut=!0,i.gaugeWidthScale=.3,i.pointer=!0,i.refreshAnimationTime=5,i.pointerOptions={toplength:12,bottomlength:16,bottomwidth:8,color:void 0},i.gaugeColor=l.gageoptions.compassColor[g],i.levelColors=[l.gageoptions.compassColor[g]],void 0===i.gaugeColor&&(i.gaugeColor=s),void 0===i.pointerOptions.color&&(i.pointerOptions.color=s)):(e=l.seg1,o=l.seg2,isNaN(parseFloat(e))||isNaN(parseFloat(o))||(t=l.colors,i.customSectors={percents:!1,ranges:[{color:t[0],lo:i.min,hi:e},{color:t[1],lo:e,hi:o},{color:t[2],lo:o,hi:i.max}]},i.noGradient=!0)),i.valueFontColor=l.gageoptions.valueFontColor[g],i.labelFontColor=l.gageoptions.valueFontColor[g],null!==l.options&&Object.keys(l.options).forEach(function(e){i[e]=l.options[e]}),(r=new JustGage(i)).refreshLabel=function(e){e&&"string"==typeof e&&this.txtLabel.attr({text:e})},"");m=c.$watch("me.item.value",function(e){"object"==typeof e&&(e=l.getText()),isNaN(e=parseFloat(e))&&(e=i.min),l.getUnits()!==a&&(a=l.getUnits(),i.label=a,r.refreshLabel(a)),r.refresh(e)})})})},5)}}}]); +function loadConfiguration(n,a){var l=a.config||{data:[],series:[],labels:[],nodata:!0},e=a.$eval("me.item"),o=parseFloat(e.ymin),t=parseFloat(e.ymax),i=e.xformat,s=a.$eval("main.selectedTab.theme.themeState"),r=e.useUTC||!1;l.options={animation:e.animation,spanGaps:e.spanGaps,scales:{},legend:!1,responsive:!0,maintainAspectRatio:!1,useDifferentColor:e.useDifferentColor},"pie"===n&&(l.options.cutoutPercentage=e.cutout||0,l.options.elements={arc:{borderWidth:0}});var c,u,p,d,g=(e.colors||["#1F77B4","#AEC7E8","#FF7F0E","#2CA02C","#98DF8A","#D62728","#FF9896","#9467BD","#C5B0D5"]).concat(["#7EB3C6","#BB9A61","#3F8FB9","#57A13F","#BC5879","#6DC2DF","#D7D185","#91CA96","#DEB64D","#31615A","#B46E3F","#9B2FAA","#61A240","#AA3167","#9D6D5E","#3498DB","#EC7063","#DAF7A6","#FFC300","#D98880","#48C9B0","#7FB3D5","#F9E79F","#922B21"]);if(l.colours=l.colours||g,a.barColours=[],a.lineColours=[],g.forEach(function(e,o){a.lineColours.push({backgroundColor:e,borderColor:e}),a.barColours.push({backgroundColor:g,borderColor:"#888",borderWidth:1})}),"line"===n)switch(l.options.scales.xAxes=[{type:"time",scaleLabel:{fontColor:"#fff",display:!0}}],"auto"!==i&&(l.options.scales.xAxes[0].time={displayFormats:{millisecond:i,second:i,minute:i,hour:i,day:i,week:i,month:i,quarter:i,year:i}}),!0===r&&(l.options.scales.xAxes[0].time.parser=function(e){return moment.utc(e)}),l.options.tooltips={mode:"x-axis",position:"cursor",bodyFontSize:10,bodySpacing:0,callbacks:{title:function(e,o){var a=e[0].xLabel,a=new Date(a).getTime();if(isNaN(a)||a<1e6)return a;for(var t=1;ta&&(a=e[t].xLabel);var s=moment(a);return!0===r&&(s=moment.utc(a)),"auto"!==i?s.format(i):s.calendar(null,{sameDay:"HH:mm:ss",nextDay:"HH:mm",lastDay:"HH:mm",lastWeek:"MMM D, hA",sameElse:"lll"})}}},l.options.hover={mode:"x-axis"},l.options.elements={line:{fill:!1},point:{radius:e.dot?2:0,hitRadius:4,hoverRadius:4}},e.interpolate){case"cubic":l.options.elements.line.cubicInterpolationMode="default";break;case"monotone":l.options.elements.line.cubicInterpolationMode="monotone";break;case"linear":l.options.elements.line.tension=0;break;case"bezier":l.options.elements.line.tension=.4;break;case"step":l.options.elements.line.stepped=!0}else"bar"===n||"horizontalBar"===n?l.options.scales.xAxes=[{}]:"radar"===n&&(l.options={scale:{ticks:{beginAtZero:!0,showLabelBackdrop:!1}}},isNaN(o)||(l.options.scale.ticks.min=o),isNaN(t)||(l.options.scale.ticks.max=t),s)&&(d=s["widget-textColor"].value,c="rgba("+(p=tinycolor(d).toRgb()).r+","+p.g+","+p.b+",0.1)",u="rgba("+p.r+","+p.g+","+p.b+",0.3)",p="rgba("+p.r+","+p.g+","+p.b+",0.6)",l.options.scale.ticks.fontColor=p,l.options.scale.ticks.fontSize=8,l.options.scale.pointLabels={fontColor:d,fontSize:14},l.options.scale.gridLines={color:c},l.options.scale.angleLines={color:u});return"pie"!==n&&"polar-area"!==n&&"radar"!==n&&(l.options.scales.yAxes=[{}],l.options.scales.xAxes[0].ticks={},l.options.scales.yAxes[0].ticks={},"line"!==n&&"bar"!==n||(l.options.scales.yAxes[0].ticks.autoSkip=!0,l.options.scales.yAxes[0].ticks.callback=function(e,o,a){var t=navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.language;return e.toLocaleString(t)},isNaN(o)||(l.options.scales.yAxes[0].ticks.min=o),isNaN(t)||(l.options.scales.yAxes[0].ticks.max=t),isNaN(o)||isNaN(t)||(l.options.scales.yAxes[0].ticks.stepSize=(t-o)/4),"bar"===n&&(l.options.scales.yAxes[0].ticks.beginAtZero=!0)),"horizontalBar"===n&&(l.options.scales.xAxes[0].ticks.beginAtZero=!0,isNaN(o)||(l.options.scales.xAxes[0].ticks.min=o),isNaN(t)||(l.options.scales.xAxes[0].ticks.max=t),l.options.scales.xAxes[0].ticks.callback=function(e,o,a){var t=navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.language;return e.toLocaleString(t)}),s&&(l.options.scales.xAxes[0].ticks.fontColor=l.options.scales.yAxes[0].ticks.fontColor=s["widget-textColor"].value,d="rgba("+(p=tinycolor(s["widget-textColor"].value).toRgb()).r+","+p.g+","+p.b+",0.1)",l.options.scales.xAxes[0].gridLines=l.options.scales.yAxes[0].gridLines={color:d,zeroLineColor:d}),l.options.scales.xAxes[0].ticks.maxRotation=0,l.options.scales.xAxes[0].ticks.autoSkipPadding=4,l.options.scales.xAxes[0].ticks.autoSkip=!0),!0!==e.legend&&"true"!==e.legend||(l.overrides=[],l.options.legend={display:!0,position:"top",labels:{boxWidth:10,fontSize:12,padding:8},onClick:function(e,o){var a,t=o.datasetIndex||0,s=this.chart;if("pie"===n||"polar-area"===n)for(var i=0;ir.config.data.length&&r.config.data.push([]),t.remove&&r.config.data[o].splice(0,t.remove),r.config.data[o].push(t.values.data)}else{if("line"===n){if(void 0===t.values.data[0][0]){for(var a=!1,s=1;st.y?1:n.x-t.x}function intersectBlock(n,t){return!(t.x>n.x||t.x+t.wn.y+n.h||t.y+t.h=a.x&&x.y<=a.y&&x.y+x.h>=a.y){y=!1;break}}y&&(w[c]=a,f.push(a))}c=i.x+":"+(i.y+o+p.gy),w[c]||(f.push({x:i.x,y:i.y+o+p.gy,w:i.w,h:i.h,used:!1}),w[c]=f[f.length-1]),i.w=r,i.h=o;break}}}e||(d.forEach(function(n){l=Math.max(l,n.y+n.h)}),(n=w["0:"+(l+p.gy)])||(n={x:0,y:l+p.gy},w["0:"+(l+p.gy)]=n),n.used=!0,n.group=t,n.assigned=!0,n.w=r,n.h=o,f.push(n),d.push(n),c="0:"+(n.y+o+p.gy),w[c])||(f.push({x:0,y:n.y+o+p.gy,w:g,h:1/0}),w[c]=f[f.length-1]),f.sort(blockSort)}),d.forEach(function(n){t=Math.max(t,n.x+n.w),l=Math.max(l,n.y+n.h)}),r=Math.max(0,p.gx+(g-t)/2),d.forEach(function(n){n.group.css({left:r+n.x,top:n.y}).addClass("visible")}),o.css("min-height",l+p.gy+3),e=!1},10))}}angular.module("ui").directive("uiMasonry",["$window",function(e){return{restrict:"A",controller:MasonryController,link:function(n,t,r,o){o.init(t),angular.element(e).on("resize",function(){o.refreshLayout()})}}}]),MasonryController.$inject=["uiSizes","$timeout"]; +var iconFontOddEven=!1;angular.module("ui").directive("uiIcon",function(){var o=/^https?:\/\//i,t=/^fa-/i,c=/^wi-/i,e=/^mi-/i,a=/^icofont-/i,r=/^iconify-/i;return{restrict:"E",templateUrl:"components/ui-icon/ui-icon.html",scope:{icon:"@"},link:function(n){n.$watch("icon",function(i){""!==i&&(t.test(i)?n.iconType="fa":c.test(i)?n.iconType="wi":e.test(i)?n.iconType="mi":a.test(i)?n.iconType="icofont":r.test(i)?(n.iconType=iconFontOddEven?"iconify":"iconify1",iconFontOddEven=!iconFontOddEven):o.test(i)?(n.iconType="image",n.url=i):n.iconType="angular-material")})}}}); +angular.module("ui").filter("chartGetRange",function(){return function(n,t){t=[parseFloat(t[0]),parseFloat(t[1])];var a=0<=Math.abs(t[0])?t[0]:d3.min(n,function(n){return d3.min(n.values,function(n){return n[1]})}),t=0<=Math.abs(t[1])?t[1]:d3.max(n,function(n){return d3.max(n.values,function(n){return n[1]})});return[Math.floor(a),Math.ceil(t)]}}); +angular.module("ui").filter("trusted",["$sce",function(u){return function(t){return u.trustAsHtml(t)}}]); +angular.module("ui").filter("spaceToUnderscore",function(){return function(e){return e.replace(/ /g,"_")}}),angular.module("ui").filter("underscoreToSpace",function(){return function(e){return e.replace(/_/g," ")}}); angular.module("ui").run(["$templateCache",function(e){e.put("logout.html",'