UNPKG

@tomplum/react-git-log

Version:

A flexible, themable, React component for visualising Git commit history, branch and tag metadata.

1,441 lines 156 kB
import * as F from "react"; import ve, { createContext as Je, useContext as Ke, useMemo as H, useCallback as J, useState as Ce, useRef as ut, useEffect as Ie, cloneElement as Cr, Children as wr, isValidElement as br } from "react"; import _r from "react-dom"; import './index.css';function Ee(r) { return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r; } var We = { exports: {} }, Me = {}; /** * @license React * react-jsx-runtime.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var $t; function xr() { if ($t) return Me; $t = 1; var r = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment"); function t(n, o, s) { var i = null; if (s !== void 0 && (i = "" + s), o.key !== void 0 && (i = "" + o.key), "key" in o) { s = {}; for (var a in o) a !== "key" && (s[a] = o[a]); } else s = o; return o = s.ref, { $$typeof: r, type: n, key: i, ref: o !== void 0 ? o : null, props: s }; } return Me.Fragment = e, Me.jsx = t, Me.jsxs = t, Me; } var Ne = {}; /** * @license React * react-jsx-runtime.development.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var St; function yr() { return St || (St = 1, process.env.NODE_ENV !== "production" && function() { function r(m) { if (m == null) return null; if (typeof m == "function") return m.$$typeof === P ? null : m.displayName || m.name || null; if (typeof m == "string") return m; switch (m) { case p: return "Fragment"; case b: return "Profiler"; case w: return "StrictMode"; case T: return "Suspense"; case B: return "SuspenseList"; case E: return "Activity"; } if (typeof m == "object") switch (typeof m.tag == "number" && console.error( "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue." ), m.$$typeof) { case v: return "Portal"; case N: return (m.displayName || "Context") + ".Provider"; case R: return (m._context.displayName || "Context") + ".Consumer"; case j: var $ = m.render; return m = m.displayName, m || (m = $.displayName || $.name || "", m = m !== "" ? "ForwardRef(" + m + ")" : "ForwardRef"), m; case O: return $ = m.displayName || null, $ !== null ? $ : r(m.type) || "Memo"; case V: $ = m._payload, m = m._init; try { return r(m($)); } catch { } } return null; } function e(m) { return "" + m; } function t(m) { try { e(m); var $ = !1; } catch { $ = !0; } if ($) { $ = console; var k = $.error, z = typeof Symbol == "function" && Symbol.toStringTag && m[Symbol.toStringTag] || m.constructor.name || "Object"; return k.call( $, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", z ), e(m); } } function n(m) { if (m === p) return "<>"; if (typeof m == "object" && m !== null && m.$$typeof === V) return "<...>"; try { var $ = r(m); return $ ? "<" + $ + ">" : "<...>"; } catch { return "<...>"; } } function o() { var m = M.A; return m === null ? null : m.getOwner(); } function s() { return Error("react-stack-top-frame"); } function i(m) { if (Y.call(m, "key")) { var $ = Object.getOwnPropertyDescriptor(m, "key").get; if ($ && $.isReactWarning) return !1; } return m.key !== void 0; } function a(m, $) { function k() { x || (x = !0, console.error( "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", $ )); } k.isReactWarning = !0, Object.defineProperty(m, "key", { get: k, configurable: !0 }); } function l() { var m = r(this.type); return C[m] || (C[m] = !0, console.error( "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release." )), m = this.props.ref, m !== void 0 ? m : null; } function c(m, $, k, z, A, G, U, te) { return k = G.ref, m = { $$typeof: f, type: m, key: $, props: G, _owner: A }, (k !== void 0 ? k : null) !== null ? Object.defineProperty(m, "ref", { enumerable: !1, get: l }) : Object.defineProperty(m, "ref", { enumerable: !1, value: null }), m._store = {}, Object.defineProperty(m._store, "validated", { configurable: !1, enumerable: !1, writable: !0, value: 0 }), Object.defineProperty(m, "_debugInfo", { configurable: !1, enumerable: !1, writable: !0, value: null }), Object.defineProperty(m, "_debugStack", { configurable: !1, enumerable: !1, writable: !0, value: U }), Object.defineProperty(m, "_debugTask", { configurable: !1, enumerable: !1, writable: !0, value: te }), Object.freeze && (Object.freeze(m.props), Object.freeze(m)), m; } function d(m, $, k, z, A, G, U, te) { var D = $.children; if (D !== void 0) if (z) if (q(D)) { for (z = 0; z < D.length; z++) g(D[z]); Object.freeze && Object.freeze(D); } else console.error( "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead." ); else g(D); if (Y.call($, "key")) { D = r(m); var Z = Object.keys($).filter(function(X) { return X !== "key"; }); z = 0 < Z.length ? "{key: someKey, " + Z.join(": ..., ") + ": ...}" : "{key: someKey}", L[D + z] || (Z = 0 < Z.length ? "{" + Z.join(": ..., ") + ": ...}" : "{}", console.error( `A props object containing a "key" prop is being spread into JSX: let props = %s; <%s {...props} /> React keys must be passed directly to JSX without using spread: let props = %s; <%s key={someKey} {...props} />`, z, D, Z, D ), L[D + z] = !0); } if (D = null, k !== void 0 && (t(k), D = "" + k), i($) && (t($.key), D = "" + $.key), "key" in $) { k = {}; for (var I in $) I !== "key" && (k[I] = $[I]); } else k = $; return D && a( k, typeof m == "function" ? m.displayName || m.name || "Unknown" : m ), c( m, D, G, A, o(), k, U, te ); } function g(m) { typeof m == "object" && m !== null && m.$$typeof === f && m._store && (m._store.validated = 1); } var u = ve, f = Symbol.for("react.transitional.element"), v = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), w = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), R = Symbol.for("react.consumer"), N = Symbol.for("react.context"), j = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), B = Symbol.for("react.suspense_list"), O = Symbol.for("react.memo"), V = Symbol.for("react.lazy"), E = Symbol.for("react.activity"), P = Symbol.for("react.client.reference"), M = u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Y = Object.prototype.hasOwnProperty, q = Array.isArray, S = console.createTask ? console.createTask : function() { return null; }; u = { "react-stack-bottom-frame": function(m) { return m(); } }; var x, C = {}, y = u["react-stack-bottom-frame"].bind( u, s )(), _ = S(n(s)), L = {}; Ne.Fragment = p, Ne.jsx = function(m, $, k, z, A) { var G = 1e4 > M.recentlyCreatedOwnerStacks++; return d( m, $, k, !1, z, A, G ? Error("react-stack-top-frame") : y, G ? S(n(m)) : _ ); }, Ne.jsxs = function(m, $, k, z, A) { var G = 1e4 > M.recentlyCreatedOwnerStacks++; return d( m, $, k, !0, z, A, G ? Error("react-stack-top-frame") : y, G ? S(n(m)) : _ ); }; }()), Ne; } var kt; function mt() { return kt || (kt = 1, process.env.NODE_ENV === "production" ? We.exports = xr() : We.exports = yr()), We.exports; } var h = mt(); const $r = "_container_132e7_1", Rt = { container: $r }, Sr = "_tooltip_6a7sr_1", kr = { tooltip: Sr }, rr = [ "rgb(0, 255, 128)", // Neon green "rgb(41, 121, 255)", // Electric blue "rgb(201, 81, 238)", // Pink "rgb(255, 160, 0)", // Amber "rgb(0, 184, 212)", // Dark cyan "rgb(103, 58, 183)", // Royal violet "rgb(224,33,70)", // Red "rgb(0, 121, 107)", // Teal storm "rgb(255, 193, 7)" // Solar gold ], Rr = [ "rgb(0, 200, 83)", // Bright green "rgb(25, 118, 210)", // Medium blue "rgb(244, 143, 177)", // Soft pink "rgb(255, 193, 7)", // Golden amber "rgb(3, 169, 244)", // Sky blue "rgb(156, 39, 176)", // Vibrant violet "rgb(229, 57, 53)", // Warm red "rgb(0, 137, 123)", // Ocean teal "rgb(255, 160, 0)" // Deep yellow-orange ], re = 40, ft = 20, He = 2, nr = 16, Te = 24, Tt = { hash: "defaultCommit", branch: "unknown", parents: [], children: [], authorDate: (/* @__PURE__ */ new Date()).toString(), message: "Working tree index", committerDate: (/* @__PURE__ */ new Date()).toString(), isBranchTip: !1 }, or = Je({ headCommit: Tt, indexCommit: Tt, currentBranch: "master", showTable: !0, showBranchesTags: !0, selectedCommit: void 0, setSelectedCommit: (r) => { console.debug(`Tried to invoke setSelectedCommit(${JSON.stringify(r)}) before the GitContext was initialised.`); }, previewedCommit: void 0, setPreviewedCommit: (r) => { console.debug(`Tried to invoke setPreviewedCommit(${JSON.stringify(r)}) before the GitContext was initialised.`); }, graphOrientation: "normal", setGraphOrientation: (r) => { console.debug(`Tried to invoke setGraphOrientation(${r}) before the GitContext was initialised.`); }, graphData: { children: /* @__PURE__ */ new Map(), edges: [], graphWidth: 0, commits: [], positions: /* @__PURE__ */ new Map(), parents: /* @__PURE__ */ new Map(), hashToCommit: /* @__PURE__ */ new Map() }, rowSpacing: 0, graphWidth: 300, nodeSize: ft, setNodeSize: (r) => { console.debug(`Tried to invoke setNodeSize(${r}) before the GitContext was initialised.`); }, setGraphWidth: (r) => { console.debug(`Tried to invoke setGraphWidth(${r}) before the GitContext was initialised.`); }, isServerSidePaginated: !1, paging: { endIndex: 0, startIndex: 0 }, isIndexVisible: !0 }), Q = () => Ke(or), sr = Je({ colours: rr, theme: "light" }), Tr = () => Ke(sr), Et = (r) => { if (r < 1) return []; const e = []; if (r === 1) e.push("rgb(54,229,234)"); else for (let t = 0; t < r; t++) { const n = t / (r - 1) * 360, o = t === r - 1 ? 359 : n, i = Er(t === 0 ? 0 : o, 100, 50); e.push(`rgb(${i[0]}, ${i[1]}, ${i[2]})`); } return e; }, Er = (r, e, t) => { e /= 100, t /= 100; const n = (i) => (i + r / 30) % 12, o = e * Math.min(t, 1 - t), s = (i) => Math.round((t - o * Math.max(-1, Math.min(n(i) - 3, Math.min(9 - n(i), 1)))) * 255); return [s(0), s(8), s(4)]; }, Mr = ({ children: r, theme: e, colours: t, graphWidth: n }) => { const { shiftAlphaChannel: o } = oe(), s = H(() => { switch (t) { case "rainbow-light": return Et(n + 1); case "rainbow-dark": return Et(n + 1).map((a) => o(a, 0.6)); case "neon-aurora-dark": return rr; case "neon-aurora-light": return Rr; default: return e === "light" ? t : t.map((a) => o(a, 0.6)); } }, [t, n, o, e]), i = H(() => ({ colours: s, theme: e }), [e, s]); return /* @__PURE__ */ h.jsx(sr.Provider, { value: i, children: r }); }, oe = () => { const { graphData: r } = Q(), { theme: e, colours: t } = Tr(), n = H(() => e === "dark" ? "rgba(70,70,70,0.8)" : "rgba(231, 231, 231, 0.5)", [e]), o = H(() => e === "dark" ? "rgb(255, 255, 255)" : "rgb(0, 0, 0)", [e]), s = J((u, f) => { const v = u?.match(/\d+/g); if (u && v != null) { const [p, w, b] = v.map(Number), R = e === "dark" ? "rgb(0, 0, 0)" : "rgb(255, 255, 255)", [N, j, T] = R.match(/\d+/g).map(Number), B = Math.round(p * f + N * (1 - f)), O = Math.round(w * f + j * (1 - f)), V = Math.round(b * f + T * (1 - f)); return `rgb(${B}, ${O}, ${V})`; } return u; }, [e]), i = J((u, f) => `rgba(${u?.replace("rgb(", "").replace(")", "")}, ${f})`, []), a = J((u) => { const f = t[u]; return f || t[u % t.length]; }, [t]), l = J((u) => { if (u.hash === "index") return a(0); const f = r.positions.get(u.hash); if (f) { const v = f[1]; return a(v); } return console.warn(`Commit ${u.hash} did not have a mapped graph position`), "rgb(0, 0, 0)"; }, [a, r.positions]), c = J((u) => ({ backgroundColour: s(u.columnColour, 0.15), borderColour: u.columnColour }), [s]), d = J((u) => i(a(u), 0.15), [a, i]), g = J((u) => e === "dark" ? s(l(u), 0.2) : s(l(u), 0.1), [l, s, e]); return { theme: e, hoverColour: n, textColour: o, getTooltipBackground: g, reduceOpacity: i, getCommitColour: l, shiftAlphaChannel: s, getGraphColumnColour: a, getCommitNodeColours: c, getGraphColumnSelectedBackgroundColour: d, hoverTransitionDuration: 0.3 }; }, Nr = ({ id: r, commit: e }) => { const { textColour: t, getTooltipBackground: n, getCommitColour: o } = oe(), s = n(e); return /* @__PURE__ */ h.jsx( "div", { className: kr.tooltip, id: `tag-${r}-tooltip`, "data-testid": `tag-${r}-tooltip`, style: { color: t, background: s, border: `2px solid ${o(e)}` }, children: e.branch } ); }, Pr = "_tagContainer_16coc_1", Lr = "_tag_16coc_1", Dr = "_tagLine_16coc_24", nt = { tagContainer: Pr, tag: Lr, tagLine: Dr }; var Pe = {}, Le = {}, Mt; function jr() { if (Mt) return Le; Mt = 1, Object.defineProperty(Le, "__esModule", { value: !0 }), Le.PopoverPortal = void 0; var r = ve, e = _r, t = function(n) { var o = n.container, s = n.element, i = n.scoutElement, a = n.children; return (0, r.useLayoutEffect)(function() { return o.appendChild(s), o.appendChild(i), function() { o.removeChild(s), o.removeChild(i); }; }, [o, s, i]), (0, e.createPortal)(a, s); }; return Le.PopoverPortal = t, Le; } var De = {}, Nt; function gt() { return Nt || (Nt = 1, function(r) { var e = De && De.__assign || function() { return e = Object.assign || function(l) { for (var c, d = 1, g = arguments.length; d < g; d++) { c = arguments[d]; for (var u in c) Object.prototype.hasOwnProperty.call(c, u) && (l[u] = c[u]); } return l; }, e.apply(this, arguments); }; Object.defineProperty(r, "__esModule", { value: !0 }), r.getNudgedPopoverRect = r.getNewPopoverRect = r.popoverRectForPosition = r.createContainer = r.rectsAreEqual = r.createRect = r.EMPTY_RECT = void 0, r.EMPTY_RECT = { top: 0, left: 0, right: 0, bottom: 0, width: 0, height: 0 }; var t = function(l) { var c = l.top, d = l.left, g = l.width, u = l.height; return { top: c, left: d, width: g, height: u, right: d + g, bottom: c + u }; }; r.createRect = t; var n = function(l, c) { return l === c || l?.bottom === c?.bottom && l?.height === c?.height && l?.left === c?.left && l?.right === c?.right && l?.top === c?.top && l?.width === c?.width; }; r.rectsAreEqual = n; var o = function(l) { var c = l.containerStyle, d = l.containerClassName, g = window.document.createElement("div"); return d && (g.className = d), Object.assign(g.style, c), g; }; r.createContainer = o; var s = function(l, c, d, g, u) { var f = c.left + c.width / 2, v = c.top + c.height / 2, p = d.width, w = d.height, b, R; switch (l) { case "left": b = v - w / 2, R = c.left - g - p, u === "start" && (b = c.top), u === "end" && (b = c.bottom - w); break; case "bottom": b = c.bottom + g, R = f - p / 2, u === "start" && (R = c.left), u === "end" && (R = c.right - p); break; case "right": b = v - w / 2, R = c.right + g, u === "start" && (b = c.top), u === "end" && (b = c.bottom - w); break; default: b = c.top - w - g, R = f - p / 2, u === "start" && (R = c.left), u === "end" && (R = c.right - p); break; } return (0, r.createRect)({ left: R, top: b, width: p, height: w }); }; r.popoverRectForPosition = s; var i = function(l, c) { var d = l.position, g = l.align, u = l.childRect, f = l.popoverRect, v = l.boundaryRect, p = l.padding, w = l.reposition, b = (0, r.popoverRectForPosition)(d, u, f, p, g), R = w && (d === "top" && b.top < v.top + c || d === "left" && b.left < v.left + c || d === "right" && b.right > v.right - c || d === "bottom" && b.bottom > v.bottom - c); return { rect: b, boundaryViolation: R }; }; r.getNewPopoverRect = i; var a = function(l, c, d) { var g = c.top + d, u = c.left + d, f = c.right - d, v = c.bottom - d, p = l.top < g ? g : l.top; p = p + l.height > v ? v - l.height : p; var w = l.left < u ? u : l.left; return w = w + l.width > f ? f - l.width : w, (0, r.createRect)(e(e({}, l), { top: p, left: w })); }; r.getNudgedPopoverRect = a; }(De)), De; } var je = {}, Oe = {}, Pt; function Or() { if (Pt) return Oe; Pt = 1, Object.defineProperty(Oe, "__esModule", { value: !0 }), Oe.useElementRef = void 0; var r = ve, e = gt(), t = function(n) { var o = n.containerClassName, s = n.containerStyle, i = (0, r.useRef)(), a = (0, r.useState)(function() { return (0, e.createContainer)({ containerStyle: s, containerClassName: o }); })[0]; return (0, r.useLayoutEffect)(function() { a.className = o; }, [o, a]), (0, r.useLayoutEffect)(function() { Object.assign(a.style, s); }, [s, a]), i.current = a, i; }; return Oe.useElementRef = t, Oe; } var Lt; function Br() { if (Lt) return je; Lt = 1, Object.defineProperty(je, "__esModule", { value: !0 }), je.usePopover = void 0; var r = ve, e = gt(), t = Or(), n = { position: "fixed", overflow: "visible", top: "0px", left: "0px" }, o = { position: "fixed", top: "0px", left: "0px", width: "0px", height: "0px", visibility: "hidden" }, s = function(i) { var a = i.isOpen, l = i.childRef, c = i.positions, d = i.containerClassName, g = i.parentElement, u = i.transform, f = i.transformMode, v = i.align, p = i.padding, w = i.reposition, b = i.boundaryInset, R = i.boundaryElement, N = i.onPositionPopover, j = (0, t.useElementRef)({ containerClassName: "react-tiny-popover-scout", containerStyle: o }), T = (0, t.useElementRef)({ containerClassName: d != null && d.length > 0 && d !== "react-tiny-popover-container" ? "react-tiny-popover-container ".concat(d) : "react-tiny-popover-container", containerStyle: n }), B = (0, r.useCallback)(function(O) { var V, E, P = O === void 0 ? {} : O, M = P.positionIndex, Y = M === void 0 ? 0 : M, q = P.parentRect, S = q === void 0 ? g.getBoundingClientRect() : q, x = P.childRect, C = x === void 0 ? (V = l?.current) === null || V === void 0 ? void 0 : V.getBoundingClientRect() : x, y = P.scoutRect, _ = y === void 0 ? (E = j?.current) === null || E === void 0 ? void 0 : E.getBoundingClientRect() : y, L = P.popoverRect, m = L === void 0 ? T.current.getBoundingClientRect() : L, $ = P.boundaryRect, k = $ === void 0 ? R === g ? S : R.getBoundingClientRect() : $; if (!(!C || !S || !a)) { if (u && f === "absolute") { var z = typeof u == "function" ? u({ childRect: C, popoverRect: m, parentRect: S, boundaryRect: k, padding: p, align: v, nudgedTop: 0, nudgedLeft: 0, boundaryInset: b, violations: e.EMPTY_RECT, hasViolations: !1 }) : u, A = z.top, G = z.left, U = Math.round(S.left + G - _.left), te = Math.round(S.top + A - _.top); T.current.style.transform = "translate(".concat(U, "px, ").concat(te, "px)"), N({ childRect: C, popoverRect: (0, e.createRect)({ left: U, top: te, width: m.width, height: m.height }), parentRect: S, boundaryRect: k, padding: p, align: v, transform: { top: A, left: G }, nudgedTop: 0, nudgedLeft: 0, boundaryInset: b, violations: e.EMPTY_RECT, hasViolations: !1 }); return; } var D = Y === c.length, Z = D ? c[0] : c[Y], I = (0, e.getNewPopoverRect)({ childRect: C, popoverRect: m, boundaryRect: k, position: Z, align: v, padding: p, reposition: w }, b), X = I.rect, ue = I.boundaryViolation; if (ue && w && !D) { B({ positionIndex: Y + 1, childRect: C, popoverRect: m, parentRect: S, boundaryRect: k }); return; } var ce = X.top, ge = X.left, se = X.width, ye = X.height, be = w && !D, $e = (0, e.getNudgedPopoverRect)(X, k, b), Ae = $e.left, Ge = $e.top, me = ce, W = ge; be && (me = Ge, W = Ae), me = Math.round(me - _.top), W = Math.round(W - _.left), T.current.style.transform = "translate(".concat(W, "px, ").concat(me, "px)"); var K = { top: k.top + b - me, left: k.left + b - W, right: W + se - k.right + b, bottom: me + ye - k.bottom + b }, ie = { childRect: C, popoverRect: (0, e.createRect)({ left: W, top: me, width: se, height: ye }), parentRect: S, boundaryRect: k, position: Z, align: v, padding: p, nudgedTop: Ge - ce, nudgedLeft: Ae - ge, boundaryInset: b, violations: { top: K.top <= 0 ? 0 : K.top, left: K.left <= 0 ? 0 : K.left, right: K.right <= 0 ? 0 : K.right, bottom: K.bottom <= 0 ? 0 : K.bottom }, hasViolations: K.top > 0 || K.left > 0 || K.right > 0 || K.bottom > 0 }; if (u) { N(ie); var Se = typeof u == "function" ? u(ie) : u, fe = Se.top, he = Se.left; T.current.style.transform = "translate(".concat(Math.round(W + (he ?? 0)), "px, ").concat(Math.round(me + (fe ?? 0)), "px)"), ie.nudgedLeft += he ?? 0, ie.nudgedTop += fe ?? 0, ie.transform = { top: fe, left: he }; } N(ie); } }, [ g, l, j, T, R, a, u, f, c, v, p, w, b, N ]); return { positionPopover: B, popoverRef: T, scoutRef: j }; }; return je.usePopover = s, je; } var Be = {}, Dt; function zr() { if (Dt) return Be; Dt = 1, Object.defineProperty(Be, "__esModule", { value: !0 }), Be.useMemoizedArray = void 0; var r = ve, e = function(t) { var n = (0, r.useRef)(t), o = (0, r.useMemo)(function() { if (n.current === t) return n.current; if (n.current.length !== t.length) return n.current = t, t; for (var s = 0; s < t.length; s += 1) if (t[s] !== n.current[s]) return n.current = t, t; return n.current; }, [t]); return o; }; return Be.useMemoizedArray = e, Be; } var ze = {}, jt; function Hr() { if (jt) return ze; jt = 1, Object.defineProperty(ze, "__esModule", { value: !0 }), ze.useHandlePrevValues = void 0; var r = ve, e = function(t) { var n = (0, r.useRef)(t.positions), o = (0, r.useRef)(t.reposition), s = (0, r.useRef)(t.transformMode), i = (0, r.useRef)(t.transform), a = (0, r.useRef)(t.boundaryElement), l = (0, r.useRef)(t.boundaryInset), c = (0, r.useCallback)(function() { n.current = t.positions, o.current = t.reposition, s.current = t.transformMode, i.current = t.transform, a.current = t.boundaryElement, l.current = t.boundaryInset; }, [ t.boundaryElement, t.boundaryInset, t.positions, t.reposition, t.transform, t.transformMode ]); return { prev: { positions: n.current, reposition: o.current, transformMode: s.current, transform: i.current, boundaryElement: a.current, boundaryInset: l.current }, updatePrevValues: c }; }; return ze.useHandlePrevValues = e, ze; } var _e = {}, Ot; function ir() { if (Ot) return _e; Ot = 1; var r = _e && _e.__assign || function() { return r = Object.assign || function(n) { for (var o, s = 1, i = arguments.length; s < i; s++) { o = arguments[s]; for (var a in o) Object.prototype.hasOwnProperty.call(o, a) && (n[a] = o[a]); } return n; }, r.apply(this, arguments); }; Object.defineProperty(_e, "__esModule", { value: !0 }), _e.useArrowContainer = void 0; var e = ve, t = function(n) { var o = n.childRect, s = n.popoverRect, i = n.position, a = n.arrowSize, l = n.arrowColor, c = (0, e.useMemo)(function() { return { padding: a }; }, [a]), d = (0, e.useMemo)(function() { return r({ position: "absolute" }, function() { var g = a * 2, u = o.top - s.top + o.height / 2 - g / 2, f = o.left - s.left + o.width / 2 - g / 2, v = a, p = s.width - a, w = s.height - a; switch (f = f < v ? v : f, f = f + g > p ? p - g : f, u = u < v ? v : u, u = u + g > w ? w - g : u, u = Number.isNaN(u) ? 0 : u, f = Number.isNaN(f) ? 0 : f, i) { case "right": return { borderTop: "".concat(a, "px solid transparent"), borderBottom: "".concat(a, "px solid transparent"), borderRight: "".concat(a, "px solid ").concat(l), left: 0, top: u }; case "left": return { borderTop: "".concat(a, "px solid transparent"), borderBottom: "".concat(a, "px solid transparent"), borderLeft: "".concat(a, "px solid ").concat(l), right: 0, top: u }; case "bottom": return { borderLeft: "".concat(a, "px solid transparent"), borderRight: "".concat(a, "px solid transparent"), borderBottom: "".concat(a, "px solid ").concat(l), top: 0, left: f }; case "top": return { borderLeft: "".concat(a, "px solid transparent"), borderRight: "".concat(a, "px solid transparent"), borderTop: "".concat(a, "px solid ").concat(l), bottom: 0, left: f }; default: return { display: "hidden" }; } }()); }, [ l, a, o.height, o.left, o.top, o.width, s.height, s.left, s.top, s.width, i ]); return { arrowContainerStyle: c, arrowStyle: d }; }; return _e.useArrowContainer = t, _e; } var xe = {}, Bt; function Vr() { if (Bt) return xe; Bt = 1; var r = xe && xe.__assign || function() { return r = Object.assign || function(s) { for (var i, a = 1, l = arguments.length; a < l; a++) { i = arguments[a]; for (var c in i) Object.prototype.hasOwnProperty.call(i, c) && (s[c] = i[c]); } return s; }, r.apply(this, arguments); }; Object.defineProperty(xe, "__esModule", { value: !0 }), xe.ArrowContainer = void 0; var e = mt(), t = ve, n = ir(), o = function(s) { var i = s.childRect, a = s.popoverRect, l = s.position, c = s.arrowColor, d = s.arrowSize, g = s.arrowClassName, u = s.arrowStyle, f = s.className, v = s.children, p = s.style, w = (0, n.useArrowContainer)({ childRect: i, popoverRect: a, position: l, arrowColor: c, arrowSize: d }), b = w.arrowContainerStyle, R = w.arrowStyle, N = (0, t.useMemo)(function() { return r(r({}, b), p); }, [b, p]), j = (0, t.useMemo)(function() { return r(r({}, R), u); }, [R, u]); return (0, e.jsxs)("div", { className: f, style: N, children: [(0, e.jsx)("div", { style: j, className: g }), v] }); }; return xe.ArrowContainer = o, xe; } var zt; function Ir() { return zt || (zt = 1, function(r) { var e = Pe && Pe.__assign || function() { return e = Object.assign || function(f) { for (var v, p = 1, w = arguments.length; p < w; p++) { v = arguments[p]; for (var b in v) Object.prototype.hasOwnProperty.call(v, b) && (f[b] = v[b]); } return f; }, e.apply(this, arguments); }; Object.defineProperty(r, "__esModule", { value: !0 }), r.Popover = r.usePopover = r.ArrowContainer = r.useArrowContainer = void 0; var t = mt(), n = ve, o = jr(), s = gt(), i = Br(); Object.defineProperty(r, "usePopover", { enumerable: !0, get: function() { return i.usePopover; } }); var a = zr(), l = Hr(), c = ir(); Object.defineProperty(r, "useArrowContainer", { enumerable: !0, get: function() { return c.useArrowContainer; } }); var d = Vr(); Object.defineProperty(r, "ArrowContainer", { enumerable: !0, get: function() { return d.ArrowContainer; } }); var g = ["top", "left", "right", "bottom"], u = (0, n.forwardRef)(function(f, v) { var p = f.isOpen, w = f.children, b = f.content, R = f.positions, N = R === void 0 ? g : R, j = f.align, T = j === void 0 ? "center" : j, B = f.padding, O = B === void 0 ? 0 : B, V = f.reposition, E = V === void 0 ? !0 : V, P = f.parentElement, M = P === void 0 ? window.document.body : P, Y = f.boundaryElement, q = Y === void 0 ? M : Y, S = f.containerClassName, x = f.containerStyle, C = f.transform, y = f.transformMode, _ = y === void 0 ? "absolute" : y, L = f.boundaryInset, m = L === void 0 ? 0 : L, $ = f.onClickOutside, k = f.clickOutsideCapture, z = k === void 0 ? !1 : k, A = (0, a.useMemoizedArray)(Array.isArray(N) ? N : [N]), G = (0, l.useHandlePrevValues)({ positions: A, reposition: E, transformMode: _, transform: C, boundaryElement: q, boundaryInset: m }), U = G.prev, te = G.updatePrevValues, D = (0, n.useRef)(), Z = (0, n.useState)({ align: T, nudgedLeft: 0, nudgedTop: 0, position: A[0], padding: O, childRect: s.EMPTY_RECT, popoverRect: s.EMPTY_RECT, parentRect: s.EMPTY_RECT, boundaryRect: s.EMPTY_RECT, boundaryInset: m, violations: s.EMPTY_RECT, hasViolations: !1 }), I = Z[0], X = Z[1], ue = (0, n.useCallback)(function(W) { return X(W); }, []), ce = (0, i.usePopover)({ isOpen: p, childRef: D, containerClassName: S, parentElement: M, boundaryElement: q, transform: C, transformMode: _, positions: A, align: T, padding: O, boundaryInset: m, reposition: E, onPositionPopover: ue }), ge = ce.positionPopover, se = ce.popoverRef, ye = ce.scoutRef; (0, n.useLayoutEffect)(function() { var W = !0, K = function() { var ie, Se; if (p && W) { var fe = (ie = D?.current) === null || ie === void 0 ? void 0 : ie.getBoundingClientRect(), he = (Se = se?.current) === null || Se === void 0 ? void 0 : Se.getBoundingClientRect(); fe != null && he != null && (!(0, s.rectsAreEqual)(fe, I.childRect) || he.width !== I.popoverRect.width || he.height !== I.popoverRect.height || I.padding !== O || I.align !== T || A !== U.positions || E !== U.reposition || _ !== U.transformMode || C !== U.transform || q !== U.boundaryElement || m !== U.boundaryInset) && ge(), te(), W && window.requestAnimationFrame(K); } }; return K(), function() { W = !1; }; }, [ T, q, m, p, O, se, I.align, I.childRect, I.padding, I.popoverRect.height, I.popoverRect.width, ge, A, U.boundaryElement, U.boundaryInset, U.positions, U.reposition, U.transform, U.transformMode, E, C, _, te ]), (0, n.useEffect)(function() { var W = se.current; return Object.assign(W.style, x), function() { Object.keys(x ?? {}).forEach(function(K) { return delete W.style[K]; }); }; }, [x, p, se]); var be = (0, n.useCallback)(function(W) { var K, ie; p && !(!((K = se.current) === null || K === void 0) && K.contains(W.target)) && !(!((ie = D.current) === null || ie === void 0) && ie.contains(W.target)) && $?.(W); }, [p, $, se]), $e = (0, n.useCallback)(function() { D.current && p && window.requestAnimationFrame(function() { return ge(); }); }, [ge, p]); (0, n.useEffect)(function() { var W = M.ownerDocument.body; return W.addEventListener("click", be, z), W.addEventListener("contextmenu", be, z), window.addEventListener("resize", $e), function() { W.removeEventListener("click", be, z), W.removeEventListener("contextmenu", be, z), window.removeEventListener("resize", $e); }; }, [z, be, $e, M]); var Ae = (0, n.useCallback)(function(W) { D.current = W, v != null && (typeof v == "object" ? v.current = W : typeof v == "function" && v(W)); }, [v]), Ge = function() { return (0, n.cloneElement)(w, { ref: Ae }); }, me = function() { return p ? (0, t.jsx)(o.PopoverPortal, { element: se.current, scoutElement: ye.current, container: M, children: typeof b == "function" ? b(I) : b }) : null; }; return (0, t.jsxs)(t.Fragment, { children: [Ge(), me()] }); }); r.Popover = (0, n.forwardRef)(function(f, v) { return typeof window > "u" ? f.children : (0, t.jsx)(u, e({}, f, { ref: v })); }); }(Pe)), Pe; } var Qe = Ir(); const Ar = "_branchName_f49hs_1", Fe = { branchName: Ar }, ar = (r) => r.replace("refs/heads/", "").replace("refs/remotes/origin/", "").replace("refs/tags/", ""); var ot = { exports: {} }; /*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ var Ht; function Gr() { return Ht || (Ht = 1, function(r) { (function() { var e = {}.hasOwnProperty; function t() { for (var s = "", i = 0; i < arguments.length; i++) { var a = arguments[i]; a && (s = o(s, n(a))); } return s; } function n(s) { if (typeof s == "string" || typeof s == "number") return s; if (typeof s != "object") return ""; if (Array.isArray(s)) return t.apply(null, s); if (s.toString !== Object.prototype.toString && !s.toString.toString().includes("[native code]")) return s.toString(); var i = ""; for (var a in s) e.call(s, a) && s[a] && (i = o(i, a)); return i; } function o(s, i) { return i ? s ? s + " " + i : s + i : s; } r.exports ? (t.default = t, r.exports = t) : window.classNames = t; })(); }(ot)), ot.exports; } var Wr = Gr(); const ee = /* @__PURE__ */ Ee(Wr), Fr = "_link_12aao_1", Yr = { link: Fr }, lr = ({ href: r, text: e, className: t, ...n }) => { const { textColour: o } = oe(); return /* @__PURE__ */ h.jsx( "a", { href: r, target: "_blank", rel: "noopener noreferrer", style: { color: o }, className: ee(Yr.link, t), ...n, children: e } ); }, Ur = (r) => /* @__PURE__ */ F.createElement("svg", { fill: "currentColor", viewBox: "0 0 512 512", xmlns: "http://www.w3.org/2000/svg", ...r }, /* @__PURE__ */ F.createElement("title", null, "ionicons-v5-d"), /* @__PURE__ */ F.createElement("path", { d: "M416,160a64,64,0,1,0-96.27,55.24c-2.29,29.08-20.08,37-75,48.42-17.76,3.68-35.93,7.45-52.71,13.93V151.39a64,64,0,1,0-64,0V360.61a64,64,0,1,0,64.42.24c2.39-18,16-24.33,65.26-34.52,27.43-5.67,55.78-11.54,79.78-26.95,29-18.58,44.53-46.78,46.36-83.89A64,64,0,0,0,416,160ZM160,64a32,32,0,1,1-32,32A32,32,0,0,1,160,64Zm0,384a32,32,0,1,1,32-32A32,32,0,0,1,160,448ZM352,192a32,32,0,1,1,32-32A32,32,0,0,1,352,192Z" })), qr = "_icon_1i1k4_1", Zr = { icon: qr }, Vt = ({ className: r, ...e }) => { const { textColour: t } = oe(); return /* @__PURE__ */ h.jsx( Ur, { ...e, id: "branch-icon", "data-testid": "branch-icon", style: { fill: t }, className: ee(Zr.icon, r) } ); }, Xr = ({ commit: r }) => { const { remoteProviderUrlBuilder: e } = Q(), t = ar(r.branch), n = H(() => { const o = e?.({ commit: r }).branch; if (o) return o; }, [r, e]); return n ? /* @__PURE__ */ h.jsxs(h.Fragment, { children: [ /* @__PURE__ */ h.jsx( lr, { href: n, text: t, className: Fe.branchName } ), /* @__PURE__ */ h.jsx( Vt, { className: Fe.icon } ) ] }) : /* @__PURE__ */ h.jsxs(h.Fragment, { children: [ /* @__PURE__ */ h.jsx("span", { className: Fe.branchName, children: t }), /* @__PURE__ */ h.jsx( Vt, { className: Fe.icon } ) ] }); }, Qr = "_tagName_hkrka_1", It = { tagName: Qr }, Jr = (r) => /* @__PURE__ */ F.createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", className: "feather feather-tag", ...r }, /* @__PURE__ */ F.createElement("path", { d: "M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z" }), /* @__PURE__ */ F.createElement("line", { x1: 7, y1: 7, x2: 7.01, y2: 7 })), Kr = "_icon_1is4o_1", en = { icon: Kr }, At = ({ className: r }) => { const { textColour: e } = oe(); return /* @__PURE__ */ h.jsx( Jr, { id: "tag-icon", "data-testid": "tag-icon", style: { stroke: e }, className: ee(en.icon, r) } ); }, tn = ({ commit: r }) => { const { remoteProviderUrlBuilder: e } = Q(), t = ar(r.branch), n = H(() => { if (e) return e({ commit: r }).branch; }, [r, e]); return n ? /* @__PURE__ */ h.jsxs(h.Fragment, { children: [ /* @__PURE__ */ h.jsx( lr, { href: n, text: t, className: It.tagName } ), /* @__PURE__ */ h.jsx(At, {}) ] }) : /* @__PURE__ */ h.jsxs(h.Fragment, { children: [ /* @__PURE__ */ h.jsx("span", { className: It.tagName, children: t }), /* @__PURE__ */ h.jsx(At, {}) ] }); }, Gt = {}, rn = "_icon_zawmh_1", nn = { icon: rn }, on = (r) => /* @__PURE__ */ F.createElement("svg", { viewBox: "0 0 256 256", xmlns: "http://www.w3.org/2000/svg", preserveAspectRatio: "xMinYMin meet", ...r }, /* @__PURE__ */ F.createElement("path", { d: "M251.172 116.594L139.4 4.828c-6.433-6.437-16.873-6.437-23.314 0l-23.21 23.21 29.443 29.443c6.842-2.312 14.688-.761 20.142 4.693 5.48 5.489 7.02 13.402 4.652 20.266l28.375 28.376c6.865-2.365 14.786-.835 20.269 4.657 7.663 7.66 7.663 20.075 0 27.74-7.665 7.666-20.08 7.666-27.749 0-5.764-5.77-7.188-14.235-4.27-21.336l-26.462-26.462-.003 69.637a19.82 19.82 0 0 1 5.188 3.71c7.663 7.66 7.663 20.076 0 27.747-7.665 7.662-20.086 7.662-27.74 0-7.663-7.671-7.663-20.086 0-27.746a19.654 19.654 0 0 1 6.421-4.281V94.196a19.378 19.378 0 0 1-6.421-4.281c-5.806-5.798-7.202-14.317-4.227-21.446L81.47 39.442l-76.64 76.635c-6.44 6.443-6.44 16.884 0 23.322l111.774 111.768c6.435 6.438 16.873 6.438 23.316 0l111.251-111.249c6.438-6.44 6.438-16.887 0-23.324" })), sn = ({ className: r }) => { const { textColour: e, shiftAlphaChannel: t } = oe(); return /* @__PURE__ */ h.jsx( on, { id: "git-icon", "data-testid": "git-icon", style: { fill: t(e, 0.8) }, className: ee(nn.icon, r) } ); }, an = () => /* @__PURE__ */ h.jsxs(h.Fragment, { children: [ /* @__PURE__ */ h.jsx("span", { className: Gt.indexLabel, children: "index" }), /* @__PURE__ */ h.jsx(sn, { className: Gt.icon }) ] }), ln = ({ id: r, commit: e, height: t, lineRight: n, lineWidth: o }) => { const { textColour: s, shiftAlphaChannel: i, getCommitColour: a } = oe(), { selectedCommit: l, previewedCommit: c, enablePreviewedCommitStyling: d, enableSelectedCommitStyling: g } = Q(), u = a(e), [f, v] = Ce(!1), p = J(() => { v(!0); }, []), w = J(() => { v(!1); }, []), b = H(() => { const T = e.hash === c?.hash && d; return { opacity: e.hash === l?.hash && g ? 1 : T ? 0.8 : 0.4, right: n, width: o, borderTop: `2px dotted ${u}`, animationDuration: T ? "0s" : "0.3s" }; }, [u, e.hash, d, g, n, o, c?.hash, l?.hash]), R = H(() => e.hash === "index" ? { color: s, border: `2px dashed ${i(u, 0.5)}`, background: i(u, 0.05) } : { color: s, border: `2px solid ${u}`, background: i(u, 0.3) }, [u, e.hash, i, s]), N = H(() => e.hash === "index" ? /* @__PURE__ */ h.jsx(an, {}) : e.branch.includes("tags/") ? /* @__PURE__ */ h.jsx(tn, { commit: e }) : /* @__PURE__ */ h.jsx(Xr, { commit: e }), [e]), j = J(({ position: T, childRect: B, popoverRect: O }) => /* @__PURE__ */ h.jsx( Qe.ArrowContainer, { arrowSize: 6, position: T, childRect: B, arrowColor: u, popoverRect: O, children: /* @__PURE__ */ h.jsx( Nr, { id: r, commit: e } ) } ), [u, e, r]); return /* @__PURE__ */ h.jsx( Qe.Popover, { positions: "right", isOpen: f, content: j, containerStyle: { zIndex: "20" }, children: /* @__PURE__ */ h.jsxs( "button", { id: `tag-${r}`, style: { height: t }, "data-testid": `tag-${r}`, onBlur: w, onFocus: p, onMouseOut: w, onMouseOver: p, className: nt.tagContainer, children: [ /* @__PURE__ */ h.jsx( "span", { id: `tag-label-${r}`, className: nt.tag, "data-testid": `tag-label-${r}`, style: R, children: N }, `tag-label-${r}` ), /* @__PURE__ */ h.jsx( "span", { style: b, id: `tag-line-${r}`, className: nt.tagLine, "data-testid": `tag-line-${r}` }, `tag-line-${e.branch}` ) ] } ) } ); }, cn = (r) => { const e = /* @__PURE__ */ new Map(); return r.map((t) => { const n = t.branch.includes("tags/"), o = e.has(t.branch), s = n && !o; return s && e.set(t.branch, !0), { ...t, isMostRecentTagInstance: s }; }); }, pt = () => { const { previewedCommit: r, selectedCommit: e, indexCommit: t, graphData: n, paging: o, graphWidth: s, rowSpacing: i, isIndexVisible: a, graphOrientation: l, filter: c } = Q(), d = H(() => { let u = n.commits.slice(o?.startIndex, o?.endIndex); return c && (u = c(u)), a && t && u.unshift(t), cn(u); }, [n.commits, o?.startIndex, o?.endIndex, c, a, t]), g = J((u) => { const f = l === "normal", v = n.graphWidth, p = s / v; if (u.hash === "index") return f ? p / 2 : (v - 1) * p + p / 2; const w = n.positions.get(u.hash)[1], b = f ? w : v - 1 - w; return p * b + p / 2; }, [s, n.graphWidth, n.positions, l]); return /* @__PURE__ */ h.jsx("div", { className: Rt.container, children: d.map((u, f) => { const v = r && u.hash === r.hash, p = e && u.hash === e.hash, w = u.hash === t?.hash; return u.isBranchTip || v || p || u.isMostRecentTagInstance || w ? /* @__PURE__ */ h.jsx( ln, { commit: u, id: f.toString(), height: re + i, lineWidth: g(u), lineRight: -g(u) }, `tag-${u.hash}` ) : /* @__PURE__ */ h.jsx( "div", { className: Rt.tag, "data-testid": `empty-tag-${f}`, id: `empty-tag-${u.hash}`, style: { height: re + i } }, `empty-tag-${u.hash}` ); }) }); }, un = "_container_1idpe_1", hn = "_graph_1idpe_5", dn = "_dragHandle_1idpe_12", ht = { container: un, graph: hn, dragHandle: dn }; class mn { _columns; _sourceColumn; _targetColumn; _currentRow; _targetRow; _rerouted; constructor(e) { this._columns = e.columns, this._sourceColumn = e.sourceColumn, this._targetColumn = e.targetColumn, this._rerouted = e.rerouted, this._currentRow = e.currentRow, this._targetRow = e.targetRow; } drawLeftHorizontalLineAndCurve() { const e = []; this._columns.update(this._sourceColumn, { isLeftUpCurve: !0 }), this._rerouted && e.push({ location: [this._currentRow, this._sourceColumn], position: "top", check: (t) => !t.hasCommitNodeAt( this._currentRow - 1, this._sourceColumn ) }); for (let t = this._sourceColumn - 1; t >= this._targetColumn; t--) this._columns.update(t, { isHorizontalLine: !0, mergeSourceColumns: [ ...this._columns.columns[t]?.mergeSourceColumns ?? [], this._sourceColumn ] }); return { breakPointChecks: e }; } drawRightHorizontalLineAndCurve() { for (let n = this._sourceColumn; n < this._targetColumn; n++) this._columns.update(n, { isHorizontalLine: !0, mergeSourceColumns: [ ...this._columns.columns[n]?.mergeSourceColumns ?? [], this._targetColumn ] }); const e = this._currentRow === this._targetRow, t = this._rerouted && e && this._columns.hasCommitNode(this._sourceColumn); this._columns.update(this._targetColumn, { isLeftDownCurve: !0, isBottomBreakPoint: t }); } } class fn { _matrix; _columnBreakPointChecks = []; constructor(e) { this._matrix = e; } drawEdge(e, t, n) { const [o, s] = e, [i, a] = t; s === a ? this.drawCommitEdges(o, i, s, n) : this.drawBranchingAndMergingEdges(e, t, n); } drawCommitEdges(e, t, n, o) { for (let s = e; s <= t; s++) { const i = this._matrix.getColumns(s), a = s === t - 1 && o; i.update(n, { isVerticalLine: !0, isBottomBreakPoint: a }), this._matrix.setColumns(s, i); } } drawBranchingAndMergingEdges(e, t, n) { const [o, s] = e, [i, a] = t; for (let l = o; l <= i; l++) { const c = this._matrix.getColumns(l), d = new mn({ columns: c, rerouted: n, currentRow: l, targetRow: i, targetColumn: a, sourceColumn: s }), g = i > o, u = a < s; if (g && u) if (l === o) c.update(s, { isVerticalLine: !0 }); else if (l === i) { const { breakPointChecks: v } = d.drawLeftHorizontalLineAndCurve(); this._columnBreakPointChecks.push(...v); } else c.update(s, { isVerticalLine: !0, isBottomBreakPoint: n && l === i - 1 }); else l === o ? d.drawRightHorizontalLineAndCurve() : c.update(a, { isVerticalLine: !0, isBottomBreakPoint: n && l === i - 1 }); this._matrix.setColumns(l, c); } } get columnBreakPointChecks() { return this._columnBreakPointChecks; } } const gn = [ "isFirstRow", "isLastRow" ], dt = (r) => r ? Object.entries(r).filter(([e]) => !gn.includes(e)).every(([, e]) => !e) : !0, vt = ({ columns: r }) => new Array(r).fill({}); class Ct { _columns; constructor(e) { this._columns = e; } static empty(e) { return new Ct(vt({ columns: e })); } update(e, t) { this._columns[e] = { ...this._columns[e], ...t }; } hasCommitNode(e) { return this._columns[e].isNode; } get columns() { return this._columns; } get length() { return this._columns.length; } } class pn { _matrix = /* @__PURE__ */ n