@thednp/color-picker 2.0.0-alpha5 → 2.0.0-alpha6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"version":3,"file":"color-picker.mjs","sources":["../../node_modules/@thednp/event-listener/dist/event-listener.mjs","../../node_modules/@thednp/shorty/dist/shorty.mjs","../../node_modules/@thednp/color/dist/index.mjs","../../src/ts/colorPalette.ts","../../src/ts/util/colorPickerLabels.ts","../../src/ts/util/colorNames.ts","../../src/ts/util/isValidJSON.ts","../../src/ts/util/vHidden.ts","../../src/ts/util/getColorForm.ts","../../src/ts/util/getColorControls.ts","../../src/ts/util/getColorMenu.ts","../../src/ts/util/setMarkup.ts","../../src/ts/index.ts"],"sourcesContent":["const e = {}, f = (t) => {\n const { type: c, currentTarget: i } = t;\n [...e[c]].forEach(([n, s]) => {\n i === n && [...s].forEach(([o, a]) => {\n o.apply(n, [t]), typeof a == \"object\" && a.once && r(n, c, o, a);\n });\n });\n}, E = (t, c, i, n) => {\n e[c] || (e[c] = /* @__PURE__ */ new Map());\n const s = e[c];\n s.has(t) || s.set(t, /* @__PURE__ */ new Map());\n const o = s.get(t), { size: a } = o;\n o.set(i, n), a || t.addEventListener(c, f, n);\n}, r = (t, c, i, n) => {\n const s = e[c], o = s && s.get(t), a = o && o.get(i), d = a !== void 0 ? a : n;\n o && o.has(i) && o.delete(i), s && (!o || !o.size) && s.delete(t), (!s || !s.size) && delete e[c], (!o || !o.size) && t.removeEventListener(c, f, d);\n}, g = E, M = r;\nexport {\n E as addListener,\n f as globalListener,\n M as off,\n g as on,\n e as registry,\n r as removeListener\n};\n//# sourceMappingURL=event-listener.mjs.map\n","const pe = \"aria-checked\", fe = \"aria-description\", me = \"aria-describedby\", ge = \"aria-expanded\", ve = \"aria-haspopup\", Ee = \"aria-hidden\", be = \"aria-label\", he = \"aria-labelledby\", ye = \"aria-modal\", we = \"aria-pressed\", Ae = \"aria-selected\", Se = \"aria-valuemin\", Me = \"aria-valuemax\", Ne = \"aria-valuenow\", ke = \"aria-valuetext\", G = \"abort\", j = \"beforeunload\", J = \"blur\", K = \"change\", X = \"contextmenu\", P = \"DOMContentLoaded\", Y = \"DOMMouseScroll\", Z = \"error\", $ = \"focus\", _ = \"focusin\", tt = \"focusout\", et = \"gesturechange\", nt = \"gestureend\", ot = \"gesturestart\", st = \"keydown\", ct = \"keypress\", rt = \"keyup\", at = \"load\", it = \"click\", ut = \"dblclick\", lt = \"mousedown\", dt = \"mouseup\", pt = \"hover\", ft = \"mouseenter\", mt = \"mouseleave\", gt = \"mousein\", vt = \"mouseout\", Et = \"mouseover\", bt = \"mousemove\", ht = \"mousewheel\", yt = \"move\", wt = \"orientationchange\", At = \"pointercancel\", St = \"pointerdown\", Mt = \"pointerleave\", Nt = \"pointermove\", kt = \"pointerup\", Tt = \"readystatechange\", Dt = \"reset\", Ct = \"resize\", Lt = \"select\", Ot = \"selectend\", It = \"selectstart\", zt = \"scroll\", xt = \"submit\", Vt = \"touchstart\", Bt = \"touchmove\", Ht = \"touchcancel\", Pt = \"touchend\", Ut = \"unload\", Te = {\n DOMContentLoaded: P,\n DOMMouseScroll: Y,\n abort: G,\n beforeunload: j,\n blur: J,\n change: K,\n click: it,\n contextmenu: X,\n dblclick: ut,\n error: Z,\n focus: $,\n focusin: _,\n focusout: tt,\n gesturechange: et,\n gestureend: nt,\n gesturestart: ot,\n hover: pt,\n keydown: st,\n keypress: ct,\n keyup: rt,\n load: at,\n mousedown: lt,\n mousemove: bt,\n mousein: gt,\n mouseout: vt,\n mouseenter: ft,\n mouseleave: mt,\n mouseover: Et,\n mouseup: dt,\n mousewheel: ht,\n move: yt,\n orientationchange: wt,\n pointercancel: At,\n pointerdown: St,\n pointerleave: Mt,\n pointermove: Nt,\n pointerup: kt,\n readystatechange: Tt,\n reset: Dt,\n resize: Ct,\n scroll: zt,\n select: Lt,\n selectend: Ot,\n selectstart: It,\n submit: xt,\n touchcancel: Ht,\n touchend: Pt,\n touchmove: Bt,\n touchstart: Vt,\n unload: Ut\n}, De = \"drag\", Ce = \"dragstart\", Le = \"dragenter\", Oe = \"dragleave\", Ie = \"dragover\", ze = \"dragend\", xe = \"loadstart\", Ve = {\n start: \"mousedown\",\n end: \"mouseup\",\n move: \"mousemove\",\n cancel: \"mouseleave\"\n}, Be = { down: \"mousedown\", up: \"mouseup\" }, He = \"onmouseleave\" in document ? [\"mouseenter\", \"mouseleave\"] : (\n /* istanbul ignore next */\n [\"mouseover\", \"mouseout\"]\n), Pe = {\n start: \"touchstart\",\n end: \"touchend\",\n move: \"touchmove\",\n cancel: \"touchcancel\"\n}, Ue = { in: \"focusin\", out: \"focusout\" }, Fe = {\n Backspace: \"Backspace\",\n // 8\n Tab: \"Tab\",\n // 9\n Enter: \"Enter\",\n // 13\n Shift: \"Shift\",\n // 16\n Control: \"Control\",\n // 17\n Alt: \"Alt\",\n // 18\n Pause: \"Pause\",\n // 19\n CapsLock: \"CapsLock\",\n // 20\n Escape: \"Escape\",\n // 27\n Scape: \"Space\",\n // 32\n ArrowLeft: \"ArrowLeft\",\n // 37\n ArrowUp: \"ArrowUp\",\n // 38\n ArrowRight: \"ArrowRight\",\n // 39\n ArrowDown: \"ArrowDown\",\n // 40\n Insert: \"Insert\",\n // 45\n Delete: \"Delete\",\n // 46\n Meta: \"Meta\",\n // 91 windows key\n ContextMenu: \"ContextMenu\",\n // 93\n ScrollLock: \"ScrollLock\"\n // 145\n}, We = \"Alt\", Re = \"ArrowDown\", Qe = \"ArrowUp\", qe = \"ArrowLeft\", Ge = \"ArrowRight\", je = \"Backspace\", Je = \"CapsLock\", Ke = \"Control\", Xe = \"Delete\", Ye = \"Enter\", Ze = \"Escape\", $e = \"Insert\", _e = \"Meta\", tn = \"Pause\", en = \"ScrollLock\", nn = \"Shift\", on = \"Space\", sn = \"Tab\", Ft = \"animationDuration\", Wt = \"animationDelay\", U = \"animationName\", D = \"animationend\", Rt = \"transitionDuration\", Qt = \"transitionDelay\", C = \"transitionend\", F = \"transitionProperty\", cn = \"addEventListener\", rn = \"removeEventListener\", an = {\n linear: \"linear\",\n easingSinusoidalIn: \"cubic-bezier(0.47,0,0.745,0.715)\",\n easingSinusoidalOut: \"cubic-bezier(0.39,0.575,0.565,1)\",\n easingSinusoidalInOut: \"cubic-bezier(0.445,0.05,0.55,0.95)\",\n easingQuadraticIn: \"cubic-bezier(0.550,0.085,0.680,0.530)\",\n easingQuadraticOut: \"cubic-bezier(0.250,0.460,0.450,0.940)\",\n easingQuadraticInOut: \"cubic-bezier(0.455,0.030,0.515,0.955)\",\n easingCubicIn: \"cubic-bezier(0.55,0.055,0.675,0.19)\",\n easingCubicOut: \"cubic-bezier(0.215,0.61,0.355,1)\",\n easingCubicInOut: \"cubic-bezier(0.645,0.045,0.355,1)\",\n easingQuarticIn: \"cubic-bezier(0.895,0.03,0.685,0.22)\",\n easingQuarticOut: \"cubic-bezier(0.165,0.84,0.44,1)\",\n easingQuarticInOut: \"cubic-bezier(0.77,0,0.175,1)\",\n easingQuinticIn: \"cubic-bezier(0.755,0.05,0.855,0.06)\",\n easingQuinticOut: \"cubic-bezier(0.23,1,0.32,1)\",\n easingQuinticInOut: \"cubic-bezier(0.86,0,0.07,1)\",\n easingExponentialIn: \"cubic-bezier(0.95,0.05,0.795,0.035)\",\n easingExponentialOut: \"cubic-bezier(0.19,1,0.22,1)\",\n easingExponentialInOut: \"cubic-bezier(1,0,0,1)\",\n easingCircularIn: \"cubic-bezier(0.6,0.04,0.98,0.335)\",\n easingCircularOut: \"cubic-bezier(0.075,0.82,0.165,1)\",\n easingCircularInOut: \"cubic-bezier(0.785,0.135,0.15,0.86)\",\n easingBackIn: \"cubic-bezier(0.6,-0.28,0.735,0.045)\",\n easingBackOut: \"cubic-bezier(0.175,0.885,0.32,1.275)\",\n easingBackInOut: \"cubic-bezier(0.68,-0.55,0.265,1.55)\"\n}, un = \"offsetHeight\", ln = \"offsetWidth\", dn = \"scrollHeight\", pn = \"scrollWidth\", fn = \"tabindex\", qt = navigator.userAgentData, A = qt, { userAgent: Gt } = navigator, S = Gt, z = /iPhone|iPad|iPod|Android/i;\nlet L = !1;\nA ? L = A.brands.some((t) => z.test(t.brand)) : L = z.test(S);\nconst mn = L, x = /(iPhone|iPod|iPad)/, gn = A ? A.brands.some((t) => x.test(t.brand)) : (\n /* istanbul ignore next */\n x.test(S)\n), vn = S ? S.includes(\"Firefox\") : (\n /* istanbul ignore next */\n !1\n), { head: M } = document, En = [\"webkitPerspective\", \"perspective\"].some((t) => t in M.style), jt = (t, e, n, o) => {\n const s = o || !1;\n t.addEventListener(e, n, s);\n}, Jt = (t, e, n, o) => {\n const s = o || !1;\n t.removeEventListener(e, n, s);\n}, Kt = (t, e, n, o) => {\n const s = (r) => {\n (r.target === t || r.currentTarget === t) && (n.apply(t, [r]), Jt(t, e, s, o));\n };\n jt(t, e, s, o);\n}, Xt = () => {\n}, bn = (() => {\n let t = !1;\n try {\n const e = Object.defineProperty({}, \"passive\", {\n get: () => (t = !0, t)\n });\n Kt(document, P, Xt, e);\n } catch {\n }\n return t;\n})(), hn = [\"webkitTransform\", \"transform\"].some((t) => t in M.style), yn = \"ontouchstart\" in window || /* istanbul ignore next */\n\"msMaxTouchPoints\" in navigator, wn = [\"webkitAnimation\", \"animation\"].some((t) => t in M.style), An = [\"webkitTransition\", \"transition\"].some((t) => t in M.style), Yt = (t, e) => t.getAttribute(e), Sn = (t, e, n) => e.getAttributeNS(t, n), Mn = (t, e) => t.hasAttribute(e), Nn = (t, e, n) => e.hasAttributeNS(t, n), kn = (t, e, n) => t.setAttribute(e, n), Tn = (t, e, n, o) => e.setAttributeNS(t, n, o), Dn = (t, e) => t.removeAttribute(e), Cn = (t, e, n) => e.removeAttributeNS(t, n), Ln = (t, ...e) => {\n t.classList.add(...e);\n}, On = (t, ...e) => {\n t.classList.remove(...e);\n}, In = (t, e) => t.classList.contains(e), { body: zn } = document, { documentElement: xn } = document, Vn = (t) => Array.from(t), v = (t) => t != null && typeof t == \"object\" || !1, i = (t) => v(t) && typeof t.nodeType == \"number\" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].some((e) => t.nodeType === e) || !1, u = (t) => i(t) && t.nodeType === 1 || !1, E = /* @__PURE__ */ new Map(), O = {\n data: E,\n /**\n * Sets web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @param instance the component instance\n */\n set: (t, e, n) => {\n if (!u(t))\n return;\n E.has(e) || E.set(e, /* @__PURE__ */ new Map()), E.get(e).set(t, n);\n },\n /**\n * Returns all instances for specified component.\n *\n * @param component the component's name or a unique key\n * @returns all the component instances\n */\n getAllFor: (t) => E.get(t) || null,\n /**\n * Returns the instance associated with the target.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @returns the instance\n */\n get: (t, e) => {\n if (!u(t) || !e)\n return null;\n const n = O.getAllFor(e);\n return t && n && n.get(t) || null;\n },\n /**\n * Removes web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n */\n remove: (t, e) => {\n const n = O.getAllFor(e);\n !n || !u(t) || (n.delete(t), n.size === 0 && E.delete(e));\n }\n}, Bn = (t, e) => O.get(t, e), N = (t) => typeof t == \"string\" || !1, W = (t) => v(t) && t.constructor.name === \"Window\" || !1, R = (t) => i(t) && t.nodeType === 9 || !1, d = (t) => W(t) ? t.document : R(t) ? t : i(t) ? t.ownerDocument : window.document, k = (t, ...e) => Object.assign(t, ...e), Zt = (t) => {\n if (!t)\n return;\n if (N(t))\n return d().createElement(t);\n const { tagName: e } = t, n = Zt(e);\n if (!n)\n return;\n const o = { ...t };\n return delete o.tagName, k(n, o);\n}, $t = (t, e) => {\n if (!t || !e)\n return;\n if (N(e))\n return d().createElementNS(t, e);\n const { tagName: n } = e, o = $t(t, n);\n if (!o)\n return;\n const s = { ...e };\n return delete s.tagName, k(o, s);\n}, Q = (t, e) => t.dispatchEvent(e), Hn = (t, e, n) => n.indexOf(t) === e, g = (t, e) => {\n const n = getComputedStyle(t), o = e.replace(\"webkit\", \"Webkit\").replace(/([A-Z])/g, \"-$1\").toLowerCase();\n return n.getPropertyValue(o);\n}, _t = (t) => {\n const e = g(t, U), n = g(t, Wt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, te = (t) => {\n const e = g(t, U), n = g(t, Ft), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, Pn = (t, e) => {\n let n = 0;\n const o = new Event(D), s = te(t), r = _t(t);\n if (s) {\n const a = (l) => {\n l.target === t && (e.apply(t, [l]), t.removeEventListener(D, a), n = 1);\n };\n t.addEventListener(D, a), setTimeout(() => {\n n || Q(t, o);\n }, s + r + 17);\n } else\n e.apply(t, [o]);\n}, ee = (t) => {\n const e = g(t, F), n = g(t, Qt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, ne = (t) => {\n const e = g(t, F), n = g(t, Rt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, Un = (t, e) => {\n let n = 0;\n const o = new Event(C), s = ne(t), r = ee(t);\n if (s) {\n const a = (l) => {\n l.target === t && (e.apply(t, [l]), t.removeEventListener(C, a), n = 1);\n };\n t.addEventListener(C, a), setTimeout(() => {\n n || Q(t, o);\n }, s + r + 17);\n } else\n e.apply(t, [o]);\n}, Fn = (t) => Float32Array.from(Array.from(t)), Wn = (t) => Float64Array.from(Array.from(t)), Rn = (t, e) => t.focus(e), V = (t) => [\"true\", !0].includes(t) ? !0 : [\"false\", !1].includes(t) ? !1 : [\"null\", \"\", null, void 0].includes(t) ? null : t !== \"\" && !Number.isNaN(+t) ? +t : t, w = (t) => Object.entries(t), oe = (t) => t.toLowerCase(), Qn = (t, e, n, o) => {\n const s = { ...n }, r = { ...t.dataset }, a = { ...e }, l = {}, p = \"title\";\n return w(r).forEach(([c, f]) => {\n const y = o && typeof c == \"string\" && c.includes(o) ? c.replace(o, \"\").replace(/[A-Z]/g, (q) => oe(q)) : c;\n l[y] = V(f);\n }), w(s).forEach(([c, f]) => {\n s[c] = V(f);\n }), w(e).forEach(([c, f]) => {\n c in s ? a[c] = s[c] : c in l ? a[c] = l[c] : a[c] = c === p ? Yt(t, p) : f;\n }), a;\n}, qn = (t, e) => v(t) && (Object.hasOwn(t, e) || e in t), Gn = (t) => Object.keys(t), jn = (t) => Object.values(t), Jn = (t, e) => {\n const n = new CustomEvent(t, {\n cancelable: !0,\n bubbles: !0\n });\n return v(e) && k(n, e), n;\n}, Kn = { passive: !0 }, Xn = (t) => t.offsetHeight, Yn = (t, e) => {\n w(e).forEach(([n, o]) => {\n if (o && N(n) && n.includes(\"--\"))\n t.style.setProperty(n, o);\n else {\n const s = {};\n s[n] = o, k(t.style, s);\n }\n });\n}, I = (t) => v(t) && t.constructor.name === \"Map\" || !1, se = (t) => typeof t == \"number\" || !1, m = /* @__PURE__ */ new Map(), Zn = {\n /**\n * Sets a new timeout timer for an element, or element -> key association.\n *\n * @param element target element\n * @param callback the callback\n * @param delay the execution delay\n * @param key a unique key\n */\n set: (t, e, n, o) => {\n u(t) && (o && o.length ? (m.has(t) || m.set(t, /* @__PURE__ */ new Map()), m.get(t).set(o, setTimeout(e, n))) : m.set(t, setTimeout(e, n)));\n },\n /**\n * Returns the timer associated with the target.\n *\n * @param element target element\n * @param key a unique\n * @returns the timer\n */\n get: (t, e) => {\n if (!u(t))\n return null;\n const n = m.get(t);\n return e && n && I(n) ? n.get(e) || /* istanbul ignore next */\n null : se(n) ? n : null;\n },\n /**\n * Clears the element's timer.\n *\n * @param element target element\n * @param key a unique key\n */\n clear: (t, e) => {\n if (!u(t))\n return;\n const n = m.get(t);\n e && e.length && I(n) ? (clearTimeout(n.get(e)), n.delete(e), n.size === 0 && m.delete(t)) : (clearTimeout(n), m.delete(t));\n }\n}, $n = (t) => t.toUpperCase(), h = (t, e) => {\n const { width: n, height: o, top: s, right: r, bottom: a, left: l } = t.getBoundingClientRect();\n let p = 1, c = 1;\n if (e && u(t)) {\n const { offsetWidth: f, offsetHeight: y } = t;\n p = f > 0 ? Math.round(n) / f : (\n /* istanbul ignore next */\n 1\n ), c = y > 0 ? Math.round(o) / y : (\n /* istanbul ignore next */\n 1\n );\n }\n return {\n width: n / p,\n height: o / c,\n top: s / c,\n right: r / p,\n bottom: a / c,\n left: l / p,\n x: l / p,\n y: s / c\n };\n}, _n = (t) => d(t).body, T = (t) => d(t).documentElement, to = (t) => d(t).head, eo = (t) => {\n const e = W(t), n = e ? t.scrollX : t.scrollLeft, o = e ? t.scrollY : t.scrollTop;\n return { x: n, y: o };\n}, ce = (t) => i(t) && t.constructor.name === \"ShadowRoot\" || !1, no = (t) => t.nodeName === \"HTML\" ? t : u(t) && t.assignedSlot || // step into the shadow DOM of the parent of a slotted node\ni(t) && t.parentNode || // DOM Element detected\nce(t) && t.host || // ShadowRoot detected\nT(t), re = (t) => {\n if (!u(t))\n return !1;\n const { width: e, height: n } = h(t), { offsetWidth: o, offsetHeight: s } = t;\n return Math.round(e) !== o || Math.round(n) !== s;\n}, oo = (t, e, n) => {\n const o = u(e), s = h(t, o && re(e)), r = { x: 0, y: 0 };\n if (o) {\n const a = h(e, !0);\n r.x = a.x + e.clientLeft, r.y = a.y + e.clientTop;\n }\n return {\n x: s.left + n.x - r.x,\n y: s.top + n.y - r.y,\n width: s.width,\n height: s.height\n };\n};\nlet B = 0, H = 0;\nconst b = /* @__PURE__ */ new Map(), ae = (t, e) => {\n let n = e ? B : H;\n if (e) {\n const o = ae(t), s = b.get(o) || /* @__PURE__ */ new Map();\n b.has(o) || b.set(o, s), I(s) && !s.has(e) ? (s.set(e, n), B += 1) : n = s.get(e);\n } else {\n const o = t.id || t;\n b.has(o) ? n = b.get(o) : (b.set(o, n), H += 1);\n }\n return n;\n}, so = (t) => {\n var e;\n return t ? R(t) ? t.defaultView : i(t) ? (e = t == null ? void 0 : t.ownerDocument) == null ? void 0 : e.defaultView : t : window;\n}, ie = (t) => Array.isArray(t) || !1, co = (t) => i(t) && t.nodeName === \"CANVAS\" || !1, ue = (t) => u(t) && !!t.shadowRoot || !1, ro = (t) => i(t) && [1, 2, 3, 4, 5, 6, 7, 8].some((e) => t.nodeType === e) || !1, ao = (t) => {\n if (!i(t))\n return !1;\n const { top: e, bottom: n } = h(t), { clientHeight: o } = T(t);\n return e <= o && n >= 0;\n}, io = (t) => {\n if (!i(t))\n return !1;\n const { clientWidth: e, clientHeight: n } = T(t), { top: o, left: s, bottom: r, right: a } = h(t, !0);\n return o >= 0 && s >= 0 && r <= n && a <= e;\n}, uo = (t) => ie(t) && t.every(u) || !1, lo = (t) => typeof t == \"function\" || !1, po = (t) => v(t) && t.constructor.name === \"HTMLCollection\" || !1, fo = (t) => u(t) && t.tagName === \"IMG\" || !1, mo = (t) => {\n if (!N(t))\n return !1;\n try {\n JSON.parse(t);\n } catch {\n return !1;\n }\n return !0;\n}, go = (t) => v(t) && t.constructor.name === \"WeakMap\" || !1, vo = (t) => i(t) && [\"SVG\", \"Image\", \"Video\", \"Canvas\"].some((e) => t.constructor.name.includes(e)) || !1, Eo = (t) => v(t) && t.constructor.name === \"NodeList\" || !1, bo = (t) => T(t).dir === \"rtl\", ho = (t) => i(t) && t.constructor.name.includes(\"SVG\") || !1, yo = (t) => i(t) && [\"TABLE\", \"TD\", \"TH\"].includes(t.nodeName) || !1, le = (t, e) => t ? t.closest(e) || // break out of `ShadowRoot`\nle(t.getRootNode().host, e) : null, wo = (t, e) => u(t) ? t : (i(e) ? e : d()).querySelector(t), de = (t, e) => (i(e) ? e : d()).getElementsByTagName(t), Ao = (t) => [...de(\"*\", t)].filter(ue), So = (t, e) => d(e).getElementById(t) || null, Mo = (t, e) => (i(e) ? e : d()).querySelectorAll(t), No = (t, e) => (e && i(e) ? e : d()).getElementsByClassName(\n t\n), ko = (t, e) => t.matches(e), To = \"2.0.0alpha15\";\nexport {\n Vn as ArrayFrom,\n P as DOMContentLoadedEvent,\n Y as DOMMouseScrollEvent,\n O as Data,\n Fn as Float32ArrayFrom,\n Wn as Float64ArrayFrom,\n k as ObjectAssign,\n w as ObjectEntries,\n qn as ObjectHasOwn,\n Gn as ObjectKeys,\n jn as ObjectValues,\n Zn as Timer,\n G as abortEvent,\n Ln as addClass,\n cn as addEventListener,\n Wt as animationDelay,\n Ft as animationDuration,\n D as animationEndEvent,\n U as animationName,\n pe as ariaChecked,\n me as ariaDescribedBy,\n fe as ariaDescription,\n ge as ariaExpanded,\n ve as ariaHasPopup,\n Ee as ariaHidden,\n be as ariaLabel,\n he as ariaLabelledBy,\n ye as ariaModal,\n we as ariaPressed,\n Ae as ariaSelected,\n Me as ariaValueMax,\n Se as ariaValueMin,\n Ne as ariaValueNow,\n ke as ariaValueText,\n j as beforeunloadEvent,\n an as bezierEasings,\n J as blurEvent,\n K as changeEvent,\n le as closest,\n X as contextmenuEvent,\n Jn as createCustomEvent,\n Zt as createElement,\n $t as createElementNS,\n Q as dispatchEvent,\n Hn as distinct,\n zn as documentBody,\n xn as documentElement,\n M as documentHead,\n De as dragEvent,\n ze as dragendEvent,\n Le as dragenterEvent,\n Oe as dragleaveEvent,\n Ie as dragoverEvent,\n Ce as dragstartEvent,\n Pn as emulateAnimationEnd,\n Un as emulateTransitionEnd,\n Z as errorEvent,\n Rn as focus,\n $ as focusEvent,\n Ue as focusEvents,\n _ as focusinEvent,\n tt as focusoutEvent,\n et as gesturechangeEvent,\n nt as gestureendEvent,\n ot as gesturestartEvent,\n Yt as getAttribute,\n Sn as getAttributeNS,\n h as getBoundingClientRect,\n Ao as getCustomElements,\n d as getDocument,\n _n as getDocumentBody,\n T as getDocumentElement,\n to as getDocumentHead,\n _t as getElementAnimationDelay,\n te as getElementAnimationDuration,\n So as getElementById,\n g as getElementStyle,\n ee as getElementTransitionDelay,\n ne as getElementTransitionDuration,\n No as getElementsByClassName,\n de as getElementsByTagName,\n Bn as getInstance,\n eo as getNodeScroll,\n no as getParentNode,\n oo as getRectRelativeToOffsetParent,\n ae as getUID,\n so as getWindow,\n Mn as hasAttribute,\n Nn as hasAttributeNS,\n In as hasClass,\n gn as isApple,\n ie as isArray,\n co as isCanvas,\n ue as isCustomElement,\n R as isDocument,\n ro as isElement,\n ao as isElementInScrollRange,\n io as isElementInViewport,\n uo as isElementsArray,\n vn as isFirefox,\n lo as isFunction,\n po as isHTMLCollection,\n u as isHTMLElement,\n fo as isHTMLImageElement,\n mo as isJSON,\n I as isMap,\n vo as isMedia,\n mn as isMobile,\n i as isNode,\n Eo as isNodeList,\n se as isNumber,\n v as isObject,\n bo as isRTL,\n ho as isSVGElement,\n re as isScaledElement,\n ce as isShadowRoot,\n N as isString,\n yo as isTableElement,\n go as isWeakMap,\n W as isWindow,\n We as keyAlt,\n Re as keyArrowDown,\n qe as keyArrowLeft,\n Ge as keyArrowRight,\n Qe as keyArrowUp,\n je as keyBackspace,\n Je as keyCapsLock,\n Ke as keyControl,\n Xe as keyDelete,\n Ye as keyEnter,\n Ze as keyEscape,\n $e as keyInsert,\n _e as keyMeta,\n tn as keyPause,\n en as keyScrollLock,\n nn as keyShift,\n on as keySpace,\n sn as keyTab,\n Fe as keyboardEventKeys,\n st as keydownEvent,\n ct as keypressEvent,\n rt as keyupEvent,\n at as loadEvent,\n xe as loadstartEvent,\n ko as matches,\n Be as mouseClickEvents,\n He as mouseHoverEvents,\n Ve as mouseSwipeEvents,\n it as mouseclickEvent,\n ut as mousedblclickEvent,\n lt as mousedownEvent,\n ft as mouseenterEvent,\n pt as mousehoverEvent,\n gt as mouseinEvent,\n mt as mouseleaveEvent,\n bt as mousemoveEvent,\n vt as mouseoutEvent,\n Et as mouseoverEvent,\n dt as mouseupEvent,\n ht as mousewheelEvent,\n yt as moveEvent,\n Te as nativeEvents,\n Xt as noop,\n Qn as normalizeOptions,\n V as normalizeValue,\n Jt as off,\n un as offsetHeight,\n ln as offsetWidth,\n jt as on,\n Kt as one,\n wt as orientationchangeEvent,\n Kn as passiveHandler,\n At as pointercancelEvent,\n St as pointerdownEvent,\n Mt as pointerleaveEvent,\n Nt as pointermoveEvent,\n kt as pointerupEvent,\n wo as querySelector,\n Mo as querySelectorAll,\n Tt as readystatechangeEvent,\n Xn as reflow,\n Dn as removeAttribute,\n Cn as removeAttributeNS,\n On as removeClass,\n rn as removeEventListener,\n Dt as resetEvent,\n Ct as resizeEvent,\n zt as scrollEvent,\n dn as scrollHeight,\n pn as scrollWidth,\n Lt as selectEvent,\n Ot as selectendEvent,\n It as selectstartEvent,\n kn as setAttribute,\n Tn as setAttributeNS,\n Yn as setElementStyle,\n xt as submitEvent,\n En as support3DTransform,\n wn as supportAnimation,\n bn as supportPassive,\n yn as supportTouch,\n hn as supportTransform,\n An as supportTransition,\n fn as tabindex,\n oe as toLowerCase,\n $n as toUpperCase,\n Pe as touchEvents,\n Ht as touchcancelEvent,\n Pt as touchendEvent,\n Bt as touchmoveEvent,\n Vt as touchstartEvent,\n Qt as transitionDelay,\n Rt as transitionDuration,\n C as transitionEndEvent,\n F as transitionProperty,\n Ut as unloadEvent,\n S as userAgent,\n A as userAgentData,\n To as version\n};\n//# sourceMappingURL=shorty.mjs.map\n","const N = [\"transparent\", \"currentColor\", \"inherit\", \"revert\", \"initial\"], b = (o) => {\n const t = Math.floor(o);\n return o - t < 0.5 ? t : Math.round(o);\n}, T = [\n [\n \"aliceblue\",\n {\n r: 240,\n g: 248,\n b: 255\n }\n ],\n [\n \"antiquewhite\",\n {\n r: 250,\n g: 235,\n b: 215\n }\n ],\n [\n \"aqua\",\n {\n r: 0,\n g: 255,\n b: 255\n }\n ],\n [\n \"aquamarine\",\n {\n r: 127,\n g: 255,\n b: 212\n }\n ],\n [\n \"azure\",\n {\n r: 240,\n g: 255,\n b: 255\n }\n ],\n [\n \"beige\",\n {\n r: 245,\n g: 245,\n b: 220\n }\n ],\n [\n \"bisque\",\n {\n r: 255,\n g: 228,\n b: 196\n }\n ],\n [\n \"black\",\n {\n r: 0,\n g: 0,\n b: 0\n }\n ],\n [\n \"blanchedalmond\",\n {\n r: 255,\n g: 235,\n b: 205\n }\n ],\n [\n \"blue\",\n {\n r: 0,\n g: 0,\n b: 255\n }\n ],\n [\n \"blueviolet\",\n {\n r: 138,\n g: 43,\n b: 226\n }\n ],\n [\n \"brown\",\n {\n r: 165,\n g: 42,\n b: 42\n }\n ],\n [\n \"burlywood\",\n {\n r: 222,\n g: 184,\n b: 135\n }\n ],\n [\n \"cadetblue\",\n {\n r: 95,\n g: 158,\n b: 160\n }\n ],\n [\n \"chartreuse\",\n {\n r: 127,\n g: 255,\n b: 0\n }\n ],\n [\n \"chocolate\",\n {\n r: 210,\n g: 105,\n b: 30\n }\n ],\n [\n \"coral\",\n {\n r: 255,\n g: 127,\n b: 80\n }\n ],\n [\n \"cornflowerblue\",\n {\n r: 100,\n g: 149,\n b: 237\n }\n ],\n [\n \"cornsilk\",\n {\n r: 255,\n g: 248,\n b: 220\n }\n ],\n [\n \"crimson\",\n {\n r: 220,\n g: 20,\n b: 60\n }\n ],\n [\n \"cyan\",\n {\n r: 0,\n g: 255,\n b: 255\n }\n ],\n [\n \"darkblue\",\n {\n r: 0,\n g: 0,\n b: 139\n }\n ],\n [\n \"darkcyan\",\n {\n r: 0,\n g: 139,\n b: 139\n }\n ],\n [\n \"darkgoldenrod\",\n {\n r: 184,\n g: 134,\n b: 11\n }\n ],\n [\n \"darkgray\",\n {\n r: 169,\n g: 169,\n b: 169\n }\n ],\n [\n \"darkgreen\",\n {\n r: 0,\n g: 100,\n b: 0\n }\n ],\n [\n \"darkgrey\",\n {\n r: 169,\n g: 169,\n b: 169\n }\n ],\n [\n \"darkkhaki\",\n {\n r: 189,\n g: 183,\n b: 107\n }\n ],\n [\n \"darkmagenta\",\n {\n r: 139,\n g: 0,\n b: 139\n }\n ],\n [\n \"darkolivegreen\",\n {\n r: 85,\n g: 107,\n b: 47\n }\n ],\n [\n \"darkorange\",\n {\n r: 255,\n g: 140,\n b: 0\n }\n ],\n [\n \"darkorchid\",\n {\n r: 153,\n g: 50,\n b: 204\n }\n ],\n [\n \"darkred\",\n {\n r: 139,\n g: 0,\n b: 0\n }\n ],\n [\n \"darksalmon\",\n {\n r: 233,\n g: 150,\n b: 122\n }\n ],\n [\n \"darkseagreen\",\n {\n r: 143,\n g: 188,\n b: 143\n }\n ],\n [\n \"darkslateblue\",\n {\n r: 72,\n g: 61,\n b: 139\n }\n ],\n [\n \"darkslategray\",\n {\n r: 47,\n g: 79,\n b: 79\n }\n ],\n [\n \"darkslategrey\",\n {\n r: 47,\n g: 79,\n b: 79\n }\n ],\n [\n \"darkturquoise\",\n {\n r: 0,\n g: 206,\n b: 209\n }\n ],\n [\n \"darkviolet\",\n {\n r: 148,\n g: 0,\n b: 211\n }\n ],\n [\n \"deeppink\",\n {\n r: 255,\n g: 20,\n b: 147\n }\n ],\n [\n \"deepskyblue\",\n {\n r: 0,\n g: 191,\n b: 255\n }\n ],\n [\n \"dimgray\",\n {\n r: 105,\n g: 105,\n b: 105\n }\n ],\n [\n \"dimgrey\",\n {\n r: 105,\n g: 105,\n b: 105\n }\n ],\n [\n \"dodgerblue\",\n {\n r: 30,\n g: 144,\n b: 255\n }\n ],\n [\n \"firebrick\",\n {\n r: 178,\n g: 34,\n b: 34\n }\n ],\n [\n \"floralwhite\",\n {\n r: 255,\n g: 250,\n b: 240\n }\n ],\n [\n \"forestgreen\",\n {\n r: 34,\n g: 139,\n b: 34\n }\n ],\n [\n \"fuchsia\",\n {\n r: 255,\n g: 0,\n b: 255\n }\n ],\n [\n \"gainsboro\",\n {\n r: 220,\n g: 220,\n b: 220\n }\n ],\n [\n \"ghostwhite\",\n {\n r: 248,\n g: 248,\n b: 255\n }\n ],\n [\n \"goldenrod\",\n {\n r: 218,\n g: 165,\n b: 32\n }\n ],\n [\n \"gold\",\n {\n r: 255,\n g: 215,\n b: 0\n }\n ],\n [\n \"gray\",\n {\n r: 128,\n g: 128,\n b: 128\n }\n ],\n [\n \"green\",\n {\n r: 0,\n g: 128,\n b: 0\n }\n ],\n [\n \"greenyellow\",\n {\n r: 173,\n g: 255,\n b: 47\n }\n ],\n [\n \"grey\",\n {\n r: 128,\n g: 128,\n b: 128\n }\n ],\n [\n \"honeydew\",\n {\n r: 240,\n g: 255,\n b: 240\n }\n ],\n [\n \"hotpink\",\n {\n r: 255,\n g: 105,\n b: 180\n }\n ],\n [\n \"indianred\",\n {\n r: 205,\n g: 92,\n b: 92\n }\n ],\n [\n \"indigo\",\n {\n r: 75,\n g: 0,\n b: 130\n }\n ],\n [\n \"ivory\",\n {\n r: 255,\n g: 255,\n b: 240\n }\n ],\n [\n \"khaki\",\n {\n r: 240,\n g: 230,\n b: 140\n }\n ],\n [\n \"lavenderblush\",\n {\n r: 255,\n g: 240,\n b: 245\n }\n ],\n [\n \"lavender\",\n {\n r: 230,\n g: 230,\n b: 250\n }\n ],\n [\n \"lawngreen\",\n {\n r: 124,\n g: 252,\n b: 0\n }\n ],\n [\n \"lemonchiffon\",\n {\n r: 255,\n g: 250,\n b: 205\n }\n ],\n [\n \"lightblue\",\n {\n r: 173,\n g: 216,\n b: 230\n }\n ],\n [\n \"lightcoral\",\n {\n r: 240,\n g: 128,\n b: 128\n }\n ],\n [\n \"lightcyan\",\n {\n r: 224,\n g: 255,\n b: 255\n }\n ],\n [\n \"lightgoldenrodyellow\",\n {\n r: 250,\n g: 250,\n b: 210\n }\n ],\n [\n \"lightgray\",\n {\n r: 211,\n g: 211,\n b: 211\n }\n ],\n [\n \"lightgreen\",\n {\n r: 144,\n g: 238,\n b: 144\n }\n ],\n [\n \"lightgrey\",\n {\n r: 211,\n g: 211,\n b: 211\n }\n ],\n [\n \"lightpink\",\n {\n r: 255,\n g: 182,\n b: 193\n }\n ],\n [\n \"lightsalmon\",\n {\n r: 255,\n g: 160,\n b: 122\n }\n ],\n [\n \"lightseagreen\",\n {\n r: 32,\n g: 178,\n b: 170\n }\n ],\n [\n \"lightskyblue\",\n {\n r: 135,\n g: 206,\n b: 250\n }\n ],\n [\n \"lightslategray\",\n {\n r: 119,\n g: 136,\n b: 153\n }\n ],\n [\n \"lightslategrey\",\n {\n r: 119,\n g: 136,\n b: 153\n }\n ],\n [\n \"lightsteelblue\",\n {\n r: 176,\n g: 196,\n b: 222\n }\n ],\n [\n \"lightyellow\",\n {\n r: 255,\n g: 255,\n b: 224\n }\n ],\n [\n \"lime\",\n {\n r: 0,\n g: 255,\n b: 0\n }\n ],\n [\n \"limegreen\",\n {\n r: 50,\n g: 205,\n b: 50\n }\n ],\n [\n \"linen\",\n {\n r: 250,\n g: 240,\n b: 230\n }\n ],\n [\n \"magenta\",\n {\n r: 255,\n g: 0,\n b: 255\n }\n ],\n [\n \"maroon\",\n {\n r: 128,\n g: 0,\n b: 0\n }\n ],\n [\n \"mediumaquamarine\",\n {\n r: 102,\n g: 205,\n b: 170\n }\n ],\n [\n \"mediumblue\",\n {\n r: 0,\n g: 0,\n b: 205\n }\n ],\n [\n \"mediumorchid\",\n {\n r: 186,\n g: 85,\n b: 211\n }\n ],\n [\n \"mediumpurple\",\n {\n r: 147,\n g: 112,\n b: 219\n }\n ],\n [\n \"mediumseagreen\",\n {\n r: 60,\n g: 179,\n b: 113\n }\n ],\n [\n \"mediumslateblue\",\n {\n r: 123,\n g: 104,\n b: 238\n }\n ],\n [\n \"mediumspringgreen\",\n {\n r: 0,\n g: 250,\n b: 154\n }\n ],\n [\n \"mediumturquoise\",\n {\n r: 72,\n g: 209,\n b: 204\n }\n ],\n [\n \"mediumvioletred\",\n {\n r: 199,\n g: 21,\n b: 133\n }\n ],\n [\n \"midnightblue\",\n {\n r: 25,\n g: 25,\n b: 112\n }\n ],\n [\n \"mintcream\",\n {\n r: 245,\n g: 255,\n b: 250\n }\n ],\n [\n \"mistyrose\",\n {\n r: 255,\n g: 228,\n b: 225\n }\n ],\n [\n \"moccasin\",\n {\n r: 255,\n g: 228,\n b: 181\n }\n ],\n [\n \"navajowhite\",\n {\n r: 255,\n g: 222,\n b: 173\n }\n ],\n [\n \"navy\",\n {\n r: 0,\n g: 0,\n b: 128\n }\n ],\n [\n \"oldlace\",\n {\n r: 253,\n g: 245,\n b: 230\n }\n ],\n [\n \"olive\",\n {\n r: 128,\n g: 128,\n b: 0\n }\n ],\n [\n \"olivedrab\",\n {\n r: 107,\n g: 142,\n b: 35\n }\n ],\n [\n \"orange\",\n {\n r: 255,\n g: 165,\n b: 0\n }\n ],\n [\n \"orangered\",\n {\n r: 255,\n g: 69,\n b: 0\n }\n ],\n [\n \"orchid\",\n {\n r: 218,\n g: 112,\n b: 214\n }\n ],\n [\n \"palegoldenrod\",\n {\n r: 238,\n g: 232,\n b: 170\n }\n ],\n [\n \"palegreen\",\n {\n r: 152,\n g: 251,\n b: 152\n }\n ],\n [\n \"paleturquoise\",\n {\n r: 175,\n g: 238,\n b: 238\n }\n ],\n [\n \"palevioletred\",\n {\n r: 219,\n g: 112,\n b: 147\n }\n ],\n [\n \"papayawhip\",\n {\n r: 255,\n g: 239,\n b: 213\n }\n ],\n [\n \"peachpuff\",\n {\n r: 255,\n g: 218,\n b: 185\n }\n ],\n [\n \"peru\",\n {\n r: 205,\n g: 133,\n b: 63\n }\n ],\n [\n \"pink\",\n {\n r: 255,\n g: 192,\n b: 203\n }\n ],\n [\n \"plum\",\n {\n r: 221,\n g: 160,\n b: 221\n }\n ],\n [\n \"powderblue\",\n {\n r: 176,\n g: 224,\n b: 230\n }\n ],\n [\n \"purple\",\n {\n r: 128,\n g: 0,\n b: 128\n }\n ],\n [\n \"rebeccapurple\",\n {\n r: 102,\n g: 51,\n b: 153\n }\n ],\n [\n \"red\",\n {\n r: 255,\n g: 0,\n b: 0\n }\n ],\n [\n \"rosybrown\",\n {\n r: 188,\n g: 143,\n b: 143\n }\n ],\n [\n \"royalblue\",\n {\n r: 65,\n g: 105,\n b: 225\n }\n ],\n [\n \"saddlebrown\",\n {\n r: 139,\n g: 69,\n b: 19\n }\n ],\n [\n \"salmon\",\n {\n r: 250,\n g: 128,\n b: 114\n }\n ],\n [\n \"sandybrown\",\n {\n r: 244,\n g: 164,\n b: 96\n }\n ],\n [\n \"seagreen\",\n {\n r: 46,\n g: 139,\n b: 87\n }\n ],\n [\n \"seashell\",\n {\n r: 255,\n g: 245,\n b: 238\n }\n ],\n [\n \"sienna\",\n {\n r: 160,\n g: 82,\n b: 45\n }\n ],\n [\n \"silver\",\n {\n r: 192,\n g: 192,\n b: 192\n }\n ],\n [\n \"skyblue\",\n {\n r: 135,\n g: 206,\n b: 235\n }\n ],\n [\n \"slateblue\",\n {\n r: 106,\n g: 90,\n b: 205\n }\n ],\n [\n \"slategray\",\n {\n r: 112,\n g: 128,\n b: 144\n }\n ],\n [\n \"slategrey\",\n {\n r: 112,\n g: 128,\n b: 144\n }\n ],\n [\n \"snow\",\n {\n r: 255,\n g: 250,\n b: 250\n }\n ],\n [\n \"springgreen\",\n {\n r: 0,\n g: 255,\n b: 127\n }\n ],\n [\n \"steelblue\",\n {\n r: 70,\n g: 130,\n b: 180\n }\n ],\n [\n \"tan\",\n {\n r: 210,\n g: 180,\n b: 140\n }\n ],\n [\n \"teal\",\n {\n r: 0,\n g: 128,\n b: 128\n }\n ],\n [\n \"thistle\",\n {\n r: 216,\n g: 191,\n b: 216\n }\n ],\n [\n \"tomato\",\n {\n r: 255,\n g: 99,\n b: 71\n }\n ],\n [\n \"turquoise\",\n {\n r: 64,\n g: 224,\n b: 208\n }\n ],\n [\n \"violet\",\n {\n r: 238,\n g: 130,\n b: 238\n }\n ],\n [\n \"wheat\",\n {\n r: 245,\n g: 222,\n b: 179\n }\n ],\n [\n \"white\",\n {\n r: 255,\n g: 255,\n b: 255\n }\n ],\n [\n \"whitesmoke\",\n {\n r: 245,\n g: 245,\n b: 245\n }\n ],\n [\n \"yellow\",\n {\n r: 255,\n g: 255,\n b: 0\n }\n ],\n [\n \"yellowgreen\",\n {\n r: 154,\n g: 205,\n b: 50\n }\n ]\n], B = \"deg|rad|grad|turn\", U = \"[-\\\\+]?\\\\d+%?\", D = \"[-\\\\+]?\\\\d*\\\\.\\\\d+%?\", L = `[-\\\\+]?\\\\d*\\\\.?\\\\d+(?:${B})?`, v = `(?:${D})|(?:${U})`, F = `(?:${v})|(?:${L}?)`, rr = \"(?:[\\\\s|\\\\(\\\\s|\\\\s\\\\(\\\\s]+)?\", tr = \"(?:[\\\\s|\\\\)\\\\s]+)?\", O = \"(?:[,|\\\\s]+)\", er = \"(?:[,|\\\\/\\\\s]*)?\", $ = `${rr}(${F})${O}(${v})${O}(${v})${er}(${v})?${tr}`, f = {\n CSS_UNIT: new RegExp(F),\n ANGLES: B,\n CSS_ANGLE: L,\n CSS_INTEGER: U,\n CSS_NUMBER: D,\n CSS_UNIT2: F,\n PERMISSIVE_MATCH: $,\n hwb: new RegExp(`hwb${$}`),\n rgb: new RegExp(`rgb(?:a)?${$}`),\n hsl: new RegExp(`hsl(?:a)?${$}`),\n hsv: new RegExp(`hsv(?:a)?${$}`),\n hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/\n}, V = (o) => N.includes(o), k = (o, t) => o !== null && typeof o == \"object\" && Object.keys(t).every((r) => r in o), Z = (o) => `${o}`.includes(\".\") && parseFloat(o) === 1, R = (o) => typeof o == \"string\" && o.includes(\"%\"), c = (o) => !!f.CSS_UNIT.exec(`${o}`), z = [\"rgb\", \"hex\", \"hsl\", \"hsv\", \"hwb\"], J = (o) => N.includes(o) || [\"#\", ...z].some((t) => o.includes(t)) ? !1 : T.some(([t]) => o === t), u = (o, t) => {\n let r = o;\n if (typeof o == \"number\" && Math.min(o, 0) === 0 && // round values to 6 decimals Math.round(N * (10 ** 6)) / 10 ** 6\n Math.max(o, 1) === 1)\n return o;\n Z(o) && (r = \"100%\");\n const e = R(r);\n return r = t === 360 ? parseFloat(r) : Math.min(t, Math.max(0, parseFloat(r))), e && (r = r * t / 100), Math.abs(r - t) < 1e-6 ? 1 : (t === 360 ? r = (r < 0 ? r % t + t : r % t) / t : r = r % t / t, r);\n}, M = (o) => {\n let t = parseFloat(o);\n return (Number.isNaN(t) || t < 0 || t > 1) && (t = 1), t;\n}, x = (o) => Math.min(1, Math.max(0, o)), p = (o) => o.length === 1 ? `0${o}` : String(o), K = (o) => {\n const [[, t]] = T.filter(([r]) => r === o.toLowerCase());\n return t;\n}, h = (o) => parseInt(o, 16), E = (o) => h(o) / 255, Q = (o) => b(o * 255).toString(16), _ = (o, t, r) => {\n const e = Math.max(o, t, r), s = Math.min(o, t, r);\n let n = 0, g = 0;\n const a = (e + s) / 2;\n if (e === s)\n g = 0, n = 0;\n else {\n const i = e - s;\n g = a > 0.5 ? i / (2 - e - s) : i / (e + s), e === o && (n = (t - r) / i + (t < r ? 6 : 0)), e === t && (n = (r - o) / i + 2), e === r && (n = (o - t) / i + 4), n /= 6;\n }\n return { h: n, s: g, l: a };\n}, H = (o, t, r) => {\n let e = r;\n return e < 0 && (e += 1), e > 1 && (e -= 1), e < 1 / 6 ? o + (t - o) * (6 * e) : e < 1 / 2 ? t : e < 2 / 3 ? o + (t - o) * (2 / 3 - e) * 6 : o;\n}, y = (o, t, r) => {\n let e = 0, s = 0, n = 0;\n if (t === 0)\n s = r, n = r, e = r;\n else if (r) {\n const g = r < 0.5 ? r * (1 + t) : r + t - r * t, a = 2 * r - g;\n e = H(a, g, o + 1 / 3), s = H(a, g, o), n = H(a, g, o - 1 / 3);\n }\n return { r: e, g: s, b: n };\n}, G = (o, t, r) => {\n let e = 0, s = 0;\n const n = Math.min(o, t, r), g = Math.max(o, t, r), a = 1 - g;\n if (g === n)\n return { h: 0, w: n, b: a };\n o === n ? (e = t - r, s = 3) : (e = t === n ? r - o : o - t, s = t === n ? 5 : 1);\n const i = (s - e / (g - n)) / 6;\n return {\n h: i === 1 ? 0 : i,\n w: n,\n b: a\n };\n}, X = (o, t, r) => {\n if (t + r >= 1) {\n const g = t / (t + r);\n return { r: g, g, b: g };\n }\n let { r: e, g: s, b: n } = y(o, 1, 0.5);\n return [e, s, n] = [e, s, n].map((g) => g * (1 - t - r) + t), { r: e, g: s, b: n };\n}, P = (o, t, r) => {\n const e = Math.max(o, t, r), s = Math.min(o, t, r);\n let n = 0;\n const g = e, a = e - s, i = e === 0 ? 0 : a / e;\n return e === s ? n = 0 : (o === e && (n = (t - r) / a + (t < r ? 6 : 0)), t === e && (n = (r - o) / a + 2), r === e && (n = (o - t) / a + 4), n /= 6), { h: n, s: i, v: g };\n}, I = (o, t, r) => {\n const e = o * 6, s = t, n = r, g = Math.floor(e), a = e - g, i = n * (1 - s), l = n * (1 - a * s), d = n * (1 - (1 - a) * s), m = g % 6, w = [n, l, i, i, d, n][m], S = [d, n, n, l, i, i][m], A = [i, i, d, n, n, l][m];\n return { r: w, g: S, b: A };\n}, j = (o, t, r, e) => {\n const s = [\n p(b(o).toString(16)),\n p(b(t).toString(16)),\n p(b(r).toString(16))\n ];\n return e && s[0].charAt(0) === s[0].charAt(1) && s[1].charAt(0) === s[1].charAt(1) && s[2].charAt(0) === s[2].charAt(1) ? s[0].charAt(0) + s[1].charAt(0) + s[2].charAt(0) : s.join(\"\");\n}, C = (o, t, r, e, s) => {\n const n = [\n p(b(o).toString(16)),\n p(b(t).toString(16)),\n p(b(r).toString(16)),\n p(Q(e))\n ];\n return s && n[0].charAt(0) === n[0].charAt(1) && n[1].charAt(0) === n[1].charAt(1) && n[2].charAt(0) === n[2].charAt(1) && n[3].charAt(0) === n[3].charAt(1) ? n[0].charAt(0) + n[1].charAt(0) + n[2].charAt(0) + n[3].charAt(0) : n.join(\"\");\n}, Y = (o) => {\n const t = String(o).trim().toLowerCase();\n if (J(t))\n return Object.assign(K(t), {\n a: 1,\n format: \"rgb\",\n ok: !0\n });\n if (V(t))\n return {\n r: 0,\n g: 0,\n b: 0,\n a: t === \"transparent\" ? 0 : 1,\n format: \"rgb\",\n ok: !0\n };\n let [, r, e, s, n] = f.rgb.exec(t) || [];\n return r && e && s ? {\n r,\n g: e,\n b: s,\n a: n !== void 0 ? n : 1,\n format: \"rgb\",\n ok: !0\n } : ([, r, e, s, n] = f.hsl.exec(t) || [], r && e && s ? {\n h: r,\n s: e,\n l: s,\n a: n !== void 0 ? n : 1,\n format: \"hsl\",\n ok: !0\n } : ([, r, e, s, n] = f.hsv.exec(t) || [], r && e && s ? {\n h: r,\n s: e,\n v: s,\n a: n !== void 0 ? n : 1,\n format: \"hsv\",\n ok: !0\n } : ([, r, e, s, n] = f.hwb.exec(t) || [], r && e && s ? {\n h: r,\n w: e,\n b: s,\n a: n !== void 0 ? n : 1,\n format: \"hwb\",\n ok: !0\n } : ([, r, e, s, n] = f.hex8.exec(t) || [], r && e && s && n ? {\n r: h(r),\n g: h(e),\n b: h(s),\n a: E(n),\n format: \"hex\",\n ok: !0\n } : ([, r, e, s] = f.hex6.exec(t) || [], r && e && s ? {\n r: h(r),\n g: h(e),\n b: h(s),\n a: 1,\n format: \"hex\",\n ok: !0\n } : ([, r, e, s, n] = f.hex4.exec(t) || [], r && e && s && n ? {\n r: h(r + r),\n g: h(e + e),\n b: h(s + s),\n a: E(n + n),\n format: \"hex\",\n ok: !0\n } : ([, r, e, s] = f.hex3.exec(t) || [], r && e && s ? {\n r: h(r + r),\n g: h(e + e),\n b: h(s + s),\n a: 1,\n format: \"hex\",\n ok: !0\n } : {\n r: 0,\n g: 0,\n b: 0,\n a: 1,\n format: \"rgb\",\n ok: !o\n })))))));\n}, q = (o) => {\n let t = { r: 0, g: 0, b: 0 }, r = o, e = 1, s, n, g, a, i, l, d, m, w = \"rgb\", S = !1;\n return (!r || typeof r == \"string\") && (r = Y(r), S = r.ok), k(r, t) && c(r.r) && c(r.g) && c(r.b) && ({ r: d, g: m, b: i } = r, [d, m, i] = [d, m, i].map((A) => u(A, R(A) ? 100 : 255)), t = { r: d, g: m, b: i }, w = \"format\" in r ? r.format : \"rgb\"), k(r, { h: 0, s: 0, v: 0 }) && c(r.h) && c(r.s) && c(r.v) && ({ h: l, s, v: n } = r, l = u(l, 360), s = u(s, 100), n = u(n, 100), t = I(l, s, n), w = \"hsv\"), k(r, { h: 0, s: 0, l: 0 }) && c(r.h) && c(r.s) && c(r.l) && ({ h: l, s, l: g } = r, l = u(l, 360), s = u(s, 100), g = u(g, 100), t = y(l, s, g), w = \"hsl\"), k(r, { h: 0, w: 0, b: 0 }) && c(r.h) && c(r.w) && c(r.b) && ({ h: l, w: a, b: i } = r, l = u(l, 360), a = u(a, 100), i = u(i, 100), t = X(l, a, i), w = \"hwb\"), c(r.a) && (e = r.a, e = R(e) || parseFloat(`${e}`) > 1 ? u(e, 100) : e), {\n r: t.r,\n g: t.g,\n b: t.b,\n a: M(e),\n format: w,\n ok: S\n };\n}, sr = \"1.0.7\";\nclass W {\n // bring main utilities to front\n static matchers = f;\n static isOnePointZero = Z;\n static isPercentage = R;\n static isValidCSSUnit = c;\n static isNonColor = V;\n static isColorName = J;\n static isColorType = k;\n static pad2 = p;\n static clamp01 = x;\n static bound01 = u;\n static boundAlpha = M;\n static getRGBFromName = K;\n static convertHexToDecimal = E;\n static convertDecimalToHex = Q;\n static rgbToHsl = _;\n static rgbToHex = j;\n static rgbToHsv = P;\n static rgbToHwb = G;\n static rgbaToHex = C;\n static hslToRgb = I;\n static hsvToRgb = I;\n static hueToRgb = H;\n static hwbToRgb = X;\n static parseIntFromHex = h;\n static stringInputToObject = Y;\n static inputToRGB = q;\n static roundPart = b;\n static webColors = T;\n static nonColors = N;\n static version = sr;\n // main public properties\n r;\n g;\n b;\n a;\n format;\n ok;\n originalInput;\n // main public methods\n constructor(t, r) {\n const e = r && z.includes(r) ? r : \"\", { r: s, g: n, b: g, a, ok: i, format: l } = q(t);\n this.originalInput = t, this.r = s, this.g = n, this.b = g, this.a = a, this.ok = i, this.format = e || l;\n }\n /**\n * Checks if the current input value is a valid colour.\n */\n get isValid() {\n return this.ok;\n }\n /**\n * Checks if the current colour requires a light text colour.\n */\n get isDark() {\n return this.brightness < 120;\n }\n /**\n * Returns the perceived luminance of a colour.\n *\n * @see http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef\n */\n get luminance() {\n const { r: t, g: r, b: e } = this;\n let s = 0, n = 0, g = 0;\n return t <= 0.03928 ? s = t / 12.92 : s = ((t + 0.055) / 1.055) ** 2.4, r <= 0.03928 ? n = r / 12.92 : n = ((r + 0.055) / 1.055) ** 2.4, e <= 0.03928 ? g = e / 12.92 : g = ((e + 0.055) / 1.055) ** 2.4, 0.2126 * s + 0.7152 * n + 0.0722 * g;\n }\n /**\n * Returns the perceived brightness of the colour.\n */\n get brightness() {\n const { r: t, g: r, b: e } = this.toRgb();\n return (t * 299 + r * 587 + e * 114) / 1e3;\n }\n /**\n * Returns the web colour name closest to the current colour.\n */\n get name() {\n const { r: t, g: r, b: e } = this.toRgb(), [s] = T.map(([n, g]) => {\n const a = (\n // ((rgb.r - r) ** 2 + (rgb.g - g) ** 2 + (rgb.b - b) ** 2) ** 0.5; // standard\n (((g.r - t) * 0.3) ** 2 + ((g.g - r) * 0.6) ** 2 + ((g.b - e) * 0.1) ** 2) ** 0.5\n );\n return [n, a];\n }).find(([, n], g, a) => n === Math.min(...a.map(([, i]) => i)));\n return s;\n }\n /**\n * Returns the colour as an RGBA object.\n */\n toRgb() {\n let { r: t, g: r, b: e, a: s } = this;\n return [t, r, e] = [t, r, e].map((n) => b(n * 255 * 100) / 100), s = b(s * 100) / 100, {\n r: t,\n g: r,\n b: e,\n a: s\n };\n }\n /**\n * Returns the RGBA values concatenated into a CSS3 Module string format.\n * * rgb(255,255,255)\n * * rgba(255,255,255,0.5)\n */\n toRgbString() {\n const { r: t, g: r, b: e, a: s } = this.toRgb(), [n, g, a] = [t, r, e].map(b);\n return s === 1 ? `rgb(${n}, ${g}, ${a})` : `rgba(${n}, ${g}, ${a}, ${s})`;\n }\n /**\n * Returns the RGBA values concatenated into a CSS4 Module string format.\n * * rgb(255 255 255)\n * * rgb(255 255 255 / 50%)\n */\n toRgbCSS4String() {\n const { r: t, g: r, b: e, a: s } = this.toRgb(), [n, g, a] = [t, r, e].map(b), i = s === 1 ? \"\" : ` / ${b(s * 100)}%`;\n return `rgb(${n} ${g} ${a}${i})`;\n }\n /**\n * Returns the hexadecimal value of the colour. When the parameter is *true*\n * it will find a 3 characters shorthand of the decimal value.\n */\n toHex(t) {\n const { r, g: e, b: s, a: n } = this.toRgb();\n return n === 1 ? j(r, e, s, t) : C(r, e, s, n, t);\n }\n /**\n * Returns the CSS valid hexadecimal vaue of the colour. When the parameter is *true*\n * it will find a 3 characters shorthand of the value.\n */\n toHexString(t) {\n return `#${this.toHex(t)}`;\n }\n /**\n * Returns the HEX8 value of the colour.\n */\n toHex8(t) {\n const { r, g: e, b: s, a: n } = this.toRgb();\n return C(r, e, s, n, t);\n }\n /**\n * Returns the HEX8 value of the colour.\n */\n toHex8String(t) {\n return `#${this.toHex8(t)}`;\n }\n /**\n * Returns the colour as a HSVA object.\n */\n toHsv() {\n const { r: t, g: r, b: e, a: s } = this, { h: n, s: g, v: a } = P(t, r, e);\n return {\n h: n,\n s: g,\n v: a,\n a: s\n };\n }\n /**\n * Returns the colour as an HSLA object.\n */\n toHsl() {\n const { r: t, g: r, b: e, a: s } = this, { h: n, s: g, l: a } = _(t, r, e);\n return {\n h: n,\n s: g,\n l: a,\n a: s\n };\n }\n /**\n * Returns the HSLA values concatenated into a CSS3 Module format string.\n * * `hsl(150, 100%, 50%)`\n * * `hsla(150, 100%, 50%, 0.5)`\n */\n toHslString() {\n let { h: t, s: r, l: e, a: s } = this.toHsl();\n return t = b(t * 360), r = b(r * 100), e = b(e * 100), s = b(s * 100) / 100, s === 1 ? `hsl(${t}, ${r}%, ${e}%)` : `hsla(${t}, ${r}%, ${e}%, ${s})`;\n }\n /**\n * Returns the HSLA values concatenated into a CSS4 Module format string.\n * * `hsl(150deg 100% 50%)`\n * * `hsl(150deg 100% 50% / 50%)`\n */\n toHslCSS4String() {\n let { h: t, s: r, l: e, a: s } = this.toHsl();\n t = b(t * 360), r = b(r * 100), e = b(e * 100), s = b(s * 100);\n const n = s < 100 ? ` / ${b(s)}%` : \"\";\n return `hsl(${t}deg ${r}% ${e}%${n})`;\n }\n /**\n * Returns the colour as an HWBA object.\n */\n toHwb() {\n const { r: t, g: r, b: e, a: s } = this, { h: n, w: g, b: a } = G(t, r, e);\n return {\n h: n,\n w: g,\n b: a,\n a: s\n };\n }\n /**\n * Returns the HWBA values concatenated into a string.\n */\n toHwbString() {\n let { h: t, w: r, b: e, a: s } = this.toHwb();\n t = b(t * 360), r = b(r * 100), e = b(e * 100), s = b(s * 100);\n const n = s < 100 ? ` / ${b(s)}%` : \"\";\n return `hwb(${t}deg ${r}% ${e}%${n})`;\n }\n /**\n * Sets the alpha value of the current colour.\n */\n setAlpha(t) {\n return typeof t != \"number\" ? this : (this.a = M(t), this);\n }\n /**\n * Saturate the colour with a given amount.\n */\n saturate(t) {\n if (typeof t != \"number\")\n return this;\n const { h: r, s: e, l: s } = this.toHsl(), { r: n, g, b: a } = y(r, x(e + t / 100), s);\n return Object.assign(this, { r: n, g, b: a }), this;\n }\n /**\n * Desaturate the colour with a given amount.\n */\n desaturate(t) {\n return typeof t == \"number\" ? this.saturate(-t) : this;\n }\n /**\n * Completely desaturates a colour into greyscale.\n * Same as calling `desaturate(100)`\n */\n greyscale() {\n return this.saturate(-100);\n }\n /**\n * Increase the colour lightness with a given amount.\n */\n lighten(t) {\n if (typeof t != \"number\")\n return this;\n const { h: r, s: e, l: s } = this.toHsl(), { r: n, g, b: a } = y(r, e, x(s + t / 100));\n return Object.assign(this, { r: n, g, b: a }), this;\n }\n /**\n * Decrease the colour lightness with a given amount.\n */\n darken(t) {\n return typeof t == \"number\" ? this.lighten(-t) : this;\n }\n /**\n * Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.\n * Values outside of this range will be wrapped into this range.\n */\n spin(t) {\n if (typeof t != \"number\")\n return this;\n const { h: r, s: e, l: s } = this.toHsl(), { r: n, g, b: a } = y(x((r * 360 + t) % 360 / 360), e, s);\n return Object.assign(this, { r: n, g, b: a }), this;\n }\n /** Returns a clone of the current `Color` instance. */\n clone() {\n return new W(this);\n }\n /**\n * Returns the colour value in CSS valid string format.\n */\n toString(t) {\n const { format: r } = this;\n return r === \"hex\" ? this.toHexString(t) : r === \"hsl\" ? this.toHslString() : r === \"hwb\" ? this.toHwbString() : this.toRgbString();\n }\n}\nexport {\n W as default\n};\n//# sourceMappingURL=index.mjs.map\n","import Color from '@thednp/color';\n// import { isNumber } from '@thednp/shorty';\n\n/**\n * Returns a color palette with a given set of parameters.\n *\n * @example\n * new ColorPalette(0, 12, 10, 80);\n * // => { hue: 0, hueSteps: 12, lightSteps: 10, saturation: 80, colors: Array<Color> }\n */\nexport default class ColorPalette {\n public static Color = Color;\n hue: number;\n hueSteps: number;\n lightSteps: number;\n saturation: number;\n colors: Color[];\n /**\n * The `hue` parameter is optional, which would be set to 0.\n * * `args.hue` the starting Hue [0, 360]\n * * `args.hueSteps` Hue Steps Count [5, 24]\n * * `args.lightSteps` Lightness Steps Count [5, 12]\n * * `args.saturation` Saturation [0, 100]\n */\n constructor(...args: [number?, number?, number?, number?]) {\n let hue = 0;\n let hueSteps = 12;\n let lightSteps = 10;\n let lightnessArray = [0.5];\n let saturation = 100;\n // if (!args.every(n => isNumber(n))) throw TypeError('ColorPalette only accepts numbers.');\n\n if (args.length === 4) {\n [hue, hueSteps, lightSteps, saturation] = args as [number, number, number, number];\n } else if (args.length === 3) {\n [hue, hueSteps, lightSteps] = args as [number, number, number];\n } else if (args.length === 2) {\n [hueSteps, lightSteps] = args as [number, number];\n if ([hueSteps, lightSteps].some(n => n < 1)) {\n throw TypeError('ColorPalette: the two minimum arguments must be numbers higher than 0.');\n }\n }\n\n const colors: Color[] = [];\n const hueStep = 360 / hueSteps;\n const half = Color.roundPart((lightSteps - (lightSteps % 2 ? 1 : 0)) / 2);\n const steps1To13 = [0.25, 0.2, 0.15, 0.11, 0.09, 0.075];\n const lightSets = [\n [1, 2, 3],\n [4, 5],\n [6, 7],\n [8, 9],\n [10, 11],\n [12, 13],\n ];\n const closestSet = lightSets.find(set => set.includes(lightSteps));\n\n // find a lightStep that won't go beyond black and white\n // something within the [10-90] range of lightness\n const lightStep = closestSet\n ? steps1To13[lightSets.indexOf(closestSet)]\n : 100 / (lightSteps + (lightSteps % 2 ? 0 : 1)) / 100;\n\n // light tints\n for (let i = 1; i < half + 1; i += 1) {\n lightnessArray = [...lightnessArray, 0.5 + lightStep * i];\n }\n\n // dark tints\n for (let i = 1; i < lightSteps - half; i += 1) {\n lightnessArray = [0.5 - lightStep * i, ...lightnessArray];\n }\n\n // feed `colors` Array\n for (let i = 0; i < hueSteps; i += 1) {\n const currentHue = ((hue + i * hueStep) % 360) / 360;\n lightnessArray.forEach(l => {\n const newColor = new Color({ h: currentHue, s: 1, l });\n colors.push(saturation < 100 ? newColor.saturate(saturation - 100) : newColor);\n });\n }\n\n this.hue = hue;\n this.hueSteps = hueSteps;\n this.lightSteps = lightSteps;\n this.saturation = saturation;\n this.colors = colors;\n }\n}\n","import ColorPickerLabels from '../interface/colorPickerLabels';\n\n/** The labels presented to the user. */\nconst colorPickerLabels: ColorPickerLabels = {\n pickerLabel: 'Colour Picker',\n appearanceLabel: 'Colour Appearance',\n valueLabel: 'Colour Value',\n toggleLabel: 'Select Colour',\n presetsLabel: 'Colour Presets',\n defaultsLabel: 'Colour Defaults',\n formatLabel: 'Format',\n alphaLabel: 'Alpha',\n hexLabel: 'Hexadecimal',\n hueLabel: 'Hue',\n whitenessLabel: 'Whiteness',\n blacknessLabel: 'Blackness',\n saturationLabel: 'Saturation',\n lightnessLabel: 'Lightness',\n redLabel: 'Red',\n greenLabel: 'Green',\n blueLabel: 'Blue',\n};\n\nexport default colorPickerLabels;\n","/** A list of 17 color names used for WAI-ARIA compliance. */\nconst colorNames: string[] = [\n 'white',\n 'black',\n 'grey',\n 'red',\n 'orange',\n 'brown',\n 'gold',\n 'olive',\n 'yellow',\n 'lime',\n 'green',\n 'teal',\n 'cyan',\n 'blue',\n 'violet',\n 'magenta',\n 'pink',\n];\nexport default colorNames;\n","import { isString } from '@thednp/shorty';\n\n/**\n * Check if a string is valid JSON string.\n *\n * @param str the string input\n * @returns the query result\n */\nconst isValidJSON = (str: unknown): str is string => {\n if (!isString(str)) return false;\n try {\n JSON.parse(str);\n } catch (e) {\n return false;\n }\n return true;\n};\n\nexport default isValidJSON;\n","const vHidden = 'v-hidden';\nexport default vHidden;\n","import { createElement, setAttribute, ObjectAssign, toUpperCase } from '@thednp/shorty';\n\nimport vHidden from './vHidden';\nimport ColorPicker from '../index';\n\n/**\n * Returns the color form for `ColorPicker`.\n *\n * @param self the `ColorPicker` instance\n * @returns a new `<div>` element with color component `<input>`\n */\nconst getColorForm = (self: ColorPicker): HTMLElement => {\n const { format, id, componentLabels } = self;\n const colorForm = createElement({\n tagName: 'div',\n className: `color-form ${format}`,\n }) as HTMLElement;\n\n let components = ['hex'];\n if (format === 'rgb') components = ['red', 'green', 'blue', 'alpha'];\n else if (format === 'hsl') components = ['hue', 'saturation', 'lightness', 'alpha'];\n else if (format === 'hwb') components = ['hue', 'whiteness', 'blackness', 'alpha'];\n\n components.forEach((c: string): void => {\n const [C] = format === 'hex' ? ['#'] : toUpperCase(c).split('');\n const cID = `color_${format}_${c}_${id}`;\n const formatLabel = componentLabels[`${c}Label`];\n const cInputLabel = createElement({ tagName: 'label' }) as HTMLElement;\n setAttribute(cInputLabel, 'for', cID);\n cInputLabel.append(\n createElement({\n tagName: 'span',\n ariaHidden: 'true',\n innerText: `${C}:`,\n }) as HTMLElement,\n createElement({\n tagName: 'span',\n className: vHidden,\n innerText: formatLabel,\n }) as HTMLElement,\n );\n const cInput = createElement({\n tagName: 'input',\n id: cID,\n // name: cID, - prevent saving the value to a form\n type: format === 'hex' ? 'text' : 'number',\n value: c === 'alpha' ? '100' : '0',\n className: `color-input ${c}`,\n autocomplete: 'off',\n spellcheck: false,\n } as Partial<HTMLInputElement>) as HTMLInputElement;\n\n // alpha\n let max = '100';\n let step = '1';\n if (c !== 'alpha') {\n if (format === 'rgb') {\n max = '255';\n step = '1';\n } else if (c === 'hue') {\n max = '360';\n step = '1';\n }\n }\n ObjectAssign(cInput, {\n min: '0',\n max,\n step,\n });\n colorForm.append(cInputLabel, cInput);\n });\n return colorForm;\n};\n\nexport default getColorForm;\n","import { createElement } from '@thednp/shorty';\n\nimport ColorPicker from '..';\n\n/**\n * Returns all color controls for `ColorPicker`.\n *\n * @param self the `ColorPicker` instance\n * @returns color controls\n */\nconst getColorControls = (self: ColorPicker): HTMLElement => {\n const { format, componentLabels } = self;\n const { hueLabel, alphaLabel, lightnessLabel, saturationLabel, whitenessLabel, blacknessLabel } = componentLabels;\n\n const max1 = format === 'hsl' ? 360 : 100;\n const max2 = format === 'hsl' ? 100 : 360;\n const max3 = 100;\n\n let ctrl1Label = format === 'hsl' ? `${hueLabel} & ${lightnessLabel}` : `${lightnessLabel} & ${saturationLabel}`;\n\n ctrl1Label = format === 'hwb' ? `${whitenessLabel} & ${blacknessLabel}` : ctrl1Label;\n\n const ctrl2Label = format === 'hsl' ? `${saturationLabel}` : `${hueLabel}`;\n\n const colorControls = createElement({\n tagName: 'div',\n className: `color-controls ${format}`,\n }) as HTMLElement;\n\n const colorPointer = 'color-pointer';\n const colorSlider = 'color-slider';\n\n const controls = [\n {\n i: 1,\n c: colorPointer,\n l: ctrl1Label,\n min: 0,\n max: max1,\n },\n {\n i: 2,\n c: colorSlider,\n l: ctrl2Label,\n min: 0,\n max: max2,\n },\n {\n i: 3,\n c: colorSlider,\n l: alphaLabel,\n min: 0,\n max: max3,\n },\n ];\n\n controls.forEach(template => {\n const { i, c, l, min, max } = template;\n const control = createElement({\n tagName: 'div',\n className: 'color-control',\n role: 'presentation',\n }) as HTMLElement;\n\n control.append(\n createElement({\n tagName: 'div',\n className: `visual-control visual-control${i}`,\n }) as HTMLElement,\n );\n\n const knob = createElement({\n tagName: 'div',\n className: `${c} knob`,\n ariaLive: 'polite',\n ariaLabel: l,\n role: 'slider',\n tabIndex: 0,\n ariaValueMin: `${min}`,\n ariaValueMax: `${max}`,\n }) as HTMLElement;\n\n control.append(knob);\n colorControls.append(control);\n });\n\n return colorControls;\n};\n\nexport default getColorControls;\n","import { setAttribute, getAttribute, createElement, setElementStyle } from '@thednp/shorty';\n\nimport Color from '@thednp/color';\nimport ColorPalette from '../colorPalette';\nimport ColorPicker from '../index';\n\n/**\n * Returns a color-defaults with given values and class.\n */\nconst getColorMenu = (self: ColorPicker, colorsSource: ColorPalette | string[], menuClass: string): HTMLElement => {\n const { input, format, componentLabels } = self;\n const { defaultsLabel, presetsLabel } = componentLabels;\n const isOptionsMenu = menuClass === 'color-options';\n const isPalette = colorsSource instanceof ColorPalette;\n const menuLabel = isOptionsMenu ? presetsLabel : defaultsLabel;\n const colorsArray = isPalette ? colorsSource.colors : colorsSource;\n const colorsCount = colorsArray.length;\n const { lightSteps } = isPalette ? colorsSource : { lightSteps: null };\n const fit = lightSteps || [9, 10].find(x => colorsCount >= x * 2 && !(colorsCount % x)) || 5;\n const isMultiLine = isOptionsMenu && colorsCount > fit;\n let rowCountHover = 2;\n rowCountHover = isMultiLine && colorsCount > fit * 2 ? 3 : rowCountHover;\n rowCountHover = isMultiLine && colorsCount > fit * 3 ? 4 : rowCountHover;\n rowCountHover = isMultiLine && colorsCount > fit * 4 ? 5 : rowCountHover;\n const rowCount = rowCountHover - (colorsCount <= fit * 3 ? 1 : 2);\n const isScrollable = isMultiLine && colorsCount > rowCount * fit;\n let finalClass = menuClass;\n finalClass += isScrollable ? ' scrollable' : '';\n finalClass += isMultiLine ? ' multiline' : '';\n const gap = isMultiLine ? '1px' : '0.25rem';\n let optionSize = isMultiLine ? 1.75 : 2;\n optionSize = fit > 5 && isMultiLine ? 1.5 : optionSize;\n const menuHeight = `${rowCount * optionSize}rem`;\n const menuHeightHover = `calc(${rowCountHover} * ${optionSize}rem + ${rowCountHover - 1} * ${gap})`;\n\n // <UL> is an `HTMLElement`\n const menu = createElement({\n tagName: 'ul',\n className: finalClass,\n role: 'listbox',\n ariaLabel: menuLabel,\n }) as HTMLElement;\n\n if (isScrollable) {\n setElementStyle(menu, {\n '--grid-item-size': `${optionSize}rem`,\n '--grid-fit': `${fit}`,\n '--grid-gap': gap,\n '--grid-height': menuHeight,\n '--grid-hover-height': menuHeightHover,\n });\n }\n\n colorsArray.forEach(x => {\n let [value, label] = typeof x === 'string' ? x.trim().split(':') : [];\n if (x instanceof Color) {\n value = x.toHexString();\n label = value;\n }\n const color = new Color(x instanceof Color ? x : value, format);\n const isActive = color.toString() === getAttribute(input, 'value');\n const active = isActive ? ' active' : '';\n\n const option = createElement({\n tagName: 'li',\n className: `color-option${active}`,\n innerText: `${label || value}`,\n tabIndex: 0,\n role: 'option',\n ariaSelected: isActive ? 'true' : 'false',\n }) as HTMLElement;\n setAttribute(option, 'data-value', `${value}`);\n\n if (isOptionsMenu) {\n setElementStyle(option, { backgroundColor: value });\n }\n\n menu.append(option);\n });\n return menu;\n};\n\nexport default getColorMenu;\n","import {\n getAttribute,\n setAttribute,\n toUpperCase,\n ariaHidden,\n tabindex,\n createElement,\n createElementNS,\n} from '@thednp/shorty';\n\nimport Color from '@thednp/color';\n\nimport getColorForm from './getColorForm';\nimport getColorControls from './getColorControls';\nimport getColorMenu from './getColorMenu';\nimport vHidden from './vHidden';\n\nimport ColorPicker from '../index';\n\n/**\n * Generate HTML markup and update instance properties.\n *\n * @param self\n */\nconst setMarkup = (self: ColorPicker) => {\n const { input, parent, format, id, componentLabels, colorKeywords, colorPresets } = self;\n const colorValue = getAttribute(input, 'value') || '#fff';\n const { nonColors } = Color;\n\n const { toggleLabel, pickerLabel, formatLabel, hexLabel } = componentLabels;\n\n // update color\n const color = nonColors.includes(colorValue) ? '#fff' : colorValue;\n self.color = new Color(color, format);\n\n // set initial controls dimensions\n const formatString = format === 'hex' ? hexLabel : toUpperCase(format);\n\n const pickerBtn = createElement({\n id: `picker-btn-${id}`,\n tagName: 'button',\n className: 'picker-toggle btn-appearance',\n ariaExpanded: 'false',\n ariaHasPopup: 'true',\n }) as HTMLElement;\n\n pickerBtn.append(\n createElement({\n tagName: 'span',\n className: vHidden,\n innerText: `${pickerLabel}. ${formatLabel}: ${formatString}`,\n }) as HTMLElement,\n );\n\n const pickerDropdown = createElement({\n tagName: 'div',\n className: 'color-dropdown picker',\n role: 'group',\n ariaLabelledBy: `picker-btn-${id}`,\n } as Partial<HTMLElement> & { ariaLabelledBy: string }) as HTMLElement;\n\n const colorControls = getColorControls(self);\n const colorForm = getColorForm(self);\n\n pickerDropdown.append(colorControls, colorForm);\n input.before(pickerBtn);\n parent.append(pickerDropdown);\n\n // set colour key menu template\n if (colorKeywords || colorPresets) {\n const presetsDropdown = createElement({\n tagName: 'div',\n className: 'color-dropdown scrollable menu',\n }) as HTMLElement;\n\n // color presets\n if (colorPresets) {\n presetsDropdown.append(getColorMenu(self, colorPresets, 'color-options'));\n }\n\n // explicit defaults [reset, initial, inherit, transparent, currentColor]\n // also custom defaults [default: #069, complementary: #930]\n if (colorKeywords && colorKeywords.length) {\n presetsDropdown.append(getColorMenu(self, colorKeywords, 'color-defaults'));\n }\n\n const presetsBtn = createElement({\n tagName: 'button',\n className: 'menu-toggle btn-appearance',\n tabIndex: -1,\n ariaExpanded: 'false',\n ariaHasPopup: 'true',\n }) as HTMLElement;\n\n const xmlns = encodeURI('http://www.w3.org/2000/svg');\n const presetsIcon = createElementNS(xmlns, {\n tagName: 'svg',\n }) as HTMLElement;\n setAttribute(presetsIcon, 'xmlns', xmlns);\n setAttribute(presetsIcon, 'viewBox', '0 0 512 512');\n setAttribute(presetsIcon, ariaHidden, 'true');\n\n const path = createElementNS(xmlns, {\n tagName: 'path',\n }) as HTMLElement;\n setAttribute(path, 'd', 'M98,158l157,156L411,158l27,27L255,368L71,185L98,158z');\n setAttribute(path, 'fill', '#fff');\n presetsIcon.append(path);\n presetsBtn.append(\n createElement({\n tagName: 'span',\n className: vHidden,\n innerText: `${toggleLabel}`,\n }) as HTMLElement,\n presetsIcon,\n );\n\n parent.append(presetsBtn, presetsDropdown);\n }\n\n // solve non-colors after settings save\n if (colorKeywords && nonColors.includes(colorValue)) {\n self.value = colorValue;\n }\n setAttribute(input, tabindex, '-1');\n};\n\nexport default setMarkup;\n","import { addListener, removeListener } from '@thednp/event-listener';\n\nimport {\n ariaDescription,\n ariaSelected,\n ariaValueNow,\n ariaValueText,\n ariaExpanded,\n keyArrowDown,\n keyArrowUp,\n keyArrowLeft,\n keyArrowRight,\n keyEnter,\n keySpace,\n keyEscape,\n focusinEvent,\n mouseclickEvent,\n keydownEvent,\n changeEvent,\n touchmoveEvent,\n pointerdownEvent,\n pointermoveEvent,\n pointerupEvent,\n tabindex,\n focusoutEvent,\n resizeEvent,\n keyupEvent,\n scrollEvent,\n dispatchEvent,\n getElementsByClassName,\n closest,\n querySelector,\n getElementTransitionDuration,\n getBoundingClientRect,\n getUID,\n getElementStyle,\n getDocumentElement,\n getDocument,\n ObjectAssign,\n Data,\n getInstance,\n setElementStyle,\n normalizeOptions,\n reflow,\n focus,\n hasClass,\n addClass,\n removeClass,\n setAttribute,\n getAttribute,\n removeAttribute,\n isArray,\n isString,\n getWindow,\n} from '@thednp/shorty';\n\n// ColorPicker Util\n// ================\nimport Color from '@thednp/color';\nimport type { RGBA, HWBA, HSLA, HSVA } from '@thednp/color';\n\nimport ColorPalette from './colorPalette';\nimport colorPickerLabels from './util/colorPickerLabels';\nimport colorNames from './util/colorNames';\nimport isValidJSON from './util/isValidJSON';\nimport setMarkup from './util/setMarkup';\n\nimport ColorPickerOptions from './interface/colorPickerOptions';\nimport ColorPickerLabels from './interface/colorPickerLabels';\nimport { version } from '../../package.json';\n\n// ColorPicker GC\n// ==============\nconst colorPickerString = 'color-picker';\nconst colorPickerSelector = `[data-function=\"${colorPickerString}\"]`;\nconst colorPickerParentSelector = `.${colorPickerString}`;\nconst colorPickerDefaults: ColorPickerOptions = {\n componentLabels: colorPickerLabels,\n colorLabels: colorNames,\n format: 'rgb',\n colorPresets: false,\n colorKeywords: false,\n};\nconst { roundPart, nonColors } = Color;\n\n// ColorPicker Static Methods\n// ==========================\nconst getColorPickerInstance = (element: HTMLInputElement) => getInstance<ColorPicker>(element, colorPickerString);\nconst initColorPicker = (element: HTMLInputElement) => new ColorPicker(element);\n\n// ColorPicker Private Methods\n// ===========================\n\n/**\n * Add / remove `ColorPicker` main event listeners.\n */\nconst toggleEvents = (self: ColorPicker, action?: boolean) => {\n const fn = action ? addListener : removeListener;\n const { input, pickerToggle, menuToggle } = self;\n\n fn(input, focusinEvent, self.showPicker);\n fn(pickerToggle, mouseclickEvent, self.togglePicker);\n\n if (menuToggle) {\n fn(menuToggle, mouseclickEvent, self.toggleMenu);\n }\n};\n\n/**\n * Add / remove `ColorPicker` event listeners active only when open.\n */\nconst toggleEventsOnShown = (self: ColorPicker, action?: boolean) => {\n const fn = action ? addListener : removeListener;\n const { input, colorMenu, parent } = self;\n const doc = getDocument(input);\n const win = getWindow(doc);\n\n fn(self.controls, pointerdownEvent, self.pointerDown as EventListener);\n self.controlKnobs.forEach(x => fn(x, keydownEvent, self.handleKnobs as EventListener));\n\n fn(win, scrollEvent, self.handleScroll);\n fn(win, resizeEvent, self.update);\n\n [input, ...self.inputs].forEach(x => fn(x, changeEvent, self.changeHandler));\n\n if (colorMenu) {\n fn(colorMenu, mouseclickEvent, self.menuClickHandler);\n fn(colorMenu, keydownEvent, self.menuKeyHandler as EventListener);\n }\n\n fn(doc, pointermoveEvent, self.pointerMove as EventListener);\n fn(doc, pointerupEvent, self.pointerUp as EventListener);\n fn(parent, focusoutEvent, self.handleFocusOut as EventListener);\n fn(doc, keyupEvent, self.handleDismiss as EventListener);\n};\n\n/**\n * Triggers the `ColorPicker` original event.\n */\nconst firePickerChange = (self: ColorPicker) => {\n dispatchEvent(self.input, new CustomEvent('colorpicker.change'));\n};\n\n/**\n * Hides a visible dropdown.\n */\nconst removePosition = (element: HTMLElement) => {\n /* istanbul ignore else */\n if (element) {\n ['bottom', 'top'].forEach(x => removeClass(element, x));\n }\n};\n\n/**\n * Shows a `ColorPicker` dropdown and close the curent open dropdown.\n */\nconst showDropdown = (self: ColorPicker, dropdown: HTMLElement) => {\n const { colorPicker, colorMenu, menuToggle, pickerToggle, parent } = self;\n const isPicker = dropdown === colorPicker;\n const openDropdown = isPicker ? colorMenu : colorPicker;\n const activeBtn = isPicker ? menuToggle : pickerToggle;\n const nextBtn = !isPicker ? menuToggle : pickerToggle;\n\n if (!hasClass(parent, 'open')) {\n addClass(parent, 'open');\n }\n if (openDropdown) {\n removeClass(openDropdown, 'show');\n removePosition(openDropdown);\n }\n addClass(dropdown, 'bottom');\n reflow(dropdown);\n addClass(dropdown, 'show');\n\n if (isPicker) self.update();\n\n if (!self.isOpen) {\n toggleEventsOnShown(self, true);\n self.updateDropdownPosition();\n self.isOpen = true;\n setAttribute(self.input, tabindex, '0');\n if (menuToggle) {\n setAttribute(menuToggle, tabindex, '0');\n }\n }\n\n setAttribute(nextBtn, ariaExpanded, 'true');\n if (activeBtn) {\n setAttribute(activeBtn, ariaExpanded, 'false');\n }\n};\n\n/**\n * Color Picker Web Component\n *\n * @see http://thednp.github.io/color-picker\n */\nexport default class ColorPicker {\n // bring utils to staic\n public static Color = Color;\n public static ColorPalette = ColorPalette;\n public static getInstance = getColorPickerInstance;\n public static init = initColorPicker;\n public static selector = colorPickerSelector;\n // utils important for render\n public static roundPart = roundPart;\n public static setElementStyle = setElementStyle;\n public static setAttribute = setAttribute;\n public static getBoundingClientRect = getBoundingClientRect;\n public static version = version;\n public static colorNames = colorNames;\n public static colorPickerLabels = colorPickerLabels;\n\n id: number;\n input: HTMLInputElement;\n color: Color;\n format = 'rgb';\n parent: HTMLElement;\n dragElement: HTMLElement | undefined;\n isOpen = false;\n controlPositions: {\n c1x: number;\n c1y: number;\n c2y: number;\n c3y: number;\n };\n colorLabels: Record<string, string> = {};\n colorKeywords: string[] | false;\n colorPresets: ColorPalette | string[] | false;\n componentLabels: ColorPickerLabels;\n pickerToggle: HTMLElement;\n menuToggle: HTMLElement;\n colorPicker: HTMLElement;\n colorMenu: HTMLElement;\n controls: HTMLElement;\n inputs: HTMLInputElement[];\n controlKnobs: HTMLElement[];\n visuals: HTMLElement[];\n\n /**\n * Returns a new `ColorPicker` instance. The target of this constructor\n * must be an `HTMLInputElement`.\n *\n * @param target the target `<input>` element\n * @param config instance options\n */\n constructor(target: (HTMLElement & HTMLInputElement) | string, config?: Partial<ColorPickerOptions>) {\n const input = querySelector(target) as HTMLInputElement;\n\n // invalidate\n if (typeof target === 'undefined') throw new TypeError(`ColorPicker target not specified.`);\n if (isString(target) && !input) throw new TypeError(`ColorPicker target \"${target}\" cannot be found.`);\n this.input = input;\n\n const parent = closest(input, colorPickerParentSelector);\n if (!parent) throw new TypeError('ColorPicker requires a specific markup to work.');\n\n this.parent = parent;\n this.id = getUID(input, colorPickerString);\n this.dragElement = undefined;\n this.isOpen = false;\n this.controlPositions = {\n c1x: 0,\n c1y: 0,\n c2y: 0,\n c3y: 0,\n };\n this.colorLabels = {};\n this.colorKeywords = false;\n this.colorPresets = false;\n\n // process options\n const { format, componentLabels, colorLabels, colorKeywords, colorPresets } = normalizeOptions(\n input,\n colorPickerDefaults,\n config || {},\n );\n\n let translatedColorLabels = colorNames;\n /* istanbul ignore else */\n if (isArray(colorLabels) && colorLabels.length === 17) {\n translatedColorLabels = colorLabels;\n } else if (isString(colorLabels) && colorLabels.split(',').length === 17) {\n translatedColorLabels = colorLabels.split(',');\n }\n\n // expose colour labels to all methods\n colorNames.forEach((c, i) => {\n this.colorLabels[c] = translatedColorLabels[i].trim();\n });\n\n // update and expose component labels\n const tempComponentLabels =\n isString(componentLabels) && isValidJSON(componentLabels)\n ? (JSON.parse(componentLabels) as ColorPickerLabels)\n : componentLabels;\n this.componentLabels = ObjectAssign({ ...colorPickerLabels }, tempComponentLabels);\n this.color = new Color(input.value || '#fff', format);\n this.format = format;\n\n // set colour defaults\n if (isArray(colorKeywords) && colorKeywords.length) {\n this.colorKeywords = colorKeywords;\n } else if (isString(colorKeywords) && colorKeywords.length) {\n this.colorKeywords = colorKeywords.split(',').map(x => x.trim());\n }\n\n // set colour presets\n if (isArray(colorPresets) && colorPresets.length) {\n this.colorPresets = colorPresets;\n } else if (colorPresets && isValidJSON(colorPresets)) {\n const { hue, hueSteps, lightSteps, saturation } = JSON.parse(colorPresets) as {\n hue: number;\n hueSteps: number;\n lightSteps: number;\n saturation: number;\n };\n this.colorPresets = new ColorPalette(hue, hueSteps, lightSteps, saturation);\n } else if (isString(colorPresets)) {\n this.colorPresets = colorPresets.split(',').map((x: string) => x.trim());\n }\n\n // generate markup\n setMarkup(this);\n\n const [colorPicker, colorMenu] = getElementsByClassName('color-dropdown', parent);\n // set main elements\n this.pickerToggle = querySelector('.picker-toggle', parent) as HTMLElement;\n this.menuToggle = querySelector('.menu-toggle', parent) as HTMLElement;\n this.colorPicker = colorPicker;\n this.colorMenu = colorMenu;\n this.inputs = [...getElementsByClassName('color-input', parent)] as HTMLInputElement[];\n const [controls] = getElementsByClassName('color-controls', parent);\n this.controls = controls;\n this.controlKnobs = [...getElementsByClassName('knob', controls)];\n this.visuals = [...getElementsByClassName('visual-control', controls)];\n\n // update colour picker controls, inputs and visuals\n this.update();\n // console.log(this)\n\n // add main events listeners\n toggleEvents(this, true);\n\n // set component data\n Data.set(input, colorPickerString, this);\n }\n\n /** Returns the current colour value */\n get value(): string {\n return this.input.value;\n }\n\n /**\n * Sets a new colour value.\n *\n * @param {string} v new colour value\n */\n set value(v: string) {\n this.input.value = v;\n }\n\n /** Check if the colour presets include any non-colour. */\n get hasNonColor(): boolean {\n return this.colorKeywords instanceof Array && this.colorKeywords.some(x => nonColors.includes(x));\n }\n\n /** Returns hexadecimal value of the current colour. */\n get hex(): string {\n return this.color.toHex(true);\n }\n\n /** Returns the current colour value in {h,s,v,a} object format. */\n get hsv(): HSVA {\n return this.color.toHsv();\n }\n\n /** Returns the current colour value in {h,s,l,a} object format. */\n get hsl(): HSLA {\n return this.color.toHsl();\n }\n\n /** Returns the current colour value in {h,w,b,a} object format. */\n get hwb(): HWBA {\n return this.color.toHwb();\n }\n\n /** Returns the current colour value in {r,g,b,a} object format. */\n get rgb(): RGBA {\n return this.color.toRgb();\n }\n\n /** Returns the current colour brightness. */\n get brightness(): number {\n return this.color.brightness;\n }\n\n /** Returns the current colour luminance. */\n get luminance(): number {\n return this.color.luminance;\n }\n\n /** Checks if the current colour requires a light text colour. */\n get isDark(): boolean {\n const { color, brightness } = this;\n return brightness < 120 && color.a > 0.33;\n }\n\n /** Checks if the current input value is a valid colour. */\n get isValid(): boolean {\n const inputValue = this.input.value;\n return inputValue !== '' && new Color(inputValue).isValid;\n }\n\n /** Returns the colour appearance, usually the closest colour name for the current value. */\n get appearance(): string {\n const { colorLabels, hsl, hsv, format } = this;\n\n const hue = roundPart(hsl.h * 360);\n const saturationSource = format === 'hsl' ? hsl.s : hsv.s;\n const saturation = roundPart(saturationSource * 100);\n const lightness = roundPart(hsl.l * 100);\n const hsvl = hsv.v * 100;\n\n let colorName = 'black';\n\n // determine color appearance\n /* istanbul ignore else */\n if (lightness === 100 && saturation === 0) {\n colorName = colorLabels.white;\n } else if (lightness === 0) {\n colorName = colorLabels.black;\n } else if (saturation === 0) {\n colorName = colorLabels.grey;\n } else if (hue < 15 || hue >= 345) {\n colorName = colorLabels.red;\n } else if (hue >= 15 && hue < 45) {\n colorName = hsvl > 80 && saturation > 80 ? colorLabels.orange : colorLabels.brown;\n } else if (hue >= 45 && hue < 75) {\n const isGold = hue > 46 && hue < 54 && hsvl < 80 && saturation > 90;\n const isOlive = hue >= 54 && hue < 75 && hsvl < 80;\n colorName = isGold ? colorLabels.gold : colorLabels.yellow;\n colorName = isOlive ? colorLabels.olive : colorName;\n } else if (hue >= 75 && hue < 155) {\n colorName = hsvl < 68 ? colorLabels.green : colorLabels.lime;\n } else if (hue >= 155 && hue < 175) {\n colorName = colorLabels.teal;\n } else if (hue >= 175 && hue < 195) {\n colorName = colorLabels.cyan;\n } else if (hue >= 195 && hue < 255) {\n colorName = colorLabels.blue;\n } else if (hue >= 255 && hue < 270) {\n colorName = colorLabels.violet;\n } else if (hue >= 270 && hue < 295) {\n colorName = colorLabels.magenta;\n } else if (hue >= 295 && hue < 345) {\n colorName = colorLabels.pink;\n }\n return colorName;\n }\n\n /** Updates `ColorPicker` visuals. */\n updateVisuals(): void {\n const { controlPositions, visuals } = this;\n const [v1, v2, v3] = visuals;\n const { offsetHeight } = v1;\n const hue = controlPositions.c2y / offsetHeight;\n const { r, g, b } = new Color({ h: hue, s: 1, l: 0.5 }).toRgb();\n const whiteGrad = 'linear-gradient(rgb(255,255,255) 0%, rgb(255,255,255) 100%)';\n const alpha = 1 - controlPositions.c3y / offsetHeight;\n const roundA = roundPart(alpha * 100) / 100;\n\n const fill = new Color({\n h: hue,\n s: 1,\n l: 0.5,\n a: alpha,\n }).toRgbString();\n const hueGradient = `linear-gradient(\n rgb(255,0,0) 0%, rgb(255,255,0) 16.67%,\n rgb(0,255,0) 33.33%, rgb(0,255,255) 50%,\n rgb(0,0,255) 66.67%, rgb(255,0,255) 83.33%,\n rgb(255,0,0) 100%)`;\n setElementStyle(v1, {\n background: `linear-gradient(rgba(0,0,0,0) 0%, rgba(0,0,0,${roundA}) 100%),\n linear-gradient(to right, rgba(255,255,255,${roundA}) 0%, ${fill} 100%),\n ${whiteGrad}`,\n });\n setElementStyle(v2, { background: hueGradient });\n\n setElementStyle(v3, {\n background: `linear-gradient(rgba(${r},${g},${b},1) 0%,rgba(${r},${g},${b},0) 100%)`,\n });\n }\n\n /**\n * The `ColorPicker` *focusout* event listener when open.\n *\n * @param e\n * @this {ColorPicker}\n */\n handleFocusOut = ({ relatedTarget }: FocusEvent & { relatedTarget: HTMLElement }): void => {\n if (relatedTarget && !this.parent.contains(relatedTarget)) {\n this.hide(true);\n }\n };\n\n /**\n * The `ColorPicker` *keyup* event listener when open.\n *\n * @param e\n * @this {ColorPicker}\n */\n handleDismiss = ({ code }: KeyboardEvent): void => {\n if (this.isOpen && code === keyEscape) {\n this.hide();\n }\n };\n\n /**\n * The `ColorPicker` *scroll* event listener when open.\n *\n * @param e\n * @this {ColorPicker}\n */\n handleScroll = (e: Event): void => {\n const { activeElement } = getDocument(this.input);\n\n this.updateDropdownPosition();\n\n /* istanbul ignore next */\n if (\n ([pointermoveEvent, touchmoveEvent].includes(e.type) && this.dragElement) ||\n (activeElement && this.controlKnobs.includes(activeElement as HTMLElement))\n ) {\n e.stopPropagation();\n e.preventDefault();\n }\n };\n\n /**\n * The `ColorPicker` keyboard event listener for menu navigation.\n *\n * @param e\n */\n menuKeyHandler = (e: Event & { target: HTMLElement; code: string }) => {\n const { target, code } = e;\n const { previousElementSibling, nextElementSibling, parentElement } = target;\n const isColorOptionsMenu = parentElement && hasClass(parentElement, 'color-options');\n const allSiblings = parentElement ? [...parentElement.children] : [];\n const columnsCount =\n isColorOptionsMenu && getElementStyle(parentElement, 'grid-template-columns').split(' ').length;\n const currentIndex = allSiblings.indexOf(target);\n const previousElement = currentIndex > -1 && columnsCount && allSiblings[currentIndex - columnsCount];\n const nextElement = currentIndex > -1 && columnsCount && allSiblings[currentIndex + columnsCount];\n\n if ([keyArrowDown, keyArrowUp, keySpace].includes(code)) {\n // prevent scroll when navigating the menu via arrow keys / Space\n e.preventDefault();\n }\n if (isColorOptionsMenu) {\n if (previousElement && code === keyArrowUp) {\n focus(previousElement as HTMLElement);\n } else if (nextElement && code === keyArrowDown) {\n focus(nextElement as HTMLElement);\n } else if (previousElementSibling && code === keyArrowLeft) {\n focus(previousElementSibling as HTMLElement);\n } else if (nextElementSibling && code === keyArrowRight) {\n focus(nextElementSibling as HTMLElement);\n }\n } else if (previousElementSibling && [keyArrowLeft, keyArrowUp].includes(code)) {\n focus(previousElementSibling as HTMLElement);\n } else if (nextElementSibling && [keyArrowRight, keyArrowDown].includes(code)) {\n focus(nextElementSibling as HTMLElement);\n }\n\n if ([keyEnter, keySpace].includes(code)) {\n this.menuClickHandler(e);\n }\n };\n\n /**\n * The `ColorPicker` click event listener for the colour menu presets / defaults.\n *\n * @param e\n * @this {ColorPicker}\n */\n menuClickHandler = (e: Event): void => {\n const { target } = e;\n const { colorMenu } = this;\n const newOption = (getAttribute(target as HTMLElement, 'data-value') || '').trim();\n // invalidate for targets other than color options\n if (!newOption.length) return;\n const currentActive = querySelector('li.active', colorMenu);\n let newColor = newOption;\n newColor = nonColors.includes(newColor) ? 'white' : newColor;\n newColor = newColor === 'transparent' ? 'rgba(0,0,0,0)' : newColor;\n\n const { r, g, b, a } = new Color(newColor);\n\n ObjectAssign(this.color, {\n r,\n g,\n b,\n a,\n });\n\n this.update();\n\n /* istanbul ignore else */\n if (currentActive !== target) {\n /* istanbul ignore else */\n if (currentActive) {\n removeClass(currentActive, 'active');\n removeAttribute(currentActive, ariaSelected);\n }\n\n addClass(target as HTMLElement, 'active');\n setAttribute(target as HTMLElement, ariaSelected, 'true');\n\n if (nonColors.includes(newOption)) {\n this.value = newOption;\n }\n firePickerChange(this);\n }\n };\n\n /**\n * The `ColorPicker` *touchstart* / *mousedown* events listener for control knobs.\n *\n * @param e\n */\n pointerDown = (e: Event & { target: HTMLElement; pageX: number; pageY: number }) => {\n const { target, pageX, pageY } = e;\n const { colorMenu, visuals, controlKnobs } = this;\n const [v1, v2, v3] = visuals;\n const [c1, c2, c3] = controlKnobs;\n const visual = controlKnobs.includes(target) ? (target.previousElementSibling as HTMLElement) : target;\n const visualRect = getBoundingClientRect(visual);\n const html = getDocumentElement(v1);\n const offsetX = pageX - html.scrollLeft - visualRect.left;\n const offsetY = pageY - html.scrollTop - visualRect.top;\n\n /* istanbul ignore else */\n if (target === v1 || target === c1) {\n this.dragElement = visual;\n this.changeControl1(offsetX, offsetY);\n } else if (target === v2 || target === c2) {\n this.dragElement = visual;\n this.changeControl2(offsetY);\n } else if (target === v3 || target === c3) {\n this.dragElement = visual;\n this.changeAlpha(offsetY);\n }\n\n if (colorMenu) {\n const currentActive = querySelector('li.active', colorMenu);\n if (currentActive) {\n removeClass(currentActive, 'active');\n removeAttribute(currentActive, ariaSelected);\n }\n }\n e.preventDefault();\n };\n\n /**\n * The `ColorPicker` *touchend* / *mouseup* events listener for control knobs.\n *\n * @param e\n * @this\n */\n pointerUp = ({ target }: PointerEvent & { target: HTMLElement }) => {\n const { parent } = this;\n const doc = getDocument(parent);\n const currentOpen = querySelector(`${colorPickerParentSelector}.open`, doc) !== null;\n const selection = doc.getSelection();\n\n if (!this.dragElement && (!selection || !selection.toString().length) && !parent.contains(target)) {\n this.hide(currentOpen);\n }\n\n this.dragElement = undefined;\n };\n\n /**\n * The `ColorPicker` *touchmove* / *mousemove* events listener for control knobs.\n *\n * @param {PointerEvent} e\n */\n pointerMove = (e: PointerEvent): void => {\n const { dragElement, visuals } = this;\n const [v1, v2, v3] = visuals;\n const { pageX, pageY } = e;\n\n if (!dragElement) return;\n\n const controlRect = getBoundingClientRect(dragElement);\n const win = getDocumentElement(v1);\n const offsetX = pageX - win.scrollLeft - controlRect.left;\n const offsetY = pageY - win.scrollTop - controlRect.top;\n\n if (dragElement === v1) {\n this.changeControl1(offsetX, offsetY);\n }\n\n if (dragElement === v2) {\n this.changeControl2(offsetY);\n }\n\n if (dragElement === v3) {\n this.changeAlpha(offsetY);\n }\n };\n\n /**\n * The `ColorPicker` *keydown* event listener for control knobs.\n *\n * @param e\n */\n handleKnobs = (e: Event & { code: string }) => {\n const { target, code } = e;\n\n // only react to arrow buttons\n if (![keyArrowUp, keyArrowDown, keyArrowLeft, keyArrowRight].includes(code)) return;\n e.preventDefault();\n\n const { controlKnobs, visuals } = this;\n const { offsetWidth, offsetHeight } = visuals[0];\n const [c1, c2, c3] = controlKnobs;\n const { activeElement } = getDocument(c1);\n const currentKnob = controlKnobs.find(x => x === activeElement);\n const yRatio = offsetHeight / 360;\n\n /* istanbul ignore else */\n if (currentKnob) {\n let offsetX = 0;\n let offsetY = 0;\n\n /* istanbul ignore else */\n if (target === c1) {\n const xRatio = offsetWidth / 100;\n\n /* istanbul ignore else */\n if ([keyArrowLeft, keyArrowRight].includes(code)) {\n this.controlPositions.c1x += code === keyArrowRight ? xRatio : -xRatio;\n } else if ([keyArrowUp, keyArrowDown].includes(code)) {\n this.controlPositions.c1y += code === keyArrowDown ? yRatio : -yRatio;\n }\n\n offsetX = this.controlPositions.c1x;\n offsetY = this.controlPositions.c1y;\n this.changeControl1(offsetX, offsetY);\n } else if (target === c2) {\n this.controlPositions.c2y += [keyArrowDown, keyArrowRight].includes(code) ? yRatio : -yRatio;\n\n offsetY = this.controlPositions.c2y;\n this.changeControl2(offsetY);\n } else if (target === c3) {\n this.controlPositions.c3y += [keyArrowDown, keyArrowRight].includes(code) ? yRatio : -yRatio;\n\n offsetY = this.controlPositions.c3y;\n this.changeAlpha(offsetY);\n }\n this.handleScroll(e);\n }\n };\n\n /** The event listener of the colour form inputs. */\n changeHandler = (): void => {\n let colorSource;\n const { inputs, format, value: currentValue, input, controlPositions, visuals } = this;\n const { activeElement } = getDocument(input);\n const { offsetHeight } = visuals[0];\n const [i1, , , i4] = inputs;\n const [v1, v2, v3, v4] =\n format === 'rgb'\n ? inputs.map(i => parseFloat(i.value) / (i === i4 ? 100 : 1))\n : inputs.map(i => parseFloat(i.value) / (i !== i1 ? 100 : 360));\n const isNonColorValue = this.hasNonColor && nonColors.includes(currentValue);\n const alpha = i4 ? v4 : 1 - controlPositions.c3y / offsetHeight;\n\n /* istanbul ignore else */\n if (activeElement === input || (activeElement && inputs.includes(activeElement as HTMLInputElement))) {\n if (activeElement === input) {\n if (isNonColorValue) {\n colorSource = currentValue === 'transparent' ? 'rgba(0,0,0,0)' : 'rgb(0,0,0)';\n } else {\n colorSource = currentValue;\n }\n } else if (format === 'hex') {\n colorSource = i1.value;\n } else if (format === 'hsl') {\n colorSource = {\n h: v1,\n s: v2,\n l: v3,\n a: alpha,\n };\n } else if (format === 'hwb') {\n colorSource = {\n h: v1,\n w: v2,\n b: v3,\n a: alpha,\n };\n } else {\n colorSource = {\n r: v1,\n g: v2,\n b: v3,\n a: alpha,\n };\n }\n\n const { r, g, b, a } = new Color(colorSource);\n\n ObjectAssign(this.color, {\n r,\n g,\n b,\n a,\n });\n this.setControlPositions();\n this.updateAppearance();\n this.updateInputs();\n this.updateControls();\n this.updateVisuals();\n\n // set non-color keyword\n if (activeElement === input && isNonColorValue) {\n this.value = currentValue;\n }\n }\n };\n\n /**\n * Updates `ColorPicker` first control:\n * * `lightness` and `saturation` for HEX/RGB;\n * * `lightness` and `hue` for HSL.\n *\n * @param X the X component of the offset\n * @param Y the Y component of the offset\n */\n changeControl1(X: number, Y: number): void {\n let [offsetX, offsetY] = [0, 0];\n const { controlPositions, visuals } = this;\n const { offsetHeight, offsetWidth } = visuals[0];\n\n if (X > offsetWidth) offsetX = offsetWidth;\n else if (X >= 0) offsetX = X;\n\n if (Y > offsetHeight) offsetY = offsetHeight;\n else if (Y >= 0) offsetY = Y;\n\n const hue = controlPositions.c2y / offsetHeight;\n\n const saturation = offsetX / offsetWidth;\n\n const lightness = 1 - offsetY / offsetHeight;\n const alpha = 1 - controlPositions.c3y / offsetHeight;\n\n // new color\n const { r, g, b, a } = new Color({\n h: hue,\n s: saturation,\n v: lightness,\n a: alpha,\n });\n\n ObjectAssign(this.color, {\n r,\n g,\n b,\n a,\n });\n\n // new positions\n this.controlPositions.c1x = offsetX;\n this.controlPositions.c1y = offsetY;\n\n // update color picker\n this.updateAppearance();\n this.updateInputs();\n this.updateControls();\n this.updateVisuals();\n }\n\n /**\n * Updates `ColorPicker` second control:\n * * `hue` for HEX/RGB/HWB;\n * * `saturation` for HSL.\n *\n * @param Y the Y offset\n */\n changeControl2(Y: number) {\n const { controlPositions, visuals } = this;\n const { offsetHeight, offsetWidth } = visuals[0];\n\n let offsetY = 0;\n\n if (Y > offsetHeight) offsetY = offsetHeight;\n else if (Y >= 0) offsetY = Y;\n\n const hue = offsetY / offsetHeight;\n const saturation = controlPositions.c1x / offsetWidth;\n const lightness = 1 - controlPositions.c1y / offsetHeight;\n const alpha = 1 - controlPositions.c3y / offsetHeight;\n\n // new color\n const { r, g, b, a } = new Color({\n h: hue,\n s: saturation,\n v: lightness,\n a: alpha,\n });\n\n ObjectAssign(this.color, {\n r,\n g,\n b,\n a,\n });\n\n // new position\n this.controlPositions.c2y = offsetY;\n // update color picker\n this.updateAppearance();\n this.updateInputs();\n this.updateControls();\n this.updateVisuals();\n }\n\n /**\n * Updates `ColorPicker` last control,\n * the `alpha` channel.\n *\n * @param Y\n */\n changeAlpha(Y: number) {\n const { visuals } = this;\n const { offsetHeight } = visuals[0];\n let offsetY = 0;\n\n if (Y > offsetHeight) offsetY = offsetHeight;\n else if (Y >= 0) offsetY = Y;\n\n // update color alpha\n const alpha = 1 - offsetY / offsetHeight;\n this.color.setAlpha(alpha);\n // update position\n this.controlPositions.c3y = offsetY;\n // update color picker\n this.updateAppearance();\n this.updateInputs();\n this.updateControls();\n this.updateVisuals();\n }\n\n /**\n * Updates `ColorPicker` control positions on:\n * * initialization\n * * window resize\n */\n update = () => {\n this.updateDropdownPosition();\n this.updateAppearance();\n this.setControlPositions();\n this.updateInputs(true);\n this.updateControls();\n this.updateVisuals();\n };\n\n /** Updates the open dropdown position on *scroll* event. */\n updateDropdownPosition() {\n const { input, colorPicker, colorMenu } = this;\n const elRect = getBoundingClientRect(input);\n const { top, bottom } = elRect;\n const { offsetHeight: elHeight } = input;\n const windowHeight = getDocumentElement(input).clientHeight;\n const isPicker = hasClass(colorPicker, 'show');\n const dropdown = isPicker ? colorPicker : colorMenu;\n if (!dropdown) return;\n const { offsetHeight: dropHeight } = dropdown;\n const distanceBottom = windowHeight - bottom;\n const distanceTop = top;\n const bottomExceed = top + dropHeight + elHeight > windowHeight; // show\n const topExceed = top - dropHeight < 0; // show-top\n\n if ((hasClass(dropdown, 'bottom') || !topExceed) && distanceBottom < distanceTop && bottomExceed) {\n removeClass(dropdown, 'bottom');\n addClass(dropdown, 'top');\n } else {\n removeClass(dropdown, 'top');\n addClass(dropdown, 'bottom');\n }\n }\n\n /** Updates control knobs' positions. */\n setControlPositions() {\n const { visuals, color, hsv } = this;\n const { offsetHeight, offsetWidth } = visuals[0];\n const alpha = color.a;\n const hue = hsv.h;\n\n const saturation = hsv.s;\n const lightness = hsv.v;\n\n this.controlPositions.c1x = saturation * offsetWidth;\n this.controlPositions.c1y = (1 - lightness) * offsetHeight;\n this.controlPositions.c2y = hue * offsetHeight;\n this.controlPositions.c3y = (1 - alpha) * offsetHeight;\n }\n\n /** Update the visual appearance label and control knob labels. */\n updateAppearance() {\n const { componentLabels, color, parent, hsv, hex, format, controlKnobs } = this;\n const { appearanceLabel, hexLabel, valueLabel } = componentLabels;\n let { r, g, b } = color.toRgb();\n const [knob1, knob2, knob3] = controlKnobs;\n const hue = roundPart(hsv.h * 360);\n const alpha = color.a;\n const saturation = roundPart(hsv.s * 100);\n const lightness = roundPart(hsv.v * 100);\n const colorName = this.appearance;\n\n let colorLabel = `${hexLabel} ${hex.split('').join(' ')}`;\n\n if (format === 'hwb') {\n const { hwb } = this;\n const whiteness = roundPart(hwb.w * 100);\n const blackness = roundPart(hwb.b * 100);\n colorLabel = `HWB: ${hue}°, ${whiteness}%, ${blackness}%`;\n setAttribute(knob1, ariaValueText, `${whiteness}% & ${blackness}%`);\n setAttribute(knob1, ariaValueNow, `${whiteness}`);\n setAttribute(knob2, ariaDescription, `${valueLabel}: ${colorLabel}. ${appearanceLabel}: ${colorName}.`);\n setAttribute(knob2, ariaValueText, `${hue}%`);\n setAttribute(knob2, ariaValueNow, `${hue}`);\n } else {\n [r, g, b] = [r, g, b].map(roundPart);\n colorLabel = format === 'hsl' ? `HSL: ${hue}°, ${saturation}%, ${lightness}%` : colorLabel;\n colorLabel = format === 'rgb' ? `RGB: ${r}, ${g}, ${b}` : colorLabel;\n\n setAttribute(knob1, ariaValueText, `${lightness}% & ${saturation}%`);\n setAttribute(knob1, ariaValueNow, `${lightness}`);\n setAttribute(knob2, ariaDescription, `${valueLabel}: ${colorLabel}. ${appearanceLabel}: ${colorName}.`);\n setAttribute(knob2, ariaValueText, `${hue}°`);\n setAttribute(knob2, ariaValueNow, `${hue}`);\n }\n\n const alphaValue = roundPart(alpha * 100);\n setAttribute(knob3, ariaValueText, `${alphaValue}%`);\n setAttribute(knob3, ariaValueNow, `${alphaValue}`);\n\n // update the input backgroundColor\n const newColor = color.toString();\n setElementStyle(this.input, { backgroundColor: newColor });\n\n // toggle dark/light classes will also style the placeholder\n // dark sets color white, light sets color black\n // isDark ? '#000' : '#fff'\n if (!this.isDark) {\n if (hasClass(parent, 'txt-dark')) removeClass(parent, 'txt-dark');\n if (!hasClass(parent, 'txt-light')) addClass(parent, 'txt-light');\n } else {\n if (hasClass(parent, 'txt-light')) removeClass(parent, 'txt-light');\n if (!hasClass(parent, 'txt-dark')) addClass(parent, 'txt-dark');\n }\n }\n\n /** Updates the control knobs actual positions. */\n updateControls() {\n const { controlKnobs, controlPositions } = this;\n let { c1x, c1y, c2y, c3y } = controlPositions;\n const [control1, control2, control3] = controlKnobs;\n // round control positions\n [c1x, c1y, c2y, c3y] = [c1x, c1y, c2y, c3y].map(roundPart);\n\n setElementStyle(control1, {\n transform: `translate3d(${c1x - 4}px,${c1y - 4}px,0)`,\n });\n setElementStyle(control2, { transform: `translate3d(0,${c2y - 4}px,0)` });\n setElementStyle(control3, { transform: `translate3d(0,${c3y - 4}px,0)` });\n }\n\n /**\n * Updates all color form inputs.\n *\n * @param isPrevented when `true`, the component original event is prevented\n */\n updateInputs(isPrevented?: boolean) {\n const { value: oldColor, format, inputs, color, hsl } = this;\n const [i1, i2, i3, i4] = inputs;\n const alpha = roundPart(color.a * 100);\n const hue = roundPart(hsl.h * 360);\n let newColor = color.toString();\n\n /* istanbul ignore else */\n if (format === 'hex') {\n newColor = this.color.toHexString(true);\n i1.value = this.hex;\n } else if (format === 'hsl') {\n const lightness = roundPart(hsl.l * 100);\n const saturation = roundPart(hsl.s * 100);\n newColor = this.color.toHslString();\n i1.value = `${hue}`;\n i2.value = `${saturation}`;\n i3.value = `${lightness}`;\n i4.value = `${alpha}`;\n } else if (format === 'hwb') {\n const { w, b } = this.hwb;\n const whiteness = roundPart(w * 100);\n const blackness = roundPart(b * 100);\n\n newColor = this.color.toHwbString();\n i1.value = `${hue}`;\n i2.value = `${whiteness}`;\n i3.value = `${blackness}`;\n i4.value = `${alpha}`;\n } else if (format === 'rgb') {\n let { r, g, b } = this.rgb;\n [r, g, b] = [r, g, b].map(roundPart);\n\n newColor = this.color.toRgbString();\n i1.value = `${r}`;\n i2.value = `${g}`;\n i3.value = `${b}`;\n i4.value = `${alpha}`;\n }\n\n // update the color value\n this.value = newColor;\n\n // don't trigger the custom event unless it's really changed\n if (!isPrevented && newColor !== oldColor) {\n firePickerChange(this);\n }\n }\n\n /**\n * Toggle the `ColorPicker` dropdown visibility.\n *\n * @param e\n */\n togglePicker = (e?: Event) => {\n if (e) e.preventDefault();\n const { colorPicker } = this;\n\n if (this.isOpen && hasClass(colorPicker, 'show')) {\n this.hide(true);\n } else {\n showDropdown(this, colorPicker);\n }\n };\n\n /** Shows the `ColorPicker` dropdown. */\n showPicker = () => {\n const { colorPicker } = this;\n\n if (!['top', 'bottom'].some(c => hasClass(colorPicker, c))) {\n showDropdown(this, colorPicker);\n }\n };\n\n /**\n * Toggles the visibility of the `ColorPicker` presets menu.\n *\n * @param e\n * @this {ColorPicker}\n */\n toggleMenu = (e?: Event) => {\n if (e) e.preventDefault();\n const { colorMenu } = this;\n\n if (this.isOpen && hasClass(colorMenu, 'show')) {\n this.hide(true);\n } else {\n showDropdown(this, colorMenu);\n }\n };\n\n /**\n * Hides the currently open `ColorPicker` dropdown.\n *\n * @param {boolean=} focusPrevented\n */\n hide(focusPrevented?: boolean) {\n if (this.isOpen) {\n const { pickerToggle, menuToggle, colorPicker, colorMenu, parent, input } = this;\n const openPicker = hasClass(colorPicker, 'show');\n const openDropdown = openPicker ? colorPicker : colorMenu;\n const relatedBtn = openPicker ? pickerToggle : menuToggle;\n const animationDuration = openDropdown && getElementTransitionDuration(openDropdown);\n\n this.value = this.color.toString(true);\n\n /* istanbul ignore else */\n if (openDropdown) {\n removeClass(openDropdown, 'show');\n setAttribute(relatedBtn, ariaExpanded, 'false');\n setTimeout(() => {\n removePosition(openDropdown);\n /* istanbul ignore else */\n if (!querySelector('.show', parent)) {\n removeClass(parent, 'open');\n toggleEventsOnShown(this);\n this.isOpen = false;\n }\n }, animationDuration);\n }\n\n if (!focusPrevented) {\n focus(pickerToggle);\n }\n setAttribute(input, tabindex, '-1');\n if (relatedBtn === menuToggle) {\n setAttribute(menuToggle, tabindex, '-1');\n }\n }\n }\n\n /** Removes `ColorPicker` from target `<input>`. */\n dispose() {\n const { input, parent } = this;\n this.hide(true);\n toggleEvents(this);\n [...parent.children].forEach(el => {\n if (el !== input) el.remove();\n });\n\n removeAttribute(input, tabindex);\n setElementStyle(input, { backgroundColor: '' });\n\n ['txt-light', 'txt-dark'].forEach(c => removeClass(parent, c));\n Data.remove(input, colorPickerString);\n }\n}\n"],"names":["e","f","t","c","i","n","s","o","a","r","E","d","fe","ge","Ee","Ae","Ne","ke","K","P","_","tt","st","rt","it","St","Nt","kt","Ct","zt","Bt","Re","Qe","qe","Ge","Ye","Ze","on","Rt","F","fn","qt","A","Gt","S","z","x","M","jt","Jt","Kt","Xt","Yt","kn","Dn","Ln","On","In","v","u","O","Bn","N","W","R","k","Zt","$t","Q","g","ne","Rn","V","w","oe","Qn","l","p","y","q","Xn","Yn","I","$n","h","T","B","H","b","ae","so","ie","le","wo","No","U","D","L","rr","tr","er","$","Z","J","G","X","m","j","C","Y","sr","ColorPalette","Color","args","hue","hueSteps","lightSteps","lightnessArray","saturation","colors","hueStep","half","steps1To13","lightSets","closestSet","set","lightStep","currentHue","newColor","colorPickerLabels","colorNames","isValidJSON","str","isString","vHidden","getColorForm","self","format","id","componentLabels","colorForm","createElement","components","toUpperCase","cID","formatLabel","cInputLabel","setAttribute","cInput","max","step","ObjectAssign","getColorControls","hueLabel","alphaLabel","lightnessLabel","saturationLabel","whitenessLabel","blacknessLabel","max1","max2","max3","ctrl1Label","ctrl2Label","colorControls","colorPointer","colorSlider","template","min","control","knob","getColorMenu","colorsSource","menuClass","input","defaultsLabel","presetsLabel","isOptionsMenu","isPalette","menuLabel","colorsArray","colorsCount","fit","isMultiLine","rowCountHover","rowCount","isScrollable","finalClass","gap","optionSize","menuHeight","menuHeightHover","menu","setElementStyle","value","label","isActive","getAttribute","option","setMarkup","parent","colorKeywords","colorPresets","colorValue","nonColors","toggleLabel","pickerLabel","hexLabel","color","formatString","pickerBtn","pickerDropdown","presetsDropdown","presetsBtn","xmlns","presetsIcon","createElementNS","ariaHidden","path","tabindex","colorPickerString","colorPickerSelector","colorPickerParentSelector","colorPickerDefaults","roundPart","getColorPickerInstance","element","getInstance","initColorPicker","ColorPicker","toggleEvents","action","addListener","removeListener","pickerToggle","menuToggle","focusinEvent","mouseclickEvent","toggleEventsOnShown","colorMenu","doc","getDocument","win","getWindow","pointerdownEvent","keydownEvent","scrollEvent","resizeEvent","changeEvent","pointermoveEvent","pointerupEvent","focusoutEvent","keyupEvent","firePickerChange","dispatchEvent","removePosition","removeClass","showDropdown","dropdown","colorPicker","isPicker","openDropdown","activeBtn","nextBtn","hasClass","addClass","reflow","ariaExpanded","getBoundingClientRect","version","target","config","querySelector","closest","getUID","colorLabels","normalizeOptions","translatedColorLabels","isArray","tempComponentLabels","getElementsByClassName","controls","Data","brightness","inputValue","hsl","hsv","saturationSource","lightness","hsvl","colorName","isGold","isOlive","controlPositions","visuals","v1","v2","v3","offsetHeight","whiteGrad","alpha","roundA","fill","hueGradient","relatedTarget","code","keyEscape","activeElement","touchmoveEvent","previousElementSibling","nextElementSibling","parentElement","isColorOptionsMenu","allSiblings","columnsCount","getElementStyle","currentIndex","previousElement","nextElement","keyArrowDown","keyArrowUp","keySpace","focus","keyArrowLeft","keyArrowRight","keyEnter","newOption","currentActive","removeAttribute","ariaSelected","pageX","pageY","controlKnobs","c1","c2","c3","visual","visualRect","html","getDocumentElement","offsetX","offsetY","currentOpen","selection","dragElement","controlRect","offsetWidth","currentKnob","yRatio","xRatio","colorSource","inputs","currentValue","i1","i4","v4","isNonColorValue","elRect","top","bottom","elHeight","windowHeight","dropHeight","distanceBottom","distanceTop","bottomExceed","topExceed","hex","appearanceLabel","valueLabel","knob1","knob2","knob3","colorLabel","hwb","whiteness","blackness","ariaValueText","ariaValueNow","ariaDescription","alphaValue","c1x","c1y","c2y","c3y","control1","control2","control3","isPrevented","oldColor","i2","i3","focusPrevented","openPicker","relatedBtn","animationDuration","getElementTransitionDuration","el"],"mappings":"AAAK,MAACA,IAAI,CAAE,GAAEC,KAAI,CAACC,MAAM;AACvB,QAAM,EAAE,MAAMC,GAAG,eAAeC,EAAC,IAAKF;AACtC,GAAC,GAAGF,EAAEG,CAAC,CAAC,EAAE,QAAQ,CAAC,CAACE,GAAGC,CAAC,MAAM;AAC5B,IAAAF,MAAMC,KAAK,CAAC,GAAGC,CAAC,EAAE,QAAQ,CAAC,CAACC,GAAGC,CAAC,MAAM;AACpC,MAAAD,EAAE,MAAMF,GAAG,CAACH,CAAC,CAAC,GAAG,OAAOM,KAAK,YAAYA,EAAE,QAAQC,GAAEJ,GAAGF,GAAGI,GAAGC,CAAC;AAAA,IACrE,CAAK;AAAA,EACL,CAAG;AACH,GAAGE,K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,GAAeM,CAAY,GAEtBW,EAAc,SAASxE,CAAM,MAChCwD,EAAYxD,GAAQ,MAAM,GAC1BsC,GAAoB,IAAI,GACxB,KAAK,SAAS;AAAA,SAEf6J,CAAiB,IAGjBH,KACHtE,EAAMxF,CAAY,GAEPvF,EAAA2B,GAAO6C,GAAU,IAAI,GAC9B+K,MAAe/J,KACJxF,EAAAwF,GAAYhB,GAAU,IAAI;AAAA;AAAA,EAG7C;AAAA;AAAA,EAGA,UAAU;AACF,UAAA,EAAE,OAAA7C,GAAO,QAAA0B,EAAW,IAAA;AAC1B,SAAK,KAAK,EAAI,GACd8B,GAAa,IAAI,GACjB,CAAC,GAAG9B,EAAO,QAAQ,EAAE,QAAQ,CAAMqM,MAAA;AACjC,MAAIA,MAAO/N,KAAO+N,EAAG,OAAO;AAAA,IAAA,CAC7B,GAEDrE,GAAgB1J,GAAO6C,CAAQ,GAC/B1B,EAAgBnB,GAAO,EAAE,iBAAiB,GAAI,CAAA,GAE7C,CAAA,aAAa,UAAU,EAAE,QAAQ,OAAKkF,EAAYxD,GAAQrM,CAAC,CAAC,GACxDuR,GAAA,OAAO5G,GAAO8C,CAAiB;AAAA,EACtC;AACF;","x_google_ignoreList":[0,1,2]}
1
+ {"version":3,"file":"color-picker.mjs","sources":["../../node_modules/@thednp/event-listener/dist/event-listener.mjs","../../node_modules/@thednp/shorty/dist/shorty.mjs","../../node_modules/@thednp/color/dist/index.mjs","../../src/ts/colorPalette.ts","../../src/ts/util/colorPickerLabels.ts","../../src/ts/util/colorNames.ts","../../src/ts/util/isValidJSON.ts","../../src/ts/util/vHidden.ts","../../src/ts/util/getColorForm.ts","../../src/ts/util/getColorControls.ts","../../src/ts/util/getColorMenu.ts","../../src/ts/util/setMarkup.ts","../../src/ts/index.ts"],"sourcesContent":["const e = {}, f = (t) => {\n const { type: c, currentTarget: i } = t;\n [...e[c]].forEach(([n, s]) => {\n i === n && [...s].forEach(([o, a]) => {\n o.apply(n, [t]), typeof a == \"object\" && a.once && r(n, c, o, a);\n });\n });\n}, E = (t, c, i, n) => {\n e[c] || (e[c] = /* @__PURE__ */ new Map());\n const s = e[c];\n s.has(t) || s.set(t, /* @__PURE__ */ new Map());\n const o = s.get(t), { size: a } = o;\n o.set(i, n), a || t.addEventListener(c, f, n);\n}, r = (t, c, i, n) => {\n const s = e[c], o = s && s.get(t), a = o && o.get(i), d = a !== void 0 ? a : n;\n o && o.has(i) && o.delete(i), s && (!o || !o.size) && s.delete(t), (!s || !s.size) && delete e[c], (!o || !o.size) && t.removeEventListener(c, f, d);\n}, g = E, M = r;\nexport {\n E as addListener,\n f as globalListener,\n M as off,\n g as on,\n e as registry,\n r as removeListener\n};\n//# sourceMappingURL=event-listener.mjs.map\n","const pe = \"aria-checked\", fe = \"aria-description\", me = \"aria-describedby\", ge = \"aria-expanded\", ve = \"aria-haspopup\", Ee = \"aria-hidden\", be = \"aria-label\", he = \"aria-labelledby\", ye = \"aria-modal\", we = \"aria-pressed\", Ae = \"aria-selected\", Se = \"aria-valuemin\", Me = \"aria-valuemax\", Ne = \"aria-valuenow\", ke = \"aria-valuetext\", G = \"abort\", j = \"beforeunload\", J = \"blur\", K = \"change\", X = \"contextmenu\", P = \"DOMContentLoaded\", Y = \"DOMMouseScroll\", Z = \"error\", $ = \"focus\", _ = \"focusin\", tt = \"focusout\", et = \"gesturechange\", nt = \"gestureend\", ot = \"gesturestart\", st = \"keydown\", ct = \"keypress\", rt = \"keyup\", at = \"load\", it = \"click\", ut = \"dblclick\", lt = \"mousedown\", dt = \"mouseup\", pt = \"hover\", ft = \"mouseenter\", mt = \"mouseleave\", gt = \"mousein\", vt = \"mouseout\", Et = \"mouseover\", bt = \"mousemove\", ht = \"mousewheel\", yt = \"move\", wt = \"orientationchange\", At = \"pointercancel\", St = \"pointerdown\", Mt = \"pointerleave\", Nt = \"pointermove\", kt = \"pointerup\", Tt = \"readystatechange\", Dt = \"reset\", Ct = \"resize\", Lt = \"select\", Ot = \"selectend\", It = \"selectstart\", zt = \"scroll\", xt = \"submit\", Vt = \"touchstart\", Bt = \"touchmove\", Ht = \"touchcancel\", Pt = \"touchend\", Ut = \"unload\", Te = {\n DOMContentLoaded: P,\n DOMMouseScroll: Y,\n abort: G,\n beforeunload: j,\n blur: J,\n change: K,\n click: it,\n contextmenu: X,\n dblclick: ut,\n error: Z,\n focus: $,\n focusin: _,\n focusout: tt,\n gesturechange: et,\n gestureend: nt,\n gesturestart: ot,\n hover: pt,\n keydown: st,\n keypress: ct,\n keyup: rt,\n load: at,\n mousedown: lt,\n mousemove: bt,\n mousein: gt,\n mouseout: vt,\n mouseenter: ft,\n mouseleave: mt,\n mouseover: Et,\n mouseup: dt,\n mousewheel: ht,\n move: yt,\n orientationchange: wt,\n pointercancel: At,\n pointerdown: St,\n pointerleave: Mt,\n pointermove: Nt,\n pointerup: kt,\n readystatechange: Tt,\n reset: Dt,\n resize: Ct,\n scroll: zt,\n select: Lt,\n selectend: Ot,\n selectstart: It,\n submit: xt,\n touchcancel: Ht,\n touchend: Pt,\n touchmove: Bt,\n touchstart: Vt,\n unload: Ut\n}, De = \"drag\", Ce = \"dragstart\", Le = \"dragenter\", Oe = \"dragleave\", Ie = \"dragover\", ze = \"dragend\", xe = \"loadstart\", Ve = {\n start: \"mousedown\",\n end: \"mouseup\",\n move: \"mousemove\",\n cancel: \"mouseleave\"\n}, Be = { down: \"mousedown\", up: \"mouseup\" }, He = \"onmouseleave\" in document ? [\"mouseenter\", \"mouseleave\"] : (\n /* istanbul ignore next */\n [\"mouseover\", \"mouseout\"]\n), Pe = {\n start: \"touchstart\",\n end: \"touchend\",\n move: \"touchmove\",\n cancel: \"touchcancel\"\n}, Ue = { in: \"focusin\", out: \"focusout\" }, Fe = {\n Backspace: \"Backspace\",\n // 8\n Tab: \"Tab\",\n // 9\n Enter: \"Enter\",\n // 13\n Shift: \"Shift\",\n // 16\n Control: \"Control\",\n // 17\n Alt: \"Alt\",\n // 18\n Pause: \"Pause\",\n // 19\n CapsLock: \"CapsLock\",\n // 20\n Escape: \"Escape\",\n // 27\n Scape: \"Space\",\n // 32\n ArrowLeft: \"ArrowLeft\",\n // 37\n ArrowUp: \"ArrowUp\",\n // 38\n ArrowRight: \"ArrowRight\",\n // 39\n ArrowDown: \"ArrowDown\",\n // 40\n Insert: \"Insert\",\n // 45\n Delete: \"Delete\",\n // 46\n Meta: \"Meta\",\n // 91 windows key\n ContextMenu: \"ContextMenu\",\n // 93\n ScrollLock: \"ScrollLock\"\n // 145\n}, We = \"Alt\", Re = \"ArrowDown\", Qe = \"ArrowUp\", qe = \"ArrowLeft\", Ge = \"ArrowRight\", je = \"Backspace\", Je = \"CapsLock\", Ke = \"Control\", Xe = \"Delete\", Ye = \"Enter\", Ze = \"Escape\", $e = \"Insert\", _e = \"Meta\", tn = \"Pause\", en = \"ScrollLock\", nn = \"Shift\", on = \"Space\", sn = \"Tab\", Ft = \"animationDuration\", Wt = \"animationDelay\", U = \"animationName\", D = \"animationend\", Rt = \"transitionDuration\", Qt = \"transitionDelay\", C = \"transitionend\", F = \"transitionProperty\", cn = \"addEventListener\", rn = \"removeEventListener\", an = {\n linear: \"linear\",\n easingSinusoidalIn: \"cubic-bezier(0.47,0,0.745,0.715)\",\n easingSinusoidalOut: \"cubic-bezier(0.39,0.575,0.565,1)\",\n easingSinusoidalInOut: \"cubic-bezier(0.445,0.05,0.55,0.95)\",\n easingQuadraticIn: \"cubic-bezier(0.550,0.085,0.680,0.530)\",\n easingQuadraticOut: \"cubic-bezier(0.250,0.460,0.450,0.940)\",\n easingQuadraticInOut: \"cubic-bezier(0.455,0.030,0.515,0.955)\",\n easingCubicIn: \"cubic-bezier(0.55,0.055,0.675,0.19)\",\n easingCubicOut: \"cubic-bezier(0.215,0.61,0.355,1)\",\n easingCubicInOut: \"cubic-bezier(0.645,0.045,0.355,1)\",\n easingQuarticIn: \"cubic-bezier(0.895,0.03,0.685,0.22)\",\n easingQuarticOut: \"cubic-bezier(0.165,0.84,0.44,1)\",\n easingQuarticInOut: \"cubic-bezier(0.77,0,0.175,1)\",\n easingQuinticIn: \"cubic-bezier(0.755,0.05,0.855,0.06)\",\n easingQuinticOut: \"cubic-bezier(0.23,1,0.32,1)\",\n easingQuinticInOut: \"cubic-bezier(0.86,0,0.07,1)\",\n easingExponentialIn: \"cubic-bezier(0.95,0.05,0.795,0.035)\",\n easingExponentialOut: \"cubic-bezier(0.19,1,0.22,1)\",\n easingExponentialInOut: \"cubic-bezier(1,0,0,1)\",\n easingCircularIn: \"cubic-bezier(0.6,0.04,0.98,0.335)\",\n easingCircularOut: \"cubic-bezier(0.075,0.82,0.165,1)\",\n easingCircularInOut: \"cubic-bezier(0.785,0.135,0.15,0.86)\",\n easingBackIn: \"cubic-bezier(0.6,-0.28,0.735,0.045)\",\n easingBackOut: \"cubic-bezier(0.175,0.885,0.32,1.275)\",\n easingBackInOut: \"cubic-bezier(0.68,-0.55,0.265,1.55)\"\n}, un = \"offsetHeight\", ln = \"offsetWidth\", dn = \"scrollHeight\", pn = \"scrollWidth\", fn = \"tabindex\", qt = navigator.userAgentData, A = qt, { userAgent: Gt } = navigator, S = Gt, z = /iPhone|iPad|iPod|Android/i;\nlet L = !1;\nA ? L = A.brands.some((t) => z.test(t.brand)) : L = z.test(S);\nconst mn = L, x = /(iPhone|iPod|iPad)/, gn = A ? A.brands.some((t) => x.test(t.brand)) : (\n /* istanbul ignore next */\n x.test(S)\n), vn = S ? S.includes(\"Firefox\") : (\n /* istanbul ignore next */\n !1\n), { head: M } = document, En = [\"webkitPerspective\", \"perspective\"].some((t) => t in M.style), jt = (t, e, n, o) => {\n const s = o || !1;\n t.addEventListener(e, n, s);\n}, Jt = (t, e, n, o) => {\n const s = o || !1;\n t.removeEventListener(e, n, s);\n}, Kt = (t, e, n, o) => {\n const s = (r) => {\n (r.target === t || r.currentTarget === t) && (n.apply(t, [r]), Jt(t, e, s, o));\n };\n jt(t, e, s, o);\n}, Xt = () => {\n}, bn = (() => {\n let t = !1;\n try {\n const e = Object.defineProperty({}, \"passive\", {\n get: () => (t = !0, t)\n });\n Kt(document, P, Xt, e);\n } catch {\n }\n return t;\n})(), hn = [\"webkitTransform\", \"transform\"].some((t) => t in M.style), yn = \"ontouchstart\" in window || /* istanbul ignore next */\n\"msMaxTouchPoints\" in navigator, wn = [\"webkitAnimation\", \"animation\"].some((t) => t in M.style), An = [\"webkitTransition\", \"transition\"].some((t) => t in M.style), Yt = (t, e) => t.getAttribute(e), Sn = (t, e, n) => e.getAttributeNS(t, n), Mn = (t, e) => t.hasAttribute(e), Nn = (t, e, n) => e.hasAttributeNS(t, n), kn = (t, e, n) => t.setAttribute(e, n), Tn = (t, e, n, o) => e.setAttributeNS(t, n, o), Dn = (t, e) => t.removeAttribute(e), Cn = (t, e, n) => e.removeAttributeNS(t, n), Ln = (t, ...e) => {\n t.classList.add(...e);\n}, On = (t, ...e) => {\n t.classList.remove(...e);\n}, In = (t, e) => t.classList.contains(e), { body: zn } = document, { documentElement: xn } = document, Vn = (t) => Array.from(t), v = (t) => t != null && typeof t == \"object\" || !1, i = (t) => v(t) && typeof t.nodeType == \"number\" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].some((e) => t.nodeType === e) || !1, u = (t) => i(t) && t.nodeType === 1 || !1, E = /* @__PURE__ */ new Map(), O = {\n data: E,\n /**\n * Sets web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @param instance the component instance\n */\n set: (t, e, n) => {\n if (!u(t))\n return;\n E.has(e) || E.set(e, /* @__PURE__ */ new Map()), E.get(e).set(t, n);\n },\n /**\n * Returns all instances for specified component.\n *\n * @param component the component's name or a unique key\n * @returns all the component instances\n */\n getAllFor: (t) => E.get(t) || null,\n /**\n * Returns the instance associated with the target.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @returns the instance\n */\n get: (t, e) => {\n if (!u(t) || !e)\n return null;\n const n = O.getAllFor(e);\n return t && n && n.get(t) || null;\n },\n /**\n * Removes web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n */\n remove: (t, e) => {\n const n = O.getAllFor(e);\n !n || !u(t) || (n.delete(t), n.size === 0 && E.delete(e));\n }\n}, Bn = (t, e) => O.get(t, e), N = (t) => typeof t == \"string\" || !1, W = (t) => v(t) && t.constructor.name === \"Window\" || !1, R = (t) => i(t) && t.nodeType === 9 || !1, d = (t) => W(t) ? t.document : R(t) ? t : i(t) ? t.ownerDocument : window.document, k = (t, ...e) => Object.assign(t, ...e), Zt = (t) => {\n if (!t)\n return;\n if (N(t))\n return d().createElement(t);\n const { tagName: e } = t, n = Zt(e);\n if (!n)\n return;\n const o = { ...t };\n return delete o.tagName, k(n, o);\n}, $t = (t, e) => {\n if (!t || !e)\n return;\n if (N(e))\n return d().createElementNS(t, e);\n const { tagName: n } = e, o = $t(t, n);\n if (!o)\n return;\n const s = { ...e };\n return delete s.tagName, k(o, s);\n}, Q = (t, e) => t.dispatchEvent(e), Hn = (t, e, n) => n.indexOf(t) === e, g = (t, e) => {\n const n = getComputedStyle(t), o = e.replace(\"webkit\", \"Webkit\").replace(/([A-Z])/g, \"-$1\").toLowerCase();\n return n.getPropertyValue(o);\n}, _t = (t) => {\n const e = g(t, U), n = g(t, Wt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, te = (t) => {\n const e = g(t, U), n = g(t, Ft), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, Pn = (t, e) => {\n let n = 0;\n const o = new Event(D), s = te(t), r = _t(t);\n if (s) {\n const a = (l) => {\n l.target === t && (e.apply(t, [l]), t.removeEventListener(D, a), n = 1);\n };\n t.addEventListener(D, a), setTimeout(() => {\n n || Q(t, o);\n }, s + r + 17);\n } else\n e.apply(t, [o]);\n}, ee = (t) => {\n const e = g(t, F), n = g(t, Qt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, ne = (t) => {\n const e = g(t, F), n = g(t, Rt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, Un = (t, e) => {\n let n = 0;\n const o = new Event(C), s = ne(t), r = ee(t);\n if (s) {\n const a = (l) => {\n l.target === t && (e.apply(t, [l]), t.removeEventListener(C, a), n = 1);\n };\n t.addEventListener(C, a), setTimeout(() => {\n n || Q(t, o);\n }, s + r + 17);\n } else\n e.apply(t, [o]);\n}, Fn = (t) => Float32Array.from(Array.from(t)), Wn = (t) => Float64Array.from(Array.from(t)), Rn = (t, e) => t.focus(e), V = (t) => [\"true\", !0].includes(t) ? !0 : [\"false\", !1].includes(t) ? !1 : [\"null\", \"\", null, void 0].includes(t) ? null : t !== \"\" && !Number.isNaN(+t) ? +t : t, w = (t) => Object.entries(t), oe = (t) => t.toLowerCase(), Qn = (t, e, n, o) => {\n const s = { ...n }, r = { ...t.dataset }, a = { ...e }, l = {}, p = \"title\";\n return w(r).forEach(([c, f]) => {\n const y = o && typeof c == \"string\" && c.includes(o) ? c.replace(o, \"\").replace(/[A-Z]/g, (q) => oe(q)) : c;\n l[y] = V(f);\n }), w(s).forEach(([c, f]) => {\n s[c] = V(f);\n }), w(e).forEach(([c, f]) => {\n c in s ? a[c] = s[c] : c in l ? a[c] = l[c] : a[c] = c === p ? Yt(t, p) : f;\n }), a;\n}, qn = (t, e) => v(t) && (Object.hasOwn(t, e) || e in t), Gn = (t) => Object.keys(t), jn = (t) => Object.values(t), Jn = (t, e) => {\n const n = new CustomEvent(t, {\n cancelable: !0,\n bubbles: !0\n });\n return v(e) && k(n, e), n;\n}, Kn = { passive: !0 }, Xn = (t) => t.offsetHeight, Yn = (t, e) => {\n w(e).forEach(([n, o]) => {\n if (o && N(n) && n.includes(\"--\"))\n t.style.setProperty(n, o);\n else {\n const s = {};\n s[n] = o, k(t.style, s);\n }\n });\n}, I = (t) => v(t) && t.constructor.name === \"Map\" || !1, se = (t) => typeof t == \"number\" || !1, m = /* @__PURE__ */ new Map(), Zn = {\n /**\n * Sets a new timeout timer for an element, or element -> key association.\n *\n * @param element target element\n * @param callback the callback\n * @param delay the execution delay\n * @param key a unique key\n */\n set: (t, e, n, o) => {\n u(t) && (o && o.length ? (m.has(t) || m.set(t, /* @__PURE__ */ new Map()), m.get(t).set(o, setTimeout(e, n))) : m.set(t, setTimeout(e, n)));\n },\n /**\n * Returns the timer associated with the target.\n *\n * @param element target element\n * @param key a unique\n * @returns the timer\n */\n get: (t, e) => {\n if (!u(t))\n return null;\n const n = m.get(t);\n return e && n && I(n) ? n.get(e) || /* istanbul ignore next */\n null : se(n) ? n : null;\n },\n /**\n * Clears the element's timer.\n *\n * @param element target element\n * @param key a unique key\n */\n clear: (t, e) => {\n if (!u(t))\n return;\n const n = m.get(t);\n e && e.length && I(n) ? (clearTimeout(n.get(e)), n.delete(e), n.size === 0 && m.delete(t)) : (clearTimeout(n), m.delete(t));\n }\n}, $n = (t) => t.toUpperCase(), h = (t, e) => {\n const { width: n, height: o, top: s, right: r, bottom: a, left: l } = t.getBoundingClientRect();\n let p = 1, c = 1;\n if (e && u(t)) {\n const { offsetWidth: f, offsetHeight: y } = t;\n p = f > 0 ? Math.round(n) / f : (\n /* istanbul ignore next */\n 1\n ), c = y > 0 ? Math.round(o) / y : (\n /* istanbul ignore next */\n 1\n );\n }\n return {\n width: n / p,\n height: o / c,\n top: s / c,\n right: r / p,\n bottom: a / c,\n left: l / p,\n x: l / p,\n y: s / c\n };\n}, _n = (t) => d(t).body, T = (t) => d(t).documentElement, to = (t) => d(t).head, eo = (t) => {\n const e = W(t), n = e ? t.scrollX : t.scrollLeft, o = e ? t.scrollY : t.scrollTop;\n return { x: n, y: o };\n}, ce = (t) => i(t) && t.constructor.name === \"ShadowRoot\" || !1, no = (t) => t.nodeName === \"HTML\" ? t : u(t) && t.assignedSlot || // step into the shadow DOM of the parent of a slotted node\ni(t) && t.parentNode || // DOM Element detected\nce(t) && t.host || // ShadowRoot detected\nT(t), re = (t) => {\n if (!u(t))\n return !1;\n const { width: e, height: n } = h(t), { offsetWidth: o, offsetHeight: s } = t;\n return Math.round(e) !== o || Math.round(n) !== s;\n}, oo = (t, e, n) => {\n const o = u(e), s = h(t, o && re(e)), r = { x: 0, y: 0 };\n if (o) {\n const a = h(e, !0);\n r.x = a.x + e.clientLeft, r.y = a.y + e.clientTop;\n }\n return {\n x: s.left + n.x - r.x,\n y: s.top + n.y - r.y,\n width: s.width,\n height: s.height\n };\n};\nlet B = 0, H = 0;\nconst b = /* @__PURE__ */ new Map(), ae = (t, e) => {\n let n = e ? B : H;\n if (e) {\n const o = ae(t), s = b.get(o) || /* @__PURE__ */ new Map();\n b.has(o) || b.set(o, s), I(s) && !s.has(e) ? (s.set(e, n), B += 1) : n = s.get(e);\n } else {\n const o = t.id || t;\n b.has(o) ? n = b.get(o) : (b.set(o, n), H += 1);\n }\n return n;\n}, so = (t) => {\n var e;\n return t ? R(t) ? t.defaultView : i(t) ? (e = t == null ? void 0 : t.ownerDocument) == null ? void 0 : e.defaultView : t : window;\n}, ie = (t) => Array.isArray(t) || !1, co = (t) => i(t) && t.nodeName === \"CANVAS\" || !1, ue = (t) => u(t) && !!t.shadowRoot || !1, ro = (t) => i(t) && [1, 2, 3, 4, 5, 6, 7, 8].some((e) => t.nodeType === e) || !1, ao = (t) => {\n if (!i(t))\n return !1;\n const { top: e, bottom: n } = h(t), { clientHeight: o } = T(t);\n return e <= o && n >= 0;\n}, io = (t) => {\n if (!i(t))\n return !1;\n const { clientWidth: e, clientHeight: n } = T(t), { top: o, left: s, bottom: r, right: a } = h(t, !0);\n return o >= 0 && s >= 0 && r <= n && a <= e;\n}, uo = (t) => ie(t) && t.every(u) || !1, lo = (t) => typeof t == \"function\" || !1, po = (t) => v(t) && t.constructor.name === \"HTMLCollection\" || !1, fo = (t) => u(t) && t.tagName === \"IMG\" || !1, mo = (t) => {\n if (!N(t))\n return !1;\n try {\n JSON.parse(t);\n } catch {\n return !1;\n }\n return !0;\n}, go = (t) => v(t) && t.constructor.name === \"WeakMap\" || !1, vo = (t) => i(t) && [\"SVG\", \"Image\", \"Video\", \"Canvas\"].some((e) => t.constructor.name.includes(e)) || !1, Eo = (t) => v(t) && t.constructor.name === \"NodeList\" || !1, bo = (t) => T(t).dir === \"rtl\", ho = (t) => i(t) && t.constructor.name.includes(\"SVG\") || !1, yo = (t) => i(t) && [\"TABLE\", \"TD\", \"TH\"].includes(t.nodeName) || !1, le = (t, e) => t ? t.closest(e) || // break out of `ShadowRoot`\nle(t.getRootNode().host, e) : null, wo = (t, e) => u(t) ? t : (i(e) ? e : d()).querySelector(t), de = (t, e) => (i(e) ? e : d()).getElementsByTagName(t), Ao = (t) => [...de(\"*\", t)].filter(ue), So = (t, e) => d(e).getElementById(t) || null, Mo = (t, e) => (i(e) ? e : d()).querySelectorAll(t), No = (t, e) => (e && i(e) ? e : d()).getElementsByClassName(\n t\n), ko = (t, e) => t.matches(e), To = \"2.0.0alpha15\";\nexport {\n Vn as ArrayFrom,\n P as DOMContentLoadedEvent,\n Y as DOMMouseScrollEvent,\n O as Data,\n Fn as Float32ArrayFrom,\n Wn as Float64ArrayFrom,\n k as ObjectAssign,\n w as ObjectEntries,\n qn as ObjectHasOwn,\n Gn as ObjectKeys,\n jn as ObjectValues,\n Zn as Timer,\n G as abortEvent,\n Ln as addClass,\n cn as addEventListener,\n Wt as animationDelay,\n Ft as animationDuration,\n D as animationEndEvent,\n U as animationName,\n pe as ariaChecked,\n me as ariaDescribedBy,\n fe as ariaDescription,\n ge as ariaExpanded,\n ve as ariaHasPopup,\n Ee as ariaHidden,\n be as ariaLabel,\n he as ariaLabelledBy,\n ye as ariaModal,\n we as ariaPressed,\n Ae as ariaSelected,\n Me as ariaValueMax,\n Se as ariaValueMin,\n Ne as ariaValueNow,\n ke as ariaValueText,\n j as beforeunloadEvent,\n an as bezierEasings,\n J as blurEvent,\n K as changeEvent,\n le as closest,\n X as contextmenuEvent,\n Jn as createCustomEvent,\n Zt as createElement,\n $t as createElementNS,\n Q as dispatchEvent,\n Hn as distinct,\n zn as documentBody,\n xn as documentElement,\n M as documentHead,\n De as dragEvent,\n ze as dragendEvent,\n Le as dragenterEvent,\n Oe as dragleaveEvent,\n Ie as dragoverEvent,\n Ce as dragstartEvent,\n Pn as emulateAnimationEnd,\n Un as emulateTransitionEnd,\n Z as errorEvent,\n Rn as focus,\n $ as focusEvent,\n Ue as focusEvents,\n _ as focusinEvent,\n tt as focusoutEvent,\n et as gesturechangeEvent,\n nt as gestureendEvent,\n ot as gesturestartEvent,\n Yt as getAttribute,\n Sn as getAttributeNS,\n h as getBoundingClientRect,\n Ao as getCustomElements,\n d as getDocument,\n _n as getDocumentBody,\n T as getDocumentElement,\n to as getDocumentHead,\n _t as getElementAnimationDelay,\n te as getElementAnimationDuration,\n So as getElementById,\n g as getElementStyle,\n ee as getElementTransitionDelay,\n ne as getElementTransitionDuration,\n No as getElementsByClassName,\n de as getElementsByTagName,\n Bn as getInstance,\n eo as getNodeScroll,\n no as getParentNode,\n oo as getRectRelativeToOffsetParent,\n ae as getUID,\n so as getWindow,\n Mn as hasAttribute,\n Nn as hasAttributeNS,\n In as hasClass,\n gn as isApple,\n ie as isArray,\n co as isCanvas,\n ue as isCustomElement,\n R as isDocument,\n ro as isElement,\n ao as isElementInScrollRange,\n io as isElementInViewport,\n uo as isElementsArray,\n vn as isFirefox,\n lo as isFunction,\n po as isHTMLCollection,\n u as isHTMLElement,\n fo as isHTMLImageElement,\n mo as isJSON,\n I as isMap,\n vo as isMedia,\n mn as isMobile,\n i as isNode,\n Eo as isNodeList,\n se as isNumber,\n v as isObject,\n bo as isRTL,\n ho as isSVGElement,\n re as isScaledElement,\n ce as isShadowRoot,\n N as isString,\n yo as isTableElement,\n go as isWeakMap,\n W as isWindow,\n We as keyAlt,\n Re as keyArrowDown,\n qe as keyArrowLeft,\n Ge as keyArrowRight,\n Qe as keyArrowUp,\n je as keyBackspace,\n Je as keyCapsLock,\n Ke as keyControl,\n Xe as keyDelete,\n Ye as keyEnter,\n Ze as keyEscape,\n $e as keyInsert,\n _e as keyMeta,\n tn as keyPause,\n en as keyScrollLock,\n nn as keyShift,\n on as keySpace,\n sn as keyTab,\n Fe as keyboardEventKeys,\n st as keydownEvent,\n ct as keypressEvent,\n rt as keyupEvent,\n at as loadEvent,\n xe as loadstartEvent,\n ko as matches,\n Be as mouseClickEvents,\n He as mouseHoverEvents,\n Ve as mouseSwipeEvents,\n it as mouseclickEvent,\n ut as mousedblclickEvent,\n lt as mousedownEvent,\n ft as mouseenterEvent,\n pt as mousehoverEvent,\n gt as mouseinEvent,\n mt as mouseleaveEvent,\n bt as mousemoveEvent,\n vt as mouseoutEvent,\n Et as mouseoverEvent,\n dt as mouseupEvent,\n ht as mousewheelEvent,\n yt as moveEvent,\n Te as nativeEvents,\n Xt as noop,\n Qn as normalizeOptions,\n V as normalizeValue,\n Jt as off,\n un as offsetHeight,\n ln as offsetWidth,\n jt as on,\n Kt as one,\n wt as orientationchangeEvent,\n Kn as passiveHandler,\n At as pointercancelEvent,\n St as pointerdownEvent,\n Mt as pointerleaveEvent,\n Nt as pointermoveEvent,\n kt as pointerupEvent,\n wo as querySelector,\n Mo as querySelectorAll,\n Tt as readystatechangeEvent,\n Xn as reflow,\n Dn as removeAttribute,\n Cn as removeAttributeNS,\n On as removeClass,\n rn as removeEventListener,\n Dt as resetEvent,\n Ct as resizeEvent,\n zt as scrollEvent,\n dn as scrollHeight,\n pn as scrollWidth,\n Lt as selectEvent,\n Ot as selectendEvent,\n It as selectstartEvent,\n kn as setAttribute,\n Tn as setAttributeNS,\n Yn as setElementStyle,\n xt as submitEvent,\n En as support3DTransform,\n wn as supportAnimation,\n bn as supportPassive,\n yn as supportTouch,\n hn as supportTransform,\n An as supportTransition,\n fn as tabindex,\n oe as toLowerCase,\n $n as toUpperCase,\n Pe as touchEvents,\n Ht as touchcancelEvent,\n Pt as touchendEvent,\n Bt as touchmoveEvent,\n Vt as touchstartEvent,\n Qt as transitionDelay,\n Rt as transitionDuration,\n C as transitionEndEvent,\n F as transitionProperty,\n Ut as unloadEvent,\n S as userAgent,\n A as userAgentData,\n To as version\n};\n//# sourceMappingURL=shorty.mjs.map\n","const N = [\"transparent\", \"currentColor\", \"inherit\", \"revert\", \"initial\"], b = (o) => {\n const t = Math.floor(o);\n return o - t < 0.5 ? t : Math.round(o);\n}, T = [\n [\n \"aliceblue\",\n {\n r: 240,\n g: 248,\n b: 255\n }\n ],\n [\n \"antiquewhite\",\n {\n r: 250,\n g: 235,\n b: 215\n }\n ],\n [\n \"aqua\",\n {\n r: 0,\n g: 255,\n b: 255\n }\n ],\n [\n \"aquamarine\",\n {\n r: 127,\n g: 255,\n b: 212\n }\n ],\n [\n \"azure\",\n {\n r: 240,\n g: 255,\n b: 255\n }\n ],\n [\n \"beige\",\n {\n r: 245,\n g: 245,\n b: 220\n }\n ],\n [\n \"bisque\",\n {\n r: 255,\n g: 228,\n b: 196\n }\n ],\n [\n \"black\",\n {\n r: 0,\n g: 0,\n b: 0\n }\n ],\n [\n \"blanchedalmond\",\n {\n r: 255,\n g: 235,\n b: 205\n }\n ],\n [\n \"blue\",\n {\n r: 0,\n g: 0,\n b: 255\n }\n ],\n [\n \"blueviolet\",\n {\n r: 138,\n g: 43,\n b: 226\n }\n ],\n [\n \"brown\",\n {\n r: 165,\n g: 42,\n b: 42\n }\n ],\n [\n \"burlywood\",\n {\n r: 222,\n g: 184,\n b: 135\n }\n ],\n [\n \"cadetblue\",\n {\n r: 95,\n g: 158,\n b: 160\n }\n ],\n [\n \"chartreuse\",\n {\n r: 127,\n g: 255,\n b: 0\n }\n ],\n [\n \"chocolate\",\n {\n r: 210,\n g: 105,\n b: 30\n }\n ],\n [\n \"coral\",\n {\n r: 255,\n g: 127,\n b: 80\n }\n ],\n [\n \"cornflowerblue\",\n {\n r: 100,\n g: 149,\n b: 237\n }\n ],\n [\n \"cornsilk\",\n {\n r: 255,\n g: 248,\n b: 220\n }\n ],\n [\n \"crimson\",\n {\n r: 220,\n g: 20,\n b: 60\n }\n ],\n [\n \"cyan\",\n {\n r: 0,\n g: 255,\n b: 255\n }\n ],\n [\n \"darkblue\",\n {\n r: 0,\n g: 0,\n b: 139\n }\n ],\n [\n \"darkcyan\",\n {\n r: 0,\n g: 139,\n b: 139\n }\n ],\n [\n \"darkgoldenrod\",\n {\n r: 184,\n g: 134,\n b: 11\n }\n ],\n [\n \"darkgray\",\n {\n r: 169,\n g: 169,\n b: 169\n }\n ],\n [\n \"darkgreen\",\n {\n r: 0,\n g: 100,\n b: 0\n }\n ],\n [\n \"darkgrey\",\n {\n r: 169,\n g: 169,\n b: 169\n }\n ],\n [\n \"darkkhaki\",\n {\n r: 189,\n g: 183,\n b: 107\n }\n ],\n [\n \"darkmagenta\",\n {\n r: 139,\n g: 0,\n b: 139\n }\n ],\n [\n \"darkolivegreen\",\n {\n r: 85,\n g: 107,\n b: 47\n }\n ],\n [\n \"darkorange\",\n {\n r: 255,\n g: 140,\n b: 0\n }\n ],\n [\n \"darkorchid\",\n {\n r: 153,\n g: 50,\n b: 204\n }\n ],\n [\n \"darkred\",\n {\n r: 139,\n g: 0,\n b: 0\n }\n ],\n [\n \"darksalmon\",\n {\n r: 233,\n g: 150,\n b: 122\n }\n ],\n [\n \"darkseagreen\",\n {\n r: 143,\n g: 188,\n b: 143\n }\n ],\n [\n \"darkslateblue\",\n {\n r: 72,\n g: 61,\n b: 139\n }\n ],\n [\n \"darkslategray\",\n {\n r: 47,\n g: 79,\n b: 79\n }\n ],\n [\n \"darkslategrey\",\n {\n r: 47,\n g: 79,\n b: 79\n }\n ],\n [\n \"darkturquoise\",\n {\n r: 0,\n g: 206,\n b: 209\n }\n ],\n [\n \"darkviolet\",\n {\n r: 148,\n g: 0,\n b: 211\n }\n ],\n [\n \"deeppink\",\n {\n r: 255,\n g: 20,\n b: 147\n }\n ],\n [\n \"deepskyblue\",\n {\n r: 0,\n g: 191,\n b: 255\n }\n ],\n [\n \"dimgray\",\n {\n r: 105,\n g: 105,\n b: 105\n }\n ],\n [\n \"dimgrey\",\n {\n r: 105,\n g: 105,\n b: 105\n }\n ],\n [\n \"dodgerblue\",\n {\n r: 30,\n g: 144,\n b: 255\n }\n ],\n [\n \"firebrick\",\n {\n r: 178,\n g: 34,\n b: 34\n }\n ],\n [\n \"floralwhite\",\n {\n r: 255,\n g: 250,\n b: 240\n }\n ],\n [\n \"forestgreen\",\n {\n r: 34,\n g: 139,\n b: 34\n }\n ],\n [\n \"fuchsia\",\n {\n r: 255,\n g: 0,\n b: 255\n }\n ],\n [\n \"gainsboro\",\n {\n r: 220,\n g: 220,\n b: 220\n }\n ],\n [\n \"ghostwhite\",\n {\n r: 248,\n g: 248,\n b: 255\n }\n ],\n [\n \"goldenrod\",\n {\n r: 218,\n g: 165,\n b: 32\n }\n ],\n [\n \"gold\",\n {\n r: 255,\n g: 215,\n b: 0\n }\n ],\n [\n \"gray\",\n {\n r: 128,\n g: 128,\n b: 128\n }\n ],\n [\n \"green\",\n {\n r: 0,\n g: 128,\n b: 0\n }\n ],\n [\n \"greenyellow\",\n {\n r: 173,\n g: 255,\n b: 47\n }\n ],\n [\n \"grey\",\n {\n r: 128,\n g: 128,\n b: 128\n }\n ],\n [\n \"honeydew\",\n {\n r: 240,\n g: 255,\n b: 240\n }\n ],\n [\n \"hotpink\",\n {\n r: 255,\n g: 105,\n b: 180\n }\n ],\n [\n \"indianred\",\n {\n r: 205,\n g: 92,\n b: 92\n }\n ],\n [\n \"indigo\",\n {\n r: 75,\n g: 0,\n b: 130\n }\n ],\n [\n \"ivory\",\n {\n r: 255,\n g: 255,\n b: 240\n }\n ],\n [\n \"khaki\",\n {\n r: 240,\n g: 230,\n b: 140\n }\n ],\n [\n \"lavenderblush\",\n {\n r: 255,\n g: 240,\n b: 245\n }\n ],\n [\n \"lavender\",\n {\n r: 230,\n g: 230,\n b: 250\n }\n ],\n [\n \"lawngreen\",\n {\n r: 124,\n g: 252,\n b: 0\n }\n ],\n [\n \"lemonchiffon\",\n {\n r: 255,\n g: 250,\n b: 205\n }\n ],\n [\n \"lightblue\",\n {\n r: 173,\n g: 216,\n b: 230\n }\n ],\n [\n \"lightcoral\",\n {\n r: 240,\n g: 128,\n b: 128\n }\n ],\n [\n \"lightcyan\",\n {\n r: 224,\n g: 255,\n b: 255\n }\n ],\n [\n \"lightgoldenrodyellow\",\n {\n r: 250,\n g: 250,\n b: 210\n }\n ],\n [\n \"lightgray\",\n {\n r: 211,\n g: 211,\n b: 211\n }\n ],\n [\n \"lightgreen\",\n {\n r: 144,\n g: 238,\n b: 144\n }\n ],\n [\n \"lightgrey\",\n {\n r: 211,\n g: 211,\n b: 211\n }\n ],\n [\n \"lightpink\",\n {\n r: 255,\n g: 182,\n b: 193\n }\n ],\n [\n \"lightsalmon\",\n {\n r: 255,\n g: 160,\n b: 122\n }\n ],\n [\n \"lightseagreen\",\n {\n r: 32,\n g: 178,\n b: 170\n }\n ],\n [\n \"lightskyblue\",\n {\n r: 135,\n g: 206,\n b: 250\n }\n ],\n [\n \"lightslategray\",\n {\n r: 119,\n g: 136,\n b: 153\n }\n ],\n [\n \"lightslategrey\",\n {\n r: 119,\n g: 136,\n b: 153\n }\n ],\n [\n \"lightsteelblue\",\n {\n r: 176,\n g: 196,\n b: 222\n }\n ],\n [\n \"lightyellow\",\n {\n r: 255,\n g: 255,\n b: 224\n }\n ],\n [\n \"lime\",\n {\n r: 0,\n g: 255,\n b: 0\n }\n ],\n [\n \"limegreen\",\n {\n r: 50,\n g: 205,\n b: 50\n }\n ],\n [\n \"linen\",\n {\n r: 250,\n g: 240,\n b: 230\n }\n ],\n [\n \"magenta\",\n {\n r: 255,\n g: 0,\n b: 255\n }\n ],\n [\n \"maroon\",\n {\n r: 128,\n g: 0,\n b: 0\n }\n ],\n [\n \"mediumaquamarine\",\n {\n r: 102,\n g: 205,\n b: 170\n }\n ],\n [\n \"mediumblue\",\n {\n r: 0,\n g: 0,\n b: 205\n }\n ],\n [\n \"mediumorchid\",\n {\n r: 186,\n g: 85,\n b: 211\n }\n ],\n [\n \"mediumpurple\",\n {\n r: 147,\n g: 112,\n b: 219\n }\n ],\n [\n \"mediumseagreen\",\n {\n r: 60,\n g: 179,\n b: 113\n }\n ],\n [\n \"mediumslateblue\",\n {\n r: 123,\n g: 104,\n b: 238\n }\n ],\n [\n \"mediumspringgreen\",\n {\n r: 0,\n g: 250,\n b: 154\n }\n ],\n [\n \"mediumturquoise\",\n {\n r: 72,\n g: 209,\n b: 204\n }\n ],\n [\n \"mediumvioletred\",\n {\n r: 199,\n g: 21,\n b: 133\n }\n ],\n [\n \"midnightblue\",\n {\n r: 25,\n g: 25,\n b: 112\n }\n ],\n [\n \"mintcream\",\n {\n r: 245,\n g: 255,\n b: 250\n }\n ],\n [\n \"mistyrose\",\n {\n r: 255,\n g: 228,\n b: 225\n }\n ],\n [\n \"moccasin\",\n {\n r: 255,\n g: 228,\n b: 181\n }\n ],\n [\n \"navajowhite\",\n {\n r: 255,\n g: 222,\n b: 173\n }\n ],\n [\n \"navy\",\n {\n r: 0,\n g: 0,\n b: 128\n }\n ],\n [\n \"oldlace\",\n {\n r: 253,\n g: 245,\n b: 230\n }\n ],\n [\n \"olive\",\n {\n r: 128,\n g: 128,\n b: 0\n }\n ],\n [\n \"olivedrab\",\n {\n r: 107,\n g: 142,\n b: 35\n }\n ],\n [\n \"orange\",\n {\n r: 255,\n g: 165,\n b: 0\n }\n ],\n [\n \"orangered\",\n {\n r: 255,\n g: 69,\n b: 0\n }\n ],\n [\n \"orchid\",\n {\n r: 218,\n g: 112,\n b: 214\n }\n ],\n [\n \"palegoldenrod\",\n {\n r: 238,\n g: 232,\n b: 170\n }\n ],\n [\n \"palegreen\",\n {\n r: 152,\n g: 251,\n b: 152\n }\n ],\n [\n \"paleturquoise\",\n {\n r: 175,\n g: 238,\n b: 238\n }\n ],\n [\n \"palevioletred\",\n {\n r: 219,\n g: 112,\n b: 147\n }\n ],\n [\n \"papayawhip\",\n {\n r: 255,\n g: 239,\n b: 213\n }\n ],\n [\n \"peachpuff\",\n {\n r: 255,\n g: 218,\n b: 185\n }\n ],\n [\n \"peru\",\n {\n r: 205,\n g: 133,\n b: 63\n }\n ],\n [\n \"pink\",\n {\n r: 255,\n g: 192,\n b: 203\n }\n ],\n [\n \"plum\",\n {\n r: 221,\n g: 160,\n b: 221\n }\n ],\n [\n \"powderblue\",\n {\n r: 176,\n g: 224,\n b: 230\n }\n ],\n [\n \"purple\",\n {\n r: 128,\n g: 0,\n b: 128\n }\n ],\n [\n \"rebeccapurple\",\n {\n r: 102,\n g: 51,\n b: 153\n }\n ],\n [\n \"red\",\n {\n r: 255,\n g: 0,\n b: 0\n }\n ],\n [\n \"rosybrown\",\n {\n r: 188,\n g: 143,\n b: 143\n }\n ],\n [\n \"royalblue\",\n {\n r: 65,\n g: 105,\n b: 225\n }\n ],\n [\n \"saddlebrown\",\n {\n r: 139,\n g: 69,\n b: 19\n }\n ],\n [\n \"salmon\",\n {\n r: 250,\n g: 128,\n b: 114\n }\n ],\n [\n \"sandybrown\",\n {\n r: 244,\n g: 164,\n b: 96\n }\n ],\n [\n \"seagreen\",\n {\n r: 46,\n g: 139,\n b: 87\n }\n ],\n [\n \"seashell\",\n {\n r: 255,\n g: 245,\n b: 238\n }\n ],\n [\n \"sienna\",\n {\n r: 160,\n g: 82,\n b: 45\n }\n ],\n [\n \"silver\",\n {\n r: 192,\n g: 192,\n b: 192\n }\n ],\n [\n \"skyblue\",\n {\n r: 135,\n g: 206,\n b: 235\n }\n ],\n [\n \"slateblue\",\n {\n r: 106,\n g: 90,\n b: 205\n }\n ],\n [\n \"slategray\",\n {\n r: 112,\n g: 128,\n b: 144\n }\n ],\n [\n \"slategrey\",\n {\n r: 112,\n g: 128,\n b: 144\n }\n ],\n [\n \"snow\",\n {\n r: 255,\n g: 250,\n b: 250\n }\n ],\n [\n \"springgreen\",\n {\n r: 0,\n g: 255,\n b: 127\n }\n ],\n [\n \"steelblue\",\n {\n r: 70,\n g: 130,\n b: 180\n }\n ],\n [\n \"tan\",\n {\n r: 210,\n g: 180,\n b: 140\n }\n ],\n [\n \"teal\",\n {\n r: 0,\n g: 128,\n b: 128\n }\n ],\n [\n \"thistle\",\n {\n r: 216,\n g: 191,\n b: 216\n }\n ],\n [\n \"tomato\",\n {\n r: 255,\n g: 99,\n b: 71\n }\n ],\n [\n \"turquoise\",\n {\n r: 64,\n g: 224,\n b: 208\n }\n ],\n [\n \"violet\",\n {\n r: 238,\n g: 130,\n b: 238\n }\n ],\n [\n \"wheat\",\n {\n r: 245,\n g: 222,\n b: 179\n }\n ],\n [\n \"white\",\n {\n r: 255,\n g: 255,\n b: 255\n }\n ],\n [\n \"whitesmoke\",\n {\n r: 245,\n g: 245,\n b: 245\n }\n ],\n [\n \"yellow\",\n {\n r: 255,\n g: 255,\n b: 0\n }\n ],\n [\n \"yellowgreen\",\n {\n r: 154,\n g: 205,\n b: 50\n }\n ]\n], B = \"deg|rad|grad|turn\", U = \"[-\\\\+]?\\\\d+%?\", D = \"[-\\\\+]?\\\\d*\\\\.\\\\d+%?\", L = `[-\\\\+]?\\\\d*\\\\.?\\\\d+(?:${B})?`, v = `(?:${D})|(?:${U})`, F = `(?:${v})|(?:${L}?)`, rr = \"(?:[\\\\s|\\\\(\\\\s|\\\\s\\\\(\\\\s]+)?\", tr = \"(?:[\\\\s|\\\\)\\\\s]+)?\", O = \"(?:[,|\\\\s]+)\", er = \"(?:[,|\\\\/\\\\s]*)?\", $ = `${rr}(${F})${O}(${v})${O}(${v})${er}(${v})?${tr}`, f = {\n CSS_UNIT: new RegExp(F),\n ANGLES: B,\n CSS_ANGLE: L,\n CSS_INTEGER: U,\n CSS_NUMBER: D,\n CSS_UNIT2: F,\n PERMISSIVE_MATCH: $,\n hwb: new RegExp(`hwb${$}`),\n rgb: new RegExp(`rgb(?:a)?${$}`),\n hsl: new RegExp(`hsl(?:a)?${$}`),\n hsv: new RegExp(`hsv(?:a)?${$}`),\n hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/\n}, V = (o) => N.includes(o), k = (o, t) => o !== null && typeof o == \"object\" && Object.keys(t).every((r) => r in o), Z = (o) => `${o}`.includes(\".\") && parseFloat(o) === 1, R = (o) => typeof o == \"string\" && o.includes(\"%\"), c = (o) => !!f.CSS_UNIT.exec(`${o}`), z = [\"rgb\", \"hex\", \"hsl\", \"hsv\", \"hwb\"], J = (o) => N.includes(o) || [\"#\", ...z].some((t) => o.includes(t)) ? !1 : T.some(([t]) => o === t), u = (o, t) => {\n let r = o;\n if (typeof o == \"number\" && Math.min(o, 0) === 0 && // round values to 6 decimals Math.round(N * (10 ** 6)) / 10 ** 6\n Math.max(o, 1) === 1)\n return o;\n Z(o) && (r = \"100%\");\n const e = R(r);\n return r = t === 360 ? parseFloat(r) : Math.min(t, Math.max(0, parseFloat(r))), e && (r = r * t / 100), Math.abs(r - t) < 1e-6 ? 1 : (t === 360 ? r = (r < 0 ? r % t + t : r % t) / t : r = r % t / t, r);\n}, M = (o) => {\n let t = parseFloat(o);\n return (Number.isNaN(t) || t < 0 || t > 1) && (t = 1), t;\n}, x = (o) => Math.min(1, Math.max(0, o)), p = (o) => o.length === 1 ? `0${o}` : String(o), K = (o) => {\n const [[, t]] = T.filter(([r]) => r === o.toLowerCase());\n return t;\n}, h = (o) => parseInt(o, 16), E = (o) => h(o) / 255, Q = (o) => b(o * 255).toString(16), _ = (o, t, r) => {\n const e = Math.max(o, t, r), s = Math.min(o, t, r);\n let n = 0, g = 0;\n const a = (e + s) / 2;\n if (e === s)\n g = 0, n = 0;\n else {\n const i = e - s;\n g = a > 0.5 ? i / (2 - e - s) : i / (e + s), e === o && (n = (t - r) / i + (t < r ? 6 : 0)), e === t && (n = (r - o) / i + 2), e === r && (n = (o - t) / i + 4), n /= 6;\n }\n return { h: n, s: g, l: a };\n}, H = (o, t, r) => {\n let e = r;\n return e < 0 && (e += 1), e > 1 && (e -= 1), e < 1 / 6 ? o + (t - o) * (6 * e) : e < 1 / 2 ? t : e < 2 / 3 ? o + (t - o) * (2 / 3 - e) * 6 : o;\n}, y = (o, t, r) => {\n let e = 0, s = 0, n = 0;\n if (t === 0)\n s = r, n = r, e = r;\n else if (r) {\n const g = r < 0.5 ? r * (1 + t) : r + t - r * t, a = 2 * r - g;\n e = H(a, g, o + 1 / 3), s = H(a, g, o), n = H(a, g, o - 1 / 3);\n }\n return { r: e, g: s, b: n };\n}, G = (o, t, r) => {\n let e = 0, s = 0;\n const n = Math.min(o, t, r), g = Math.max(o, t, r), a = 1 - g;\n if (g === n)\n return { h: 0, w: n, b: a };\n o === n ? (e = t - r, s = 3) : (e = t === n ? r - o : o - t, s = t === n ? 5 : 1);\n const i = (s - e / (g - n)) / 6;\n return {\n h: i === 1 ? 0 : i,\n w: n,\n b: a\n };\n}, X = (o, t, r) => {\n if (t + r >= 1) {\n const g = t / (t + r);\n return { r: g, g, b: g };\n }\n let { r: e, g: s, b: n } = y(o, 1, 0.5);\n return [e, s, n] = [e, s, n].map((g) => g * (1 - t - r) + t), { r: e, g: s, b: n };\n}, P = (o, t, r) => {\n const e = Math.max(o, t, r), s = Math.min(o, t, r);\n let n = 0;\n const g = e, a = e - s, i = e === 0 ? 0 : a / e;\n return e === s ? n = 0 : (o === e && (n = (t - r) / a + (t < r ? 6 : 0)), t === e && (n = (r - o) / a + 2), r === e && (n = (o - t) / a + 4), n /= 6), { h: n, s: i, v: g };\n}, I = (o, t, r) => {\n const e = o * 6, s = t, n = r, g = Math.floor(e), a = e - g, i = n * (1 - s), l = n * (1 - a * s), d = n * (1 - (1 - a) * s), m = g % 6, w = [n, l, i, i, d, n][m], S = [d, n, n, l, i, i][m], A = [i, i, d, n, n, l][m];\n return { r: w, g: S, b: A };\n}, j = (o, t, r, e) => {\n const s = [\n p(b(o).toString(16)),\n p(b(t).toString(16)),\n p(b(r).toString(16))\n ];\n return e && s[0].charAt(0) === s[0].charAt(1) && s[1].charAt(0) === s[1].charAt(1) && s[2].charAt(0) === s[2].charAt(1) ? s[0].charAt(0) + s[1].charAt(0) + s[2].charAt(0) : s.join(\"\");\n}, C = (o, t, r, e, s) => {\n const n = [\n p(b(o).toString(16)),\n p(b(t).toString(16)),\n p(b(r).toString(16)),\n p(Q(e))\n ];\n return s && n[0].charAt(0) === n[0].charAt(1) && n[1].charAt(0) === n[1].charAt(1) && n[2].charAt(0) === n[2].charAt(1) && n[3].charAt(0) === n[3].charAt(1) ? n[0].charAt(0) + n[1].charAt(0) + n[2].charAt(0) + n[3].charAt(0) : n.join(\"\");\n}, Y = (o) => {\n const t = String(o).trim().toLowerCase();\n if (J(t))\n return Object.assign(K(t), {\n a: 1,\n format: \"rgb\",\n ok: !0\n });\n if (V(t))\n return {\n r: 0,\n g: 0,\n b: 0,\n a: t === \"transparent\" ? 0 : 1,\n format: \"rgb\",\n ok: !0\n };\n let [, r, e, s, n] = f.rgb.exec(t) || [];\n return r && e && s ? {\n r,\n g: e,\n b: s,\n a: n !== void 0 ? n : 1,\n format: \"rgb\",\n ok: !0\n } : ([, r, e, s, n] = f.hsl.exec(t) || [], r && e && s ? {\n h: r,\n s: e,\n l: s,\n a: n !== void 0 ? n : 1,\n format: \"hsl\",\n ok: !0\n } : ([, r, e, s, n] = f.hsv.exec(t) || [], r && e && s ? {\n h: r,\n s: e,\n v: s,\n a: n !== void 0 ? n : 1,\n format: \"hsv\",\n ok: !0\n } : ([, r, e, s, n] = f.hwb.exec(t) || [], r && e && s ? {\n h: r,\n w: e,\n b: s,\n a: n !== void 0 ? n : 1,\n format: \"hwb\",\n ok: !0\n } : ([, r, e, s, n] = f.hex8.exec(t) || [], r && e && s && n ? {\n r: h(r),\n g: h(e),\n b: h(s),\n a: E(n),\n format: \"hex\",\n ok: !0\n } : ([, r, e, s] = f.hex6.exec(t) || [], r && e && s ? {\n r: h(r),\n g: h(e),\n b: h(s),\n a: 1,\n format: \"hex\",\n ok: !0\n } : ([, r, e, s, n] = f.hex4.exec(t) || [], r && e && s && n ? {\n r: h(r + r),\n g: h(e + e),\n b: h(s + s),\n a: E(n + n),\n format: \"hex\",\n ok: !0\n } : ([, r, e, s] = f.hex3.exec(t) || [], r && e && s ? {\n r: h(r + r),\n g: h(e + e),\n b: h(s + s),\n a: 1,\n format: \"hex\",\n ok: !0\n } : {\n r: 0,\n g: 0,\n b: 0,\n a: 1,\n format: \"rgb\",\n ok: !o\n })))))));\n}, q = (o) => {\n let t = { r: 0, g: 0, b: 0 }, r = o, e = 1, s, n, g, a, i, l, d, m, w = \"rgb\", S = !1;\n return (!r || typeof r == \"string\") && (r = Y(r), S = r.ok), k(r, t) && c(r.r) && c(r.g) && c(r.b) && ({ r: d, g: m, b: i } = r, [d, m, i] = [d, m, i].map((A) => u(A, R(A) ? 100 : 255)), t = { r: d, g: m, b: i }, w = \"format\" in r ? r.format : \"rgb\"), k(r, { h: 0, s: 0, v: 0 }) && c(r.h) && c(r.s) && c(r.v) && ({ h: l, s, v: n } = r, l = u(l, 360), s = u(s, 100), n = u(n, 100), t = I(l, s, n), w = \"hsv\"), k(r, { h: 0, s: 0, l: 0 }) && c(r.h) && c(r.s) && c(r.l) && ({ h: l, s, l: g } = r, l = u(l, 360), s = u(s, 100), g = u(g, 100), t = y(l, s, g), w = \"hsl\"), k(r, { h: 0, w: 0, b: 0 }) && c(r.h) && c(r.w) && c(r.b) && ({ h: l, w: a, b: i } = r, l = u(l, 360), a = u(a, 100), i = u(i, 100), t = X(l, a, i), w = \"hwb\"), c(r.a) && (e = r.a, e = R(e) || parseFloat(`${e}`) > 1 ? u(e, 100) : e), {\n r: t.r,\n g: t.g,\n b: t.b,\n a: M(e),\n format: w,\n ok: S\n };\n}, sr = \"1.0.8\";\nclass W {\n // bring main utilities to front\n static matchers = f;\n static isOnePointZero = Z;\n static isPercentage = R;\n static isValidCSSUnit = c;\n static isNonColor = V;\n static isColorName = J;\n static isColorType = k;\n static pad2 = p;\n static clamp01 = x;\n static bound01 = u;\n static boundAlpha = M;\n static getRGBFromName = K;\n static convertHexToDecimal = E;\n static convertDecimalToHex = Q;\n static rgbToHsl = _;\n static rgbToHex = j;\n static rgbToHsv = P;\n static rgbToHwb = G;\n static rgbaToHex = C;\n static hslToRgb = I;\n static hsvToRgb = I;\n static hueToRgb = H;\n static hwbToRgb = X;\n static parseIntFromHex = h;\n static stringInputToObject = Y;\n static inputToRGB = q;\n static roundPart = b;\n static webColors = T;\n static nonColors = N;\n static version = sr;\n // main public properties\n r;\n g;\n b;\n a;\n format;\n ok;\n originalInput;\n // main public methods\n constructor(t, r) {\n const e = r && z.includes(r) ? r : \"\", { r: s, g: n, b: g, a, ok: i, format: l } = q(t);\n this.originalInput = t, this.r = s, this.g = n, this.b = g, this.a = a, this.ok = i, this.format = e || l;\n }\n /**\n * Checks if the current input value is a valid colour.\n */\n get isValid() {\n return this.ok;\n }\n /**\n * Checks if the current colour requires a light text colour.\n */\n get isDark() {\n return this.brightness < 120;\n }\n /**\n * Returns the perceived luminance of a colour.\n *\n * @see http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef\n */\n get luminance() {\n const { r: t, g: r, b: e } = this;\n let s = 0, n = 0, g = 0;\n return t <= 0.03928 ? s = t / 12.92 : s = ((t + 0.055) / 1.055) ** 2.4, r <= 0.03928 ? n = r / 12.92 : n = ((r + 0.055) / 1.055) ** 2.4, e <= 0.03928 ? g = e / 12.92 : g = ((e + 0.055) / 1.055) ** 2.4, 0.2126 * s + 0.7152 * n + 0.0722 * g;\n }\n /**\n * Returns the perceived brightness of the colour.\n */\n get brightness() {\n const { r: t, g: r, b: e } = this.toRgb();\n return (t * 299 + r * 587 + e * 114) / 1e3;\n }\n /**\n * Returns the web colour name closest to the current colour.\n */\n get name() {\n const { r: t, g: r, b: e } = this.toRgb(), [s] = T.map(([n, g]) => {\n const a = (\n // ((rgb.r - r) ** 2 + (rgb.g - g) ** 2 + (rgb.b - b) ** 2) ** 0.5; // standard\n (((g.r - t) * 0.3) ** 2 + ((g.g - r) * 0.6) ** 2 + ((g.b - e) * 0.1) ** 2) ** 0.5\n );\n return [n, a];\n }).find(([, n], g, a) => n === Math.min(...a.map(([, i]) => i)));\n return s;\n }\n /**\n * Returns the colour as an RGBA object.\n */\n toRgb() {\n let { r: t, g: r, b: e, a: s } = this;\n return [t, r, e] = [t, r, e].map((n) => b(n * 255 * 100) / 100), s = b(s * 100) / 100, {\n r: t,\n g: r,\n b: e,\n a: s\n };\n }\n /**\n * Returns the RGBA values concatenated into a CSS3 Module string format.\n * * rgb(255,255,255)\n * * rgba(255,255,255,0.5)\n */\n toRgbString() {\n const { r: t, g: r, b: e, a: s } = this.toRgb(), [n, g, a] = [t, r, e].map(b);\n return s === 1 ? `rgb(${n}, ${g}, ${a})` : `rgba(${n}, ${g}, ${a}, ${s})`;\n }\n /**\n * Returns the RGBA values concatenated into a CSS4 Module string format.\n * * rgb(255 255 255)\n * * rgb(255 255 255 / 50%)\n */\n toRgbCSS4String() {\n const { r: t, g: r, b: e, a: s } = this.toRgb(), [n, g, a] = [t, r, e].map(b), i = s === 1 ? \"\" : ` / ${b(s * 100)}%`;\n return `rgb(${n} ${g} ${a}${i})`;\n }\n /**\n * Returns the hexadecimal value of the colour. When the parameter is *true*\n * it will find a 3 characters shorthand of the decimal value.\n */\n toHex(t) {\n const { r, g: e, b: s, a: n } = this.toRgb();\n return n === 1 ? j(r, e, s, t) : C(r, e, s, n, t);\n }\n /**\n * Returns the CSS valid hexadecimal vaue of the colour. When the parameter is *true*\n * it will find a 3 characters shorthand of the value.\n */\n toHexString(t) {\n return `#${this.toHex(t)}`;\n }\n /**\n * Returns the HEX8 value of the colour.\n */\n toHex8(t) {\n const { r, g: e, b: s, a: n } = this.toRgb();\n return C(r, e, s, n, t);\n }\n /**\n * Returns the HEX8 value of the colour.\n */\n toHex8String(t) {\n return `#${this.toHex8(t)}`;\n }\n /**\n * Returns the colour as a HSVA object.\n */\n toHsv() {\n const { r: t, g: r, b: e, a: s } = this, { h: n, s: g, v: a } = P(t, r, e);\n return {\n h: n,\n s: g,\n v: a,\n a: s\n };\n }\n /**\n * Returns the colour as an HSLA object.\n */\n toHsl() {\n const { r: t, g: r, b: e, a: s } = this, { h: n, s: g, l: a } = _(t, r, e);\n return {\n h: n,\n s: g,\n l: a,\n a: s\n };\n }\n /**\n * Returns the HSLA values concatenated into a CSS3 Module format string.\n * * `hsl(150, 100%, 50%)`\n * * `hsla(150, 100%, 50%, 0.5)`\n */\n toHslString() {\n let { h: t, s: r, l: e, a: s } = this.toHsl();\n return t = b(t * 360), r = b(r * 100), e = b(e * 100), s = b(s * 100) / 100, s === 1 ? `hsl(${t}, ${r}%, ${e}%)` : `hsla(${t}, ${r}%, ${e}%, ${s})`;\n }\n /**\n * Returns the HSLA values concatenated into a CSS4 Module format string.\n * * `hsl(150deg 100% 50%)`\n * * `hsl(150deg 100% 50% / 50%)`\n */\n toHslCSS4String() {\n let { h: t, s: r, l: e, a: s } = this.toHsl();\n t = b(t * 360), r = b(r * 100), e = b(e * 100), s = b(s * 100);\n const n = s < 100 ? ` / ${b(s)}%` : \"\";\n return `hsl(${t}deg ${r}% ${e}%${n})`;\n }\n /**\n * Returns the colour as an HWBA object.\n */\n toHwb() {\n const { r: t, g: r, b: e, a: s } = this, { h: n, w: g, b: a } = G(t, r, e);\n return {\n h: n,\n w: g,\n b: a,\n a: s\n };\n }\n /**\n * Returns the HWBA values concatenated into a string.\n */\n toHwbString() {\n let { h: t, w: r, b: e, a: s } = this.toHwb();\n t = b(t * 360), r = b(r * 100), e = b(e * 100), s = b(s * 100);\n const n = s < 100 ? ` / ${b(s)}%` : \"\";\n return `hwb(${t}deg ${r}% ${e}%${n})`;\n }\n /**\n * Sets the alpha value of the current colour.\n */\n setAlpha(t) {\n return typeof t != \"number\" ? this : (this.a = M(t), this);\n }\n /**\n * Saturate the colour with a given amount.\n */\n saturate(t) {\n if (typeof t != \"number\")\n return this;\n const { h: r, s: e, l: s } = this.toHsl(), { r: n, g, b: a } = y(r, x(e + t / 100), s);\n return Object.assign(this, { r: n, g, b: a }), this;\n }\n /**\n * Desaturate the colour with a given amount.\n */\n desaturate(t) {\n return typeof t == \"number\" ? this.saturate(-t) : this;\n }\n /**\n * Completely desaturates a colour into greyscale.\n * Same as calling `desaturate(100)`\n */\n greyscale() {\n return this.saturate(-100);\n }\n /**\n * Increase the colour lightness with a given amount.\n */\n lighten(t) {\n if (typeof t != \"number\")\n return this;\n const { h: r, s: e, l: s } = this.toHsl(), { r: n, g, b: a } = y(r, e, x(s + t / 100));\n return Object.assign(this, { r: n, g, b: a }), this;\n }\n /**\n * Decrease the colour lightness with a given amount.\n */\n darken(t) {\n return typeof t == \"number\" ? this.lighten(-t) : this;\n }\n /**\n * Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.\n * Values outside of this range will be wrapped into this range.\n */\n spin(t) {\n if (typeof t != \"number\")\n return this;\n const { h: r, s: e, l: s } = this.toHsl(), { r: n, g, b: a } = y(x((r * 360 + t) % 360 / 360), e, s);\n return Object.assign(this, { r: n, g, b: a }), this;\n }\n /** Returns a clone of the current `Color` instance. */\n clone() {\n return new W(this);\n }\n /**\n * Returns the colour value in CSS valid string format.\n */\n toString(t) {\n const { format: r } = this;\n return r === \"hex\" ? this.toHexString(t) : r === \"hsl\" ? this.toHslString() : r === \"hwb\" ? this.toHwbString() : this.toRgbString();\n }\n}\nexport {\n W as default\n};\n//# sourceMappingURL=index.mjs.map\n","import Color from '@thednp/color';\n// import { isNumber } from '@thednp/shorty';\n\n/**\n * Returns a color palette with a given set of parameters.\n *\n * @example\n * new ColorPalette(0, 12, 10, 80);\n * // => { hue: 0, hueSteps: 12, lightSteps: 10, saturation: 80, colors: Array<Color> }\n */\nexport default class ColorPalette {\n public static Color = Color;\n hue: number;\n hueSteps: number;\n lightSteps: number;\n saturation: number;\n colors: Color[];\n /**\n * The `hue` parameter is optional, which would be set to 0.\n * * `args.hue` the starting Hue [0, 360]\n * * `args.hueSteps` Hue Steps Count [5, 24]\n * * `args.lightSteps` Lightness Steps Count [5, 12]\n * * `args.saturation` Saturation [0, 100]\n */\n constructor(...args: [number?, number?, number?, number?]) {\n let hue = 0;\n let hueSteps = 12;\n let lightSteps = 10;\n let lightnessArray = [0.5];\n let saturation = 100;\n // if (!args.every(n => isNumber(n))) throw TypeError('ColorPalette only accepts numbers.');\n\n if (args.length === 4) {\n [hue, hueSteps, lightSteps, saturation] = args as [number, number, number, number];\n } else if (args.length === 3) {\n [hue, hueSteps, lightSteps] = args as [number, number, number];\n } else if (args.length === 2) {\n [hueSteps, lightSteps] = args as [number, number];\n if ([hueSteps, lightSteps].some(n => n < 1)) {\n throw TypeError('ColorPalette: the two minimum arguments must be numbers higher than 0.');\n }\n }\n\n const colors: Color[] = [];\n const hueStep = 360 / hueSteps;\n const half = Color.roundPart((lightSteps - (lightSteps % 2 ? 1 : 0)) / 2);\n const steps1To13 = [0.25, 0.2, 0.15, 0.11, 0.09, 0.075];\n const lightSets = [\n [1, 2, 3],\n [4, 5],\n [6, 7],\n [8, 9],\n [10, 11],\n [12, 13],\n ];\n const closestSet = lightSets.find(set => set.includes(lightSteps));\n\n // find a lightStep that won't go beyond black and white\n // something within the [10-90] range of lightness\n const lightStep = closestSet\n ? steps1To13[lightSets.indexOf(closestSet)]\n : 100 / (lightSteps + (lightSteps % 2 ? 0 : 1)) / 100;\n\n // light tints\n for (let i = 1; i < half + 1; i += 1) {\n lightnessArray = [...lightnessArray, 0.5 + lightStep * i];\n }\n\n // dark tints\n for (let i = 1; i < lightSteps - half; i += 1) {\n lightnessArray = [0.5 - lightStep * i, ...lightnessArray];\n }\n\n // feed `colors` Array\n for (let i = 0; i < hueSteps; i += 1) {\n const currentHue = ((hue + i * hueStep) % 360) / 360;\n lightnessArray.forEach(l => {\n const newColor = new Color({ h: currentHue, s: 1, l });\n colors.push(saturation < 100 ? newColor.saturate(saturation - 100) : newColor);\n });\n }\n\n this.hue = hue;\n this.hueSteps = hueSteps;\n this.lightSteps = lightSteps;\n this.saturation = saturation;\n this.colors = colors;\n }\n}\n","import ColorPickerLabels from '../interface/colorPickerLabels';\n\n/** The labels presented to the user. */\nconst colorPickerLabels: ColorPickerLabels = {\n pickerLabel: 'Colour Picker',\n appearanceLabel: 'Colour Appearance',\n valueLabel: 'Colour Value',\n toggleLabel: 'Select Colour',\n presetsLabel: 'Colour Presets',\n defaultsLabel: 'Colour Defaults',\n formatLabel: 'Format',\n alphaLabel: 'Alpha',\n hexLabel: 'Hexadecimal',\n hueLabel: 'Hue',\n whitenessLabel: 'Whiteness',\n blacknessLabel: 'Blackness',\n saturationLabel: 'Saturation',\n lightnessLabel: 'Lightness',\n redLabel: 'Red',\n greenLabel: 'Green',\n blueLabel: 'Blue',\n};\n\nexport default colorPickerLabels;\n","/** A list of 17 color names used for WAI-ARIA compliance. */\nconst colorNames: string[] = [\n 'white',\n 'black',\n 'grey',\n 'red',\n 'orange',\n 'brown',\n 'gold',\n 'olive',\n 'yellow',\n 'lime',\n 'green',\n 'teal',\n 'cyan',\n 'blue',\n 'violet',\n 'magenta',\n 'pink',\n];\nexport default colorNames;\n","import { isString } from '@thednp/shorty';\n\n/**\n * Check if a string is valid JSON string.\n *\n * @param str the string input\n * @returns the query result\n */\nconst isValidJSON = (str: unknown): str is string => {\n if (!isString(str)) return false;\n try {\n JSON.parse(str);\n } catch (e) {\n return false;\n }\n return true;\n};\n\nexport default isValidJSON;\n","const vHidden = 'v-hidden';\nexport default vHidden;\n","import { createElement, setAttribute, ObjectAssign, toUpperCase } from '@thednp/shorty';\n\nimport vHidden from './vHidden';\nimport ColorPicker from '../index';\n\n/**\n * Returns the color form for `ColorPicker`.\n *\n * @param self the `ColorPicker` instance\n * @returns a new `<div>` element with color component `<input>`\n */\nconst getColorForm = (self: ColorPicker): HTMLElement => {\n const { format, id, componentLabels } = self;\n const colorForm = createElement({\n tagName: 'div',\n className: `color-form ${format}`,\n }) as HTMLElement;\n\n let components = ['hex'];\n if (format === 'rgb') components = ['red', 'green', 'blue', 'alpha'];\n else if (format === 'hsl') components = ['hue', 'saturation', 'lightness', 'alpha'];\n else if (format === 'hwb') components = ['hue', 'whiteness', 'blackness', 'alpha'];\n\n components.forEach((c: string): void => {\n const [C] = format === 'hex' ? ['#'] : toUpperCase(c).split('');\n const cID = `color_${format}_${c}_${id}`;\n const formatLabel = componentLabels[`${c}Label`];\n const cInputLabel = createElement({ tagName: 'label' }) as HTMLElement;\n setAttribute(cInputLabel, 'for', cID);\n cInputLabel.append(\n createElement({\n tagName: 'span',\n ariaHidden: 'true',\n innerText: `${C}:`,\n }) as HTMLElement,\n createElement({\n tagName: 'span',\n className: vHidden,\n innerText: formatLabel,\n }) as HTMLElement,\n );\n const cInput = createElement({\n tagName: 'input',\n id: cID,\n // name: cID, - prevent saving the value to a form\n type: format === 'hex' ? 'text' : 'number',\n value: c === 'alpha' ? '100' : '0',\n className: `color-input ${c}`,\n autocomplete: 'off',\n spellcheck: false,\n } as Partial<HTMLInputElement>) as HTMLInputElement;\n\n // alpha\n let max = '100';\n let step = '1';\n if (c !== 'alpha') {\n if (format === 'rgb') {\n max = '255';\n step = '1';\n } else if (c === 'hue') {\n max = '360';\n step = '1';\n }\n }\n ObjectAssign(cInput, {\n min: '0',\n max,\n step,\n });\n colorForm.append(cInputLabel, cInput);\n });\n return colorForm;\n};\n\nexport default getColorForm;\n","import { createElement } from '@thednp/shorty';\n\nimport ColorPicker from '..';\n\n/**\n * Returns all color controls for `ColorPicker`.\n *\n * @param self the `ColorPicker` instance\n * @returns color controls\n */\nconst getColorControls = (self: ColorPicker): HTMLElement => {\n const { format, componentLabels } = self;\n const { hueLabel, alphaLabel, lightnessLabel, saturationLabel, whitenessLabel, blacknessLabel } = componentLabels;\n\n const max1 = format === 'hsl' ? 360 : 100;\n const max2 = format === 'hsl' ? 100 : 360;\n const max3 = 100;\n\n let ctrl1Label = format === 'hsl' ? `${hueLabel} & ${lightnessLabel}` : `${lightnessLabel} & ${saturationLabel}`;\n\n ctrl1Label = format === 'hwb' ? `${whitenessLabel} & ${blacknessLabel}` : ctrl1Label;\n\n const ctrl2Label = format === 'hsl' ? `${saturationLabel}` : `${hueLabel}`;\n\n const colorControls = createElement({\n tagName: 'div',\n className: `color-controls ${format}`,\n }) as HTMLElement;\n\n const colorPointer = 'color-pointer';\n const colorSlider = 'color-slider';\n\n const controls = [\n {\n i: 1,\n c: colorPointer,\n l: ctrl1Label,\n min: 0,\n max: max1,\n },\n {\n i: 2,\n c: colorSlider,\n l: ctrl2Label,\n min: 0,\n max: max2,\n },\n {\n i: 3,\n c: colorSlider,\n l: alphaLabel,\n min: 0,\n max: max3,\n },\n ];\n\n controls.forEach(template => {\n const { i, c, l, min, max } = template;\n const control = createElement({\n tagName: 'div',\n className: 'color-control',\n role: 'presentation',\n }) as HTMLElement;\n\n control.append(\n createElement({\n tagName: 'div',\n className: `visual-control visual-control${i}`,\n }) as HTMLElement,\n );\n\n const knob = createElement({\n tagName: 'div',\n className: `${c} knob`,\n ariaLive: 'polite',\n ariaLabel: l,\n role: 'slider',\n tabIndex: 0,\n ariaValueMin: `${min}`,\n ariaValueMax: `${max}`,\n }) as HTMLElement;\n\n control.append(knob);\n colorControls.append(control);\n });\n\n return colorControls;\n};\n\nexport default getColorControls;\n","import { setAttribute, getAttribute, createElement, setElementStyle } from '@thednp/shorty';\n\nimport Color from '@thednp/color';\nimport ColorPalette from '../colorPalette';\nimport ColorPicker from '../index';\n\n/**\n * Returns a color-defaults with given values and class.\n */\nconst getColorMenu = (self: ColorPicker, colorsSource: ColorPalette | string[], menuClass: string): HTMLElement => {\n const { input, format, componentLabels } = self;\n const { defaultsLabel, presetsLabel } = componentLabels;\n const isOptionsMenu = menuClass === 'color-options';\n const isPalette = colorsSource instanceof ColorPalette;\n const menuLabel = isOptionsMenu ? presetsLabel : defaultsLabel;\n const colorsArray = isPalette ? colorsSource.colors : colorsSource;\n const colorsCount = colorsArray.length;\n const { lightSteps } = isPalette ? colorsSource : { lightSteps: null };\n const fit = lightSteps || [9, 10].find(x => colorsCount >= x * 2 && !(colorsCount % x)) || 5;\n const isMultiLine = isOptionsMenu && colorsCount > fit;\n let rowCountHover = 2;\n rowCountHover = isMultiLine && colorsCount > fit * 2 ? 3 : rowCountHover;\n rowCountHover = isMultiLine && colorsCount > fit * 3 ? 4 : rowCountHover;\n rowCountHover = isMultiLine && colorsCount > fit * 4 ? 5 : rowCountHover;\n const rowCount = rowCountHover - (colorsCount <= fit * 3 ? 1 : 2);\n const isScrollable = isMultiLine && colorsCount > rowCount * fit;\n let finalClass = menuClass;\n finalClass += isScrollable ? ' scrollable' : '';\n finalClass += isMultiLine ? ' multiline' : '';\n const gap = isMultiLine ? '1px' : '0.25rem';\n let optionSize = isMultiLine ? 1.75 : 2;\n optionSize = fit > 5 && isMultiLine ? 1.5 : optionSize;\n const menuHeight = `${rowCount * optionSize}rem`;\n const menuHeightHover = `calc(${rowCountHover} * ${optionSize}rem + ${rowCountHover - 1} * ${gap})`;\n\n // <UL> is an `HTMLElement`\n const menu = createElement({\n tagName: 'ul',\n className: finalClass,\n role: 'listbox',\n ariaLabel: menuLabel,\n }) as HTMLElement;\n\n if (isScrollable) {\n setElementStyle(menu, {\n '--grid-item-size': `${optionSize}rem`,\n '--grid-fit': `${fit}`,\n '--grid-gap': gap,\n '--grid-height': menuHeight,\n '--grid-hover-height': menuHeightHover,\n });\n }\n\n colorsArray.forEach(x => {\n let [value, label] = typeof x === 'string' ? x.trim().split(':') : [];\n if (x instanceof Color) {\n value = x.toHexString();\n label = value;\n }\n const color = new Color(x instanceof Color ? x : value, format);\n const isActive = color.toString() === getAttribute(input, 'value');\n const active = isActive ? ' active' : '';\n\n const option = createElement({\n tagName: 'li',\n className: `color-option${active}`,\n innerText: `${label || value}`,\n tabIndex: 0,\n role: 'option',\n ariaSelected: isActive ? 'true' : 'false',\n }) as HTMLElement;\n setAttribute(option, 'data-value', `${value}`);\n\n if (isOptionsMenu) {\n setElementStyle(option, { backgroundColor: value });\n }\n\n menu.append(option);\n });\n return menu;\n};\n\nexport default getColorMenu;\n","import {\n getAttribute,\n setAttribute,\n toUpperCase,\n ariaHidden,\n tabindex,\n createElement,\n createElementNS,\n} from '@thednp/shorty';\n\nimport Color from '@thednp/color';\n\nimport getColorForm from './getColorForm';\nimport getColorControls from './getColorControls';\nimport getColorMenu from './getColorMenu';\nimport vHidden from './vHidden';\n\nimport ColorPicker from '../index';\n\n/**\n * Generate HTML markup and update instance properties.\n *\n * @param self\n */\nconst setMarkup = (self: ColorPicker) => {\n const { input, parent, format, id, componentLabels, colorKeywords, colorPresets } = self;\n const colorValue = getAttribute(input, 'value') || '#fff';\n const { nonColors } = Color;\n\n const { toggleLabel, pickerLabel, formatLabel, hexLabel } = componentLabels;\n\n // update color\n const color = nonColors.includes(colorValue) ? '#fff' : colorValue;\n self.color = new Color(color, format);\n\n // set initial controls dimensions\n const formatString = format === 'hex' ? hexLabel : toUpperCase(format);\n\n const pickerBtn = createElement({\n id: `picker-btn-${id}`,\n tagName: 'button',\n className: 'picker-toggle btn-appearance',\n ariaExpanded: 'false',\n ariaHasPopup: 'true',\n }) as HTMLElement;\n\n pickerBtn.append(\n createElement({\n tagName: 'span',\n className: vHidden,\n innerText: `${pickerLabel}. ${formatLabel}: ${formatString}`,\n }) as HTMLElement,\n );\n\n const pickerDropdown = createElement({\n tagName: 'div',\n className: 'color-dropdown picker',\n role: 'group',\n ariaLabelledBy: `picker-btn-${id}`,\n } as Partial<HTMLElement> & { ariaLabelledBy: string }) as HTMLElement;\n\n const colorControls = getColorControls(self);\n const colorForm = getColorForm(self);\n\n pickerDropdown.append(colorControls, colorForm);\n input.before(pickerBtn);\n parent.append(pickerDropdown);\n\n // set colour key menu template\n if (colorKeywords || colorPresets) {\n const presetsDropdown = createElement({\n tagName: 'div',\n className: 'color-dropdown scrollable menu',\n }) as HTMLElement;\n\n // color presets\n if (colorPresets) {\n presetsDropdown.append(getColorMenu(self, colorPresets, 'color-options'));\n }\n\n // explicit defaults [reset, initial, inherit, transparent, currentColor]\n // also custom defaults [default: #069, complementary: #930]\n if (colorKeywords && colorKeywords.length) {\n presetsDropdown.append(getColorMenu(self, colorKeywords, 'color-defaults'));\n }\n\n const presetsBtn = createElement({\n tagName: 'button',\n className: 'menu-toggle btn-appearance',\n tabIndex: -1,\n ariaExpanded: 'false',\n ariaHasPopup: 'true',\n }) as HTMLElement;\n\n const xmlns = encodeURI('http://www.w3.org/2000/svg');\n const presetsIcon = createElementNS(xmlns, {\n tagName: 'svg',\n }) as HTMLElement;\n setAttribute(presetsIcon, 'xmlns', xmlns);\n setAttribute(presetsIcon, 'viewBox', '0 0 512 512');\n setAttribute(presetsIcon, ariaHidden, 'true');\n\n const path = createElementNS(xmlns, {\n tagName: 'path',\n }) as HTMLElement;\n setAttribute(path, 'd', 'M98,158l157,156L411,158l27,27L255,368L71,185L98,158z');\n setAttribute(path, 'fill', '#fff');\n presetsIcon.append(path);\n presetsBtn.append(\n createElement({\n tagName: 'span',\n className: vHidden,\n innerText: `${toggleLabel}`,\n }) as HTMLElement,\n presetsIcon,\n );\n\n parent.append(presetsBtn, presetsDropdown);\n }\n\n // solve non-colors after settings save\n if (colorKeywords && nonColors.includes(colorValue)) {\n self.value = colorValue;\n }\n setAttribute(input, tabindex, '-1');\n};\n\nexport default setMarkup;\n","import { addListener, removeListener } from '@thednp/event-listener';\n\nimport {\n ariaDescription,\n ariaSelected,\n ariaValueNow,\n ariaValueText,\n ariaExpanded,\n keyArrowDown,\n keyArrowUp,\n keyArrowLeft,\n keyArrowRight,\n keyEnter,\n keySpace,\n keyEscape,\n focusinEvent,\n mouseclickEvent,\n keydownEvent,\n changeEvent,\n touchmoveEvent,\n pointerdownEvent,\n pointermoveEvent,\n pointerupEvent,\n tabindex,\n focusoutEvent,\n resizeEvent,\n keyupEvent,\n scrollEvent,\n dispatchEvent,\n getElementsByClassName,\n closest,\n querySelector,\n getElementTransitionDuration,\n getBoundingClientRect,\n getUID,\n getElementStyle,\n getDocumentElement,\n getDocument,\n ObjectAssign,\n Data,\n getInstance,\n setElementStyle,\n normalizeOptions,\n reflow,\n focus,\n hasClass,\n addClass,\n removeClass,\n setAttribute,\n getAttribute,\n removeAttribute,\n isArray,\n isString,\n getWindow,\n} from '@thednp/shorty';\n\n// ColorPicker Util\n// ================\nimport Color from '@thednp/color';\nimport type { RGBA, HWBA, HSLA, HSVA } from '@thednp/color';\n\nimport ColorPalette from './colorPalette';\nimport colorPickerLabels from './util/colorPickerLabels';\nimport colorNames from './util/colorNames';\nimport isValidJSON from './util/isValidJSON';\nimport setMarkup from './util/setMarkup';\n\nimport ColorPickerOptions from './interface/colorPickerOptions';\nimport ColorPickerLabels from './interface/colorPickerLabels';\nimport { version } from '../../package.json';\n\n// ColorPicker GC\n// ==============\nconst colorPickerString = 'color-picker';\nconst colorPickerSelector = `[data-function=\"${colorPickerString}\"]`;\nconst colorPickerParentSelector = `.${colorPickerString}`;\nconst colorPickerDefaults: ColorPickerOptions = {\n componentLabels: colorPickerLabels,\n colorLabels: colorNames,\n format: 'rgb',\n colorPresets: false,\n colorKeywords: false,\n};\nconst { roundPart, nonColors } = Color;\n\n// ColorPicker Static Methods\n// ==========================\nconst getColorPickerInstance = (element: HTMLInputElement) => getInstance<ColorPicker>(element, colorPickerString);\nconst initColorPicker = (element: HTMLInputElement) => new ColorPicker(element);\n\n// ColorPicker Private Methods\n// ===========================\n\n/**\n * Add / remove `ColorPicker` main event listeners.\n */\nconst toggleEvents = (self: ColorPicker, action?: boolean) => {\n const fn = action ? addListener : removeListener;\n const { input, pickerToggle, menuToggle } = self;\n\n fn(input, focusinEvent, self.showPicker);\n fn(pickerToggle, mouseclickEvent, self.togglePicker);\n\n if (menuToggle) {\n fn(menuToggle, mouseclickEvent, self.toggleMenu);\n }\n};\n\n/**\n * Add / remove `ColorPicker` event listeners active only when open.\n */\nconst toggleEventsOnShown = (self: ColorPicker, action?: boolean) => {\n const fn = action ? addListener : removeListener;\n const { input, colorMenu, parent } = self;\n const doc = getDocument(input);\n const win = getWindow(doc);\n\n fn(self.controls, pointerdownEvent, self.pointerDown as EventListener);\n self.controlKnobs.forEach(x => fn(x, keydownEvent, self.handleKnobs as EventListener));\n\n fn(win, scrollEvent, self.handleScroll);\n fn(win, resizeEvent, self.update);\n\n [input, ...self.inputs].forEach(x => fn(x, changeEvent, self.changeHandler));\n\n if (colorMenu) {\n fn(colorMenu, mouseclickEvent, self.menuClickHandler);\n fn(colorMenu, keydownEvent, self.menuKeyHandler as EventListener);\n }\n\n fn(doc, pointermoveEvent, self.pointerMove as EventListener);\n fn(doc, pointerupEvent, self.pointerUp as EventListener);\n fn(parent, focusoutEvent, self.handleFocusOut as EventListener);\n fn(doc, keyupEvent, self.handleDismiss as EventListener);\n};\n\n/**\n * Triggers the `ColorPicker` original event.\n */\nconst firePickerChange = (self: ColorPicker) => {\n dispatchEvent(self.input, new CustomEvent('colorpicker.change'));\n};\n\n/**\n * Hides a visible dropdown.\n */\nconst removePosition = (element: HTMLElement) => {\n /* istanbul ignore else */\n if (element) {\n ['bottom', 'top'].forEach(x => removeClass(element, x));\n }\n};\n\n/**\n * Shows a `ColorPicker` dropdown and close the curent open dropdown.\n */\nconst showDropdown = (self: ColorPicker, dropdown: HTMLElement) => {\n const { colorPicker, colorMenu, menuToggle, pickerToggle, parent } = self;\n const isPicker = dropdown === colorPicker;\n const openDropdown = isPicker ? colorMenu : colorPicker;\n const activeBtn = isPicker ? menuToggle : pickerToggle;\n const nextBtn = !isPicker ? menuToggle : pickerToggle;\n\n if (!hasClass(parent, 'open')) {\n addClass(parent, 'open');\n }\n if (openDropdown) {\n removeClass(openDropdown, 'show');\n removePosition(openDropdown);\n }\n addClass(dropdown, 'bottom');\n reflow(dropdown);\n addClass(dropdown, 'show');\n\n if (isPicker) self.update();\n\n if (!self.isOpen) {\n toggleEventsOnShown(self, true);\n self.updateDropdownPosition();\n self.isOpen = true;\n setAttribute(self.input, tabindex, '0');\n if (menuToggle) {\n setAttribute(menuToggle, tabindex, '0');\n }\n }\n\n setAttribute(nextBtn, ariaExpanded, 'true');\n if (activeBtn) {\n setAttribute(activeBtn, ariaExpanded, 'false');\n }\n};\n\n/**\n * Color Picker Web Component\n *\n * @see http://thednp.github.io/color-picker\n */\nexport default class ColorPicker {\n // bring utils to staic\n public static Color = Color;\n public static ColorPalette = ColorPalette;\n public static getInstance = getColorPickerInstance;\n public static init = initColorPicker;\n public static selector = colorPickerSelector;\n // utils important for render\n public static roundPart = roundPart;\n public static setElementStyle = setElementStyle;\n public static setAttribute = setAttribute;\n public static getBoundingClientRect = getBoundingClientRect;\n public static version = version;\n public static colorNames = colorNames;\n public static colorPickerLabels = colorPickerLabels;\n\n id: number;\n input: HTMLInputElement;\n color: Color;\n format = 'rgb';\n parent: HTMLElement;\n dragElement: HTMLElement | undefined;\n isOpen = false;\n controlPositions: {\n c1x: number;\n c1y: number;\n c2y: number;\n c3y: number;\n };\n colorLabels: Record<string, string> = {};\n colorKeywords: string[] | false;\n colorPresets: ColorPalette | string[] | false;\n componentLabels: ColorPickerLabels;\n pickerToggle: HTMLElement;\n menuToggle: HTMLElement;\n colorPicker: HTMLElement;\n colorMenu: HTMLElement;\n controls: HTMLElement;\n inputs: HTMLInputElement[];\n controlKnobs: HTMLElement[];\n visuals: HTMLElement[];\n\n /**\n * Returns a new `ColorPicker` instance. The target of this constructor\n * must be an `HTMLInputElement`.\n *\n * @param target the target `<input>` element\n * @param config instance options\n */\n constructor(target: (HTMLElement & HTMLInputElement) | string, config?: Partial<ColorPickerOptions>) {\n const input = querySelector(target) as HTMLInputElement;\n\n // invalidate\n if (typeof target === 'undefined') throw new TypeError(`ColorPicker target not specified.`);\n if (isString(target) && !input) throw new TypeError(`ColorPicker target \"${target}\" cannot be found.`);\n this.input = input;\n\n const parent = closest(input, colorPickerParentSelector);\n if (!parent) throw new TypeError('ColorPicker requires a specific markup to work.');\n\n this.parent = parent;\n this.id = getUID(input, colorPickerString);\n this.dragElement = undefined;\n this.isOpen = false;\n this.controlPositions = {\n c1x: 0,\n c1y: 0,\n c2y: 0,\n c3y: 0,\n };\n this.colorLabels = {};\n this.colorKeywords = false;\n this.colorPresets = false;\n\n // process options\n const { format, componentLabels, colorLabels, colorKeywords, colorPresets } = normalizeOptions(\n input,\n colorPickerDefaults,\n config || {},\n );\n\n let translatedColorLabels = colorNames;\n /* istanbul ignore else */\n if (isArray(colorLabels) && colorLabels.length === 17) {\n translatedColorLabels = colorLabels;\n } else if (isString(colorLabels) && colorLabels.split(',').length === 17) {\n translatedColorLabels = colorLabels.split(',');\n }\n\n // expose colour labels to all methods\n colorNames.forEach((c, i) => {\n this.colorLabels[c] = translatedColorLabels[i].trim();\n });\n\n // update and expose component labels\n const tempComponentLabels =\n isString(componentLabels) && isValidJSON(componentLabels)\n ? (JSON.parse(componentLabels) as ColorPickerLabels)\n : componentLabels;\n this.componentLabels = ObjectAssign({ ...colorPickerLabels }, tempComponentLabels);\n this.color = new Color(input.value || '#fff', format);\n this.format = format;\n\n // set colour defaults\n if (isArray(colorKeywords) && colorKeywords.length) {\n this.colorKeywords = colorKeywords;\n } else if (isString(colorKeywords) && colorKeywords.length) {\n this.colorKeywords = colorKeywords.split(',').map(x => x.trim());\n }\n\n // set colour presets\n if (isArray(colorPresets) && colorPresets.length) {\n this.colorPresets = colorPresets;\n } else if (colorPresets && isValidJSON(colorPresets)) {\n const { hue, hueSteps, lightSteps, saturation } = JSON.parse(colorPresets) as {\n hue: number;\n hueSteps: number;\n lightSteps: number;\n saturation: number;\n };\n this.colorPresets = new ColorPalette(hue, hueSteps, lightSteps, saturation);\n } else if (isString(colorPresets)) {\n this.colorPresets = colorPresets.split(',').map((x: string) => x.trim());\n }\n\n // generate markup\n setMarkup(this);\n\n const [colorPicker, colorMenu] = getElementsByClassName('color-dropdown', parent);\n // set main elements\n this.pickerToggle = querySelector('.picker-toggle', parent) as HTMLElement;\n this.menuToggle = querySelector('.menu-toggle', parent) as HTMLElement;\n this.colorPicker = colorPicker;\n this.colorMenu = colorMenu;\n this.inputs = [...getElementsByClassName('color-input', parent)] as HTMLInputElement[];\n const [controls] = getElementsByClassName('color-controls', parent);\n this.controls = controls;\n this.controlKnobs = [...getElementsByClassName('knob', controls)];\n this.visuals = [...getElementsByClassName('visual-control', controls)];\n\n // update colour picker controls, inputs and visuals\n this.update();\n // console.log(this)\n\n // add main events listeners\n toggleEvents(this, true);\n\n // set component data\n Data.set(input, colorPickerString, this);\n }\n\n /** Returns the current colour value */\n get value(): string {\n return this.input.value;\n }\n\n /**\n * Sets a new colour value.\n *\n * @param {string} v new colour value\n */\n set value(v: string) {\n this.input.value = v;\n }\n\n /** Check if the colour presets include any non-colour. */\n get hasNonColor(): boolean {\n return this.colorKeywords instanceof Array && this.colorKeywords.some(x => nonColors.includes(x));\n }\n\n /** Returns hexadecimal value of the current colour. */\n get hex(): string {\n return this.color.toHex(true);\n }\n\n /** Returns the current colour value in {h,s,v,a} object format. */\n get hsv(): HSVA {\n return this.color.toHsv();\n }\n\n /** Returns the current colour value in {h,s,l,a} object format. */\n get hsl(): HSLA {\n return this.color.toHsl();\n }\n\n /** Returns the current colour value in {h,w,b,a} object format. */\n get hwb(): HWBA {\n return this.color.toHwb();\n }\n\n /** Returns the current colour value in {r,g,b,a} object format. */\n get rgb(): RGBA {\n return this.color.toRgb();\n }\n\n /** Returns the current colour brightness. */\n get brightness(): number {\n return this.color.brightness;\n }\n\n /** Returns the current colour luminance. */\n get luminance(): number {\n return this.color.luminance;\n }\n\n /** Checks if the current colour requires a light text colour. */\n get isDark(): boolean {\n const { color, brightness } = this;\n return brightness < 120 && color.a > 0.33;\n }\n\n /** Checks if the current input value is a valid colour. */\n get isValid(): boolean {\n const inputValue = this.input.value;\n return inputValue !== '' && new Color(inputValue).isValid;\n }\n\n /** Returns the colour appearance, usually the closest colour name for the current value. */\n get appearance(): string {\n const { colorLabels, hsl, hsv, format } = this;\n\n const hue = roundPart(hsl.h * 360);\n const saturationSource = format === 'hsl' ? hsl.s : hsv.s;\n const saturation = roundPart(saturationSource * 100);\n const lightness = roundPart(hsl.l * 100);\n const hsvl = hsv.v * 100;\n\n let colorName = 'black';\n\n // determine color appearance\n /* istanbul ignore else */\n if (lightness === 100 && saturation === 0) {\n colorName = colorLabels.white;\n } else if (lightness === 0) {\n colorName = colorLabels.black;\n } else if (saturation === 0) {\n colorName = colorLabels.grey;\n } else if (hue < 15 || hue >= 345) {\n colorName = colorLabels.red;\n } else if (hue >= 15 && hue < 45) {\n colorName = hsvl > 80 && saturation > 80 ? colorLabels.orange : colorLabels.brown;\n } else if (hue >= 45 && hue < 75) {\n const isGold = hue > 46 && hue < 54 && hsvl < 80 && saturation > 90;\n const isOlive = hue >= 54 && hue < 75 && hsvl < 80;\n colorName = isGold ? colorLabels.gold : colorLabels.yellow;\n colorName = isOlive ? colorLabels.olive : colorName;\n } else if (hue >= 75 && hue < 155) {\n colorName = hsvl < 68 ? colorLabels.green : colorLabels.lime;\n } else if (hue >= 155 && hue < 175) {\n colorName = colorLabels.teal;\n } else if (hue >= 175 && hue < 195) {\n colorName = colorLabels.cyan;\n } else if (hue >= 195 && hue < 255) {\n colorName = colorLabels.blue;\n } else if (hue >= 255 && hue < 270) {\n colorName = colorLabels.violet;\n } else if (hue >= 270 && hue < 295) {\n colorName = colorLabels.magenta;\n } else if (hue >= 295 && hue < 345) {\n colorName = colorLabels.pink;\n }\n return colorName;\n }\n\n /** Updates `ColorPicker` visuals. */\n updateVisuals(): void {\n const { controlPositions, visuals } = this;\n const [v1, v2, v3] = visuals;\n const { offsetHeight } = v1;\n const hue = controlPositions.c2y / offsetHeight;\n const { r, g, b } = new Color({ h: hue, s: 1, l: 0.5 }).toRgb();\n const whiteGrad = 'linear-gradient(rgb(255,255,255) 0%, rgb(255,255,255) 100%)';\n const alpha = 1 - controlPositions.c3y / offsetHeight;\n const roundA = roundPart(alpha * 100) / 100;\n\n const fill = new Color({\n h: hue,\n s: 1,\n l: 0.5,\n a: alpha,\n }).toRgbString();\n const hueGradient = `linear-gradient(\n rgb(255,0,0) 0%, rgb(255,255,0) 16.67%,\n rgb(0,255,0) 33.33%, rgb(0,255,255) 50%,\n rgb(0,0,255) 66.67%, rgb(255,0,255) 83.33%,\n rgb(255,0,0) 100%)`;\n setElementStyle(v1, {\n background: `linear-gradient(rgba(0,0,0,0) 0%, rgba(0,0,0,${roundA}) 100%),\n linear-gradient(to right, rgba(255,255,255,${roundA}) 0%, ${fill} 100%),\n ${whiteGrad}`,\n });\n setElementStyle(v2, { background: hueGradient });\n\n setElementStyle(v3, {\n background: `linear-gradient(rgba(${r},${g},${b},1) 0%,rgba(${r},${g},${b},0) 100%)`,\n });\n }\n\n /**\n * The `ColorPicker` *focusout* event listener when open.\n *\n * @param e\n * @this {ColorPicker}\n */\n handleFocusOut = ({ relatedTarget }: FocusEvent & { relatedTarget: HTMLElement }): void => {\n if (relatedTarget && !this.parent.contains(relatedTarget)) {\n this.hide(true);\n }\n };\n\n /**\n * The `ColorPicker` *keyup* event listener when open.\n *\n * @param e\n * @this {ColorPicker}\n */\n handleDismiss = ({ code }: KeyboardEvent): void => {\n if (this.isOpen && code === keyEscape) {\n this.hide();\n }\n };\n\n /**\n * The `ColorPicker` *scroll* event listener when open.\n *\n * @param e\n * @this {ColorPicker}\n */\n handleScroll = (e: Event): void => {\n const { activeElement } = getDocument(this.input);\n\n this.updateDropdownPosition();\n\n /* istanbul ignore next */\n if (\n ([pointermoveEvent, touchmoveEvent].includes(e.type) && this.dragElement) ||\n (activeElement && this.controlKnobs.includes(activeElement as HTMLElement))\n ) {\n e.stopPropagation();\n e.preventDefault();\n }\n };\n\n /**\n * The `ColorPicker` keyboard event listener for menu navigation.\n *\n * @param e\n */\n menuKeyHandler = (e: Event & { target: HTMLElement; code: string }) => {\n const { target, code } = e;\n const { previousElementSibling, nextElementSibling, parentElement } = target;\n const isColorOptionsMenu = parentElement && hasClass(parentElement, 'color-options');\n const allSiblings = parentElement ? [...parentElement.children] : [];\n const columnsCount =\n isColorOptionsMenu && getElementStyle(parentElement, 'grid-template-columns').split(' ').length;\n const currentIndex = allSiblings.indexOf(target);\n const previousElement = currentIndex > -1 && columnsCount && allSiblings[currentIndex - columnsCount];\n const nextElement = currentIndex > -1 && columnsCount && allSiblings[currentIndex + columnsCount];\n\n if ([keyArrowDown, keyArrowUp, keySpace].includes(code)) {\n // prevent scroll when navigating the menu via arrow keys / Space\n e.preventDefault();\n }\n if (isColorOptionsMenu) {\n if (previousElement && code === keyArrowUp) {\n focus(previousElement as HTMLElement);\n } else if (nextElement && code === keyArrowDown) {\n focus(nextElement as HTMLElement);\n } else if (previousElementSibling && code === keyArrowLeft) {\n focus(previousElementSibling as HTMLElement);\n } else if (nextElementSibling && code === keyArrowRight) {\n focus(nextElementSibling as HTMLElement);\n }\n } else if (previousElementSibling && [keyArrowLeft, keyArrowUp].includes(code)) {\n focus(previousElementSibling as HTMLElement);\n } else if (nextElementSibling && [keyArrowRight, keyArrowDown].includes(code)) {\n focus(nextElementSibling as HTMLElement);\n }\n\n if ([keyEnter, keySpace].includes(code)) {\n this.menuClickHandler(e);\n }\n };\n\n /**\n * The `ColorPicker` click event listener for the colour menu presets / defaults.\n *\n * @param e\n * @this {ColorPicker}\n */\n menuClickHandler = (e: Event): void => {\n const { target } = e;\n const { colorMenu } = this;\n const newOption = (getAttribute(target as HTMLElement, 'data-value') || '').trim();\n // invalidate for targets other than color options\n if (!newOption.length) return;\n const currentActive = querySelector('li.active', colorMenu);\n let newColor = newOption;\n newColor = nonColors.includes(newColor) ? 'white' : newColor;\n newColor = newColor === 'transparent' ? 'rgba(0,0,0,0)' : newColor;\n\n const { r, g, b, a } = new Color(newColor);\n\n ObjectAssign(this.color, {\n r,\n g,\n b,\n a,\n });\n\n this.update();\n\n /* istanbul ignore else */\n if (currentActive !== target) {\n /* istanbul ignore else */\n if (currentActive) {\n removeClass(currentActive, 'active');\n removeAttribute(currentActive, ariaSelected);\n }\n\n addClass(target as HTMLElement, 'active');\n setAttribute(target as HTMLElement, ariaSelected, 'true');\n\n if (nonColors.includes(newOption)) {\n this.value = newOption;\n }\n firePickerChange(this);\n }\n };\n\n /**\n * The `ColorPicker` *touchstart* / *mousedown* events listener for control knobs.\n *\n * @param e\n */\n pointerDown = (e: Event & { target: HTMLElement; pageX: number; pageY: number }) => {\n const { target, pageX, pageY } = e;\n const { colorMenu, visuals, controlKnobs } = this;\n const [v1, v2, v3] = visuals;\n const [c1, c2, c3] = controlKnobs;\n const visual = controlKnobs.includes(target) ? (target.previousElementSibling as HTMLElement) : target;\n const visualRect = getBoundingClientRect(visual);\n const html = getDocumentElement(v1);\n const offsetX = pageX - html.scrollLeft - visualRect.left;\n const offsetY = pageY - html.scrollTop - visualRect.top;\n\n /* istanbul ignore else */\n if (target === v1 || target === c1) {\n this.dragElement = visual;\n this.changeControl1(offsetX, offsetY);\n } else if (target === v2 || target === c2) {\n this.dragElement = visual;\n this.changeControl2(offsetY);\n } else if (target === v3 || target === c3) {\n this.dragElement = visual;\n this.changeAlpha(offsetY);\n }\n\n if (colorMenu) {\n const currentActive = querySelector('li.active', colorMenu);\n if (currentActive) {\n removeClass(currentActive, 'active');\n removeAttribute(currentActive, ariaSelected);\n }\n }\n e.preventDefault();\n };\n\n /**\n * The `ColorPicker` *touchend* / *mouseup* events listener for control knobs.\n *\n * @param e\n * @this\n */\n pointerUp = ({ target }: PointerEvent & { target: HTMLElement }) => {\n const { parent } = this;\n const doc = getDocument(parent);\n const currentOpen = querySelector(`${colorPickerParentSelector}.open`, doc) !== null;\n const selection = doc.getSelection();\n\n if (!this.dragElement && (!selection || !selection.toString().length) && !parent.contains(target)) {\n this.hide(currentOpen);\n }\n\n this.dragElement = undefined;\n };\n\n /**\n * The `ColorPicker` *touchmove* / *mousemove* events listener for control knobs.\n *\n * @param {PointerEvent} e\n */\n pointerMove = (e: PointerEvent): void => {\n const { dragElement, visuals } = this;\n const [v1, v2, v3] = visuals;\n const { pageX, pageY } = e;\n\n if (!dragElement) return;\n\n const controlRect = getBoundingClientRect(dragElement);\n const win = getDocumentElement(v1);\n const offsetX = pageX - win.scrollLeft - controlRect.left;\n const offsetY = pageY - win.scrollTop - controlRect.top;\n\n if (dragElement === v1) {\n this.changeControl1(offsetX, offsetY);\n }\n\n if (dragElement === v2) {\n this.changeControl2(offsetY);\n }\n\n if (dragElement === v3) {\n this.changeAlpha(offsetY);\n }\n };\n\n /**\n * The `ColorPicker` *keydown* event listener for control knobs.\n *\n * @param e\n */\n handleKnobs = (e: Event & { code: string }) => {\n const { target, code } = e;\n\n // only react to arrow buttons\n if (![keyArrowUp, keyArrowDown, keyArrowLeft, keyArrowRight].includes(code)) return;\n e.preventDefault();\n\n const { controlKnobs, visuals } = this;\n const { offsetWidth, offsetHeight } = visuals[0];\n const [c1, c2, c3] = controlKnobs;\n const { activeElement } = getDocument(c1);\n const currentKnob = controlKnobs.find(x => x === activeElement);\n const yRatio = offsetHeight / 360;\n\n /* istanbul ignore else */\n if (currentKnob) {\n let offsetX = 0;\n let offsetY = 0;\n\n /* istanbul ignore else */\n if (target === c1) {\n const xRatio = offsetWidth / 100;\n\n /* istanbul ignore else */\n if ([keyArrowLeft, keyArrowRight].includes(code)) {\n this.controlPositions.c1x += code === keyArrowRight ? xRatio : -xRatio;\n } else if ([keyArrowUp, keyArrowDown].includes(code)) {\n this.controlPositions.c1y += code === keyArrowDown ? yRatio : -yRatio;\n }\n\n offsetX = this.controlPositions.c1x;\n offsetY = this.controlPositions.c1y;\n this.changeControl1(offsetX, offsetY);\n } else if (target === c2) {\n this.controlPositions.c2y += [keyArrowDown, keyArrowRight].includes(code) ? yRatio : -yRatio;\n\n offsetY = this.controlPositions.c2y;\n this.changeControl2(offsetY);\n } else if (target === c3) {\n this.controlPositions.c3y += [keyArrowDown, keyArrowRight].includes(code) ? yRatio : -yRatio;\n\n offsetY = this.controlPositions.c3y;\n this.changeAlpha(offsetY);\n }\n this.handleScroll(e);\n }\n };\n\n /** The event listener of the colour form inputs. */\n changeHandler = (): void => {\n let colorSource;\n const { inputs, format, value: currentValue, input, controlPositions, visuals } = this;\n const { activeElement } = getDocument(input);\n const { offsetHeight } = visuals[0];\n const [i1, , , i4] = inputs;\n const [v1, v2, v3, v4] =\n format === 'rgb'\n ? inputs.map(i => parseFloat(i.value) / (i === i4 ? 100 : 1))\n : inputs.map(i => parseFloat(i.value) / (i !== i1 ? 100 : 360));\n const isNonColorValue = this.hasNonColor && nonColors.includes(currentValue);\n const alpha = i4 ? v4 : 1 - controlPositions.c3y / offsetHeight;\n\n /* istanbul ignore else */\n if (activeElement === input || (activeElement && inputs.includes(activeElement as HTMLInputElement))) {\n if (activeElement === input) {\n if (isNonColorValue) {\n colorSource = currentValue === 'transparent' ? 'rgba(0,0,0,0)' : 'rgb(0,0,0)';\n } else {\n colorSource = currentValue;\n }\n } else if (format === 'hex') {\n colorSource = i1.value;\n } else if (format === 'hsl') {\n colorSource = {\n h: v1,\n s: v2,\n l: v3,\n a: alpha,\n };\n } else if (format === 'hwb') {\n colorSource = {\n h: v1,\n w: v2,\n b: v3,\n a: alpha,\n };\n } else {\n colorSource = {\n r: v1,\n g: v2,\n b: v3,\n a: alpha,\n };\n }\n\n const { r, g, b, a } = new Color(colorSource);\n\n ObjectAssign(this.color, {\n r,\n g,\n b,\n a,\n });\n this.setControlPositions();\n this.updateAppearance();\n this.updateInputs();\n this.updateControls();\n this.updateVisuals();\n\n // set non-color keyword\n if (activeElement === input && isNonColorValue) {\n this.value = currentValue;\n }\n }\n };\n\n /**\n * Updates `ColorPicker` first control:\n * * `lightness` and `saturation` for HEX/RGB;\n * * `lightness` and `hue` for HSL.\n *\n * @param X the X component of the offset\n * @param Y the Y component of the offset\n */\n changeControl1(X: number, Y: number): void {\n let [offsetX, offsetY] = [0, 0];\n const { controlPositions, visuals } = this;\n const { offsetHeight, offsetWidth } = visuals[0];\n\n if (X > offsetWidth) offsetX = offsetWidth;\n else if (X >= 0) offsetX = X;\n\n if (Y > offsetHeight) offsetY = offsetHeight;\n else if (Y >= 0) offsetY = Y;\n\n const hue = controlPositions.c2y / offsetHeight;\n\n const saturation = offsetX / offsetWidth;\n\n const lightness = 1 - offsetY / offsetHeight;\n const alpha = 1 - controlPositions.c3y / offsetHeight;\n\n // new color\n const { r, g, b, a } = new Color({\n h: hue,\n s: saturation,\n v: lightness,\n a: alpha,\n });\n\n ObjectAssign(this.color, {\n r,\n g,\n b,\n a,\n });\n\n // new positions\n this.controlPositions.c1x = offsetX;\n this.controlPositions.c1y = offsetY;\n\n // update color picker\n this.updateAppearance();\n this.updateInputs();\n this.updateControls();\n this.updateVisuals();\n }\n\n /**\n * Updates `ColorPicker` second control:\n * * `hue` for HEX/RGB/HWB;\n * * `saturation` for HSL.\n *\n * @param Y the Y offset\n */\n changeControl2(Y: number) {\n const { controlPositions, visuals } = this;\n const { offsetHeight, offsetWidth } = visuals[0];\n\n let offsetY = 0;\n\n if (Y > offsetHeight) offsetY = offsetHeight;\n else if (Y >= 0) offsetY = Y;\n\n const hue = offsetY / offsetHeight;\n const saturation = controlPositions.c1x / offsetWidth;\n const lightness = 1 - controlPositions.c1y / offsetHeight;\n const alpha = 1 - controlPositions.c3y / offsetHeight;\n\n // new color\n const { r, g, b, a } = new Color({\n h: hue,\n s: saturation,\n v: lightness,\n a: alpha,\n });\n\n ObjectAssign(this.color, {\n r,\n g,\n b,\n a,\n });\n\n // new position\n this.controlPositions.c2y = offsetY;\n // update color picker\n this.updateAppearance();\n this.updateInputs();\n this.updateControls();\n this.updateVisuals();\n }\n\n /**\n * Updates `ColorPicker` last control,\n * the `alpha` channel.\n *\n * @param Y\n */\n changeAlpha(Y: number) {\n const { visuals } = this;\n const { offsetHeight } = visuals[0];\n let offsetY = 0;\n\n if (Y > offsetHeight) offsetY = offsetHeight;\n else if (Y >= 0) offsetY = Y;\n\n // update color alpha\n const alpha = 1 - offsetY / offsetHeight;\n this.color.setAlpha(alpha);\n // update position\n this.controlPositions.c3y = offsetY;\n // update color picker\n this.updateAppearance();\n this.updateInputs();\n this.updateControls();\n this.updateVisuals();\n }\n\n /**\n * Updates `ColorPicker` control positions on:\n * * initialization\n * * window resize\n */\n update = () => {\n this.updateDropdownPosition();\n this.updateAppearance();\n this.setControlPositions();\n this.updateInputs(true);\n this.updateControls();\n this.updateVisuals();\n };\n\n /** Updates the open dropdown position on *scroll* event. */\n updateDropdownPosition() {\n const { input, colorPicker, colorMenu } = this;\n const elRect = getBoundingClientRect(input);\n const { top, bottom } = elRect;\n const { offsetHeight: elHeight } = input;\n const windowHeight = getDocumentElement(input).clientHeight;\n const isPicker = hasClass(colorPicker, 'show');\n const dropdown = isPicker ? colorPicker : colorMenu;\n if (!dropdown) return;\n const { offsetHeight: dropHeight } = dropdown;\n const distanceBottom = windowHeight - bottom;\n const distanceTop = top;\n const bottomExceed = top + dropHeight + elHeight > windowHeight; // show\n const topExceed = top - dropHeight < 0; // show-top\n\n if ((hasClass(dropdown, 'bottom') || !topExceed) && distanceBottom < distanceTop && bottomExceed) {\n removeClass(dropdown, 'bottom');\n addClass(dropdown, 'top');\n } else {\n removeClass(dropdown, 'top');\n addClass(dropdown, 'bottom');\n }\n }\n\n /** Updates control knobs' positions. */\n setControlPositions() {\n const { visuals, color, hsv } = this;\n const { offsetHeight, offsetWidth } = visuals[0];\n const alpha = color.a;\n const hue = hsv.h;\n\n const saturation = hsv.s;\n const lightness = hsv.v;\n\n this.controlPositions.c1x = saturation * offsetWidth;\n this.controlPositions.c1y = (1 - lightness) * offsetHeight;\n this.controlPositions.c2y = hue * offsetHeight;\n this.controlPositions.c3y = (1 - alpha) * offsetHeight;\n }\n\n /** Update the visual appearance label and control knob labels. */\n updateAppearance() {\n const { componentLabels, color, parent, hsv, hex, format, controlKnobs } = this;\n const { appearanceLabel, hexLabel, valueLabel } = componentLabels;\n let { r, g, b } = color.toRgb();\n const [knob1, knob2, knob3] = controlKnobs;\n const hue = roundPart(hsv.h * 360);\n const alpha = color.a;\n const saturation = roundPart(hsv.s * 100);\n const lightness = roundPart(hsv.v * 100);\n const colorName = this.appearance;\n\n let colorLabel = `${hexLabel} ${hex.split('').join(' ')}`;\n\n if (format === 'hwb') {\n const { hwb } = this;\n const whiteness = roundPart(hwb.w * 100);\n const blackness = roundPart(hwb.b * 100);\n colorLabel = `HWB: ${hue}°, ${whiteness}%, ${blackness}%`;\n setAttribute(knob1, ariaValueText, `${whiteness}% & ${blackness}%`);\n setAttribute(knob1, ariaValueNow, `${whiteness}`);\n setAttribute(knob2, ariaDescription, `${valueLabel}: ${colorLabel}. ${appearanceLabel}: ${colorName}.`);\n setAttribute(knob2, ariaValueText, `${hue}%`);\n setAttribute(knob2, ariaValueNow, `${hue}`);\n } else {\n [r, g, b] = [r, g, b].map(roundPart);\n colorLabel = format === 'hsl' ? `HSL: ${hue}°, ${saturation}%, ${lightness}%` : colorLabel;\n colorLabel = format === 'rgb' ? `RGB: ${r}, ${g}, ${b}` : colorLabel;\n\n setAttribute(knob1, ariaValueText, `${lightness}% & ${saturation}%`);\n setAttribute(knob1, ariaValueNow, `${lightness}`);\n setAttribute(knob2, ariaDescription, `${valueLabel}: ${colorLabel}. ${appearanceLabel}: ${colorName}.`);\n setAttribute(knob2, ariaValueText, `${hue}°`);\n setAttribute(knob2, ariaValueNow, `${hue}`);\n }\n\n const alphaValue = roundPart(alpha * 100);\n setAttribute(knob3, ariaValueText, `${alphaValue}%`);\n setAttribute(knob3, ariaValueNow, `${alphaValue}`);\n\n // update the input backgroundColor\n const newColor = color.toString();\n setElementStyle(this.input, { backgroundColor: newColor });\n\n // toggle dark/light classes will also style the placeholder\n // dark sets color white, light sets color black\n // isDark ? '#000' : '#fff'\n if (!this.isDark) {\n if (hasClass(parent, 'txt-dark')) removeClass(parent, 'txt-dark');\n if (!hasClass(parent, 'txt-light')) addClass(parent, 'txt-light');\n } else {\n if (hasClass(parent, 'txt-light')) removeClass(parent, 'txt-light');\n if (!hasClass(parent, 'txt-dark')) addClass(parent, 'txt-dark');\n }\n }\n\n /** Updates the control knobs actual positions. */\n updateControls() {\n const { controlKnobs, controlPositions } = this;\n let { c1x, c1y, c2y, c3y } = controlPositions;\n const [control1, control2, control3] = controlKnobs;\n // round control positions\n [c1x, c1y, c2y, c3y] = [c1x, c1y, c2y, c3y].map(roundPart);\n\n setElementStyle(control1, {\n transform: `translate3d(${c1x - 4}px,${c1y - 4}px,0)`,\n });\n setElementStyle(control2, { transform: `translate3d(0,${c2y - 4}px,0)` });\n setElementStyle(control3, { transform: `translate3d(0,${c3y - 4}px,0)` });\n }\n\n /**\n * Updates all color form inputs.\n *\n * @param isPrevented when `true`, the component original event is prevented\n */\n updateInputs(isPrevented?: boolean) {\n const { value: oldColor, format, inputs, color, hsl } = this;\n const [i1, i2, i3, i4] = inputs;\n const alpha = roundPart(color.a * 100);\n const hue = roundPart(hsl.h * 360);\n let newColor = color.toString();\n\n /* istanbul ignore else */\n if (format === 'hex') {\n newColor = this.color.toHexString(true);\n i1.value = this.hex;\n } else if (format === 'hsl') {\n const lightness = roundPart(hsl.l * 100);\n const saturation = roundPart(hsl.s * 100);\n newColor = this.color.toHslString();\n i1.value = `${hue}`;\n i2.value = `${saturation}`;\n i3.value = `${lightness}`;\n i4.value = `${alpha}`;\n } else if (format === 'hwb') {\n const { w, b } = this.hwb;\n const whiteness = roundPart(w * 100);\n const blackness = roundPart(b * 100);\n\n newColor = this.color.toHwbString();\n i1.value = `${hue}`;\n i2.value = `${whiteness}`;\n i3.value = `${blackness}`;\n i4.value = `${alpha}`;\n } else if (format === 'rgb') {\n let { r, g, b } = this.rgb;\n [r, g, b] = [r, g, b].map(roundPart);\n\n newColor = this.color.toRgbString();\n i1.value = `${r}`;\n i2.value = `${g}`;\n i3.value = `${b}`;\n i4.value = `${alpha}`;\n }\n\n // update the color value\n this.value = newColor;\n\n // don't trigger the custom event unless it's really changed\n if (!isPrevented && newColor !== oldColor) {\n firePickerChange(this);\n }\n }\n\n /**\n * Toggle the `ColorPicker` dropdown visibility.\n *\n * @param e\n */\n togglePicker = (e?: Event) => {\n if (e) e.preventDefault();\n const { colorPicker } = this;\n\n if (this.isOpen && hasClass(colorPicker, 'show')) {\n this.hide(true);\n } else {\n showDropdown(this, colorPicker);\n }\n };\n\n /** Shows the `ColorPicker` dropdown. */\n showPicker = () => {\n const { colorPicker } = this;\n\n if (!['top', 'bottom'].some(c => hasClass(colorPicker, c))) {\n showDropdown(this, colorPicker);\n }\n };\n\n /**\n * Toggles the visibility of the `ColorPicker` presets menu.\n *\n * @param e\n * @this {ColorPicker}\n */\n toggleMenu = (e?: Event) => {\n if (e) e.preventDefault();\n const { colorMenu } = this;\n\n if (this.isOpen && hasClass(colorMenu, 'show')) {\n this.hide(true);\n } else {\n showDropdown(this, colorMenu);\n }\n };\n\n /**\n * Hides the currently open `ColorPicker` dropdown.\n *\n * @param {boolean=} focusPrevented\n */\n hide(focusPrevented?: boolean) {\n if (this.isOpen) {\n const { pickerToggle, menuToggle, colorPicker, colorMenu, parent, input } = this;\n const openPicker = hasClass(colorPicker, 'show');\n const openDropdown = openPicker ? colorPicker : colorMenu;\n const relatedBtn = openPicker ? pickerToggle : menuToggle;\n const animationDuration = openDropdown && getElementTransitionDuration(openDropdown);\n\n this.value = this.color.toString(true);\n\n /* istanbul ignore else */\n if (openDropdown) {\n removeClass(openDropdown, 'show');\n setAttribute(relatedBtn, ariaExpanded, 'false');\n setTimeout(() => {\n removePosition(openDropdown);\n /* istanbul ignore else */\n if (!querySelector('.show', parent)) {\n removeClass(parent, 'open');\n toggleEventsOnShown(this);\n this.isOpen = false;\n }\n }, animationDuration);\n }\n\n if (!focusPrevented) {\n focus(pickerToggle);\n }\n setAttribute(input, tabindex, '-1');\n if (relatedBtn === menuToggle) {\n setAttribute(menuToggle, tabindex, '-1');\n }\n }\n }\n\n /** Removes `ColorPicker` from target `<input>`. */\n dispose() {\n const { input, parent } = this;\n this.hide(true);\n toggleEvents(this);\n [...parent.children].forEach(el => {\n if (el !== input) el.remove();\n });\n\n removeAttribute(input, tabindex);\n setElementStyle(input, { backgroundColor: '' });\n\n ['txt-light', 'txt-dark'].forEach(c => removeClass(parent, c));\n Data.remove(input, colorPickerString);\n }\n}\n"],"names":["e","f","t","c","i","n","s","o","a","r","E","d","fe","ge","Ee","Ae","Ne","ke","K","P","_","tt","st","rt","it","St","Nt","kt","Ct","zt","Bt","Re","Qe","qe","Ge","Ye","Ze","on","Rt","F","fn","qt","A","Gt","S","z","x","M","jt","Jt","Kt","Xt","Yt","kn","Dn","Ln","On","In","v","u","O","Bn","N","W","R","k","Zt","$t","Q","g","ne","Rn","V","w","oe","Qn","l","p","y","q","Xn","Yn","I","$n","h","T","B","H","b","ae","so","ie","le","wo","No","U","D","L","rr","tr","er","$","Z","J","G","X","m","j","C","Y","sr","ColorPalette","Color","args","hue","hueSteps","lightSteps","lightnessArray","saturation","colors","hueStep","half","steps1To13","lightSets","closestSet","set","lightStep","currentHue","newColor","colorPickerLabels","colorNames","isValidJSON","str","isString","vHidden","getColorForm","self","format","id","componentLabels","colorForm","createElement","components","toUpperCase","cID","formatLabel","cInputLabel","setAttribute","cInput","max","step","ObjectAssign","getColorControls","hueLabel","alphaLabel","lightnessLabel","saturationLabel","whitenessLabel","blacknessLabel","max1","max2","max3","ctrl1Label","ctrl2Label","colorControls","colorPointer","colorSlider","template","min","control","knob","getColorMenu","colorsSource","menuClass","input","defaultsLabel","presetsLabel","isOptionsMenu","isPalette","menuLabel","colorsArray","colorsCount","fit","isMultiLine","rowCountHover","rowCount","isScrollable","finalClass","gap","optionSize","menuHeight","menuHeightHover","menu","setElementStyle","value","label","isActive","getAttribute","option","setMarkup","parent","colorKeywords","colorPresets","colorValue","nonColors","toggleLabel","pickerLabel","hexLabel","color","formatString","pickerBtn","pickerDropdown","presetsDropdown","presetsBtn","xmlns","presetsIcon","createElementNS","ariaHidden","path","tabindex","colorPickerString","colorPickerSelector","colorPickerParentSelector","colorPickerDefaults","roundPart","getColorPickerInstance","element","getInstance","initColorPicker","ColorPicker","toggleEvents","action","addListener","removeListener","pickerToggle","menuToggle","focusinEvent","mouseclickEvent","toggleEventsOnShown","colorMenu","doc","getDocument","win","getWindow","pointerdownEvent","keydownEvent","scrollEvent","resizeEvent","changeEvent","pointermoveEvent","pointerupEvent","focusoutEvent","keyupEvent","firePickerChange","dispatchEvent","removePosition","removeClass","showDropdown","dropdown","colorPicker","isPicker","openDropdown","activeBtn","nextBtn","hasClass","addClass","reflow","ariaExpanded","getBoundingClientRect","version","target","config","querySelector","closest","getUID","colorLabels","normalizeOptions","translatedColorLabels","isArray","tempComponentLabels","getElementsByClassName","controls","Data","brightness","inputValue","hsl","hsv","saturationSource","lightness","hsvl","colorName","isGold","isOlive","controlPositions","visuals","v1","v2","v3","offsetHeight","whiteGrad","alpha","roundA","fill","hueGradient","relatedTarget","code","keyEscape","activeElement","touchmoveEvent","previousElementSibling","nextElementSibling","parentElement","isColorOptionsMenu","allSiblings","columnsCount","getElementStyle","currentIndex","previousElement","nextElement","keyArrowDown","keyArrowUp","keySpace","focus","keyArrowLeft","keyArrowRight","keyEnter","newOption","currentActive","removeAttribute","ariaSelected","pageX","pageY","controlKnobs","c1","c2","c3","visual","visualRect","html","getDocumentElement","offsetX","offsetY","currentOpen","selection","dragElement","controlRect","offsetWidth","currentKnob","yRatio","xRatio","colorSource","inputs","currentValue","i1","i4","v4","isNonColorValue","elRect","top","bottom","elHeight","windowHeight","dropHeight","distanceBottom","distanceTop","bottomExceed","topExceed","hex","appearanceLabel","valueLabel","knob1","knob2","knob3","colorLabel","hwb","whiteness","blackness","ariaValueText","ariaValueNow","ariaDescription","alphaValue","c1x","c1y","c2y","c3y","control1","control2","control3","isPrevented","oldColor","i2","i3","focusPrevented","openPicker","relatedBtn","animationDuration","getElementTransitionDuration","el"],"mappings":"AAAK,MAACA,IAAI,CAAE,GAAEC,KAAI,CAACC,MAAM;AACvB,QAAM,EAAE,MAAMC,GAAG,eAAeC,EAAC,IAAKF;AACtC,GAAC,GAAGF,EAAEG,CAAC,CAAC,EAAE,QAAQ,CAAC,CAACE,GAAGC,CAAC,MAAM;AAC5B,IAAAF,MAAMC,KAAK,CAAC,GAAGC,CAAC,EAAE,QAAQ,CAAC,CAACC,GAAGC,CAAC,MAAM;AACpC,MAAAD,EAAE,MAAMF,GAAG,CAACH,CAAC,CAAC,GAAG,OAAOM,KAAK,YAAYA,EAAE,QAAQC,GAAEJ,GAAGF,GAAGI,GAAGC,CAAC;AAAA,IACrE,CAAK;AAAA,EACL,CAAG;AACH,GAAGE,KAAI,CAACR,GAAGC,GAAGC,GAAGC,MAAM;AACrB,EAAAL,EAAEG,CAAC,MAAMH,EAAEG,CAAC,IAAoB,oBAAI,IAAG;AACvC,QAAMG,IAAIN,EAAEG,CAAC;AACb,EAAAG,EAAE,IAAIJ,CAAC,KAAKI,EAAE,IAAIJ,GAAmB,oBAAI,IAAG,CAAE;AAC9C,QAAMK,IAAID,EAAE,IAAIJ,CAAC,GAAG,EAAE,MAAMM,EAAG,IAAGD;AAClC,EAAAA,EAAE,IAAIH,GAAGC,CAAC,GAAGG,KAAKN,EAAE,iBAAiBC,GAAGF,IAAGI,CAAC;AAC9C,GAAGI,KAAI,CAACP,GAAGC,GAAGC,GAAGC,MAAM;AACrB,QAAMC,IAAIN,EAAEG,CAAC,GAAGI,IAAID,KAAKA,EAAE,IAAIJ,CAAC,GAAGM,IAAID,KAAKA,EAAE,IAAIH,CAAC,G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