{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/make namespace object","webpack:///./src/js/utils/utils.js","webpack:///./src/js/utils/color.js","webpack:///./src/js/utils/hsvacolor.js","webpack:///./src/js/libs/moveable.js","webpack:///./src/js/libs/selectable.js","webpack:///./src/js/template.js","webpack:///../src/NanoPop.ts","webpack:///./src/js/pickr.js"],"names":["root","factory","exports","module","define","amd","self","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","eventListener","method","elements","events","fn","options","HTMLCollection","NodeList","Array","from","isArray","el","ev","capture","slice","arguments","on","bind","off","createElementFromString","html","div","document","createElement","innerHTML","trim","firstElementChild","createFromTemplate","str","removeAttribute","name","getAttribute","resolve","element","base","con","subtree","child","children","arr","sub","push","keys","length","eventPath","evt","path","composedPath","target","parentElement","window","resolveElement","val","Element","split","reduce","pv","cv","ci","a","querySelector","shadowRoot","adjustableInputNumbers","mapper","v","handleScroll","e","inc","Number","shiftKey","ctrlKey","deltaY","index","selectionStart","replace","i","focus","setSelectionRange","preventDefault","dispatchEvent","Event","passive","min","max","floor","round","Math","hsvToRgb","h","s","f","p","q","t","mod","hsvToHsl","l","rgbToHsv","r","g","b","minVal","maxVal","delta","dr","dg","db","cmykToHsv","c","m","y","k","hslToHsv","ns","isNaN","hexToHsv","hex","match","map","parseInt","parseToHSVA","toLowerCase","ctx","getContext","fillStyle","standardizeColor","regex","cmyk","rgba","hsla","hsva","hexa","numarize","array","test","undefined","invalid","type","exec","alphaValid","values","join","raw","substring","HSVaColor","original","next","precision","toFixed","that","toHSVA","toString","toHSLA","toRGBA","toCMYK","rgb","hsvToCmyk","toHEXA","padStart","hsvToHex","alpha","toUpperCase","clone","clamp","Moveable","opt","assign","lock","onchange","onstop","_keyboard","activeElement","wrapper","up","right","down","left","xm","ym","update","cache","x","startsWith","_tapstart","_","_tapstop","_tapmove","cancelable","getBoundingClientRect","touch","touches","clientX","clientY","width","top","height","style","offsetWidth","offsetHeight","cx","cy","trigger","destroy","Selectable","className","onTap","forEach","classList","stopPropagation","defaults","variantFlipOrder","start","middle","end","positionFlipOrder","bottom","position","margin","reposition","reference","popper","container","documentElement","originalLeft","originalTop","refBox","popBox","positionStore","variantStore","vs","vm","ve","hs","hm","he","posKey","varKey","positions","variants","vertical","positionVal","positionKey","variantKey","positionSize","variantSize","positionMaximum","variantMaximum","positionMinimum","variantMinimum","variantVal","Pickr","constructor","init","save","hide","show","clear","change","changestop","cancel","swatchselect","this","DEFAULT_OPTIONS","swatches","components","theme","sliders","lockOpacity","padding","includes","interaction","preview","opacity","hue","palette","_preBuild","_buildComponents","_bindEvents","_finalBuild","color","addSwatch","button","app","_root","_nanopop","baseOptions","HTMLElement","[object Object]","Error","createPopper","setAttribute","_t","_setupAnimationFrame","requestAnimationFrame","cb","setColor","default","_rePositioningPicker","defaultRepresentation","_representation","setColorRepresentation","showAlways","_initializingActive","_emit","instance","useAsButton","inline","appClass","hidden","input","int","find","add","contains","buildPickr","appendChild","removeChild","parent","nextSibling","insertBefore","remove","parentNode","replaceChild","disabled","disable","comparison","transition","lastColor","inst","cs","repeat","so","sh","getColor","_color","_lastColor","picker","currentColor","_recalc","_updateOutput","cssRGBaString","background","setProperty","_swatchColors","slider","backgroundColor","selectable","_components","eventBindings","_clearColor","setHSVA","applyColor","result","stopImmediatePropagation","ck","closeWithKey","isOpen","code","some","adjustableNumbers","ranges","step","range","getColorRepresentation","nv","toPrecision","autoReposition","timeout","closeOnScroll","setTimeout","rs","clearTimeout","_eventBindings","body","eb","innerHeight","innerWidth","eventSource","outputPrecision","silent","_parseLocalColor","alphaMakesAChange","i18n","I18N_DEFAULTS","event","args","_eventListener","callBacks","indexOf","splice","removeSwatch","swatchColor","cancelAnimationFrame","destroyAndRemove","recalc","string","utype","click","getSelectedColor","getRoot","enable","VERSION"],"mappings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zBnD,KAMX2I,SAGI,OAFA3I,KAAKhQ,QAAQ8T,UAAW,EACxB9D,KAAKsB,MAAMF,OAAO1E,UAAUiH,OAAO,YAC5B3D,M,SA74BMX,E,QAGFlE,G,EAHEkE,E,UAMAuJ,S,EANAvJ,E,gBASM,CAGnB,YAAa,sBACb,aAAc,6BACd,aAAc,eACd,iBAAkB,qBAClB,WAAY,OACZ,aAAc,SACd,YAAa,QAGb,gBAAiB,iBACjB,kBAAmB,mBACnB,iBAAkB,kBAClB,aAAc,oBACd,eAAgB,uBAChB,WAAY,uBACZ,eAAgB,qB,EA3BHA,E,kBA+BQ,CACrByD,SAAU,KACV1C,MAAO,UACPwC,aAAa,EACbrC,QAAS,EACTuD,UAAU,EACVE,YAAY,EACZ2C,eAAe,EACfU,gBAAiB,EACjB/G,aAAa,EACbmG,gBAAgB,EAChBjJ,UAAW,OAEX2C,WAAY,CACRM,YAAa,IAGjBgH,KAAM,GACNvH,SAAU,KACV2C,QAAQ,EACRxC,QAAS,KAET8B,QAAS,UACTE,sBAAuB,KACvBlF,SAAU,gBACV+I,mBAAmB,EACnB1D,YAAY,EAEZsD,aAAc,W,EA3DDzG,E,UAuKDrP,GAAW,IAAIqP,EAAMrP,K","file":"pickr.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Pickr\"] = factory();\n\telse\n\t\troot[\"Pickr\"] = factory();\n})(self, function() {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/* eslint-disable prefer-rest-params */\r\nfunction eventListener(method, elements, events, fn, options = {}) {\r\n\r\n // Normalize array\r\n if (elements instanceof HTMLCollection || elements instanceof NodeList) {\r\n elements = Array.from(elements);\r\n } else if (!Array.isArray(elements)) {\r\n elements = [elements];\r\n }\r\n\r\n if (!Array.isArray(events)) {\r\n events = [events];\r\n }\r\n\r\n for (const el of elements) {\r\n for (const ev of events) {\r\n el[method](ev, fn, {capture: false, ...options});\r\n }\r\n }\r\n\r\n return Array.prototype.slice.call(arguments, 1);\r\n}\r\n\r\n/**\r\n * Add event(s) to element(s).\r\n * @param elements DOM-Elements\r\n * @param events Event names\r\n * @param fn Callback\r\n * @param options Optional options\r\n * @return Array passed arguments\r\n */\r\nexport const on = eventListener.bind(null, 'addEventListener');\r\n\r\n/**\r\n * Remove event(s) from element(s).\r\n * @param elements DOM-Elements\r\n * @param events Event names\r\n * @param fn Callback\r\n * @param options Optional options\r\n * @return Array passed arguments\r\n */\r\nexport const off = eventListener.bind(null, 'removeEventListener');\r\n\r\n/**\r\n * Creates an DOM-Element out of a string (Single element).\r\n * @param html HTML representing a single element\r\n * @returns {Element | null} The element.\r\n */\r\nexport function createElementFromString(html) {\r\n const div = document.createElement('div');\r\n div.innerHTML = html.trim();\r\n return div.firstElementChild;\r\n}\r\n\r\n/**\r\n * Creates a new html element, every element which has\r\n * a ':ref' attribute will be saved in a object (which will be returned)\r\n * where the value of ':ref' is the object-key and the value the HTMLElement.\r\n *\r\n * It's possible to create a hierarchy if you add a ':obj' attribute. Every\r\n * sibling will be added to the object which will get the name from the 'data-con' attribute.\r\n *\r\n * If you want to create an Array out of multiple elements, you can use the ':arr' attribute,\r\n * the value defines the key and all elements, which has the same parent and the same 'data-arr' attribute,\r\n * would be added to it.\r\n *\r\n * @param str - The HTML String.\r\n */\r\n\r\nexport function createFromTemplate(str) {\r\n\r\n // Removes an attribute from a HTMLElement and returns the value.\r\n const removeAttribute = (el, name) => {\r\n const value = el.getAttribute(name);\r\n el.removeAttribute(name);\r\n return value;\r\n };\r\n\r\n // Recursive function to resolve template\r\n const resolve = (element, base = {}) => {\r\n\r\n // Check key and container attribute\r\n const con = removeAttribute(element, ':obj');\r\n const key = removeAttribute(element, ':ref');\r\n const subtree = con ? (base[con] = {}) : base;\r\n\r\n // Check and save element\r\n key && (base[key] = element);\r\n for (const child of Array.from(element.children)) {\r\n const arr = removeAttribute(child, ':arr');\r\n const sub = resolve(child, arr ? {} : subtree);\r\n\r\n if (arr) {\r\n\r\n // Check if there is already an array and add element\r\n (subtree[arr] || (subtree[arr] = []))\r\n .push(Object.keys(sub).length ? sub : child);\r\n }\r\n }\r\n\r\n return base;\r\n };\r\n\r\n return resolve(createElementFromString(str));\r\n}\r\n\r\n/**\r\n * Polyfill for safari & firefox for the eventPath event property.\r\n * @param evt The event object.\r\n * @return [String] event path.\r\n */\r\nexport function eventPath(evt) {\r\n let path = evt.path || (evt.composedPath && evt.composedPath());\r\n if (path) {\r\n return path;\r\n }\r\n\r\n let el = evt.target.parentElement;\r\n path = [evt.target, el];\r\n while (el = el.parentElement) {\r\n path.push(el);\r\n }\r\n\r\n path.push(document, window);\r\n return path;\r\n}\r\n\r\n/**\r\n * Resolves a HTMLElement by query.\r\n * @param val\r\n * @returns {null|Document|Element}\r\n */\r\nexport function resolveElement(val) {\r\n if (val instanceof Element) {\r\n return val;\r\n } else if (typeof val === 'string') {\r\n return val.split(/>>/g).reduce((pv, cv, ci, a) => {\r\n pv = pv.querySelector(cv);\r\n return ci < a.length - 1 ? pv.shadowRoot : pv;\r\n }, document);\r\n }\r\n\r\n return null;\r\n}\r\n\r\n/**\r\n * Creates the ability to change numbers in an input field with the scroll-wheel.\r\n * @param el\r\n * @param mapper\r\n */\r\nexport function adjustableInputNumbers(el, mapper = v => v) {\r\n\r\n function handleScroll(e) {\r\n const inc = ([0.001, 0.01, 0.1])[Number(e.shiftKey || e.ctrlKey * 2)] * (e.deltaY < 0 ? 1 : -1);\r\n\r\n let index = 0;\r\n let off = el.selectionStart;\r\n el.value = el.value.replace(/[\\d.]+/g, (v, i) => {\r\n\r\n // Check if number is in cursor range and increase it\r\n if (i <= off && i + v.length >= off) {\r\n off = i;\r\n return mapper(Number(v), inc, index);\r\n }\r\n\r\n index++;\r\n return v;\r\n });\r\n\r\n el.focus();\r\n el.setSelectionRange(off, off);\r\n\r\n // Prevent default and trigger input event\r\n e.preventDefault();\r\n el.dispatchEvent(new Event('input'));\r\n }\r\n\r\n // Bind events\r\n on(el, 'focus', () => on(window, 'wheel', handleScroll, {passive: false}));\r\n on(el, 'blur', () => off(window, 'wheel', handleScroll));\r\n}\r\n","// Shorthands\r\nconst {min, max, floor, round} = Math;\r\n\r\n/**\r\n * Tries to convert a color name to rgb/a hex representation\r\n * @param name\r\n * @returns {string | CanvasGradient | CanvasPattern}\r\n */\r\nfunction standardizeColor(name) {\r\n\r\n // Since invalid color's will be parsed as black, filter them out\r\n if (name.toLowerCase() === 'black') {\r\n return '#000';\r\n }\r\n\r\n const ctx = document.createElement('canvas').getContext('2d');\r\n ctx.fillStyle = name;\r\n return ctx.fillStyle === '#000' ? null : ctx.fillStyle;\r\n}\r\n\r\n/**\r\n * Convert HSV spectrum to RGB.\r\n * @param h Hue\r\n * @param s Saturation\r\n * @param v Value\r\n * @returns {number[]} Array with rgb values.\r\n */\r\nexport function hsvToRgb(h, s, v) {\r\n h = (h / 360) * 6;\r\n s /= 100;\r\n v /= 100;\r\n\r\n const i = floor(h);\r\n\r\n const f = h - i;\r\n const p = v * (1 - s);\r\n const q = v * (1 - f * s);\r\n const t = v * (1 - (1 - f) * s);\r\n\r\n const mod = i % 6;\r\n const r = [v, q, p, p, t, v][mod];\r\n const g = [t, v, v, q, p, p][mod];\r\n const b = [p, p, t, v, v, q][mod];\r\n\r\n return [\r\n r * 255,\r\n g * 255,\r\n b * 255\r\n ];\r\n}\r\n\r\n/**\r\n * Convert HSV spectrum to Hex.\r\n * @param h Hue\r\n * @param s Saturation\r\n * @param v Value\r\n * @returns {string[]} Hex values\r\n */\r\nexport function hsvToHex(h, s, v) {\r\n return hsvToRgb(h, s, v).map(v =>\r\n round(v).toString(16).padStart(2, '0')\r\n );\r\n}\r\n\r\n/**\r\n * Convert HSV spectrum to CMYK.\r\n * @param h Hue\r\n * @param s Saturation\r\n * @param v Value\r\n * @returns {number[]} CMYK values\r\n */\r\nexport function hsvToCmyk(h, s, v) {\r\n const rgb = hsvToRgb(h, s, v);\r\n const r = rgb[0] / 255;\r\n const g = rgb[1] / 255;\r\n const b = rgb[2] / 255;\r\n\r\n const k = min(1 - r, 1 - g, 1 - b);\r\n const c = k === 1 ? 0 : (1 - r - k) / (1 - k);\r\n const m = k === 1 ? 0 : (1 - g - k) / (1 - k);\r\n const y = k === 1 ? 0 : (1 - b - k) / (1 - k);\r\n\r\n return [\r\n c * 100,\r\n m * 100,\r\n y * 100,\r\n k * 100\r\n ];\r\n}\r\n\r\n/**\r\n * Convert HSV spectrum to HSL.\r\n * @param h Hue\r\n * @param s Saturation\r\n * @param v Value\r\n * @returns {number[]} HSL values\r\n */\r\nexport function hsvToHsl(h, s, v) {\r\n s /= 100;\r\n v /= 100;\r\n\r\n const l = (2 - s) * v / 2;\r\n\r\n if (l !== 0) {\r\n if (l === 1) {\r\n s = 0;\r\n } else if (l < 0.5) {\r\n s = s * v / (l * 2);\r\n } else {\r\n s = s * v / (2 - l * 2);\r\n }\r\n }\r\n\r\n return [\r\n h,\r\n s * 100,\r\n l * 100\r\n ];\r\n}\r\n\r\n/**\r\n * Convert RGB to HSV.\r\n * @param r Red\r\n * @param g Green\r\n * @param b Blue\r\n * @return {number[]} HSV values.\r\n */\r\nfunction rgbToHsv(r, g, b) {\r\n r /= 255;\r\n g /= 255;\r\n b /= 255;\r\n\r\n const minVal = min(r, g, b);\r\n const maxVal = max(r, g, b);\r\n const delta = maxVal - minVal;\r\n\r\n let h, s;\r\n const v = maxVal;\r\n if (delta === 0) {\r\n h = s = 0;\r\n } else {\r\n s = delta / maxVal;\r\n const dr = (((maxVal - r) / 6) + (delta / 2)) / delta;\r\n const dg = (((maxVal - g) / 6) + (delta / 2)) / delta;\r\n const db = (((maxVal - b) / 6) + (delta / 2)) / delta;\r\n\r\n if (r === maxVal) {\r\n h = db - dg;\r\n } else if (g === maxVal) {\r\n h = (1 / 3) + dr - db;\r\n } else if (b === maxVal) {\r\n h = (2 / 3) + dg - dr;\r\n }\r\n\r\n if (h < 0) {\r\n h += 1;\r\n } else if (h > 1) {\r\n h -= 1;\r\n }\r\n }\r\n\r\n return [\r\n h * 360,\r\n s * 100,\r\n v * 100\r\n ];\r\n}\r\n\r\n/**\r\n * Convert CMYK to HSV.\r\n * @param c Cyan\r\n * @param m Magenta\r\n * @param y Yellow\r\n * @param k Key (Black)\r\n * @return {number[]} HSV values.\r\n */\r\nfunction cmykToHsv(c, m, y, k) {\r\n c /= 100;\r\n m /= 100;\r\n y /= 100;\r\n k /= 100;\r\n\r\n const r = (1 - min(1, c * (1 - k) + k)) * 255;\r\n const g = (1 - min(1, m * (1 - k) + k)) * 255;\r\n const b = (1 - min(1, y * (1 - k) + k)) * 255;\r\n\r\n return [...rgbToHsv(r, g, b)];\r\n}\r\n\r\n/**\r\n * Convert HSL to HSV.\r\n * @param h Hue\r\n * @param s Saturation\r\n * @param l Lightness\r\n * @return {number[]} HSV values.\r\n */\r\nfunction hslToHsv(h, s, l) {\r\n s /= 100;\r\n l /= 100;\r\n s *= l < 0.5 ? l : 1 - l;\r\n\r\n const ns = (2 * s / (l + s)) * 100;\r\n const v = (l + s) * 100;\r\n return [h, isNaN(ns) ? 0 : ns, v];\r\n}\r\n\r\n/**\r\n * Convert HEX to HSV.\r\n * @param hex Hexadecimal string of rgb colors, can have length 3 or 6.\r\n * @return {number[]} HSV values.\r\n */\r\nfunction hexToHsv(hex) {\r\n return rgbToHsv(...hex.match(/.{2}/g).map(v => parseInt(v, 16)));\r\n}\r\n\r\n/**\r\n * Try's to parse a string which represents a color to a HSV array.\r\n * Current supported types are cmyk, rgba, hsla and hexadecimal.\r\n * @param str\r\n * @return {*}\r\n */\r\nexport function parseToHSVA(str) {\r\n\r\n // Check if string is a color-name\r\n str = str.match(/^[a-zA-Z]+$/) ? standardizeColor(str) : str;\r\n\r\n // Regular expressions to match different types of color represention\r\n const regex = {\r\n cmyk: /^cmyk[\\D]+([\\d.]+)[\\D]+([\\d.]+)[\\D]+([\\d.]+)[\\D]+([\\d.]+)/i,\r\n rgba: /^((rgba)|rgb)[\\D]+([\\d.]+)[\\D]+([\\d.]+)[\\D]+([\\d.]+)[\\D]*?([\\d.]+|$)/i,\r\n hsla: /^((hsla)|hsl)[\\D]+([\\d.]+)[\\D]+([\\d.]+)[\\D]+([\\d.]+)[\\D]*?([\\d.]+|$)/i,\r\n hsva: /^((hsva)|hsv)[\\D]+([\\d.]+)[\\D]+([\\d.]+)[\\D]+([\\d.]+)[\\D]*?([\\d.]+|$)/i,\r\n hexa: /^#?(([\\dA-Fa-f]{3,4})|([\\dA-Fa-f]{6})|([\\dA-Fa-f]{8}))$/i\r\n };\r\n\r\n /**\r\n * Takes an Array of any type, convert strings which represents\r\n * a number to a number an anything else to undefined.\r\n * @param array\r\n * @return {*}\r\n */\r\n const numarize = array => array.map(v => /^(|\\d+)\\.\\d+|\\d+$/.test(v) ? Number(v) : undefined);\r\n\r\n let match;\r\n invalid: for (const type in regex) {\r\n\r\n // Check if current scheme passed\r\n if (!(match = regex[type].exec(str))) {\r\n continue;\r\n }\r\n\r\n // Match[2] does only contain a truly value if rgba, hsla, or hsla got matched\r\n const alphaValid = a => (!!match[2] === (typeof a === 'number'));\r\n\r\n // Try to convert\r\n switch (type) {\r\n case 'cmyk': {\r\n const [, c, m, y, k] = numarize(match);\r\n\r\n if (c > 100 || m > 100 || y > 100 || k > 100) {\r\n break invalid;\r\n }\r\n\r\n return {values: cmykToHsv(c, m, y, k), type};\r\n }\r\n case 'rgba': {\r\n const [, , , r, g, b, a] = numarize(match);\r\n\r\n if (r > 255 || g > 255 || b > 255 || a < 0 || a > 1 || !alphaValid(a)) {\r\n break invalid;\r\n }\r\n\r\n return {values: [...rgbToHsv(r, g, b), a], a, type};\r\n }\r\n case 'hexa': {\r\n let [, hex] = match;\r\n\r\n if (hex.length === 4 || hex.length === 3) {\r\n hex = hex.split('').map(v => v + v).join('');\r\n }\r\n\r\n const raw = hex.substring(0, 6);\r\n let a = hex.substring(6);\r\n\r\n // Convert 0 - 255 to 0 - 1 for opacity\r\n a = a ? (parseInt(a, 16) / 255) : undefined;\r\n\r\n return {values: [...hexToHsv(raw), a], a, type};\r\n }\r\n case 'hsla': {\r\n const [, , , h, s, l, a] = numarize(match);\r\n\r\n if (h > 360 || s > 100 || l > 100 || a < 0 || a > 1 || !alphaValid(a)) {\r\n break invalid;\r\n }\r\n\r\n return {values: [...hslToHsv(h, s, l), a], a, type};\r\n }\r\n case 'hsva': {\r\n const [, , , h, s, v, a] = numarize(match);\r\n\r\n if (h > 360 || s > 100 || v > 100 || a < 0 || a > 1 || !alphaValid(a)) {\r\n break invalid;\r\n }\r\n\r\n return {values: [h, s, v, a], a, type};\r\n }\r\n }\r\n }\r\n\r\n return {values: null, type: null};\r\n}\r\n","import {hsvToCmyk, hsvToHex, hsvToHsl, hsvToRgb} from './color';\r\n\r\n/**\r\n * Simple class which holds the properties\r\n * of the color represention model hsla (hue saturation lightness alpha)\r\n */\r\nexport function HSVaColor(h = 0, s = 0, v = 0, a = 1) {\r\n const mapper = (original, next) => (precision = -1) => {\r\n return next(~precision ? original.map(v => Number(v.toFixed(precision))) : original);\r\n };\r\n\r\n const that = {\r\n h, s, v, a,\r\n\r\n toHSVA() {\r\n const hsva = [that.h, that.s, that.v, that.a];\r\n hsva.toString = mapper(hsva, arr => `hsva(${arr[0]}, ${arr[1]}%, ${arr[2]}%, ${that.a})`);\r\n return hsva;\r\n },\r\n\r\n toHSLA() {\r\n const hsla = [...hsvToHsl(that.h, that.s, that.v), that.a];\r\n hsla.toString = mapper(hsla, arr => `hsla(${arr[0]}, ${arr[1]}%, ${arr[2]}%, ${that.a})`);\r\n return hsla;\r\n },\r\n\r\n toRGBA() {\r\n const rgba = [...hsvToRgb(that.h, that.s, that.v), that.a];\r\n rgba.toString = mapper(rgba, arr => `rgba(${arr[0]}, ${arr[1]}, ${arr[2]}, ${that.a})`);\r\n return rgba;\r\n },\r\n\r\n toCMYK() {\r\n const cmyk = hsvToCmyk(that.h, that.s, that.v);\r\n cmyk.toString = mapper(cmyk, arr => `cmyk(${arr[0]}%, ${arr[1]}%, ${arr[2]}%, ${arr[3]}%)`);\r\n return cmyk;\r\n },\r\n\r\n toHEXA() {\r\n const hex = hsvToHex(that.h, that.s, that.v);\r\n\r\n // Check if alpha channel make sense, convert it to 255 number space, convert\r\n // To hex and pad it with zeros if needet.\r\n const alpha = that.a >= 1 ? '' : Number((that.a * 255).toFixed(0))\r\n .toString(16)\r\n .toUpperCase().padStart(2, '0');\r\n\r\n alpha && hex.push(alpha);\r\n hex.toString = () => `#${hex.join('').toUpperCase()}`;\r\n return hex;\r\n },\r\n\r\n clone: () => HSVaColor(that.h, that.s, that.v, that.a)\r\n };\r\n\r\n return that;\r\n}\r\n","import * as _ from '../utils/utils';\r\n\r\nconst clamp = v => Math.max(Math.min(v, 1), 0);\r\nexport default function Moveable(opt) {\r\n\r\n const that = {\r\n\r\n // Assign default values\r\n options: Object.assign({\r\n lock: null,\r\n onchange: () => 0,\r\n onstop: () => 0\r\n }, opt),\r\n\r\n _keyboard(e) {\r\n const {options} = that;\r\n const {type, key} = e;\r\n\r\n // Check to see if the Movable is focused and then move it based on arrow key inputs\r\n // For improved accessibility\r\n if (document.activeElement === options.wrapper) {\r\n const {lock} = that.options;\r\n const up = key === 'ArrowUp';\r\n const right = key === 'ArrowRight';\r\n const down = key === 'ArrowDown';\r\n const left = key === 'ArrowLeft';\r\n\r\n if (type === 'keydown' && (up || right || down || left)) {\r\n let xm = 0;\r\n let ym = 0;\r\n\r\n if (lock === 'v') {\r\n xm = (up || right) ? 1 : -1;\r\n } else if (lock === 'h') {\r\n xm = (up || right) ? -1 : 1;\r\n } else {\r\n ym = up ? -1 : (down ? 1 : 0);\r\n xm = left ? -1 : (right ? 1 : 0);\r\n }\r\n\r\n that.update(\r\n clamp(that.cache.x + (0.01 * xm)),\r\n clamp(that.cache.y + (0.01 * ym))\r\n );\r\n e.preventDefault();\r\n } else if (key.startsWith('Arrow')) {\r\n that.options.onstop();\r\n e.preventDefault();\r\n }\r\n }\r\n },\r\n\r\n _tapstart(evt) {\r\n _.on(document, ['mouseup', 'touchend', 'touchcancel'], that._tapstop);\r\n _.on(document, ['mousemove', 'touchmove'], that._tapmove);\r\n\r\n if (evt.cancelable) {\r\n evt.preventDefault();\r\n }\r\n\r\n // Trigger\r\n that._tapmove(evt);\r\n },\r\n\r\n _tapmove(evt) {\r\n const {options, cache} = that;\r\n const {lock, element, wrapper} = options;\r\n const b = wrapper.getBoundingClientRect();\r\n\r\n let x = 0, y = 0;\r\n if (evt) {\r\n const touch = evt && evt.touches && evt.touches[0];\r\n x = evt ? (touch || evt).clientX : 0;\r\n y = evt ? (touch || evt).clientY : 0;\r\n\r\n // Reset to bounds\r\n if (x < b.left) {\r\n x = b.left;\r\n } else if (x > b.left + b.width) {\r\n x = b.left + b.width;\r\n }\r\n if (y < b.top) {\r\n y = b.top;\r\n } else if (y > b.top + b.height) {\r\n y = b.top + b.height;\r\n }\r\n\r\n // Normalize\r\n x -= b.left;\r\n y -= b.top;\r\n } else if (cache) {\r\n x = cache.x * b.width;\r\n y = cache.y * b.height;\r\n }\r\n\r\n if (lock !== 'h') {\r\n element.style.left = `calc(${x / b.width * 100}% - ${element.offsetWidth / 2}px)`;\r\n }\r\n\r\n if (lock !== 'v') {\r\n element.style.top = `calc(${y / b.height * 100}% - ${element.offsetHeight / 2}px)`;\r\n }\r\n\r\n that.cache = {x: x / b.width, y: y / b.height};\r\n const cx = clamp(x / b.width);\r\n const cy = clamp(y / b.height);\r\n\r\n switch (lock) {\r\n case 'v':\r\n return options.onchange(cx);\r\n case 'h':\r\n return options.onchange(cy);\r\n default:\r\n return options.onchange(cx, cy);\r\n }\r\n },\r\n\r\n _tapstop() {\r\n that.options.onstop();\r\n _.off(document, ['mouseup', 'touchend', 'touchcancel'], that._tapstop);\r\n _.off(document, ['mousemove', 'touchmove'], that._tapmove);\r\n },\r\n\r\n trigger() {\r\n that._tapmove();\r\n },\r\n\r\n update(x = 0, y = 0) {\r\n const {left, top, width, height} = that.options.wrapper.getBoundingClientRect();\r\n\r\n if (that.options.lock === 'h') {\r\n y = x;\r\n }\r\n\r\n that._tapmove({\r\n clientX: left + width * x,\r\n clientY: top + height * y\r\n });\r\n },\r\n\r\n destroy() {\r\n const {options, _tapstart, _keyboard} = that;\r\n _.off(document, ['keydown', 'keyup'], _keyboard);\r\n _.off([options.wrapper, options.element], 'mousedown', _tapstart);\r\n _.off([options.wrapper, options.element], 'touchstart', _tapstart, {\r\n passive: false\r\n });\r\n }\r\n };\r\n\r\n // Initilize\r\n const {options, _tapstart, _keyboard} = that;\r\n _.on([options.wrapper, options.element], 'mousedown', _tapstart);\r\n _.on([options.wrapper, options.element], 'touchstart', _tapstart, {\r\n passive: false\r\n });\r\n\r\n _.on(document, ['keydown', 'keyup'], _keyboard);\r\n\r\n return that;\r\n}\r\n","import * as _ from '../utils/utils';\n\nexport default function Selectable(opt = {}) {\n opt = Object.assign({\n onchange: () => 0,\n className: '',\n elements: []\n }, opt);\n\n const onTap = _.on(opt.elements, 'click', evt => {\n opt.elements.forEach(e =>\n e.classList[evt.target === e ? 'add' : 'remove'](opt.className)\n );\n\n opt.onchange(evt);\n\n // Fix for https://github.com/Simonwep/pickr/issues/243\n evt.stopPropagation();\n });\n\n return {\n destroy: () => _.off(...onTap)\n };\n}\n","import * as _ from './utils/utils';\r\n\r\nexport default instance => {\r\n\r\n const {\r\n components,\r\n useAsButton,\r\n inline,\r\n appClass,\r\n theme,\r\n lockOpacity\r\n } = instance.options;\r\n\r\n // Utils\r\n const hidden = con => con ? '' : 'style=\"display:none\" hidden';\r\n const t = str => instance._t(str);\r\n\r\n const root = _.createFromTemplate(`\r\n