@thednp/color-picker 2.0.1 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +25 -14
- package/dist/css/color-picker.css +3 -6
- package/dist/css/color-picker.css.map +1 -0
- package/dist/css/color-picker.min.css +1 -2
- package/dist/css/color-picker.min.css.map +1 -0
- package/dist/css/color-picker.rtl.css +3 -6
- package/dist/css/color-picker.rtl.css.map +1 -0
- package/dist/css/color-picker.rtl.min.css +1 -2
- package/dist/css/color-picker.rtl.min.css.map +1 -0
- package/dist/js/color-picker.cjs +2 -2
- package/dist/js/color-picker.cjs.map +1 -1
- package/dist/js/color-picker.d.ts +307 -300
- package/dist/js/color-picker.js +2 -2
- package/dist/js/color-picker.js.map +1 -1
- package/dist/js/color-picker.mjs +423 -382
- package/dist/js/color-picker.mjs.map +1 -1
- package/package.json +39 -50
- package/.eslintrc.cjs +0 -199
- package/.lgtm.yml +0 -9
- package/.prettierrc.json +0 -15
- package/.stylelintrc.json +0 -236
- package/compile.cjs +0 -51
- package/cypress/e2e/color-palette.cy.ts +0 -128
- package/cypress/e2e/color-picker.cy.ts +0 -909
- package/cypress/fixtures/colorNamesFrench.js +0 -3
- package/cypress/fixtures/componentLabelsFrench.js +0 -21
- package/cypress/fixtures/format.js +0 -3
- package/cypress/fixtures/getMarkup.js +0 -35
- package/cypress/fixtures/getRandomInt.js +0 -6
- package/cypress/fixtures/sampleWebcolors.js +0 -18
- package/cypress/fixtures/testSample.js +0 -8
- package/cypress/plugins/esbuild-istanbul.ts +0 -50
- package/cypress/plugins/tsCompile.ts +0 -34
- package/cypress/support/commands.ts +0 -0
- package/cypress/support/e2e.ts +0 -21
- package/cypress/test.html +0 -23
- package/cypress.config.ts +0 -30
- package/dts.config.ts +0 -15
- package/src/scss/_variables.scss +0 -6
- package/src/scss/color-picker.rtl.scss +0 -27
- package/src/scss/color-picker.scss +0 -536
- package/src/ts/colorPalette.ts +0 -89
- package/src/ts/index.ts +0 -1236
- package/src/ts/interface/ColorNames.ts +0 -20
- package/src/ts/interface/colorPickerLabels.ts +0 -20
- package/src/ts/interface/colorPickerOptions.ts +0 -11
- package/src/ts/interface/paletteOptions.ts +0 -6
- package/src/ts/util/colorNames.ts +0 -21
- package/src/ts/util/colorPickerLabels.ts +0 -24
- package/src/ts/util/getColorControls.ts +0 -90
- package/src/ts/util/getColorForm.ts +0 -75
- package/src/ts/util/getColorMenu.ts +0 -83
- package/src/ts/util/isValidJSON.ts +0 -19
- package/src/ts/util/setMarkup.ts +0 -130
- package/src/ts/util/vHidden.ts +0 -2
- package/tsconfig.json +0 -29
- package/vite.config.mts +0 -35
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"color-picker.cjs","sources":["../../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 pe = \"aria-checked\", me = \"aria-description\", fe = \"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\", Ne = \"aria-valuemax\", ke = \"aria-valuenow\", Me = \"aria-valuetext\", q = \"abort\", G = \"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\", mt = \"mouseenter\", ft = \"mouseleave\", gt = \"mousein\", vt = \"mouseout\", Et = \"mouseover\", bt = \"mousemove\", ht = \"mousewheel\", yt = \"move\", wt = \"orientationchange\", At = \"pointercancel\", St = \"pointerdown\", Nt = \"pointerleave\", kt = \"pointermove\", Mt = \"pointerup\", Tt = \"readystatechange\", Dt = \"reset\", Ct = \"resize\", Ot = \"select\", Lt = \"selectend\", It = \"selectstart\", zt = \"scroll\", xt = \"submit\", Vt = \"touchstart\", Bt = \"touchmove\", Ht = \"touchcancel\", Pt = \"touchend\", Ft = \"unload\", Te = {\n DOMContentLoaded: P,\n DOMMouseScroll: Y,\n abort: q,\n beforeunload: G,\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: mt,\n mouseleave: ft,\n mouseover: Et,\n mouseup: dt,\n mousewheel: ht,\n move: yt,\n orientationchange: wt,\n pointercancel: At,\n pointerdown: St,\n pointerleave: Nt,\n pointermove: kt,\n pointerup: Mt,\n readystatechange: Tt,\n reset: Dt,\n resize: Ct,\n scroll: zt,\n select: Ot,\n selectend: Lt,\n selectstart: It,\n submit: xt,\n touchcancel: Ht,\n touchend: Pt,\n touchmove: Bt,\n touchstart: Vt,\n unload: Ft\n}, De = \"drag\", Ce = \"dragstart\", Oe = \"dragenter\", Le = \"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}, Fe = { in: \"focusin\", out: \"focusout\" }, Ue = {\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\", je = \"ArrowLeft\", qe = \"ArrowRight\", Ge = \"Backspace\", Je = \"CapsLock\", Ke = \"Control\", Xe = \"Delete\", Ye = \"Enter\", Ze = \"NumpadEnter\", $e = \"Escape\", _e = \"Insert\", tn = \"Meta\", en = \"Pause\", nn = \"ScrollLock\", on = \"Shift\", sn = \"Space\", cn = \"Tab\", Ut = \"animationDuration\", Wt = \"animationDelay\", F = \"animationName\", D = \"animationend\", Rt = \"transitionDuration\", Qt = \"transitionDelay\", C = \"transitionend\", U = \"transitionProperty\", rn = \"addEventListener\", an = \"removeEventListener\", un = {\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}, ln = \"offsetHeight\", dn = \"offsetWidth\", pn = \"scrollHeight\", mn = \"scrollWidth\", fn = \"tabindex\", jt = navigator.userAgentData, A = jt, { userAgent: qt } = navigator, S = qt, z = /iPhone|iPad|iPod|Android/i;\nlet O = !1;\nA ? O = A.brands.some((t) => z.test(t.brand)) : O = z.test(S);\nconst gn = O, x = /(iPhone|iPod|iPad)/, vn = A ? A.brands.some((t) => x.test(t.brand)) : (\n /* istanbul ignore next */\n x.test(S)\n), En = S ? S.includes(\"Firefox\") : (\n /* istanbul ignore next */\n !1\n), { head: N } = document, bn = [\"webkitPerspective\", \"perspective\"].some((t) => t in N.style), Gt = (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 Gt(t, e, s, o);\n}, Xt = () => {\n}, hn = (() => {\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})(), yn = [\"webkitTransform\", \"transform\"].some((t) => t in N.style), wn = \"ontouchstart\" in window || /* istanbul ignore next */\n\"msMaxTouchPoints\" in navigator, An = [\"webkitAnimation\", \"animation\"].some((t) => t in N.style), Sn = [\"webkitTransition\", \"transition\"].some((t) => t in N.style), Yt = (t, e) => t.getAttribute(e), Nn = (t, e, n) => e.getAttributeNS(t, n), kn = (t, e) => t.hasAttribute(e), Mn = (t, e, n) => e.hasAttributeNS(t, n), Tn = (t, e, n) => t.setAttribute(e, n), Dn = (t, e, n, o) => e.setAttributeNS(t, n, o), Cn = (t, e) => t.removeAttribute(e), On = (t, e, n) => e.removeAttributeNS(t, n), Ln = (t, ...e) => {\n t.classList.add(...e);\n}, In = (t, ...e) => {\n t.classList.remove(...e);\n}, zn = (t, e) => t.classList.contains(e), { body: xn } = document, { documentElement: Vn } = document, Bn = (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(), L = {\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)) 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) return null;\n const n = L.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 = L.getAllFor(e);\n !n || !u(t) || (n.delete(t), n.size === 0 && E.delete(e));\n }\n}, Hn = (t, e) => L.get(t, e), k = (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, M = (t, ...e) => Object.assign(t, ...e), Zt = (t) => {\n if (!t) return;\n if (k(t))\n return d().createElement(t);\n const { tagName: e } = t, n = Zt(e);\n if (!n) return;\n const o = { ...t };\n return delete o.tagName, M(n, o);\n}, $t = (t, e) => {\n if (!t || !e) return;\n if (k(e))\n return d().createElementNS(t, e);\n const { tagName: n } = e, o = $t(t, n);\n if (!o) return;\n const s = { ...e };\n return delete s.tagName, M(o, s);\n}, Q = (t, e) => t.dispatchEvent(e), Pn = (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, F), 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, F), n = g(t, Ut), 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}, Fn = (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, U), 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, U), 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}, Wn = (t) => Float32Array.from(Array.from(t)), Rn = (t) => Float64Array.from(Array.from(t)), Qn = (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(), jn = (t, e, n, o) => {\n const s = { ...n }, r = { ...t.dataset }, a = { ...e }, l = {}, p = \"title\";\n return w(r).forEach(([c, m]) => {\n const y = o && typeof c == \"string\" && c.includes(o) ? c.replace(o, \"\").replace(/[A-Z]/g, (j) => oe(j)) : c;\n l[y] = V(m);\n }), w(s).forEach(([c, m]) => {\n s[c] = V(m);\n }), w(e).forEach(([c, m]) => {\n c in s ? a[c] = s[c] : c in l ? a[c] = l[c] : a[c] = c === p ? Yt(t, p) : m;\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), Kn = (t) => Object.fromEntries(t), Xn = (t, e) => {\n const n = new CustomEvent(t, {\n cancelable: !0,\n bubbles: !0\n });\n return v(e) && M(n, e), n;\n}, Yn = { passive: !0 }, Zn = (t) => t.offsetHeight, $n = (t, e) => {\n w(e).forEach(([n, o]) => {\n if (o && k(n) && n.includes(\"--\"))\n t.style.setProperty(n, o);\n else {\n const s = {};\n s[n] = o, M(t.style, s);\n }\n });\n}, I = (t) => v(t) && t.constructor.name === \"Map\" || !1, se = (t) => typeof t == \"number\" || !1, f = /* @__PURE__ */ new Map(), _n = {\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 ? (f.has(t) || f.set(t, /* @__PURE__ */ new Map()), f.get(t).set(o, setTimeout(e, n))) : f.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)) return null;\n const n = f.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)) return;\n const n = f.get(t);\n e && e.length && I(n) ? (clearTimeout(n.get(e)), n.delete(e), n.size === 0 && f.delete(t)) : (clearTimeout(n), f.delete(t));\n }\n}, to = (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: m, offsetHeight: y } = t;\n p = m > 0 ? Math.round(n) / m : (\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}, eo = (t) => d(t).body, T = (t) => d(t).documentElement, no = (t) => d(t).head, oo = (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, so = (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)) 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}, co = (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}, ro = (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, ao = (t) => i(t) && t.nodeName === \"CANVAS\" || !1, ue = (t) => u(t) && !!t.shadowRoot || !1, io = (t) => i(t) && [1, 2, 3, 4, 5, 6, 7, 8].some((e) => t.nodeType === e) || !1, uo = (t) => {\n if (!i(t)) return !1;\n const { top: e, bottom: n } = h(t), { clientHeight: o } = T(t);\n return e <= o && n >= 0;\n}, lo = (t) => {\n if (!i(t)) 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}, po = (t) => ie(t) && t.every(u) || !1, mo = (t) => typeof t == \"function\" || !1, fo = (t) => v(t) && t.constructor.name === \"HTMLCollection\" || !1, go = (t) => u(t) && t.tagName === \"IMG\" || !1, vo = (t) => {\n if (!k(t)) return !1;\n try {\n JSON.parse(t);\n } catch {\n return !1;\n }\n return !0;\n}, Eo = (t) => v(t) && t.constructor.name === \"WeakMap\" || !1, bo = (t) => i(t) && [\"SVG\", \"Image\", \"Video\", \"Canvas\"].some((e) => t.constructor.name.includes(e)) || !1, ho = (t) => v(t) && t.constructor.name === \"NodeList\" || !1, yo = (t) => T(t).dir === \"rtl\", wo = (t) => i(t) && t.constructor.name.includes(\"SVG\") || !1, Ao = (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, So = (t, e) => u(t) ? t : (i(e) ? e : d()).querySelector(t), de = (t, e) => (i(e) ? e : d()).getElementsByTagName(t), No = (t) => [...de(\"*\", t)].filter(ue), ko = (t, e) => d(e).getElementById(t) || null, Mo = (t, e) => (i(e) ? e : d()).querySelectorAll(t), To = (t, e) => (e && i(e) ? e : d()).getElementsByClassName(\n t\n), Do = (t, e) => t.matches(e), Co = \"2.0.3\";\nexport {\n Bn as ArrayFrom,\n P as DOMContentLoadedEvent,\n Y as DOMMouseScrollEvent,\n L as Data,\n Wn as Float32ArrayFrom,\n Rn as Float64ArrayFrom,\n M as ObjectAssign,\n w as ObjectEntries,\n Kn as ObjectFromEntries,\n qn as ObjectHasOwn,\n Gn as ObjectKeys,\n Jn as ObjectValues,\n _n as Timer,\n q as abortEvent,\n Ln as addClass,\n rn as addEventListener,\n Wt as animationDelay,\n Ut as animationDuration,\n D as animationEndEvent,\n F as animationName,\n pe as ariaChecked,\n fe as ariaDescribedBy,\n me 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 Ne as ariaValueMax,\n Se as ariaValueMin,\n ke as ariaValueNow,\n Me as ariaValueText,\n G as beforeunloadEvent,\n un as bezierEasings,\n J as blurEvent,\n K as changeEvent,\n le as closest,\n X as contextmenuEvent,\n Xn as createCustomEvent,\n Zt as createElement,\n $t as createElementNS,\n Q as dispatchEvent,\n Pn as distinct,\n xn as documentBody,\n Vn as documentElement,\n N as documentHead,\n De as dragEvent,\n ze as dragendEvent,\n Oe as dragenterEvent,\n Le as dragleaveEvent,\n Ie as dragoverEvent,\n Ce as dragstartEvent,\n Fn as emulateAnimationEnd,\n Un as emulateTransitionEnd,\n Z as errorEvent,\n Qn as focus,\n $ as focusEvent,\n Fe 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 Nn as getAttributeNS,\n h as getBoundingClientRect,\n No as getCustomElements,\n d as getDocument,\n eo as getDocumentBody,\n T as getDocumentElement,\n no as getDocumentHead,\n _t as getElementAnimationDelay,\n te as getElementAnimationDuration,\n ko as getElementById,\n g as getElementStyle,\n ee as getElementTransitionDelay,\n ne as getElementTransitionDuration,\n To as getElementsByClassName,\n de as getElementsByTagName,\n Hn as getInstance,\n oo as getNodeScroll,\n so as getParentNode,\n co as getRectRelativeToOffsetParent,\n ae as getUID,\n ro as getWindow,\n kn as hasAttribute,\n Mn as hasAttributeNS,\n zn as hasClass,\n vn as isApple,\n ie as isArray,\n ao as isCanvas,\n ue as isCustomElement,\n R as isDocument,\n io as isElement,\n uo as isElementInScrollRange,\n lo as isElementInViewport,\n po as isElementsArray,\n En as isFirefox,\n mo as isFunction,\n fo as isHTMLCollection,\n u as isHTMLElement,\n go as isHTMLImageElement,\n vo as isJSON,\n I as isMap,\n bo as isMedia,\n gn as isMobile,\n i as isNode,\n ho as isNodeList,\n se as isNumber,\n v as isObject,\n yo as isRTL,\n wo as isSVGElement,\n re as isScaledElement,\n ce as isShadowRoot,\n k as isString,\n Ao as isTableElement,\n Eo as isWeakMap,\n W as isWindow,\n We as keyAlt,\n Re as keyArrowDown,\n je as keyArrowLeft,\n qe as keyArrowRight,\n Qe as keyArrowUp,\n Ge as keyBackspace,\n Je as keyCapsLock,\n Ke as keyControl,\n Xe as keyDelete,\n Ye as keyEnter,\n $e as keyEscape,\n _e as keyInsert,\n tn as keyMeta,\n Ze as keyNumpadEnter,\n en as keyPause,\n nn as keyScrollLock,\n on as keyShift,\n sn as keySpace,\n cn as keyTab,\n Ue as keyboardEventKeys,\n st as keydownEvent,\n ct as keypressEvent,\n rt as keyupEvent,\n at as loadEvent,\n xe as loadstartEvent,\n Do 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 mt as mouseenterEvent,\n pt as mousehoverEvent,\n gt as mouseinEvent,\n ft 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 jn as normalizeOptions,\n V as normalizeValue,\n Jt as off,\n ln as offsetHeight,\n dn as offsetWidth,\n Gt as on,\n Kt as one,\n wt as orientationchangeEvent,\n Yn as passiveHandler,\n At as pointercancelEvent,\n St as pointerdownEvent,\n Nt as pointerleaveEvent,\n kt as pointermoveEvent,\n Mt as pointerupEvent,\n So as querySelector,\n Mo as querySelectorAll,\n Tt as readystatechangeEvent,\n Zn as reflow,\n Cn as removeAttribute,\n On as removeAttributeNS,\n In as removeClass,\n an as removeEventListener,\n Dt as resetEvent,\n Ct as resizeEvent,\n zt as scrollEvent,\n pn as scrollHeight,\n mn as scrollWidth,\n Ot as selectEvent,\n Lt as selectendEvent,\n It as selectstartEvent,\n Tn as setAttribute,\n Dn as setAttributeNS,\n $n as setElementStyle,\n xt as submitEvent,\n bn as support3DTransform,\n An as supportAnimation,\n hn as supportPassive,\n wn as supportTouch,\n yn as supportTransform,\n Sn as supportTransition,\n fn as tabindex,\n oe as toLowerCase,\n to 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 U as transitionProperty,\n Ft as unloadEvent,\n S as userAgent,\n A as userAgentData,\n Co 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) 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.9\";\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\") 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\") 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\") 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<HTMLButtonElement>({\n id: `picker-btn-${id}`,\n tagName: 'button',\n type: 'button',\n className: 'picker-toggle btn-appearance',\n ariaExpanded: 'false',\n ariaHasPopup: 'true',\n }) as HTMLButtonElement;\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<HTMLButtonElement>({\n tagName: 'button',\n type: 'button',\n className: 'menu-toggle btn-appearance',\n tabIndex: -1,\n ariaExpanded: 'false',\n ariaHasPopup: 'true',\n }) as HTMLButtonElement;\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 {\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 ObjectFromEntries,\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 on,\n off,\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 type ColorNames from './interface/ColorNames';\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 ? on : off;\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 ? on : off;\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: ColorNames = ObjectFromEntries(colorNames.map(c => [c, c])) as ColorNames;\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 ObjectAssign(this.colorLabels, ObjectFromEntries(translatedColorLabels.map((c, i) => [colorNames[i], c])));\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 */\n handleScroll = (e: Event) => {\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: KeyboardEvent & { target: HTMLElement }) => {\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) => {\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: PointerEvent & { target: HTMLElement }) => {\n if (e.button !== 0) return;\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) => {\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":["me","ge","Ee","Ae","ke","Me","K","P","_","tt","st","rt","it","St","kt","Mt","Ct","zt","Bt","Re","Qe","je","qe","Ye","$e","sn","Rt","U","fn","jt","A","qt","S","z","t","x","N","Gt","e","n","o","s","Jt","Kt","r","Xt","Yt","Tn","Cn","Ln","In","zn","v","i","u","E","L","Hn","k","W","R","d","M","Zt","$t","Q","g","ne","Qn","V","w","jn","a","l","p","m","y","Kn","Zn","$n","I","to","h","T","B","H","b","ae","ie","le","So","To","D","F","rr","tr","O","er","$","f","Z","c","J","G","X","j","C","Y","q","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","on","off","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","ObjectFromEntries","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,MAAsBA,GAAK,mBAA6CC,GAAK,gBAAuCC,GAAK,cAAkGC,GAAK,gBAA6DC,GAAK,gBAAiBC,GAAK,iBAA+DC,GAAI,SAA6BC,GAAI,mBAAoEC,GAAI,UAAWC,GAAK,WAA0EC,GAAK,UAA4BC,GAAK,QAAsBC,GAAK,QAAqQC,GAAK,cAAoCC,GAAK,cAAeC,GAAK,YAAoDC,GAAK,SAA+DC,GAAK,SAA4CC,GAAK,YAuG1mCC,EAAK,YAAaC,GAAK,UAAWC,GAAK,YAAaC,EAAK,aAAgFC,GAAK,QAA6BC,GAAK,SAAqFC,GAAK,QAA+GC,GAAK,qBAAmEC,GAAI,qBA0B/XC,EAAK,WAAYC,GAAK,UAAU,cAAeC,GAAID,GAAI,CAAE,UAAWE,EAAI,EAAG,UAAWC,GAAID,GAAIE,GAAI,4BAEvLH,GAAQA,GAAE,OAAO,KAAMI,GAAMD,GAAE,KAAKC,EAAE,KAAK,CAAC,EAAQD,GAAE,KAAKD,EAAC,EACv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C,EAAIA,GAAKmB,EAAEf,CAAC,EAAIA,EAAIuB,EAAC,GAAI,cAAc3B,CAAC,EAAwMyD,GAAK,CAACzD,EAAGI,KAAOA,GAAKe,EAAEf,CAAC,EAAIA,EAAIuB,EAAC,GAAI,uBACzU3B,CACF,EChbME,GAAI,CAAC,cAAe,eAAgB,UAAW,SAAU,SAAS,EAAGkD,EAAK,GAAM,CACpF,MAAM,EAAI,KAAK,MAAM,CAAC,EACtB,OAAO,EAAI,EAAI,GAAM,EAAI,KAAK,MAAM,CAAC,CACvC,EAAGH,GAAI,CACL,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,eACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,OACA,CACE,EAAG,EACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,QACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,QACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,SACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,QACA,CACE,EAAG,EACH,EAAG,EACH,EAAG,CACJ,CACF,EACD,CACE,iBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,OACA,CACE,EAAG,EACH,EAAG,EACH,EAAG,GACJ,CACF,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,GACJ,CACF,EACD,CACE,QACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,EACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,CACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,EACJ,CACF,EACD,CACE,QACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,EACJ,CACF,EACD,CACE,iBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,WACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,UACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,EACJ,CACF,EACD,CACE,OACA,CACE,EAAG,EACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,WACA,CACE,EAAG,EACH,EAAG,EACH,EAAG,GACJ,CACF,EACD,CACE,WACA,CACE,EAAG,EACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,gBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,EACJ,CACF,EACD,CACE,WACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,EACH,EAAG,IACH,EAAG,CACJ,CACF,EACD,CACE,WACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,cACA,CACE,EAAG,IACH,EAAG,EACH,EAAG,GACJ,CACF,EACD,CACE,iBACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,EACJ,CACF,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,CACJ,CACF,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,GACJ,CACF,EACD,CACE,UACA,CACE,EAAG,IACH,EAAG,EACH,EAAG,CACJ,CACF,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,eACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,gBACA,CACE,EAAG,GACH,EAAG,GACH,EAAG,GACJ,CACF,EACD,CACE,gBACA,CACE,EAAG,GACH,EAAG,GACH,EAAG,EACJ,CACF,EACD,CACE,gBACA,CACE,EAAG,GACH,EAAG,GACH,EAAG,EACJ,CACF,EACD,CACE,gBACA,CACE,EAAG,EACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,EACH,EAAG,GACJ,CACF,EACD,CACE,WACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,GACJ,CACF,EACD,CACE,cACA,CACE,EAAG,EACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,UACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,UACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,aACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,EACJ,CACF,EACD,CACE,cACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,cACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,EACJ,CACF,EACD,CACE,UACA,CACE,EAAG,IACH,EAAG,EACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,EACJ,CACF,EACD,CACE,OACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,CACJ,CACF,EACD,CACE,OACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,QACA,CACE,EAAG,EACH,EAAG,IACH,EAAG,CACJ,CACF,EACD,CACE,cACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,EACJ,CACF,EACD,CACE,OACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,WACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,UACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,EACJ,CACF,EACD,CACE,SACA,CACE,EAAG,GACH,EAAG,EACH,EAAG,GACJ,CACF,EACD,CACE,QACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,QACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,gBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,WACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,CACJ,CACF,EACD,CACE,eACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,uBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,cACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,gBACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,eACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,iBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,iBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,iBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,cACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,OACA,CACE,EAAG,EACH,EAAG,IACH,EAAG,CACJ,CACF,EACD,CACE,YACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,EACJ,CACF,EACD,CACE,QACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,UACA,CACE,EAAG,IACH,EAAG,EACH,EAAG,GACJ,CACF,EACD,CACE,SACA,CACE,EAAG,IACH,EAAG,EACH,EAAG,CACJ,CACF,EACD,CACE,mBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,aACA,CACE,EAAG,EACH,EAAG,EACH,EAAG,GACJ,CACF,EACD,CACE,eACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,GACJ,CACF,EACD,CACE,eACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,iBACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,kBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,oBACA,CACE,EAAG,EACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,kBACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,kBACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,GACJ,CACF,EACD,CACE,eACA,CACE,EAAG,GACH,EAAG,GACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,WACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,cACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,OACA,CACE,EAAG,EACH,EAAG,EACH,EAAG,GACJ,CACF,EACD,CACE,UACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,QACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,CACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,EACJ,CACF,EACD,CACE,SACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,CACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,CACJ,CACF,EACD,CACE,SACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,gBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,gBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,gBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,OACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,EACJ,CACF,EACD,CACE,OACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,OACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,SACA,CACE,EAAG,IACH,EAAG,EACH,EAAG,GACJ,CACF,EACD,CACE,gBACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,GACJ,CACF,EACD,CACE,MACA,CACE,EAAG,IACH,EAAG,EACH,EAAG,CACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,cACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,EACJ,CACF,EACD,CACE,SACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,EACJ,CACF,EACD,CACE,WACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,EACJ,CACF,EACD,CACE,WACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,SACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,EACJ,CACF,EACD,CACE,SACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,UACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,OACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,cACA,CACE,EAAG,EACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,MACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,OACA,CACE,EAAG,EACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,UACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,SACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,EACJ,CACF,EACD,CACE,YACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,SACA,CACE,EAAG,IACH,EAAG,IACH,E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7G,EAAO8C,CAAiB,CACtC,CACF","x_google_ignoreList":[0,1]}
|
1
|
+
{"version":3,"file":"color-picker.cjs","sources":["../../node_modules/.pnpm/@thednp+shorty@2.0.9/node_modules/@thednp/shorty/dist/shorty.mjs","../../node_modules/.pnpm/@thednp+color@1.0.13/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 Ne = \"2.0.9\", Ce = \"aria-checked\", Te = \"aria-description\", Me = \"aria-describedby\", De = \"aria-expanded\", Le = \"aria-haspopup\", $ = \"aria-hidden\", Oe = \"aria-label\", xe = \"aria-labelledby\", ze = \"aria-modal\", Ie = \"aria-pressed\", Pe = \"aria-selected\", Fe = \"aria-valuemin\", Be = \"aria-valuemax\", Ve = \"aria-valuenow\", He = \"aria-valuetext\", J = \"abort\", X = \"beforeunload\", Y = \"blur\", tt = \"change\", et = \"contextmenu\", H = \"DOMContentLoaded\", nt = \"DOMMouseScroll\", ot = \"error\", st = \"focus\", rt = \"focusin\", ct = \"focusout\", at = \"gesturechange\", it = \"gestureend\", ut = \"gesturestart\", lt = \"keydown\", dt = \"keypress\", ft = \"keyup\", pt = \"load\", gt = \"click\", mt = \"dblclick\", vt = \"mousedown\", bt = \"mouseup\", Et = \"hover\", ht = \"mouseenter\", yt = \"mouseleave\", wt = \"mousein\", At = \"mouseout\", St = \"mouseover\", kt = \"mousemove\", Nt = \"mousewheel\", Ct = \"move\", Tt = \"orientationchange\", Mt = \"pointercancel\", Dt = \"pointerdown\", Lt = \"pointerleave\", Ot = \"pointermove\", xt = \"pointerup\", zt = \"readystatechange\", It = \"reset\", Pt = \"resize\", Ft = \"select\", Bt = \"selectend\", Vt = \"selectstart\", Ht = \"scroll\", Ut = \"submit\", Wt = \"touchstart\", Rt = \"touchmove\", Qt = \"touchcancel\", jt = \"touchend\", Kt = \"unload\", Ue = {\n DOMContentLoaded: H,\n DOMMouseScroll: nt,\n abort: J,\n beforeunload: X,\n blur: Y,\n change: tt,\n click: gt,\n contextmenu: et,\n dblclick: mt,\n error: ot,\n focus: st,\n focusin: rt,\n focusout: ct,\n gesturechange: at,\n gestureend: it,\n gesturestart: ut,\n hover: Et,\n keydown: lt,\n keypress: dt,\n keyup: ft,\n load: pt,\n mousedown: vt,\n mousemove: kt,\n mousein: wt,\n mouseout: At,\n mouseenter: ht,\n mouseleave: yt,\n mouseover: St,\n mouseup: bt,\n mousewheel: Nt,\n move: Ct,\n orientationchange: Tt,\n pointercancel: Mt,\n pointerdown: Dt,\n pointerleave: Lt,\n pointermove: Ot,\n pointerup: xt,\n readystatechange: zt,\n reset: It,\n resize: Pt,\n scroll: Ht,\n select: Ft,\n selectend: Bt,\n selectstart: Vt,\n submit: Ut,\n touchcancel: Qt,\n touchend: jt,\n touchmove: Rt,\n touchstart: Wt,\n unload: Kt\n}, We = \"drag\", Re = \"dragstart\", Qe = \"dragenter\", je = \"dragleave\", Ke = \"dragover\", qe = \"dragend\", Ge = \"loadstart\", Ze = {\n start: \"mousedown\",\n end: \"mouseup\",\n move: \"mousemove\",\n cancel: \"mouseleave\"\n}, _e = { down: \"mousedown\", up: \"mouseup\" }, $e = \"onmouseleave\" in document ? [\"mouseenter\", \"mouseleave\"] : [\"mouseover\", \"mouseout\"], Je = {\n start: \"touchstart\",\n end: \"touchend\",\n move: \"touchmove\",\n cancel: \"touchcancel\"\n}, Xe = { in: \"focusin\", out: \"focusout\" }, qt = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"]', Ye = {\n Backspace: \"Backspace\",\n Tab: \"Tab\",\n Enter: \"Enter\",\n Shift: \"Shift\",\n Control: \"Control\",\n Alt: \"Alt\",\n Pause: \"Pause\",\n CapsLock: \"CapsLock\",\n Escape: \"Escape\",\n Scape: \"Space\",\n ArrowLeft: \"ArrowLeft\",\n ArrowUp: \"ArrowUp\",\n ArrowRight: \"ArrowRight\",\n ArrowDown: \"ArrowDown\",\n Insert: \"Insert\",\n Delete: \"Delete\",\n Meta: \"Meta\",\n ContextMenu: \"ContextMenu\",\n ScrollLock: \"ScrollLock\"\n}, tn = \"Alt\", en = \"ArrowDown\", nn = \"ArrowUp\", on = \"ArrowLeft\", sn = \"ArrowRight\", rn = \"Backspace\", cn = \"CapsLock\", an = \"Control\", un = \"Delete\", ln = \"Enter\", dn = \"NumpadEnter\", fn = \"Escape\", pn = \"Insert\", gn = \"Meta\", mn = \"Pause\", vn = \"ScrollLock\", bn = \"Shift\", En = \"Space\", hn = \"Tab\", Gt = \"animationDuration\", Zt = \"animationDelay\", U = \"animationName\", T = \"animationend\", _t = \"transitionDuration\", $t = \"transitionDelay\", M = \"transitionend\", W = \"transitionProperty\", yn = \"addEventListener\", wn = \"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}, Sn = \"offsetHeight\", kn = \"offsetWidth\", Nn = \"scrollHeight\", Cn = \"scrollWidth\", Tn = \"tabindex\", Mn = navigator.userAgentData, { userAgent: Jt } = navigator, Dn = Jt, Ln = () => {\n const t = /iPhone|iPad|iPod|Android/i;\n return navigator?.userAgentData?.brands.some(\n (e) => t.test(e.brand)\n ) || t.test(navigator?.userAgent) || !1;\n}, On = () => {\n const t = /(iPhone|iPod|iPad)/;\n return navigator?.userAgentData?.brands.some(\n (e) => t.test(e.brand)\n ) || t.test(\n navigator?.userAgent\n ) || !1;\n}, xn = () => navigator?.userAgent?.includes(\"Firefox\") || !1, Xt = () => typeof CSS > \"u\" || !CSS.supports ? !1 : CSS.supports(\"-webkit-backdrop-filter\", \"none\"), zn = () => [\"webkitPerspective\", \"perspective\"].some((t) => t in document.head.style), Yt = () => {\n}, R = (t, e, n, o) => {\n const s = o || !1;\n t.addEventListener(\n e,\n n,\n s\n );\n}, Q = (t, e, n, o) => {\n const s = o || !1;\n t.removeEventListener(\n e,\n n,\n s\n );\n}, te = (t, e, n, o) => {\n const s = (r) => {\n (r.target === t || r.currentTarget === t) && (n.apply(t, [r]), Q(t, e, s, o));\n };\n R(t, e, s, o);\n}, In = () => {\n let t = !1;\n try {\n const e = Object.defineProperty({}, \"passive\", {\n get: () => (t = !0, t)\n });\n te(document, H, Yt, e);\n } catch {\n }\n return t;\n}, Pn = () => [\"webkitTransform\", \"transform\"].some((t) => t in document.head.style), Fn = () => \"ontouchstart\" in window || \"msMaxTouchPoints\" in navigator, Bn = () => [\"webkitAnimation\", \"animation\"].some((t) => t in document.head.style), Vn = () => [\"webkitTransition\", \"transition\"].some((t) => t in document.head.style), j = (t, e) => t.getAttribute(e), Hn = (t, e, n) => e.getAttributeNS(t, n), ee = (t, e) => t.hasAttribute(e), Un = (t, e, n) => e.hasAttributeNS(t, n), Wn = (t, e, n) => t.setAttribute(e, n), Rn = (t, e, n, o) => e.setAttributeNS(t, n, o), Qn = (t, e) => t.removeAttribute(e), jn = (t, e, n) => e.removeAttributeNS(t, n), Kn = (t, ...e) => {\n t.classList.add(...e);\n}, qn = (t, ...e) => {\n t.classList.remove(...e);\n}, Gn = (t, e) => t.classList.contains(e), { body: Zn } = document, { documentElement: _n } = document, { head: $n } = document, Jn = (t) => Array.from(t), v = (t) => t != null && typeof t == \"object\" || !1, u = (t) => v(t) && typeof t.nodeType == \"number\" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].some(\n (e) => t.nodeType === e\n) || !1, i = (t) => u(t) && t.nodeType === 1 || !1, E = /* @__PURE__ */ new Map(), L = {\n data: E,\n set: (t, e, n) => {\n if (!i(t)) return;\n E.has(e) || E.set(e, /* @__PURE__ */ new Map()), E.get(e).set(t, n);\n },\n getAllFor: (t) => E.get(t) || null,\n get: (t, e) => {\n if (!i(t) || !e) return null;\n const n = L.getAllFor(e);\n return t && n && n.get(t) || null;\n },\n remove: (t, e) => {\n const n = L.getAllFor(e);\n !n || !i(t) || (n.delete(t), n.size === 0 && E.delete(e));\n }\n}, Xn = (t, e) => L.get(t, e), Yn = (t) => t?.charAt(0).toUpperCase() + t?.slice(1), I = (t) => t?.trim().replace(\n /(?:^\\w|[A-Z]|\\b\\w)/g,\n (e, n) => n === 0 ? e.toLowerCase() : e.toUpperCase()\n).replace(/\\s+/g, \"\"), N = (t) => typeof t == \"string\" || !1, K = (t) => v(t) && t.constructor.name === \"Window\" || !1, q = (t) => u(t) && t.nodeType === 9 || !1, d = (t) => q(t) ? t : u(t) ? t.ownerDocument : K(t) ? t.document : globalThis.document, C = (t, ...e) => Object.assign(t, ...e), ne = (t) => {\n if (!t) return;\n if (N(t))\n return d().createElement(t);\n const { tagName: e } = t, n = ne(e);\n if (!n) return;\n const o = { ...t };\n return delete o.tagName, C(n, o);\n}, oe = (t, e) => {\n if (!t || !e) return;\n if (N(e))\n return d().createElementNS(t, e);\n const { tagName: n } = e, o = oe(t, n);\n if (!o) return;\n const s = { ...e };\n return delete s.tagName, C(o, s);\n}, G = (t, e) => t.dispatchEvent(e), to = (t, e, n) => n.indexOf(t) === e, f = (t, e, n) => {\n const o = getComputedStyle(t, n), s = e.replace(\"webkit\", \"Webkit\").replace(/([A-Z])/g, \"-$1\").toLowerCase();\n return o.getPropertyValue(s);\n}, se = (t) => {\n const e = f(t, U), n = f(t, Zt), o = n.includes(\"ms\") ? 1 : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? 0 : s;\n}, re = (t) => {\n const e = f(t, U), n = f(t, Gt), o = n.includes(\"ms\") ? 1 : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? 0 : s;\n}, eo = (t, e) => {\n let n = 0;\n const o = new Event(T), s = re(t), r = se(t);\n if (s) {\n const a = (l) => {\n l.target === t && (e.apply(t, [l]), t.removeEventListener(T, a), n = 1);\n };\n t.addEventListener(T, a), setTimeout(() => {\n n || G(t, o);\n }, s + r + 17);\n } else\n e.apply(t, [o]);\n}, ce = (t) => {\n const e = f(t, W), n = f(t, $t), o = n.includes(\"ms\") ? 1 : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? 0 : s;\n}, ae = (t) => {\n const e = f(t, W), n = f(t, _t), o = n.includes(\"ms\") ? 1 : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? 0 : s;\n}, no = (t, e) => {\n let n = 0;\n const o = new Event(M), s = ae(t), r = ce(t);\n if (s) {\n const a = (l) => {\n l.target === t && (e.apply(t, [l]), t.removeEventListener(M, a), n = 1);\n };\n t.addEventListener(M, a), setTimeout(() => {\n n || G(t, o);\n }, s + r + 17);\n } else\n e.apply(t, [o]);\n}, oo = (t) => Float32Array.from(Array.from(t)), so = (t) => Float64Array.from(Array.from(t)), ro = (t, e) => t.focus(e), co = (t) => t?.trim().replace(/([a-z])([A-Z])/g, \"$1-$2\").replace(/\\s+/g, \"-\").toLowerCase(), P = (t) => [\"true\", !0].includes(t) ? !0 : [\"false\", !1].includes(t) ? !1 : [\"null\", \"\", null, void 0].includes(t) ? null : t !== \"\" && !Number.isNaN(+t) ? +t : t, S = (t) => Object.entries(t), ao = (t, e, n, o) => {\n if (!i(t)) return e;\n const s = { ...n }, r = { ...t.dataset }, a = { ...e }, l = {}, p = \"title\";\n return S(r).forEach(([c, g]) => {\n const A = o && typeof c == \"string\" && c.includes(o) ? I(c.replace(o, \"\")) : I(c);\n l[A] = P(g);\n }), S(s).forEach(([c, g]) => {\n s[c] = P(g);\n }), S(e).forEach(([c, g]) => {\n c in s ? a[c] = s[c] : c in l ? a[c] = l[c] : a[c] = c === p ? j(t, p) : g;\n }), a;\n}, io = (t, e) => v(t) && (Object.hasOwn(t, e) || e in t), uo = (t) => Object.keys(t), lo = (t) => Object.values(t), fo = (t) => Object.fromEntries(t), po = (t, e) => {\n const n = new CustomEvent(t, {\n cancelable: !0,\n bubbles: !0\n });\n return v(e) && C(n, e), n;\n}, go = { passive: !0 }, mo = (t) => t.offsetHeight, vo = (t, e) => {\n S(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, C(t.style, s);\n }\n });\n}, O = (t) => v(t) && t.constructor.name === \"Map\" || !1, ie = (t) => typeof t == \"number\" || !1, m = /* @__PURE__ */ new Map(), bo = {\n set: (t, e, n, o) => {\n i(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 get: (t, e) => {\n if (!i(t)) return null;\n const n = m.get(t);\n return e && n && O(n) ? n.get(e) || null : ie(n) ? n : null;\n },\n clear: (t, e) => {\n if (!i(t)) return;\n const n = m.get(t);\n e && e.length && O(n) ? (clearTimeout(n.get(e)), n.delete(e), n.size === 0 && m.delete(t)) : (clearTimeout(n), m.delete(t));\n }\n}, Eo = (t) => t.toLowerCase(), ho = (t) => t.toUpperCase(), ue = (t, e) => (u(e) ? e : d()).querySelectorAll(t), x = /* @__PURE__ */ new Map();\nfunction le(t) {\n const { shiftKey: e, code: n } = t, o = d(this), s = [\n ...ue(qt, this)\n ].filter(\n (l) => !ee(l, \"disabled\") && !j(l, $)\n );\n if (!s.length) return;\n const r = s[0], a = s[s.length - 1];\n n === \"Tab\" && (e && o.activeElement === r ? (a.focus(), t.preventDefault()) : !e && o.activeElement === a && (r.focus(), t.preventDefault()));\n}\nconst de = (t) => x.has(t) === !0, yo = (t) => {\n const e = de(t);\n (e ? Q : R)(t, \"keydown\", le), e ? x.delete(t) : x.set(t, !0);\n}, b = (t) => i(t) && \"offsetWidth\" in t || !1, y = (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 && b(t)) {\n const { offsetWidth: g, offsetHeight: A } = t;\n p = g > 0 ? Math.round(n) / g : 1, c = A > 0 ? Math.round(o) / A : 1;\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}, wo = (t) => d(t).body, w = (t) => d(t).documentElement, Ao = (t) => d(t).head, fe = (t) => u(t) ? (t.nodeName || \"\").toLowerCase() : \"#document\", So = (t) => {\n const e = K(t), n = e ? t.scrollX : t.scrollLeft, o = e ? t.scrollY : t.scrollTop;\n return { x: n, y: o };\n}, pe = (t) => u(t) && t.constructor.name === \"ShadowRoot\" || !1, k = (t) => t.nodeName === \"HTML\" ? t : i(t) && t.assignedSlot || u(t) && t.parentNode || pe(t) && t.host || w(t), ge = (t) => t ? q(t) ? t.defaultView : u(t) ? t?.ownerDocument?.defaultView : t : window, me = (t) => u(t) && [\"TABLE\", \"TD\", \"TH\"].includes(t.nodeName) || !1, ve = (t, e) => t.matches(e), D = (t) => f(t, \"position\") === \"static\", be = (t) => f(t, \"position\") === \"fixed\", Z = (t) => [\":popover-open\", \":modal\"].some((e) => {\n try {\n return ve(t, e);\n } catch {\n return !1;\n }\n}), _ = (t) => {\n const e = Xt(), n = i(t) ? getComputedStyle(t) : t;\n return n.transform !== \"none\" || n.perspective !== \"none\" || (n.containerType ? n.containerType !== \"normal\" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== \"none\" : !1) || !e && (n.filter ? n.filter !== \"none\" : !1) || [\"transform\", \"perspective\", \"filter\"].some(\n (o) => (n.willChange || \"\").includes(o)\n ) || [\"paint\", \"layout\", \"strict\", \"content\"].some(\n (o) => (n.contain || \"\").includes(o)\n );\n}, Ee = (t) => {\n let e = k(t);\n for (; i(e) && !z(e); ) {\n if (_(e))\n return e;\n if (Z(e))\n return null;\n e = k(e);\n }\n return null;\n}, z = (t) => [\"html\", \"body\", \"#document\"].includes(fe(t)), F = (t) => {\n if (!b(t) || be(t))\n return null;\n let e = t.offsetParent;\n return w(t) === e && (e = e.ownerDocument.body), e;\n}, ko = (t) => {\n const e = ge(t);\n if (!u(t) || Z(t))\n return e;\n if (!b(t)) {\n let o = k(t);\n for (; o && !z(o); ) {\n if (i(o) && !D(o))\n return o;\n o = k(o);\n }\n return e;\n }\n let n = F(t);\n for (; n && me(n) && D(n); )\n n = F(n);\n return n && z(n) && D(n) && !_(n) ? e : n || Ee(t) || e;\n}, he = (t) => {\n if (!b(t)) return !1;\n const { width: e, height: n } = y(t), { offsetWidth: o, offsetHeight: s } = t;\n return Math.round(e) !== o || Math.round(n) !== s;\n}, No = (t, e, n) => {\n const o = b(e), s = y(\n t,\n o && he(e)\n ), r = { x: 0, y: 0 };\n if (o) {\n const a = y(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, V = 0;\nconst h = /* @__PURE__ */ new Map(), ye = (t, e) => {\n let n = e ? B : V;\n if (e) {\n const o = ye(t), s = h.get(o) || /* @__PURE__ */ new Map();\n h.has(o) || h.set(o, s), O(s) && !s.has(e) ? (s.set(e, n), B += 1) : n = s.get(e);\n } else {\n const o = t.id || t;\n h.has(o) ? n = h.get(o) : (h.set(o, n), V += 1);\n }\n return n;\n}, we = (t) => Array.isArray(t) || !1, Co = (t) => u(t) && t.nodeName === \"CANVAS\" || !1, Ae = (t) => b(t) && !!t.shadowRoot || !1, To = (t) => {\n if (!u(t)) return !1;\n const { top: e, bottom: n } = y(t), { clientHeight: o } = w(t);\n return e <= o && n >= 0;\n}, Mo = (t) => {\n if (!i(t)) return !1;\n const { clientWidth: e, clientHeight: n } = w(t), { top: o, left: s, bottom: r, right: a } = y(t, !0);\n return o >= 0 && s >= 0 && r <= n && a <= e;\n}, Do = (t) => we(t) && t.every(i) || !1, Lo = (t) => typeof t == \"function\" || !1, Oo = (t) => v(t) && t.constructor.name === \"HTMLCollection\" || !1, xo = (t) => b(t) && t.tagName === \"IMG\" || !1, zo = (t) => {\n if (!N(t)) return !1;\n try {\n JSON.parse(t);\n } catch {\n return !1;\n }\n return !0;\n}, Io = (t) => v(t) && t.constructor.name === \"WeakMap\" || !1, Po = (t) => u(t) && [\"SVG\", \"Image\", \"Video\", \"Canvas\"].some(\n (e) => t.constructor.name.includes(e)\n) || !1, Fo = (t) => v(t) && t.constructor.name === \"NodeList\" || !1, Bo = (t) => w(t).dir === \"rtl\", Vo = (t) => u(t) && t.constructor.name.includes(\"SVG\") || !1, Se = (t, e) => !t || !e ? null : t.closest(e) || Se(t.getRootNode().host, e) || null, Ho = (t, e) => i(t) ? t : (i(e) ? e : d()).querySelector(t), ke = (t, e) => (u(e) ? e : d()).getElementsByTagName(\n t\n), Uo = (t) => [...ke(\"*\", t)].filter(Ae), Wo = (t, e) => d(e).getElementById(t), Ro = (t, e) => (e && u(e) ? e : d()).getElementsByClassName(\n t\n);\nexport {\n Jn as ArrayFrom,\n H as DOMContentLoadedEvent,\n nt as DOMMouseScrollEvent,\n L as Data,\n oo as Float32ArrayFrom,\n so as Float64ArrayFrom,\n C as ObjectAssign,\n S as ObjectEntries,\n fo as ObjectFromEntries,\n io as ObjectHasOwn,\n uo as ObjectKeys,\n lo as ObjectValues,\n bo as Timer,\n J as abortEvent,\n Kn as addClass,\n yn as addEventListener,\n Zt as animationDelay,\n Gt as animationDuration,\n T as animationEndEvent,\n U as animationName,\n Ce as ariaChecked,\n Me as ariaDescribedBy,\n Te as ariaDescription,\n De as ariaExpanded,\n Le as ariaHasPopup,\n $ as ariaHidden,\n Oe as ariaLabel,\n xe as ariaLabelledBy,\n ze as ariaModal,\n Ie as ariaPressed,\n Pe as ariaSelected,\n Be as ariaValueMax,\n Fe as ariaValueMin,\n Ve as ariaValueNow,\n He as ariaValueText,\n X as beforeunloadEvent,\n An as bezierEasings,\n Y as blurEvent,\n I as camelCase,\n Yn as capitalize,\n tt as changeEvent,\n Se as closest,\n et as contextmenuEvent,\n po as createCustomEvent,\n ne as createElement,\n oe as createElementNS,\n G as dispatchEvent,\n to as distinct,\n Zn as documentBody,\n _n as documentElement,\n $n as documentHead,\n We as dragEvent,\n qe as dragendEvent,\n Qe as dragenterEvent,\n je as dragleaveEvent,\n Ke as dragoverEvent,\n Re as dragstartEvent,\n eo as emulateAnimationEnd,\n no as emulateTransitionEnd,\n ot as errorEvent,\n ro as focus,\n st as focusEvent,\n Xe as focusEvents,\n qt as focusableSelector,\n rt as focusinEvent,\n ct as focusoutEvent,\n at as gesturechangeEvent,\n it as gestureendEvent,\n ut as gesturestartEvent,\n j as getAttribute,\n Hn as getAttributeNS,\n y as getBoundingClientRect,\n Uo as getCustomElements,\n d as getDocument,\n wo as getDocumentBody,\n w as getDocumentElement,\n Ao as getDocumentHead,\n se as getElementAnimationDelay,\n re as getElementAnimationDuration,\n Wo as getElementById,\n f as getElementStyle,\n ce as getElementTransitionDelay,\n ae as getElementTransitionDuration,\n Ro as getElementsByClassName,\n ke as getElementsByTagName,\n Xn as getInstance,\n fe as getNodeName,\n So as getNodeScroll,\n ko as getOffsetParent,\n k as getParentNode,\n No as getRectRelativeToOffsetParent,\n ye as getUID,\n ge as getWindow,\n ee as hasAttribute,\n Un as hasAttributeNS,\n Gn as hasClass,\n de as hasFocusTrap,\n On as isApple,\n we as isArray,\n Co as isCanvas,\n Ae as isCustomElement,\n q as isDocument,\n i as isElement,\n To as isElementInScrollRange,\n Mo as isElementInViewport,\n Do as isElementsArray,\n xn as isFirefox,\n Lo as isFunction,\n Oo as isHTMLCollection,\n b as isHTMLElement,\n xo as isHTMLImageElement,\n zo as isJSON,\n O as isMap,\n Po as isMedia,\n Ln as isMobile,\n u as isNode,\n Fo as isNodeList,\n ie as isNumber,\n v as isObject,\n Bo as isRTL,\n Vo as isSVGElement,\n he as isScaledElement,\n pe as isShadowRoot,\n N as isString,\n me as isTableElement,\n Io as isWeakMap,\n Xt as isWebKit,\n K as isWindow,\n co as kebabCase,\n tn as keyAlt,\n en as keyArrowDown,\n on as keyArrowLeft,\n sn as keyArrowRight,\n nn as keyArrowUp,\n rn as keyBackspace,\n cn as keyCapsLock,\n an as keyControl,\n un as keyDelete,\n ln as keyEnter,\n fn as keyEscape,\n pn as keyInsert,\n gn as keyMeta,\n dn as keyNumpadEnter,\n mn as keyPause,\n vn as keyScrollLock,\n bn as keyShift,\n En as keySpace,\n hn as keyTab,\n Ye as keyboardEventKeys,\n lt as keydownEvent,\n dt as keypressEvent,\n ft as keyupEvent,\n pt as loadEvent,\n Ge as loadstartEvent,\n ve as matches,\n _e as mouseClickEvents,\n $e as mouseHoverEvents,\n Ze as mouseSwipeEvents,\n gt as mouseclickEvent,\n mt as mousedblclickEvent,\n vt as mousedownEvent,\n ht as mouseenterEvent,\n Et as mousehoverEvent,\n wt as mouseinEvent,\n yt as mouseleaveEvent,\n kt as mousemoveEvent,\n At as mouseoutEvent,\n St as mouseoverEvent,\n bt as mouseupEvent,\n Nt as mousewheelEvent,\n Ct as moveEvent,\n Ue as nativeEvents,\n Yt as noop,\n ao as normalizeOptions,\n P as normalizeValue,\n Q as off,\n Sn as offsetHeight,\n kn as offsetWidth,\n R as on,\n te as one,\n Tt as orientationchangeEvent,\n go as passiveHandler,\n Mt as pointercancelEvent,\n Dt as pointerdownEvent,\n Lt as pointerleaveEvent,\n Ot as pointermoveEvent,\n xt as pointerupEvent,\n Ho as querySelector,\n ue as querySelectorAll,\n zt as readystatechangeEvent,\n mo as reflow,\n Qn as removeAttribute,\n jn as removeAttributeNS,\n qn as removeClass,\n wn as removeEventListener,\n It as resetEvent,\n Pt as resizeEvent,\n Ht as scrollEvent,\n Nn as scrollHeight,\n Cn as scrollWidth,\n Ft as selectEvent,\n Bt as selectendEvent,\n Vt as selectstartEvent,\n Wn as setAttribute,\n Rn as setAttributeNS,\n vo as setElementStyle,\n Ut as submitEvent,\n zn as support3DTransform,\n Bn as supportAnimation,\n In as supportPassive,\n Fn as supportTouch,\n Pn as supportTransform,\n Vn as supportTransition,\n Tn as tabindex,\n Eo as toLowerCase,\n ho as toUpperCase,\n yo as toggleFocusTrap,\n Je as touchEvents,\n Qt as touchcancelEvent,\n jt as touchendEvent,\n Rt as touchmoveEvent,\n Wt as touchstartEvent,\n $t as transitionDelay,\n _t as transitionDuration,\n M as transitionEndEvent,\n W as transitionProperty,\n Kt as unloadEvent,\n Dn as userAgent,\n Mn as userAgentData,\n Ne as version\n};\n//# sourceMappingURL=shorty.mjs.map\n","const I = [\n \"transparent\",\n \"currentColor\",\n \"inherit\",\n \"revert\",\n \"initial\"\n], i = (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], U = \"deg|rad|grad|turn\", D = \"[-\\\\+]?\\\\d+%?\", L = \"[-\\\\+]?\\\\d*\\\\.\\\\d+%?\", V = `[-\\\\+]?\\\\d*\\\\.?\\\\d+(?:${U})?`, x = `(?:${L})|(?:${D})`, F = `(?:${x})|(?:${V}?)`, tr = \"(?:[\\\\s|\\\\(\\\\s|\\\\s\\\\(\\\\s]+)?\", er = \"(?:[\\\\s|\\\\)\\\\s]+)?\", P = \"(?:[,|\\\\s]+)\", sr = \"(?:[,|\\\\/\\\\s]*)?\", w = `${tr}(${F})${P}(${x})${P}(${x})${sr}(${x})?${er}`, f = {\n CSS_UNIT: new RegExp(F),\n ANGLES: U,\n CSS_ANGLE: V,\n CSS_INTEGER: D,\n CSS_NUMBER: L,\n CSS_UNIT2: F,\n PERMISSIVE_MATCH: w,\n hwb: new RegExp(`hwb${w}`),\n rgb: new RegExp(`rgb(?:a)?${w}`),\n hsl: new RegExp(`hsl(?:a)?${w}`),\n hsv: new RegExp(`hsv(?:a)?${w}`),\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}, Z = (o) => I.includes(o), y = (o, t) => o !== null && typeof o == \"object\" && Object.keys(t).every((r) => r in o), z = (o) => `${o}`.includes(\".\") && parseFloat(o) === 1, O = (o) => typeof o == \"string\" && o.includes(\"%\"), c = (o) => !!f.CSS_UNIT.exec(`${o}`), J = [\"rgb\", \"hex\", \"hsl\", \"hsv\", \"hwb\"], K = (o) => I.includes(o) || [\"#\", ...J].some((t) => o.includes(t)) ? !1 : T.some(([t]) => o === t), _ = 1e-6, nr = (o, t) => Math.abs(o * t - t) < _ ? 1 : o < _ ? 0 : o, u = (o, t) => {\n let r = o;\n return z(o) && (r = \"100%\"), O(r) ? Number.parseFloat(r) / 100 : (r = typeof r != \"number\" ? Number.parseFloat(r) : r, t === 360 ? r = (r < 0 ? r % t + t : r > 360 ? r % t : r) / t : (r = Math.min(t, Math.max(0, r)), r = r / t), nr(r, t));\n}, N = (o) => {\n let t = parseFloat(o);\n return (Number.isNaN(t) || t < 0 || t > 1) && (t = 1), t;\n}, A = (o) => Math.min(1, Math.max(0, o)), d = (o) => o.length === 1 ? `0${o}` : String(o), Q = (o) => {\n const [[, t]] = T.filter(([r]) => r === o.toLowerCase());\n return t;\n}, h = (o) => parseInt(o, 16), M = (o) => h(o) / 255, X = (o) => i(o * 255).toString(16), G = (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 b = e - s;\n g = a > 0.5 ? b / (2 - e - s) : b / (e + s), e === o && (n = (t - r) / b + (t < r ? 6 : 0)), e === t && (n = (r - o) / b + 2), e === r && (n = (o - t) / b + 4), n /= 6;\n }\n return { h: n, s: g, l: a };\n}, v = (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}, S = (o, t, r) => {\n let e = 0, s = 0, n = 0;\n if (t === 0)\n s = r, n = r, e = r;\n else {\n const g = r < 0.5 ? r * (1 + t) : r + t - r * t, a = 2 * r - g;\n e = v(a, g, o + 1 / 3), s = v(a, g, o), n = v(a, g, o - 1 / 3);\n }\n return { r: e, g: s, b: n };\n}, j = (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) 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 b = (s - e / (g - n)) / 6;\n return {\n h: b === 1 ? 0 : b,\n w: n,\n b: a\n };\n}, Y = (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 } = S(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}, q = (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, b = 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: b, v: g };\n}, E = (o, t, r) => {\n const e = o * 6, s = t, n = r, g = Math.floor(e), a = e - g, b = n * (1 - s), l = n * (1 - a * s), p = n * (1 - (1 - a) * s), $ = g % 6, m = [n, l, b, b, p, n][$], k = [p, n, n, l, b, b][$], H = [b, b, p, n, n, l][$];\n return { r: m, g: k, b: H };\n}, R = (o, t, r, e) => {\n const s = [\n d(i(o).toString(16)),\n d(i(t).toString(16)),\n d(i(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 d(i(o).toString(16)),\n d(i(t).toString(16)),\n d(i(r).toString(16)),\n d(X(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}, W = (o) => {\n const t = String(o).trim().toLowerCase();\n if (K(t))\n return Object.assign(Q(t), {\n a: 1,\n format: \"rgb\",\n ok: !0\n });\n if (Z(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: M(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: M(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}, or = (o, t, r) => ({\n r: u(o, 255),\n g: u(t, 255),\n b: u(r, 255)\n}), B = (o) => {\n let t = { r: 0, g: 0, b: 0 }, r = o, e = 1, s, n, g, a, b, l, p, $, m = \"rgb\", k = !1;\n if ((!r || typeof r == \"string\") && (r = W(r), k = r.ok || k), y(r, t) && c(r.r) && c(r.g) && c(r.b)) {\n if ([\"format\", \"ok\", \"originalInput\"].every((H) => H in r))\n return { ...r };\n ({ r: p, g: $, b } = r), t = or(p, $, b), m = \"format\" in r ? r.format : \"rgb\";\n }\n return y(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 = E(l, s, n), m = \"hsv\"), y(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 = S(l, s, g), m = \"hsl\"), y(r, { h: 0, w: 0, b: 0 }) && c(r.h) && c(r.w) && c(r.b) && ({ h: l, w: a, b } = r, l = u(l, 360), a = u(a, 100), b = u(b, 100), t = Y(l, a, b), m = \"hwb\"), c(r.a) && (e = r.a, e = O(e) || parseFloat(`${e}`) > 1 ? u(e, 100) : e), {\n ...t,\n a: N(e),\n format: m,\n ok: k\n };\n}, gr = \"1.0.13\";\nclass rr {\n // bring main utilities to front\n static matchers = f;\n static isOnePointZero = z;\n static isPercentage = O;\n static isValidCSSUnit = c;\n static isNonColor = Z;\n static isColorName = K;\n static isColorType = y;\n static pad2 = d;\n static clamp01 = A;\n static bound01 = u;\n static boundAlpha = N;\n static getRGBFromName = Q;\n static convertHexToDecimal = M;\n static convertDecimalToHex = X;\n static rgbToHsl = G;\n static rgbToHex = R;\n static rgbToHsv = q;\n static rgbToHwb = j;\n static rgbaToHex = C;\n static hslToRgb = E;\n static hsvToRgb = E;\n static hueToRgb = v;\n static hwbToRgb = Y;\n static parseIntFromHex = h;\n static stringInputToObject = W;\n static inputToRGB = B;\n static roundPart = i;\n static webColors = T;\n static nonColors = I;\n static version = gr;\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 && J.includes(r) ? r : \"\", { r: s, g: n, b: g, a, ok: b, format: l } = B(t);\n this.originalInput = t, this.r = s, this.g = n, this.b = g, this.a = a, this.ok = b, 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(([, b]) => b)));\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) => i(n * 255 * 100) / 100), s = i(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(i);\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(i), b = s === 1 ? \"\" : ` / ${i(s * 100)}%`;\n return `rgb(${n} ${g} ${a}${b})`;\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 let { r, g: e, b: s, a: n } = this;\n return [r, e, s] = [r, e, s].map((g) => i(g * 255)), n = i(n * 100) / 100, n === 1 ? R(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 let { r, g: e, b: s, a: n } = this;\n return [r, e, s] = [r, e, s].map((g) => i(g * 255)), n = i(n * 100) / 100, n === 1 ? R(r, e, s, t) : 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 } = q(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 } = G(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 = i(t * 360), r = i(r * 100), e = i(e * 100), s = i(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 = i(t * 360), r = i(r * 100), e = i(e * 100), s = i(s * 100);\n const n = s < 100 ? ` / ${i(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 } = j(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 = i(t * 360), r = i(r * 100), e = i(e * 100), s = i(s * 100);\n const n = s < 100 ? ` / ${i(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 = N(t), this);\n }\n /**\n * Saturate the colour with a given amount.\n */\n saturate(t) {\n if (typeof t != \"number\") return this;\n const { h: r, s: e, l: s } = this.toHsl(), { r: n, g, b: a } = S(r, A(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\") return this;\n const { h: r, s: e, l: s } = this.toHsl(), { r: n, g, b: a } = S(r, e, A(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\") return this;\n const { h: r, s: e, l: s } = this.toHsl(), { r: n, g, b: a } = S(\n A((r * 360 + t) % 360 / 360),\n e,\n s\n );\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 rr(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 rr 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 [\n number,\n number,\n number,\n number,\n ];\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(\n \"ColorPalette: the two minimum arguments must be numbers higher than 0.\",\n );\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;\n lightnessArray.forEach((l) => {\n const newColor = new Color({ h: currentHue, s: 100, l: l * 100 });\n colors.push(\n saturation < 100 ? newColor.saturate(saturation - 100) : newColor,\n );\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 /* istanbul ignore next @preserve */\n if (!isString(str)) return false;\n try {\n JSON.parse(str);\n } catch (_) {\n return false;\n }\n return true;\n};\n\nexport default isValidJSON;\n","const vHidden = \"v-hidden\";\nexport default vHidden;\n","import {\n createElement,\n ObjectAssign,\n setAttribute,\n toUpperCase,\n} 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\") {\n components = [\"hue\", \"saturation\", \"lightness\", \"alpha\"];\n } else if (format === \"hwb\") {\n components = [\"hue\", \"whiteness\", \"blackness\", \"alpha\"];\n }\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 {\n hueLabel,\n alphaLabel,\n lightnessLabel,\n saturationLabel,\n whitenessLabel,\n blacknessLabel,\n } = 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\"\n ? `${hueLabel} & ${lightnessLabel}`\n : `${lightnessLabel} & ${saturationLabel}`;\n\n ctrl1Label = format === \"hwb\"\n ? `${whitenessLabel} & ${blacknessLabel}`\n : 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 {\n createElement,\n getAttribute,\n setAttribute,\n setElementStyle,\n} 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 = (\n self: ColorPicker,\n colorsSource: ColorPalette | string[],\n menuClass: string,\n): 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 ||\n [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 + ${\n rowCountHover - 1\n } * ${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 ariaHidden,\n createElement,\n createElementNS,\n getAttribute,\n setAttribute,\n tabindex,\n toUpperCase,\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 {\n input,\n parent,\n format,\n id,\n componentLabels,\n colorKeywords,\n colorPresets,\n } = 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<HTMLButtonElement>({\n id: `picker-btn-${id}`,\n tagName: \"button\",\n type: \"button\",\n className: \"picker-toggle btn-appearance\",\n ariaExpanded: \"false\",\n ariaHasPopup: \"true\",\n }) as HTMLButtonElement;\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 {\n tagName: \"div\",\n className: \"color-dropdown picker\",\n role: \"group\",\n ariaLabelledBy: `picker-btn-${id}`,\n } as Partial<HTMLElement> & { ariaLabelledBy: string },\n ) 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 /* istanbul ignore else @preserve */\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 /* istanbul ignore else @preserve */\n if (colorKeywords && colorKeywords.length) {\n presetsDropdown.append(\n getColorMenu(self, colorKeywords, \"color-defaults\"),\n );\n }\n\n const presetsBtn = createElement<HTMLButtonElement>({\n tagName: \"button\",\n type: \"button\",\n className: \"menu-toggle btn-appearance\",\n tabIndex: -1,\n ariaExpanded: \"false\",\n ariaHasPopup: \"true\",\n }) as HTMLButtonElement;\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(\n path,\n \"d\",\n \"M98,158l157,156L411,158l27,27L255,368L71,185L98,158z\",\n );\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 /* istanbul ignore else @preserve */\n if (colorKeywords && nonColors.includes(colorValue)) {\n self.value = colorValue;\n }\n setAttribute(input, tabindex, \"-1\");\n};\n\nexport default setMarkup;\n","import {\n addClass,\n ariaDescription,\n ariaExpanded,\n ariaSelected,\n ariaValueNow,\n ariaValueText,\n changeEvent,\n closest,\n Data,\n dispatchEvent,\n focus,\n focusinEvent,\n focusoutEvent,\n getAttribute,\n getBoundingClientRect,\n getDocument,\n getDocumentElement,\n getElementsByClassName,\n getElementStyle,\n getElementTransitionDuration,\n getInstance,\n getUID,\n getWindow,\n hasClass,\n isArray,\n isHTMLElement,\n isString,\n keyArrowDown,\n keyArrowLeft,\n keyArrowRight,\n keyArrowUp,\n keydownEvent,\n keyEnter,\n keyEscape,\n keySpace,\n keyupEvent,\n mouseclickEvent,\n normalizeOptions,\n ObjectAssign,\n ObjectFromEntries,\n off,\n on,\n pointerdownEvent,\n pointermoveEvent,\n pointerupEvent,\n querySelector,\n reflow,\n removeAttribute,\n removeClass,\n resizeEvent,\n scrollEvent,\n setAttribute,\n setElementStyle,\n tabindex,\n touchmoveEvent,\n} from \"@thednp/shorty\";\n\n// ColorPicker Util\n// ================\nimport Color from \"@thednp/color\";\nimport type { HSLA, HSVA, HWBA, RGBA } 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 type ColorNames from \"./interface/ColorNames\";\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: Element) =>\n getInstance<ColorPicker>(element, colorPickerString);\nconst initColorPicker = (element: Element) => 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 ? on : off;\n const { input, pickerToggle, menuToggle } = self;\n\n fn(input, focusinEvent, self.showPicker);\n fn(pickerToggle, mouseclickEvent, self.togglePicker);\n /* istanbul ignore else @preserve */\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 ? on : off;\n const { input, colorMenu, parent } = self;\n const doc = getDocument(input);\n const win = getWindow(doc);\n\n fn(self.controls, pointerdownEvent, self.pointerDown);\n self.controlKnobs.forEach((x) => fn(x, keydownEvent, self.handleKnobs));\n\n fn(win, scrollEvent, self.handleScroll);\n fn(win, resizeEvent, self.update);\n\n [input, ...self.inputs].forEach((x) =>\n fn(x, changeEvent, self.changeHandler)\n );\n\n /* istanbul ignore else @preserve */\n if (colorMenu) {\n fn(colorMenu, mouseclickEvent, self.menuClickHandler);\n fn(colorMenu, keydownEvent, self.menuKeyHandler);\n }\n\n fn(doc, pointermoveEvent, self.pointerMove);\n fn(doc, pointerupEvent, self.pointerUp);\n fn(parent, focusoutEvent, self.handleFocusOut);\n fn(doc, keyupEvent, self.handleDismiss);\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 @preserve */\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 /* istanbul ignore else @preserve */\n if (!hasClass(parent, \"open\")) {\n addClass(parent, \"open\");\n }\n /* istanbul ignore else @preserve */\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 /* istanbul ignore else @preserve */\n if (menuToggle) {\n setAttribute(menuToggle, tabindex, \"0\");\n }\n }\n\n setAttribute(nextBtn, ariaExpanded, \"true\");\n /* istanbul ignore else @preserve */\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: ColorNames = ObjectFromEntries(\n colorNames.map((c) => [c, c]),\n ) as ColorNames;\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(\n target: Element | string,\n config?: Partial<ColorPickerOptions>,\n ) {\n const input = querySelector<Element>(target) as HTMLInputElement | null;\n\n // invalidate\n if (typeof target === \"undefined\") {\n throw new TypeError(`ColorPicker target not specified.`);\n }\n if (!isHTMLElement(input)) {\n throw new TypeError(`ColorPicker target \"${target}\" cannot be found.`);\n }\n this.input = input as HTMLInputElement;\n\n const parent = closest(input, colorPickerParentSelector);\n if (!parent) {\n throw new TypeError(\"ColorPicker requires a specific markup to work.\");\n }\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 {\n format,\n componentLabels,\n colorLabels,\n colorKeywords,\n colorPresets,\n } = normalizeOptions(\n input,\n colorPickerDefaults,\n config || {},\n );\n\n let translatedColorLabels = colorNames;\n /* istanbul ignore else @preserve */\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 ObjectAssign(\n this.colorLabels,\n ObjectFromEntries(\n translatedColorLabels.map((c, i) => [colorNames[i], c]),\n ),\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(\n { ...colorPickerLabels },\n tempComponentLabels,\n );\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(\n colorPresets,\n ) as {\n hue: number;\n hueSteps: number;\n lightSteps: number;\n saturation: number;\n };\n this.colorPresets = new ColorPalette(\n hue,\n hueSteps,\n lightSteps,\n saturation,\n );\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<HTMLElement>(\n \"color-dropdown\",\n parent,\n );\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 = [\n ...getElementsByClassName(\"color-input\", parent),\n ] as HTMLInputElement[];\n const [controls] = getElementsByClassName<HTMLElement>(\n \"color-controls\",\n parent,\n );\n this.controls = controls;\n this.controlKnobs = [\n ...getElementsByClassName<HTMLElement>(\"knob\", controls),\n ];\n this.visuals = [\n ...getElementsByClassName<HTMLElement>(\"visual-control\", controls),\n ];\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 &&\n 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 @preserve */\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\n ? colorLabels.orange\n : 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 * 360, s: 100, l: 50 }).toRgb();\n const whiteGrad =\n \"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 * 360,\n s: 100,\n l: 50,\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:\n `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:\n `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 = (\n { relatedTarget }: FocusEvent & { relatedTarget: HTMLElement },\n ): 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 /* istanbul ignore else @preserve */\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 */\n handleScroll = (e: Event) => {\n const { activeElement } = getDocument(this.input);\n\n this.updateDropdownPosition();\n\n /* istanbul ignore next @preserve */\n if (\n ([pointermoveEvent, touchmoveEvent].includes(e.type) &&\n this.dragElement) ||\n (activeElement &&\n 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: KeyboardEvent & { target: HTMLElement }) => {\n const { target, code } = e;\n const { previousElementSibling, nextElementSibling, parentElement } =\n target;\n const isColorOptionsMenu = parentElement &&\n hasClass(parentElement, \"color-options\");\n const allSiblings = parentElement\n ? [...parentElement.children]\n : /* istanbul ignore next @preserve */ [];\n // const columnsCount =\n // isColorOptionsMenu && getElementStyle(parentElement, 'grid-template-columns').split(' ').length;\n const columnsCount = isColorOptionsMenu &&\n Number(getElementStyle(parentElement, \"--grid-fit\"));\n const currentIndex = allSiblings.indexOf(target);\n const previousElement = currentIndex > -1 && columnsCount &&\n allSiblings[currentIndex - columnsCount];\n const nextElement = currentIndex > -1 && columnsCount &&\n 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 (\n previousElementSibling && [keyArrowLeft, keyArrowUp].includes(code)\n ) {\n focus(previousElementSibling as HTMLElement);\n } else if (\n nextElementSibling && [keyArrowRight, keyArrowDown].includes(code)\n ) {\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) => {\n const { target } = e;\n const { colorMenu } = this;\n const newOption = (getAttribute(\n target as HTMLElement,\n \"data-value\",\n ) || /* istanbul ignore next @preserve */ \"\")\n .trim();\n // invalidate for targets other than color options\n /* istanbul ignore next @preserve */\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\"\n ? /* istanbul ignore next @preserve */ \"rgba(0,0,0,0)\"\n : 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 @preserve */\n if (currentActive !== target) {\n /* istanbul ignore else @preserve */\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: PointerEvent & { target: HTMLElement }) => {\n /* istanbul ignore next @preserve */\n if (e.button !== 0) return;\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)\n ? (target.previousElementSibling as HTMLElement)\n : 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 @preserve */\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 /* istanbul ignore else @preserve */\n if (colorMenu) {\n const currentActive = querySelector(\"li.active\", colorMenu);\n /* istanbul ignore if @preserve */\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 =\n querySelector(`${colorPickerParentSelector}.open`, doc) !== null;\n const selection = doc.getSelection();\n\n if (\n !this.dragElement && (!selection || !selection.toString().length) &&\n !parent.contains(target)\n ) {\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) => {\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 (\n ![keyArrowUp, keyArrowDown, keyArrowLeft, keyArrowRight].includes(code)\n ) 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 @preserve */\n if (currentKnob) {\n let offsetX = 0;\n let offsetY = 0;\n\n /* istanbul ignore else @preserve */\n if (target === c1) {\n const xRatio = offsetWidth / 100;\n\n /* istanbul ignore else @preserve */\n if ([keyArrowLeft, keyArrowRight].includes(code)) {\n this.controlPositions.c1x += code === keyArrowRight\n ? xRatio\n : -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 +=\n [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 +=\n [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 {\n inputs,\n format,\n value: currentValue,\n input,\n controlPositions,\n visuals,\n } = this;\n const { activeElement } = getDocument(input);\n const { offsetHeight } = visuals[0];\n const [i1, , , i4] = inputs;\n const [v1, v2, v3, v4] = 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 &&\n nonColors.includes(currentValue);\n const alpha = i4 ? v4 : 1 - controlPositions.c3y / offsetHeight;\n\n /* istanbul ignore else @preserve */\n if (\n activeElement === input ||\n (activeElement && inputs.includes(activeElement as HTMLInputElement))\n ) {\n if (activeElement === input) {\n if (isNonColorValue) {\n colorSource = currentValue === \"transparent\"\n ? \"rgba(0,0,0,0)\"\n : \"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 * 360,\n s: saturation * 100,\n v: lightness * 100,\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 * 360,\n s: saturation * 100,\n v: lightness * 100,\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 /* istanbul ignore next @preserve */\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 (\n (hasClass(dropdown, \"bottom\") || !topExceed) &&\n distanceBottom < distanceTop && bottomExceed\n ) {\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 } =\n 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(\n knob2,\n ariaDescription,\n `${valueLabel}: ${colorLabel}. ${appearanceLabel}: ${colorName}.`,\n );\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\"\n ? `HSL: ${hue}°, ${saturation}%, ${lightness}%`\n : colorLabel;\n colorLabel = format === \"rgb\" ? `RGB: ${r}, ${g}, ${b}` : colorLabel;\n\n setAttribute(knob1, ariaValueText, `${lightness}% & ${saturation}%`);\n setAttribute(knob1, ariaValueNow, `${lightness}`);\n setAttribute(\n knob2,\n ariaDescription,\n `${valueLabel}: ${colorLabel}. ${appearanceLabel}: ${colorName}.`,\n );\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 @preserve */\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 /* istanbul ignore next @preserve */\n if (!this.isOpen) return;\n const {\n pickerToggle,\n menuToggle,\n colorPicker,\n colorMenu,\n parent,\n input,\n } = this;\n const openPicker = hasClass(colorPicker, \"show\");\n const openDropdown = openPicker ? colorPicker : colorMenu;\n const relatedBtn = openPicker ? pickerToggle : menuToggle;\n const animationDuration = openDropdown &&\n getElementTransitionDuration(openDropdown);\n\n this.value = this.color.toString(true);\n\n /* istanbul ignore else @preserve */\n if (openDropdown) {\n removeClass(openDropdown, \"show\");\n setAttribute(relatedBtn, ariaExpanded, \"false\");\n setTimeout(() => {\n removePosition(openDropdown);\n /* istanbul ignore else @preserve */\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 /** 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":["Te","De","$","Pe","Ve","He","tt","rt","ct","lt","ft","gt","Dt","Ot","xt","Pt","Ht","Rt","en","nn","on","sn","ln","fn","En","_t","W","Tn","R","t","e","n","o","s","Q","j","Wn","Qn","Kn","qn","Gn","v","u","i","E","L","Xn","I","N","K","q","d","C","ne","oe","G","f","ae","ro","P","S","ao","r","a","l","p","g","A","fo","mo","vo","O","ho","b","y","w","ge","B","V","h","ye","we","Se","Ho","Ro","T","U","D","x","F","tr","er","sr","Z","z","c","J","_","nr","M","X","Y","m","k","H","or","gr","rr","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","off","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","ObjectFromEntries","target","config","querySelector","isHTMLElement","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,MAAoCA,GAAK,mBAA6CC,GAAK,gBAAuCC,GAAI,cAAkGC,GAAK,gBAA6DC,GAAK,gBAAiBC,GAAK,iBAA+DC,GAAK,SAAyGC,GAAK,UAAWC,GAAK,WAA0EC,GAAK,UAA4BC,GAAK,QAAsBC,GAAK,QAAqQC,GAAK,cAAoCC,GAAK,cAAeC,GAAK,YAAoDC,GAAK,SAA+DC,GAAK,SAA4CC,GAAK,YAiF7nCC,EAAK,YAAaC,GAAK,UAAWC,GAAK,YAAaC,EAAK,aAAgFC,GAAK,QAA6BC,GAAK,SAAqFC,GAAK,QAA+GC,GAAK,qBAAmEC,GAAI,qBA0B/XC,EAAK,WAavFC,GAAI,CAACC,EAAGC,EAAGC,EAAGC,IAAM,CACrB,MAAMC,EAAID,GAAK,GACfH,EAAE,iBACAC,EACAC,EACAE,CACD,CACH,EAAGC,GAAI,CAACL,EAAGC,EAAGC,EAAGC,IAAM,CACrB,MAAMC,EAAID,GAAK,GACfH,EAAE,oBACAC,EACAC,EACAE,CACD,CACH,EAesUE,GAAI,CAACN,EAAGC,IAAMD,EAAE,aAAaC,CAAC,EAAyHM,EAAK,CAACP,EAAGC,EAAGC,IAAMF,EAAE,aAAaC,EAAGC,CAAC,EAAmDM,GAAK,CAACR,EAAGC,IAAMD,EAAE,gBAAgBC,CAAC,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C,GAAK,KAAMqD,EAAK,CAACtD,EAAGC,IAAMa,EAAEd,CAAC,EAAIA,GAAKc,EAAEb,CAAC,EAAIA,EAAIqB,EAAG,GAAE,cAActB,CAAC,EAElOuD,GAAK,CAACvD,EAAGC,KAAOA,GAAKY,GAAEZ,CAAC,EAAIA,EAAIqB,EAAG,GAAE,uBACrHtB,CACF,ECjZMkB,GAAI,CACR,cACA,eACA,UACA,SACA,SACF,EAAGJ,EAAK,GAAM,CACZ,MAAM,EAAI,KAAK,MAAM,CAAC,EACtB,OAAO,EAAI,EAAI,GAAM,EAAI,KAAK,MAAM,CAAC,CACvC,EAAG0C,GAAI,CACL,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,eACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,OACA,CACE,EAAG,EACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,QACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,QACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,SACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,QACA,CACE,EAAG,EACH,EAAG,EACH,EAAG,CACT,CACG,EACD,CACE,iBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,OACA,CACE,EAAG,EACH,EAAG,EACH,EAAG,GACT,CACG,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,GACT,CACG,EACD,CACE,QACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,EACT,CACG,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,YACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,CACT,CACG,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,EACT,CACG,EACD,CACE,QACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,EACT,CACG,EACD,CACE,iBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,WACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,UACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,EACT,CACG,EACD,CACE,OACA,CACE,EAAG,EACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,WACA,CACE,EAAG,EACH,EAAG,EACH,EAAG,GACT,CACG,EACD,CACE,WACA,CACE,EAAG,EACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,gBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,EACT,CACG,EACD,CACE,WACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,YACA,CACE,EAAG,EACH,EAAG,IACH,EAAG,CACT,CACG,EACD,CACE,WACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,cACA,CACE,EAAG,IACH,EAAG,EACH,EAAG,GACT,CACG,EACD,CACE,iBACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,EACT,CACG,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,CACT,CACG,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,GACT,CACG,EACD,CACE,UACA,CACE,EAAG,IACH,EAAG,EACH,EAAG,CACT,CACG,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,eACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,gBACA,CACE,EAAG,GACH,EAAG,GACH,EAAG,GACT,CACG,EACD,CACE,gBACA,CACE,EAAG,GACH,EAAG,GACH,EAAG,EACT,CACG,EACD,CACE,gBACA,CACE,EAAG,GACH,EAAG,GACH,EAAG,EACT,CACG,EACD,CACE,gBACA,CACE,EAAG,EACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,EACH,EAAG,GACT,CACG,EACD,CACE,WACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,GACT,CACG,EACD,CACE,cACA,CACE,EAAG,EACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,UACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,UACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,aACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,EACT,CACG,EACD,CACE,cACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,cACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,EACT,CACG,EACD,CACE,UACA,CACE,EAAG,IACH,EAAG,EACH,EAAG,GACT,CACG,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,EACT,CACG,EACD,CACE,OACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,CACT,CACG,EACD,CACE,OACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,QACA,CACE,EAAG,EACH,EAAG,IACH,EAAG,CACT,CACG,EACD,CACE,cACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,EACT,CACG,EACD,CACE,OACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,WACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,UACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,EACT,CACG,EACD,CACE,SACA,CACE,EAAG,GACH,EAAG,EACH,EAAG,GACT,CACG,EACD,CACE,QACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,QACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,gBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,WACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,CACT,CACG,EACD,CACE,eACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,uBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,cACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,gBACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,eACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,iBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,iBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,iBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,cACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,OACA,CACE,EAAG,EACH,EAAG,IACH,EAAG,CACT,CACG,EACD,CACE,YACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,EACT,CACG,EACD,CACE,QACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,UACA,CACE,EAAG,IACH,EAAG,EACH,EAAG,GACT,CACG,EACD,CACE,SACA,CACE,EAAG,IACH,EAAG,EACH,EAAG,CACT,CACG,EACD,CACE,mBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,aACA,CACE,EAAG,EACH,EAAG,EACH,EAAG,GACT,CACG,EACD,CACE,eACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,GACT,CACG,EACD,CACE,eACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,iBACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,kBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,oBACA,CACE,EAAG,EACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,kBACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,kBACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,GACT,CACG,EACD,CACE,eACA,CACE,EAAG,GACH,EAAG,GACH,EAAG,GACT,CACG,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,WACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,cACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,OACA,CACE,EAAG,EACH,EAAG,EACH,EAAG,GACT,CACG,EACD,CACE,UACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,QACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,CACT,CACG,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,EACT,CACG,EACD,CACE,SACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,CACT,CACG,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,CACT,CACG,EACD,CACE,SACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,gBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,gBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,gBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,OACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,EACT,CACG,EACD,CACE,OACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,OACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,SACA,CACE,EAAG,IACH,EAAG,EACH,EAAG,GACT,CACG,EACD,CACE,gBACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,GACT,CACG,EACD,CACE,MACA,CACE,EAAG,IACH,EAAG,EACH,EAAG,CACT,CACG,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,YACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,cACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,EACT,CACG,EACD,CACE,SACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,EACT,CACG,EACD,CACE,WACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,EACT,CACG,EACD,CACE,WACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,SACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,EACT,CACG,EACD,CACE,SACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,UACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,GACT,CACG,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,OACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,cACA,CACE,EAAG,EACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,YACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,MACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,OACA,CACE,EAAG,EACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,UACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,SACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,EACT,CACG,EACD,CACE,YACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,SACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,QACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,CACG,EACD,CACE,QACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACT,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