annotate x/static/js/6395.f6027b24.chunk.js.map @ 125:49f3d3878413 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 5ea1f9c1eef1de76232e69aa6d34cda77d90d566
author fubar
date Sat, 05 Oct 2024 23:58:05 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
125
49f3d3878413 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 5ea1f9c1eef1de76232e69aa6d34cda77d90d566
fubar
parents:
diff changeset
1 {"version":3,"file":"static/js/6395.f6027b24.chunk.js","mappings":"iQAYA,SAASA,IACP,OAAQA,EACNC,OAAOC,QACP,SAAUC,GACR,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CACzC,IAAIG,EAAIF,UAAUD,GAClB,IAAK,IAAII,KAAKD,EACZN,OAAOQ,UAAUC,eAAeC,KAAKJ,EAAGC,KAAOL,EAAEK,GAAKD,EAAEC,GAC5D,CACA,OAAOL,CACT,GAAGS,MAAMC,KAAMR,UACnB,CACA,SAASS,EAAEX,EAAGC,GACZ,GAAI,MAAQD,EAAG,MAAO,CAAC,EACvB,IAAII,EACFC,EACAO,EAAI,CAAC,EACLC,EAAIf,OAAOgB,KAAKd,GAClB,IAAKK,EAAI,EAAGA,EAAIQ,EAAEV,OAAQE,IAAKJ,EAAEc,QAASX,EAAIS,EAAER,KAAQ,IAAMO,EAAER,GAAKJ,EAAEI,IACvE,OAAOQ,CACT,CACA,SAASI,EAAEhB,GACT,MAAMI,GAAIH,EAAAA,EAAAA,QAAED,GACVK,GAAIJ,EAAAA,EAAAA,SAAED,IACJI,EAAEa,SAAWb,EAAEa,QAAQjB,EAAE,IAE7B,OAAQI,EAAEa,QAAUjB,EAAIK,EAAEY,OAC5B,CACA,MAAMC,EAAIA,CAAClB,EAAGC,EAAI,EAAGG,EAAI,IAAOJ,EAAII,EAAIA,EAAIJ,EAAIC,EAAIA,EAA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,QACtBc,EAAAA,cAAA,OACEzE,UAAW6E,EAAQZ,OACnBxD,MAAO,CAAEC,gBAAiBF,GAC1BkG,QAASV,IACPc,EAAYd,EAAMe,cAAc,IAGpCtC,EAAAA,cAACH,EAAY,CACXC,SAAUA,EACVC,QAASA,KACPsC,EAAY,KAAK,EAEnBtG,MAAOA,EACPe,SAAUA,IAER,C","sources":["../../../packages/core/ui/react-colorful.js","../../../packages/core/ui/ColorPicker.tsx"],"sourcesContent":["/* eslint-disable */\n// vendored (e.g. copied into our source tree) because the tooling picks up \"import\" statements that confuse jest, could confuse other consumers of our modules\n// copy of react-colorful/dist/index.esmodule.js\n\nimport e, {\n useRef as r,\n useMemo as t,\n useEffect as o,\n useState as a,\n useCallback as l,\n useLayoutEffect as n,\n} from 'react'\nfunction s() {\n return (s =\n Object.assign ||\n function (e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = arguments[r]\n for (var o in t)\n Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o])\n }\n return e\n }).apply(this, arguments)\n}\nfunction c(e, r) {\n if (null == e) return {}\n var t,\n o,\n a = {},\n l = Object.keys(e)\n for (o = 0; o < l.length; o++) r.indexOf((t = l[o])) >= 0 || (a[t] = e[t])\n return a\n}\nfunction u(e) {\n const t = r(e),\n o = r(e => {\n t.current && t.current(e)\n })\n return (t.current = e), o.current\n}\nconst i = (e, r = 0, t = 1) => (e > t ? t : e < r ? r : e),\n d = e => 'touches' in e,\n f = e => (e && e.ownerDocument.defaultView) || self,\n h = (e, r, t) => {\n const o = e.getBoundingClientRect(),\n a = d(r)\n ? ((e, r) => {\n for (let t = 0; t < e.length; t++)\n if (e[t].identifier === r) return e[t]\n return e[0]\n })(r.touches, t)\n : r\n return {\n left: i((a.pageX - (o.left + f(e).pageXOffset)) / o.width),\n top: i((a.pageY - (o.top + f(e).pageYOffset)) / o.height),\n }\n },\n v = e => {\n !d(e) && e.preventDefault()\n },\n m = e.memo(a => {\n let { onMove: l, onKey: n } = a,\n i = c(a, ['onMove', 'onKey'])\n const m = r(null),\n g = u(l),\n p = u(n),\n b = r(null),\n _ = r(!1),\n [x, C, E] = t(() => {\n const e = e => {\n v(e),\n (d(e) ? e.touches.length > 0 : e.buttons > 0) && m.current\n ? g(h(m.current, e, b.current))\n : t(!1)\n },\n r = () => t(!1)\n function t(t) {\n const o = _.current,\n a = f(m.current),\n l = t ? a.addEventListener : a.removeEventListener\n l(o ? 'touchmove' : 'mousemove', e), l(o ? 'touchend' : 'mouseup', r)\n }\n return [\n ({ nativeEvent: e }) => {\n const r = m.current\n if (r && (v(e), !((e, r) => r && !d(e))(e, _.current) && r)) {\n if (d(e)) {\n _.current = !0\n const r = e.changedTouches || []\n r.length && (b.current = r[0].identifier)\n }\n r.focus(), g(h(r, e, b.current)), t(!0)\n }\n },\n e => {\n const r = e.which || e.keyCode\n r < 37 ||\n r > 40 ||\n (e.preventDefault(),\n p({\n left: 39 === r ? 0.05 : 37 === r ? -0.05 : 0,\n top: 40 === r ? 0.05 : 38 === r ? -0.05 : 0,\n }))\n },\n t,\n ]\n }, [p, g])\n return (\n o(() => E, [E]),\n e.createElement(\n 'div',\n s({}, i, {\n onTouchStart: x,\n onMouseDown: x,\n className: 'react-colorful__interactive',\n ref: m,\n onKeyDown: C,\n tabIndex: 0,\n role: 'slider',\n }),\n )\n )\n }),\n g = e => e.filter(Boolean).join(' '),\n p = ({ className: r, color: t, left: o, top: a = 0.5 }) => {\n const l = g(['react-colorful__pointer', r])\n return e.createElement(\n 'div',\n { className: l, style: { top: 100 * a + '%', left: 100 * o + '%' } },\n e.createElement('div', {\n className: 'react-colorful__pointer-fill',\n style: { backgroundColor: t },\n }),\n )\n },\n b = (e, r = 0, t = Math.pow(10, r)) => Math.round(t * e) / t,\n _ = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) },\n x = e => (\n '#' === e[0] && (e = e.substr(1)),\n e.length < 6\n ? {\n r: parseInt(e[0] + e[0], 16),\n g: parseInt(e[1] + e[1], 16),\n b: parseInt(e[2] + e[2], 16),\n a: 1,\n }\n : {\n r: parseInt(e.substr(0, 2), 16),\n g: parseInt(e.substr(2, 2), 16),\n b: parseInt(e.substr(4, 2), 16),\n a: 1,\n }\n ),\n C = (e, r = 'deg') => Number(e) * (_[r] || 1),\n E = e => {\n const r =\n /hsla?\\(?\\s*(-?\\d*\\.?\\d+)(deg|rad|grad|turn)?[,\\s]+(-?\\d*\\.?\\d+)%?[,\\s]+(-?\\d*\\.?\\d+)%?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i.exec(\n e,\n )\n return r\n ? M({\n h: C(r[1], r[2]),\n s: Number(r[3]),\n l: Number(r[4]),\n a: void 0 === r[5] ? 1 : Number(r[5]) / (r[6] ? 100 : 1),\n })\n : { h: 0, s: 0, v: 0, a: 1 }\n },\n H = E,\n M = ({ h: e, s: r, l: t, a: o }) => ({\n h: e,\n s: (r *= (t < 50 ? t : 100 - t) / 100) > 0 ? ((2 * r) / (t + r)) * 100 : 0,\n v: t + r,\n a: o,\n }),\n N = ({ h: e, s: r, v: t, a: o }) => {\n const a = ((200 - r) * t) / 100\n return {\n h: b(e),\n s: b(\n a > 0 && a < 200 ? ((r * t) / 100 / (a <= 100 ? a : 200 - a)) * 100 : 0,\n ),\n l: b(a / 2),\n a: b(o, 2),\n }\n },\n w = e => {\n const { h: r, s: t, l: o } = N(e)\n return `hsl(${r}, ${t}%, ${o}%)`\n },\n $ = e => {\n const { h: r, s: t, l: o, a } = N(e)\n return `hsla(${r}, ${t}%, ${o}%, ${a})`\n },\n y = ({ h: e, s: r, v: t, a: o }) => {\n ;(e = (e / 360) * 6), (r /= 100), (t /= 100)\n const a = Math.floor(e),\n l = t * (1 - r),\n n = t * (1 - (e - a) * r),\n s = t * (1 - (1 - e + a) * r),\n c = a % 6\n return {\n r: b(255 * [t, n, l, l, s, t][c]),\n g: b(255 * [s, t, t, n, l, l][c]),\n b: b(255 * [l, l, s, t, t, n][c]),\n a: b(o, 2),\n }\n },\n q = e => {\n const r =\n /hsva?\\(?\\s*(-?\\d*\\.?\\d+)(deg|rad|grad|turn)?[,\\s]+(-?\\d*\\.?\\d+)%?[,\\s]+(-?\\d*\\.?\\d+)%?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i.exec(\n e,\n )\n return r\n ? B({\n h: C(r[1], r[2]),\n s: Number(r[3]),\n v: Number(r[4]),\n a: void 0 === r[5] ? 1 : Number(r[5]) / (r[6] ? 100 : 1),\n })\n : { h: 0, s: 0, v: 0, a: 1 }\n },\n k = q,\n O = e => {\n const r =\n /rgba?\\(?\\s*(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i.exec(\n e,\n )\n return r\n ? z({\n r: Number(r[1]) / (r[2] ? 100 / 255 : 1),\n g: Number(r[3]) / (r[4] ? 100 / 255 : 1),\n b: Number(r[5]) / (r[6] ? 100 / 255 : 1),\n a: void 0 === r[7] ? 1 : Number(r[7]) / (r[8] ? 100 : 1),\n })\n : { h: 0, s: 0, v: 0, a: 1 }\n },\n I = O,\n j = e => {\n const r = e.toString(16)\n return r.length < 2 ? '0' + r : r\n },\n z = ({ r: e, g: r, b: t, a: o }) => {\n const a = Math.max(e, r, t),\n l = a - Math.min(e, r, t),\n n = l\n ? a === e\n ? (r - t) / l\n : a === r\n ? 2 + (t - e) / l\n : 4 + (e - r) / l\n : 0\n return {\n h: b(60 * (n < 0 ? n + 6 : n)),\n s: b(a ? (l / a) * 100 : 0),\n v: b((a / 255) * 100),\n a: o,\n }\n },\n B = e => ({ h: b(e.h), s: b(e.s), v: b(e.v), a: b(e.a, 2) }),\n D = e.memo(({ className: r, hue: t, onChange: o }) => {\n const a = g(['react-colorful__hue', r])\n return e.createElement(\n 'div',\n { className: a },\n e.createElement(\n m,\n {\n onMove: e => {\n o({ h: 360 * e.left })\n },\n onKey: e => {\n o({ h: i(t + 360 * e.left, 0, 360) })\n },\n 'aria-label': 'Hue',\n 'aria-valuetext': b(t),\n },\n e.createElement(p, {\n className: 'react-colorful__hue-pointer',\n left: t / 360,\n color: w({ h: t, s: 100, v: 100, a: 1 }),\n }),\n ),\n )\n }),\n K = e.memo(({ hsva: r, onChange: t }) => {\n const o = { backgroundColor: w({ h: r.h, s: 100, v: 100, a: 1 }) }\n return e.createElement(\n 'div',\n { className: 'react-colorful__saturation', style: o },\n e.createElement(\n m,\n {\n onMove: e => {\n t({ s: 100 * e.left, v: 100 - 100 * e.top })\n },\n onKey: e => {\n t({\n s: i(r.s + 100 * e.left, 0, 100),\n v: i(r.v - 100 * e.top, 0, 100),\n })\n },\n 'aria-label': 'Color',\n 'aria-valuetext': `Saturation ${b(r.s)}%, Brightness ${b(r.v)}%`,\n },\n e.createElement(p, {\n className: 'react-colorful__saturation-pointer',\n top: 1 - r.v / 100,\n left: r.s / 100,\n color: w(r),\n }),\n ),\n )\n }),\n L = (e, r) => {\n if (e === r) return !0\n for (const t in e) if (e[t] !== r[t]) return !1\n return !0\n },\n A = (e, r) => e.replace(/\\s/g, '') === r.replace(/\\s/g, '')\nfunction S(e, t, n) {\n const s = u(n),\n [c, i] = a(() => e.toHsva(t)),\n d = r({ color: t, hsva: c })\n o(() => {\n if (!e.equal(t, d.current.color)) {\n const r = e.toHsva(t)\n ;(d.current = { hsva: r, color: t }), i(r)\n }\n }, [t, e]),\n o(() => {\n let r\n L(c, d.current.hsva) ||\n e.equal((r = e.fromHsva(c)), d.current.color) ||\n ((d.current = { hsva: c, color: r }), s(r))\n }, [c, e, s])\n const f = l(e => {\n i(r => Object.assign({}, r, e))\n }, [])\n return [c, f]\n}\nconst T = 'undefined' != typeof window ? n : o\nlet F\nconst P = () =>\n F || ('undefined' != typeof __webpack_nonce__ ? __webpack_nonce__ : void 0),\n X = e => {\n F = e\n },\n Y = new Map(),\n R = e => {\n T(() => {\n const r = e.current ? e.current.ownerDocument : document\n if (void 0 !== r && !Y.has(r)) {\n const e = r.createElement('style')\n ;(e.innerHTML =\n '.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:\"\";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\\'data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill-opacity=\".05\"><path d=\"M8 0h8v8H8zM0 8h8v8H0z\"/></svg>\\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}'),\n Y.set(r, e)\n const t = P()\n t && e.setAttribute('nonce', t), r.head.appendChild(e)\n }\n }, [])\n },\n V = t => {\n let {\n className: o,\n colorModel: a,\n color: l = a.defaultColor,\n onChange: n,\n } = t,\n u = c(t, ['className', 'colorModel', 'color', 'onChange'])\n const i = r(null)\n R(i)\n const [d, f] = S(a, l, n),\n h = g(['react-colorful', o])\n return e.createElement(\n 'div',\n s({}, u, { ref: i, className: h }),\n e.createElement(K, { hsva: d, onChange: f }),\n e.createElement(D, {\n hue: d.h,\n onChange: f,\n className: 'react-colorful__last-control',\n }),\n )\n },\n G = {\n defaultColor: '000',\n toHsva: e => z(x(e)),\n fromHsva: e => (({ r: e, g: r, b: t }) => '#' + j(e) + j(r) + j(t))(y(e)),\n equal: (e, r) => e.toLowerCase() === r.toLowerCase() || L(x(e), x(r)),\n },\n J = r => e.createElement(V, s({}, r, { colorModel: G })),\n Q = ({ className: r, hsva: t, onChange: o }) => {\n const a = {\n backgroundImage: `linear-gradient(90deg, ${$(\n Object.assign({}, t, { a: 0 }),\n )}, ${$(Object.assign({}, t, { a: 1 }))})`,\n },\n l = g(['react-colorful__alpha', r])\n return e.createElement(\n 'div',\n { className: l },\n e.createElement('div', {\n className: 'react-colorful__alpha-gradient',\n style: a,\n }),\n e.createElement(\n m,\n {\n onMove: e => {\n o({ a: e.left })\n },\n onKey: e => {\n o({ a: i(t.a + e.left) })\n },\n 'aria-label': 'Alpha',\n 'aria-valuetext': `${b(100 * t.a)}%`,\n },\n e.createElement(p, {\n className: 'react-colorful__alpha-pointer',\n left: t.a,\n color: $(t),\n }),\n ),\n )\n },\n U = t => {\n let {\n className: o,\n colorModel: a,\n color: l = a.defaultColor,\n onChange: n,\n } = t,\n u = c(t, ['className', 'colorModel', 'color', 'onChange'])\n const i = r(null)\n R(i)\n const [d, f] = S(a, l, n),\n h = g(['react-colorful', o])\n return e.createElement(\n 'div',\n s({}, u, { ref: i, className: h }),\n e.createElement(K, { hsva: d, onChange: f }),\n e.createElement(D, { hue: d.h, onChange: f }),\n e.createElement(Q, {\n hsva: d,\n onChange: f,\n className: 'react-colorful__last-control',\n }),\n )\n },\n W = {\n defaultColor: { h: 0, s: 0, l: 0, a: 1 },\n toHsva: M,\n fromHsva: N,\n equal: L,\n },\n Z = r => e.createElement(U, s({}, r, { colorModel: W })),\n ee = { defaultColor: 'hsla(0, 0%, 0%, 1)', toHsva: E, fromHsva: $, equal: A },\n re = r => e.createElement(U, s({}, r, { colorModel: ee })),\n te = {\n defaultColor: { h: 0, s: 0, l: 0 },\n toHsva: ({ h: e, s: r, l: t }) => M({ h: e, s: r, l: t, a: 1 }),\n fromHsva: e => (({ h: e, s: r, l: t }) => ({ h: e, s: r, l: t }))(N(e)),\n equal: L,\n },\n oe = r => e.createElement(V, s({}, r, { colorModel: te })),\n ae = { defaultColor: 'hsl(0, 0%, 0%)', toHsva: H, fromHsva: w, equal: A },\n le = r => e.createElement(V, s({}, r, { colorModel: ae })),\n ne = {\n defaultColor: { h: 0, s: 0, v: 0, a: 1 },\n toHsva: e => e,\n fromHsva: B,\n equal: L,\n },\n se = r => e.createElement(U, s({}, r, { colorModel: ne })),\n ce = {\n defaultColor: 'hsva(0, 0%, 0%, 1)',\n toHsva: q,\n fromHsva: e => {\n const { h: r, s: t, v: o, a } = B(e)\n return `hsva(${r}, ${t}%, ${o}%, ${a})`\n },\n equal: A,\n },\n ue = r => e.createElement(U, s({}, r, { colorModel: ce })),\n ie = {\n defaultColor: { h: 0, s: 0, v: 0 },\n toHsva: ({ h: e, s: r, v: t }) => ({ h: e, s: r, v: t, a: 1 }),\n fromHsva: e => {\n const { h: r, s: t, v: o } = B(e)\n return { h: r, s: t, v: o }\n },\n equal: L,\n },\n de = r => e.createElement(V, s({}, r, { colorModel: ie })),\n fe = {\n defaultColor: 'hsv(0, 0%, 0%)',\n toHsva: k,\n fromHsva: e => {\n const { h: r, s: t, v: o } = B(e)\n return `hsv(${r}, ${t}%, ${o}%)`\n },\n equal: A,\n },\n he = r => e.createElement(V, s({}, r, { colorModel: fe })),\n ve = {\n defaultColor: { r: 0, g: 0, b: 0, a: 1 },\n toHsva: z,\n fromHsva: y,\n equal: L,\n },\n me = r => e.createElement(U, s({}, r, { colorModel: ve })),\n ge = {\n defaultColor: 'rgba(0, 0, 0, 1)',\n toHsva: O,\n fromHsva: e => {\n const { r, g: t, b: o, a } = y(e)\n return `rgba(${r}, ${t}, ${o}, ${a})`\n },\n equal: A,\n },\n pe = r => e.createElement(U, s({}, r, { colorModel: ge })),\n be = {\n defaultColor: { r: 0, g: 0, b: 0 },\n toHsva: ({ r: e, g: r, b: t }) => z({ r: e, g: r, b: t, a: 1 }),\n fromHsva: e => (({ r: e, g: r, b: t }) => ({ r: e, g: r, b: t }))(y(e)),\n equal: L,\n },\n _e = r => e.createElement(V, s({}, r, { colorModel: be })),\n xe = {\n defaultColor: 'rgb(0, 0, 0)',\n toHsva: I,\n fromHsva: e => {\n const { r, g: t, b: o } = y(e)\n return `rgb(${r}, ${t}, ${o})`\n },\n equal: A,\n },\n Ce = r => e.createElement(V, s({}, r, { colorModel: xe })),\n Ee = /^#?([0-9A-F]{3,8})$/i,\n He = r => {\n const {\n color: t = '',\n onChange: n,\n onBlur: i,\n escape: d,\n validate: f,\n format: h,\n process: v,\n } = r,\n m = c(r, [\n 'color',\n 'onChange',\n 'onBlur',\n 'escape',\n 'validate',\n 'format',\n 'process',\n ]),\n [g, p] = a(() => d(t)),\n b = u(n),\n _ = u(i),\n x = l(\n e => {\n const r = d(e.target.value)\n p(r), f(r) && b(v ? v(r) : r)\n },\n [d, v, f, b],\n ),\n C = l(\n e => {\n f(e.target.value) || p(d(t)), _(e)\n },\n [t, d, f, _],\n )\n return (\n o(() => {\n p(d(t))\n }, [t, d]),\n e.createElement(\n 'input',\n s({}, m, {\n value: h ? h(g) : g,\n spellCheck: 'false',\n onChange: x,\n onBlur: C,\n }),\n )\n )\n },\n Me = e => '#' + e,\n Ne = r => {\n const { prefixed: t, alpha: o } = r,\n a = c(r, ['prefixed', 'alpha']),\n n = l(e => e.replace(/([^0-9A-F]+)/gi, '').substr(0, o ? 8 : 6), [o]),\n u = l(\n e =>\n ((e, r) => {\n const t = Ee.exec(e),\n o = t ? t[1].length : 0\n return 3 === o || 6 === o || (!!r && 4 === o) || (!!r && 8 === o)\n })(e, o),\n [o],\n )\n return e.createElement(\n He,\n s({}, a, {\n escape: n,\n format: t ? Me : void 0,\n process: Me,\n validate: u,\n }),\n )\n }\nexport {\n Ne as HexColorInput,\n J as HexColorPicker,\n oe as HslColorPicker,\n le as HslStringColorPicker,\n Z as HslaColorPicker,\n re as HslaStringColorPicker,\n de as HsvColorPicker,\n he as HsvStringColorPicker,\n se as HsvaColorPicker,\n ue as HsvaStringColorPicker,\n _e as RgbColorPicker,\n Ce as RgbStringColorPicker,\n me as RgbaColorPicker,\n pe as RgbaStringColorPicker,\n X as setNonce,\n}\n","import React, { useState } from 'react'\nimport { colord } from '@jbrowse/core/util/colord'\nimport { Popover, Select, MenuItem, TextField } from '@mui/material'\nimport { makeStyles } from 'tss-react/mui'\n\n// locals\nimport * as paletteColors from './colors'\nimport { useLocalStorage, useDebounce } from '../util'\n\n// we are using a vendored copy of react-colorful because the default uses\n// pure-ESM which is difficult to make pass with jest e.g.\n// https://stackoverflow.com/questions/58613492/how-to-resolve-cannot-use-import-statement-outside-a-module-in-jest\nimport { RgbaStringColorPicker } from './react-colorful'\n\nconst useStyles = makeStyles()({\n picker: { position: 'relative' },\n\n swatches: {\n display: 'flex',\n padding: 12,\n flexWrap: 'wrap',\n },\n swatch: {\n width: 24,\n height: 24,\n margin: 4,\n border: 'none',\n padding: 0,\n cursor: 'pointer',\n outline: 'none',\n },\n})\n\ntype PaletteType = keyof typeof paletteColors\n\nexport const PopoverPicker = ({\n color,\n onChange,\n}: {\n color: string\n onChange: (color: string) => void\n}) => {\n const [anchorEl, setAnchorEl] = useState<HTMLDivElement | null>(null)\n const { classes } = useStyles()\n\n return (\n <div className={classes.picker}>\n <div\n className={classes.swatch}\n style={{ backgroundColor: color }}\n onClick={event => {\n setAnchorEl(event.currentTarget)\n }}\n />\n <ColorPopover\n anchorEl={anchorEl}\n onClose={() => {\n setAnchorEl(null)\n }}\n color={color}\n onChange={onChange}\n />\n </div>\n )\n}\n\nexport function ColorPopover({\n anchorEl,\n onChange,\n onClose,\n color,\n}: {\n color: string\n anchorEl: HTMLElement | null\n onChange: (val: string) => void\n onClose: () => void\n}) {\n return (\n <Popover open={!!anchorEl} anchorEl={anchorEl} onClose={onClose}>\n <ColorPicker color={color} onChange={onChange} />\n </Popover>\n )\n}\n\nexport function ColorPicker({\n onChange,\n color,\n}: {\n color: string\n onChange: (val: string) => void\n}) {\n const { classes } = useStyles()\n const [val, setVal] = useLocalStorage('colorPickerPalette', 'set1')\n const presetColors = paletteColors[val as keyof typeof paletteColors]\n const palettes = Object.keys(paletteColors)\n const [text, setText] = useState(color)\n const rgb = colord(color).toRgbString()\n const rgbDebounced = useDebounce(rgb, 1000)\n\n const handleChange = (val: string) => {\n setText(val)\n try {\n onChange(colord(val).toRgbString())\n } catch (e) {}\n }\n return (\n <div style={{ display: 'flex', padding: 10 }}>\n <div style={{ width: 200, margin: 5 }}>\n <RgbaStringColorPicker color={rgbDebounced} onChange={handleChange} />\n </div>\n <div style={{ width: 200, margin: 5 }}>\n <Select\n value={val}\n onChange={event => {\n const pal = event.target.value as PaletteType\n setVal(pal)\n }}\n >\n {palettes.map(p => (\n <MenuItem value={p} key={p}>\n {p}\n </MenuItem>\n ))}\n </Select>\n\n <div className={classes.swatches}>\n {presetColors.map((presetColor, idx) => (\n <button\n type=\"button\"\n /* biome-ignore lint/suspicious/noArrayIndexKey: */\n key={`${presetColor}-${idx}`}\n className={classes.swatch}\n style={{ background: presetColor }}\n onClick={() => {\n handleChange(presetColor)\n }}\n />\n ))}\n </div>\n <TextField\n helperText={'Manually set color (hex, rgb, or css color name)'}\n value={text}\n onChange={event => {\n handleChange(event.target.value)\n }}\n />\n </div>\n </div>\n )\n}\n\nexport default PopoverPicker\n"],"names":["s","Object","assign","e","r","arguments","length","t","o","prototype","hasOwnProperty","call","apply","this","c","a","l","keys","indexOf","u","current","i","d","f","ownerDocument","defaultView","self","h","getBoundingClientRect","identifier","touches","left","pageX","pageXOffset","width","top","pageY","pageYOffset","height","v","preventDefault","m","onMove","onKey","n","g","p","b","_","x","C","E","buttons","addEventListener","removeEventListener","nativeEvent","changedTouches","focus","which","keyCode","onTouchStart","onMouseDown","className","ref","onKeyDown","tabIndex","role","filter","Boolean","join","color","style","backgroundColor","Math","pow","round","N","PI","w","$","z","max","min","D","hue","onChange","K","hsva","S","toHsva","equal","L","fromHsva","T","window","Y","Map","Q","backgroundImage","U","colorModel","defaultColor","document","has","createElement","innerHTML","set","__webpack_nonce__","setAttribute","head","appendChild","ge","exec","Number","y","floor","A","replace","pe","useStyles","makeStyles","picker","position","swatches","display","padding","flexWrap","swatch","margin","border","cursor","outline","ColorPopover","anchorEl","onClose","React","Popover","open","ColorPicker","classes","val","setVal","useLocalStorage","presetColors","paletteColors","palettes","text","setText","useState","rgb","colord","toRgbString","rgbDebounced","useDebounce","handleChange","RgbaStringColorPicker","Select","value","event","pal","target","map","MenuItem","key","presetColor","idx","type","background","onClick","TextField","helperText","PopoverPicker","setAnchorEl","currentTarget"],"sourceRoot":""}