if(Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(n){var i,u,f,t,r;if(this==null)throw new TypeError('"this" is null or not defined');if(i=Object(this),u=i.length>>>0,typeof n!="function")throw new TypeError("predicate must be a function");for(f=arguments[1],t=0;t<u;){if(r=i[t],n.call(f,r,t,i))return r;t++}return undefined}}),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(n){var i,r,u,t,f;if(this==null)throw new TypeError('"this" is null or not defined');if(i=Object(this),r=i.length>>>0,typeof n!="function")throw new TypeError("predicate must be a function");for(u=arguments[1],t=0;t<r;){if(f=i[t],n.call(u,f,t,i))return t;t++}return-1},configurable:!0,writable:!0}),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(n,t){function e(n,t){return n===t||typeof n=="number"&&typeof t=="number"&&isNaN(n)&&isNaN(t)}var f,i,r,u;if(this==null)throw new TypeError('"this" is null or not defined');if(f=Object(this),i=f.length>>>0,i===0)return!1;for(r=t|0,u=Math.max(r>=0?r:i-Math.abs(r),0);u<i;){if(e(f[u],n))return!0;u++}return!1}}),Array.prototype.every||(Array.prototype.every=function(n,t){"use strict";var u,i,r,f,e,o;if(this==null)throw new TypeError("this is null or not defined");if(r=Object(this),f=r.length>>>0,typeof n!="function")throw new TypeError;for(arguments.length>1&&(u=t),i=0;i<f;){if(i in r&&(e=r[i],o=n.call(u,e,i,r),!o))return!1;i++}return!0}),Number.isInteger=Number.isInteger||function(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n},String.prototype.repeat||(String.prototype.repeat=function(n){"use strict";var t,i,r;if(this==null)throw new TypeError("can't convert "+this+" to object");if(t=""+this,n=+n,n!=n&&(n=0),n<0)throw new RangeError("repeat count must be non-negative");if(n==Infinity)throw new RangeError("repeat count must be less than infinity");if(n=Math.floor(n),t.length==0||n==0)return"";if(t.length*n>=268435456)throw new RangeError("repeat count must not overflow maximum string size");for(i="",r=0;r<n;r++)i+=t;return i}),angular.module("ng-directives-utils.transcludeReplace",[]).directive("ngTranscludeReplace",["$log",function(n){return{terminal:!0,restrict:"EA",link:function(t,i,r,u,f){if(!f){n.error("orphan","Illegal use of lgTranscludeReplace directive in the template! No parent directive that requires a transclusion found. ");return}f(function(n){n.length?i.replaceWith(n):i.remove()})}}}]),jQuery.easing.jswing=jQuery.easing.swing,jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(n,t,i,r,u){return jQuery.easing[jQuery.easing.def](n,t,i,r,u)},easeInQuad:function(n,t,i,r,u){return r*(t/=u)*t+i},easeOutQuad:function(n,t,i,r,u){return-r*(t/=u)*(t-2)+i},easeInOutQuad:function(n,t,i,r,u){return(t/=u/2)<1?r/2*t*t+i:-r/2*(--t*(t-2)-1)+i},easeInCubic:function(n,t,i,r,u){return r*(t/=u)*t*t+i},easeOutCubic:function(n,t,i,r,u){return r*((t=t/u-1)*t*t+1)+i},easeInOutCubic:function(n,t,i,r,u){return(t/=u/2)<1?r/2*t*t*t+i:r/2*((t-=2)*t*t+2)+i},easeInQuart:function(n,t,i,r,u){return r*(t/=u)*t*t*t+i},easeOutQuart:function(n,t,i,r,u){return-r*((t=t/u-1)*t*t*t-1)+i},easeInOutQuart:function(n,t,i,r,u){return(t/=u/2)<1?r/2*t*t*t*t+i:-r/2*((t-=2)*t*t*t-2)+i},easeInQuint:function(n,t,i,r,u){return r*(t/=u)*t*t*t*t+i},easeOutQuint:function(n,t,i,r,u){return r*((t=t/u-1)*t*t*t*t+1)+i},easeInOutQuint:function(n,t,i,r,u){return(t/=u/2)<1?r/2*t*t*t*t*t+i:r/2*((t-=2)*t*t*t*t+2)+i},easeInSine:function(n,t,i,r,u){return-r*Math.cos(t/u*(Math.PI/2))+r+i},easeOutSine:function(n,t,i,r,u){return r*Math.sin(t/u*(Math.PI/2))+i},easeInOutSine:function(n,t,i,r,u){return-r/2*(Math.cos(Math.PI*t/u)-1)+i},easeInExpo:function(n,t,i,r,u){return t==0?i:r*Math.pow(2,10*(t/u-1))+i},easeOutExpo:function(n,t,i,r,u){return t==u?i+r:r*(-Math.pow(2,-10*t/u)+1)+i},easeInOutExpo:function(n,t,i,r,u){return t==0?i:t==u?i+r:(t/=u/2)<1?r/2*Math.pow(2,10*(t-1))+i:r/2*(-Math.pow(2,-10*--t)+2)+i},easeInCirc:function(n,t,i,r,u){return-r*(Math.sqrt(1-(t/=u)*t)-1)+i},easeOutCirc:function(n,t,i,r,u){return r*Math.sqrt(1-(t=t/u-1)*t)+i},easeInOutCirc:function(n,t,i,r,u){return(t/=u/2)<1?-r/2*(Math.sqrt(1-t*t)-1)+i:r/2*(Math.sqrt(1-(t-=2)*t)+1)+i},easeInElastic:function(n,t,i,r,u){var o=1.70158,f=0,e=r;return t==0?i:(t/=u)==1?i+r:(f||(f=u*.3),e<Math.abs(r)?(e=r,o=f/4):o=f/(2*Math.PI)*Math.asin(r/e),-(e*Math.pow(2,10*(t-=1))*Math.sin((t*u-o)*2*Math.PI/f))+i)},easeOutElastic:function(n,t,i,r,u){var o=1.70158,f=0,e=r;return t==0?i:(t/=u)==1?i+r:(f||(f=u*.3),e<Math.abs(r)?(e=r,o=f/4):o=f/(2*Math.PI)*Math.asin(r/e),e*Math.pow(2,-10*t)*Math.sin((t*u-o)*2*Math.PI/f)+r+i)},easeInOutElastic:function(n,t,i,r,u){var o=1.70158,f=0,e=r;return t==0?i:(t/=u/2)==2?i+r:(f||(f=u*.3*1.5),e<Math.abs(r)?(e=r,o=f/4):o=f/(2*Math.PI)*Math.asin(r/e),t<1)?-.5*e*Math.pow(2,10*(t-=1))*Math.sin((t*u-o)*2*Math.PI/f)+i:e*Math.pow(2,-10*(t-=1))*Math.sin((t*u-o)*2*Math.PI/f)*.5+r+i},easeInBack:function(n,t,i,r,u,f){return f==undefined&&(f=1.70158),r*(t/=u)*t*((f+1)*t-f)+i},easeOutBack:function(n,t,i,r,u,f){return f==undefined&&(f=1.70158),r*((t=t/u-1)*t*((f+1)*t+f)+1)+i},easeInOutBack:function(n,t,i,r,u,f){return(f==undefined&&(f=1.70158),(t/=u/2)<1)?r/2*t*t*(((f*=1.525)+1)*t-f)+i:r/2*((t-=2)*t*(((f*=1.525)+1)*t+f)+2)+i},easeInBounce:function(n,t,i,r,u){return r-jQuery.easing.easeOutBounce(n,u-t,0,r,u)+i},easeOutBounce:function(n,t,i,r,u){return(t/=u)<1/2.75?r*7.5625*t*t+i:t<2/2.75?r*(7.5625*(t-=1.5/2.75)*t+.75)+i:t<2.5/2.75?r*(7.5625*(t-=2.25/2.75)*t+.9375)+i:r*(7.5625*(t-=2.625/2.75)*t+.984375)+i},easeInOutBounce:function(n,t,i,r,u){return t<u/2?jQuery.easing.easeInBounce(n,t*2,0,r,u)*.5+i:jQuery.easing.easeOutBounce(n,t*2-u,0,r,u)*.5+r*.5+i}}),"undefined"==typeof net)var net={};net.brehaut||(net.brehaut={}),function(){"use strict";function o(n,t){var i,r,u;for(n=n.toString(),i=[],r=0,u=Math.max(t-n.length,0);r<u;r++)i.push("0");return i.push(n),i.join("")}function s(n){return n.slice(0,1).toUpperCase()+n.slice(1)}function h(n){return n.replace(/^\s+|\s+$/g,"")}function n(n){return function(){var t=this.clone();return n.apply(t,arguments),t}}function c(n,r){function h(n){return function(){return n.apply(this[w](),arguments)}}function y(){}function c(){return new y}var f=e(i),l=[],w="to"+s(n),u,o,a,v;for(u in r)if(r.hasOwnProperty(u)){if(f[u]=r[u],o=f[u],u.slice(0,1)=="_")continue;u in i||"function"!=typeof o?"function"!=typeof o&&(l.push(u),a="get"+s(u),v="set"+s(u),i[a]=h(f[a]=function(n){return function(){return this[n]}}(u)),i[v]=h(f[v]=function(n){return function(t){var i=this.clone();return i[n]=t,i}}(u))):i[u]=h(o)}return y.prototype=f,t[n]=c,f.clone=function(){for(var n,i=c(),t=0,r=l.length;t<r;t++)n=l[t],i[n]=this[n];return i},i[w]=function(){return c()},p.push(f),f}function l(n){return i.fromObject(n)}var w={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",darkgreen:"#006400",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:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",lightgreen:"#90EE90",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370D8",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#D87093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"},u="(?:\\+|-)?\\d+",a="(?:\\+|-)?\\d*\\.\\d+",r="(?:"+u+")|(?:"+a+")",e,v;u="("+u+")";a="("+a+")";r="("+r+")";var f=r+"%",y="\\s*?",b=new RegExp(["^hsl(a?)\\(",r,",",f,",",f,"(,(",r,"))?\\)$"].join(y)),k=new RegExp(["^rgb(a?)\\(",u,",",u,",",u,"(,(",r,"))?\\)$"].join(y)),d=new RegExp(["^rgb(a?)\\(",f,",",f,",",f,"(,(",r,"))?\\)$"].join(y)),i,p=[],t={};this.object||(this.object=function(n){function t(){}return t.prototype=n,new t});e=this.object;i={fromObject:function(n){var t,u,r;if(!n)return e(i);for(t=0,u=p.length;t<u;t++)if(r=p[t].fromObject(n),r)return r;return e(i)},toString:function(){return this.toCSS()}};v=null;c("RGB",{red:0,green:0,blue:0,alpha:0,getLuminance:function(){return this.red*.2126+this.green*.7152+this.blue*.0722},blend:function(n,t){n=n.toRGB();t=Math.min(Math.max(t,0),1);var i=this.clone();return i.red=i.red*(1-t)+n.red*t,i.green=i.green*(1-t)+n.green*t,i.blue=i.blue*(1-t)+n.blue*t,i.alpha=i.alpha*(1-t)+n.alpha*t,i},fromObject:function(n){return n instanceof Array?this._fromRGBArray(n):"string"==typeof n?this._fromCSS(h(n)):n.hasOwnProperty("red")&&n.hasOwnProperty("green")&&n.hasOwnProperty("blue")?this._fromRGB(n):void 0},_stringParsers:[function(n){function i(i,r){var u=n.match(i),f;return!u||!!u[1]+!!u[5]==1?null:(f=t.RGB(),f.red=Math.min(1,Math.max(0,u[2]/r)),f.green=Math.min(1,Math.max(0,u[3]/r)),f.blue=Math.min(1,Math.max(0,u[4]/r)),f.alpha=u[5]?Math.min(Math.max(parseFloat(u[6]),0),1):1,f)}n=h(n);var r=i(k,255);return r?r:i(d,100)},function(n){var f=n.toLowerCase();if(f in w&&(n=w[f]),n.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/)){n=n.replace(/^#/,"");var i=n.length/3,u=Math.pow(16,i)-1,r=t.RGB();return r.red=parseInt(n.slice(0,i),16)/u,r.green=parseInt(n.slice(i*1,i*2),16)/u,r.blue=parseInt(n.slice(i*2),16)/u,r.alpha=1,r}},function(n){if(n.toLowerCase()==="transparent")return v}],_fromCSS:function(n){for(var t=null,i=0,r=this._stringParsers.length;i<r;i++)if(t=this._stringParsers[i](n),t)return t},_fromRGB:function(n){var i=t.RGB();return i.red=n.red,i.green=n.green,i.blue=n.blue,i.alpha=n.hasOwnProperty("alpha")?n.alpha:1,i},_fromRGBArray:function(n){var i=t.RGB();return i.red=Math.max(0,Math.min(1,n[0]/255)),i.green=Math.max(0,Math.min(1,n[1]/255)),i.blue=Math.max(0,Math.min(1,n[2]/255)),i.alpha=n[3]!==undefined?Math.max(0,Math.min(1,n[3])):1,i},toCSSHex:function(n){n=n||2;var t=Math.pow(16,n)-1,i=["#",o(Math.round(this.red*t).toString(16).toUpperCase(),n),o(Math.round(this.green*t).toString(16).toUpperCase(),n),o(Math.round(this.blue*t).toString(16).toUpperCase(),n)];return i.join("")},toCSS:function(n){if(this.alpha===1)return this.toCSSHex(n);var t=255,i=["rgba(",Math.max(0,Math.min(t,Math.round(this.red*t))),",",Math.max(0,Math.min(t,Math.round(this.green*t))),",",Math.max(0,Math.min(t,Math.round(this.blue*t))),",",Math.max(0,Math.min(1,this.alpha)),")"];return i.join("")},toHSV:function(){var n=t.HSV(),u,i,r;return u=Math.min(this.red,this.green,this.blue),i=Math.max(this.red,this.green,this.blue),n.value=i,r=i-u,r==0?n.hue=n.saturation=0:(n.saturation=r/i,n.hue=this.red==i?(this.green-this.blue)/r:this.green==i?2+(this.blue-this.red)/r:4+(this.red-this.green)/r,n.hue=(n.hue*60+360)%360),n.alpha=this.alpha,n},toHSL:function(){return this.toHSV().toHSL()},toRGB:function(){return this.clone()}});v=i.fromObject({red:0,blue:0,green:0,alpha:0});c("HSV",{hue:0,saturation:0,value:1,alpha:1,shiftHue:n(function(n){var t=(this.hue+n)%360;t<0&&(t=(360+t)%360);this.hue=t}),devalueByAmount:n(function(n){this.value=Math.min(1,Math.max(this.value-n,0))}),devalueByRatio:n(function(n){this.value=Math.min(1,Math.max(this.value*(1-n),0))}),valueByAmount:n(function(n){this.value=Math.min(1,Math.max(this.value+n,0))}),valueByRatio:n(function(n){this.value=Math.min(1,Math.max(this.value*(1+n),0))}),desaturateByAmount:n(function(n){this.saturation=Math.min(1,Math.max(this.saturation-n,0))}),desaturateByRatio:n(function(n){this.saturation=Math.min(1,Math.max(this.saturation*(1-n),0))}),saturateByAmount:n(function(n){this.saturation=Math.min(1,Math.max(this.saturation+n,0))}),saturateByRatio:n(function(n){this.saturation=Math.min(1,Math.max(this.saturation*(1+n),0))}),schemeFromDegrees:function(n){for(var t,r=[],i=0,u=n.length;i<u;i++)t=this.clone(),t.hue=(this.hue+n[i])%360,r.push(t);return r},complementaryScheme:function(){return this.schemeFromDegrees([0,180])},splitComplementaryScheme:function(){return this.schemeFromDegrees([0,150,320])},splitComplementaryCWScheme:function(){return this.schemeFromDegrees([0,150,300])},splitComplementaryCCWScheme:function(){return this.schemeFromDegrees([0,60,210])},triadicScheme:function(){return this.schemeFromDegrees([0,120,240])},clashScheme:function(){return this.schemeFromDegrees([0,90,270])},tetradicScheme:function(){return this.schemeFromDegrees([0,90,180,270])},fourToneCWScheme:function(){return this.schemeFromDegrees([0,60,180,240])},fourToneCCWScheme:function(){return this.schemeFromDegrees([0,120,180,300])},fiveToneAScheme:function(){return this.schemeFromDegrees([0,115,155,205,245])},fiveToneBScheme:function(){return this.schemeFromDegrees([0,40,90,130,245])},fiveToneCScheme:function(){return this.schemeFromDegrees([0,50,90,205,320])},fiveToneDScheme:function(){return this.schemeFromDegrees([0,40,155,270,310])},fiveToneEScheme:function(){return this.schemeFromDegrees([0,115,230,270,320])},sixToneCWScheme:function(){return this.schemeFromDegrees([0,30,120,150,240,270])},sixToneCCWScheme:function(){return this.schemeFromDegrees([0,90,120,210,240,330])},neutralScheme:function(){return this.schemeFromDegrees([0,15,30,45,60,75])},analogousScheme:function(){return this.schemeFromDegrees([0,30,60,90,120,150])},fromObject:function(n){if(n.hasOwnProperty("hue")&&n.hasOwnProperty("saturation")&&n.hasOwnProperty("value")){var i=t.HSV();return i.hue=n.hue,i.saturation=n.saturation,i.value=n.value,i.alpha=n.hasOwnProperty("alpha")?n.alpha:1,i}return null},_normalise:function(){this.hue%=360;this.saturation=Math.min(Math.max(0,this.saturation),1);this.value=Math.min(Math.max(0,this.value));this.alpha=Math.min(1,Math.max(0,this.alpha))},toRGB:function(){var n,f,e,i,r,u,o;if(this._normalise(),n=t.RGB(),this.saturation===0)return n.red=this.value,n.green=this.value,n.blue=this.value,n.alpha=this.alpha,n;o=this.hue/60;f=Math.floor(o);e=o-f;i=this.value*(1-this.saturation);r=this.value*(1-this.saturation*e);u=this.value*(1-this.saturation*(1-e));switch(f){case 0:n.red=this.value;n.green=u;n.blue=i;break;case 1:n.red=r;n.green=this.value;n.blue=i;break;case 2:n.red=i;n.green=this.value;n.blue=u;break;case 3:n.red=i;n.green=r;n.blue=this.value;break;case 4:n.red=u;n.green=i;n.blue=this.value;break;default:n.red=this.value;n.green=i;n.blue=r}return n.alpha=this.alpha,n},toHSL:function(){var i,n,r;return this._normalise(),i=t.HSL(),i.hue=this.hue,n=(2-this.saturation)*this.value,r=this.saturation*this.value,n&&2-n&&(r/=n<=1?n:2-n),n/=2,i.saturation=r,i.lightness=n,i.alpha=this.alpha,i},toHSV:function(){return this.clone()}});c("HSL",{hue:0,saturation:0,lightness:0,alpha:1,darkenByAmount:n(function(n){this.lightness=Math.min(1,Math.max(this.lightness-n,0))}),darkenByRatio:n(function(n){this.lightness=Math.min(1,Math.max(this.lightness*(1-n),0))}),lightenByAmount:n(function(n){this.lightness=Math.min(1,Math.max(this.lightness+n,0))}),lightenByRatio:n(function(n){this.lightness=Math.min(1,Math.max(this.lightness*(1+n),0))}),fromObject:function(n){return"string"==typeof n?this._fromCSS(n):n.hasOwnProperty("hue")&&n.hasOwnProperty("saturation")&&n.hasOwnProperty("lightness")?this._fromHSL(n):void 0},_fromCSS:function(n){var i=h(n).match(b),r;return!i||!!i[1]+!!i[5]==1?null:(r=t.HSL(),r.hue=(i[2]%360+360)%360,r.saturation=Math.max(0,Math.min(parseInt(i[3],10)/100,1)),r.lightness=Math.max(0,Math.min(parseInt(i[4],10)/100,1)),r.alpha=i[5]?Math.max(0,Math.min(1,parseFloat(i[6]))):1,r)},_fromHSL:function(n){var i=t.HSL();return i.hue=n.hue,i.saturation=n.saturation,i.lightness=n.lightness,i.alpha=n.hasOwnProperty("alpha")?n.alpha:1,i},_normalise:function(){this.hue=(this.hue%360+360)%360;this.saturation=Math.min(Math.max(0,this.saturation),1);this.lightness=Math.min(Math.max(0,this.lightness));this.alpha=Math.min(1,Math.max(0,this.alpha))},toHSL:function(){return this.clone()},toHSV:function(){var n,i,r;return this._normalise(),n=t.HSV(),n.hue=this.hue,i=2*this.lightness,r=this.saturation*(i<=1?i:2-i),n.value=(i+r)/2,n.saturation=2*r/(i+r)||0,n.alpha=this.alpha,n},toRGB:function(){return this.toHSV().toRGB()}});l.isValid=function(n){var t,i=l(n),r=0;for(t in i)i.hasOwnProperty(t)&&r++;return r>0};net.brehaut.Color=l}.call(net.brehaut);typeof module!="undefined"&&(module.exports=net.brehaut.Color);angular.module("directives.viewBox",[]).directive("viewBox",[function(){"use strict";return{link:function(n,t,i){i.$observe("viewBox",function(n){t.get(0).setAttribute("viewBox",n)})}}}]),function(n,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():n.gyro=t()}(this,function(){var n={x:null,y:null,z:null,alpha:null,beta:null,gamma:null},t={x:0,y:0,z:0,alpha:0,beta:0,gamma:0},r=null,i=[],u={frequency:500,calibrate:function(){for(var i in n)t[i]="number"==typeof n[i]?n[i]:0},getOrientation:function(){return n},startTracking:function(t){r=setInterval(function(){t(n)},u.frequency)},stopTracking:function(){clearInterval(r)},hasFeature:function(n){for(var t in i)if(n==i[t])return!0;return!1},getFeatures:function(){return i}};return window&&window.addEventListener&&function(){function r(u){i.push("MozOrientation");u.target.removeEventListener("MozOrientation",r,!0);u.target.addEventListener("MozOrientation",function(i){n.x=i.x-t.x;n.y=i.y-t.y;n.z=i.z-t.z},!0)}function u(r){i.push("devicemotion");r.target.removeEventListener("devicemotion",u,!0);r.target.addEventListener("devicemotion",function(i){n.x=i.accelerationIncludingGravity.x-t.x;n.y=i.accelerationIncludingGravity.y-t.y;n.z=i.accelerationIncludingGravity.z-t.z},!0)}function f(r){i.push("deviceorientation");r.target.removeEventListener("deviceorientation",f,!0);r.target.addEventListener("deviceorientation",function(i){n.alpha=i.alpha-t.alpha;n.beta=i.beta-t.beta;n.gamma=i.gamma-t.gamma},!0)}window.addEventListener("MozOrientation",r,!0);window.addEventListener("devicemotion",u,!0);window.addEventListener("deviceorientation",f,!0)}(),u}),function(){"use strict";var n={backspace:8,tab:9,enter:13,escape:27,space:32,up:38,down:40,left:37,right:39,"delete":46,comma:188},i=9007199254740991,f=["text","email","url"],r='<span ng-bind="$getDisplayText()"><\/span> <a class="remove-button" ng-click="$removeTag()" ng-bind="::$$removeTagSymbol"><\/a>',u='<span ng-bind-html="$highlight($getDisplayText())"><\/span>',t=angular.module("ngTagsInput",[]);t.directive("tagsInput",["$timeout","$document","$window","$q","tagsInputConfig","tiUtil",function(t,u,e,o,s,h){function c(n,t,i,r){var u={},f,e,s,c;return f=function(t){return h.safeToString(t[n.displayProperty])},e=function(t,i){t[n.displayProperty]=i},s=function(t){var r=f(t),e=r&&r.length>=n.minLength&&r.length<=n.maxLength&&n.allowedTagsPattern.test(r)&&!h.findInObjectArray(u.items,t,n.keyProperty||n.displayProperty);return o.when(e&&i({$tag:t})).then(h.promisifyValue)},c=function(n){return o.when(r({$tag:n})).then(h.promisifyValue)},u.items=[],u.addText=function(n){var t={};return e(t,n),u.add(t)},u.add=function(i){var r=f(i);return n.replaceSpacesWithDashes&&(r=h.replaceSpacesWithDashes(r)),e(i,r),s(i).then(function(){u.items.push(i);t.trigger("tag-added",{$tag:i})}).catch(function(){r&&t.trigger("invalid-tag",{$tag:i})})},u.remove=function(n){var i=u.items[n];return c(i).then(function(){return u.items.splice(n,1),u.clearSelection(),t.trigger("tag-removed",{$tag:i}),i})},u.select=function(n){n<0?n=u.items.length-1:n>=u.items.length&&(n=0);u.index=n;u.selected=u.items[n]},u.selectPrior=function(){u.select(--u.index)},u.selectNext=function(){u.select(++u.index)},u.removeSelected=function(){return u.remove(u.index)},u.clearSelection=function(){u.selected=null;u.index=-1},u.getItems=function(){return n.useStrings?u.items.map(f):u.items},u.clearSelection(),u}function l(n){return f.indexOf(n)!==-1}return{restrict:"E",require:"ngModel",scope:{tags:"=ngModel",text:"=?",templateScope:"=?",tagClass:"&",onTagAdding:"&",onTagAdded:"&",onInvalidTag:"&",onTagRemoving:"&",onTagRemoved:"&",onTagClicked:"&"},replace:!1,transclude:!0,templateUrl:"ngTagsInput/tags-input.html",controller:["$scope","$attrs","$element",function(n,t,u){n.events=h.simplePubSub();s.load("tagsInput",n,t,{template:[String,r],type:[String,"text",l],placeholder:[String,"Add a tag"],tabindex:[Number,null],removeTagSymbol:[String,String.fromCharCode(215)],replaceSpacesWithDashes:[Boolean,!0],minLength:[Number,3],maxLength:[Number,i],addOnEnter:[Boolean,!0],addOnSpace:[Boolean,!1],addOnComma:[Boolean,!0],addOnBlur:[Boolean,!0],addOnPaste:[Boolean,!1],pasteSplitPattern:[RegExp,/,/],allowedTagsPattern:[RegExp,/.+/],enableEditingLastTag:[Boolean,!1],minTags:[Number,0],maxTags:[Number,i],displayProperty:[String,"text"],keyProperty:[String,""],allowLeftoverText:[Boolean,!1],addFromAutocompleteOnly:[Boolean,!1],spellcheck:[Boolean,!0],useStrings:[Boolean,!1]});n.tagList=new c(n.options,n.events,h.handleUndefinedResult(n.onTagAdding,!0),h.handleUndefinedResult(n.onTagRemoving,!0));this.registerAutocomplete=function(){var t=u.find("input");return{addTag:function(t){return n.tagList.add(t)},getTags:function(){return n.tagList.items},getCurrentTagText:function(){return n.newTag.text()},getOptions:function(){return n.options},getTemplateScope:function(){return n.templateScope},on:function(t,i){n.events.on(t,i,!0);return this}}};this.registerTagItem=function(){return{getOptions:function(){return n.options},removeTag:function(t){n.disabled||n.tagList.remove(t)}}}}],link:function(i,r,f,o){var p=[n.enter,n.comma,n.space,n.backspace,n.delete,n.left,n.right],c=i.tagList,l=i.events,s=i.options,y=r.find("input"),w=["minTags","maxTags","allowLeftoverText"],a,v;a=function(){o.$setValidity("maxTags",c.items.length<=s.maxTags);o.$setValidity("minTags",c.items.length>=s.minTags);o.$setValidity("leftoverText",i.hasFocus||s.allowLeftoverText?!0:!i.newTag.text())};v=function(){t(function(){y[0].focus()})};o.$isEmpty=function(n){return!n||!n.length};i.newTag={text:function(n){if(angular.isDefined(n))i.text=n,l.trigger("input-change",n);else return i.text||""},invalid:null};i.track=function(n){return n[s.keyProperty||s.displayProperty]};i.getTagClass=function(n,t){var r=n===c.selected;return[i.tagClass({$tag:n,$index:t,$selected:r}),{selected:r}]};i.$watch("tags",function(n){if(n){if(c.items=h.makeObjectArray(n,s.displayProperty),s.useStrings)return;i.tags=c.items}else c.items=[]});i.$watch("tags.length",function(){a();o.$validate()});f.$observe("disabled",function(n){i.disabled=n});i.eventHandlers={input:{keydown:function(n){l.trigger("input-keydown",n)},focus:function(){i.hasFocus||(i.hasFocus=!0,l.trigger("input-focus"))},blur:function(){t(function(){var n=u.prop("activeElement"),t=n===y[0],f=r[0].contains(n);(t||!f)&&(i.hasFocus=!1,l.trigger("input-blur"))})},paste:function(n){n.getTextData=function(){var t=n.clipboardData||n.originalEvent&&n.originalEvent.clipboardData;return t?t.getData("text/plain"):e.clipboardData.getData("Text")};l.trigger("input-paste",n)}},host:{click:function(){i.disabled||v()}},tag:{click:function(n){l.trigger("tag-clicked",{$tag:n})}}};l.on("tag-added",i.onTagAdded).on("invalid-tag",i.onInvalidTag).on("tag-removed",i.onTagRemoved).on("tag-clicked",i.onTagClicked).on("tag-added",function(){i.newTag.text("")}).on("tag-added tag-removed",function(){i.tags=c.getItems();o.$setDirty();v()}).on("invalid-tag",function(){i.newTag.invalid=!0}).on("option-change",function(n){w.indexOf(n.name)!==-1&&a()}).on("input-change",function(){c.clearSelection();i.newTag.invalid=null}).on("input-focus",function(){r.triggerHandler("focus");o.$setValidity("leftoverText",!0)}).on("input-blur",function(){s.addOnBlur&&!s.addFromAutocompleteOnly&&c.addText(i.newTag.text());r.triggerHandler("blur");a()}).on("input-keydown",function(t){var r=t.keyCode,u={},f,e,o,l;h.isModifierOn(t)||p.indexOf(r)===-1||(u[n.enter]=s.addOnEnter,u[n.comma]=s.addOnComma,u[n.space]=s.addOnSpace,f=!s.addFromAutocompleteOnly&&u[r],e=(r===n.backspace||r===n.delete)&&c.selected,l=r===n.backspace&&i.newTag.text().length===0&&s.enableEditingLastTag,o=(r===n.backspace||r===n.left||r===n.right)&&i.newTag.text().length===0&&!s.enableEditingLastTag,f?c.addText(i.newTag.text()):l?(c.selectPrior(),c.removeSelected().then(function(n){n&&i.newTag.text(n[s.displayProperty])})):e?c.removeSelected():o&&(r===n.left||r===n.backspace?c.selectPrior():r===n.right&&c.selectNext()),(f||o||e||l)&&t.preventDefault())}).on("input-paste",function(n){if(s.addOnPaste){var i=n.getTextData(),t=i.split(s.pasteSplitPattern);t.length>1&&(t.forEach(function(n){c.addText(n)}),n.preventDefault())}})}}}]);t.directive("tiTagItem",["tiUtil",function(n){return{restrict:"E",require:"^tagsInput",template:r,scope:{$scope:"=scope",data:"="},link:function(t,i,r,u){var e=u.registerTagItem(),f=e.getOptions();t.$$template=f.template;t.$$removeTagSymbol=f.removeTagSymbol;t.$getDisplayText=function(){return n.safeToString(t.data[f.displayProperty])};t.$removeTag=function(){e.removeTag(t.$index)};t.$watch("$parent.$index",function(n){t.$index=n})}}}]);t.directive("autoComplete",["$document","$timeout","$sce","$q","tagsInputConfig","tiUtil",function(t,i,r,f,e,o){function s(n,t,i){var r={},s,u,e;return e=function(){return t.tagsInput.keyProperty||t.tagsInput.displayProperty},s=function(n,i){return n.filter(function(n){return!o.findInObjectArray(i,n,e(),function(n,i){return t.tagsInput.replaceSpacesWithDashes&&(n=o.replaceSpacesWithDashes(n),i=o.replaceSpacesWithDashes(i)),o.defaultComparer(n,i)})})},r.reset=function(){u=null;r.items=[];r.visible=!1;r.index=-1;r.selected=null;r.query=null},r.show=function(){t.selectFirstMatch?r.select(0):r.selected=null;r.visible=!0},r.load=o.debounce(function(i,h){r.query=i;var c=f.when(n({$query:i}));u=c;c.then(function(n){c===u&&(n=o.makeObjectArray(n.data||n,e()),n=s(n,h),r.items=n.slice(0,t.maxResultsToShow),r.items.length>0?r.show():r.reset())})},t.debounceDelay),r.selectNext=function(){r.select(++r.index)},r.selectPrior=function(){r.select(--r.index)},r.select=function(n){n<0?n=r.items.length-1:n>=r.items.length&&(n=0);r.index=n;r.selected=r.items[n];i.trigger("suggestion-selected",n)},r.reset(),r}function h(n,t){var u=n.find("li").eq(t),i=u.parent(),r=u.prop("offsetTop"),f=u.prop("offsetHeight"),e=i.prop("clientHeight"),o=i.prop("scrollTop");r<o?i.prop("scrollTop",r):r+f>e+o&&i.prop("scrollTop",r+f-e)}return{restrict:"E",require:"^tagsInput",scope:{source:"&",matchClass:"&"},templateUrl:"ngTagsInput/auto-complete.html",controller:["$scope","$element","$attrs",function(n,t,i){n.events=o.simplePubSub();e.load("autoComplete",n,i,{template:[String,u],debounceDelay:[Number,100],minLength:[Number,3],highlightMatchedText:[Boolean,!0],maxResultsToShow:[Number,10],loadOnDownArrow:[Boolean,!1],loadOnEmpty:[Boolean,!1],loadOnFocus:[Boolean,!1],selectFirstMatch:[Boolean,!0],displayProperty:[String,""]});n.suggestionList=new s(n.source,n.options,n.events);this.registerAutocompleteMatch=function(){return{getOptions:function(){return n.options},getQuery:function(){return n.suggestionList.query}}}}],link:function(t,i,r,u){var l=[n.enter,n.tab,n.escape,n.up,n.down],f=t.suggestionList,e=u.registerAutocomplete(),s=t.options,a=t.events,c;s.tagsInput=e.getOptions();c=function(n){return n&&n.length>=s.minLength||!n&&s.loadOnEmpty};t.templateScope=e.getTemplateScope();t.addSuggestionByIndex=function(n){f.select(n);t.addSuggestion()};t.addSuggestion=function(){var n=!1;return f.selected&&(e.addTag(angular.copy(f.selected)),f.reset(),n=!0),n};t.track=function(n){return n[s.tagsInput.keyProperty||s.tagsInput.displayProperty]};t.getSuggestionClass=function(n,i){var r=n===f.selected;return[t.matchClass({$match:n,$index:i,$selected:r}),{selected:r}]};e.on("tag-added tag-removed invalid-tag input-blur",function(){f.reset()}).on("input-change",function(n){c(n)?f.load(n,e.getTags()):f.reset()}).on("input-focus",function(){var n=e.getCurrentTagText();s.loadOnFocus&&c(n)&&f.load(n,e.getTags())}).on("input-keydown",function(i){var r=i.keyCode,u=!1;if(!o.isModifierOn(i)&&l.indexOf(r)!==-1)return f.visible?r===n.down?(f.selectNext(),u=!0):r===n.up?(f.selectPrior(),u=!0):r===n.escape?(f.reset(),u=!0):(r===n.enter||r===n.tab)&&(u=t.addSuggestion()):r===n.down&&t.options.loadOnDownArrow&&(f.load(e.getCurrentTagText(),e.getTags()),u=!0),u?(i.preventDefault(),i.stopImmediatePropagation(),!1):void 0});a.on("suggestion-selected",function(n){h(i,n)})}}}]);t.directive("tiAutocompleteMatch",["$sce","tiUtil",function(n,t){return{restrict:"E",require:"^autoComplete",template:u,scope:{$scope:"=scope",data:"="},link:function(i,r,u,f){var o=f.registerAutocompleteMatch(),e=o.getOptions();i.$$template=e.template;i.$index=i.$parent.$index;i.$highlight=function(i){return e.highlightMatchedText&&(i=t.safeHighlight(i,o.getQuery())),n.trustAsHtml(i)};i.$getDisplayText=function(){return t.safeToString(i.data[e.displayProperty||e.tagsInput.displayProperty])}}}}]);t.directive("tiTranscludeAppend",function(){return function(n,t,i,r,u){u(function(n){t.append(n)})}});t.directive("tiAutosize",["tagsInputConfig",function(n){return{restrict:"A",require:"ngModel",link:function(t,i,r,u){var o=n.getTextAutosizeThreshold(),f,e;f=angular.element('<span class="input"><\/span>');f.css("display","none").css("visibility","hidden").css("width","auto").css("white-space","pre");i.parent().append(f);e=function(n){var t=n,u;return angular.isString(t)&&t.length===0&&(t=r.placeholder),t&&(f.text(t),f.css("display",""),u=f.prop("offsetWidth"),f.css("display","none")),i.css("width",u?u+o+"px":""),n};u.$parsers.unshift(e);u.$formatters.unshift(e);r.$observe("placeholder",function(n){u.$modelValue||e(n)})}}}]);t.directive("tiBindAttrs",function(){return function(n,t,i){n.$watch(i.tiBindAttrs,function(n){angular.forEach(n,function(n,t){i.$set(t,n)})},!0)}});t.provider("tagsInputConfig",function(){var n={},t={},i=3;this.setDefaults=function(t,i){return n[t]=i,this};this.setActiveInterpolation=function(n,i){return t[n]=i,this};this.setTextAutosizeThreshold=function(n){return i=n,this};this.$get=["$interpolate",function(r){var u={};return u[String]=function(n){return n},u[Number]=function(n){return parseInt(n,10)},u[Boolean]=function(n){return n.toLowerCase()==="true"},u[RegExp]=function(n){return new RegExp(n)},{load:function(i,f,e,o){var s=function(){return!0};f.options={};angular.forEach(o,function(o,h){var l,a,v,y,p,c;l=o[0];a=o[1];v=o[2]||s;y=u[l];p=function(){var t=n[i]&&n[i][h];return angular.isDefined(t)?t:a};c=function(n){f.options[h]=n&&v(n)?y(n):p()};t[i]&&t[i][h]?e.$observe(h,function(n){c(n);f.events.trigger("option-change",{name:h,newValue:n})}):c(e[h]&&r(e[h])(f.$parent))})},getTextAutosizeThreshold:function(){return i}}}]});t.factory("tiUtil",["$timeout","$q",function(n,t){var i={};return i.debounce=function(t,i){var r;return function(){var u=arguments;n.cancel(r);r=n(function(){t.apply(null,u)},i)}},i.makeObjectArray=function(n,t){if(!angular.isArray(n)||n.length===0||angular.isObject(n[0]))return n;var i=[];return n.forEach(function(n){var r={};r[t]=n;i.push(r)}),i},i.findInObjectArray=function(n,t,r,u){var f=null;return u=u||i.defaultComparer,n.some(function(n){if(u(n[r],t[r]))return f=n,!0}),f},i.defaultComparer=function(n,t){return i.safeToString(n).toLowerCase()===i.safeToString(t).toLowerCase()},i.safeHighlight=function(n,t){function r(n){return n.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}if(n=i.encodeHTML(n),t=i.encodeHTML(t),!t)return n;var u=new RegExp("&[^;]+;|"+r(t),"gi");return n.replace(u,function(n){return n.toLowerCase()===t.toLowerCase()?"<em>"+n+"<\/em>":n})},i.safeToString=function(n){return angular.isUndefined(n)||n==null?"":n.toString().trim()},i.encodeHTML=function(n){return i.safeToString(n).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},i.handleUndefinedResult=function(n,t){return function(){var i=n.apply(null,arguments);return angular.isUndefined(i)?t:i}},i.replaceSpacesWithDashes=function(n){return i.safeToString(n).replace(/\s/g,"-")},i.isModifierOn=function(n){return n.shiftKey||n.ctrlKey||n.altKey||n.metaKey},i.promisifyValue=function(n){return n=angular.isUndefined(n)?!0:n,t[n?"when":"reject"]()},i.simplePubSub=function(){var n={};return{on:function(t,i,r){return t.split(" ").forEach(function(t){n[t]||(n[t]=[]);var u=r?[].unshift:[].push;u.call(n[t],i)}),this},trigger:function(t,r){var u=n[t]||[];return u.every(function(n){return i.handleUndefinedResult(n,!0)(r)}),this}}},i}]);t.run(["$templateCache",function(n){n.put("ngTagsInput/tags-input.html",'<div class="host" tabindex="-1" ng-click="eventHandlers.host.click()" ti-transclude-append><div class="tags" ng-class="{focused: hasFocus}"><ul class="tag-list"><li class="tag-item" ng-repeat="tag in tagList.items track by track(tag)" ng-class="getTagClass(tag, $index)" ng-click="eventHandlers.tag.click(tag)"><ti-tag-item scope="templateScope" data="::tag"><\/ti-tag-item><\/li><\/ul><input class="input" autocomplete="off" ng-model="newTag.text" ng-model-options="{getterSetter: true}" ng-keydown="eventHandlers.input.keydown($event)" ng-focus="eventHandlers.input.focus($event)" ng-blur="eventHandlers.input.blur($event)" ng-paste="eventHandlers.input.paste($event)" ng-trim="false" ng-class="{\'invalid-tag\': newTag.invalid}" ng-disabled="disabled" ti-bind-attrs="{type: options.type, placeholder: options.placeholder, tabindex: options.tabindex, spellcheck: options.spellcheck}" ti-autosize><\/div><\/div>');n.put("ngTagsInput/auto-complete.html",'<div class="autocomplete" ng-if="suggestionList.visible"><ul class="suggestion-list" data-ty-ui-select-simplebar><li class="suggestion-item" ng-repeat="item in suggestionList.items track by track(item)" ng-class="getSuggestionClass(item, $index)" ng-click="addSuggestionByIndex($index)" ng-mouseenter="suggestionList.select($index)"><ti-autocomplete-match scope="templateScope" data="::item"><\/ti-autocomplete-match><\/li><\/ul><\/div>')}])}()