<!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>[26334] trunk/src/wp-admin/js/iris.min.js: Update the Iris color picker to version 1.0.4, which fixes a jQuery-UI CSS conflict.</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 { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { 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/26334">26334</a></dd>
<dt>Author</dt> <dd>ocean90</dd>
<dt>Date</dt> <dd>2013-11-23 12:00:33 +0000 (Sat, 23 Nov 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Update the Iris color picker to version 1.0.4, which fixes a jQuery-UI CSS conflict.

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

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

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadminjsirisminjs"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/js/iris.min.js (26333 => 26334)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/js/iris.min.js        2013-11-23 11:53:49 UTC (rev 26333)
+++ trunk/src/wp-admin/js/iris.min.js   2013-11-23 12:00:33 UTC (rev 26334)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-/*! Iris Color Picker - v1.0.3 - 2013-02-15
</del><ins>+/*! Iris Color Picker - v1.0.4 - 2013-11-18
</ins><span class="cx"> * https://github.com/Automattic/Iris
</span><span class="cx"> * Copyright (c) 2013 Matt Wiebe; Licensed GPLv2 */
</span><del>-(function(e,t){function c(){var t,n;r?i="filter":(t=e('<div id="iris-gradtest" />'),n="linear-gradient(top,#fff,#000)",e.each(s,function(e,r){t.css("backgroundImage",r+n);if(t.css("backgroundImage").match("gradient"))return i=e,!1}),i===!1&&(t.css("background","-webkit-gradient(linear,0% 0%,0% 100%,from(#fff),to(#000))"),t.css("backgroundImage").match("gradient")&&(i="webkit")),t.remove())}function h(t,n){return t=t==="top"?"top":"left",n=e.isArray(n)?n:Array.prototype.slice.call(arguments,1),i==="webkit"?d(t,n):s[i]+"linear-gradient("+t+", "+n.join(", ")+")"}function p(t,n){var r,i,s,o,u,a,f,l,c;t=t==="top"?"top":"left",n=e.isArray(n)?n:Array.prototype.slice.call(arguments,1),r=t==="top"?0:1,i=e(this),s=n.length-1,o="
 filter",u=r===1?"left":"top",a=r===1?"right":"bottom",f=r===1?"height":"width",l='<div class="iris-ie-gradient-shim" style="position:absolute;'+f+":100%;"+u+":%start%;"+a+":%end%;"+o+':%filter%;" data-color:"%color%"></div>',c="",i.css("position")==="static"&&i.css({position:"relative"}),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)+"%",t.octoHex=(new Color(t.color)).toIEOctoHex(),i.octoHex=(new Color(i.color)).toIEOctoHex(),u="progid:DXImageTransform.Microsoft.Gradient(GradientType="+r+", StartColorStr='"+t.octoHex+"', EndColorStr='"+i.octoHex+"')",c+=l.replace("%start%",t.stop).replace("%end%",o).replace("%filter%",u)}),i.find(".iris-ie-gradient
 -shim").remove(),e(c).prependTo(i)}function d(t,n){var r=[];return t=t==="top"?"0% 0%,0% 100%,":"0% 100%,100% 100%,",n=v(n),e.each(n,function(e,t){r.push("color-stop("+parseFloat(t.stop)/100+", "+t.color+")")}),"-webkit-gradient(linear,"+t+r.join(",")+")"}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&&(i=t.replace(/\s?1?[0-9]{1,2}%$/,""),s=o.shift()),n.push(i),r.push(s)}),r[0]===!1&&(r[0]="0%"),r[s]===!1&&(r[s]="100%"),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<=2||e.inArray(!1,t)<0)return t;while(i<t.length-1)!s&&t[i]===!1?(n=i-1,s=!0):s&&t[i]!==!1&&(r=i,i=t.length),i++;u=r-n,f=parseInt(t[n].replace("%"),10),o=(parseFloat(t[r].replace("%
 "))-f)/u,i=n+1,a=1;while(i<r)t[i]=f+a*o+"%",a++,i++;return m(t)}var n,r,i,s,o,u,a,f,l;n='<div class="iris-picker"><div class="iris-picker-inner"><div class="iris-square"><a class="iris-square-value" href="#"><span class="iris-square-handle ui-slider-handle"></span></a><div class="iris-square-inner iris-square-horiz"></div><div class="iris-square-inner iris-square-vert"></div></div><div class="iris-slider iris-strip"><div class="iris-slider-offset"></div></div></div></div>',a=navigator.userAgent.toLowerCase(),f=navigator.appName==="Microsoft Internet Explorer",l=f?parseFloat(a.match(/msie ([0-9]{1,}[\.0-9]{0,})/)[1]):0,r=f&&l<10,i=!1,s=["-moz-","-webkit-","-o-","-ms-"],o='.iris-picker{display:block;pos
 ition: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:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"}.iris-ie-lt9 .iris-square .iris-square-handle{background:none;border:3px solid #fff;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"}.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:" ";position:absolute;left:-2px;right:-2px;top:-3px;bottom:-3px;border:2px sol
 id #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:" "}.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}.i
 ris-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&&l<=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("backgroundImage",h.apply(this,n))})},e.fn.raninbowGradient=function(t,n){var r,i,s,o;t=t||"top",r=e.extend({},{s:100,l:50},n),i="hsl(%h%,"+r.s+"%,"+r.l+"%)",s=0,o=[];while(s<=360)o.push(i.replace("%h%",s)),s+=30;return this.each(function(){e(this).gradient(t,o)})},u={options:{color:!1,mode:"hsl",controls:{horiz:"s",vert:"l",strip:"h"},hide:!0,border:!0,target:!1,width:200,palettes:!1},_color:"",_palettes:["#000","#fff","#d33","#d93","#ee2","#81d742"
 ,"#1e73be","#8224e3"],_inited:!1,_defaultHSLControls:{horiz:"s",vert:"l",strip:"h"},_defaultHSVControls:{horiz:"h",vert:"v",strip:"s"},_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&&c(),r.is("input")?(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(".iris-picker")),f?l===9?t.picker.addClass("iris-ie-9"):l<=8&&t.picker.addClass("iris-ie-lt9"):a.indexOf("compatible")<0&&a.indexOf("khtml")<0&&a.match(/mozilla/)&&t.picker.addClass("iris-mozilla"),t.options.palettes&&t._addPalettes(),t._color=(new Color(s)).setHSpace(t.options.mode),t.options.color=t._color.toString(),t.controls={square:t.picker.find(".iris-square"),squ
 areDrag:t.picker.find(".iris-square-value"),horiz:t.picker.find(".iris-square-horiz"),vert:t.picker.find(".iris-square-vert"),strip:t.picker.find(".iris-strip"),stripSlider:t.picker.find(".iris-strip .iris-slider-offset")},t.options.mode==="hsv"&&t._has("l",t.options.controls)?t.options.controls=t._defaultHSVControls:t.options.mode==="hsl"&&t._has("v",t.options.controls)&&(t.options.controls=t._defaultHSLControls),t.hue=t._color.h(),t.options.hide&&t.picker.hide(),t.options.border&&t.picker.addClass("iris-border"),t._initControls(),t.active="external",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("<div class='iris-palette-container' />"),n=e("<a class='iris-palette' tabindex='0' />"),r=e.isArray(this.opt
 ions.palettes)?this.options.palettes:this._palettes;this.picker.find(".iris-palette-container").length&&(t=this.picker.find(".iris-palette-container").detach().html("")),e.each(r,function(e,r){n.clone().data("color",r).css("backgroundColor",r).appendTo(t).height(10).width(10)}),this.picker.append(t)},_paint:function(){var e=this;e._paintDimension("top","strip"),e._paintDimension("top","vert"),e._paintDimension("left","horiz")},_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==="square"&&t!=="strip")return;switch(u[t]){case"h":if(i==="hsv"){s=r.clone();switch(t){case"horiz":s[u.vert](100);break;case"vert":s[u.horiz](100);break;case"strip":s.setHSpace("hsl")}a=s.toHsl()}else t=
 =="strip"?a={s:s.s,l:s.l}:a={s:100,l:s.l};o.raninbowGradient(e,a);break;case"s":i==="hsv"?t==="vert"?a=[r.clone().a(0).s(0).toCSS("rgba"),r.clone().a(1).s(0).toCSS("rgba")]:t==="strip"?a=[r.clone().s(100).toCSS("hsl"),r.clone().s(0).toCSS("hsl")]:t==="horiz"&&(a=["#fff","hsl("+s.h+",100%,50%)"]):t==="vert"&&n.options.controls.horiz==="h"?a=["hsla(0, 0%, "+s.l+"%, 0)","hsla(0, 0%, "+s.l+"%, 1)"]:a=["hsl("+s.h+",0%,50%)","hsl("+s.h+",100%,50%)"],o.gradient(e,a);break;case"l":t==="strip"?a=["hsl("+s.h+",100%,100%)","hsl("+s.h+", "+s.s+"%,50%)","hsl("+s.h+",100%,0%)"]:a=["#fff","rgba(255,255,255,0) 50%","rgba(0,0,0,0) 50%",&quo
 t;rgba(0,0,0,1)"],o.gradient(e,a);break;case"v":t==="strip"?a=[r.clone().v(100).toCSS(),r.clone().v(0).toCSS()]:a=["rgba(0,0,0,0)","#000"],o.gradient(e,a);break;default:}},_getHSpaceColor:function(){return this.options.mode==="hsv"?this._color.toHsv():this._color.toHsl()},_dimensions:function(t){var n=this,r=n.options,i=n.picker.find(".iris-picker-inner"),s=n.controls,o=s.square,u=n.picker.find(".iris-strip"),a="77.5%",f="12%",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&&(o.css("width",""),u.css("width",""),n.picker.css({width:"",height:""})),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(".iris-pa
 lette").each(function(t,n){var r=t===0?0:d;e(this).css({width:v,height:v,marginLeft:r})}),n.picker.css("paddingBottom",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(/^#/,"");e.removeClass("iris-error"),r.error?i!==""&&e.addClass("iris-error"):r.toString()!==t._color.toString()&&(n.type!=="keyup"||!i.match(/^[0-9a-fA-F]{3}$/))&&t._setOption("color",r.toString())};e.on("change",r).on("keyup",t._debounce(r,n)),t.options.hide&&e.one("focus",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:"vertical",max:s,slide:function(e,n){t.active="strip",i.strip==="h"&&(n.value=s-n.value),t._color[i.strip](n.value),t._change.apply(t,argument
 s)}}),n.squareDrag.draggable({containment:"parent",zIndex:1e3,cursor:"move",drag:function(e,n){t._squareDrag(e,n)},start:function(){r.addClass("iris-dragging"),e(this).addClass("ui-state-focus")},stop:function(){r.removeClass("iris-dragging"),e(this).removeClass("ui-state-focus")}}).on("mousedown mouseup",function(n){var r="ui-state-focus";n.preventDefault(),n.type==="mousedown"?(t.picker.find("."+r).removeClass(r).blur(),e(this).addClass(r).focus()):e(this).removeClass(r)}).on("keydown",function(e){var r=n.square,i=n.squareDrag,s=i.position(),o=t.options.width/100;e.altKey&&(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.mousedo
 wn(function(n){var r,i;if(n.which!==1)return;if(!e(n.target).is("div"))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&&t._paletteListeners()},_paletteListeners:function(){var t=this;t.picker.find(".iris-palette-container").on("click.palette",".iris-palette",function(n){t._color.fromCSS(e(this).data("color")),t.active="external",t._change()}).on("keydown.palette",".iris-palette",function(t){if(t.keyCode!==13&&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="square",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"color":n=""+n,o=n.replace(/^#/,""),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="external",r._change());break;case"palettes":s=!0,n?r._addPalettes():r.picker.find(".iris-palette-container").remove(),i||r._paletteListeners();break;case"width":s=!0;break;case"border":s=!0,a=n?"addClass":"removeClass",r.picker[a]("iris-border");break;case"mode":case"controls":if(i===n)return;return a=r.element,i=r.options,i.hide=!r.picker.is(":visible"),r.destroy(),r.picker.remove(),e(r.element).iris(i)}s&&r._dimensions(!0)},_squareDimensions:function(e){var n=this.controls.square,r,i;return e!==t&&n.data("di
 mensions")?n.data("dimensions"):(i=this.controls.squareDrag,r={w:n.width(),h:n.height()},n.data("dimensions",r),r)},_isNonHueControl:function(e,t){return e==="square"&&this.options.controls.strip==="h"?!0:t==="external"||t==="h"&&e==="strip"?!1:!0},_change:function(t,n){var r=this,i=r.controls,s=r._getHSpaceColor(),o=r._color.toString(),u=["square","strip"],a=r.options.controls,f=a[r.active]||"external",l=r.hue;r.active==="strip"?u=[]:r.active!=="external"&&u.pop(),e.each(u,function(e,t){var n,o,u;if(t!==r.active)switch(t){case"strip":n=a.strip==="h"?r._scale[a.strip]-s[a.strip]:s[a.strip],i.stripSlider.slider("value",n);break;case"square":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&&r._isN
 onHueControl(r.active,f)&&r._color.h(l),r.hue=r._color.h(),r.options.color=r._color.toString(),r._inited&&r._trigger("change",{type:r.active},{color:r._color}),r.element.is(":input")&&!r._color.error&&(r.element.removeClass("iris-error"),r.element.val()!==r._color.toString()&&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&&!r,clearTimeout(r),r=setTimeout(u,t),a&&(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("color",e)}},e.widget("a8c.iris",u),e('<style id="iris-css">'+o+"</style>").appendTo("head&qu
 ot;)})(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:"hsl",_init:function(e){var n="noop";switch(typeof e){case"object":return e.a!==t&&this.a(e.a),n=e.r!==t?"fromRgb":e.l!==t?"fromHsl":e.v!==t?"fromHsv":n,this[n](e);case"string":return this.fromCSS(e);case"number":return this.fromInt(parseInt(e,10))}return this},_error:function(){return this.error=!0,this},clone:function(){var e=new n(this.toInt()),t=["_alpha","_hSpace","_hsl","_hsv","error"];for(var r=t.length-1;r>=0;r--)e[t[r]]=this[t[r]];return e},setHSpace:function(e){return this._hSpace=e==="hsv"?e:"hsl",this},noop:function(){return this},fromCSS:function(e){var t,n,r=/^(rgb|hs(l|v))a?\(/;this.error=!1,e=e.replace(/^\s+/,"&quo
 t;).replace(/\s+$/,"").replace(/;$/,"");if(e.match(r)&&e.match(/\)$/)){n=e.replace(/(\s|%)/g,"").replace(r,"").replace(/,?\);?$/,"").split(",");if(n.length<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>=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!="object"||e.r===t||e.g===t||e.b===t?this._error():(this.error=!1,this.fromInt(parseInt((e.r<<16)+(e.g<<8)+e.b,10),n))},fromHex:function(e){return e=e.replace(/^#/,"").replace(/^0x/,""),e.length===3&&(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!="object"||e.h===t||e.s===t||e.l===t?this._error():(this._hsl=e,this._hSpace="hsl",u=e.h/360,a=e.s/100,f=e.l/100,a===0?n=r=i=f:(s=f<.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!="object"||e.h===t||e.s===t||e.v===t)return this._error();this._hsv=e,this._hSpace="hsv",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)&&(this._color=0),this._color>16777215?this._color=16777215:this._color<0&&(this._color=0),n===
 t&&(this._hsv.h=this._hsv.s=this._hsl.h=this._hsl.s=0),this},hue2rgb:function(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e},toString:function(){var e=parseInt(this._color,10).toString(16);if(this.error)return"";if(e.length<6)for(var t=6-e.length-1;t>=0;t--)e="0"+e;return"#"+e},toCSS:function(e,t){e=e||"hex",t=parseFloat(t||this._alpha);switch(e){case"rgb":case"rgba":var n=this.toRgb();return t<1?"rgba( "+n.r+", "+n.g+", "+n.b+", "+t+" )":"rgb( "+n.r+", "+n.g+", "+n.b+" )";case"hsl":case"hsla":var r=this.toHsl();return t<1?"hsla( "+r.h+", "+r.s+"%, "+r.l+"%, "+t+" )":"hsl( "+r.h+", "+r.s+"%, "+r.l+"% )";default:return this.toString()}}
 ,toRgb:function(){return{r:255&this._color>>16,g:255&this._color>>8,b:255&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>.5?f/(2-i-s):f/(i+s);switch(i){case t:o=(n-r)/f+(n<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&&this._hsl.h!==o&&(o=this._hsl.h),u=Math.round(u*100),u===0&&this._hsl.s&&(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<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&&this._hsv.h!==o&&(o=this._hsv.h),u=Math.round(u*100),u===0&&this._hsv.s&&(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&&(t="0"+t),"#"+t+e.replace(/^#/,"")},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>r?(t+.05)/(r+.05):(r+.05)/(t+.05)}throw"getDistanceLuminosityFrom requires a Color object"},getMaxContrastColor:function(){var e=this.toLuminosity(),t=e>=.5?"000000":"ffffff";return new n(t)},getGrayscaleContrastingColor:function(e){if(!e)return this.getMaxContrastColor();var t=e<5?5:e,n=this.getMaxContrastColor();e=n.getDistanceLuminosityFrom(this);if(e<=t)return n;var r=0===n.toInt()?1:-1;while(e>t)n=n.incrementLightness(r),e=n.getDistanceLuminosityFrom(this);return n},getReadab
 leContrastingColor: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<=i)return o;if(s>=i)return this;var a=0===o.toInt()?-1:1;while(s<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("hsl").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("to",n.space);return r===t?s[e]:(i===!0&&(r=s[e]+r),n.mod&&(r%=n.mod),n.range&&(r=r<n.range[0]?n.range[0]:r>n.range[1]?n.range[1]:r),s[e]=r,this._spaceFunc("from",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:"hsl",range:[0,100]},v:{space:"hsv",range:[0,100]},r:{space:"rgb",range:[0,255]},g:{space:"rgb",range:[0,255]},b:{space:"rgb",range:[0,255]}};for(var i in r)r.hasOwnProperty(i)&&(n.fn[i]=n.fn._partial(i));e.Color=n}(typeof exports=="object"&&exports||this);
</del><span class="cx">\ No newline at end of file
</span><ins>+!function(a,b){function c(){var b,c;j?k="filter":(b=a('<div id="iris-gradtest" />'),c="linear-gradient(top,#fff,#000)",a.each(l,function(a,d){return b.css("backgroundImage",d+c),b.css("backgroundImage").match("gradient")?(k=a,!1):void 0}),k===!1&&(b.css("background","-webkit-gradient(linear,0% 0%,0% 100%,from(#fff),to(#000))"),b.css("backgroundImage").match("gradient")&&(k="webkit")),b.remove())}function d(b,c){return b="top"===b?"top":"left",c=a.isArray(c)?c:Array.prototype.slice.call(arguments,1),"webkit"===k?f(b,c):l[k]+"linear-gradient("+b+", "+c.join(", ")+")"}function e(b,c){var d,e,f,h,i,j,k,l,m;b="top"===b?"top":"left",c=a.isArray(c)?c:Array.prototype.slice.call(arguments,1),d="top"===b?0:1,e=a(this),f=c.length-1,h=
 "filter",i=1===d?"left":"top",j=1===d?"right":"bottom",k=1===d?"height":"width",l='<div class="iris-ie-gradient-shim" style="position:absolute;'+k+":100%;"+i+":%start%;"+j+":%end%;"+h+':%filter%;" data-color:"%color%"></div>',m="","static"===e.css("position")&&e.css({position:"relative"}),c=g(c),a.each(c,function(a,b){var e,g,h;return a===f?!1:(e=c[a+1],b.stop!==e.stop&&(g=100-parseFloat(e.stop)+"%",b.octoHex=new Color(b.color).toIEOctoHex(),e.octoHex=new Color(e.color).toIEOctoHex(),h="progid:DXImageTransform.Microsoft.Gradient(GradientType="+d+", StartColorStr='"+b.octoHex+"', EndColorStr='"+e.octoHex+"')",m+=l.replace("%start%",b.stop).replace("%end%",g).replace("%filter%",h)),void 0)}),e.find(".iris-i
 e-gradient-shim").remove(),a(m).prependTo(e)}function f(b,c){var d=[];return b="top"===b?"0% 0%,0% 100%,":"0% 100%,100% 100%,",c=g(c),a.each(c,function(a,b){d.push("color-stop("+parseFloat(b.stop)/100+", "+b.color+")")}),"-webkit-gradient(linear,"+b+d.join(",")+")"}function g(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&&(e=b.replace(/\s?1?[0-9]{1,2}%$/,""),f=g.shift()),c.push(e),d.push(f)}),d[0]===!1&&(d[0]="0%"),d[f]===!1&&(d[f]="100%"),d=h(d),a.each(d,function(a){e[a]={color:c[a],stop:d[a]}}),e}function h(b){var c,d,e,f,g=0,i=b.length-1,j=0,k=!1;if(b.length<=2||a.inArray(!1,b)<0)return b;for(;j<b.length-1;)k||b[j]!==!1?k&&b[j]!==!1&&(i=j,j=b.length):(g=j-1,k=!0),j++;for(d=i-g,f=parseInt(b[g].replace("%"),10),c=(parseFloat(b[i].replace(&q
 uot;%"))-f)/d,j=g+1,e=1;i>j;)b[j]=f+e*c+"%",e++,j++;return h(b)}var i,j,k,l,m,n,o,p,q;return i='<div class="iris-picker"><div class="iris-picker-inner"><div class="iris-square"><a class="iris-square-value" href="#"><span class="iris-square-handle ui-slider-handle"></span></a><div class="iris-square-inner iris-square-horiz"></div><div class="iris-square-inner iris-square-vert"></div></div><div class="iris-slider iris-strip"><div class="iris-slider-offset"></div></div></div></div>',o=navigator.userAgent.toLowerCase(),p="Microsoft Internet Explorer"===navigator.appName,q=p?parseFloat(o.match(/msie ([0-9]{1,}[\.0-9]{0,})/)[1]):0,j=p&&10>q,k=!1,l=["-moz-","-webkit-","-o-","-ms-"],m='.iris-picker{display:bl
 ock;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,.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:"alpha(Opacity=30)"}.iris-ie-lt9 .iris-square .iris-square-handle{background:0;border:3px solid #fff;-ms-filter:"alpha(Opacity=50)"}.iris-picker .iris-strip{margin-right:0;position:relative}.iris-picker .iris-strip .ui-slider-handle{position:absolute;background:0;margin:0;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:" ";position:absolute;left:-2px;right:-2px;top:-3px;bottom:-3px;border:2px solid #fff;border-radius:3px}.iris-picker .iris-slider-offset{po
 sition:absolute;top:11px;left:0;right:0;bottom:-3px;width:auto;height:auto;background:transparent;border:0;top:none;border-radius:0}.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:" "}.iris-picker .iris-square-value{width:8px;height:8px;position:absolute}.iris-ie-lt9 .iris-square-value,.iris-mozilla .iris-square-value{widt
 h: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}',j&&7>=q?(a.fn.iris=a.noop,a.support.iris=!1,void 0):(a.support.iris=!0,a.fn.gradient=function(){var b=arguments;return this.each(function(){j?e.apply(this,b):a(this).css("backgroundImage",d.apply(this,b))})},a.fn.raninbowGradient=function(b,c){var d,e,f,g;for(b=b||"top",d=a.extend({},{s:100,l:50},c),e="hsl(%h%,"+d.s+"%,"+d.l+"%)",f=0,g=[];360>=f;)g.push(e.replace("%h%",f)),f+=30;return this.each(function(){a(this).gradient(b,g)})},n={options:{color:!1,mode:"hsl",controls:{horiz:"s",vert:"l",strip:"h"},hide:!0,border:!0,target:!1,width:200,palettes:!1},_color:"",_palettes:["#000","#fff","#d33","#d93","#ee2",&qu
 ot;#81d742","#1e73be","#8224e3"],_inited:!1,_defaultHSLControls:{horiz:"s",vert:"l",strip:"h"},_defaultHSVControls:{horiz:"h",vert:"v",strip:"s"},_scale:{h:360,s:100,l:100,v:100},_create:function(){var b=this,d=b.element,e=b.options.color||d.val();k===!1&&c(),d.is("input")?(b.picker=b.options.target?a(i).appendTo(b.options.target):a(i).insertAfter(d),b._addInputListeners(d)):(d.append(i),b.picker=d.find(".iris-picker")),p?9===q?b.picker.addClass("iris-ie-9"):8>=q&&b.picker.addClass("iris-ie-lt9"):o.indexOf("compatible")<0&&o.indexOf("khtml")<0&&o.match(/mozilla/)&&b.picker.addClass("iris-mozilla"),b.options.palettes&&b._addPalettes(),b._color=new Color(e).setHSpace(b.options.mode),b.options.color=b._color.toString(),b.controls={square:b.picker.find(".iris-square"),
 squareDrag:b.picker.find(".iris-square-value"),horiz:b.picker.find(".iris-square-horiz"),vert:b.picker.find(".iris-square-vert"),strip:b.picker.find(".iris-strip"),stripSlider:b.picker.find(".iris-strip .iris-slider-offset")},"hsv"===b.options.mode&&b._has("l",b.options.controls)?b.options.controls=b._defaultHSVControls:"hsl"===b.options.mode&&b._has("v",b.options.controls)&&(b.options.controls=b._defaultHSLControls),b.hue=b._color.h(),b.options.hide&&b.picker.hide(),b.options.border&&b.picker.addClass("iris-border"),b._initControls(),b.active="external",b._dimensions(),b._change()},_has:function(b,c){var d=!1;return a.each(c,function(a,c){return b===c?(d=!0,!1):void 0}),d},_addPalettes:function(){var b=a('<div class="iris-palette-container" />'),c=a('<a class="iris-palette" tabindex="0" />'),d
 =a.isArray(this.options.palettes)?this.options.palettes:this._palettes;this.picker.find(".iris-palette-container").length&&(b=this.picker.find(".iris-palette-container").detach().html("")),a.each(d,function(a,d){c.clone().data("color",d).css("backgroundColor",d).appendTo(b).height(10).width(10)}),this.picker.append(b)},_paint:function(){var a=this;a._paintDimension("top","strip"),a._paintDimension("top","vert"),a._paintDimension("left","horiz")},_paintDimension:function(a,b){var c,d=this,e=d._color,f=d.options.mode,g=d._getHSpaceColor(),h=d.controls[b],i=d.options.controls;if(b!==d.active&&("square"!==d.active||"strip"===b))switch(i[b]){case"h":if("hsv"===f){switch(g=e.clone(),b){case"horiz":g[i.vert](100);break;case"vert":g[i.horiz](100);break;case"strip":g.setHSpace("hsl")}c=g.t
 oHsl()}else c="strip"===b?{s:g.s,l:g.l}:{s:100,l:g.l};h.raninbowGradient(a,c);break;case"s":"hsv"===f?"vert"===b?c=[e.clone().a(0).s(0).toCSS("rgba"),e.clone().a(1).s(0).toCSS("rgba")]:"strip"===b?c=[e.clone().s(100).toCSS("hsl"),e.clone().s(0).toCSS("hsl")]:"horiz"===b&&(c=["#fff","hsl("+g.h+",100%,50%)"]):c="vert"===b&&"h"===d.options.controls.horiz?["hsla(0, 0%, "+g.l+"%, 0)","hsla(0, 0%, "+g.l+"%, 1)"]:["hsl("+g.h+",0%,50%)","hsl("+g.h+",100%,50%)"],h.gradient(a,c);break;case"l":c="strip"===b?["hsl("+g.h+",100%,100%)","hsl("+g.h+", "+g.s+"%,50%)","hsl("+g.h+",100%,0%)"]:["#fff","rgba(255,255,255,0) 50%","rgba(0,0,0,0) 50%&qu
 ot;,"rgba(0,0,0,1)"],h.gradient(a,c);break;case"v":c="strip"===b?[e.clone().v(100).toCSS(),e.clone().v(0).toCSS()]:["rgba(0,0,0,0)","#000"],h.gradient(a,c)}},_getHSpaceColor:function(){return"hsv"===this.options.mode?this._color.toHsv():this._color.toHsl()},_dimensions:function(b){var c,d,e,f,g=this,h=g.options,i=g.controls,j=i.square,k=g.picker.find(".iris-strip"),l="77.5%",m="12%",n=20,o=h.border?h.width-n:h.width,p=a.isArray(h.palettes)?h.palettes.length:g._palettes.length;return b&&(j.css("width",""),k.css("width",""),g.picker.css({width:"",height:""})),l=o*(parseFloat(l)/100),m=o*(parseFloat(m)/100),c=h.border?l+n:l,j.width(l).height(l),k.height(l).width(m),g.picker.css({width:h.width,height:c}),h.palettes?(d=2*l/100,f=l-(p-1)*d,e=f/p,g.picker.find(".iris-palette").each(function(b){var c=0===b?0:d;a(this).css({wi
 dth:e,height:e,marginLeft:c})}),g.picker.css("paddingBottom",e+d),k.height(e+d+l),void 0):g.picker.css("paddingBottom","")},_addInputListeners:function(a){var b=this,c=100,d=function(c){var d=new Color(a.val()),e=a.val().replace(/^#/,"");a.removeClass("iris-error"),d.error?""!==e&&a.addClass("iris-error"):d.toString()!==b._color.toString()&&("keyup"===c.type&&e.match(/^[0-9a-fA-F]{3}$/)||b._setOption("color",d.toString()))};a.on("change",d).on("keyup",b._debounce(d,c)),b.options.hide&&a.one("focus",function(){b.show()})},_initControls:function(){var b=this,c=b.controls,d=c.square,e=b.options.controls,f=b._scale[e.strip];c.stripSlider.slider({orientation:"vertical",max:f,slide:function(a,c){b.active="strip","h"===e.strip&&(c.value=f-c.value),b._color[e.strip](c.value),b._change.apply(b,arguments)}
 }),c.squareDrag.draggable({containment:"parent",zIndex:1e3,cursor:"move",drag:function(a,c){b._squareDrag(a,c)},start:function(){d.addClass("iris-dragging"),a(this).addClass("ui-state-focus")},stop:function(){d.removeClass("iris-dragging"),a(this).removeClass("ui-state-focus")}}).on("mousedown mouseup",function(c){var d="ui-state-focus";c.preventDefault(),"mousedown"===c.type?(b.picker.find("."+d).removeClass(d).blur(),a(this).addClass(d).focus()):a(this).removeClass(d)}).on("keydown",function(a){var d=c.square,e=c.squareDrag,f=e.position(),g=b.options.width/100;switch(a.altKey&&(g*=10),a.keyCode){case 37:f.left-=g;break;case 38:f.top-=g;break;case 39:f.left+=g;break;case 40:f.top+=g;break;default:return!0}f.left=Math.max(0,Math.min(f.left,d.width())),f.top=Math.max(0,Math.min(f.top,d.height())),e.css(f),b._squareDrag(a,{position:f}),a.preventDefault()}),d.mousedown(
 function(c){var d,e;1===c.which&&a(c.target).is("div")&&(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.options.palettes&&b._paletteListeners()},_paletteListeners:function(){var b=this;b.picker.find(".iris-palette-container").on("click.palette",".iris-palette",function(){b._color.fromCSS(a(this).data("color")),b.active="external",b._change()}).on("keydown.palette",".iris-palette",function(b){return 13!==b.keyCode&&32!==b.keyCode?!0:(b.stopPropagation(),a(this).click(),void 0)})},_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="square",c._change.apply(c,arguments)},_setOption:function(b,c){var d,e,f,g=this,h=g.options[b],i=!1;switch(g.options[b]=c,b){case"color":c=""+c,d=c.replace(/^#/,""),e=new Color(c).setHSpace(g.options.mode),e.error?g.options[b]=h:(g._color=e,g.options.color=g.options[b]=g._color.toString(),g.active="external",g._change());break;case"palettes":i=!0,c?g._addPalettes():g.picker.find(".iris-palette-container").remove(),h||g._paletteListeners();break;case"width":i=!0;break;case"border":i=!0,f=c?"addClass":"removeClass",g.picker[f]("iris-border");break;case"mode":case"controls":if(h===c)return;return f=g.element,h=g.options,h.hide=!g.picker.is(":visible"),g.destroy(),g.picker.remove(),a(g.element).iris(h)}i&&g._dimensions(!0)},_squareDimensions:function(a){var c,d,e=this.controls.square;return a!==b&&e.data("di
 mensions")?e.data("dimensions"):(d=this.controls.squareDrag,c={w:e.width(),h:e.height()},e.data("dimensions",c),c)},_isNonHueControl:function(a,b){return"square"===a&&"h"===this.options.controls.strip?!0:"external"===b||"h"===b&&"strip"===a?!1:!0},_change:function(){var b=this,c=b.controls,d=b._getHSpaceColor(),e=["square","strip"],f=b.options.controls,g=f[b.active]||"external",h=b.hue;"strip"===b.active?e=[]:"external"!==b.active&&e.pop(),a.each(e,function(a,e){var g,h,i;if(e!==b.active)switch(e){case"strip":g="h"===f.strip?b._scale[f.strip]-d[f.strip]:d[f.strip],c.stripSlider.slider("value",g);break;case"square":h=b._squareDimensions(),i={left:d[f.horiz]/b._scale[f.horiz]*h.w,top:h.h-d[f.vert]/b._scale[f.vert]*h.h},b.controls.squareDrag.css(i)}}),d.h!==h&&b._isNonHueControl(b.active,g)&a
 mp;&b._color.h(h),b.hue=b._color.h(),b.options.color=b._color.toString(),b._inited&&b._trigger("change",{type:b.active},{color:b._color}),b.element.is(":input")&&!b._color.error&&(b.element.removeClass("iris-error"),b.element.val()!==b._color.toString()&&b.element.val(b._color.toString())),b._paint(),b._inited=!0,b.active=!1},_debounce:function(a,b,c){var d,e;return function(){var f,g,h=this,i=arguments;return f=function(){d=null,c||(e=a.apply(h,i))},g=c&&!d,clearTimeout(d),d=setTimeout(f,b),g&&(e=a.apply(h,i)),e}},show:function(){this.picker.show()},hide:function(){this.picker.hide()},toggle:function(){this.picker.toggle()},color:function(a){return a===!0?this._color.clone():a===b?this._color.toString():(this.option("color",a),void 0)}},a.widget("a8c.iris",n),a('<style id="iris-css">'+m+"</style>").appendTo("head"),void 0)}(jQuery),function
 (a,b){var c=function(a,b){return this instanceof c?this._init(a,b):new c(a,b)};c.fn=c.prototype={_color:0,_alpha:1,error:!1,_hsl:{h:0,s:0,l:0},_hsv:{h:0,s:0,v:0},_hSpace:"hsl",_init:function(a){var c="noop";switch(typeof a){case"object":return a.a!==b&&this.a(a.a),c=a.r!==b?"fromRgb":a.l!==b?"fromHsl":a.v!==b?"fromHsv":c,this[c](a);case"string":return this.fromCSS(a);case"number":return this.fromInt(parseInt(a,10))}return this},_error:function(){return this.error=!0,this},clone:function(){for(var a=new c(this.toInt()),b=["_alpha","_hSpace","_hsl","_hsv","error"],d=b.length-1;d>=0;d--)a[b[d]]=this[b[d]];return a},setHSpace:function(a){return this._hSpace="hsv"===a?a:"hsl",this},noop:function(){return this},fromCSS:function(a){var b,c=/^(rgb|hs(l|v))a?\(/;if(this.error=!1,a=a.replace(/^\s+/,"").replace(/\s+$/,"&
 quot;).replace(/;$/,""),a.match(c)&&a.match(/\)$/)){if(b=a.replace(/(\s|%)/g,"").replace(c,"").replace(/,?\);?$/,"").split(","),b.length<3)return this._error();if(4===b.length&&(this.a(parseFloat(b.pop())),this.error))return this;for(var d=b.length-1;d>=0;d--)if(b[d]=parseInt(b[d],10),isNaN(b[d]))return this._error();return a.match(/^rgb/)?this.fromRgb({r:b[0],g:b[1],b:b[2]}):a.match(/^hsv/)?this.fromHsv({h:b[0],s:b[1],v:b[2]}):this.fromHsl({h:b[0],s:b[1],l:b[2]})}return this.fromHex(a)},fromRgb:function(a,c){return"object"!=typeof a||a.r===b||a.g===b||a.b===b?this._error():(this.error=!1,this.fromInt(parseInt((a.r<<16)+(a.g<<8)+a.b,10),c))},fromHex:function(a){return a=a.replace(/^#/,"").replace(/^0x/,""),3===a.length&&(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){var c,d,e,f,g,h,i,j;retu
 rn"object"!=typeof a||a.h===b||a.s===b||a.l===b?this._error():(this._hsl=a,this._hSpace="hsl",h=a.h/360,i=a.s/100,j=a.l/100,0===i?c=d=e=j:(f=.5>j?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:255*c,g:255*d,b:255*e},!0))},fromHsv:function(a){var c,d,e,f,g,h,i,j,k,l,m;if("object"!=typeof a||a.h===b||a.s===b||a.v===b)return this._error();switch(this._hsv=a,this._hSpace="hsv",c=a.h/360,d=a.s/100,e=a.v/100,i=Math.floor(6*c),j=6*c-i,k=e*(1-d),l=e*(1-j*d),m=e*(1-(1-j)*d),i%6){case 0:f=e,g=m,h=k;break;case 1:f=l,g=e,h=k;break;case 2:f=k,g=e,h=m;break;case 3:f=k,g=l,h=e;break;case 4:f=m,g=k,h=e;break;case 5:f=e,g=k,h=l}return this.fromRgb({r:255*f,g:255*g,b:255*h},!0)},fromInt:function(a,c){return this._color=parseInt(a,10),isNaN(this._color)&&(this._color=0),this._color>16777215?this._color=16777215:this._color<0&&(this._color=0),c===b&&(this._hsv.h=t
 his._hsv.s=this._hsl.h=this._hsl.s=0),this},hue2rgb:function(a,b,c){return 0>c&&(c+=1),c>1&&(c-=1),1/6>c?a+6*(b-a)*c:.5>c?b:2/3>c?a+6*(b-a)*(2/3-c):a},toString:function(){var a=parseInt(this._color,10).toString(16);if(this.error)return"";if(a.length<6)for(var b=6-a.length-1;b>=0;b--)a="0"+a;return"#"+a},toCSS:function(a,b){switch(a=a||"hex",b=parseFloat(b||this._alpha),a){case"rgb":case"rgba":var c=this.toRgb();return 1>b?"rgba( "+c.r+", "+c.g+", "+c.b+", "+b+" )":"rgb( "+c.r+", "+c.g+", "+c.b+" )";case"hsl":case"hsla":var d=this.toHsl();return 1>b?"hsla( "+d.h+", "+d.s+"%, "+d.l+"%, "+b+" )":"hsl( "+d.h+", "+d.s+"%, "+d.l+"% )";default:return this.toString()}},toRgb:function(){return{
 r:255&this._color>>16,g:255&this._color>>8,b:255&this._color}},toHsl:function(){var a,b,c=this.toRgb(),d=c.r/255,e=c.g/255,f=c.b/255,g=Math.max(d,e,f),h=Math.min(d,e,f),i=(g+h)/2;if(g===h)a=b=0;else{var j=g-h;switch(b=i>.5?j/(2-g-h):j/(g+h),g){case d:a=(e-f)/j+(f>e?6:0);break;case e:a=(f-d)/j+2;break;case f:a=(d-e)/j+4}a/=6}return a=Math.round(360*a),0===a&&this._hsl.h!==a&&(a=this._hsl.h),b=Math.round(100*b),0===b&&this._hsl.s&&(b=this._hsl.s),{h:a,s:b,l:Math.round(100*i)}},toHsv:function(){var a,b,c=this.toRgb(),d=c.r/255,e=c.g/255,f=c.b/255,g=Math.max(d,e,f),h=Math.min(d,e,f),i=g,j=g-h;if(b=0===g?0:j/g,g===h)a=b=0;else{switch(g){case d:a=(e-f)/j+(f>e?6:0);break;case e:a=(f-d)/j+2;break;case f:a=(d-e)/j+4}a/=6}return a=Math.round(360*a),0===a&&this._hsv.h!==a&&(a=this._hsv.h),b=Math.round(100*b),0===b&&this._hsv.s&&(b=this._hsv.s),{h:a,s:b,v:Math.round(100*i)}},toInt:function(){return 
 this._color},toIEOctoHex:function(){var a=this.toString(),b=parseInt(255*this._alpha,10).toString(16);return 1===b.length&&(b="0"+b),"#"+b+a.replace(/^#/,"")},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))throw"getDistanceLuminosityFrom requires a Color object";var b=this.toLuminosity(),d=a.toLuminosity();return b>d?(b+.05)/(d+.05):(d+.05)/(b+.05)},getMaxContrastColor:function(){var a=this.toLuminosity(),b=a>=.5?"000000":"ffffff";return new c(b)},getGrayscaleContrastingColor:function(a){if(!a)return this.getMaxContrastColor();var b=5>a?5:a,c=this.getMaxContrastColor();if(a=c.getDistanceLuminosityFrom(this),b>=a)return c;for(var d=0===c.toInt()?1:-1;a>b;)c=c.incrementLightness(d),a=c.getDistanceLuminosityFrom(this);return c},getReadableContrastingColor:funct
 ion(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(e>=h)return g;if(f>=e)return this;for(var i=0===g.toInt()?-1:1;e>f&&(this.incrementLightness(i),f=this.getDistanceLuminosityFrom(a),0!==this._color&&16777215!==this._color););return this},a:function(a){if(a===b)return this._alpha;var c=parseFloat(a);return isNaN(c)?this._error():(this._alpha=c,this)},darken:function(a){return a=a||5,this.l(-a,!0)},lighten:function(a){return a=a||5,this.l(a,!0)},saturate:function(a){return a=a||15,this.s(a,!0)},desaturate:function(a){return a=a||15,this.s(-a,!0)},toGrayscale:function(){return this.setHSpace("hsl").s(0)},getComplement:function(){return this.h(180,!0)},getSplitComplement:function(a){a=a||1;var b=180+30*a;return this.h(b,!0)},getAnalog:function(a){a=a||1;var b=30*a;return this.h(b,!0)},getTetrad:function(a){a=a||1;var b=60*a;return this.h(b,!0)},getTr
 iad:function(a){a=a||1;var b=120*a;return this.h(b,!0)},_partial:function(a){var c=d[a];return function(d,e){var f=this._spaceFunc("to",c.space);return d===b?f[a]:(e===!0&&(d=f[a]+d),c.mod&&(d%=c.mod),c.range&&(d=d<c.range[0]?c.range[0]:d>c.range[1]?c.range[1]:d),f[a]=d,this._spaceFunc("from",c.space,f))}},_spaceFunc:function(a,b,c){var d=b||this._hSpace,e=a+d.charAt(0).toUpperCase()+d.substr(1);return this[e](c)}};var d={h:{mod:360},s:{range:[0,100]},l:{space:"hsl",range:[0,100]},v:{space:"hsv",range:[0,100]},r:{space:"rgb",range:[0,255]},g:{space:"rgb",range:[0,255]},b:{space:"rgb",range:[0,255]}};for(var e in d)d.hasOwnProperty(e)&&(c.fn[e]=c.fn._partial(e));a.Color=c}("object"==typeof exports&&exports||this);
</ins><span class="cx">\ No newline at end of file
</span></span></pre>
</div>
</div>

</body>
</html>