!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.dat=t():e.dat=t()}(this,function(){return function(e){function t(n){if(o[n])return o[n].exports;var i=o[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=o(1),l=n(i);t.default=l.default,e.exports=t.default},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=o(2),l=n(i),a=o(6),r=n(a),d=o(3),s=n(d),u=o(7),f=n(u),_=o(8),c=n(_),p=o(10),h=n(p),b=o(11),m=n(b),g=o(12),x=n(g),v=o(13),y=n(v),w=o(14),C=n(w),E=o(15),k=n(E),S=o(16),A=n(S),O=o(17),T=n(O),R=o(18),L=n(R),N=o(19),M=n(N),j=o(20),H=n(j),V=o(9),B=n(V),D=o(21),F=n(D);t.default={color:{Color:l.default,math:r.default,interpret:s.default},controllers:{Controller:f.default,BooleanController:c.default,OptionController:h.default,StringController:m.default,NumberController:x.default,NumberControllerBox:y.default,NumberControllerSlider:C.default,FunctionController:k.default,ColorController:A.default,BgColorController:T.default,NgColorController:L.default,HSVColorController:H.default,GtColorController:M.default},dom:{dom:B.default},gui:{GUI:F.default},GUI:F.default},e.exports=t.default},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t,o){Object.defineProperty(e,t,{get:function(){return"RGB"===this.__state.space?this.__state[t]:(h.recalculateRGB(this,t,o),this.__state[t])},set:function(e){"RGB"!==this.__state.space&&(h.recalculateRGB(this,t,o),this.__state.space="RGB"),this.__state[t]=e}})}function a(e,t){Object.defineProperty(e,t,{get:function(){return"HSV"===this.__state.space?this.__state[t]:(h.recalculateHSV(this),this.__state[t])},set:function(e){"HSV"!==this.__state.space&&(h.recalculateHSV(this),this.__state.space="HSV"),this.__state[t]=e}})}t.__esModule=!0;var r=o(3),d=n(r),s=o(6),u=n(s),f=o(4),_=n(f),c=o(5),p=n(c),h=function(){function e(){if(i(this,e),this.__state=d.default.apply(this,arguments),this.__state===!1)throw new Error("Failed to interpret color arguments");this.__state.a=this.__state.a||1}return e.prototype.toString=function(){return(0,_.default)(this)},e.prototype.toHexString=function(){return(0,_.default)(this,!0)},e.prototype.toOriginal=function(){return this.__state.conversion.write(this)},e}();h.recalculateRGB=function(e,t,o){if("HEX"===e.__state.space)e.__state[t]=u.default.component_from_hex(e.__state.hex,o);else{if("HSV"!==e.__state.space)throw new Error("Corrupted color state");p.default.extend(e.__state,u.default.hsv_to_rgb(e.__state.h,e.__state.s,e.__state.v))}},h.recalculateHSV=function(e){var t=u.default.rgb_to_hsv(e.r,e.g,e.b);p.default.extend(e.__state,{s:t.s,v:t.v}),p.default.isNaN(t.h)?p.default.isUndefined(e.__state.h)&&(e.__state.h=0):e.__state.h=t.h},h.COMPONENTS=["r","g","b","h","s","v","hex","a"],l(h.prototype,"r",2),l(h.prototype,"g",1),l(h.prototype,"b",0),a(h.prototype,"h"),a(h.prototype,"s"),a(h.prototype,"v"),Object.defineProperty(h.prototype,"a",{get:function(){return this.__state.a},set:function(e){this.__state.a=e}}),Object.defineProperty(h.prototype,"hex",{get:function(){return"HEX"!==!this.__state.space&&(this.__state.hex=u.default.rgb_to_hex(this.r,this.g,this.b)),this.__state.hex},set:function(e){this.__state.space="HEX",this.__state.hex=e}}),t.default=h,e.exports=t.default},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=o(4),l=n(i),a=o(5),r=n(a),d=[{litmus:r.default.isString,conversions:{THREE_CHAR_HEX:{read:function(e){var t=e.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i);return null!==t&&{space:"HEX",hex:parseInt("0x"+t[1].toString()+t[1].toString()+t[2].toString()+t[2].toString()+t[3].toString()+t[3].toString(),0)}},write:l.default},SIX_CHAR_HEX:{read:function(e){var t=e.match(/^#([A-F0-9]{6})$/i);return null!==t&&{space:"HEX",hex:parseInt("0x"+t[1].toString(),0)}},write:l.default},CSS_RGB:{read:function(e){var t=e.match(/^rgb\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);return null!==t&&{space:"RGB",r:parseFloat(t[1]),g:parseFloat(t[2]),b:parseFloat(t[3])}},write:l.default},CSS_RGBA:{read:function(e){var t=e.match(/^rgba\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);return null!==t&&{space:"RGB",r:parseFloat(t[1]),g:parseFloat(t[2]),b:parseFloat(t[3]),a:parseFloat(t[4])}},write:l.default}}},{litmus:r.default.isNumber,conversions:{HEX:{read:function(e){return{space:"HEX",hex:e,conversionName:"HEX"}},write:function(e){return e.hex}}}},{litmus:r.default.isArray,conversions:{RGB_ARRAY:{read:function(e){return 3===e.length&&{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){return 4===e.length&&{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:r.default.isObject,conversions:{RGBA_OBJ:{read:function(e){return!!(r.default.isNumber(e.r)&&r.default.isNumber(e.g)&&r.default.isNumber(e.b)&&r.default.isNumber(e.a))&&{space:"RGB",r:e.r,g:e.g,b:e.b,a:e.a}},write:function(e){return{r:e.r,g:e.g,b:e.b,a:e.a}}},RGB_OBJ:{read:function(e){return!!(r.default.isNumber(e.r)&&r.default.isNumber(e.g)&&r.default.isNumber(e.b))&&{space:"RGB",r:e.r,g:e.g,b:e.b}},write:function(e){return{r:e.r,g:e.g,b:e.b}}},HSVA_OBJ:{read:function(e){return!!(r.default.isNumber(e.h)&&r.default.isNumber(e.s)&&r.default.isNumber(e.v)&&r.default.isNumber(e.a))&&{space:"HSV",h:e.h,s:e.s,v:e.v,a:e.a}},write:function(e){return{h:e.h,s:e.s,v:e.v,a:e.a}}},HSV_OBJ:{read:function(e){return!!(r.default.isNumber(e.h)&&r.default.isNumber(e.s)&&r.default.isNumber(e.v))&&{space:"HSV",h:e.h,s:e.s,v:e.v}},write:function(e){return{h:e.h,s:e.s,v:e.v}}}}}],s=void 0,u=void 0,f=function(){u=!1;var e=arguments.length>1?r.default.toArray(arguments):arguments[0];return r.default.each(d,function(t){if(t.litmus(e))return r.default.each(t.conversions,function(t,o){if(s=t.read(e),u===!1&&s!==!1)return u=s,s.conversionName=o,s.conversion=t,r.default.BREAK}),r.default.BREAK}),u};t.default=f,e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e,t){var o=e.__state.conversionName.toString(),n=Math.round(e.r),i=Math.round(e.g),l=Math.round(e.b),a=e.a,r=Math.round(e.h),d=e.s.toFixed(1),s=e.v.toFixed(1);if(t||"THREE_CHAR_HEX"===o||"SIX_CHAR_HEX"===o){for(var u=e.hex.toString(16);u.length<6;)u="0"+u;return"#"+u}return"CSS_RGB"===o?"rgb("+n+","+i+","+l+")":"CSS_RGBA"===o?"rgba("+n+","+i+","+l+","+a+")":"HEX"===o?"0x"+e.hex.toString(16):"RGB_ARRAY"===o?"["+n+","+i+","+l+"]":"RGBA_ARRAY"===o?"["+n+","+i+","+l+","+a+"]":"RGB_OBJ"===o?"{r:"+n+",g:"+i+",b:"+l+"}":"RGBA_OBJ"===o?"{r:"+n+",g:"+i+",b:"+l+",a:"+a+"}":"HSV_OBJ"===o?"{h:"+r+",s:"+d+",v:"+s+"}":"HSVA_OBJ"===o?"{h:"+r+",s:"+d+",v:"+s+",a:"+a+"}":"unknown format"},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0;var o=Array.prototype.forEach,n=Array.prototype.slice,i={BREAK:{},extend:function(e){return this.each(n.call(arguments,1),function(t){var o=this.isObject(t)?Object.keys(t):[];o.forEach(function(o){this.isUndefined(t[o])||(e[o]=t[o])}.bind(this))},this),e},defaults:function(e){return this.each(n.call(arguments,1),function(t){var o=this.isObject(t)?Object.keys(t):[];o.forEach(function(o){this.isUndefined(e[o])&&(e[o]=t[o])}.bind(this))},this),e},compose:function(){var e=n.call(arguments);return function(){for(var t=n.call(arguments),o=e.length-1;o>=0;o--)t=[e[o].apply(this,t)];return t[0]}},each:function(e,t,n){if(e)if(o&&e.forEach&&e.forEach===o)e.forEach(t,n);else if(e.length===e.length+0){var i=void 0,l=void 0;for(i=0,l=e.length;i>8*t&255},hex_with_component:function(e,t,n){return n<<(o=8*t)|e&~(255<-1?t.length-t.indexOf(".")-1:0}t.__esModule=!0;var d=o(7),s=n(d),u=o(5),f=n(u),_=function(e){function t(o,n,a){i(this,t);var d=l(this,e.call(this,o,n)),s=a||{};return d.__min=s.min,d.__max=s.max,d.__step=s.step,f.default.isUndefined(d.__step)?0===d.initialValue?d.__impliedStep=1:d.__impliedStep=Math.pow(10,Math.floor(Math.log(Math.abs(d.initialValue))/Math.LN10))/10:d.__impliedStep=d.__step,d.__precision=r(d.__impliedStep),d}return a(t,e),t.prototype.setValue=function(t){var o=t;return void 0!==this.__min&&othis.__max&&(o=this.__max),void 0!==this.__step&&o%this.__step!==0&&(o=Math.round(o/this.__step)*this.__step),e.prototype.setValue.call(this,o)},t.prototype.min=function(e){return this.__min=e,this},t.prototype.max=function(e){return this.__max=e,this},t.prototype.step=function(e){return this.__step=e,this.__impliedStep=e,this.__precision=r(e),this},t}(s.default);t.default=_,e.exports=t.default},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function r(e,t){var o=Math.pow(10,t);return Math.round(e*o)/o}t.__esModule=!0;var d=o(12),s=n(d),u=o(9),f=n(u),_=o(5),c=n(_),p=function(e){function t(o,n,a){function r(){var e=parseFloat(b.__input.value);c.default.isNaN(e)||b.setValue(e)}function d(){b.__onFinishChange&&b.__onFinishChange.call(b,b.getValue())}function s(){d()}function u(e){var t=m-e.clientY;b.setValue(b.getValue()+t*b.__impliedStep),m=e.clientY}function _(){f.default.unbind(window,"mousemove",u),f.default.unbind(window,"mouseup",_),d()}function p(e){f.default.bind(window,"mousemove",u),f.default.bind(window,"mouseup",_),m=e.clientY}i(this,t);var h=l(this,e.call(this,o,n,a));h.__truncationSuspended=!1;var b=h,m=void 0;return h.__input=document.createElement("input"),h.__input.setAttribute("type","text"),f.default.bind(h.__input,"change",r),f.default.bind(h.__input,"blur",s),f.default.bind(h.__input,"mousedown",p),f.default.bind(h.__input,"keydown",function(e){13===e.keyCode&&(b.__truncationSuspended=!0,this.blur(),b.__truncationSuspended=!1,d())}),h.updateDisplay(),h.domElement.appendChild(h.__input),h}return a(t,e),t.prototype.updateDisplay=function(){return this.__input.value=this.__truncationSuspended?this.getValue():r(this.getValue(),this.__precision),e.prototype.updateDisplay.call(this)},t}(s.default);t.default=p,e.exports=t.default},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function r(e,t,o,n,i){return n+(i-n)*((e-t)/(o-t))}t.__esModule=!0;var d=o(12),s=n(d),u=o(9),f=n(u),_=function(e){function t(o,n,a,d,s){function u(e){document.activeElement.blur(),f.default.bind(window,"mousemove",_),f.default.bind(window,"mouseup",c),_(e)}function _(e){e.preventDefault();var t=h.__background.getBoundingClientRect();return h.setValue(r(e.clientX,t.left,t.right,h.__min,h.__max)),!1}function c(){f.default.unbind(window,"mousemove",_),f.default.unbind(window,"mouseup",c),h.__onFinishChange&&h.__onFinishChange.call(h,h.getValue())}i(this,t);var p=l(this,e.call(this,o,n,{min:a,max:d,step:s})),h=p;return p.__background=document.createElement("div"),p.__foreground=document.createElement("div"),f.default.bind(p.__background,"mousedown",u),f.default.addClass(p.__background,"slider"),f.default.addClass(p.__foreground,"slider-fg"),p.updateDisplay(),p.__background.appendChild(p.__foreground),p.domElement.appendChild(p.__background),p}return a(t,e),t.prototype.updateDisplay=function(){var t=(this.getValue()-this.__min)/(this.__max-this.__min);return this.__foreground.style.width=100*t+"%",e.prototype.updateDisplay.call(this)},t}(s.default);t.default=_,e.exports=t.default},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var r=o(7),d=n(r),s=o(9),u=n(s),f=function(e){function t(o,n,a){i(this,t);var r=l(this,e.call(this,o,n)),d=r;return r.__button=document.createElement("div"),r.__button.innerHTML=void 0===a?"Fire":a,u.default.bind(r.__button,"click",function(e){return e.preventDefault(),d.fire(),!1}),u.default.addClass(r.__button,"button"),r.domElement.appendChild(r.__button),r}return a(t,e),t.prototype.fire=function(){this.__onChange&&this.__onChange.call(this),this.getValue().call(this.object),this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue())},t}(d.default);t.default=f,e.exports=t.default},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function r(e,t,o,n){e.style.background="",g.default.each(v,function(i){e.style.cssText+="background: "+i+"linear-gradient("+t+", "+o+" 0%, "+n+" 100%); "})}function d(e){e.style.background="",e.style.cssText+="background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);",e.style.cssText+="background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);"}t.__esModule=!0;var s=o(7),u=n(s),f=o(9),_=n(f),c=o(2),p=n(c),h=o(3),b=n(h),m=o(5),g=n(m),x=function(e){function t(o,n){function a(e){h(e),_.default.bind(window,"mousemove",h),_.default.bind(window,"mouseup",s)}function s(){_.default.unbind(window,"mousemove",h),_.default.unbind(window,"mouseup",s),c()}function u(){var e=(0,b.default)(this.value);e!==!1?(v.__color.__state=e,v.setValue(v.__color.toOriginal())):this.value=v.__color.toString()}function f(){_.default.unbind(window,"mousemove",m),_.default.unbind(window,"mouseup",f),c()}function c(){v.__onFinishChange&&v.__onFinishChange.call(v,v.__color.toOriginal())}function h(e){e.preventDefault();var t=v.__saturation_field.getBoundingClientRect(),o=(e.clientX-t.left)/(t.right-t.left),n=1-(e.clientY-t.top)/(t.bottom-t.top);return n>1?n=1:n<0&&(n=0),o>1?o=1:o<0&&(o=0),v.__color.v=n,v.__color.s=o,v.setValue(v.__color.toOriginal()),!1}function m(e){e.preventDefault();var t=v.__hue_field.getBoundingClientRect(),o=1-(e.clientY-t.top)/(t.bottom-t.top);return o>1?o=1:o<0&&(o=0),v.__color.h=360*o,v.setValue(v.__color.toOriginal()),!1}i(this,t);var x=l(this,e.call(this,o,n));x.__color=new p.default(x.getValue()),x.__temp=new p.default(0);var v=x;x.domElement=document.createElement("div"),_.default.makeSelectable(x.domElement,!1),x.__selector=document.createElement("div"),x.__selector.className="selector",x.__saturation_field=document.createElement("div"),x.__saturation_field.className="saturation-field",x.__field_knob=document.createElement("div"),x.__field_knob.className="field-knob",x.__field_knob_border="2px solid ",x.__hue_knob=document.createElement("div"),x.__hue_knob.className="hue-knob",x.__hue_field=document.createElement("div"),x.__hue_field.className="hue-field",x.__input=document.createElement("input"),x.__input.type="text",x.__input_textShadow="0 1px 1px ",_.default.bind(x.__input,"keydown",function(e){13===e.keyCode&&u.call(this)}),_.default.bind(x.__input,"blur",u),_.default.bind(x.__selector,"mousedown",function(){_.default.addClass(this,"drag").bind(window,"mouseup",function(){_.default.removeClass(v.__selector,"drag")})});var y=document.createElement("div");return g.default.extend(x.__selector.style,{width:"122px",height:"102px",padding:"3px",backgroundColor:"#222",boxShadow:"0px 1px 3px rgba(0,0,0,0.3)"}),g.default.extend(x.__field_knob.style,{position:"absolute",width:"12px",height:"12px",border:x.__field_knob_border+(x.__color.v<.5?"#fff":"#000"),boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",borderRadius:"12px",zIndex:1}),g.default.extend(x.__hue_knob.style,{position:"absolute",width:"15px",height:"2px",borderRight:"4px solid #fff",zIndex:1}),g.default.extend(x.__saturation_field.style,{width:"100px",height:"100px",border:"1px solid #555",marginRight:"3px",display:"inline-block",cursor:"pointer"}),g.default.extend(y.style,{width:"100%",height:"100%",background:"none"}),r(y,"top","rgba(0,0,0,0)","#000"),g.default.extend(x.__hue_field.style,{width:"15px",height:"100px",border:"1px solid #555",cursor:"ns-resize",position:"absolute",top:"3px",right:"3px"}),d(x.__hue_field),g.default.extend(x.__input.style,{outline:"none",textAlign:"center",color:"#fff",border:0,fontWeight:"bold",textShadow:x.__input_textShadow+"rgba(0,0,0,0.7)"}),_.default.bind(x.__saturation_field,"mousedown",a),_.default.bind(x.__field_knob,"mousedown",a),_.default.bind(x.__hue_field,"mousedown",function(e){m(e),_.default.bind(window,"mousemove",m),_.default.bind(window,"mouseup",f)}),x.__saturation_field.appendChild(y),x.__selector.appendChild(x.__field_knob),x.__selector.appendChild(x.__saturation_field),x.__selector.appendChild(x.__hue_field),x.__hue_field.appendChild(x.__hue_knob),x.domElement.appendChild(x.__input),x.domElement.appendChild(x.__selector),x.updateDisplay(),x}return a(t,e),t.prototype.setValue=function(e){return this.object[this.property]=e,this.__onChange&&this.__onChange.call(this,e),this.updateDisplay(),this},t.prototype.getValue=function(){return this.object[this.property]},t.prototype.updateDisplay=function(){var e=(0,b.default)(this.getValue());if(e!==!1){var t=!1;g.default.each(p.default.COMPONENTS,function(o){if(!g.default.isUndefined(e[o])&&!g.default.isUndefined(this.__color.__state[o])&&e[o]!==this.__color.__state[o])return t=!0,{}},this),t&&g.default.extend(this.__color.__state,e)}g.default.extend(this.__temp.__state,this.__color.__state),this.__temp.a=1;var o=this.__color.v<.5||this.__color.s>.5?255:0,n=255-o;g.default.extend(this.__field_knob.style,{marginLeft:100*this.__color.s-7+"px",marginTop:100*(1-this.__color.v)-7+"px",backgroundColor:this.__temp.toHexString(),border:this.__field_knob_border+"rgb("+o+","+o+","+o+")"}),this.__hue_knob.style.marginTop=100*(1-this.__color.h/360)+"px",this.__temp.s=1,this.__temp.v=1,r(this.__saturation_field,"left","#fff",this.__temp.toHexString()),this.__input.value=this.__color.toString(),g.default.extend(this.__input.style,{backgroundColor:this.__color.toHexString(),color:"rgb("+o+","+o+","+o+")",textShadow:this.__input_textShadow+"rgba("+n+","+n+","+n+",.7)"})},t}(u.default),v=["-moz-","-o-","-webkit-","-ms-",""];t.default=x,e.exports=t.default},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0 }}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function r(e,t,o,n){e.style.background="",g.default.each(v,function(i){e.style.cssText+="background: "+i+"linear-gradient("+t+", "+o+" 0%, "+n+" 100%); "})}function d(e){e.style.background="",e.style.cssText+="background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);",e.style.cssText+="background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);"}t.__esModule=!0;var s=o(7),u=n(s),f=o(9),_=n(f),c=o(2),p=n(c),h=o(3),b=n(h),m=o(5),g=n(m),x=function(e){function t(o,n){function a(e){C(e),_.default.bind(window,"mousemove",C),_.default.bind(window,"mouseup",u)}function s(e){w(e),_.default.bind(window,"mousemove",w),_.default.bind(window,"mouseup",f)}function u(){_.default.unbind(window,"mousemove",C),_.default.unbind(window,"mouseup",u),v()}function f(){_.default.unbind(window,"mousemove",w),_.default.unbind(window,"mouseup",f),y()}function c(){var e=(0,b.default)(this.value);e!==!1?(A.__color.__state=e,A.setValue(A.__color.toOriginal())):this.value=A.__color.toString()}function h(){var e=(0,b.default)(this.value);e!==!1?(A.__color2.__state=e,A.setValue2(A.__color2.toOriginal())):this.value=A.__color2.toString()}function m(){_.default.unbind(window,"mousemove",k),_.default.unbind(window,"mouseup",m),v()}function x(){_.default.unbind(window,"mousemove",E),_.default.unbind(window,"mouseup",x),y()}function v(){A.__onFinishChange&&A.__onFinishChange.call(A,A.__color2.toOriginal())}function y(){A.__onFinishChange&&A.__onFinishChange.call(A,A.__color.toOriginal())}function w(e){e.preventDefault();var t=A.__saturation_field2.getBoundingClientRect(),o=(e.clientX-t.left)/(t.right-t.left),n=1-(e.clientY-t.top)/(t.bottom-t.top);return n>1?n=1:n<0&&(n=0),o>1?o=1:o<0&&(o=0),A.__color2.v=n,A.__color2.s=o,A.setValue2(A.__color2.toOriginal()),!1}function C(e){e.preventDefault();var t=A.__saturation_field.getBoundingClientRect(),o=(e.clientX-t.left)/(t.right-t.left),n=1-(e.clientY-t.top)/(t.bottom-t.top);return n>1?n=1:n<0&&(n=0),o>1?o=1:o<0&&(o=0),A.__color.v=n,A.__color.s=o,A.setValue(A.__color.toOriginal()),!1}function E(e){e.preventDefault();var t=A.__hue_field2.getBoundingClientRect(),o=1-(e.clientY-t.top)/(t.bottom-t.top);return o>1?o=1:o<0&&(o=0),A.__color2.h=360*o,A.setValue2(A.__color2.toOriginal()),!1}function k(e){e.preventDefault();var t=A.__hue_field.getBoundingClientRect(),o=1-(e.clientY-t.top)/(t.bottom-t.top);return o>1?o=1:o<0&&(o=0),A.__color.h=360*o,A.setValue(A.__color.toOriginal()),!1}i(this,t);var S=l(this,e.call(this,o,n));S.__color=new p.default(S.getValue()),S.value2="#FFee00",S.object[S.property+"bg"]&&(S.value2=S.object[S.property+"bg"]),S.__color2=new p.default(S.value2),S.__temp=new p.default(0),S.__temp2=new p.default(0);var A=S;S.domElement=document.createElement("div"),_.default.makeSelectable(S.domElement,!1),S.__selector=document.createElement("div"),S.__saturation_field=document.createElement("div"),S.__saturation_field.className="saturation-field",S.__saturation_field2=document.createElement("div"),S.__saturation_field2.className="saturation-field",S.__field_knob=document.createElement("div"),S.__field_knob.className="field-knob",S.__field_knob_border="2px solid ",S.__field_knob2=document.createElement("div"),S.__field_knob2.className="field-knob",S.__field_knob_border2="2px solid ",S.__hue_knob=document.createElement("div"),S.__hue_knob.className="hue-knob",S.__hue_knob2=document.createElement("div"),S.__hue_knob2.className="hue-knob",S.__hue_field=document.createElement("div"),S.__hue_field.className="hue-field",S.__hue_field2=document.createElement("div"),S.__hue_field2.className="hue-field",S.__input=document.createElement("input"),S.__input.type="text",S.__input_textShadow="0 1px 1px ",S.__input2=document.createElement("input"),S.__input2.type="text",S.__input_textShadow2="0 1px 1px ",_.default.bind(S.__input,"keydown",function(e){13===e.keyCode&&c.call(this)}),_.default.bind(S.__input2,"keydown",function(e){13===e.keyCode&&h.call(this)}),_.default.bind(S.__input,"blur",c),_.default.bind(S.__input2,"blur",h);var O=document.createElement("div"),T=document.createElement("div");return g.default.extend(S.__selector.style,{width:"200px",height:"102px",marginTop:"22px",backgroundColor:"#222",boxShadow:"0px 1px 3px rgba(0,0,0,0.3)"}),g.default.extend(S.__field_knob.style,{position:"absolute",width:"12px",height:"12px",border:S.__field_knob_border+(S.__color.v<.5?"#fff":"#000"),boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",borderRadius:"12px",zIndex:1}),g.default.extend(S.__field_knob2.style,{position:"absolute",left:"100",width:"12px",height:"12px",border:S.__field_knob_border2+(S.__color2.v<.5?"#fff":"#000"),boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",borderRadius:"12px",zIndex:1}),g.default.extend(S.__hue_knob.style,{position:"absolute",width:"15px",height:"2px",left:"-15px",borderRight:"4px solid #fff",zIndex:1}),g.default.extend(S.__hue_knob2.style,{position:"absolute",width:"15px",height:"2px",left:"9px",borderRight:"4px solid #fff",zIndex:1}),g.default.extend(S.__saturation_field.style,{width:"100px",height:"100px",border:"1px solid #555",marginRight:"3px",display:"inline-block",cursor:"pointer"}),g.default.extend(S.__saturation_field2.style,{left:"100px",width:"100px",height:"100px",border:"1px solid #555",marginRight:"3px",display:"inline-block",position:"absolute",top:"22px",cursor:"pointer"}),g.default.extend(O.style,{width:"100%",height:"100%",background:"none"}),g.default.extend(T.style,{width:"100%",height:"100%",background:"none"}),r(O,"top","rgba(0,0,0,0)","#000"),r(T,"top","rgba(0,0,0,0)","#000"),g.default.extend(S.__hue_field.style,{width:"20px",height:"100px",border:"1px solid #555",cursor:"ns-resize",position:"absolute",top:"3px",marginTop:"19px",left:"-20px"}),g.default.extend(S.__hue_field2.style,{width:"20px",height:"100px",border:"1px solid #555",cursor:"ns-resize",position:"absolute",top:"3px",marginTop:"19px",left:"200px"}),d(S.__hue_field),d(S.__hue_field2),g.default.extend(S.__input.style,{outline:"none",textAlign:"center",color:"#fff",border:0,left:"-20px",position:"absolute",fontWeight:"bold",width:"120px",textShadow:S.__input_textShadow+"rgba(0,0,0,0.7)"}),g.default.extend(S.__input2.style,{outline:"none",textAlign:"center",color:"#fff",border:0,left:"100px",position:"absolute",fontWeight:"bold",width:"120px",textShadow:S.__input_textShadow+"rgba(0,0,0,0.7)"}),_.default.bind(S.__saturation_field,"mousedown",a),_.default.bind(S.__saturation_field2,"mousedown",s),_.default.bind(S.__field_knob,"mousedown",a),_.default.bind(S.__field_knob2,"mousedown",s),_.default.bind(S.__hue_field,"mousedown",function(e){k(e),_.default.bind(window,"mousemove",k),_.default.bind(window,"mouseup",m)}),_.default.bind(S.__hue_field2,"mousedown",function(e){E(e),_.default.bind(window,"mousemove",E),_.default.bind(window,"mouseup",x)}),S.__saturation_field.appendChild(O),S.__selector.appendChild(S.__field_knob),S.__selector.appendChild(S.__field_knob2),S.__selector.appendChild(S.__saturation_field),S.__saturation_field2.appendChild(T),S.__selector.appendChild(S.__saturation_field2),S.__selector.appendChild(S.__hue_field),S.__hue_field.appendChild(S.__hue_knob),S.__hue_field2.appendChild(S.__hue_knob2),S.__selector.appendChild(S.__hue_field2),S.domElement.appendChild(S.__input2),S.domElement.appendChild(S.__input),S.domElement.appendChild(S.__selector),S.updateDisplay(),S}return a(t,e),t.prototype.setValue=function(e){return this.object[this.property]=e,this.__onChange&&this.__onChange.call(this,e),this.updateDisplay(),this},t.prototype.setValue2=function(e){return this.value2=e,this.object[this.property+"bg"]&&(this.object[this.property+"bg"]=this.value2),this.__onChange&&this.__onChange.call(this,e),this.updateDisplay(),this},t.prototype.getValue=function(){return this.object[this.property]},t.prototype.updateDisplay=function(){var e=(0,b.default)(this.getValue());if(e!==!1){var t=!1;g.default.each(p.default.COMPONENTS,function(o){if(!g.default.isUndefined(e[o])&&!g.default.isUndefined(this.__color.__state[o])&&e[o]!==this.__color.__state[o])return t=!0,{}},this),t&&g.default.extend(this.__color.__state,e)}g.default.extend(this.__temp.__state,this.__color.__state),g.default.extend(this.__temp2.__state,this.__color2.__state),this.__temp.a=1,this.__temp2.a=1;var o=this.__color.v<.5||this.__color.s>.5?255:0,n=255-o,i=this.__color2.v<.5||this.__color2.s>.5?255:0,l=255-i;g.default.extend(this.__field_knob.style,{marginLeft:100*this.__color.s-7+"px",marginTop:100*(1-this.__color.v)-7+"px",backgroundColor:this.__temp.toHexString(),border:this.__field_knob_border+"rgb("+o+","+o+","+o+")"}),g.default.extend(this.__field_knob2.style,{marginLeft:100*this.__color2.s-7+"px",marginTop:100*(1-this.__color2.v)-7+"px",backgroundColor:this.__temp2.toHexString(),border:this.__field_knob_border2+"rgb("+i+","+i+","+i+")"}),this.__hue_knob.style.marginTop=100*(1-this.__color.h/360)+"px",this.__hue_knob2.style.marginTop=100*(1-this.__color2.h/360)+"px",this.__temp.s=1,this.__temp.v=1,this.__temp2.s=1,this.__temp2.v=1,r(this.__saturation_field,"left","#fff",this.__temp.toHexString()),r(this.__saturation_field2,"left","#fff",this.__temp2.toHexString()),this.__input.value=this.__color.toString(),this.__input2.value=this.__color2.toString(),g.default.extend(this.__input.style,{backgroundColor:this.__color.toHexString(),color:"rgb("+o+","+o+","+o+")",textShadow:this.__input_textShadow+"rgba("+n+","+n+","+n+",.7)"}),g.default.extend(this.__input2.style,{backgroundColor:this.__color2.toHexString(),color:"rgb("+i+","+i+","+i+")",textShadow:this.__input_textShadow+"rgba("+l+","+l+","+l+",.7)"})},t}(u.default),v=["-moz-","-o-","-webkit-","-ms-",""];t.default=x,e.exports=t.default},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function r(e,t,o,n){e.style.background="",g.default.each(v,function(i){e.style.cssText+="background: "+i+"linear-gradient("+t+", "+o+" 0%, "+n+" 100%); "})}function d(e){e.style.background="",e.style.cssText+="background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);",e.style.cssText+="background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);"}t.__esModule=!0;var s=o(7),u=n(s),f=o(9),_=n(f),c=o(2),p=n(c),h=o(3),b=n(h),m=o(5),g=n(m),x=function(e){function t(o,n){function a(e){h(e),_.default.bind(window,"mousemove",h),_.default.bind(window,"mouseup",s)}function s(){_.default.unbind(window,"mousemove",h),_.default.unbind(window,"mouseup",s),c()}function u(){var e=(0,b.default)(this.value);e!==!1?(v.__color.__state=e,v.setValue(v.__color.toOriginal())):this.value=v.__color.toString()}function f(){_.default.unbind(window,"mousemove",m),_.default.unbind(window,"mouseup",f),c()}function c(){v.__onFinishChange&&v.__onFinishChange.call(v,v.__color.toOriginal())}function h(e){e.preventDefault();var t=v.__saturation_field.getBoundingClientRect(),o=(e.clientX-t.left)/(t.right-t.left),n=1-(e.clientY-t.top)/(t.bottom-t.top);return n>1?n=1:n<0&&(n=0),o>1?o=1:o<0&&(o=0),v.__color.v=n,v.__color.s=o,v.setValue(v.__color.toOriginal()),!1}function m(e){e.preventDefault();var t=v.__hue_field.getBoundingClientRect(),o=1-(e.clientY-t.top)/(t.bottom-t.top);return o>1?o=1:o<0&&(o=0),v.__color.h=360*o,v.setValue(v.__color.toOriginal()),!1}i(this,t);var x=l(this,e.call(this,o,n));x.__color=new p.default(x.getValue()),x.__temp=new p.default(0);var v=x;x.domElement=document.createElement("div"),_.default.makeSelectable(x.domElement,!1),x.__selector=document.createElement("div"),x.__saturation_field=document.createElement("div"),x.__saturation_field.className="saturation-field",x.__field_knob=document.createElement("div"),x.__field_knob.className="field-knob",x.__field_knob_border="2px solid ",x.__hue_knob=document.createElement("div"),x.__hue_knob.className="hue-knob",x.__hue_field=document.createElement("div"),x.__hue_field.className="hue-field",x.__input=document.createElement("input"),x.__input.type="text",x.__input_textShadow="0 1px 1px ",_.default.bind(x.__input,"keydown",function(e){13===e.keyCode&&u.call(this)}),_.default.bind(x.__input,"blur",u),_.default.bind(x.__selector,"mousedown",function(){_.default.addClass(this,"drag").bind(window,"mouseup",function(){_.default.removeClass(v.__selector,"drag")})});var y=document.createElement("div");return g.default.extend(x.__selector.style,{width:"120px",height:"102px",marginTop:"22px",padding:"3px",backgroundColor:"#222",boxShadow:"0px 1px 3px rgba(0,0,0,0.3)"}),g.default.extend(x.__field_knob.style,{position:"absolute",width:"12px",height:"12px",border:x.__field_knob_border+(x.__color.v<.5?"#fff":"#000"),boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",borderRadius:"12px",zIndex:1}),g.default.extend(x.__hue_knob.style,{position:"absolute",width:"15px",height:"2px",left:"9px",borderRight:"4px solid #fff",zIndex:1}),g.default.extend(x.__saturation_field.style,{width:"100px",height:"100px",border:"1px solid #555",marginRight:"3px",display:"inline-block",position:"absolute",top:"22px",cursor:"pointer"}),g.default.extend(y.style,{width:"100%",height:"100%",background:"none"}),r(y,"top","rgba(0,0,0,0)","#000"),g.default.extend(x.__hue_field.style,{width:"20px",height:"100px",border:"1px solid #555",cursor:"ns-resize",position:"absolute",top:"3px",marginTop:"19px",left:"100px"}),d(x.__hue_field),g.default.extend(x.__input.style,{outline:"none",textAlign:"center",color:"#fff",border:0,left:"0",position:"absolute",width:"120px",fontWeight:"bold",textShadow:x.__input_textShadow+"rgba(0,0,0,0.7)"}),_.default.bind(x.__saturation_field,"mousedown",a),_.default.bind(x.__field_knob,"mousedown",a),_.default.bind(x.__hue_field,"mousedown",function(e){m(e),_.default.bind(window,"mousemove",m),_.default.bind(window,"mouseup",f)}),x.__saturation_field.appendChild(y),x.__selector.appendChild(x.__field_knob),x.__selector.appendChild(x.__saturation_field),x.__selector.appendChild(x.__hue_field),x.__hue_field.appendChild(x.__hue_knob),x.domElement.appendChild(x.__input),x.domElement.appendChild(x.__selector),x.updateDisplay(),x}return a(t,e),t.prototype.setValue=function(e){return this.object[this.property]=e,this.__onChange&&this.__onChange.call(this,e),this.updateDisplay(),this},t.prototype.getValue=function(){return this.object[this.property]},t.prototype.updateDisplay=function(){var e=(0,b.default)(this.getValue());if(e!==!1){var t=!1;g.default.each(p.default.COMPONENTS,function(o){if(!g.default.isUndefined(e[o])&&!g.default.isUndefined(this.__color.__state[o])&&e[o]!==this.__color.__state[o])return t=!0,{}},this),t&&g.default.extend(this.__color.__state,e)}g.default.extend(this.__temp.__state,this.__color.__state),this.__temp.a=1;var o=this.__color.v<.5||this.__color.s>.5?255:0,n=255-o;g.default.extend(this.__field_knob.style,{marginLeft:100*this.__color.s-7+"px",marginTop:100*(1-this.__color.v)-7+"px",backgroundColor:this.__temp.toHexString(),border:this.__field_knob_border+"rgb("+o+","+o+","+o+")"}),this.__hue_knob.style.marginTop=100*(1-this.__color.h/360)+"px",this.__temp.s=1,this.__temp.v=1,r(this.__saturation_field,"left","#fff",this.__temp.toHexString()),this.__input.value=this.__color.toString(),g.default.extend(this.__input.style,{backgroundColor:this.__color.toHexString(),color:"rgb("+o+","+o+","+o+")",textShadow:this.__input_textShadow+"rgba("+n+","+n+","+n+",.7)"})},t}(u.default),v=["-moz-","-o-","-webkit-","-ms-",""];t.default=x,e.exports=t.default},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function r(e,t,o,n){e.style.background="",g.default.each(v,function(i){e.style.cssText+="background: "+i+"linear-gradient("+t+", "+o+" 0%, "+n+" 100%); "})}function d(e){e.style.background="",e.style.cssText+="background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);",e.style.cssText+="background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);"}t.__esModule=!0;var s=o(7),u=n(s),f=o(9),_=n(f),c=o(2),p=n(c),h=o(3),b=n(h),m=o(5),g=n(m),x=function(e){function t(o,n){function a(e){C(e),_.default.bind(window,"mousemove",C),_.default.bind(window,"mouseup",u)}function s(e){w(e),_.default.bind(window,"mousemove",w),_.default.bind(window,"mouseup",f)}function u(){_.default.unbind(window,"mousemove",C),_.default.unbind(window,"mouseup",u),v()}function f(){_.default.unbind(window,"mousemove",w),_.default.unbind(window,"mouseup",f),y()}function c(){var e=(0,b.default)(this.value);e!==!1?(A.__color.__state=e,A.setValue(A.__color.toOriginal())):this.value=A.__color.toString()}function h(){var e=(0,b.default)(this.value);e!==!1?(A.__color2.__state=e,A.setValue2(A.__color2.toOriginal())):this.value=A.__color2.toString()}function m(){_.default.unbind(window,"mousemove",k),_.default.unbind(window,"mouseup",m),v()}function x(){_.default.unbind(window,"mousemove",E),_.default.unbind(window,"mouseup",x),y()}function v(){A.__onFinishChange&&A.__onFinishChange.call(A,A.__color2.toOriginal())}function y(){A.__onFinishChange&&A.__onFinishChange.call(A,A.__color.toOriginal())}function w(e){e.preventDefault();var t=A.__saturation_field2.getBoundingClientRect(),o=(e.clientX-t.left)/(t.right-t.left),n=1-(e.clientY-t.top)/(t.bottom-t.top);return n>1?n=1:n<0&&(n=0),o>1?o=1:o<0&&(o=0),A.__color2.v=n,A.__color2.s=o,A.setValue2(A.__color2.toOriginal()),!1}function C(e){e.preventDefault();var t=A.__saturation_field.getBoundingClientRect(),o=(e.clientX-t.left)/(t.right-t.left),n=1-(e.clientY-t.top)/(t.bottom-t.top);return n>1?n=1:n<0&&(n=0),o>1?o=1:o<0&&(o=0),A.__color.v=n,A.__color.s=o,A.setValue(A.__color.toOriginal()),!1}function E(e){e.preventDefault();var t=A.__hue_field2.getBoundingClientRect(),o=1-(e.clientY-t.top)/(t.bottom-t.top);return o>1?o=1:o<0&&(o=0),A.__color2.h=360*o,A.setValue2(A.__color2.toOriginal()),!1}function k(e){e.preventDefault();var t=A.__hue_field.getBoundingClientRect(),o=1-(e.clientY-t.top)/(t.bottom-t.top);return o>1?o=1:o<0&&(o=0),A.__color.h=360*o,A.setValue(A.__color.toOriginal()),!1}i(this,t);var S=l(this,e.call(this,o,n));S.__color=new p.default(S.getValue()),S.value2="#FFee00",S.object[S.property+"bg"]&&(S.value2=S.object[S.property+"bg"]),S.__color2=new p.default(S.value2),S.__temp=new p.default(0),S.__temp2=new p.default(0);var A=S;S.domElement=document.createElement("div"),_.default.makeSelectable(S.domElement,!1),S.__selector=document.createElement("div"),S.__saturation_field=document.createElement("div"),S.__saturation_field.className="saturation-field",S.__saturation_field2=document.createElement("div"),S.__saturation_field2.className="saturation-field",S.__field_knob=document.createElement("div"),S.__field_knob.className="field-knob",S.__field_knob_border="2px solid ",S.__field_knob2=document.createElement("div"),S.__field_knob2.className="field-knob",S.__field_knob_border2="2px solid ",S.__hue_knob=document.createElement("div"),S.__hue_knob.className="hue-knob",S.__hue_knob2=document.createElement("div"),S.__hue_knob2.className="hue-knob",S.__hue_field=document.createElement("div"),S.__hue_field.className="hue-field",S.__hue_field2=document.createElement("div"),S.__hue_field2.className="hue-field",S.__input=document.createElement("input"),S.__input.type="text",S.__input_textShadow="0 1px 1px ",S.__input2=document.createElement("input"),S.__input2.type="text",S.__input_textShadow2="0 1px 1px ",_.default.bind(S.__input,"keydown",function(e){13===e.keyCode&&c.call(this)}),_.default.bind(S.__input2,"keydown",function(e){13===e.keyCode&&h.call(this)}),_.default.bind(S.__input,"blur",c),_.default.bind(S.__input2,"blur",h);var O=document.createElement("div"),T=document.createElement("div");return g.default.extend(S.__selector.style,{width:"200px",height:"102px",marginTop:"22px",backgroundColor:"#222",boxShadow:"0px 1px 3px rgba(0,0,0,0.3)"}),g.default.extend(S.__field_knob.style,{position:"absolute",width:"12px",height:"12px",border:S.__field_knob_border+(S.__color.v<.5?"#fff":"#000"),boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",borderRadius:"12px",zIndex:1}),g.default.extend(S.__field_knob2.style,{position:"absolute",left:"100",width:"12px",height:"12px",border:S.__field_knob_border2+(S.__color2.v<.5?"#fff":"#000"),boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",borderRadius:"12px",zIndex:1}),g.default.extend(S.__hue_knob.style,{position:"absolute",width:"15px",height:"2px",left:"-15px",borderRight:"4px solid #fff",zIndex:1}),g.default.extend(S.__hue_knob2.style,{position:"absolute",width:"15px",height:"2px",left:"9px",borderRight:"4px solid #fff",zIndex:1}),g.default.extend(S.__saturation_field.style,{width:"100px",height:"100px",border:"1px solid #555",marginRight:"3px",display:"inline-block",cursor:"pointer"}),g.default.extend(S.__saturation_field2.style,{left:"100px",width:"100px",height:"100px",border:"1px solid #555",marginRight:"3px",display:"inline-block",position:"absolute",top:"22px",cursor:"pointer"}),g.default.extend(O.style,{width:"100%",height:"100%",background:"none"}),g.default.extend(T.style,{width:"100%",height:"100%",background:"none"}),r(O,"top","rgba(0,0,0,0)","#000"),r(T,"top","rgba(0,0,0,0)","#000"),g.default.extend(S.__hue_field.style,{width:"20px",height:"100px",border:"1px solid #555",cursor:"ns-resize",position:"absolute",top:"3px",marginTop:"19px",left:"-20px"}),g.default.extend(S.__hue_field2.style,{width:"20px",height:"100px",border:"1px solid #555",cursor:"ns-resize",position:"absolute",top:"3px",marginTop:"19px",left:"200px"}),d(S.__hue_field),d(S.__hue_field2),g.default.extend(S.__input.style,{outline:"none",textAlign:"center",color:"#fff",border:0,left:"-20px",position:"absolute",fontWeight:"bold",width:"120px",textShadow:S.__input_textShadow+"rgba(0,0,0,0.7)"}),g.default.extend(S.__input2.style,{outline:"none",textAlign:"center",color:"#fff",border:0,left:"100px",position:"absolute",fontWeight:"bold",width:"120px",textShadow:S.__input_textShadow+"rgba(0,0,0,0.7)"}),_.default.bind(S.__saturation_field,"mousedown",a),_.default.bind(S.__saturation_field2,"mousedown",s),_.default.bind(S.__field_knob,"mousedown",a),_.default.bind(S.__field_knob2,"mousedown",s),_.default.bind(S.__hue_field,"mousedown",function(e){k(e),_.default.bind(window,"mousemove",k),_.default.bind(window,"mouseup",m)}),_.default.bind(S.__hue_field2,"mousedown",function(e){E(e),_.default.bind(window,"mousemove",E),_.default.bind(window,"mouseup",x)}),S.__saturation_field.appendChild(O),S.__selector.appendChild(S.__field_knob),S.__selector.appendChild(S.__field_knob2),S.__selector.appendChild(S.__saturation_field),S.__saturation_field2.appendChild(T),S.__selector.appendChild(S.__saturation_field2),S.__selector.appendChild(S.__hue_field),S.__hue_field.appendChild(S.__hue_knob),S.__hue_field2.appendChild(S.__hue_knob2),S.__selector.appendChild(S.__hue_field2),S.domElement.appendChild(S.__input2),S.domElement.appendChild(S.__input),S.domElement.appendChild(S.__selector),S.updateDisplay(),S}return a(t,e),t.prototype.setValue=function(e){return this.object[this.property]=e,this.__onChange&&this.__onChange.call(this,e),this.updateDisplay(),this},t.prototype.setValue2=function(e){return this.value2=e,this.object[this.property+"bg"]&&(this.object[this.property+"bg"]=this.value2),this.__onChange&&this.__onChange.call(this,e),this.updateDisplay(),this},t.prototype.getValue=function(){return this.object[this.property]},t.prototype.updateDisplay=function(){var e=(0,b.default)(this.getValue());if(e!==!1){var t=!1;g.default.each(p.default.COMPONENTS,function(o){if(!g.default.isUndefined(e[o])&&!g.default.isUndefined(this.__color.__state[o])&&e[o]!==this.__color.__state[o])return t=!0,{}},this),t&&g.default.extend(this.__color.__state,e)}g.default.extend(this.__temp.__state,this.__color.__state),g.default.extend(this.__temp2.__state,this.__color2.__state),this.__temp.a=1,this.__temp2.a=1;var o=this.__color.v<.5||this.__color.s>.5?255:0,n=255-o,i=this.__color2.v<.5||this.__color2.s>.5?255:0,l=255-i;g.default.extend(this.__field_knob.style,{marginLeft:100*this.__color.s-7+"px",marginTop:100*(1-this.__color.v)-7+"px",backgroundColor:this.__temp.toHexString(),border:this.__field_knob_border+"rgb("+o+","+o+","+o+")"}),g.default.extend(this.__field_knob2.style,{marginLeft:100*this.__color2.s-7+"px",marginTop:100*(1-this.__color2.v)-7+"px",backgroundColor:this.__temp2.toHexString(),border:this.__field_knob_border2+"rgb("+i+","+i+","+i+")"}),this.__hue_knob.style.marginTop=100*(1-this.__color.h/360)+"px",this.__hue_knob2.style.marginTop=100*(1-this.__color2.h/360)+"px",this.__temp.s=1,this.__temp.v=1,this.__temp2.s=1,this.__temp2.v=1,r(this.__saturation_field,"left","#fff",this.__temp.toHexString()),r(this.__saturation_field2,"left","#fff",this.__temp2.toHexString()),this.__input.value=this.__color.toString(),this.__input2.value=this.__color2.toString(),g.default.extend(this.__input.style,{backgroundColor:this.__color.toHexString(),color:"rgb("+o+","+o+","+o+")",textShadow:this.__input_textShadow+"rgba("+n+","+n+","+n+",.7)"}),g.default.extend(this.__input2.style,{backgroundColor:this.__color2.toHexString(),color:"rgb("+i+","+i+","+i+")",textShadow:this.__input_textShadow+"rgba("+l+","+l+","+l+",.7)"})},t}(u.default),v=["-moz-","-o-","-webkit-","-ms-",""];t.default=x,e.exports=t.default},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function r(e,t,o,n){e.style.background="",g.default.each(v,function(i){e.style.cssText+="background: "+i+"linear-gradient("+t+", "+o+" 0%, "+n+" 100%); "})}function d(e){e.style.background="",e.style.cssText+="background: -moz-linear-gradient(right, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);",e.style.cssText+="background: -webkit-linear-gradient(right, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: -o-linear-gradient(right, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: -ms-linear-gradient(right, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: linear-gradient(right, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);"}t.__esModule=!0;var s=o(7),u=n(s),f=o(9),_=n(f),c=o(2),p=n(c),h=o(3),b=n(h),m=o(5),g=n(m),x=function(e){function t(o,n){function a(){_.default.unbind(window,"mousemove",m),_.default.unbind(window,"mouseup",a),f()}function r(){_.default.unbind(window,"mousemove",c),_.default.unbind(window,"mouseup",r),f()}function s(){_.default.unbind(window,"mousemove",h),_.default.unbind(window,"mouseup",s),f()}function u(){var e=(0,b.default)(this.value);e!==!1?(v.__color.__state=e,v.setValue(v.__color.toOriginal())):this.value=v.__color.toString()}function f(){v.__onFinishChange&&v.__onFinishChange.call(v,v.__color.toOriginal())}function c(e){var t=v.__hsv_field.getBoundingClientRect(),o=(e.clientX-t.left)/(t.right-t.left);return e.preventDefault(),v.__color.s=Math.min(Math.max(o,0),1),v.setValue(v.__color.toOriginal()),!1}function h(e){var t=v.__hsv_field.getBoundingClientRect(),o=(e.clientX-t.left)/(t.right-t.left);return e.preventDefault(),v.__color.v=Math.min(Math.max(o,0),1),v.setValue(v.__color.toOriginal()),!1}function m(e){var t=v.__hsv_field.getBoundingClientRect(),o=(e.clientX-t.left)/(t.right-t.left);return e.preventDefault(),v.__color.h=360*Math.min(Math.max(o,0),1),v.setValue(v.__color.toOriginal()),!1}i(this,t);var x=l(this,e.call(this,o,n));x.__color=new p.default(x.getValue()),x.__temp=new p.default(0),x.__temp2=new p.default(0);var v=x;x.domElement=document.createElement("div"),_.default.makeSelectable(x.domElement,!1),x.__selector=document.createElement("div"),x.__field_knob=document.createElement("div"),x.__field_knob.className="field-knob",x.__field_knob_border="2px solid ",x.__field_knob2=document.createElement("div"),x.__field_knob2.className="field-knob",x.__field_knob_border2="2px solid ",x.__field_knob3=document.createElement("div"),x.__field_knob3.className="field-knob",x.__field_knob_border3="2px solid ",x.__hsv_field=document.createElement("div"),x.__hsv_field.className="hue-field",x.__hsv_field2=document.createElement("div"),x.__hsv_field2.className="hue-field",x.__hsv_field3=document.createElement("div"),x.__hsv_field3.className="hue-field",x.__hsv_fieldLabel=document.createElement("Label"),x.__hsv_fieldLabel.innerHTML="H:",x.__hsv_fieldLabel2=document.createElement("Label"),x.__hsv_fieldLabel2.innerHTML="S:",x.__hsv_fieldLabel3=document.createElement("Label"),x.__hsv_fieldLabel3.innerHTML="V:",x.__input=document.createElement("input"),x.__input.type="text",x.__input_textShadow="0 1px 1px ",_.default.bind(x.__input,"keydown",function(e){13===e.keyCode&&u.call(this); }),_.default.bind(x.__input,"blur",u);var y=document.createElement("div");return g.default.extend(x.__selector.style,{width:"256px",height:"10px",marginTop:"22px",backgroundColor:"#222",boxShadow:"0px 1px 3px rgba(0,0,0,0.3)"}),g.default.extend(x.__field_knob.style,{position:"absolute",width:"12px",height:"12px",border:x.__field_knob_border+(x.__color.v<.5?"#fff":"#000"),boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",borderRadius:"12px",top:"-2",zIndex:1}),g.default.extend(x.__field_knob2.style,{position:"absolute",width:"12px",height:"12px",border:x.__field_knob_border+(x.__color.v<.5?"#fff":"#000"),boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",borderRadius:"12px",top:"-2",zIndex:1}),g.default.extend(x.__field_knob3.style,{position:"absolute",width:"12px",height:"12px",border:x.__field_knob_border+(x.__color.v<.5?"#fff":"#000"),boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",borderRadius:"12px",top:"-2",zIndex:1}),g.default.extend(y.style,{width:"100%",height:"100%",background:"none"}),g.default.extend(x.__hsv_field.style,{width:"256px",height:"20px",border:"1px solid #555",position:"absolute",top:"30px",left:"0px"}),g.default.extend(x.__hsv_field2.style,{width:"256px",height:"20px",border:"1px solid #555",position:"absolute",top:"55px",left:"0px"}),g.default.extend(x.__hsv_field3.style,{width:"256px",height:"20px",border:"1px solid #555",position:"absolute",top:"80px",left:"0px"}),d(x.__hsv_field),d(x.__hsv_field2),d(x.__hsv_field3),g.default.extend(x.__input.style,{outline:"none",textAlign:"center",color:"#fff",border:0,left:"0px",position:"absolute",fontWeight:"bold",width:"256px",textShadow:x.__input_textShadow+"rgba(0,0,0,0.7)"}),g.default.extend(x.__hsv_fieldLabel.style,{outline:"none",textAlign:"left",color:"#fff",border:0,left:"-70px",position:"absolute",font:"bold 12px Courier",width:"50px",textShadow:x.__input_textShadow+"rgba(0,0,0,0.7)"}),g.default.extend(x.__hsv_fieldLabel2.style,{outline:"none",textAlign:"left",color:"#fff",border:0,left:"-70px",position:"absolute",font:"bold 12px Courier",width:"50px",textShadow:x.__input_textShadow+"rgba(0,0,0,0.7)"}),g.default.extend(x.__hsv_fieldLabel3.style,{outline:"none",textAlign:"left",color:"#fff",border:0,left:"-70px",position:"absolute",font:"bold 12px Courier",width:"50px",textShadow:x.__input_textShadow+"rgba(0,0,0,0.7)"}),_.default.bind(x.__hsv_field,"mousedown",function(e){m(e),_.default.bind(window,"mousemove",m),_.default.bind(window,"mouseup",a)}),_.default.bind(x.__hsv_field2,"mousedown",function(e){c(e),_.default.bind(window,"mousemove",c),_.default.bind(window,"mouseup",r)}),_.default.bind(x.__hsv_field3,"mousedown",function(e){h(e),_.default.bind(window,"mousemove",h),_.default.bind(window,"mouseup",s)}),g.default.extend(x.domElement.style,{height:"100px"}),x.__hsv_field.appendChild(x.__field_knob),x.__hsv_field2.appendChild(x.__field_knob2),x.__hsv_field3.appendChild(x.__field_knob3),x.__selector.appendChild(x.__hsv_field),x.__selector.appendChild(x.__hsv_field2),x.__selector.appendChild(x.__hsv_field3),x.__hsv_field.appendChild(x.__hsv_fieldLabel),x.__hsv_field2.appendChild(x.__hsv_fieldLabel2),x.__hsv_field3.appendChild(x.__hsv_fieldLabel3),x.domElement.appendChild(x.__input),x.domElement.appendChild(x.__selector),x.updateDisplay(),x}return a(t,e),t.prototype.updateDisplay=function(){var e=(0,b.default)(this.getValue());if(e!==!1){var t=!1;g.default.each(p.default.COMPONENTS,function(o){if(!g.default.isUndefined(e[o])&&!g.default.isUndefined(this.__color.__state[o])&&e[o]!==this.__color.__state[o])return t=!0,{}},this),t&&g.default.extend(this.__color.__state,e)}g.default.extend(this.__temp.__state,this.__color.__state),this.__temp.a=1,this.__temp2.a=1;var o=this.__color.v<.5||this.__color.s>.5?255:0,n=255-o;g.default.extend(this.__field_knob.style,{marginLeft:parseInt(this.__color.h/360*256-7,10)+"px",marginTop:"5px",border:this.__field_knob_border+"rgb(255,255,255)"}),g.default.extend(this.__field_knob2.style,{marginLeft:256*this.__color.s-7+"px",marginTop:"5px",border:this.__field_knob_border+"rgb("+o+","+o+","+o+")"}),g.default.extend(this.__field_knob3.style,{marginLeft:256*this.__color.v-7+"px",marginTop:"5px",border:this.__field_knob_border+"rgb("+o+","+o+","+o+")"}),this.__hsv_fieldLabel.innerHTML="H: "+parseInt(this.__color.h,10),this.__hsv_fieldLabel2.innerHTML="S: "+parseInt(100*this.__color.s,10),this.__hsv_fieldLabel3.innerHTML="V: "+parseInt(100*this.__color.v,10),this.__temp.h=this.__color.h,this.__temp.v=this.__color.v,this.__temp.s=1,this.__temp2.s=this.__color.s,this.__temp2.h=this.__color.h,this.__temp2.v=1,r(this.__hsv_field2,"left","#fff",this.__temp.toHexString()),r(this.__hsv_field3,"left","#000",this.__temp2.toHexString()),this.__input.value=this.__color.toString(),g.default.extend(this.__input.style,{backgroundColor:this.__color.toHexString(),color:"rgb("+o+","+o+","+o+")",textShadow:this.__input_textShadow+"rgba("+n+","+n+","+n+",.7)"})},t}(u.default),v=["-moz-","-o-","-webkit-","-ms-",""];t.default=x,e.exports=t.default},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t,o){var n=document.createElement("li");return t&&n.appendChild(t),o?e.__ul.insertBefore(n,o):e.__ul.appendChild(n),e.onResize(),n}function l(e,t){var o=e.__preset_select[e.__preset_select.selectedIndex];t?o.innerHTML=o.value+"*":o.innerHTML=o.value}function a(e,t,o){if(o.__li=t,o.__gui=e,oe.default.extend(o,{options:function(t){if(arguments.length>1){var n=o.__li.nextElementSibling;return o.remove(),_(e,o.object,o.property,{before:n,factoryArgs:[oe.default.toArray(arguments)]})}if(oe.default.isArray(t)||oe.default.isObject(t)){var i=o.__li.nextElementSibling;return o.remove(),_(e,o.object,o.property,{before:i,factoryArgs:[t]})}},name:function(e){return o.__li.firstElementChild.firstElementChild.innerHTML=e,o},listen:function(){return o.__gui.listen(o),o},remove:function(){return o.__gui.remove(o),o}}),o instanceof D.default){var n=new V.default(o.object,o.property,{min:o.__min,max:o.__max,step:o.__step});oe.default.each(["updateDisplay","onChange","onFinishChange","step"],function(e){var t=o[e],i=n[e];o[e]=n[e]=function(){var e=Array.prototype.slice.call(arguments);return i.apply(n,e),t.apply(o,e)}}),ee.default.addClass(t,"has-slider"),o.domElement.insertBefore(n.domElement,o.domElement.firstElementChild)}else if(o instanceof V.default){var i=function(t){if(oe.default.isNumber(o.__min)&&oe.default.isNumber(o.__max)){var n=o.__li.firstElementChild.firstElementChild.innerHTML,i=o.__gui.__listening.indexOf(o)>-1;o.remove();var l=_(e,o.object,o.property,{before:o.__li.nextElementSibling,factoryArgs:[o.__min,o.__max,o.__step]});return l.name(n),i&&l.listen(),l}return t};o.min=oe.default.compose(i,o.min),o.max=oe.default.compose(i,o.max)}else o instanceof N.default?(ee.default.bind(t,"click",function(){ee.default.fakeEvent(o.__checkbox,"click")}),ee.default.bind(o.__checkbox,"click",function(e){e.stopPropagation()})):o instanceof j.default?(ee.default.bind(t,"click",function(){ee.default.fakeEvent(o.__button,"click")}),ee.default.bind(t,"mouseover",function(){ee.default.addClass(o.__button,"hover")}),ee.default.bind(t,"mouseout",function(){ee.default.removeClass(o.__button,"hover")})):o instanceof P.default?(ee.default.addClass(t,"color"),o.updateDisplay=oe.default.compose(function(e){return t.style.borderLeftColor=o.__color.toString(),e},o.updateDisplay),o.updateDisplay()):o instanceof I.default?(ee.default.addClass(t,"color"),o.updateDisplay=oe.default.compose(function(e){return t.style.borderLeftColor=o.__color.toString(),e},o.updateDisplay),o.updateDisplay()):o instanceof G.default?(ee.default.addClass(t,"color"),o.updateDisplay=oe.default.compose(function(e){return t.style.borderLeftColor=o.__color.toString(),e},o.updateDisplay),o.updateDisplay()):o instanceof Y.default?(ee.default.addClass(t,"color"),o.updateDisplay=oe.default.compose(function(e){return t.style.borderLeftColor=o.__color.toString(),e},o.updateDisplay),o.updateDisplay()):o instanceof K.default&&(ee.default.addClass(t,"color"),o.updateDisplay=oe.default.compose(function(e){return t.style.borderLeftColor=o.__color.toString(),e},o.updateDisplay),o.updateDisplay());o.setValue=oe.default.compose(function(t){return e.getRoot().__preset_select&&o.isModified()&&l(e.getRoot(),!0),t},o.setValue)}function r(e,t){var o=e.getRoot(),n=o.__rememberedObjects.indexOf(t.object);if(n!==-1){var i=o.__rememberedObjectIndecesToControllers[n];if(void 0===i&&(i={},o.__rememberedObjectIndecesToControllers[n]=i),i[t.property]=t,o.load&&o.load.remembered){var l=o.load.remembered,a=void 0;if(l[e.preset])a=l[e.preset];else{if(!l[de])return;a=l[de]}if(a[n]&&void 0!==a[n][t.property]){var r=a[n][t.property];t.initialValue=r,t.setValue(r)}}}}function d(e,t,o,n){if(void 0===t[o])throw new Error('Object "'+t+'" has no property "'+o+'"');var l=void 0;if(n.color)l=new I.default(t,o);else{var d=[t,o].concat(n.factoryArgs);l=O.default.apply(e,d)}n.before instanceof R.default&&(n.before=n.before.__li),r(e,l),ee.default.addClass(l.domElement,"c");var s=document.createElement("span");ee.default.addClass(s,"property-name"),s.innerHTML=l.property;var u=document.createElement("div");u.appendChild(s),u.appendChild(l.domElement);var f=i(e,u,n.before);return ee.default.addClass(f,he.CLASS_CONTROLLER_ROW),l instanceof P.default?ee.default.addClass(f,"color"):l instanceof I.default?ee.default.addClass(f,"color"):ee.default.addClass(f,w(l.getValue())),a(e,f,l),e.__controllers.push(l),l}function s(e,t,o,n){if(void 0===t[o])throw new Error('Object "'+t+'" has no property "'+o+'"');var l=void 0;if(n.color)l=new G.default(t,o);else{var d=[t,o].concat(n.factoryArgs);l=O.default.apply(e,d)}n.before instanceof R.default&&(n.before=n.before.__li),r(e,l),ee.default.addClass(l.domElement,"c");var s=document.createElement("span");ee.default.addClass(s,"property-name"),s.innerHTML=l.property;var u=document.createElement("div");u.appendChild(s),u.appendChild(l.domElement);var f=i(e,u,n.before);return ee.default.addClass(f,he.CLASS_CONTROLLER_ROW),l instanceof P.default?ee.default.addClass(f,"color"):l instanceof G.default?ee.default.addClass(f,"color"):ee.default.addClass(f,w(l.getValue())),a(e,f,l),e.__controllers.push(l),l}function u(e,t,o,n){if(void 0===t[o])throw new Error('Object "'+t+'" has no property "'+o+'"');var l=void 0;if(n.color)l=new K.default(t,o);else{var d=[t,o].concat(n.factoryArgs);l=O.default.apply(e,d)}n.before instanceof R.default&&(n.before=n.before.__li),r(e,l),ee.default.addClass(l.domElement,"c");var s=document.createElement("span");ee.default.addClass(s,"property-name"),s.innerHTML=l.property;var u=document.createElement("div");u.appendChild(s),u.appendChild(l.domElement);var f=i(e,u,n.before);return ee.default.addClass(f,he.CLASS_CONTROLLER_ROW),l instanceof P.default?ee.default.addClass(f,"color"):l instanceof G.default?ee.default.addClass(f,"color"):ee.default.addClass(f,w(l.getValue())),a(e,f,l),e.__controllers.push(l),l}function f(e,t,o,n){if(void 0===t[o])throw new Error('Object "'+t+'" has no property "'+o+'"');var l=void 0;if(n.color)l=new Y.default(t,o);else{var d=[t,o].concat(n.factoryArgs);l=O.default.apply(e,d)}n.before instanceof R.default&&(n.before=n.before.__li),r(e,l),ee.default.addClass(l.domElement,"c");var s=document.createElement("span");ee.default.addClass(s,"property-name"),s.innerHTML=l.property;var u=document.createElement("div");u.appendChild(s),u.appendChild(l.domElement);var f=i(e,u,n.before);return ee.default.addClass(f,he.CLASS_CONTROLLER_ROW),l instanceof P.default?ee.default.addClass(f,"color"):l instanceof Y.default?ee.default.addClass(f,"color"):ee.default.addClass(f,w(l.getValue())),a(e,f,l),e.__controllers.push(l),l}function _(e,t,o,n){if(void 0===t[o])throw new Error('Object "'+t+'" has no property "'+o+'"');var l=void 0;if(n.color)l=new P.default(t,o);else{var d=[t,o].concat(n.factoryArgs);l=O.default.apply(e,d)}n.before instanceof R.default&&(n.before=n.before.__li),r(e,l),ee.default.addClass(l.domElement,"c");var s=document.createElement("span");ee.default.addClass(s,"property-name"),s.innerHTML=l.property;var u=document.createElement("div");u.appendChild(s),u.appendChild(l.domElement);var f=i(e,u,n.before);return ee.default.addClass(f,he.CLASS_CONTROLLER_ROW),l instanceof P.default?ee.default.addClass(f,"color"):l instanceof I.default?ee.default.addClass(f,"color"):ee.default.addClass(f,w(l.getValue())),a(e,f,l),e.__controllers.push(l),l}function c(e,t){return document.location.href+"."+t}function p(e,t,o){var n=document.createElement("option");n.innerHTML=t,n.value=t,e.__preset_select.appendChild(n),o&&(e.__preset_select.selectedIndex=e.__preset_select.length-1)}function h(e,t){t.style.display=e.useLocalStorage?"block":"none"}function b(e){var t=e.__save_row=document.createElement("li");ee.default.addClass(e.domElement,"has-save"),e.__ul.insertBefore(t,e.__ul.firstChild),ee.default.addClass(t,"save-row");var o=document.createElement("span");o.innerHTML=" ",ee.default.addClass(o,"button gears");var n=document.createElement("span");n.innerHTML="Save",ee.default.addClass(n,"button"),ee.default.addClass(n,"save");var i=document.createElement("span");i.innerHTML="New",ee.default.addClass(i,"button"),ee.default.addClass(i,"save-as");var l=document.createElement("span");l.innerHTML="Revert",ee.default.addClass(l,"button"),ee.default.addClass(l,"revert");var a=e.__preset_select=document.createElement("select");if(e.load&&e.load.remembered?oe.default.each(e.load.remembered,function(t,o){p(e,o,o===e.preset)}):p(e,de,!1),ee.default.bind(a,"change",function(){for(var t=0;t0&&(e.preset=this.preset,e.remembered||(e.remembered={}),e.remembered[this.preset]=x(this)),e.folders={},oe.default.each(this.__folders,function(t,o){e.folders[o]=t.getSaveObject()}),e},save:function(){this.load.remembered||(this.load.remembered={}),this.load.remembered[this.preset]=x(this),l(this,!1),this.saveToLocalStorageIfPossible()},saveAs:function(e){this.load.remembered||(this.load.remembered={},this.load.remembered[de]=x(this,!0)),this.load.remembered[e]=x(this),this.preset=e,p(this,e,!0),this.saveToLocalStorageIfPossible()},revert:function(e){oe.default.each(this.__controllers,function(t){this.getRoot().load.remembered?r(e||this.getRoot(),t):t.setValue(t.initialValue),t.__onFinishChange&&t.__onFinishChange.call(t,t.getValue())},this),oe.default.each(this.__folders,function(e){e.revert(e)}),e||l(this.getRoot(),!1)},listen:function(e){var t=0===this.__listening.length;this.__listening.push(e),t&&y(this.__listening)},updateDisplay:function(){oe.default.each(this.__controllers,function(e){e.updateDisplay()}),oe.default.each(this.__folders,function(e){e.updateDisplay()})}}),t.default=he,e.exports=t.default},function(e,t){"use strict";e.exports={load:function(e,t){var o=t||document,n=o.createElement("link");n.type="text/css",n.rel="stylesheet",n.href=e,o.getElementsByTagName("head")[0].appendChild(n)},inject:function(e,t){var o=t||document,n=document.createElement("style");n.type="text/css",n.innerHTML=e;var i=o.getElementsByTagName("head")[0];try{i.appendChild(n)}catch(e){}}}},function(e,t){e.exports="
Here's the new load parameter for your GUI's constructor:
Automatically save values to localStorage on exit.
The values saved to localStorage will override those passed to dat.GUI's constructor. This makes it easier to work incrementally, but localStorage is fragile, and your friends may not see the same values you do.
"},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=o(10),l=n(i),a=o(13),r=n(a),d=o(14),s=n(d),u=o(11),f=n(u),_=o(15),c=n(_),p=o(8),h=n(p),b=o(5),m=n(b),g=function(e,t){var o=e[t];return m.default.isArray(arguments[2])||m.default.isObject(arguments[2])?new l.default(e,t,arguments[2]):m.default.isNumber(o)?m.default.isNumber(arguments[2])&&m.default.isNumber(arguments[3])?m.default.isNumber(arguments[4])?new s.default(e,t,arguments[2],arguments[3],arguments[4]):new s.default(e,t,arguments[2],arguments[3]):m.default.isNumber(arguments[4])?new r.default(e,t,{min:arguments[2],max:arguments[3],step:arguments[4]}):new r.default(e,t,{min:arguments[2],max:arguments[3]}):m.default.isString(o)?new f.default(e,t):m.default.isFunction(o)?new c.default(e,t,""):m.default.isBoolean(o)?new h.default(e,t):null};t.default=g,e.exports=t.default},function(e,t){"use strict";function o(e){setTimeout(e,1e3/60)}t.__esModule=!0,t.default=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||o,e.exports=t.default},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var l=o(9),a=n(l),r=o(5),d=n(r),s=function(){function e(){i(this,e),this.backgroundElement=document.createElement("div"),d.default.extend(this.backgroundElement.style,{backgroundColor:"rgba(0,0,0,0.8)",top:0,left:0,display:"none",zIndex:"1000",opacity:0,WebkitTransition:"opacity 0.2s linear",transition:"opacity 0.2s linear"}),a.default.makeFullscreen(this.backgroundElement),this.backgroundElement.style.position="fixed",this.domElement=document.createElement("div"),d.default.extend(this.domElement.style,{position:"fixed",display:"none",zIndex:"1001",opacity:0,WebkitTransition:"-webkit-transform 0.2s ease-out, opacity 0.2s linear",transition:"transform 0.2s ease-out, opacity 0.2s linear"}),document.body.appendChild(this.backgroundElement),document.body.appendChild(this.domElement);var t=this;a.default.bind(this.backgroundElement,"click",function(){t.hide()})}return e.prototype.show=function(){var e=this;this.backgroundElement.style.display="block",this.domElement.style.display="block",this.domElement.style.opacity=0,this.domElement.style.webkitTransform="scale(1.1)",this.layout(),d.default.defer(function(){e.backgroundElement.style.opacity=1,e.domElement.style.opacity=1,e.domElement.style.webkitTransform="scale(1)"})},e.prototype.hide=function e(){var t=this,e=function e(){t.domElement.style.display="none",t.backgroundElement.style.display="none",a.default.unbind(t.domElement,"webkitTransitionEnd",e),a.default.unbind(t.domElement,"transitionend",e),a.default.unbind(t.domElement,"oTransitionEnd",e)};a.default.bind(this.domElement,"webkitTransitionEnd",e),a.default.bind(this.domElement,"transitionend",e),a.default.bind(this.domElement,"oTransitionEnd",e),this.backgroundElement.style.opacity=0,this.domElement.style.opacity=0,this.domElement.style.webkitTransform="scale(1.1)"},e.prototype.layout=function(){this.domElement.style.left=window.innerWidth/2-a.default.getWidth(this.domElement)/2+"px",this.domElement.style.top=window.innerHeight/2-a.default.getHeight(this.domElement)/2+"px"},e}();t.default=s,e.exports=t.default},function(e,t,o){t=e.exports=o(28)(),t.push([e.id,".dg ul{list-style:none;margin:0;padding:0;width:100%;clear:both}.dg.ac{position:fixed;top:0;left:0;right:0;height:0;z-index:0}.dg:not(.ac) .main{overflow:hidden}.dg.main{transition:opacity .1s linear}.dg.main.taller-than-window{overflow-y:auto}.dg.main.taller-than-window .close-button{opacity:1;margin-top:-1px;border-top:1px solid #2c2c2c}.dg.main ul.closed .close-button{opacity:1!important}.dg.main .close-button.drag,.dg.main:hover .close-button{opacity:1}.dg.main .close-button{transition:opacity .1s linear;border:0;line-height:19px;height:20px;cursor:pointer;text-align:center;background-color:#000}.dg.main .close-button.close-top{position:relative}.dg.main .close-button.close-bottom{position:absolute}.dg.main .close-button:hover{background-color:#111}.dg.a{float:right;margin-right:15px;overflow-y:visible}.dg.a.has-save>ul.close-top{margin-top:0}.dg.a.has-save>ul.close-bottom{margin-top:27px}.dg.a.has-save>ul.closed{margin-top:0}.dg.a .save-row{top:0;z-index:1002}.dg.a .save-row.close-top{position:relative}.dg.a .save-row.close-bottom{position:fixed}.dg li{transition:height .1s ease-out;transition:overflow .1s linear}.dg li:not(.folder){cursor:auto;height:27px;line-height:27px;padding:0 4px 0 5px}.dg li.folder{padding:0;border-left:4px solid transparent}.dg li.title{margin-left:-4px}.dg .closed li:not(.title),.dg .closed ul li,.dg .closed ul li>*{height:0;overflow:hidden;border:0}.dg .cr{clear:both;padding-left:3px;height:27px;overflow:hidden}.dg .property-name{cursor:default;float:left;clear:left;width:40%;overflow:hidden;text-overflow:ellipsis}.dg .c{float:left;width:60%;height:125px;position:relative}.dg .c input[type=text]{border:0;margin-top:4px;padding:3px;width:100%;float:right}.dg .has-slider input[type=text]{width:30%;margin-left:0}.dg .slider{float:left;width:66%;margin-left:-5px;margin-right:0;height:19px;margin-top:4px}.dg .slider-fg{height:100%}.dg .c input[type=checkbox]{margin-top:7px}.dg .c select{margin-top:5px}.dg .cr.boolean,.dg .cr.boolean *,.dg .cr.function,.dg .cr.function *,.dg .cr.function .property-name{cursor:pointer}.dg .cr.color{overflow:visible}.dg .selector{display:none;position:absolute;margin-left:-9px;margin-top:23px;z-index:10}.dg .c:hover .selector,.dg .selector.drag{display:block}.dg li.save-row{padding:0}.dg li.save-row .button{display:inline-block;padding:0 6px}.dg.dialogue{background-color:#222;width:460px;padding:15px;font-size:13px;line-height:15px}#dg-new-constructor{padding:10px;color:#222;font-family:Monaco,monospace;font-size:10px;border:0;resize:none;box-shadow:inset 1px 1px 1px #888;word-wrap:break-word;margin:12px 0;display:block;width:440px;overflow-y:scroll;height:100px;position:relative}#dg-local-explain{display:none;font-size:11px;line-height:17px;border-radius:3px;background-color:#333;padding:8px;margin-top:10px}#dg-local-explain code{font-size:10px}#dat-gui-save-locally{display:none}.dg{color:#eee;font:11px Lucida Grande,sans-serif;text-shadow:0 -1px 0 #111}.dg.main::-webkit-scrollbar{width:5px;background:#1a1a1a}.dg.main::-webkit-scrollbar-corner{height:0;display:none}.dg.main::-webkit-scrollbar-thumb{border-radius:5px;background:#676767}.dg li:not(.folder){background:#1a1a1a;border-bottom:1px solid #2c2c2c}.dg li.save-row{line-height:25px;background:#dad5cb;border:0}.dg li.save-row select{margin-left:5px;width:108px}.dg li.save-row .button{margin-left:5px;margin-top:1px;border-radius:2px;font-size:9px;line-height:7px;padding:4px 4px 5px;background:#c5bdad;color:#fff;text-shadow:0 1px 0 #b0a58f;box-shadow:0 -1px 0 #b0a58f;cursor:pointer}.dg li.save-row .button.gears{background:#c5bdad url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQJJREFUeNpiYKAU/P//PwGIC/ApCABiBSAW+I8AClAcgKxQ4T9hoMAEUrxx2QSGN6+egDX+/vWT4e7N82AMYoPAx/evwWoYoSYbACX2s7KxCxzcsezDh3evFoDEBYTEEqycggWAzA9AuUSQQgeYPa9fPv6/YWm/Acx5IPb7ty/fw+QZblw67vDs8R0YHyQhgObx+yAJkBqmG5dPPDh1aPOGR/eugW0G4vlIoTIfyFcA+QekhhHJhPdQxbiAIguMBTQZrPD7108M6roWYDFQiIAAv6Aow/1bFwXgis+f2LUAynwoIaNcz8XNx3Dl7MEJUDGQpx9gtQ8YCueB+D26OECAAQDadt7e46D42QAAAABJRU5ErkJggg==) 2px 1px no-repeat;height:7px;width:8px}.dg li.save-row .button:hover{background-color:#bab19e;box-shadow:0 -1px 0 #b0a58f}.dg li.folder{border-bottom:0}.dg li.title{padding-left:16px;background:#000 url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==) 6px 10px no-repeat;cursor:pointer;border-bottom:1px solid hsla(0,0%,100%,.2)}.dg .closed li.title{background-image:url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlGIWqMCbWAEAOw==)}.dg .cr.boolean{border-left:3px solid #806787}.dg .cr.color{border-left:3px solid}.dg .cr.function{border-left:3px solid #e61d5f}.dg .cr.number{border-left:3px solid #2fa1d6}.dg .cr.number input[type=text]{color:#2fa1d6}.dg .cr.string{border-left:3px solid #1ed36f}.dg .cr.string input[type=text]{color:#1ed36f}.dg .cr.boolean:hover,.dg .cr.function:hover{background:#111}.dg .c input[type=text]{background:#303030;outline:none}.dg .c input[type=text]:hover{background:#3c3c3c}.dg .c input[type=text]:focus{background:#494949;color:#fff}.dg .c .slider{background:#303030;cursor:ew-resize}.dg .c .slider-fg{background:#2fa1d6;max-width:100%}.dg .c .slider:hover{background:#3c3c3c}.dg .c .slider:hover .slider-fg{background:#44abda}",""]); },function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t