<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[23443] trunk/wp-admin/js: Update the Iris color picker to version 1.0.3, which stops using the deprecated jQuery.browser property.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg > ul, #logmsg > ol { margin-left: 0; margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/23443">23443</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2013-02-16 17:44:41 +0000 (Sat, 16 Feb 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Update the Iris color picker to version 1.0.3, which stops using the deprecated jQuery.browser property. 

props mattwiebe.
fixes <a href="http://core.trac.wordpress.org/ticket/23484">#23484</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminjscolorpickerjs">trunk/wp-admin/js/color-picker.js</a></li>
<li><a href="#trunkwpadminjsirisminjs">trunk/wp-admin/js/iris.min.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminjscolorpickerjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/color-picker.js (23442 => 23443)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/color-picker.js        2013-02-16 17:40:37 UTC (rev 23442)
+++ trunk/wp-admin/js/color-picker.js        2013-02-16 17:44:41 UTC (rev 23443)
</span><span class="lines">@@ -16,11 +16,12 @@
</span><span class="cx">                         palettes: true
</span><span class="cx">                 },
</span><span class="cx">                 _create: function() {
</span><del>-                        // bail early for IE &lt; 8
-                        if ( $.browser.msie &amp;&amp; parseInt( $.browser.version, 10 ) &lt; 8 )
</del><ins>+                        // bail early for unsupported Iris.
+                        if ( ! $.support.iris )
</ins><span class="cx">                                 return;
</span><span class="cx">                         var self = this;
</span><span class="cx">                         var el = self.element;
</span><ins>+
</ins><span class="cx">                         $.extend( self.options, el.data() );
</span><span class="cx"> 
</span><span class="cx">                         self.initialValue = el.val();
</span></span></pre></div>
<a id="trunkwpadminjsirisminjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/iris.min.js (23442 => 23443)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/iris.min.js        2013-02-16 17:40:37 UTC (rev 23442)
+++ trunk/wp-admin/js/iris.min.js        2013-02-16 17:44:41 UTC (rev 23443)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-/*! Iris - v0.9.14 - 2012-11-20
</del><ins>+/*! Iris Color Picker - v1.0.3 - 2013-02-15
</ins><span class="cx"> * https://github.com/Automattic/Iris
</span><del>-* Copyright (c) 2012 Matt Wiebe; Licensed GPL */
-(function(e,t){function u(){if(r)i=&quot;filter&quot;;else{var t=e('&lt;div id=&quot;iris-gradtest&quot; /&gt;'),n=&quot;linear-gradient(top,#fff,#000)&quot;;e.each(s,function(e,r){t.css(&quot;backgroundImage&quot;,r+n);if(t.css(&quot;backgroundImage&quot;).match(&quot;gradient&quot;))return i=e,!1}),e.browser.webkit&amp;&amp;i===!1&amp;&amp;(t.css(&quot;background&quot;,&quot;-webkit-gradient(linear,0% 0%,0% 100%,from(#fff),to(#000))&quot;),t.css(&quot;backgroundImage&quot;).match(&quot;gradient&quot;)&amp;&amp;(i=&quot;webkit&quot;)),t.remove()}}function a(t,n){return t=t===&quot;top&quot;?&quot;top&quot;:&quot;left&quot;,n=e.isArray(n)?n:Array.prototype.slice.call(arguments,1),i===&quot;webkit&quot;?l(t,n):s[i]+&quot;linear-gradient(&quot;+t+&quot;, &quot;+n.join(&quot;, &quot;)+&quot;)&quot;}function f(t,n){t=t===&quot;top&quot;?&quot;top&quot;:&quot;left&quot;,n=e.isArray(n)?n:Array.prototype.slice.call(arguments,1);var r=t===&quot;top&quot;?0:1,i=e(this),s=n.length-1,o
 =parseInt(e.browser.version,10)&gt;=8?&quot;-ms-filter&quot;:&quot;filter&quot;;o=&quot;filter&quot;;var u=r===1?&quot;left&quot;:&quot;top&quot;,a=r===1?&quot;right&quot;:&quot;bottom&quot;,f=r===1?&quot;height&quot;:&quot;width&quot;,l='&lt;div class=&quot;iris-ie-gradient-shim&quot; style=&quot;position:absolute;'+f+&quot;:100%;&quot;+u+&quot;:%start%;&quot;+a+&quot;:%end%;&quot;+o+':%filter%;&quot; data-color:&quot;%color%&quot;&gt;&lt;/div&gt;',h=&quot;&quot;;i.css(&quot;position&quot;)===&quot;static&quot;&amp;&amp;i.css({position:&quot;relative&quot;}),n=c(n),e.each(n,function(e,t){if(e===s)return!1;var i=n[e+1];if(t.stop===i.stop)return;var o=100-parseFloat(i.stop)+&quot;%&quot;;t.octoHex=(new Color(t.color)).toIEOctoHex(),i.octoHex=(new Color(i.color)).toIEOctoHex();var u=&quot;progid:DXImageTransform.Microsoft.Gradient(GradientType=&quot;+r+&quot;, StartColorStr='&quot;+t.octoHex+&quot;', EndColorStr='&quot;+i.octoHex+&quot;')&quot;;h+=l.replace(&quot;%start%&quot;
 ,t.stop).replace(&quot;%end%&quot;,o).replace(&quot;%filter%&quot;,u)}),i.find(&quot;.iris-ie-gradient-shim&quot;).remove(),e(h).prependTo(i)}function l(t,n){var r=[];return t=t===&quot;top&quot;?&quot;0% 0%,0% 100%,&quot;:&quot;0% 100%,100% 100%,&quot;,n=c(n),e.each(n,function(e,t){r.push(&quot;color-stop(&quot;+parseFloat(t.stop)/100+&quot;, &quot;+t.color+&quot;)&quot;)}),&quot;-webkit-gradient(linear,&quot;+t+r.join(&quot;,&quot;)+&quot;)&quot;}function c(t){var n=[],r=[],i=[],s=t.length-1;return e.each(t,function(e,t){var i=t,s=!1,o=t.match(/1?[0-9]{1,2}%$/);o&amp;&amp;(i=t.replace(/\s?1?[0-9]{1,2}%$/,&quot;&quot;),s=o.shift()),n.push(i),r.push(s)}),r[0]===!1&amp;&amp;(r[0]=&quot;0%&quot;),r[s]===!1&amp;&amp;(r[s]=&quot;100%&quot;),r=h(r),e.each(r,function(e){i[e]={color:n[e],stop:r[e]}}),i}function h(t){var n=0,r=t.length-1,i=0,s=!1,o,u,a,f;if(t.length&lt;=2||e.inArray(!1,t)&lt;0)return t;while(i&lt;t.length-1)!s&amp;&amp;t[i]===!1?(n=i-1,s=!0):s&amp;&amp;t[i]!==!1&amp
 ;&amp;(r=i,i=t.length),i++;u=r-n,f=parseInt(t[n].replace(&quot;%&quot;),10),o=(parseFloat(t[r].replace(&quot;%&quot;))-f)/u,i=n+1,a=1;while(i&lt;r)t[i]=f+a*o+&quot;%&quot;,a++,i++;return h(t)}var n='&lt;div class=&quot;iris-picker&quot;&gt;&lt;div class=&quot;iris-picker-inner&quot;&gt;&lt;div class=&quot;iris-square&quot;&gt;&lt;a class=&quot;iris-square-value&quot; href=&quot;#&quot;&gt;&lt;span class=&quot;iris-square-handle ui-slider-handle&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;div class=&quot;iris-square-inner iris-square-horiz&quot;&gt;&lt;/div&gt;&lt;div class=&quot;iris-square-inner iris-square-vert&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iris-slider iris-strip&quot;&gt;&lt;div class=&quot;iris-slider-offset&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;',r=!!(e.browser.msie&amp;&amp;parseInt(e.browser.version,10)&lt;10),i=!1,s=[&quot;-moz-&quot;,&quot;-webkit-&quot;,&quot;-o-&quot;,&quot;-ms-&quot;],o='.iris-picker{display:block;position:relati
 ve}.iris-error{background-color:#ffafaf}.iris-border{border-radius:3px;border:1px solid #aaa;width:200px;background-color:#fff}.iris-picker-inner{position:absolute;top:0;right:0;left:0;bottom:0}.iris-border .iris-picker-inner{top:10px;right:10px;left:10px;bottom:10px}.iris-picker .iris-square-inner{position:absolute;left:0;right:0;top:0;bottom:0}.iris-picker .iris-square,.iris-picker .iris-slider,.iris-picker .iris-square-inner,.iris-picker .iris-palette{border-radius:3px;box-shadow:inset 0 0 5px rgba(0,0,0,0.4);height:100%;width:12.5%;float:left;margin-right:5%}.iris-picker .iris-square{width:76%;margin-right:10%;position:relative}.iris-picker .iris-square-inner{width:auto;margin:0}.iris-ie-9 .iris-square,.iris-ie-9 .iris-slider,.iris-ie-9 .iris-square-inner,.iris-ie-9 .iris-palette{box-shadow:none;border-radius:0}.iris-ie-9 .iris-square,.iris-ie-9 .iris-slider,.iris-ie-9 .iris-palette{outline:1px solid rgba(0,0,0,.1)}.iris-ie-lt9 .iris-square,.iris-ie-lt9 .iris-slider,.iri
 s-ie-lt9 .iris-square-inner,.iris-ie-lt9 .iris-palette{outline:1px solid #aaa}.iris-ie-lt9 .iris-square .ui-slider-handle{outline:1px solid #aaa;background-color:#fff;-ms-filter:&quot;progid:DXImageTransform.Microsoft.Alpha(Opacity=30)&quot;}.iris-ie-lt9 .iris-square .iris-square-handle{background:none;border:3px solid #fff;-ms-filter:&quot;progid:DXImageTransform.Microsoft.Alpha(Opacity=50)&quot;}.iris-picker .iris-strip{margin-right:0;position:relative}.iris-picker .iris-strip .ui-slider-handle{position:absolute;background:none;right:-3px;left:-3px;border:4px solid #aaa;border-width:4px 3px;width:auto;height:6px;border-radius:4px;box-shadow:0 1px 2px rgba(0,0,0,.2);opacity:.9;z-index:5;cursor:ns-resize}.iris-strip .ui-slider-handle:before{content:&quot; &quot;;position:absolute;left:-2px;right:-2px;top:-3px;bottom:-3px;border:2px solid #fff;border-radius:3px}.iris-picker .iris-slider-offset{position:absolute;top:11px;left:0;right:0;bottom:-3px}.iris-picker .iris-square-han
 dle{background:transparent;border:5px solid #aaa;border-radius:50%;border-color:rgba(128,128,128,.5);box-shadow:none;width:12px;height:12px;position:absolute;left:-10px;top:-10px;cursor:move;opacity:1;z-index:10}.iris-picker .ui-state-focus .iris-square-handle{opacity:.8}.iris-picker .iris-square-handle:hover{border-color:#999}.iris-picker .iris-square-value:focus .iris-square-handle{box-shadow:0 0 2px rgba(0,0,0,.75);opacity:.8}.iris-picker .iris-square-handle:hover::after{border-color:#fff}.iris-picker .iris-square-handle::after{position:absolute;bottom:-4px;right:-4px;left:-4px;top:-4px;border:3px solid #f9f9f9;border-color:rgba(255,255,255,.8);border-radius:50%;content:&quot; &quot;}.iris-picker .iris-square-value{width:8px;height:8px;position:absolute}.iris-ie-lt9 .iris-square-value,.iris-mozilla .iris-square-value{width:1px;height:1px}.iris-palette-container{position:absolute;bottom:0;left:0;margin:0;padding:0}.iris-border .iris-palette-container{left:10px;bottom:10px}
 .iris-picker .iris-palette{margin:0;cursor:pointer}';if(r&amp;&amp;parseInt(e.browser.version,10)&lt;=7)return e.fn.iris=e.noop;e.fn.gradient=function(t){var n=arguments;return this.each(function(){r?f.apply(this,n):e(this).css(&quot;backgroundImage&quot;,a.apply(this,n))})},e.fn.raninbowGradient=function(t,n){t=t||&quot;top&quot;;var r=e.extend({},{s:100,l:50},n),i=&quot;hsl(%h%,&quot;+r.s+&quot;%,&quot;+r.l+&quot;%)&quot;,s=0,o=[];while(s&lt;=360)o.push(i.replace(&quot;%h%&quot;,s)),s+=30;return this.each(function(){e(this).gradient(t,o)})};var p={options:{color:!1,mode:&quot;hsl&quot;,controls:{horiz:&quot;s&quot;,vert:&quot;l&quot;,strip:&quot;h&quot;},hide:!0,border:!0,target:!1,width:200,palettes:!1},_palettes:[&quot;#000&quot;,&quot;#fff&quot;,&quot;#d33&quot;,&quot;#d93&quot;,&quot;#ee2&quot;,&quot;#81d742&quot;,&quot;#1e73be&quot;,&quot;#8224e3&quot;],_inited:!1,_scale:{h:360,s:100,l:100,v:100},_create:function(){var t=this,r=t.element,s=t.options.color||r.val(),o;i
 ===!1&amp;&amp;u(),r.is(&quot;input&quot;)?(t.options.target?t.picker=e(n).appendTo(t.options.target):t.picker=e(n).insertAfter(r),t._addInputListeners(r)):(r.append(n),t.picker=r.find(&quot;.iris-picker&quot;));if(e.browser.mozilla)t.picker.addClass(&quot;iris-mozilla&quot;);else if(e.browser.msie){var a=parseInt(e.browser.version,10);a===9?t.picker.addClass(&quot;iris-ie-9&quot;):a&lt;=8&amp;&amp;t.picker.addClass(&quot;iris-ie-lt9&quot;)}t.options.palettes&amp;&amp;t._addPalettes(),t.color=(new Color(s)).setHSpace(t.options.mode),t.options.color=t.color.toString(),t.controls={square:t.picker.find(&quot;.iris-square&quot;),squareDrag:t.picker.find(&quot;.iris-square-value&quot;),horiz:t.picker.find(&quot;.iris-square-horiz&quot;),vert:t.picker.find(&quot;.iris-square-vert&quot;),strip:t.picker.find(&quot;.iris-strip&quot;),stripSlider:t.picker.find(&quot;.iris-strip .iris-slider-offset&quot;)},t.options.mode===&quot;hsv&quot;&amp;&amp;t.options.controls.vert===&quot;l&quot
 ;&amp;&amp;(t.options.controls={horiz:&quot;h&quot;,vert:&quot;v&quot;,strip:&quot;s&quot;}),t.hue=t.color.h(),t.options.hide&amp;&amp;t.picker.hide(),t.options.border&amp;&amp;t.picker.addClass(&quot;iris-border&quot;),t._initControls(),t.active=&quot;external&quot;,t._dimensions(),t._change()},_addPalettes:function(){var t=e(&quot;&lt;div class='iris-palette-container' /&gt;&quot;),n=e(&quot;&lt;a class='iris-palette' tabindex='0' /&gt;&quot;),r=e.isArray(this.options.palettes)?this.options.palettes:this._palettes;e.each(r,function(e,r){n.clone().data(&quot;color&quot;,r).css(&quot;backgroundColor&quot;,r).appendTo(t).height(10).width(10)}),this.picker.append(t)},_paint:function(){var e=this;e._paintDimension(&quot;top&quot;,&quot;strip&quot;),e._paintDimension(&quot;top&quot;,&quot;vert&quot;),e._paintDimension(&quot;left&quot;,&quot;horiz&quot;)},_paintDimension:function(e,t){var n=this,r=n.color,i=n.options.mode,s=n._getHSpaceColor(),o=n.controls[t],u=n.options.controls
 ,a;if(t===n.active||n.active===&quot;square&quot;&amp;&amp;t!==&quot;strip&quot;)return;switch(u[t]){case&quot;h&quot;:if(i===&quot;hsv&quot;){s=r.clone();switch(t){case&quot;horiz&quot;:s[u.vert](100);break;case&quot;vert&quot;:s[u.horiz](100);break;case&quot;strip&quot;:s.setHSpace(&quot;hsl&quot;)}a=s.toHsl()}else t===&quot;strip&quot;?a={s:s.s,l:s.l}:a={s:100,l:s.l};o.raninbowGradient(e,a);break;case&quot;s&quot;:i===&quot;hsv&quot;?t===&quot;vert&quot;?a=[r.clone().a(0).s(0).toCSS(&quot;rgba&quot;),r.clone().a(1).s(0).toCSS(&quot;rgba&quot;)]:t===&quot;strip&quot;?a=[r.clone().s(100).toCSS(&quot;hsl&quot;),r.clone().s(0).toCSS(&quot;hsl&quot;)]:t===&quot;horiz&quot;&amp;&amp;(a=[&quot;#fff&quot;,&quot;hsl(&quot;+s.h+&quot;,100%,50%)&quot;]):t===&quot;vert&quot;&amp;&amp;n.options.controls.horiz===&quot;h&quot;?a=[&quot;hsla(0, 0%, &quot;+s.l+&quot;%, 0)&quot;,&quot;hsla(0, 0%, &quot;+s.l+&quot;%, 1)&quot;]:a=[&quot;hsl(&quot;+s.h+&quot;,0%,50%)&quot;,&quot;hsl(&quot;+s.
 h+&quot;,100%,50%)&quot;],o.gradient(e,a);break;case&quot;l&quot;:t===&quot;strip&quot;?a=[&quot;hsl(&quot;+s.h+&quot;,100%,100%)&quot;,&quot;hsl(&quot;+s.h+&quot;, &quot;+s.s+&quot;%,50%)&quot;,&quot;hsl(&quot;+s.h+&quot;,100%,0%)&quot;]:a=[&quot;#fff&quot;,&quot;rgba(255,255,255,0) 50%&quot;,&quot;rgba(0,0,0,0) 50%&quot;,&quot;rgba(0,0,0,1)&quot;],o.gradient(e,a);break;case&quot;v&quot;:t===&quot;strip&quot;?a=[r.clone().v(100).toCSS(),r.clone().v(0).toCSS()]:a=[&quot;rgba(0,0,0,0)&quot;,&quot;#000&quot;],o.gradient(e,a);break;default:}},_getHSpaceColor:function(){return this.options.mode===&quot;hsv&quot;?this.color.toHsv():this.color.toHsl()},_dimensions:function(t){var n=this,r=n.options,i=n.picker.find(&quot;.iris-picker-inner&quot;),s=n.controls,o=s.square,u=n.picker.find(&quot;.iris-strip&quot;),a=&quot;77.5%&quot;,f=&quot;12%&quot;,l=20,c=r.border?r.width-l:r.width,h,p=e.isArray(r.palettes)?r.palettes.length:n._palettes.length,d,v,m;t&amp;&amp;(o.css(&quot;width&quo
 t;,&quot;&quot;),u.css(&quot;width&quot;,&quot;&quot;),n.picker.removeAttr(&quot;style&quot;)),a=c*(parseFloat(a)/100),f=c*(parseFloat(f)/100),h=r.border?a+l:a,o.width(a).height(a),u.height(a).width(f),n.picker.css({width:r.width,height:h});if(!r.palettes)return;d=a*2/100,m=a-(p-1)*d,v=m/p,n.picker.find(&quot;.iris-palette&quot;).each(function(t,n){var r=t===0?0:d;e(this).css({width:v,height:v,marginLeft:r})}),n.picker.css(&quot;paddingBottom&quot;,v+d),u.height(v+d+a)},_addInputListeners:function(e){var t=this,n=100,r=function(n){var r=new Color(e.val()),i=e.val().replace(/^#/,&quot;&quot;);e.removeClass(&quot;iris-error&quot;),r.error?i!==&quot;&quot;&amp;&amp;e.addClass(&quot;iris-error&quot;):r.toString()!==t.color.toString()&amp;&amp;(n.type!==&quot;keyup&quot;||!i.match(/^[0-9a-fA-F]{3}$/))&amp;&amp;t._setOption(&quot;color&quot;,r.toString())};e.on(&quot;change&quot;,r).on(&quot;keyup&quot;,t._debounce(r,n))},_initControls:function(){var t=this,n=t.controls,r=n.square
 ,i=t.options.controls,s=t._scale[i.strip];n.stripSlider.slider({orientation:&quot;vertical&quot;,max:s,slide:function(e,n){t.active=&quot;strip&quot;,i.strip===&quot;h&quot;&amp;&amp;(n.value=s-n.value),t.color[i.strip](n.value),t._change.apply(t,arguments)}}),n.squareDrag.draggable({containment:&quot;parent&quot;,zIndex:1e3,cursor:&quot;move&quot;,drag:function(e,n){t._squareDrag(e,n)},start:function(){r.addClass(&quot;iris-dragging&quot;),e(this).addClass(&quot;ui-state-focus&quot;)},stop:function(){r.removeClass(&quot;iris-dragging&quot;),e(this).removeClass(&quot;ui-state-focus&quot;)}}).on(&quot;mousedown mouseup&quot;,function(n){n.preventDefault();var r=&quot;ui-state-focus&quot;;n.type===&quot;mousedown&quot;?(t.picker.find(&quot;.&quot;+r).removeClass(r).blur(),e(this).addClass(r).focus()):e(this).removeClass(r)}).on(&quot;keydown&quot;,function(e){var r=n.square,i=n.squareDrag,s=i.position(),o=t.options.width/100;e.altKey&amp;&amp;(o*=10);switch(e.keyCode){case 37:
 s.left-=o;break;case 38:s.top-=o;break;case 39:s.left+=o;break;case 40:s.top+=o;break;default:return!0}s.left=Math.max(0,Math.min(s.left,r.width())),s.top=Math.max(0,Math.min(s.top,r.height())),i.css(s),t._squareDrag(e,{position:s}),e.preventDefault()}),r.mousedown(function(n){if(n.which!==1)return;if(!e(n.target).is(&quot;div&quot;))return;var r=t.controls.square.offset(),i={top:n.pageY-r.top,left:n.pageX-r.left};n.preventDefault(),t._squareDrag(n,{position:i}),n.target=t.controls.squareDrag.get(0),t.controls.squareDrag.css(i).trigger(n)}),t.options.palettes&amp;&amp;t.picker.find(&quot;.iris-palette-container&quot;).on(&quot;click&quot;,&quot;.iris-palette&quot;,function(n){t.color.fromCSS(e(this).data(&quot;color&quot;)),t.active=&quot;external&quot;,t._change()}).on(&quot;keydown&quot;,&quot;.iris-palette&quot;,function(t){if(t.keyCode!==13&amp;&amp;t.keyCode!==32)return!0;t.stopPropagation(),e(this).click()})},_squareDrag:function(e,t){var n=this,r=n.options.controls,i=
 n._squareDimensions(),s=Math.round((i.h-t.position.top)/i.h*n._scale[r.vert]),o=n._scale[r.horiz]-Math.round((i.w-t.position.left)/i.w*n._scale[r.horiz]);n.color[r.horiz](o)[r.vert](s),n.active=&quot;square&quot;,n._change.apply(n,arguments)},_setOption:function(e,t){var n=this.options[e];if(e===&quot;color&quot;){t=&quot;&quot;+t;var r=t.replace(/^#/,&quot;&quot;),i=(new Color(t)).setHSpace(this.options.mode);i.error||(this.color=i,this.options.color=this.options[e]=this.color.toString(),this.active=&quot;external&quot;,this._change())}},_squareDimensions:function(e){var n=this.controls.square,r,i;return e!==t&amp;&amp;n.data(&quot;dimensions&quot;)?n.data(&quot;dimensions&quot;):(i=this.controls.squareDrag,r={w:n.width(),h:n.height()},n.data(&quot;dimensions&quot;,r),r)},_isNonHueControl:function(e,t){return e===&quot;square&quot;&amp;&amp;this.options.controls.strip===&quot;h&quot;?!0:t===&quot;external&quot;||t===&quot;h&quot;&amp;&amp;e===&quot;strip&quot;?!1:!0},_chang
 e:function(t,n){var r=this,i=r.controls,s=r._getHSpaceColor(),o=r.color.toString(),u=[&quot;square&quot;,&quot;strip&quot;],a=r.options.controls,f=a[r.active]||&quot;external&quot;,l=r.hue;r.active===&quot;strip&quot;?u=[]:r.active!==&quot;external&quot;&amp;&amp;u.pop(),e.each(u,function(e,t){var n;if(t!==r.active)switch(t){case&quot;strip&quot;:n=a.strip===&quot;h&quot;?r._scale[a.strip]-s[a.strip]:s[a.strip],i.stripSlider.slider(&quot;value&quot;,n);break;case&quot;square&quot;:var o=r._squareDimensions(),u={left:s[a.horiz]/r._scale[a.horiz]*o.w,top:o.h-s[a.vert]/r._scale[a.vert]*o.h};r.controls.squareDrag.css(u)}}),s.h!==l&amp;&amp;r._isNonHueControl(r.active,f)&amp;&amp;r.color.h(l),r.hue=r.color.h(),r.options.color=r.color.toString(),r._inited&amp;&amp;r._trigger(&quot;change&quot;,{type:r.active},{color:r.color}),r.element.is(&quot;:input&quot;)&amp;&amp;!r.color.error&amp;&amp;(r.element.removeClass(&quot;iris-error&quot;),r.element.val()!==r.color.toString()&amp;&am
 p;r.element.val(r.color.toString())),r._paint(),r._inited=!0,r.active=!1},_debounce:function(e,t,n){var r,i;return function(){var s=this,o=arguments,u=function(){r=null,n||(i=e.apply(s,o))},a=n&amp;&amp;!r;return clearTimeout(r),r=setTimeout(u,t),a&amp;&amp;(i=e.apply(s,o)),i}},show:function(){this.picker.show()},hide:function(){this.picker.hide()},toggle:function(){this.picker.toggle()}};e.widget(&quot;a8c.iris&quot;,p),e('&lt;style id=&quot;iris-css&quot;&gt;'+o+&quot;&lt;/style&gt;&quot;).appendTo(&quot;head&quot;)})(jQuery),function(e,t){var n=function(e,t){return this instanceof n?this._init(e,t):new n(e,t)};n.fn=n.prototype={_color:0,_alpha:1,error:!1,_hsl:{h:0,s:0,l:0},_hsv:{h:0,s:0,v:0},_hSpace:&quot;hsl&quot;,_init:function(e){var n=&quot;noop&quot;;switch(typeof e){case&quot;object&quot;:return e.a!==t&amp;&amp;this.a(e.a),n=e.r!==t?&quot;fromRgb&quot;:e.l!==t?&quot;fromHsl&quot;:e.v!==t?&quot;fromHsv&quot;:n,this[n](e);case&quot;string&quot;:return this.fromCSS(e)
 ;case&quot;number&quot;:return this.fromInt(parseInt(e,10))}return this},_error:function(){return this.error=!0,this},clone:function(){var e=new n(this.toInt()),t=[&quot;_alpha&quot;,&quot;_hSpace&quot;,&quot;_hsl&quot;,&quot;_hsv&quot;,&quot;error&quot;];for(var r=t.length-1;r&gt;=0;r--)e[t[r]]=this[t[r]];return e},setHSpace:function(e){return this._hSpace=e===&quot;hsv&quot;?e:&quot;hsl&quot;,this},noop:function(){return this},fromCSS:function(e){var t,n,r=/^(rgb|hs(l|v))a?\(/;this.error=!1,e=e.replace(/^\s+/,&quot;&quot;).replace(/\s+$/,&quot;&quot;).replace(/;$/,&quot;&quot;);if(e.match(r)&amp;&amp;e.match(/\)$/)){n=e.replace(/(\s|%)/g,&quot;&quot;).replace(r,&quot;&quot;).replace(/,?\);?$/,&quot;&quot;).split(&quot;,&quot;);if(n.length&lt;3)return this._error();if(n.length===4){this.a(parseFloat(n.pop()));if(this.error)return this}for(var i=n.length-1;i&gt;=0;i--){n[i]=parseInt(n[i],10);if(isNaN(n[i]))return this._error()}return e.match(/^rgb/)?this.fromRgb({r:n[0],g:n[
 1],b:n[2]}):e.match(/^hsv/)?this.fromHsv({h:n[0],s:n[1],v:n[2]}):this.fromHsl({h:n[0],s:n[1],l:n[2]})}return this.fromHex(e)},fromRgb:function(e,n){return typeof e!=&quot;object&quot;||e.r===t||e.g===t||e.b===t?this._error():(this.error=!1,this.fromInt(parseInt((e.r&lt;&lt;16)+(e.g&lt;&lt;8)+e.b,10),n))},fromHex:function(e){return e=e.replace(/^#/,&quot;&quot;).replace(/^0x/,&quot;&quot;),e.length===3&amp;&amp;(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),this.error=!/^[0-9A-F]{6}$/i.test(e),this.fromInt(parseInt(e,16))},fromHsl:function(e){var n,r,i,s,o,u,a,f;return typeof e!=&quot;object&quot;||e.h===t||e.s===t||e.l===t?this._error():(this._hsl=e,this._hSpace=&quot;hsl&quot;,u=e.h/360,a=e.s/100,f=e.l/100,a===0?n=r=i=f:(s=f&lt;.5?f*(1+a):f+a-f*a,o=2*f-s,n=this.hue2rgb(o,s,u+1/3),r=this.hue2rgb(o,s,u),i=this.hue2rgb(o,s,u-1/3)),this.fromRgb({r:n*255,g:r*255,b:i*255},!0))},fromHsv:function(e){var n,r,i,s,o,u,a,f,l,c,h;if(typeof e!=&quot;object&quot;||e.h===t||e.s===t||e.v===t)return this
 ._error();this._hsv=e,this._hSpace=&quot;hsv&quot;,n=e.h/360,r=e.s/100,i=e.v/100,a=Math.floor(n*6),f=n*6-a,l=i*(1-r),c=i*(1-f*r),h=i*(1-(1-f)*r);switch(a%6){case 0:s=i,o=h,u=l;break;case 1:s=c,o=i,u=l;break;case 2:s=l,o=i,u=h;break;case 3:s=l,o=c,u=i;break;case 4:s=h,o=l,u=i;break;case 5:s=i,o=l,u=c}return this.fromRgb({r:s*255,g:o*255,b:u*255},!0)},fromInt:function(e,n){return this._color=parseInt(e,10),isNaN(this._color)&amp;&amp;(this._color=0),this._color&gt;16777215?this._color=16777215:this._color&lt;0&amp;&amp;(this._color=0),n===t&amp;&amp;(this._hsv.h=this._hsv.s=this._hsl.h=this._hsl.s=0),this},hue2rgb:function(e,t,n){return n&lt;0&amp;&amp;(n+=1),n&gt;1&amp;&amp;(n-=1),n&lt;1/6?e+(t-e)*6*n:n&lt;.5?t:n&lt;2/3?e+(t-e)*(2/3-n)*6:e},toString:function(){var e=parseInt(this._color,10).toString(16);if(this.error)return&quot;&quot;;if(e.length&lt;6)for(var t=6-e.length-1;t&gt;=0;t--)e=&quot;0&quot;+e;return&quot;#&quot;+e},toCSS:function(e,t){e=e||&quot;hex&quot;,t=parseF
 loat(t||this._alpha);switch(e){case&quot;rgb&quot;:case&quot;rgba&quot;:var n=this.toRgb();return t&lt;1?&quot;rgba( &quot;+n.r+&quot;, &quot;+n.g+&quot;, &quot;+n.b+&quot;, &quot;+t+&quot; )&quot;:&quot;rgb( &quot;+n.r+&quot;, &quot;+n.g+&quot;, &quot;+n.b+&quot; )&quot;;case&quot;hsl&quot;:case&quot;hsla&quot;:var r=this.toHsl();return t&lt;1?&quot;hsla( &quot;+r.h+&quot;, &quot;+r.s+&quot;%, &quot;+r.l+&quot;%, &quot;+t+&quot; )&quot;:&quot;hsl( &quot;+r.h+&quot;, &quot;+r.s+&quot;%, &quot;+r.l+&quot;% )&quot;;default:return this.toString()}},toRgb:function(){return{r:255&amp;this._color&gt;&gt;16,g:255&amp;this._color&gt;&gt;8,b:255&amp;this._color}},toHsl:function(){var e=this.toRgb(),t=e.r/255,n=e.g/255,r=e.b/255,i=Math.max(t,n,r),s=Math.min(t,n,r),o,u,a=(i+s)/2;if(i===s)o=u=0;else{var f=i-s;u=a&gt;.5?f/(2-i-s):f/(i+s);switch(i){case t:o=(n-r)/f+(n&lt;r?6:0);break;case n:o=(r-t)/f+2;break;case r:o=(t-n)/f+4}o/=6}return o=Math.round(o*360),o===0&amp;&amp;this._hsl.h!==o
 &amp;&amp;(o=this._hsl.h),u=Math.round(u*100),u===0&amp;&amp;this._hsl.s&amp;&amp;(u=this._hsl.s),{h:o,s:u,l:Math.round(a*100)}},toHsv:function(){var e=this.toRgb(),t=e.r/255,n=e.g/255,r=e.b/255,i=Math.max(t,n,r),s=Math.min(t,n,r),o,u,a=i,f=i-s;u=i===0?0:f/i;if(i===s)o=u=0;else{switch(i){case t:o=(n-r)/f+(n&lt;r?6:0);break;case n:o=(r-t)/f+2;break;case r:o=(t-n)/f+4}o/=6}return o=Math.round(o*360),o===0&amp;&amp;this._hsv.h!==o&amp;&amp;(o=this._hsv.h),u=Math.round(u*100),u===0&amp;&amp;this._hsv.s&amp;&amp;(u=this._hsv.s),{h:o,s:u,v:Math.round(a*100)}},toInt:function(){return this._color},toIEOctoHex:function(){var e=this.toString(),t=parseInt(255*this._alpha,10).toString(16);return t.length===1&amp;&amp;(t=&quot;0&quot;+t),&quot;#&quot;+t+e.replace(/^#/,&quot;&quot;)},toLuminosity:function(){var e=this.toRgb();return.2126*Math.pow(e.r/255,2.2)+.7152*Math.pow(e.g/255,2.2)+.0722*Math.pow(e.b/255,2.2)},getDistanceLuminosityFrom:function(e){if(e instanceof n){var t=this.toLumi
 nosity(),r=e.toLuminosity();return t&gt;r?(t+.05)/(r+.05):(r+.05)/(t+.05)}throw&quot;getDistanceLuminosityFrom requires a Color object&quot;},getMaxContrastColor:function(){var e=this.toLuminosity(),t=e&gt;=.5?&quot;000000&quot;:&quot;ffffff&quot;;return new n(t)},getGrayscaleContrastingColor:function(e){if(!e)return this.getMaxContrastColor();var t=e&lt;5?5:e,n=this.getMaxContrastColor();e=n.getDistanceLuminosityFrom(this);if(e&lt;=t)return n;var r=0===n.toInt()?1:-1;while(e&gt;t)n=n.incrementLightness(r),e=n.getDistanceLuminosityFrom(this);return n},getReadableContrastingColor:function(e,r){if(!e instanceof n)return this;var i=r===t?5:r,s=e.getDistanceLuminosityFrom(this),o=e.getMaxContrastColor(),u=o.getDistanceLuminosityFrom(e);if(u&lt;=i)return o;if(s&gt;=i)return this;var a=0===o.toInt()?-1:1;while(s&lt;i){this.incrementLightness(a),s=this.getDistanceLuminosityFrom(e);if(this._color===0||this._color===16777215)break}return this},a:function(e){if(e===t)return this._alph
 a;var n=parseFloat(e);return isNaN(n)?this._error():(this._alpha=n,this)},darken:function(e){return e=e||5,this.l(-e,!0)},lighten:function(e){return e=e||5,this.l(e,!0)},saturate:function(e){return e=e||15,this.s(e,!0)},desaturate:function(e){return e=e||15,this.s(-e,!0)},toGrayscale:function(){return this.setHSpace(&quot;hsl&quot;).s(0)},getComplement:function(){return this.h(180,!0)},getSplitComplement:function(e){e=e||1;var t=180+e*30;return this.h(t,!0)},getAnalog:function(e){e=e||1;var t=e*30;return this.h(t,!0)},getTetrad:function(e){e=e||1;var t=e*60;return this.h(t,!0)},getTriad:function(e){e=e||1;var t=e*120;return this.h(t,!0)},_partial:function(e){var n=r[e];return function(r,i){var s=this._spaceFunc(&quot;to&quot;,n.space);return r===t?s[e]:(i===!0&amp;&amp;(r=s[e]+r),n.mod&amp;&amp;(r%=n.mod),n.range&amp;&amp;(r=r&lt;n.range[0]?n.range[0]:r&gt;n.range[1]?n.range[1]:r),s[e]=r,this._spaceFunc(&quot;from&quot;,n.space,s))}},_spaceFunc:function(e,t,n){var r=t||this.
 _hSpace,i=e+r.charAt(0).toUpperCase()+r.substr(1);return this[i](n)}};var r={h:{mod:360},s:{range:[0,100]},l:{space:&quot;hsl&quot;,range:[0,100]},v:{space:&quot;hsv&quot;,range:[0,100]},r:{space:&quot;rgb&quot;,range:[0,255]},g:{space:&quot;rgb&quot;,range:[0,255]},b:{space:&quot;rgb&quot;,range:[0,255]}};for(var i in r)r.hasOwnProperty(i)&amp;&amp;(n.fn[i]=n.fn._partial(i));e.Color=n}(typeof exports==&quot;object&quot;&amp;&amp;exports||this);
</del><span class="cx">\ No newline at end of file
</span><ins>+* Copyright (c) 2013 Matt Wiebe; Licensed GPLv2 */
+(function(e,t){function c(){var t,n;r?i=&quot;filter&quot;:(t=e('&lt;div id=&quot;iris-gradtest&quot; /&gt;'),n=&quot;linear-gradient(top,#fff,#000)&quot;,e.each(s,function(e,r){t.css(&quot;backgroundImage&quot;,r+n);if(t.css(&quot;backgroundImage&quot;).match(&quot;gradient&quot;))return i=e,!1}),i===!1&amp;&amp;(t.css(&quot;background&quot;,&quot;-webkit-gradient(linear,0% 0%,0% 100%,from(#fff),to(#000))&quot;),t.css(&quot;backgroundImage&quot;).match(&quot;gradient&quot;)&amp;&amp;(i=&quot;webkit&quot;)),t.remove())}function h(t,n){return t=t===&quot;top&quot;?&quot;top&quot;:&quot;left&quot;,n=e.isArray(n)?n:Array.prototype.slice.call(arguments,1),i===&quot;webkit&quot;?d(t,n):s[i]+&quot;linear-gradient(&quot;+t+&quot;, &quot;+n.join(&quot;, &quot;)+&quot;)&quot;}function p(t,n){var r,i,s,o,u,a,f,l,c;t=t===&quot;top&quot;?&quot;top&quot;:&quot;left&quot;,n=e.isArray(n)?n:Array.prototype.slice.call(arguments,1),r=t===&quot;top&quot;?0:1,i=e(this),s=n.length-1,o=&quot;filt
 er&quot;,u=r===1?&quot;left&quot;:&quot;top&quot;,a=r===1?&quot;right&quot;:&quot;bottom&quot;,f=r===1?&quot;height&quot;:&quot;width&quot;,l='&lt;div class=&quot;iris-ie-gradient-shim&quot; style=&quot;position:absolute;'+f+&quot;:100%;&quot;+u+&quot;:%start%;&quot;+a+&quot;:%end%;&quot;+o+':%filter%;&quot; data-color:&quot;%color%&quot;&gt;&lt;/div&gt;',c=&quot;&quot;,i.css(&quot;position&quot;)===&quot;static&quot;&amp;&amp;i.css({position:&quot;relative&quot;}),n=v(n),e.each(n,function(e,t){var i,o,u;if(e===s)return!1;i=n[e+1];if(t.stop===i.stop)return;o=100-parseFloat(i.stop)+&quot;%&quot;,t.octoHex=(new Color(t.color)).toIEOctoHex(),i.octoHex=(new Color(i.color)).toIEOctoHex(),u=&quot;progid:DXImageTransform.Microsoft.Gradient(GradientType=&quot;+r+&quot;, StartColorStr='&quot;+t.octoHex+&quot;', EndColorStr='&quot;+i.octoHex+&quot;')&quot;,c+=l.replace(&quot;%start%&quot;,t.stop).replace(&quot;%end%&quot;,o).replace(&quot;%filter%&quot;,u)}),i.find(&quot;.iris-ie-grad
 ient-shim&quot;).remove(),e(c).prependTo(i)}function d(t,n){var r=[];return t=t===&quot;top&quot;?&quot;0% 0%,0% 100%,&quot;:&quot;0% 100%,100% 100%,&quot;,n=v(n),e.each(n,function(e,t){r.push(&quot;color-stop(&quot;+parseFloat(t.stop)/100+&quot;, &quot;+t.color+&quot;)&quot;)}),&quot;-webkit-gradient(linear,&quot;+t+r.join(&quot;,&quot;)+&quot;)&quot;}function v(t){var n=[],r=[],i=[],s=t.length-1;return e.each(t,function(e,t){var i=t,s=!1,o=t.match(/1?[0-9]{1,2}%$/);o&amp;&amp;(i=t.replace(/\s?1?[0-9]{1,2}%$/,&quot;&quot;),s=o.shift()),n.push(i),r.push(s)}),r[0]===!1&amp;&amp;(r[0]=&quot;0%&quot;),r[s]===!1&amp;&amp;(r[s]=&quot;100%&quot;),r=m(r),e.each(r,function(e){i[e]={color:n[e],stop:r[e]}}),i}function m(t){var n=0,r=t.length-1,i=0,s=!1,o,u,a,f;if(t.length&lt;=2||e.inArray(!1,t)&lt;0)return t;while(i&lt;t.length-1)!s&amp;&amp;t[i]===!1?(n=i-1,s=!0):s&amp;&amp;t[i]!==!1&amp;&amp;(r=i,i=t.length),i++;u=r-n,f=parseInt(t[n].replace(&quot;%&quot;),10),o=(parseFloat(t[r].rep
 lace(&quot;%&quot;))-f)/u,i=n+1,a=1;while(i&lt;r)t[i]=f+a*o+&quot;%&quot;,a++,i++;return m(t)}var n,r,i,s,o,u,a,f,l;n='&lt;div class=&quot;iris-picker&quot;&gt;&lt;div class=&quot;iris-picker-inner&quot;&gt;&lt;div class=&quot;iris-square&quot;&gt;&lt;a class=&quot;iris-square-value&quot; href=&quot;#&quot;&gt;&lt;span class=&quot;iris-square-handle ui-slider-handle&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;div class=&quot;iris-square-inner iris-square-horiz&quot;&gt;&lt;/div&gt;&lt;div class=&quot;iris-square-inner iris-square-vert&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iris-slider iris-strip&quot;&gt;&lt;div class=&quot;iris-slider-offset&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;',a=navigator.userAgent.toLowerCase(),f=navigator.appName===&quot;Microsoft Internet Explorer&quot;,l=f?parseFloat(a.match(/msie ([0-9]{1,}[\.0-9]{0,})/)[1]):0,r=f&amp;&amp;l&lt;10,i=!1,s=[&quot;-moz-&quot;,&quot;-webkit-&quot;,&quot;-o-&quot;,&quot;-ms-&quot;],o='.iris-pick
 er{display:block;position:relative}.iris-picker,.iris-picker *{-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input + .iris-picker{margin-top:4px}.iris-error{background-color:#ffafaf}.iris-border{border-radius:3px;border:1px solid #aaa;width:200px;background-color:#fff}.iris-picker-inner{position:absolute;top:0;right:0;left:0;bottom:0}.iris-border .iris-picker-inner{top:10px;right:10px;left:10px;bottom:10px}.iris-picker .iris-square-inner{position:absolute;left:0;right:0;top:0;bottom:0}.iris-picker .iris-square,.iris-picker .iris-slider,.iris-picker .iris-square-inner,.iris-picker .iris-palette{border-radius:3px;box-shadow:inset 0 0 5px rgba(0,0,0,0.4);height:100%;width:12.5%;float:left;margin-right:5%}.iris-picker .iris-square{width:76%;margin-right:10%;position:relative}.iris-picker .iris-square-inner{width:auto;margin:0}.iris-ie-9 .iris-square,.iris-ie-9 .iris-slider,.iris-ie-9 .iris-square-inner,.iris-ie-9 .iris-palette{box-shadow:none;
 border-radius:0}.iris-ie-9 .iris-square,.iris-ie-9 .iris-slider,.iris-ie-9 .iris-palette{outline:1px solid rgba(0,0,0,.1)}.iris-ie-lt9 .iris-square,.iris-ie-lt9 .iris-slider,.iris-ie-lt9 .iris-square-inner,.iris-ie-lt9 .iris-palette{outline:1px solid #aaa}.iris-ie-lt9 .iris-square .ui-slider-handle{outline:1px solid #aaa;background-color:#fff;-ms-filter:&quot;progid:DXImageTransform.Microsoft.Alpha(Opacity=30)&quot;}.iris-ie-lt9 .iris-square .iris-square-handle{background:none;border:3px solid #fff;-ms-filter:&quot;progid:DXImageTransform.Microsoft.Alpha(Opacity=50)&quot;}.iris-picker .iris-strip{margin-right:0;position:relative}.iris-picker .iris-strip .ui-slider-handle{position:absolute;background:none;right:-3px;left:-3px;border:4px solid #aaa;border-width:4px 3px;width:auto;height:6px;border-radius:4px;box-shadow:0 1px 2px rgba(0,0,0,.2);opacity:.9;z-index:5;cursor:ns-resize}.iris-strip .ui-slider-handle:before{content:&quot; &quot;;position:absolute;left:-2px;right:-2px
 ;top:-3px;bottom:-3px;border:2px solid #fff;border-radius:3px}.iris-picker .iris-slider-offset{position:absolute;top:11px;left:0;right:0;bottom:-3px}.iris-picker .iris-square-handle{background:transparent;border:5px solid #aaa;border-radius:50%;border-color:rgba(128,128,128,.5);box-shadow:none;width:12px;height:12px;position:absolute;left:-10px;top:-10px;cursor:move;opacity:1;z-index:10}.iris-picker .ui-state-focus .iris-square-handle{opacity:.8}.iris-picker .iris-square-handle:hover{border-color:#999}.iris-picker .iris-square-value:focus .iris-square-handle{box-shadow:0 0 2px rgba(0,0,0,.75);opacity:.8}.iris-picker .iris-square-handle:hover::after{border-color:#fff}.iris-picker .iris-square-handle::after{position:absolute;bottom:-4px;right:-4px;left:-4px;top:-4px;border:3px solid #f9f9f9;border-color:rgba(255,255,255,.8);border-radius:50%;content:&quot; &quot;}.iris-picker .iris-square-value{width:8px;height:8px;position:absolute}.iris-ie-lt9 .iris-square-value,.iris-mozill
 a .iris-square-value{width:1px;height:1px}.iris-palette-container{position:absolute;bottom:0;left:0;margin:0;padding:0}.iris-border .iris-palette-container{left:10px;bottom:10px}.iris-picker .iris-palette{margin:0;cursor:pointer}';if(r&amp;&amp;l&lt;=7){e.fn.iris=e.noop,e.support.iris=!1;return}e.support.iris=!0,e.fn.gradient=function(t){var n=arguments;return this.each(function(){r?p.apply(this,n):e(this).css(&quot;backgroundImage&quot;,h.apply(this,n))})},e.fn.raninbowGradient=function(t,n){var r,i,s,o;t=t||&quot;top&quot;,r=e.extend({},{s:100,l:50},n),i=&quot;hsl(%h%,&quot;+r.s+&quot;%,&quot;+r.l+&quot;%)&quot;,s=0,o=[];while(s&lt;=360)o.push(i.replace(&quot;%h%&quot;,s)),s+=30;return this.each(function(){e(this).gradient(t,o)})},u={options:{color:!1,mode:&quot;hsl&quot;,controls:{horiz:&quot;s&quot;,vert:&quot;l&quot;,strip:&quot;h&quot;},hide:!0,border:!0,target:!1,width:200,palettes:!1},_color:&quot;&quot;,_palettes:[&quot;#000&quot;,&quot;#fff&quot;,&quot;#d33&quot;,&
 quot;#d93&quot;,&quot;#ee2&quot;,&quot;#81d742&quot;,&quot;#1e73be&quot;,&quot;#8224e3&quot;],_inited:!1,_defaultHSLControls:{horiz:&quot;s&quot;,vert:&quot;l&quot;,strip:&quot;h&quot;},_defaultHSVControls:{horiz:&quot;h&quot;,vert:&quot;v&quot;,strip:&quot;s&quot;},_scale:{h:360,s:100,l:100,v:100},_create:function(){var t=this,r=t.element,s=t.options.color||r.val(),o;i===!1&amp;&amp;c(),r.is(&quot;input&quot;)?(t.options.target?t.picker=e(n).appendTo(t.options.target):t.picker=e(n).insertAfter(r),t._addInputListeners(r)):(r.append(n),t.picker=r.find(&quot;.iris-picker&quot;)),f?l===9?t.picker.addClass(&quot;iris-ie-9&quot;):l&lt;=8&amp;&amp;t.picker.addClass(&quot;iris-ie-lt9&quot;):a.indexOf(&quot;compatible&quot;)&lt;0&amp;&amp;a.indexOf(&quot;khtml&quot;)&lt;0&amp;&amp;a.match(/mozilla/)&amp;&amp;t.picker.addClass(&quot;iris-mozilla&quot;),t.options.palettes&amp;&amp;t._addPalettes(),t._color=(new Color(s)).setHSpace(t.options.mode),t.options.color=t._color.toString(),t.
 controls={square:t.picker.find(&quot;.iris-square&quot;),squareDrag:t.picker.find(&quot;.iris-square-value&quot;),horiz:t.picker.find(&quot;.iris-square-horiz&quot;),vert:t.picker.find(&quot;.iris-square-vert&quot;),strip:t.picker.find(&quot;.iris-strip&quot;),stripSlider:t.picker.find(&quot;.iris-strip .iris-slider-offset&quot;)},t.options.mode===&quot;hsv&quot;&amp;&amp;t._has(&quot;l&quot;,t.options.controls)?t.options.controls=t._defaultHSVControls:t.options.mode===&quot;hsl&quot;&amp;&amp;t._has(&quot;v&quot;,t.options.controls)&amp;&amp;(t.options.controls=t._defaultHSLControls),t.hue=t._color.h(),t.options.hide&amp;&amp;t.picker.hide(),t.options.border&amp;&amp;t.picker.addClass(&quot;iris-border&quot;),t._initControls(),t.active=&quot;external&quot;,t._dimensions(),t._change()},_has:function(t,n){var r=!1;return e.each(n,function(e,n){if(t===n)return r=!0,!1}),r},_addPalettes:function(){var t=e(&quot;&lt;div class='iris-palette-container' /&gt;&quot;),n=e(&quot;&lt;a
  class='iris-palette' tabindex='0' /&gt;&quot;),r=e.isArray(this.options.palettes)?this.options.palettes:this._palettes;this.picker.find(&quot;.iris-palette-container&quot;).length&amp;&amp;(t=this.picker.find(&quot;.iris-palette-container&quot;).detach().html(&quot;&quot;)),e.each(r,function(e,r){n.clone().data(&quot;color&quot;,r).css(&quot;backgroundColor&quot;,r).appendTo(t).height(10).width(10)}),this.picker.append(t)},_paint:function(){var e=this;e._paintDimension(&quot;top&quot;,&quot;strip&quot;),e._paintDimension(&quot;top&quot;,&quot;vert&quot;),e._paintDimension(&quot;left&quot;,&quot;horiz&quot;)},_paintDimension:function(e,t){var n=this,r=n._color,i=n.options.mode,s=n._getHSpaceColor(),o=n.controls[t],u=n.options.controls,a;if(t===n.active||n.active===&quot;square&quot;&amp;&amp;t!==&quot;strip&quot;)return;switch(u[t]){case&quot;h&quot;:if(i===&quot;hsv&quot;){s=r.clone();switch(t){case&quot;horiz&quot;:s[u.vert](100);break;case&quot;vert&quot;:s[u.horiz](100);
 break;case&quot;strip&quot;:s.setHSpace(&quot;hsl&quot;)}a=s.toHsl()}else t===&quot;strip&quot;?a={s:s.s,l:s.l}:a={s:100,l:s.l};o.raninbowGradient(e,a);break;case&quot;s&quot;:i===&quot;hsv&quot;?t===&quot;vert&quot;?a=[r.clone().a(0).s(0).toCSS(&quot;rgba&quot;),r.clone().a(1).s(0).toCSS(&quot;rgba&quot;)]:t===&quot;strip&quot;?a=[r.clone().s(100).toCSS(&quot;hsl&quot;),r.clone().s(0).toCSS(&quot;hsl&quot;)]:t===&quot;horiz&quot;&amp;&amp;(a=[&quot;#fff&quot;,&quot;hsl(&quot;+s.h+&quot;,100%,50%)&quot;]):t===&quot;vert&quot;&amp;&amp;n.options.controls.horiz===&quot;h&quot;?a=[&quot;hsla(0, 0%, &quot;+s.l+&quot;%, 0)&quot;,&quot;hsla(0, 0%, &quot;+s.l+&quot;%, 1)&quot;]:a=[&quot;hsl(&quot;+s.h+&quot;,0%,50%)&quot;,&quot;hsl(&quot;+s.h+&quot;,100%,50%)&quot;],o.gradient(e,a);break;case&quot;l&quot;:t===&quot;strip&quot;?a=[&quot;hsl(&quot;+s.h+&quot;,100%,100%)&quot;,&quot;hsl(&quot;+s.h+&quot;, &quot;+s.s+&quot;%,50%)&quot;,&quot;hsl(&quot;+s.h+&quot;,100%,0%)&quot;]:a=[&qu
 ot;#fff&quot;,&quot;rgba(255,255,255,0) 50%&quot;,&quot;rgba(0,0,0,0) 50%&quot;,&quot;rgba(0,0,0,1)&quot;],o.gradient(e,a);break;case&quot;v&quot;:t===&quot;strip&quot;?a=[r.clone().v(100).toCSS(),r.clone().v(0).toCSS()]:a=[&quot;rgba(0,0,0,0)&quot;,&quot;#000&quot;],o.gradient(e,a);break;default:}},_getHSpaceColor:function(){return this.options.mode===&quot;hsv&quot;?this._color.toHsv():this._color.toHsl()},_dimensions:function(t){var n=this,r=n.options,i=n.picker.find(&quot;.iris-picker-inner&quot;),s=n.controls,o=s.square,u=n.picker.find(&quot;.iris-strip&quot;),a=&quot;77.5%&quot;,f=&quot;12%&quot;,l=20,c=r.border?r.width-l:r.width,h,p=e.isArray(r.palettes)?r.palettes.length:n._palettes.length,d,v,m;t&amp;&amp;(o.css(&quot;width&quot;,&quot;&quot;),u.css(&quot;width&quot;,&quot;&quot;),n.picker.css({width:&quot;&quot;,height:&quot;&quot;})),a=c*(parseFloat(a)/100),f=c*(parseFloat(f)/100),h=r.border?a+l:a,o.width(a).height(a),u.height(a).width(f),n.picker.css({width:r.wid
 th,height:h});if(!r.palettes)return;d=a*2/100,m=a-(p-1)*d,v=m/p,n.picker.find(&quot;.iris-palette&quot;).each(function(t,n){var r=t===0?0:d;e(this).css({width:v,height:v,marginLeft:r})}),n.picker.css(&quot;paddingBottom&quot;,v+d),u.height(v+d+a)},_addInputListeners:function(e){var t=this,n=100,r=function(n){var r=new Color(e.val()),i=e.val().replace(/^#/,&quot;&quot;);e.removeClass(&quot;iris-error&quot;),r.error?i!==&quot;&quot;&amp;&amp;e.addClass(&quot;iris-error&quot;):r.toString()!==t._color.toString()&amp;&amp;(n.type!==&quot;keyup&quot;||!i.match(/^[0-9a-fA-F]{3}$/))&amp;&amp;t._setOption(&quot;color&quot;,r.toString())};e.on(&quot;change&quot;,r).on(&quot;keyup&quot;,t._debounce(r,n)),t.options.hide&amp;&amp;e.one(&quot;focus&quot;,function(){t.show()})},_initControls:function(){var t=this,n=t.controls,r=n.square,i=t.options.controls,s=t._scale[i.strip];n.stripSlider.slider({orientation:&quot;vertical&quot;,max:s,slide:function(e,n){t.active=&quot;strip&quot;,i.stri
 p===&quot;h&quot;&amp;&amp;(n.value=s-n.value),t._color[i.strip](n.value),t._change.apply(t,arguments)}}),n.squareDrag.draggable({containment:&quot;parent&quot;,zIndex:1e3,cursor:&quot;move&quot;,drag:function(e,n){t._squareDrag(e,n)},start:function(){r.addClass(&quot;iris-dragging&quot;),e(this).addClass(&quot;ui-state-focus&quot;)},stop:function(){r.removeClass(&quot;iris-dragging&quot;),e(this).removeClass(&quot;ui-state-focus&quot;)}}).on(&quot;mousedown mouseup&quot;,function(n){var r=&quot;ui-state-focus&quot;;n.preventDefault(),n.type===&quot;mousedown&quot;?(t.picker.find(&quot;.&quot;+r).removeClass(r).blur(),e(this).addClass(r).focus()):e(this).removeClass(r)}).on(&quot;keydown&quot;,function(e){var r=n.square,i=n.squareDrag,s=i.position(),o=t.options.width/100;e.altKey&amp;&amp;(o*=10);switch(e.keyCode){case 37:s.left-=o;break;case 38:s.top-=o;break;case 39:s.left+=o;break;case 40:s.top+=o;break;default:return!0}s.left=Math.max(0,Math.min(s.left,r.width())),s.top=
 Math.max(0,Math.min(s.top,r.height())),i.css(s),t._squareDrag(e,{position:s}),e.preventDefault()}),r.mousedown(function(n){var r,i;if(n.which!==1)return;if(!e(n.target).is(&quot;div&quot;))return;r=t.controls.square.offset(),i={top:n.pageY-r.top,left:n.pageX-r.left},n.preventDefault(),t._squareDrag(n,{position:i}),n.target=t.controls.squareDrag.get(0),t.controls.squareDrag.css(i).trigger(n)}),t.options.palettes&amp;&amp;t._paletteListeners()},_paletteListeners:function(){var t=this;t.picker.find(&quot;.iris-palette-container&quot;).on(&quot;click.palette&quot;,&quot;.iris-palette&quot;,function(n){t._color.fromCSS(e(this).data(&quot;color&quot;)),t.active=&quot;external&quot;,t._change()}).on(&quot;keydown.palette&quot;,&quot;.iris-palette&quot;,function(t){if(t.keyCode!==13&amp;&amp;t.keyCode!==32)return!0;t.stopPropagation(),e(this).click()})},_squareDrag:function(e,t){var n=this,r=n.options.controls,i=n._squareDimensions(),s=Math.round((i.h-t.position.top)/i.h*n._scale[r.
 vert]),o=n._scale[r.horiz]-Math.round((i.w-t.position.left)/i.w*n._scale[r.horiz]);n._color[r.horiz](o)[r.vert](s),n.active=&quot;square&quot;,n._change.apply(n,arguments)},_setOption:function(t,n){var r=this,i=r.options[t],s=!1,o,u,a;r.options[t]=n;switch(t){case&quot;color&quot;:n=&quot;&quot;+n,o=n.replace(/^#/,&quot;&quot;),u=(new Color(n)).setHSpace(r.options.mode),u.error?r.options[t]=i:(r._color=u,r.options.color=r.options[t]=r._color.toString(),r.active=&quot;external&quot;,r._change());break;case&quot;palettes&quot;:s=!0,n?r._addPalettes():r.picker.find(&quot;.iris-palette-container&quot;).remove(),i||r._paletteListeners();break;case&quot;width&quot;:s=!0;break;case&quot;border&quot;:s=!0,a=n?&quot;addClass&quot;:&quot;removeClass&quot;,r.picker[a](&quot;iris-border&quot;);break;case&quot;mode&quot;:case&quot;controls&quot;:if(i===n)return;return a=r.element,i=r.options,i.hide=!r.picker.is(&quot;:visible&quot;),r.destroy(),r.picker.remove(),e(r.element).iris(i)}s&am
 p;&amp;r._dimensions(!0)},_squareDimensions:function(e){var n=this.controls.square,r,i;return e!==t&amp;&amp;n.data(&quot;dimensions&quot;)?n.data(&quot;dimensions&quot;):(i=this.controls.squareDrag,r={w:n.width(),h:n.height()},n.data(&quot;dimensions&quot;,r),r)},_isNonHueControl:function(e,t){return e===&quot;square&quot;&amp;&amp;this.options.controls.strip===&quot;h&quot;?!0:t===&quot;external&quot;||t===&quot;h&quot;&amp;&amp;e===&quot;strip&quot;?!1:!0},_change:function(t,n){var r=this,i=r.controls,s=r._getHSpaceColor(),o=r._color.toString(),u=[&quot;square&quot;,&quot;strip&quot;],a=r.options.controls,f=a[r.active]||&quot;external&quot;,l=r.hue;r.active===&quot;strip&quot;?u=[]:r.active!==&quot;external&quot;&amp;&amp;u.pop(),e.each(u,function(e,t){var n,o,u;if(t!==r.active)switch(t){case&quot;strip&quot;:n=a.strip===&quot;h&quot;?r._scale[a.strip]-s[a.strip]:s[a.strip],i.stripSlider.slider(&quot;value&quot;,n);break;case&quot;square&quot;:o=r._squareDimensions(),u={l
 eft:s[a.horiz]/r._scale[a.horiz]*o.w,top:o.h-s[a.vert]/r._scale[a.vert]*o.h},r.controls.squareDrag.css(u)}}),s.h!==l&amp;&amp;r._isNonHueControl(r.active,f)&amp;&amp;r._color.h(l),r.hue=r._color.h(),r.options.color=r._color.toString(),r._inited&amp;&amp;r._trigger(&quot;change&quot;,{type:r.active},{color:r._color}),r.element.is(&quot;:input&quot;)&amp;&amp;!r._color.error&amp;&amp;(r.element.removeClass(&quot;iris-error&quot;),r.element.val()!==r._color.toString()&amp;&amp;r.element.val(r._color.toString())),r._paint(),r._inited=!0,r.active=!1},_debounce:function(e,t,n){var r,i;return function(){var s=this,o=arguments,u,a;return u=function(){r=null,n||(i=e.apply(s,o))},a=n&amp;&amp;!r,clearTimeout(r),r=setTimeout(u,t),a&amp;&amp;(i=e.apply(s,o)),i}},show:function(){this.picker.show()},hide:function(){this.picker.hide()},toggle:function(){this.picker.toggle()},color:function(e){if(e===!0)return this._color.clone();if(e===t)return this._color.toString();this.option(&quot;colo
 r&quot;,e)}},e.widget(&quot;a8c.iris&quot;,u),e('&lt;style id=&quot;iris-css&quot;&gt;'+o+&quot;&lt;/style&gt;&quot;).appendTo(&quot;head&quot;)})(jQuery),function(e,t){var n=function(e,t){return this instanceof n?this._init(e,t):new n(e,t)};n.fn=n.prototype={_color:0,_alpha:1,error:!1,_hsl:{h:0,s:0,l:0},_hsv:{h:0,s:0,v:0},_hSpace:&quot;hsl&quot;,_init:function(e){var n=&quot;noop&quot;;switch(typeof e){case&quot;object&quot;:return e.a!==t&amp;&amp;this.a(e.a),n=e.r!==t?&quot;fromRgb&quot;:e.l!==t?&quot;fromHsl&quot;:e.v!==t?&quot;fromHsv&quot;:n,this[n](e);case&quot;string&quot;:return this.fromCSS(e);case&quot;number&quot;:return this.fromInt(parseInt(e,10))}return this},_error:function(){return this.error=!0,this},clone:function(){var e=new n(this.toInt()),t=[&quot;_alpha&quot;,&quot;_hSpace&quot;,&quot;_hsl&quot;,&quot;_hsv&quot;,&quot;error&quot;];for(var r=t.length-1;r&gt;=0;r--)e[t[r]]=this[t[r]];return e},setHSpace:function(e){return this._hSpace=e===&quot;hsv&quot;
 ?e:&quot;hsl&quot;,this},noop:function(){return this},fromCSS:function(e){var t,n,r=/^(rgb|hs(l|v))a?\(/;this.error=!1,e=e.replace(/^\s+/,&quot;&quot;).replace(/\s+$/,&quot;&quot;).replace(/;$/,&quot;&quot;);if(e.match(r)&amp;&amp;e.match(/\)$/)){n=e.replace(/(\s|%)/g,&quot;&quot;).replace(r,&quot;&quot;).replace(/,?\);?$/,&quot;&quot;).split(&quot;,&quot;);if(n.length&lt;3)return this._error();if(n.length===4){this.a(parseFloat(n.pop()));if(this.error)return this}for(var i=n.length-1;i&gt;=0;i--){n[i]=parseInt(n[i],10);if(isNaN(n[i]))return this._error()}return e.match(/^rgb/)?this.fromRgb({r:n[0],g:n[1],b:n[2]}):e.match(/^hsv/)?this.fromHsv({h:n[0],s:n[1],v:n[2]}):this.fromHsl({h:n[0],s:n[1],l:n[2]})}return this.fromHex(e)},fromRgb:function(e,n){return typeof e!=&quot;object&quot;||e.r===t||e.g===t||e.b===t?this._error():(this.error=!1,this.fromInt(parseInt((e.r&lt;&lt;16)+(e.g&lt;&lt;8)+e.b,10),n))},fromHex:function(e){return e=e.replace(/^#/,&quot;&quot;).replace(/^0x/,&
 quot;&quot;),e.length===3&amp;&amp;(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),this.error=!/^[0-9A-F]{6}$/i.test(e),this.fromInt(parseInt(e,16))},fromHsl:function(e){var n,r,i,s,o,u,a,f;return typeof e!=&quot;object&quot;||e.h===t||e.s===t||e.l===t?this._error():(this._hsl=e,this._hSpace=&quot;hsl&quot;,u=e.h/360,a=e.s/100,f=e.l/100,a===0?n=r=i=f:(s=f&lt;.5?f*(1+a):f+a-f*a,o=2*f-s,n=this.hue2rgb(o,s,u+1/3),r=this.hue2rgb(o,s,u),i=this.hue2rgb(o,s,u-1/3)),this.fromRgb({r:n*255,g:r*255,b:i*255},!0))},fromHsv:function(e){var n,r,i,s,o,u,a,f,l,c,h;if(typeof e!=&quot;object&quot;||e.h===t||e.s===t||e.v===t)return this._error();this._hsv=e,this._hSpace=&quot;hsv&quot;,n=e.h/360,r=e.s/100,i=e.v/100,a=Math.floor(n*6),f=n*6-a,l=i*(1-r),c=i*(1-f*r),h=i*(1-(1-f)*r);switch(a%6){case 0:s=i,o=h,u=l;break;case 1:s=c,o=i,u=l;break;case 2:s=l,o=i,u=h;break;case 3:s=l,o=c,u=i;break;case 4:s=h,o=l,u=i;break;case 5:s=i,o=l,u=c}return this.fromRgb({r:s*255,g:o*255,b:u*255},!0)},fromInt:function(e,n){retur
 n this._color=parseInt(e,10),isNaN(this._color)&amp;&amp;(this._color=0),this._color&gt;16777215?this._color=16777215:this._color&lt;0&amp;&amp;(this._color=0),n===t&amp;&amp;(this._hsv.h=this._hsv.s=this._hsl.h=this._hsl.s=0),this},hue2rgb:function(e,t,n){return n&lt;0&amp;&amp;(n+=1),n&gt;1&amp;&amp;(n-=1),n&lt;1/6?e+(t-e)*6*n:n&lt;.5?t:n&lt;2/3?e+(t-e)*(2/3-n)*6:e},toString:function(){var e=parseInt(this._color,10).toString(16);if(this.error)return&quot;&quot;;if(e.length&lt;6)for(var t=6-e.length-1;t&gt;=0;t--)e=&quot;0&quot;+e;return&quot;#&quot;+e},toCSS:function(e,t){e=e||&quot;hex&quot;,t=parseFloat(t||this._alpha);switch(e){case&quot;rgb&quot;:case&quot;rgba&quot;:var n=this.toRgb();return t&lt;1?&quot;rgba( &quot;+n.r+&quot;, &quot;+n.g+&quot;, &quot;+n.b+&quot;, &quot;+t+&quot; )&quot;:&quot;rgb( &quot;+n.r+&quot;, &quot;+n.g+&quot;, &quot;+n.b+&quot; )&quot;;case&quot;hsl&quot;:case&quot;hsla&quot;:var r=this.toHsl();return t&lt;1?&quot;hsla( &quot;+r.h+&quot;, &
 quot;+r.s+&quot;%, &quot;+r.l+&quot;%, &quot;+t+&quot; )&quot;:&quot;hsl( &quot;+r.h+&quot;, &quot;+r.s+&quot;%, &quot;+r.l+&quot;% )&quot;;default:return this.toString()}},toRgb:function(){return{r:255&amp;this._color&gt;&gt;16,g:255&amp;this._color&gt;&gt;8,b:255&amp;this._color}},toHsl:function(){var e=this.toRgb(),t=e.r/255,n=e.g/255,r=e.b/255,i=Math.max(t,n,r),s=Math.min(t,n,r),o,u,a=(i+s)/2;if(i===s)o=u=0;else{var f=i-s;u=a&gt;.5?f/(2-i-s):f/(i+s);switch(i){case t:o=(n-r)/f+(n&lt;r?6:0);break;case n:o=(r-t)/f+2;break;case r:o=(t-n)/f+4}o/=6}return o=Math.round(o*360),o===0&amp;&amp;this._hsl.h!==o&amp;&amp;(o=this._hsl.h),u=Math.round(u*100),u===0&amp;&amp;this._hsl.s&amp;&amp;(u=this._hsl.s),{h:o,s:u,l:Math.round(a*100)}},toHsv:function(){var e=this.toRgb(),t=e.r/255,n=e.g/255,r=e.b/255,i=Math.max(t,n,r),s=Math.min(t,n,r),o,u,a=i,f=i-s;u=i===0?0:f/i;if(i===s)o=u=0;else{switch(i){case t:o=(n-r)/f+(n&lt;r?6:0);break;case n:o=(r-t)/f+2;break;case r:o=(t-n)/f+4}o/=6}retur
 n o=Math.round(o*360),o===0&amp;&amp;this._hsv.h!==o&amp;&amp;(o=this._hsv.h),u=Math.round(u*100),u===0&amp;&amp;this._hsv.s&amp;&amp;(u=this._hsv.s),{h:o,s:u,v:Math.round(a*100)}},toInt:function(){return this._color},toIEOctoHex:function(){var e=this.toString(),t=parseInt(255*this._alpha,10).toString(16);return t.length===1&amp;&amp;(t=&quot;0&quot;+t),&quot;#&quot;+t+e.replace(/^#/,&quot;&quot;)},toLuminosity:function(){var e=this.toRgb();return.2126*Math.pow(e.r/255,2.2)+.7152*Math.pow(e.g/255,2.2)+.0722*Math.pow(e.b/255,2.2)},getDistanceLuminosityFrom:function(e){if(e instanceof n){var t=this.toLuminosity(),r=e.toLuminosity();return t&gt;r?(t+.05)/(r+.05):(r+.05)/(t+.05)}throw&quot;getDistanceLuminosityFrom requires a Color object&quot;},getMaxContrastColor:function(){var e=this.toLuminosity(),t=e&gt;=.5?&quot;000000&quot;:&quot;ffffff&quot;;return new n(t)},getGrayscaleContrastingColor:function(e){if(!e)return this.getMaxContrastColor();var t=e&lt;5?5:e,n=this.getMaxCon
 trastColor();e=n.getDistanceLuminosityFrom(this);if(e&lt;=t)return n;var r=0===n.toInt()?1:-1;while(e&gt;t)n=n.incrementLightness(r),e=n.getDistanceLuminosityFrom(this);return n},getReadableContrastingColor:function(e,r){if(!e instanceof n)return this;var i=r===t?5:r,s=e.getDistanceLuminosityFrom(this),o=e.getMaxContrastColor(),u=o.getDistanceLuminosityFrom(e);if(u&lt;=i)return o;if(s&gt;=i)return this;var a=0===o.toInt()?-1:1;while(s&lt;i){this.incrementLightness(a),s=this.getDistanceLuminosityFrom(e);if(this._color===0||this._color===16777215)break}return this},a:function(e){if(e===t)return this._alpha;var n=parseFloat(e);return isNaN(n)?this._error():(this._alpha=n,this)},darken:function(e){return e=e||5,this.l(-e,!0)},lighten:function(e){return e=e||5,this.l(e,!0)},saturate:function(e){return e=e||15,this.s(e,!0)},desaturate:function(e){return e=e||15,this.s(-e,!0)},toGrayscale:function(){return this.setHSpace(&quot;hsl&quot;).s(0)},getComplement:function(){return this.h
 (180,!0)},getSplitComplement:function(e){e=e||1;var t=180+e*30;return this.h(t,!0)},getAnalog:function(e){e=e||1;var t=e*30;return this.h(t,!0)},getTetrad:function(e){e=e||1;var t=e*60;return this.h(t,!0)},getTriad:function(e){e=e||1;var t=e*120;return this.h(t,!0)},_partial:function(e){var n=r[e];return function(r,i){var s=this._spaceFunc(&quot;to&quot;,n.space);return r===t?s[e]:(i===!0&amp;&amp;(r=s[e]+r),n.mod&amp;&amp;(r%=n.mod),n.range&amp;&amp;(r=r&lt;n.range[0]?n.range[0]:r&gt;n.range[1]?n.range[1]:r),s[e]=r,this._spaceFunc(&quot;from&quot;,n.space,s))}},_spaceFunc:function(e,t,n){var r=t||this._hSpace,i=e+r.charAt(0).toUpperCase()+r.substr(1);return this[i](n)}};var r={h:{mod:360},s:{range:[0,100]},l:{space:&quot;hsl&quot;,range:[0,100]},v:{space:&quot;hsv&quot;,range:[0,100]},r:{space:&quot;rgb&quot;,range:[0,255]},g:{space:&quot;rgb&quot;,range:[0,255]},b:{space:&quot;rgb&quot;,range:[0,255]}};for(var i in r)r.hasOwnProperty(i)&amp;&amp;(n.fn[i]=n.fn._partial(i));
 e.Color=n}(typeof exports==&quot;object&quot;&amp;&amp;exports||this);
</ins><span class="cx">\ No newline at end of file
</span></span></pre>
</div>
</div>

</body>
</html>