{"size": 18992, "ext": "js", "max_stars_repo_path": "public/pixi-svg-graphics.min.js", "max_stars_repo_name": "Alexpud/wottactics", "max_stars_repo_stars_event_min_datetime": "2020-09-24T09:24:11.000Z", "max_stars_repo_stars_event_max_datetime": "2020-09-24T09:24:11.000Z", "max_issues_repo_path": "public/pixi-svg-graphics.min.js", "max_issues_repo_name": "Alexpud/wottactics", "max_issues_repo_issues_event_min_datetime": "2019-03-11T21:49:51.000Z", "max_issues_repo_issues_event_max_datetime": "2020-06-30T18:45:33.000Z", "max_forks_repo_path": "public/pixi-svg-graphics.min.js", "max_forks_repo_name": "Alexpud/wottactics", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 5, "max_forks_count": null, "avg_line_length": 18992.0, "max_line_length": 18992, "alphanum_fraction": 0.6603306655}
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("pixi.js")):"function"==typeof define&&define.amd?define(["pixi.js"],e):"object"==typeof exports?exports.SVGGraphics=e(require("pixi.js")):t.SVGGraphics=e(t.PIXI)}(this,function(t){return function(t){function e(r){if(a[r])return a[r].exports;var s=a[r]={exports:{},id:r,loaded:!1};return t[r].call(s.exports,s,s.exports,e),s.loaded=!0,s.exports}var a={};return e.m=t,e.c=a,e.p="",e(0)}([function(t,e,a){function r(t){s.Graphics.call(this),this._scale=1,this._svg=t,this._wt=new s.Matrix,this._classes={},this._trans={x:0,y:0},this._lineWidth=0,this._nonScaling=!1,t&&this.drawSVG(t)}var s=a(1),i=a(2);s.Graphics.prototype.lineTo2=function(t,e){if(this.lineDashed){var a=this.currentPath.shape.points,r=a[a.length-2],s=a[a.length-1],i=Math.abs(Math.sqrt(Math.pow(t-r,2)+Math.pow(e-s,2)));if(i<=this.lineDashLength)this.currentPath.shape.points.push(t,e);else{for(var n,h,o=this.lineDashLength/i,l=!1,p=o;1>=p;p+=o){var c=Math.max(Math.min(p,1),0);n=r+c*(t-r),h=s+c*(e-s),l=!l,l?this.currentPath.shape.points.push(n,h):(this.currentPath.shape.closed=!1,this.moveTo(n,h))}l=!l,l&&n!=t&&h!=e&&this.currentPath.shape.points.push(t,e)}}else this.currentPath.shape.points.push(t,e);return this.dirtyScale=!0,this},s.Graphics.prototype.bezierCurveTo2=function(t,e,a,r,s,i){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);for(var n,h,o,l,p,c=this.lineSegments,f=this.currentPath.shape.points,d=f[f.length-2],u=f[f.length-1],g=0,b=1,y=null,v=null,x=1;c>=x;x++)if(g=x/c,n=1-g,h=n*n,o=h*n,l=g*g,p=l*g,nPx=o*d+3*h*g*t+3*n*l*a+p*s,nPy=o*u+3*h*g*e+3*n*l*r+p*i,this.lineDashed){null==y&&(y=nPx,v=nPy);var m=Math.abs(Math.sqrt(Math.pow(nPx-y,2)+Math.pow(nPy-v,2)));0==b?m>=this.lineSpaceLength&&(y=nPx,v=nPy,this.currentPath.shape.closed=!1,this.moveTo(nPx,nPy),f=this.currentPath.shape.points,b=1):1==b&&(m<=this.lineDashLength?f.push(nPx,nPy):(y=nPx,v=nPy,b=0))}else f.push(nPx,nPy);return this.currentPath.shape.closed=!1,this.dirtyScale=!0,this},s.Graphics.prototype.quadraticCurveTo2=function(t,e,a,r){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);var s,i,n=this.lineSegments,h=this.currentPath.shape.points;0===h.length&&this.moveTo(0,0);for(var o=h[h.length-2],l=h[h.length-1],p=0,c=1,f=null,d=null,u=1;n>=u;u++)if(p=u/n,s=o+(t-o)*p,i=l+(e-l)*p,nPx=s+(t+(a-t)*p-s)*p,nPy=i+(e+(r-e)*p-i)*p,this.lineDashed){null==f&&(f=nPx,d=nPy);var g=Math.abs(Math.sqrt(Math.pow(nPx-f,2)+Math.pow(nPy-d,2)));0==c?g>=this.lineSpaceLength&&(f=nPx,d=nPy,this.currentPath.shape.closed=!1,this.moveTo(nPx,nPy),h=this.currentPath.shape.points,c=1):1==c&&(g<=this.lineDashLength?h.push(nPx,nPy):(f=nPx,d=nPy,c=0))}else h.push(nPx,nPy);return this.dirtyScale=!0,this},r.prototype=Object.create(s.Graphics.prototype),r.prototype.clone=function(){var t=new r(this._svg);t.children=[],t.scale=new s.Point(this.scale.x,this.scale.y),t.rotation=this.rotation,t.x=this.x,t.y=this.y;for(var e=0;e<this.children.length;e++){var a=this.children[e],i=a.clone();t.addChild(i)}return t},r.prototype.updateTransform=function(){s.DisplayObject.prototype.updateTransform.call(this);var t=this.worldTransform,e=1,a=1,r=t.tx,i=t.ty;e=Math.sqrt(Math.pow(t.a,2)+Math.pow(t.b,2)),a=Math.sqrt(Math.pow(t.c,2)+Math.pow(t.d,2)),t.scale(0!==e?1/e:0,0!==a?1/a:0),t.tx=r,t.ty=i;var n=this._lastScaleX!=e||this._lastScaleY!=a;if(this.dirtyScale||n){this.graphicsDataOrg=this.graphicsDataOrg||[];for(var h=this.graphicsDataOrg.length;h<this.graphicsData.length;h++)this.graphicsDataOrg.push(this.graphicsData[h].clone());for(var h=0;h<this.graphicsDataOrg.length;h++){var o=this.graphicsDataOrg[h].shape.points,l=this.graphicsData[h].shape.points;if(l)for(var p=0;p<l.length/2;p++)l[2*p]=o[2*p]*e,l[2*p+1]=o[2*p+1]*a}this.dirtyScale=!1}this._lastScaleX=e,this._lastScaleY=a},r.prototype.drawNode=function(t){var e=t.tagName,a=e.charAt(0).toUpperCase()+e.slice(1);if(this.applyTransformation(t),this["draw"+a+"Node"]){if("Svg"==a){var r=t.getAttribute("width"),s=t.getAttribute("height");this.beginFill(0,0).drawRect(0,0,parseInt(r),parseInt(s))}this["draw"+a+"Node"](t)}else console.warn("No drawing behavior for "+a+" node")},r.prototype.drawSvgNode=function(t){for(var e=t.children,a=0;a<e.length;a++){var r=e[a];if("style"==r.tagName)for(var s=/{([^}]*)}/g,i=/\.([^{;]*){/g,n=r.childNodes[0].data.match(i),h=r.childNodes[0].data.match(s),o=0;o<n.length;o++){var l=n[o].substring(1,n[o].length-1),p=h[o].substring(1,h[o].length-1);this._classes[l]=p}}this.drawGNode(t)},r.prototype.drawGNode=function(t){for(var e,a=t.children||t.childNodes,r=0,s=a.length;s>r;r++)e=a[r],1===e.nodeType&&this.drawNode(e)},r.prototype.drawTextNode=function(t){for(var e=t.getAttribute("style").split(";"),a={},r=0;r<e.length;r++){var i=e[r].split(":"),n=i[0],h=i[1];a[n]=h}var o=a["font-size"]+" "+a["font-family"],l=a.fill,p=t.childNodes[0],c=p.innerHTML,f=new s.Text(c,{font:o,fill:l});f.x=t.getAttribute("x"),f.y=t.getAttribute("y"),this.addChild(f)},r.prototype.drawLineNode=function(t){this.parseSvgAttributes(t);var e=n(t.getAttribute("x1")),a=n(t.getAttribute("y1")),r=n(t.getAttribute("x2")),s=n(t.getAttribute("y2"));this.moveTo(e,a),this.lineTo2(r,s)},r.prototype.drawPolylineNode=function(t){this.parseSvgAttributes(t);for(var e,a="(-?[\\d\\.?]+),(-?[\\d\\.?]+)",r=t.getAttribute("points").match(new RegExp(a,"g")),s=0,i=r.length;i>s;s++){e=r[s];var h=e.match(new RegExp(a));h[1]=n(h[1]),h[2]=n(h[2]),0===s?this.moveTo(h[1],h[2]):this.lineTo2(h[1],h[2])}},r.prototype.drawCircleNode=function(t){this.parseSvgAttributes(t);var e=n(t.getAttribute("cx")),a=n(t.getAttribute("cy")),r=n(t.getAttribute("r"));this.drawCircle(e,a,r)},r.prototype.drawEllipseNode=function(t){this.parseSvgAttributes(t);var e=n(t.getAttribute("cx")),a=n(t.getAttribute("cy")),r=n(t.getAttribute("rx")),s=n(t.getAttribute("ry"));this.drawEllipse(e,a,r,s)},r.prototype.drawRectNode=function(t){this.parseSvgAttributes(t);var e=n(t.getAttribute("x")),a=n(t.getAttribute("y")),r=n(t.getAttribute("width")),s=n(t.getAttribute("height"));this.drawRect(e,a,r,s)},r.prototype.drawPolygonNode=function(t){for(var e,a="(-?[\\d\\.?]+),(-?[\\d\\.?]+)",r=t.getAttribute("points").match(new RegExp(a,"g")),i=[],h=0,o=r.length;o>h;h++){e=r[h];var l=e.match(new RegExp(a));l[1]=n(l[1]),l[2]=n(l[2]),i.push(new s.Point(l[1],l[2]))}this.parseSvgAttributes(t),this.drawPolygon(i)},r.prototype.drawPathNode=function(t){this.parseSvgAttributes(t);var e=t.getAttribute("d").trim(),a=this.tokenizePathData(e);this.drawPathData(a)},r.prototype.drawPathData=function(t){for(var e=t.instructions,a=0,r=0;r<e.length;r++)for(var s=e[r].command,i=e[r].args,n=e[r].points,h=0,o=!0;h<n.length;){switch(s.toLowerCase()){case"m":var l,p=n[h].x+this._trans.x,c=n[h].y+this._trans.y,f=l=t.subpaths[a].direction;a>0&&(l=t.subpaths[a-1].direction,f!=l&&(o=!1)),0==h&&o?(this.moveTo(p,c),this.graphicsData[this.graphicsData.length-1].shape.closed=!1):this.lineTo2(p,c),h+=1;break;case"l":var p=n[h].x+this._trans.x,c=n[h].y+this._trans.y;this.lineTo2(p,c),h+=1;break;case"c":this.bezierCurveTo2(n[h].x+this._trans.x,n[h].y+this._trans.y,n[h+1].x+this._trans.x,n[h+1].y+this._trans.y,n[h+2].x+this._trans.x,n[h+2].y+this._trans.y),h+=3;break;case"v":var p=n[h].x+this._trans.x,c=n[h].y+this._trans.y;this.lineTo2(p,c),h+=1;break;case"h":var p=n[h].x+this._trans.x,c=n[h].y+this._trans.y;this.lineTo2(p,c),h+=1;break;case"s":this.bezierCurveTo2(n[h].x+this._trans.x,n[h].y+this._trans.y,n[h+1].x+this._trans.x,n[h+1].y+this._trans.y,n[h+2].x+this._trans.x,n[h+2].y+this._trans.y),h+=3;break;case"z":h+=1,a+=1,this.graphicsData[this.graphicsData.length-1].shape.closed=!0;break;default:throw new Error("Could not handle path command: "+s+" "+i.join(","))}this.graphicsData[this.graphicsData-1]&&(this.graphicsData[this.graphicsData-1]._lineWidth=this._lineWidth)}},r.prototype.tokenizePathData=function(t){for(var e=t.match(/[a-df-z][^a-df-z]*/gi),a={instructions:[],subpaths:[]},r={x:0,y:0},s={x:0,y:0},i=[],h={points:[],direction:""},o=0;o<e.length;o++){var l={command:"",points:[]},p=e[o][0],c=[];c=c.concat(e[o].slice(1).trim().match(/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g));for(var f=0;f<c.length;){var d={x:0,y:0};p===p.toLowerCase()&&(d=r);var u=[];switch(p.toLowerCase()){case"m":var g={};g.x=n(c[f])+d.x,g.y=n(c[f+1])+d.y,u.push(g),h.points.push(g),r=g,f+=2;break;case"l":var g={};g.x=n(c[f])+d.x,g.y=n(c[f+1])+d.y,u.push(g),h.points.push(g),r=g,f+=2;break;case"c":var b={},y={},v={};b.x=n(c[f])+d.x,b.y=n(c[f+1])+d.y,y.x=n(c[f+2])+d.x,y.y=n(c[f+3])+d.y,v.x=n(c[f+4])+d.x,v.y=n(c[f+5])+d.y,u.push(b),u.push(y),u.push(v),h.points.push(b),h.points.push(y),h.points.push(v),r=v,s=y,f+=6;break;case"v":var g={};g.y=n(c[f])+d.y,g.x=r.x,u.push(g),h.points.push(g),r=g,f+=1;break;case"h":var g={};g.x=n(c[f])+d.x,g.y=r.y,u.push(g),h.points.push(g),r=g,f+=1;break;case"s":var b={},y={},v={};b.x=2*r.x-s.x,b.y=2*r.y-s.y,y.x=n(c[f])+d.x,y.y=n(c[f+1])+d.y,v.x=n(c[f+2])+d.x,v.y=n(c[f+3])+d.y,u.push(b),u.push(y),u.push(v),r=v,s=y,h.points.push(b),h.points.push(y),h.points.push(v),f+=4;break;case"z":u.push({x:0,y:0}),h.direction=this.getPathDirection(h),i.push(h),h={points:[]},f+=1}l.points=l.points.concat(u)}l.command=p,a.instructions.push(l)}return h.points.length>0&&(h.direction=this.getPathDirection(h),i.push(h)),a.subpaths=i,a},r.prototype.getPathDirection=function(t){for(var e=t.points,a=0,r=0;r<e.length-1;r++){var s=e[r],i=e[r+1];a+=(i.x-s.x)*(i.y+s.y)}return a>0?"cw":"ccw"},r.prototype.applyTransformation=function(t){if(t.getAttribute("transform")){var e=new s.Matrix,a=t.getAttribute("transform").trim().split("("),r=a[0],i=a[1].replace(")","").split(",");if("matrix"==r){e.a=n(i[0]),e.b=n(i[1]),e.c=n(i[2]),e.d=n(i[3]),e.tx=n(i[4]),e.ty=n(i[5]);var h={x:0,y:0},o=e.apply(h);this._trans.x+=o.x,this._trans.y+=o.y,this.scale.x=Math.sqrt(e.a*e.a+e.b*e.b),this.scale.y=Math.sqrt(e.c*e.c+e.d*e.d),this.rotation=-Math.acos(e.a/this.scale.x)}else"translate"==r?(this._trans.x+=n(i[0]),this._trans.y+=n(i[1])):"scale"==r?(this.scale.x=n(i[0]),this.scale.y=n(i[1])):"rotate"==r&&(i.length>1&&(this._trans.x+=n(i[1]),this._trans.y+=n(i[2])),this.rotation=n(i[0]),i.length>1&&(this._trans.x-=n(i[1]),this._trans.y-=n(i[2])))}},r.prototype.parseSvgAttributes=function(t){for(var e,a={},r=t.attributes.length;r--;)e=t.attributes[r],a[e.name]=e.value;var s=t.getAttribute("class");s=s?s.split(" "):[];var i=t.getAttribute("style");i&&(this._classes.style=i,s.push("style"));for(var n in this._classes)if(-1!=s.indexOf(n)){i=this._classes[n];var h,o,l,p,c;if(i){h=i.split(";");for(var f=0,d=h.length;d>f;f++)o=h[f].trim(),o&&(l=o.split(":",2),p=l[0].trim(),c=l[1].trim(),a[p]=c)}}this.applySvgAttributes(a)},r.prototype.applySvgAttributes=function(t){var e,a,r=0,s=1,n=0;t.stroke&&(e=i(t.stroke,"array"),a=65536*e[0]+256*e[1]+e[2],r=a,n=e[3]),t["stroke-width"]&&(this._lineWidth=s=parseInt(t["stroke-width"],10));var h=t["vector-effect"];"non-scaling-stroke"==h&&(this._nonScaling=!0);var o=100,l=100,p=0,c=!1;t["stroke-dasharray"]&&"none"!=t["stroke-dasharray"]&&(l=parseInt(t["stroke-dasharray"].split(",")[0]),p=parseInt(t["stroke-dasharray"].split(",")[1]),c=!0),this.lineSegments=o,this.lineDashed=c,this.lineDashLength=l,this.lineSpaceLength=p,this.lineStyle(s,r,n);var f=0,d=1;t.fill&&(e=i(t.fill,"array"),a=65536*e[0]+256*e[1]+e[2],f=a,d=e[3]),this.beginFill(f,d)},r.prototype.drawSVG=function(t){for(var e=t.children||t.childNodes,a=0,r=e.length;r>a;a++)1===e[a].nodeType&&this.drawNode(e[a])};var n=function(t){var e=/([\d\.]+)e-(\d+)/i.exec(t);if(!e)return parseFloat(t);for(var a=e[1].replace(".",""),r=e[2]-1,s="0.",i=0;r>i;i++)s+="0";return s+=a,parseFloat(s)};t.exports=r},function(e,a){e.exports=t},function(t,e){"use strict";var a=function(){var t=function(t,i,n){i||(i="rgba"),t=t.toLowerCase(),i=i.toLowerCase();var o,l,p,c,f,d,u,g,b,y,v,x,m,w=h(t),k=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1],10),parseInt(t[2],10),parseInt(t[3],10),1]}},{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d+(?:\.\d+)?|\.\d+)\s*\)/,example:["rgba(123, 234, 45, 1)","rgba(255,234,245, 0.5)"],process:function(t){return[parseInt(t[1],10),parseInt(t[2],10),parseInt(t[3],10),parseFloat(t[4])]}},{re:/^hsl\((\d{1,3}),\s*(\d{1,3})%,\s*(\d{1,3})%\)$/,example:["hsl(120, 100%, 25%)","hsl(0, 100%, 50%)"],process:function(t){t[4]=1;var a=e(t);return[a.r,a.g,a.b,a.a]}},{re:/^hsla\((\d{1,3}),\s*(\d{1,3})%,\s*(\d{1,3})%,\s*(\d+(?:\.\d+)?|\.\d+)\s*\)/,example:["hsla(120, 100%, 25%, 1)","hsla(0, 100%, 50%, 0.5)"],process:function(t){var a=e(t);return[a.r,a.g,a.b,a.a]}},{re:/^hsv\((\d{1,3}),\s*(\d{1,3})%,\s*(\d{1,3})%\)$/,example:["hsv(120, 100%, 25%)","hsl(0, 100%, 50%)"],process:function(t){var e=r(t);return[e.r,e.g,e.b,1]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16),1]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16),1]}}];for(w?t=w:(t=t.replace(/^\s*#|\s*$/g,""),3===t.length&&(t=t.replace(/(.)/g,"$1$1"))),f=0;f<k.length;f+=1)d=k[f].re,u=k[f].process,g=d.exec(t),g&&(b=u(g),o=b[0],l=b[1],p=b[2],c=b[3]);switch(o=0>o||isNaN(o)?0:o>255?255:o,l=0>l||isNaN(l)?0:l>255?255:l,p=0>p||isNaN(p)?0:p>255?255:p,c=0>c||isNaN(c)?0:c>1?1:c,i){case"rgba":n&&(c=(255-(y=Math.min(o,l,p)))/255,o=(0||(o-y)/c).toFixed(0),l=(0||(l-y)/c).toFixed(0),p=(0||(p-y)/c).toFixed(0),c=c.toFixed(4)),m="rgba("+o+","+l+","+p+","+c+")";break;case"rgb":m="rgb("+o+","+l+","+p+")";break;case"hex":m="#"+("0"+o.toString(16)).slice(-2)+("0"+l.toString(16)).slice(-2)+("0"+p.toString(16)).slice(-2);break;case"hsl":v=a({r:o,g:l,b:p}),m="hsl("+v.h+","+v.s+"%,"+v.l+"%)";break;case"hsla":v=a({r:o,g:l,b:p,a:c}),m="hsl("+v.h+","+v.s+"%,"+v.l+"%,"+v.a+")";break;case"hsv":x=s({r:o,g:l,b:p}),m="hsv("+x.h+","+x.s+"%,"+x.v+"%)";break;case"array":m=[o,l,p,c]}return m},e=function(t){var e,a,r,s={},h={h:n(parseInt(t[1],10)%360,360),s:n(parseInt(t[2],10)%101,100),l:n(parseInt(t[3],10)%101,100),a:parseFloat(t[4])};return 0===h.s?(e=parseInt(Math.round(255*h.l)),s={r:e,g:e,b:e,a:h.a}):(a=h.l<.5?h.l*(1+h.s):h.l+h.s-h.l*h.s,r=2*h.l-a,s.r=parseInt((256*i(r,a,h.h+1/3)).toFixed(0),10),s.g=parseInt((256*i(r,a,h.h)).toFixed(0),10),s.b=parseInt((256*i(r,a,h.h-1/3)).toFixed(0),10),s.a=h.a),s},a=function(t){t.r=n(parseInt(t.r,10)%256,256),t.g=n(parseInt(t.g,10)%256,256),t.b=n(parseInt(t.b,10)%256,256);var e,a=Math.max(t.r,t.g,t.b),r=Math.min(t.r,t.g,t.b),s=[];if(s.a=t.a,s.l=(a+r)/2,a===r)s.h=0,s.s=0;else{switch(e=a-r,s.s=s.l>.5?e/(2-a-r):e/(a+r),a){case t.r:s.h=(t.g-t.b)/e+(t.g<t.b?6:0);break;case t.g:s.h=(t.b-t.r)/e+2;break;case t.b:s.h=(t.r-t.g)/e+4}s.h/=6}return s.h=parseInt((360*s.h).toFixed(0),10),s.s=parseInt((100*s.s).toFixed(0),10),s.l=parseInt((100*s.l).toFixed(0),10),s},r=function(t){var e={},a={h:n(parseInt(t[1],10)%360,360),s:n(parseInt(t[2],10)%101,100),v:n(parseInt(t[3],10)%101,100)},r=Math.floor(6*a.h),s=6*a.h-r,i=a.v*(1-a.s),h=a.v*(1-s*a.s),o=a.v*(1-(1-s)*a.s);switch(r%6){case 0:e.r=a.v,e.g=o,e.b=i;break;case 1:e.r=h,e.g=a.v,e.b=i;break;case 2:e.r=i,e.g=a.v,e.b=o;break;case 3:e.r=i,e.g=h,e.b=a.v;break;case 4:e.r=o,e.g=i,e.b=a.v;break;case 5:e.r=a.v,e.g=i,e.b=h}return e.r=parseInt(256*e.r,10),e.g=parseInt(256*e.g,10),e.b=parseInt(256*e.b,10),{r:e.r,g:e.g,b:e.b}},s=function(t){t.r=n(parseInt(t.r,10)%256,256),t.g=n(parseInt(t.g,10)%256,256),t.b=n(parseInt(t.b,10)%256,256);var e=Math.max(t.r,t.g,t.b),a=Math.min(t.r,t.g,t.b),r=e-a,s={h:0,s:0===e?0:r/e,v:e};if(e!==a){switch(e){case t.r:s.h=(t.g-t.b)/r+(t.g<t.b?6:0);break;case t.g:s.h=(t.b-t.r)/r+2;break;case t.b:s.h=(t.r-t.g)/r+4}s.h/=6}return s.h=parseInt((360*s.h).toFixed(0),10),s.s=parseInt((100*s.s).toFixed(0),10),s.v=parseInt((100*s.v).toFixed(0),10),s},i=function(t,e,a){return 0>a&&(a+=1),a>1&&(a-=1),1/6>a?t+6*(e-t)*a:.5>a?e:2/3>a?t+(e-t)*(2/3-a)*6:t},n=function(t,e){return t/e},h=function(t){var e,a=null,r={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};for(e in r)t===e&&(a=r[e]);return a};return t}();t.exports=a}])});