{"version":3,"file":"dat.gui.module.js","sources":["../src/dat/color/toString.js","../src/dat/utils/common.js","../src/dat/color/interpret.js","../src/dat/color/math.js","../src/dat/color/Color.js","../src/dat/controllers/Controller.js","../src/dat/dom/dom.js","../src/dat/controllers/BooleanController.js","../src/dat/controllers/OptionController.js","../src/dat/controllers/StringController.js","../src/dat/controllers/NumberController.js","../src/dat/controllers/NumberControllerBox.js","../src/dat/controllers/NumberControllerSlider.js","../src/dat/controllers/FunctionController.js","../src/dat/controllers/ColorController.js","../src/dat/controllers/CustomController.js","../src/dat/utils/css.js","../src/dat/gui/saveDialogue.html.js","../src/dat/controllers/ControllerFactory.js","../src/dat/utils/requestAnimationFrame.js","../src/dat/dom/CenteredDiv.js","../src/dat/gui/GUI.js","../src/dat/index.js"],"sourcesContent":["/**\r\n * dat-gui JavaScript Controller Library\r\n * http://code.google.com/p/dat-gui\r\n *\r\n * Copyright 2011 Data Arts Team, Google Creative Lab\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\n\r\nexport default function(color, forceCSSHex) {\r\n const colorFormat = color.__state.conversionName.toString();\r\n\r\n const r = Math.round(color.r);\r\n const g = Math.round(color.g);\r\n const b = Math.round(color.b);\r\n const a = color.a;\r\n const h = Math.round(color.h);\r\n const s = color.s.toFixed(1);\r\n const v = color.v.toFixed(1);\r\n\r\n if (forceCSSHex || (colorFormat === 'THREE_CHAR_HEX') || (colorFormat === 'SIX_CHAR_HEX')) {\r\n let str = color.hex.toString(16);\r\n while (str.length < 6) {\r\n str = '0' + str;\r\n }\r\n return '#' + str;\r\n } else if (colorFormat === 'CSS_RGB') {\r\n return 'rgb(' + r + ',' + g + ',' + b + ')';\r\n } else if (colorFormat === 'CSS_RGBA') {\r\n return 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')';\r\n } else if (colorFormat === 'HEX') {\r\n return '0x' + color.hex.toString(16);\r\n } else if (colorFormat === 'RGB_ARRAY') {\r\n return '[' + r + ',' + g + ',' + b + ']';\r\n } else if (colorFormat === 'RGBA_ARRAY') {\r\n return '[' + r + ',' + g + ',' + b + ',' + a + ']';\r\n } else if (colorFormat === 'RGB_OBJ') {\r\n return '{r:' + r + ',g:' + g + ',b:' + b + '}';\r\n } else if (colorFormat === 'RGBA_OBJ') {\r\n return '{r:' + r + ',g:' + g + ',b:' + b + ',a:' + a + '}';\r\n } else if (colorFormat === 'HSV_OBJ') {\r\n return '{h:' + h + ',s:' + s + ',v:' + v + '}';\r\n } else if (colorFormat === 'HSVA_OBJ') {\r\n return '{h:' + h + ',s:' + s + ',v:' + v + ',a:' + a + '}';\r\n }\r\n\r\n return 'unknown format';\r\n}\r\n","/**\r\n * dat-gui JavaScript Controller Library\r\n * http://code.google.com/p/dat-gui\r\n *\r\n * Copyright 2011 Data Arts Team, Google Creative Lab\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\n\r\nconst ARR_EACH = Array.prototype.forEach;\r\nconst ARR_SLICE = Array.prototype.slice;\r\n\r\n/**\r\n * Band-aid methods for things that should be a lot easier in JavaScript.\r\n * Implementation and structure inspired by underscore.js\r\n * http://documentcloud.github.com/underscore/\r\n */\r\n\r\nconst Common = {\r\n BREAK: {},\r\n\r\n extend: function(target) {\r\n this.each(ARR_SLICE.call(arguments, 1), function(obj) {\r\n const keys = this.isObject(obj) ? Object.keys(obj) : [];\r\n keys.forEach(function(key) {\r\n if (!this.isUndefined(obj[key])) {\r\n target[key] = obj[key];\r\n }\r\n }.bind(this));\r\n }, this);\r\n\r\n return target;\r\n },\r\n\r\n defaults: function(target) {\r\n this.each(ARR_SLICE.call(