!function(e,t){"object"==typeofexports&&"object"==typeofmodule?module.exports=t():"function"==typeofdefine&&define.amd?define(t):"object"==typeofexports?exports.dat=t():e.dat=t()}(this,function(){returnfunction(e){functiont(i){if(n[i])returnn[i].exports;varo=n[i]={exports:{},id:i,loaded:!1};returne[i].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}varn={};returnt.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){e.exports={color:{Color:n(2),math:n(6),interpret:n(3)},controllers:{Controller:n(7),BooleanController:n(8),OptionController:n(10),StringController:n(11),NumberController:n(12),NumberControllerBox:n(13),NumberControllerSlider:n(14),FunctionController:n(20),ColorController:n(21)},dom:{dom:n(9)},gui:{GUI:n(22)}}},function(e,t,n){functioni(e,t,n){Object.defineProperty(e,t,{get:function(){return"RGB"===this.__state.space?this.__state[t]:(r(this,t,n),this.__state[t])},set:function(e){"RGB"!==this.__state.space&&(r(this,t,n),this.__state.space="RGB"),this.__state[t]=e}})}functiono(e,t){Object.defineProperty(e,t,{get:function(){return"HSV"===this.__state.space?this.__state[t]:(s(this),this.__state[t])},set:function(e){"HSV"!==this.__state.space&&(s(this),this.__state.space="HSV"),this.__state[t]=e}})}functionr(e,t,n){if("HEX"===e.__state.space)e.__state[t]=l.component_from_hex(e.__state.hex,n);else{if("HSV"!==e.__state.space)throw"Corrupted color state";c.extend(e.__state,l.hsv_to_rgb(e.__state.h,e.__state.s,e.__state.v))}}functions(e){vart=l.rgb_to_hsv(e.r,e.g,e.b);c.extend(e.__state,{s:t.s,v:t.v}),c.isNaN(t.h)?c.isUndefined(e.__state.h)&&(e.__state.h=0):e.__state.h=t.h}vara=n(3),l=n(6),d=n(4),c=n(5),u=function(){if(this.__state=a.apply(this,arguments),this.__state===!1)throw"Failed to interpret color arguments";this.__state.a=this.__state.a||1};u.COMPONENTS=["r","g","b","h","s","v","hex","a"],c.extend(u.prototype,{toString:function(){returnd(this)},toOriginal:function(){returnthis.__state.conversion.write(this)}}),i(u.prototype,"r",2),i(u.prototype,"g",1),i(u.prototype,"b",0),o(u.prototype,"h"),o(u.prototype,"s"),o(u.prototype,"v"),Object.defineProperty(u.prototype,"a",{get:function(){returnthis.__state.a},set:function(e){this.__state.a=e}}),Object.defineProperty(u.prototype,"hex",{get:function(){return"HEX"!==!this.__state.space&&(this.__state.hex=l.rgb_to_hex(this.r,this.g,this.b)),this.__state.hex},set:function(e){this.__state.space="HEX",this.__state.hex=e}}),e.exports=u},function(e,t,n){vari,o,r=n(4),s=n(5),a=function(){o=!1;vare=arguments.length>1?s.toArray(arguments):arguments[0];returns.each(l,function(t){returnt.litmus(e)?(s.each(t.conversions,function(t,n){returni=t.read(e),o===!1&&i!==!1?(o=i,i.conversionName=n,i.conversion=t,s.BREAK):void0}),s.BREAK):void0}),o},l=[{litmus:s.isString,conversions:{THREE_CHAR_HEX:{read:function(e){vart=e.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i);returnnull===t?!1:{space:"HEX",hex:parseInt("0x"+t[1].toString()+t[1].toString()+t[2].toString()+t[2].toString()+t[3].toString()+t[3].toString())}},write:r},SIX_CHAR_HEX:{read:function(e){vart=e.match(/^#([A-F0-9]{6})$/i);returnnull===t?!1:{space:"HEX",hex:parseInt("0x"+t[1].toString())}},write:r},CSS_RGB:{read:function(e){vart=e.match(/^rgb\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);returnnull===t?!1:{space:"RGB",r:parseFloat(t[1]),g:parseFloat(t[2]),b:parseFloat(t[3])}},write:r},CSS_RGBA:{read:function(e){vart=e.match(/^rgba\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\,\s*(.+)\s*\)/);returnnull===t?!1:{space:"RGB",r:parseFloat(t[1]),g:parseFloat(t[2]),b:parseFloat(t[3]),a:parseFloat(t[4])}},write:r}}},{litmus:s.isNumber,conversions:{HEX:{read:function(e){return{space:"HEX",hex:e,conversionName:"HEX"}},write:function(e){returne.hex}}}},{litmus:s.isArray,conversions:{RGB_ARRAY:{read:function(e){return3!=e.length?!1:{space:"RGB",r:e[0],g:e[1],b:e[2]}},write:function(e){return[e.r,e.g,e.b]}},RGBA_ARRAY:{read:function(e){return4!=e.length?!1:{space:"RGB",r:e[0],g:e[1],b:e[2],a:e[3]}},write:function(e){return[e.r,e.g,e.b,e.a]}}}},{litmus:s.isObject,conversions:{RGBA_OBJ:{read:function(e)