<!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>[22033] trunk/wp-admin/js/iris.min.js: Update underlying color picker library.</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/22033">22033</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2012-09-27 02:18:55 +0000 (Thu, 27 Sep 2012)</dd>
</dl>

<h3>Log Message</h3>
<pre>Update underlying color picker library. props mattwiebe. see <a href="http://core.trac.wordpress.org/ticket/21206">#21206</a>.</pre>

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

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminjsirisminjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/iris.min.js (22032 => 22033)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/iris.min.js        2012-09-27 02:17:04 UTC (rev 22032)
+++ trunk/wp-admin/js/iris.min.js        2012-09-27 02:18:55 UTC (rev 22033)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-/*! Iris - v0.9.5 - 2012-09-19
</del><ins>+/*! Iris - v0.9.7 - 2012-09-26
</ins><span class="cx"> * https://github.com/Automattic/Iris
</span><span class="cx"> * Copyright (c) 2012 Matt Wiebe; Licensed GPL */
</span><del>-(function(a,b){function h(){if(d)e=&quot;filter&quot;;else{var b=a('&lt;div id=&quot;iris-gradtest&quot; /&gt;'),c=&quot;linear-gradient(top,#fff,#000)&quot;;a.each(f,function(a,d){b.css(&quot;backgroundImage&quot;,d+c);if(b.css(&quot;backgroundImage&quot;).match(&quot;gradient&quot;))return e=a,!1}),a.browser.webkit&amp;&amp;e===!1&amp;&amp;(b.css(&quot;background&quot;,&quot;-webkit-gradient(linear,0% 0%,0% 100%,from(#fff),to(#000))&quot;),b.css(&quot;backgroundImage&quot;).match(&quot;gradient&quot;)&amp;&amp;(e=&quot;webkit&quot;)),b.remove()}}function i(b,c){return b=b===&quot;top&quot;?&quot;top&quot;:&quot;left&quot;,c=a.isArray(c)?c:Array.prototype.slice.call(arguments,1),e===&quot;webkit&quot;?k(b,c):f[e]+&quot;linear-gradient(&quot;+b+&quot;, &quot;+c.join(&quot;, &quot;)+&quot;)&quot;}function j(b,c){b=b===&quot;top&quot;?&quot;top&quot;:&quot;left&quot;,c=a.isArray(c)?c:Array.prototype.slice.call(arguments,1);var d=b===&quot;top&quot;?0:1,e=a(this),f=
 c.length-1,g=parseInt(a.browser.version,10)&gt;=8?&quot;-ms-filter&quot;:&quot;filter&quot;;g=&quot;filter&quot;;var h=d===1?&quot;left&quot;:&quot;top&quot;,i=d===1?&quot;right&quot;:&quot;bottom&quot;,j=d===1?&quot;height&quot;:&quot;width&quot;,k='&lt;div class=&quot;iris-ie-gradient-shim&quot; style=&quot;position:absolute;'+j+&quot;:100%;&quot;+h+&quot;:%start%;&quot;+i+&quot;:%end%;&quot;+g+':%filter%;&quot; data-color:&quot;%color%&quot;&gt;&lt;/div&gt;',m=&quot;&quot;;e.css(&quot;position&quot;)===&quot;static&quot;&amp;&amp;e.css({position:&quot;relative&quot;}),c=l(c),a.each(c,function(a,b){if(a===f)return!1;var e=c[a+1];if(b.stop===e.stop)return;var g=100-parseFloat(e.stop)+&quot;%&quot;;b.octoHex=(new Color(b.color)).toIEOctoHex(),e.octoHex=(new Color(e.color)).toIEOctoHex();var h=&quot;progid:DXImageTransform.Microsoft.Gradient(GradientType=&quot;+d+&quot;, StartColorStr='&quot;+b.octoHex+&quot;', EndColorStr='&quot;+e.octoHex+&quot;')&quot;;m+=k.replace(&quot;%
 start%&quot;,b.stop).replace(&quot;%end%&quot;,g).replace(&quot;%filter%&quot;,h)}),e.find(&quot;.iris-ie-gradient-shim&quot;).remove(),a(m).prependTo(e)}function k(b,c){var d=[];return b=b===&quot;top&quot;?&quot;0% 0%,0% 100%,&quot;:&quot;0% 100%,100% 100%,&quot;,c=l(c),a.each(c,function(a,b){d.push(&quot;color-stop(&quot;+parseFloat(b.stop)/100+&quot;, &quot;+b.color+&quot;)&quot;)}),&quot;-webkit-gradient(linear,&quot;+b+d.join(&quot;,&quot;)+&quot;)&quot;}function l(b){var c=[],d=[],e=[],f=b.length-1;return a.each(b,function(a,b){var e=b,f=!1,g=b.match(/1?[0-9]{1,2}%$/);g&amp;&amp;(e=b.replace(/\s?1?[0-9]{1,2}%$/,&quot;&quot;),f=g.shift()),c.push(e),d.push(f)}),d[0]===!1&amp;&amp;(d[0]=&quot;0%&quot;),d[f]===!1&amp;&amp;(d[f]=&quot;100%&quot;),d=m(d),a.each(d,function(a){e[a]={color:c[a],stop:d[a]}}),e}function m(b){var c=0,d=b.length-1,e=0,f=!1,g,h,i,j;if(b.length&lt;=2||a.inArray(!1,b)&lt;0)return b;while(e&lt;b.length-1)!f&amp;&amp;b[e]===!1?(c=e-1,f=!0):f&amp;&amp;b
 [e]!==!1&amp;&amp;(d=e,e=b.length),e++;h=d-c,j=parseInt(b[c].replace(&quot;%&quot;),10),g=(parseFloat(b[d].replace(&quot;%&quot;))-j)/h,e=c+1,i=1;while(e&lt;d)b[e]=j+i*g+&quot;%&quot;,i++,e++;return m(b)}var c='&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-slider iris-square-horiz&quot;&gt;&lt;/div&gt;&lt;div class=&quot;iris-square-slider iris-square-vert&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iris-slider iris-hue&quot;&gt;&lt;div class=&quot;iris-slider-offset&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;',d=!!(a.browser.msie&amp;&amp;parseInt(a.browser.version,10)&lt;10),e=!1,f=[&quot;-moz-&quot;,&quot;-webkit-&quot;,&quot;-o-&quot;,&quot;-ms-&quot;],g='.iris-picker{display:block;pos
 ition:relative}.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,.iris-picker .iris-slider,.iris-picker .grad-box{border-radius:3px;-webkit-box-shadow:inset 0 0 5px rgba(0,0,0,0.4);-moz-box-shadow:inset 0 0 5px rgba(0,0,0,0.4);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%}.iris-picker .grad-box{width:auto;margin:0}.iris-picker .iris-square .sat,.iris-ie-9 .iris-square,.iris-ie-9 .iris-slider,.iris-ie-9 .grad-box{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;border-radius:0}.iris-picker .iris-square .sat{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.iris-ie-lt9 .iris-square,.iris-ie-lt9 .iris-slider,.iris-
 ie-lt9 .grad-box{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-hue{margin-right:0}.iris-picker .iris-tooltip{position:absolute;z-index:10;font:10px/1 sans-serif;color:#222;background:#fff;border:1px solid #666;padding:3px 6px;border-radius:3px;opacity:.94;white-space:nowrap;top:-36px;left:-12px}.iris-picker .iris-tooltip:before,.iris-picker .iris-tooltip:after{content:&quot; &quot;;width:0;height:0;border-style:solid;border-width:6px 6px 0 6px;border-color:#666 transparent transparent transparent;position:absolute;bottom:-6px;left:6px}.iris-picker .iris-tooltip:after{bottom:-5px;border-top-color:#fff}.iris-picker .iris-hue .ui-slider-handle{position:absolute;wid
 th:100%;height:12px;background:none;border-radius:0;box-shadow:none;opacity:1;z-index:5}.iris-hue .ui-slider-handle:before,.iris-hue .ui-slider-handle:after{content:&quot; &quot;;width:0;height:0;border-style:solid;border-width:6px 7px 6px 0;border-color:transparent #555 transparent transparent;position:absolute;right:-4px}.iris-hue .ui-slider-handle:after{border-width:6px 0 6px 7px;border-color:transparent transparent transparent #555;right:auto;left:-4px}.iris-picker .iris-slider-offset{width:100%;height:100%;position:relative;bottom:-6px}.iris-square .iris-square-horiz{position:absolute;top:-7px;left:-7px;height:1px;width:100%}.iris-square .iris-square-vert{position:absolute;right:6px;top:7px;width:1px;height:100%}.iris-square .iris-square-slider a{opacity:.3;-ms-filter:&quot;progid:DXImageTransform.Microsoft.Alpha(Opacity=30)&quot;;-moz-transition:opacity 300ms;-webkit-transition:opacity 300ms;transition:opacity 300ms}.iris-square .iris-square-slider .ui-slider-handle.ac
 tive{opacity:1;-ms-filter:&quot;progid:DXImageTransform.Microsoft.Alpha(Opacity=100)&quot;}.iris-dragging .iris-square-slider .ui-slider-handle.active{opacity:0;-ms-filter:&quot;progid:DXImageTransform.Microsoft.Alpha(Opacity=0)&quot;}.iris-picker .ui-slider-handle{background:#f5f5f5;-webkit-border-radius:10px;-moz-border-radius:50%;border-radius:50%;box-shadow:inset #fff 0 1px 1px,inset 0 -1px 1px rgba( 0,0,0,0.4 ),0px 1px 4px 0 rgba( 0,0,0,0.2 ),0 0 2px rgba( 0,0,0,0.3 );display:block;opacity:0.7;position:absolute;z-index:5;height:20px;width:20px;cursor:default;cursor:ns-resize;z-index:5}.iris-square-horiz .ui-slider-handle{cursor:ew-resize}.iris-square-slider .ui-slider-handle{width:14px;height:14px;opacity:1;background-color:#eee}.iris-picker .iris-square-handle{background:transparent;border:5px solid #aaa;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-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}';if(d&amp;&amp;parseInt(a.browser.version,10)&lt;=7)return a.fn.iris=a.noop;a.fn.gradient=function(b){var c=arguments;return this.each(function(){d?j.apply(this,c):a(this).css(&quot;backgroundImage&quot;,i.apply(this,c))})},a.fn.LSSquare=function(c){return c=c|0,this.each(function(){var d=a(this),e=d.data(&quot;hue&quot;)!==b;e||(d.append('&lt;div class=&quot;sat grad-box&quot; /&gt;&lt;div class=&quot;lum grad-box&quot; /&gt;'),d.css(&quot;position&quot;,&quot;relativ
 e&quot;),d.children(&quot;.grad-box&quot;).css({position:&quot;absolute&quot;,top:0,left:0,bottom:0,right:0}));var f=d.find(&quot;.lum&quot;),g=d.find(&quot;.sat&quot;);e||f.gradient(&quot;top&quot;,&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;),g.gradient(&quot;left&quot;,&quot;hsl(&quot;+c+&quot;,0%,50%)&quot;,&quot;hsl(&quot;+c+&quot;,100%,50%)&quot;),d.data(&quot;hue&quot;,c)})},a.fn.raninbowGradient=function(b,c){b=b||&quot;top&quot;;var d=a.extend({},{s:100,l:50},c),e=&quot;hsl(%h%,&quot;+d.s+&quot;%,&quot;+d.l+&quot;%)&quot;,f=0,g=[];while(f&lt;=360)g.push(e.replace(&quot;%h%&quot;,f)),f+=30;return this.each(function(){a(this).gradient(b,g)})};var n={options:{color:!1,hide:!0,border:!0,target:!1,width:200,tooltip:!1},_inited:!1,_create:function(){var b=this.element,d=this.options.color||b.val();e===!1&amp;&amp;h(),b.is(&quot;input&quot;)?(this.options.target?this.picker=a(c).appendTo(this.options.target):t
 his.picker=a(c).insertAfter(b),this._addInputListeners(b)):(b.append(c),this.picker=b.find(&quot;.iris-picker&quot;));if(a.browser.mozilla)this.picker.addClass(&quot;iris-mozilla&quot;);else if(a.browser.msie){var f=parseInt(a.browser.version,10);f===9?this.picker.addClass(&quot;iris-ie-9&quot;):f&lt;=8&amp;&amp;this.picker.addClass(&quot;iris-ie-lt9&quot;)}this.color=new Color(d),this.initError=this.color.error,this.options.color=this.color.toString(),this.controls={},this.controls.square=this.picker.find(&quot;.iris-square&quot;);var g=this.hue=this.color.h();this.options.hide&amp;&amp;this.picker.hide(),this.options.border&amp;&amp;this.picker.addClass(&quot;iris-border&quot;),this.controls.square.LSSquare(g),this.picker.find(&quot;.iris-hue&quot;).raninbowGradient(),this.initError&amp;&amp;this.color.s(50).l(50),this._initControls(),this.active=&quot;external&quot;,this._dimensions(),this._change(),this.options.tooltip&amp;&amp;this._addTooltip()},_dimensions:function(a)
 {var b=this.picker.find(&quot;.iris-picker-inner&quot;),c=this.controls,d=c.square,e=this.picker.find(&quot;.iris-hue&quot;),f=&quot;77.5%&quot;,g=&quot;12%&quot;,h=20,i=this.options.border?this.options.width-h:this.options.width,j;a&amp;&amp;(d.css(&quot;width&quot;,&quot;&quot;),e.css(&quot;width&quot;,&quot;&quot;),this.picker.removeAttr(&quot;style&quot;)),f=i*(parseFloat(f)/100),g=i*(parseFloat(g)/100),j=this.options.border?f+h:f,d.width(f).height(f),e.height(f).width(g),this.picker.css({width:this.options.width,height:j})},_addInputListeners:function(a){var b=this;a.on(&quot;change&quot;,function(c){var d=new Color(a.val()),e=a.val().replace(/^#/,&quot;&quot;);a.removeClass(&quot;iris-error&quot;),d.error?e!==&quot;&quot;&amp;&amp;a.addClass(&quot;iris-error&quot;):b._setOption(&quot;color&quot;,d.toString())})},_initControls:function(){var b=this,c=b.controls.square,d=b.color.h();b.controls.h=b.picker.find(&quot;.iris-hue .iris-slider-offset&quot;).slider({orientation
 :&quot;vertical&quot;,max:359,min:0,value:359-d,slide:function(a,c){b.active=&quot;h&quot;,c.value=359-c.value,b.color.h(c.value),b._change.apply(b,arguments)}}),b.controls.squareDrag=b.picker.find(&quot;.iris-square-value&quot;).draggable({containment:&quot;parent&quot;,zIndex:1e3,cursor:&quot;move&quot;,drag:function(a,c){b._squareDrag(a,c)},start:function(){c.addClass(&quot;iris-dragging&quot;),a(this).addClass(&quot;ui-state-focus&quot;)},stop:function(){c.removeClass(&quot;iris-dragging&quot;),a(this).removeClass(&quot;ui-state-focus&quot;)}}).on(&quot;mousedown mouseup&quot;,function(c){c.preventDefault();var d=&quot;ui-state-focus&quot;;c.type===&quot;mousedown&quot;?(b.picker.find(&quot;.&quot;+d).removeClass(d).blur(),a(this).addClass(d)):a(this).removeClass(&quot;ui-state-focus&quot;)}),c.mousedown(function(c){if(c.which!==1)return;if(!a(c.target).is(&quot;div&quot;))return;var d=b.controls.square.offset(),e={top:c.pageY-d.top,left:c.pageX-d.left};c.preventDefault(
 ),b._squareDrag(c,{position:e}),c.target=b.controls.squareDrag.get(0),b.controls.squareDrag.css(e).trigger(c)}),b.controls.s=c.find(&quot;.iris-square-horiz&quot;).slider({slide:function(a,c){b.color.s(c.value),b.active=&quot;s&quot;,b._change.apply(b,arguments)}}),b.controls.l=c.find(&quot;.iris-square-vert&quot;).slider({orientation:&quot;vertical&quot;,slide:function(a,c){b.color.l(c.value),b.active=&quot;l&quot;,b._change.apply(b,arguments)}}),b.controls.square.mousemove(function(c){var d=a(this),e=d.offset(),f=c.pageX-e.left,g=c.pageY-e.top,h=d.find(&quot;.iris-square-horiz .ui-slider-handle&quot;),i=d.find(&quot;.iris-square-vert .ui-slider-handle&quot;);f&gt;b.controls.square.width()-20?i.addClass(&quot;active&quot;):i.removeClass(&quot;active&quot;),g&lt;20?h.addClass(&quot;active&quot;):h.removeClass(&quot;active&quot;)}),b.controls.square.mouseleave(function(){a(this).find(&quot;.iris-square-slider .ui-slider-handle&quot;).removeClass(&quot;active&quot;)})},_square
 Drag:function(a,b){var c=this,d=c._squareDimensions(),e=Math.round((d.h-b.position.top)/d.h*100),f=100-Math.round((d.w-b.position.left)/d.w*100);c.color.s(f).l(e),c.active=&quot;square&quot;,c._change.apply(c,arguments)},_setOption:function(a,b){var c=this.options[a];if(a===&quot;color&quot;){b=&quot;&quot;+b;var d=b.replace(/^#/,&quot;&quot;),e=new Color(b);e.error||(this.color=e,this.options.color=this.color.toString(),this.active=&quot;external&quot;,this._change(),this.options[a]=this.color.toString())}},_squareDimensions:function(a){var c=this.controls.square,d,e;return a!==b&amp;&amp;c.data(&quot;dimensions&quot;)?c.data(&quot;dimensions&quot;):(e=this.controls.squareDrag,d={w:c.width(),h:c.height()},c.data(&quot;dimensions&quot;,d),d)},_change:function(b,c){var d=this,e=d.controls,f=d.color.toHsl(),g=d.color.toString(),h=[&quot;s&quot;,&quot;l&quot;,&quot;square&quot;];d.active===&quot;external&quot;||d.active===&quot;h&quot;?(e.square.LSSquare(f.h),d.active===&quot;h
 &quot;?h=[]:h.push(&quot;h&quot;),this.hue=f.h):f.h!==this.hue&amp;&amp;(f.h=this.hue,d.color.h(this.hue)),g=d.color.toString(),a.each(h,function(a,b){if(b!==d.active)switch(b){case&quot;h&quot;:e.h.slider(&quot;value&quot;,359-f.h);break;case&quot;s&quot;:d.active!==&quot;l&quot;&amp;&amp;e.s.slider(&quot;value&quot;,f.s);break;case&quot;l&quot;:d.active!==&quot;s&quot;&amp;&amp;e.l.slider(&quot;value&quot;,f.l);break;case&quot;square&quot;:var c=d._squareDimensions(),g={left:f.s/100*c.w,top:c.h-f.l/100*c.h};d.active===&quot;s&quot;?delete g.top:d.active===&quot;l&quot;&amp;&amp;delete g.left,d.controls.squareDrag.css(g)}}),this.options.color=this.color.toString(),this._inited?this._trigger(&quot;change&quot;,{type:this.active},{color:this.color}):this.initError&amp;&amp;(this.color.error=!0,this.options.color=this.color.toString()),this.element.is(&quot;:input&quot;)&amp;&amp;!d.color.error&amp;&amp;this.element.val(g).removeClass(&quot;iris-error&quot;),this._inited=!0,th
 is.active=!1},_addTooltip:function(){var b=this;a(&quot;&lt;span class='iris-tooltip' /&gt;&quot;).text(b.options.tooltip).appendTo(b.controls.squareDrag),b.controls.square.on(&quot;mousedown.iris&quot;,b,function(a){a.which===1&amp;&amp;b.controls.square.off(&quot;mousedown.iris&quot;).find(&quot;.iris-tooltip&quot;).remove()})},show:function(){this.picker.show()},hide:function(){this.picker.hide()},toggle:function(){this.picker.toggle()}};a.widget(&quot;a8c.iris&quot;,n),a('&lt;style id=&quot;iris-css&quot;&gt;'+g+&quot;&lt;/style&gt;&quot;).appendTo(&quot;head&quot;)})(jQuery),function(a,b){var c=function(a,b){return this instanceof c?this._init(a,b):new c(a,b)};c.prototype={_color:0,_alpha:1,error:!1,__hsl:{h:0,s:0,l:0},_init:function(a){var c=&quot;noop&quot;;switch(typeof a){case&quot;object&quot;:return this._alpha=a.a||1,c=a.r!==b?&quot;fromRgb&quot;:a.l!==b?&quot;fromHsl&quot;:c,this[c](a);case&quot;string&quot;:return this.fromCSS(a);case&quot;number&quot;:return t
 his.fromInt(parseInt(a,10))}return this},noop:function(){return this},fromCSS:function(a){var b,c;return this.error=!1,a.match(/^(rgb|hsl)a?/)?(c=a.replace(/(\s|%)/g,&quot;&quot;).replace(/^(rgb|hsl)a?\(/,&quot;&quot;).replace(/\);?$/,&quot;&quot;).split(&quot;,&quot;),c.length===4&amp;&amp;(this._alpha=parseFloat(c.pop())),a.match(/^rgb/)?this.fromRgb({r:parseInt(c[0],10),g:parseInt(c[1],10),b:parseInt(c[2],10)}):this.fromHsl({h:parseInt(c[0],10),s:parseInt(c[1],10),l:parseInt(c[2],10)})):this.fromHex(a)},fromRgb:function(a,c){return typeof a!=&quot;object&quot;||a.r===b||a.g===b||a.b===b?(this.error=!0,this):(this.error=!1,this.fromInt(parseInt((a.r&lt;&lt;16)+(a.g&lt;&lt;8)+a.b,10),c))},fromHex:function(a){return a=a.replace(/^#/,&quot;&quot;).replace(/^0x/,&quot;&quot;),a.length===3&amp;&amp;(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]),this.error=!/^[0-9A-F]{6}$/i.test(a),this.fromInt(parseInt(a,16))},fromHsl:function(a){if(typeof a!=&quot;object&quot;||a.h===b||a.s===b||a.l===b)re
 turn this.error=!0,this;var c,d,e,f,g,h,i,j;return this.__hsl=a,h=a.h/360,i=a.s/100,j=a.l/100,i===0?c=d=e=j:(f=j&lt;.5?j*(1+i):j+i-j*i,g=2*j-f,c=this.hue2rgb(g,f,h+1/3),d=this.hue2rgb(g,f,h),e=this.hue2rgb(g,f,h-1/3)),this.fromRgb({r:c*255,g:d*255,b:e*255},!0)},fromInt:function(a,c){return this._color=parseInt(a,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),c===b&amp;&amp;(this.__hsl.h=this.__hsl.s=0),this},hue2rgb:function(a,b,c){return c&lt;0&amp;&amp;(c+=1),c&gt;1&amp;&amp;(c-=1),c&lt;1/6?a+(b-a)*6*c:c&lt;.5?b:c&lt;2/3?a+(b-a)*(2/3-c)*6:a},toString:function(){var a=parseInt(this._color,10).toString(16);if(this.error)return&quot;&quot;;if(a.length&lt;6)for(var b=6-a.length-1;b&gt;=0;b--)a=&quot;0&quot;+a;return&quot;#&quot;+a},toCSS:function(a,b){a=a||&quot;hex&quot;,b=parseFloat(b||this._alpha);switch(a){case&quot;rgb&quot;:case&quot;rgba&quot;:var c=this.toRgb();return b&lt;1?&quot;r
 gba( &quot;+c.r+&quot;, &quot;+c.g+&quot;, &quot;+c.b+&quot;, &quot;+b+&quot; )&quot;:&quot;rgb( &quot;+c.r+&quot;, &quot;+c.g+&quot;, &quot;+c.b+&quot; )&quot;;case&quot;hsl&quot;:case&quot;hsla&quot;:var d=this.toHsl();return b&lt;1?&quot;hsla( &quot;+d.h+&quot;, &quot;+d.s+&quot;, &quot;+d.l+&quot;, &quot;+b+&quot; )&quot;:&quot;hsl( &quot;+d.h+&quot;, &quot;+d.s+&quot;, &quot;+d.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 a=this.toRgb(),b=a.r/255,c=a.g/255,d=a.b/255,e=Math.max(b,c,d),f=Math.min(b,c,d),g,h,i=(e+f)/2;if(e===f)g=h=0;else{var j=e-f;h=i&gt;.5?j/(2-e-f):j/(e+f);switch(e){case b:g=(c-d)/j+(c&lt;d?6:0);break;case c:g=(d-b)/j+2;break;case d:g=(b-c)/j+4}g/=6}return g=Math.round(g*360),g===0&amp;&amp;this.__hsl.h!==g&amp;&amp;(g=this.__hsl.h),h=Math.round(h*100),h===0&amp;&amp;this.__hsl.s&amp;&amp;(h=this.__hsl.s),{h:g,s:h,l:Mat
 h.round(i*100)}},toInt:function(){return this._color},toIEOctoHex:function(){var a=this.toString(),b=parseInt(255*this._alpha,10).toString(16);return b.length===1&amp;&amp;(b=&quot;0&quot;+b),&quot;#&quot;+b+a.replace(/^#/,&quot;&quot;)},toLuminosity:function(){var a=this.toRgb();return.2126*Math.pow(a.r/255,2.2)+.7152*Math.pow(a.g/255,2.2)+.0722*Math.pow(a.b/255,2.2)},getDistanceLuminosityFrom:function(a){if(a instanceof c){var b=this.toLuminosity(),d=a.toLuminosity();return b&gt;d?(b+.05)/(d+.05):(d+.05)/(b+.05)}throw&quot;getDistanceLuminosityFrom requires a Color object&quot;},getMaxContrastColor:function(){var a=this.toLuminosity(),b=a&gt;=.5?&quot;000000&quot;:&quot;ffffff&quot;;return new c(b)},getGrayscaleContrastingColor:function(a){if(!a)return this.getMaxContrastColor();var b=a&lt;5?5:a,c=this.getMaxContrastColor();a=c.getDistanceLuminosityFrom(this);if(a&lt;=b)return c;var d=0===c.toInt()?1:-1;while(a&gt;b)c=c.incrementLightness(d),a=c.getDistanceLuminosityFrom(t
 his);return c},getReadableContrastingColor:function(a,d){if(!a instanceof c)return this;var e=d===b?5:d,f=a.getDistanceLuminosityFrom(this),g=a.getMaxContrastColor(),h=g.getDistanceLuminosityFrom(a);if(h&lt;=e)return g;if(f&gt;=e)return this;var i=0===g.toInt()?-1:1;while(f&lt;e){this.incrementLightness(i),f=this.getDistanceLuminosityFrom(a);if(this._color===0||this._color===16777215)break}return this},h:function(a){return this._hsl(&quot;h&quot;,a)},s:function(a){return this._hsl(&quot;s&quot;,a)},l:function(a){return this._hsl(&quot;l&quot;,a)},_hsl:function(a,c){var d=this.toHsl();return c===b?d[a]:(a===&quot;h&quot;?d[a]=c%360:d[a]=c&lt;0?0:c&gt;100?100:c,this.fromHsl(d))},darken:function(a){return a=a||5,this.incrementLightness(-a)},lighten:function(a){return a=a||5,this.incrementLightness(a)},incrementLightness:function(a){return this.l(this.l()+a)},saturate:function(a){return a=a||15,this.incrementSaturation(a)},desaturate:function(a){return a=a||15,this.incrementSatu
 ration(-a)},incrementSaturation:function(a){return this.s(this.s()+a)},toGrayscale:function(){return this.h(0)},getComplement:function(){return this.incrementHue(180)},getSplitComplement:function(a){a=a||1;var b=180+a*30;return this.incrementHue(b)},getAnalog:function(a){a=a||1;var b=a*30;return this.incrementHue(b)},getTetrad:function(a){a=a||1;var b=a*60;return this.incrementHue(b)},getTriad:function(a){a=a||1;var b=a*120;return this.incrementHue(b)},incrementHue:function(a){return this.h(this.h()+a)}},a.Color=c}(typeof exports==&quot;object&quot;&amp;&amp;exports||this);
</del><span class="cx">\ No newline at end of file
</span><ins>+(function(a,b){function h(){if(d)e=&quot;filter&quot;;else{var b=a('&lt;div id=&quot;iris-gradtest&quot; /&gt;'),c=&quot;linear-gradient(top,#fff,#000)&quot;;a.each(f,function(a,d){b.css(&quot;backgroundImage&quot;,d+c);if(b.css(&quot;backgroundImage&quot;).match(&quot;gradient&quot;))return e=a,!1}),a.browser.webkit&amp;&amp;e===!1&amp;&amp;(b.css(&quot;background&quot;,&quot;-webkit-gradient(linear,0% 0%,0% 100%,from(#fff),to(#000))&quot;),b.css(&quot;backgroundImage&quot;).match(&quot;gradient&quot;)&amp;&amp;(e=&quot;webkit&quot;)),b.remove()}}function i(b,c){return b=b===&quot;top&quot;?&quot;top&quot;:&quot;left&quot;,c=a.isArray(c)?c:Array.prototype.slice.call(arguments,1),e===&quot;webkit&quot;?k(b,c):f[e]+&quot;linear-gradient(&quot;+b+&quot;, &quot;+c.join(&quot;, &quot;)+&quot;)&quot;}function j(b,c){b=b===&quot;top&quot;?&quot;top&quot;:&quot;left&quot;,c=a.isArray(c)?c:Array.prototype.slice.call(arguments,1);var d=b===&quot;top&quot;?0:1,e=a(this),f=
 c.length-1,g=parseInt(a.browser.version,10)&gt;=8?&quot;-ms-filter&quot;:&quot;filter&quot;;g=&quot;filter&quot;;var h=d===1?&quot;left&quot;:&quot;top&quot;,i=d===1?&quot;right&quot;:&quot;bottom&quot;,j=d===1?&quot;height&quot;:&quot;width&quot;,k='&lt;div class=&quot;iris-ie-gradient-shim&quot; style=&quot;position:absolute;'+j+&quot;:100%;&quot;+h+&quot;:%start%;&quot;+i+&quot;:%end%;&quot;+g+':%filter%;&quot; data-color:&quot;%color%&quot;&gt;&lt;/div&gt;',m=&quot;&quot;;e.css(&quot;position&quot;)===&quot;static&quot;&amp;&amp;e.css({position:&quot;relative&quot;}),c=l(c),a.each(c,function(a,b){if(a===f)return!1;var e=c[a+1];if(b.stop===e.stop)return;var g=100-parseFloat(e.stop)+&quot;%&quot;;b.octoHex=(new Color(b.color)).toIEOctoHex(),e.octoHex=(new Color(e.color)).toIEOctoHex();var h=&quot;progid:DXImageTransform.Microsoft.Gradient(GradientType=&quot;+d+&quot;, StartColorStr='&quot;+b.octoHex+&quot;', EndColorStr='&quot;+e.octoHex+&quot;')&quot;;m+=k.replace(&quot;%
 start%&quot;,b.stop).replace(&quot;%end%&quot;,g).replace(&quot;%filter%&quot;,h)}),e.find(&quot;.iris-ie-gradient-shim&quot;).remove(),a(m).prependTo(e)}function k(b,c){var d=[];return b=b===&quot;top&quot;?&quot;0% 0%,0% 100%,&quot;:&quot;0% 100%,100% 100%,&quot;,c=l(c),a.each(c,function(a,b){d.push(&quot;color-stop(&quot;+parseFloat(b.stop)/100+&quot;, &quot;+b.color+&quot;)&quot;)}),&quot;-webkit-gradient(linear,&quot;+b+d.join(&quot;,&quot;)+&quot;)&quot;}function l(b){var c=[],d=[],e=[],f=b.length-1;return a.each(b,function(a,b){var e=b,f=!1,g=b.match(/1?[0-9]{1,2}%$/);g&amp;&amp;(e=b.replace(/\s?1?[0-9]{1,2}%$/,&quot;&quot;),f=g.shift()),c.push(e),d.push(f)}),d[0]===!1&amp;&amp;(d[0]=&quot;0%&quot;),d[f]===!1&amp;&amp;(d[f]=&quot;100%&quot;),d=m(d),a.each(d,function(a){e[a]={color:c[a],stop:d[a]}}),e}function m(b){var c=0,d=b.length-1,e=0,f=!1,g,h,i,j;if(b.length&lt;=2||a.inArray(!1,b)&lt;0)return b;while(e&lt;b.length-1)!f&amp;&amp;b[e]===!1?(c=e-1,f=!0):f&amp;&amp;b
 [e]!==!1&amp;&amp;(d=e,e=b.length),e++;h=d-c,j=parseInt(b[c].replace(&quot;%&quot;),10),g=(parseFloat(b[d].replace(&quot;%&quot;))-j)/h,e=c+1,i=1;while(e&lt;d)b[e]=j+i*g+&quot;%&quot;,i++,e++;return m(b)}var c='&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-slider iris-horiz-slider&quot;&gt;&lt;/div&gt;&lt;div class=&quot;iris-square-slider iris-vert-slider&quot;&gt;&lt;/div&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;',d=!!(a.browser.msie&amp;&a
 mp;parseInt(a.browser.version,10)&lt;10),e=!1,f=[&quot;-moz-&quot;,&quot;-webkit-&quot;,&quot;-o-&quot;,&quot;-ms-&quot;],g='.iris-picker{display:block;position:relative}.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{border-radius:3px;-webkit-box-shadow:inset 0 0 5px rgba(0,0,0,0.4);-moz-box-shadow:inset 0 0 5px rgba(0,0,0,0.4);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-picker .iris-square .sat,.iris-ie-9 .iris-square,.iris-i
 e-9 .iris-slider,.iris-ie-9 .iris-square-inner{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;border-radius:0}.iris-picker .iris-square .sat{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.iris-ie-lt9 .iris-square,.iris-ie-lt9 .iris-slider,.iris-ie-lt9 .iris-square-inner{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}.iris-picker .iris-strip .ui-slider-handle{position:absolute;width:100%;height:12px;background:none;border-radius:0;box-shadow:none;opacity:1;z-index:5}.iris-strip .ui-slider-handle:before,.iris-strip .ui-slider-handle:after{content:&quot; &quot;;width:0;height:0;border-style:solid;border-width:6
 px 7px 6px 0;border-color:transparent #555 transparent transparent;position:absolute;right:-4px}.iris-strip .ui-slider-handle:after{border-width:6px 0 6px 7px;border-color:transparent transparent transparent #555;right:auto;left:-4px}.iris-picker .iris-slider-offset{width:100%;height:100%;position:relative;bottom:-6px}.iris-square .iris-horiz-slider{position:absolute;top:-7px;left:-7px;height:1px;width:100%}.iris-square .iris-vert-slider{position:absolute;right:6px;top:7px;width:1px;height:100%}.iris-square .iris-square-slider a{opacity:.3;-ms-filter:&quot;progid:DXImageTransform.Microsoft.Alpha(Opacity=30)&quot;;-moz-transition:opacity 300ms;-webkit-transition:opacity 300ms;transition:opacity 300ms}.iris-square .iris-square-slider .ui-slider-handle.active{opacity:1;-ms-filter:&quot;progid:DXImageTransform.Microsoft.Alpha(Opacity=100)&quot;}.iris-dragging .iris-square-slider .ui-slider-handle.active{opacity:0;-ms-filter:&quot;progid:DXImageTransform.Microsoft.Alpha(Opacity=0
 )&quot;}.iris-picker .ui-slider-handle{background:#f5f5f5;-webkit-border-radius:10px;-moz-border-radius:50%;border-radius:50%;box-shadow:inset #fff 0 1px 1px,inset 0 -1px 1px rgba( 0,0,0,0.4 ),0px 1px 4px 0 rgba( 0,0,0,0.2 ),0 0 2px rgba( 0,0,0,0.3 );display:block;opacity:0.7;position:absolute;z-index:5;height:20px;width:20px;cursor:default;cursor:ns-resize;z-index:5}.iris-horiz-slider .ui-slider-handle{cursor:ew-resize}.iris-square-slider .ui-slider-handle{width:14px;height:14px;opacity:1;background-color:#eee}.iris-picker .iris-square-handle{background:transparent;border:5px solid #aaa;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-handle:hover::after{border-color:#fff}.iris-picker .iris-square-handle::after{position:absolute;bottom:-4p
 x;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}';if(d&amp;&amp;parseInt(a.browser.version,10)&lt;=7)return a.fn.iris=a.noop;a.fn.gradient=function(b){var c=arguments;return this.each(function(){d?j.apply(this,c):a(this).css(&quot;backgroundImage&quot;,i.apply(this,c))})},a.fn.raninbowGradient=function(b,c){b=b||&quot;top&quot;;var d=a.extend({},{s:100,l:50},c),e=&quot;hsl(%h%,&quot;+d.s+&quot;%,&quot;+d.l+&quot;%)&quot;,f=0,g=[];while(f&lt;=360)g.push(e.replace(&quot;%h%&quot;,f)),f+=30;return this.each(function(){a(this).gradient(b,g)})};var n={options:{color:!1,controls:{horiz:&quot;s&quot;,vert:&quot;l&quot;,strip:&quot;h&quot;},hide:!0,border:!0,target:!1,width:200},_inited:!1,_scale:{h:359,s:100,l:100},_create:function(){var b=this,d
 =b.element,f=b.options.color||d.val(),g;e===!1&amp;&amp;h(),d.is(&quot;input&quot;)?(b.options.target?b.picker=a(c).appendTo(b.options.target):b.picker=a(c).insertAfter(d),b._addInputListeners(d)):(d.append(c),b.picker=d.find(&quot;.iris-picker&quot;));if(a.browser.mozilla)b.picker.addClass(&quot;iris-mozilla&quot;);else if(a.browser.msie){var i=parseInt(a.browser.version,10);i===9?b.picker.addClass(&quot;iris-ie-9&quot;):i&lt;=8&amp;&amp;b.picker.addClass(&quot;iris-ie-lt9&quot;)}b.color=new Color(f),b.options.color=b.color.toString(),b.initError=b.color.error,b.controls={square:b.picker.find(&quot;.iris-square&quot;),horiz:b.picker.find(&quot;.iris-square-horiz&quot;),vert:b.picker.find(&quot;.iris-square-vert&quot;),strip:b.picker.find(&quot;.iris.strip&quot;)},g=b.hue=b.color.h(),b.options.hide&amp;&amp;b.picker.hide(),b.options.border&amp;&amp;b.picker.addClass(&quot;iris-border&quot;),b.initError&amp;&amp;b.color.s(50).l(50),b._initControls(),b.active=&quot;external&qu
 ot;,b._dimensions(),b._change()},_paint:function(){var a=this;a._paintDimension(&quot;top&quot;,&quot;strip&quot;),a._paintDimension(&quot;top&quot;,&quot;vert&quot;),a._paintDimension(&quot;left&quot;,&quot;horiz&quot;)},_paintDimension:function(a,b){var c=this,d=c.color.toHsl(),e={strip:&quot;.iris-strip&quot;,vert:&quot;.iris-square-vert&quot;,horiz:&quot;.iris-square-horiz&quot;},f=c.picker.find(e[b]),g;switch(c.options.controls[b]){case&quot;h&quot;:b===&quot;strip&quot;?f.raninbowGradient(a,{s:d.s,l:d.l}):f.raninbowGradient(a,{s:100,l:d.l});break;case&quot;s&quot;:b===&quot;vert&quot;&amp;&amp;c.options.controls.horiz===&quot;h&quot;?g=[&quot;hsla(0, 0%, &quot;+d.l+&quot;%, 0)&quot;,&quot;hsla(0, 0%, &quot;+d.l+&quot;%, 1)&quot;]:g=[&quot;hsl(&quot;+d.h+&quot;,0%,50%)&quot;,&quot;hsl(&quot;+d.h+&quot;,100%,50%)&quot;],f.gradient(a,g);break;case&quot;l&quot;:b===&quot;strip&quot;?g=[&quot;hsl(&quot;+d.h+&quot;,100%,0%)&quot;,&quot;hsl(&quot;+d.h+&quot;, &quot;+d.s+&quot
 ;%,50%)&quot;,&quot;hsl(&quot;+d.h+&quot;,100%,100%)&quot;]:g=[&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;],f.gradient(a,g);break;default:}},_dimensions:function(a){var b=this.picker.find(&quot;.iris-picker-inner&quot;),c=this.controls,d=c.square,e=this.picker.find(&quot;.iris-strip&quot;),f=&quot;77.5%&quot;,g=&quot;12%&quot;,h=20,i=this.options.border?this.options.width-h:this.options.width,j;a&amp;&amp;(d.css(&quot;width&quot;,&quot;&quot;),e.css(&quot;width&quot;,&quot;&quot;),this.picker.removeAttr(&quot;style&quot;)),f=i*(parseFloat(f)/100),g=i*(parseFloat(g)/100),j=this.options.border?f+h:f,d.width(f).height(f),e.height(f).width(g),this.picker.css({width:this.options.width,height:j})},_addInputListeners:function(a){var b=this;a.on(&quot;change&quot;,function(c){var d=new Color(a.val()),e=a.val().replace(/^#/,&quot;&quot;);a.removeClass(&quot;iris-error&quot;),d.error?e!==&quot;&quot;&amp;&amp;a.addClass(
 &quot;iris-error&quot;):b._setOption(&quot;color&quot;,d.toString())})},_initControls:function(){var b=this,c=b.controls.square,d=b.color.h(),e=b.options.controls,f=b._scale[e.strip];b.picker.find(&quot;.iris-strip .iris-slider-offset&quot;).slider({orientation:&quot;vertical&quot;,max:f,min:0,value:f-d,slide:function(a,c){b.active=&quot;strip&quot;,c.value=f-c.value,b.color[e.strip](c.value),b._change.apply(b,arguments)}}),b.controls.squareDrag=b.picker.find(&quot;.iris-square-value&quot;).draggable({containment:&quot;parent&quot;,zIndex:1e3,cursor:&quot;move&quot;,drag:function(a,c){b._squareDrag(a,c)},start:function(){c.addClass(&quot;iris-dragging&quot;),a(this).addClass(&quot;ui-state-focus&quot;)},stop:function(){c.removeClass(&quot;iris-dragging&quot;),a(this).removeClass(&quot;ui-state-focus&quot;)}}).on(&quot;mousedown mouseup&quot;,function(c){c.preventDefault();var d=&quot;ui-state-focus&quot;;c.type===&quot;mousedown&quot;?(b.picker.find(&quot;.&quot;+d).removeCl
 ass(d).blur(),a(this).addClass(d)):a(this).removeClass(&quot;ui-state-focus&quot;)}),c.mousedown(function(c){if(c.which!==1)return;if(!a(c.target).is(&quot;div&quot;))return;var d=b.controls.square.offset(),e={top:c.pageY-d.top,left:c.pageX-d.left};c.preventDefault(),b._squareDrag(c,{position:e}),c.target=b.controls.squareDrag.get(0),b.controls.squareDrag.css(e).trigger(c)}),c.find(&quot;.iris-horiz-slider&quot;).slider({max:b._scale[e.horiz],min:0,slide:function(a,c){b.color[e.horiz](c.value),b.active=&quot;horiz&quot;,b._change.apply(b,arguments)}}),c.find(&quot;.iris-vert-slider&quot;).slider({max:b._scale[e.vert],min:0,orientation:&quot;vertical&quot;,slide:function(a,c){b.color[e.vert](c.value),b.active=&quot;vert&quot;,b._change.apply(b,arguments)}}),b.controls.square.mousemove(function(c){var d=a(this),e=d.offset(),f=c.pageX-e.left,g=c.pageY-e.top,h=d.find(&quot;.iris-horiz-slider .ui-slider-handle&quot;),i=d.find(&quot;.iris-vert-slider .ui-slider-handle&quot;);f&gt;
 b.controls.square.width()-20?i.addClass(&quot;active&quot;):i.removeClass(&quot;active&quot;),g&lt;20?h.addClass(&quot;active&quot;):h.removeClass(&quot;active&quot;)}),b.controls.square.mouseleave(function(){a(this).find(&quot;.iris-square-slider .ui-slider-handle&quot;).removeClass(&quot;active&quot;)})},_squareDrag:function(a,b){var c=this,d=c.options.controls,e=c._squareDimensions(),f=Math.round((e.h-b.position.top)/e.h*c._scale[d.vert]),g=c._scale[d.horiz]-Math.round((e.w-b.position.left)/e.w*c._scale[d.horiz]);c.color[d.horiz](g)[d.vert](f),c.active=&quot;square&quot;,c._change.apply(c,arguments)},_setOption:function(a,b){var c=this.options[a];if(a===&quot;color&quot;){b=&quot;&quot;+b;var d=b.replace(/^#/,&quot;&quot;),e=new Color(b);e.error||(this.color=e,this.options.color=this.options[a]=this.color.toString(),this.active=&quot;external&quot;,this._change())}},_squareDimensions:function(a){var c=this.controls.square,d,e;return a!==b&amp;&amp;c.data(&quot;dimensions&
 quot;)?c.data(&quot;dimensions&quot;):(e=this.controls.squareDrag,d={w:c.width(),h:c.height()},c.data(&quot;dimensions&quot;,d),d)},_change:function(b,c){var d=this,e=d.controls,f=d.color.toHsl(),g=d.color.toString(),h=[&quot;vert&quot;,&quot;horiz&quot;,&quot;strip&quot;,&quot;square&quot;],i=d.options.controls,j=i[d.active]||&quot;external&quot;;d.active===&quot;strip&quot;&amp;&amp;(h=[]),j===&quot;external&quot;||j===&quot;h&quot;?d.hue=f.h:f.h!==d.hue&amp;&amp;(f.h=d.hue,d.color.h(d.hue)),a.each(h,function(a,b){if(b!==d.active)switch(b){case&quot;strip&quot;:e.strip.slider(&quot;value&quot;,d._scale[j]-f[j]);break;case&quot;vert&quot;:d.active!==&quot;horiz&quot;&amp;&amp;e.square.find(&quot;.iris-vert-slider&quot;).slider(&quot;value&quot;,f[i.vert]);break;case&quot;horiz&quot;:d.active!==&quot;vert&quot;&amp;&amp;e.square.find(&quot;.iris-horiz-slider&quot;).slider(&quot;value&quot;,f[i.horiz]);break;case&quot;square&quot;:var c=d._squareDimensions(),g={left:f[i.horiz
 ]/d._scale[i.horiz]*c.w,top:c.h-f[i.vert]/d._scale[i.vert]*c.h};d.active===&quot;horiz&quot;?delete g.top:d.active===&quot;vert&quot;&amp;&amp;delete g.left,d.controls.squareDrag.css(g)}}),d.options.color=d.color.toString(),d._inited?d._trigger(&quot;change&quot;,{type:d.active},{color:d.color}):d.initError&amp;&amp;(d.color.error=!0,d.options.color=d.color.toString()),d.element.is(&quot;:input&quot;)&amp;&amp;!d.color.error&amp;&amp;d.element.val(d.color.toString()).removeClass(&quot;iris-error&quot;),d._inited=!0,d.active=!1,d._paint()},show:function(){this.picker.show()},hide:function(){this.picker.hide()},toggle:function(){this.picker.toggle()}};a.widget(&quot;a8c.iris&quot;,n),a('&lt;style id=&quot;iris-css&quot;&gt;'+g+&quot;&lt;/style&gt;&quot;).appendTo(&quot;head&quot;)})(jQuery),function(a,b){var c=function(a,b){return this instanceof c?this._init(a,b):new c(a,b)};c.prototype={_color:0,_alpha:1,error:!1,__hsl:{h:0,s:0,l:0},_init:function(a){var c=&quot;noop&quot;;s
 witch(typeof a){case&quot;object&quot;:return this._alpha=a.a||1,c=a.r!==b?&quot;fromRgb&quot;:a.l!==b?&quot;fromHsl&quot;:c,this[c](a);case&quot;string&quot;:return this.fromCSS(a);case&quot;number&quot;:return this.fromInt(parseInt(a,10))}return this},noop:function(){return this},fromCSS:function(a){var b,c;return this.error=!1,a.match(/^(rgb|hsl)a?/)?(c=a.replace(/(\s|%)/g,&quot;&quot;).replace(/^(rgb|hsl)a?\(/,&quot;&quot;).replace(/\);?$/,&quot;&quot;).split(&quot;,&quot;),c.length===4&amp;&amp;(this._alpha=parseFloat(c.pop())),a.match(/^rgb/)?this.fromRgb({r:parseInt(c[0],10),g:parseInt(c[1],10),b:parseInt(c[2],10)}):this.fromHsl({h:parseInt(c[0],10),s:parseInt(c[1],10),l:parseInt(c[2],10)})):this.fromHex(a)},fromRgb:function(a,c){return typeof a!=&quot;object&quot;||a.r===b||a.g===b||a.b===b?(this.error=!0,this):(this.error=!1,this.fromInt(parseInt((a.r&lt;&lt;16)+(a.g&lt;&lt;8)+a.b,10),c))},fromHex:function(a){return a=a.replace(/^#/,&quot;&quot;).replace(/^0x/,&quot
 ;&quot;),a.length===3&amp;&amp;(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]),this.error=!/^[0-9A-F]{6}$/i.test(a),this.fromInt(parseInt(a,16))},fromHsl:function(a){if(typeof a!=&quot;object&quot;||a.h===b||a.s===b||a.l===b)return this.error=!0,this;var c,d,e,f,g,h,i,j;return this.__hsl=a,h=a.h/360,i=a.s/100,j=a.l/100,i===0?c=d=e=j:(f=j&lt;.5?j*(1+i):j+i-j*i,g=2*j-f,c=this.hue2rgb(g,f,h+1/3),d=this.hue2rgb(g,f,h),e=this.hue2rgb(g,f,h-1/3)),this.fromRgb({r:c*255,g:d*255,b:e*255},!0)},fromInt:function(a,c){return this._color=parseInt(a,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),c===b&amp;&amp;(this.__hsl.h=this.__hsl.s=0),this},hue2rgb:function(a,b,c){return c&lt;0&amp;&amp;(c+=1),c&gt;1&amp;&amp;(c-=1),c&lt;1/6?a+(b-a)*6*c:c&lt;.5?b:c&lt;2/3?a+(b-a)*(2/3-c)*6:a},toString:function(){var a=parseInt(this._color,10).toString(16);if(this.error)return&quot;&quot;;if(a.length&lt;6)for(var b=6-a.length-1;b
 &gt;=0;b--)a=&quot;0&quot;+a;return&quot;#&quot;+a},toCSS:function(a,b){a=a||&quot;hex&quot;,b=parseFloat(b||this._alpha);switch(a){case&quot;rgb&quot;:case&quot;rgba&quot;:var c=this.toRgb();return b&lt;1?&quot;rgba( &quot;+c.r+&quot;, &quot;+c.g+&quot;, &quot;+c.b+&quot;, &quot;+b+&quot; )&quot;:&quot;rgb( &quot;+c.r+&quot;, &quot;+c.g+&quot;, &quot;+c.b+&quot; )&quot;;case&quot;hsl&quot;:case&quot;hsla&quot;:var d=this.toHsl();return b&lt;1?&quot;hsla( &quot;+d.h+&quot;, &quot;+d.s+&quot;, &quot;+d.l+&quot;, &quot;+b+&quot; )&quot;:&quot;hsl( &quot;+d.h+&quot;, &quot;+d.s+&quot;, &quot;+d.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 a=this.toRgb(),b=a.r/255,c=a.g/255,d=a.b/255,e=Math.max(b,c,d),f=Math.min(b,c,d),g,h,i=(e+f)/2;if(e===f)g=h=0;else{var j=e-f;h=i&gt;.5?j/(2-e-f):j/(e+f);switch(e){case b:g=(c-d)/j+(c&lt;d?6:0);break;case c:g=
 (d-b)/j+2;break;case d:g=(b-c)/j+4}g/=6}return g=Math.round(g*360),g===0&amp;&amp;this.__hsl.h!==g&amp;&amp;(g=this.__hsl.h),h=Math.round(h*100),h===0&amp;&amp;this.__hsl.s&amp;&amp;(h=this.__hsl.s),{h:g,s:h,l:Math.round(i*100)}},toInt:function(){return this._color},toIEOctoHex:function(){var a=this.toString(),b=parseInt(255*this._alpha,10).toString(16);return b.length===1&amp;&amp;(b=&quot;0&quot;+b),&quot;#&quot;+b+a.replace(/^#/,&quot;&quot;)},toLuminosity:function(){var a=this.toRgb();return.2126*Math.pow(a.r/255,2.2)+.7152*Math.pow(a.g/255,2.2)+.0722*Math.pow(a.b/255,2.2)},getDistanceLuminosityFrom:function(a){if(a instanceof c){var b=this.toLuminosity(),d=a.toLuminosity();return b&gt;d?(b+.05)/(d+.05):(d+.05)/(b+.05)}throw&quot;getDistanceLuminosityFrom requires a Color object&quot;},getMaxContrastColor:function(){var a=this.toLuminosity(),b=a&gt;=.5?&quot;000000&quot;:&quot;ffffff&quot;;return new c(b)},getGrayscaleContrastingColor:function(a){if(!a)return this.getMax
 ContrastColor();var b=a&lt;5?5:a,c=this.getMaxContrastColor();a=c.getDistanceLuminosityFrom(this);if(a&lt;=b)return c;var d=0===c.toInt()?1:-1;while(a&gt;b)c=c.incrementLightness(d),a=c.getDistanceLuminosityFrom(this);return c},getReadableContrastingColor:function(a,d){if(!a instanceof c)return this;var e=d===b?5:d,f=a.getDistanceLuminosityFrom(this),g=a.getMaxContrastColor(),h=g.getDistanceLuminosityFrom(a);if(h&lt;=e)return g;if(f&gt;=e)return this;var i=0===g.toInt()?-1:1;while(f&lt;e){this.incrementLightness(i),f=this.getDistanceLuminosityFrom(a);if(this._color===0||this._color===16777215)break}return this},h:function(a){return this._hsl(&quot;h&quot;,a)},s:function(a){return this._hsl(&quot;s&quot;,a)},l:function(a){return this._hsl(&quot;l&quot;,a)},_hsl:function(a,c){var d=this.toHsl();return c===b?d[a]:(a===&quot;h&quot;?d[a]=c%360:d[a]=c&lt;0?0:c&gt;100?100:c,this.fromHsl(d))},darken:function(a){return a=a||5,this.incrementLightness(-a)},lighten:function(a){return a
 =a||5,this.incrementLightness(a)},incrementLightness:function(a){return this.l(this.l()+a)},saturate:function(a){return a=a||15,this.incrementSaturation(a)},desaturate:function(a){return a=a||15,this.incrementSaturation(-a)},incrementSaturation:function(a){return this.s(this.s()+a)},toGrayscale:function(){return this.h(0)},getComplement:function(){return this.incrementHue(180)},getSplitComplement:function(a){a=a||1;var b=180+a*30;return this.incrementHue(b)},getAnalog:function(a){a=a||1;var b=a*30;return this.incrementHue(b)},getTetrad:function(a){a=a||1;var b=a*60;return this.incrementHue(b)},getTriad:function(a){a=a||1;var b=a*120;return this.incrementHue(b)},incrementHue:function(a){return this.h(this.h()+a)}},a.Color=c}(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>