@gitkraken/gitkraken-components 13.0.0-vnext.19 → 13.0.0-vnext.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/graph/GraphColumn.d.ts +2 -2
- package/dist/components/graph/GraphContainer.d.ts +145 -18
- package/dist/components/graph/refzone/RefNode.d.ts +1 -0
- package/dist/components/graph/refzone/RefNodes.d.ts +2 -1
- package/dist/components/graph/refzone/RefZone.d.ts +1 -0
- package/dist/components/graph/rowAdornment/RowAdornmentLayer.d.ts +52 -0
- package/dist/components/graph/rowAdornment/RowAdornmentOverlay.d.ts +19 -0
- package/dist/components/graph/rowRenderers/RefZoneRow.d.ts +1 -0
- package/dist/domain/generic/GenericTypes.d.ts +2 -0
- package/dist/domain/graph/GraphHelpers.d.ts +1 -1
- package/dist/domain/graph/GraphTypes.d.ts +8 -1
- package/dist/domain/graph/rowAdornment/RowAdornmentTypes.d.ts +97 -0
- package/dist/domain/reactvirtualized/ReactVirtualizedHelpers.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +7 -7
- package/dist/styles.css +1 -1
- package/dist/types.d.ts +1 -0
- package/package.json +17 -11
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
let e;import*as t from"react";import{default as o,findDOMNode as r,flushSync as i}from"react-dom";var n,s,l,a,h,c,d,u,p,f,m,g,v,y,S,w,C,b,R,_,T,x,E,M,I,O,z,D,k,G={20:()=>{},43:(e,t,o)=>{var r=o(201),i=o(842);e.exports=function(e,t){var o=t||{},n={};return void 0===e&&(e={}),e.on=function(t,o){return n[t]?n[t].push(o):n[t]=[o],e},e.once=function(t,o){return o._once=!0,e.on(t,o),e},e.off=function(t,o){var r=arguments.length;if(1===r)delete n[t];else if(0===r)n={};else{var i=n[t];if(!i)return e;i.splice(i.indexOf(o),1)}return e},e.emit=function(){var t=r(arguments);return e.emitterSnapshot(t.shift()).apply(this,t)},e.emitterSnapshot=function(t){var s=(n[t]||[]).slice(0);return function(){var n=r(arguments),l=this||e;if("error"===t&&!1!==o.throws&&!s.length)throw 1===n.length?n[0]:n;return s.forEach(function(r){o.async?i(r,n,l):r.apply(l,n),r._once&&e.off(t,r)}),e}},e}},81:(e,t,o)=>{var r=o(43),i=o(513),n=o(579),s=document,l=s.documentElement;function a(e,t,r,n){o.g.navigator.pointerEnabled?i[t](e,{mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"}[r],n):o.g.navigator.msPointerEnabled?i[t](e,{mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"}[r],n):(i[t](e,{mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"}[r],n),i[t](e,r,n))}function h(e){if(void 0!==e.touches)return e.touches.length;if(void 0!==e.which&&0!==e.which)return e.which;if(void 0!==e.buttons)return e.buttons;var t=e.button;if(void 0!==t)return 1&t?1:2&t?3:4&t?2:0}function c(e,t){return void 0!==o.g[t]?o.g[t]:l.clientHeight?l[e]:s.body[e]}function d(e,t,o){var r,i=e||{},n=i.className;return i.className+=" gu-hide",r=s.elementFromPoint(t,o),i.className=n,r}function u(){return!1}function p(){return!0}function f(e){return e.width||e.right-e.left}function m(e){return e.height||e.bottom-e.top}function g(e){return e.parentNode===s?null:e.parentNode}function v(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||"SELECT"===e.tagName||function e(t){return!!t&&"false"!==t.contentEditable&&("true"===t.contentEditable||e(g(t)))}(e)}function y(e){return e.nextElementSibling||function(){var t=e;do t=t.nextSibling;while(t&&1!==t.nodeType)return t}()}function S(e,t){var o=t.targetTouches&&t.targetTouches.length?t.targetTouches[0]:t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,r={pageX:"clientX",pageY:"clientY"};return e in r&&!(e in o)&&r[e]in o&&(e=r[e]),o[e]}e.exports=function(e,t){var o,w,C,b,R,_,T,x,E,M,I,O,z=arguments.length;1===z&&!1===Array.isArray(e)&&(t=e,e=[]);var D=null,k=t||{};void 0===k.moves&&(k.moves=p),void 0===k.accepts&&(k.accepts=p),void 0===k.invalid&&(k.invalid=function(){return!1}),void 0===k.containers&&(k.containers=e||[]),void 0===k.isContainer&&(k.isContainer=u),void 0===k.copy&&(k.copy=!1),void 0===k.copySortSource&&(k.copySortSource=!1),void 0===k.revertOnSpill&&(k.revertOnSpill=!1),void 0===k.removeOnSpill&&(k.removeOnSpill=!1),void 0===k.direction&&(k.direction="vertical"),void 0===k.ignoreInputTextSelection&&(k.ignoreInputTextSelection=!0),void 0===k.mirrorContainer&&(k.mirrorContainer=s.body);var G=r({containers:k.containers,start:function(e){var t=B(e);t&&U(t)},end:Z,cancel:Y,remove:K,destroy:function(){A(!0),$({})},canMove:function(e){return!!B(e)},dragging:!1});return!0===k.removeOnSpill&&G.on("over",function(e){n.rm(e,"gu-hide")}).on("out",function(e){G.dragging&&n.add(e,"gu-hide")}),A(),G;function N(e){return -1!==G.containers.indexOf(e)||k.isContainer(e)}function A(e){var t=e?"remove":"add";a(l,t,"mousedown",P),a(l,t,"mouseup",$)}function W(e){a(l,e?"remove":"add","mousemove",F)}function H(e){var t=e?"remove":"add";i[t](l,"selectstart",L),i[t](l,"click",L)}function L(e){O&&e.preventDefault()}function P(e){if(_=e.clientX,T=e.clientY,1===h(e)&&!e.metaKey&&!e.ctrlKey){var t=e.target,o=B(t);o&&(O=o,W(),"mousedown"===e.type&&(v(t)?t.focus():e.preventDefault()))}}function F(e){if(O){if(0===h(e))return void $({});if(void 0===e.clientX||e.clientX!==_||void 0===e.clientY||e.clientY!==T){if(k.ignoreInputTextSelection){var t,r=S("clientX",e),i=S("clientY",e);if(v(s.elementFromPoint(r,i)))return}var d=O;W(!0),H(),Z(),U(d);var u={left:(t=C.getBoundingClientRect()).left+c("scrollLeft","pageXOffset"),top:t.top+c("scrollTop","pageYOffset")};b=S("pageX",e)-u.left,R=S("pageY",e)-u.top,n.add(M||C,"gu-transit"),function(){if(!o){var e=C.getBoundingClientRect();(o=C.cloneNode(!0)).style.width=f(e)+"px",o.style.height=m(e)+"px",n.rm(o,"gu-transit"),n.add(o,"gu-mirror"),k.mirrorContainer.appendChild(o),a(l,"add","mousemove",Q),n.add(k.mirrorContainer,"gu-unselectable"),G.emit("cloned",o,C,"mirror")}}(),Q(e)}}}function B(e){if(!(G.dragging&&o||N(e))){for(var t=e;g(e)&&!1===N(g(e));)if(k.invalid(e,t)||!(e=g(e)))return;var r=g(e);if(!(!r||k.invalid(e,t))&&k.moves(e,r,t,y(e)))return{item:e,source:r}}}function U(e){var t,o;t=e.item,o=e.source,("boolean"==typeof k.copy?k.copy:k.copy(t,o))&&(M=e.item.cloneNode(!0),G.emit("cloned",M,e.item,"copy")),w=e.source,C=e.item,x=E=y(e.item),G.dragging=!0,G.emit("drag",C,w)}function Z(){if(G.dragging){var e=M||C;V(e,g(e))}}function j(){O=!1,W(!0),H(!0)}function $(e){if(j(),G.dragging){var t=M||C,r=S("clientX",e),i=S("clientY",e),n=J(d(o,r,i),r,i);n&&(M&&k.copySortSource||!M||n!==w)?V(t,n):k.removeOnSpill?K():Y()}}function V(e,t){var o=g(e);M&&k.copySortSource&&t===w&&o.removeChild(C),X(t)?G.emit("cancel",e,w,w):G.emit("drop",e,t,w,E),q()}function K(){if(G.dragging){var e=M||C,t=g(e);t&&t.removeChild(e),G.emit(M?"cancel":"remove",e,t,w),q()}}function Y(e){if(G.dragging){var t=arguments.length>0?e:k.revertOnSpill,o=M||C,r=g(o),i=X(r);!1===i&&t&&(M?r&&r.removeChild(M):w.insertBefore(o,x)),i||t?G.emit("cancel",o,w,w):G.emit("drop",o,r,w,E),q()}}function q(){var e=M||C;j(),o&&(n.rm(k.mirrorContainer,"gu-unselectable"),a(l,"remove","mousemove",Q),g(o).removeChild(o),o=null),e&&n.rm(e,"gu-transit"),I&&clearTimeout(I),G.dragging=!1,D&&G.emit("out",e,D,w),G.emit("dragend",e),w=C=M=x=E=I=D=null}function X(e,t){var r;return r=void 0!==t?t:o?E:y(M||C),e===w&&r===x}function J(e,t,o){for(var r=e;r&&!function(){if(!1===N(r))return!1;var i=ee(r,e),n=et(r,i,t,o);return!!X(r,n)||k.accepts(C,r,w,n)}();)r=g(r);return r}function Q(e){if(o){e.preventDefault();var t,r=S("clientX",e),i=S("clientY",e),n=r-b,s=i-R;o.style.left=n+"px",o.style.top=s+"px";var l=M||C,a=d(o,r,i),h=J(a,r,i),c=null!==h&&h!==D;(c||null===h)&&(D&&f("out"),D=h,c&&f("over"));var u=g(l);if(h===w&&M&&!k.copySortSource){u&&u.removeChild(l);return}var p=ee(h,a);if(null!==p)t=et(h,p,r,i);else if(!0!==k.revertOnSpill||M){M&&u&&u.removeChild(l);return}else t=x,h=w;(null===t&&c||t!==l&&t!==y(l))&&(E=t,h.insertBefore(l,t),G.emit("shadow",l,h,w))}function f(e){G.emit(e,l,D,w)}}function ee(e,t){for(var o=t;o!==e&&g(o)!==e;)o=g(o);return o===l?null:o}function et(e,t,o,r){var i,n="horizontal"===k.direction;return t!==e?(i=t.getBoundingClientRect(),n?o>i.left+f(i)/2?y(t):t:r>i.top+m(i)/2?y(t):t):function(){var t,i,s,l=e.children.length;for(t=0;t<l;t++)if(s=(i=e.children[t]).getBoundingClientRect(),n&&s.left+s.width/2>o||!n&&s.top+s.height/2>r)return i;return null}()}}},95:(e,t)=>{var o=Symbol.for("react.transitional.element");function r(e,t,r){var i=null;if(void 0!==r&&(i=""+r),void 0!==t.key&&(i=""+t.key),"key"in t)for(var n in r={},t)"key"!==n&&(r[n]=t[n]);else r=t;return{$$typeof:o,type:e,key:i,ref:void 0!==(t=r.ref)?t:null,props:r}}t.Fragment=Symbol.for("react.fragment"),t.jsx=r,t.jsxs=r},175:(e,t,o)=>{var r=o(81),i=o(201);e.exports=function(){return r.apply(this,i(arguments)).on("cloned",function(t){e(t),i(t.getElementsByTagName("*")).forEach(e)});function e(e){e.removeAttribute("data-reactid")}}},182:()=>{},186:(e,t,o)=>{var r=o(985);function i(){}function n(){}n.resetWarningCache=i,e.exports=function(){function e(e,t,o,i,n,s){if(s!==r){var l=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var o={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:n,resetWarningCache:i};return o.PropTypes=o,o}},201:e=>{e.exports=function(e,t){return Array.prototype.slice.call(e,t)}},212:()=>{},242:()=>{},259:(e,t,o)=>{e.exports=o(95)},261:(e,t,o)=>{var r=o(641).__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;t.c=function(e){return r.H.useMemoCache(e)}},292:e=>{e.exports="function"==typeof setImmediate?function(e){setImmediate(e)}:function(e){setTimeout(e,0)}},315:(e,t,o)=>{e.exports=o(261)},326:(e,t,o)=>{var r=o.g.CustomEvent;e.exports=!function(){try{var e=new r("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch{}return!1}()?"function"==typeof document.createEvent?function(e,t){var o=document.createEvent("CustomEvent");return t?o.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):o.initCustomEvent(e,!1,!1,void 0),o}:function(e,t){var o=document.createEventObject();return o.type=e,t?(o.bubbles=!!t.bubbles,o.cancelable=!!t.cancelable,o.detail=t.detail):(o.bubbles=!1,o.cancelable=!1,o.detail=void 0),o}:r},386:(e,t,o)=>{var r=[],i="",n=/^on/;for(i in o.g)n.test(i)&&r.push(i.slice(2));e.exports=r},414:()=>{},458:()=>{},500:(e,t)=>{var o,r={}.hasOwnProperty;function i(){for(var e="",t=0;t<arguments.length;t++){var o=arguments[t];o&&(e=n(e,function(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return i.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var o in e)r.call(e,o)&&e[o]&&(t=n(t,o));return t}(o)))}return e}function n(e,t){return t?e?e+" "+t:e+t:e}e.exports?(i.default=i,e.exports=i):void 0===(o=(function(){return i}).apply(t,[]))||(e.exports=o)},513:(e,t,o)=>{var r=o(326),i=o(386),n=o.g.document,s=function(e,t,o,r){return e.addEventListener(t,o,r)},l=function(e,t,o,r){return e.removeEventListener(t,o,r)},a=[];function h(e,t,o){var r=function(e,t,o){var r,i;for(r=0;r<a.length;r++)if((i=a[r]).element===e&&i.type===t&&i.fn===o)return r}(e,t,o);if(r){var i=a[r].wrapper;return a.splice(r,1),i}}o.g.addEventListener||(s=function(e,t,r){return e.attachEvent("on"+t,function(e,t,r){var i=h(e,t,r)||function(t){var i=t||o.g.event;i.target=i.target||i.srcElement,i.preventDefault=i.preventDefault||function(){i.returnValue=!1},i.stopPropagation=i.stopPropagation||function(){i.cancelBubble=!0},i.which=i.which||i.keyCode,r.call(e,i)};return a.push({wrapper:i,element:e,type:t,fn:r}),i}(e,t,r))},l=function(e,t,o){var r=h(e,t,o);if(r)return e.detachEvent("on"+t,r)}),e.exports={add:s,remove:l,fabricate:function(e,t,o){var s,l=-1===i.indexOf(t)?new r(t,{detail:o}):(n.createEvent?(s=n.createEvent("Event")).initEvent(t,!0,!0):n.createEventObject&&(s=n.createEventObject()),s);e.dispatchEvent?e.dispatchEvent(l):e.fireEvent("on"+t,l)}}},579:e=>{var t={};function o(e){var o=t[e];return o?o.lastIndex=0:t[e]=o=RegExp("(?:^|\\s)"+e+"(?:\\s|$)","g"),o}e.exports={add:function(e,t){var r=e.className;r.length?o(t).test(r)||(e.className+=" "+t):e.className=t},rm:function(e,t){e.className=e.className.replace(o(t)," ").trim()}}},597:e=>{e.exports=function(e,t,o,r,i,n,s,l){if(!e){var a;if(void 0===t)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var h=[o,r,i,n,s,l],c=0;(a=Error(t.replace(/%s/g,function(){return h[c++]}))).name="Invariant Violation"}throw a.framesToPop=1,a}}},641:(e,o,r)=>{var i;i={},r.d(i,{Children:()=>t.Children,Component:()=>t.Component,Fragment:()=>t.Fragment,PureComponent:()=>t.PureComponent,__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE:()=>t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,cloneElement:()=>t.cloneElement,createContext:()=>t.createContext,createElement:()=>t.createElement,createRef:()=>t.createRef,default:()=>t.default,forwardRef:()=>t.forwardRef,isValidElement:()=>t.isValidElement,memo:()=>t.memo,useCallback:()=>t.useCallback,useContext:()=>t.useContext,useEffect:()=>t.useEffect,useId:()=>t.useId,useLayoutEffect:()=>t.useLayoutEffect,useMemo:()=>t.useMemo,useRef:()=>t.useRef,useState:()=>t.useState,version:()=>t.version}),e.exports=i},730:e=>{e.exports=function(){}},736:(e,t,o)=>{e.exports=o(186)()},842:(e,t,o)=>{var r=o(292);e.exports=function(e,t,o){e&&r(function(){e.apply(o||null,t||[])})}},985:e=>{e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},N={};function A(e){var t=N[e];if(void 0!==t)return t.exports;var o=N[e]={exports:{}};return G[e](o,o.exports,A),o.exports}A.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return A.d(t,{a:t}),t},A.d=(e,t)=>{for(var o in t)A.o(t,o)&&!A.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},A.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch{if("object"==typeof window)return window}}(),A.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),A.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var W={};A.r(W),A.d(W,{g:()=>lC});var H=A(500),L=A.n(H),P=A(641);class F{name;notify;constructor(e,t){this.name=e,this.notify=t}}class B{observer;unsubscribeCallback;constructor(e,t){this.observer=e,this.unsubscribeCallback=t}unsubscribe(){this.unsubscribeCallback(this.observer)}}let U=new class{observers;constructor(){this.observers=new Set}broadcast(e){this.observers&&this.observers.forEach(t=>{e.name===t.name&&t.notify(e)})}subscribe(e,t){let o=new F(e,t);return this.observers.add(o),new B(o,e=>{this.observers.delete(e)})}unsubscribe(e){e&&e.unsubscribe()}},Z="ON_DRAG_START",j="ON_DRAG_END",$=null,V=new Map;class K extends P.Component{dndComponentRef=P.createRef();mounted=!1;onDragStartSubscription;onDragEndSubscription;constructor(e){super(e),this.onDragStartSubscription=U.subscribe(Z,e=>{let t=null!==e.content&&V.get(e.content);this.setState({isDroppable:this.canDrop(void 0,t,this.props.dndData)})}),this.onDragEndSubscription=U.subscribe(j,()=>{this.mounted&&this.setState({isDroppable:!1})}),this.state={isDragging:!1,isDroppable:!1,isOver:!1}}componentDidMount(){if(this.mounted=!0,null!==$){let e=V.get($);this.setState({isDroppable:this.canDrop(void 0,e,this.props.dndData)})}}componentWillUnmount(){this.mounted=!1,this.onDragStartSubscription.unsubscribe(),this.onDragEndSubscription.unsubscribe()}canDrop(e,t,o){let{canDrop:r}=this.props;return r&&("boolean"==typeof r||r(e,t,o))}addDragEndEventListenerOnce(){let e=this.dndComponentRef?.current;e&&(e.removeEventListener("dragend",this.onDragEnd),e.addEventListener("dragend",this.onDragEnd,{once:!0}))}isDraggable(){let{canDrag:e,dndData:t}=this.props;return!!e&&("boolean"==typeof e||e(t))}onDragEnter(e){if(e.stopPropagation(),this.setState({isOver:!0}),this.props.onDragEnter){let t=V.get($);this.props.onDragEnter(e,t,this.props.dndData)}}onDragLeave(e){e.stopPropagation();let t=V.get($);this.props.onDragLeave&&this.props.onDragLeave(e,t,this.props.dndData),this.setState({isDroppable:this.canDrop(void 0,t,this.props.dndData),isOver:!1})}onDrag(e){e.stopPropagation()}onDragOver(e){e.stopPropagation();let t=V.get($);this.canDrop(e,t,this.props.dndData)&&(e.preventDefault(),this.setState({isOver:!0}))}onDragStart(e){e.stopPropagation();let{dndData:t,dndId:o,onBeginDrag:r}=this.props;$=o,V.set($,t),this.addDragEndEventListenerOnce(),U.broadcast({name:Z,content:$}),r&&r(e,t),this.setState({isDragging:!0})}onDragEnd=e=>{e.stopPropagation();let{dndData:t,onEndDrag:o}=this.props;o&&o(e,V.get($),t),U.broadcast({name:j,content:$}),V.delete($),$=null,this.mounted&&this.setState({isDragging:!1})};onDrop(e){e.stopPropagation();let{dndData:t,onDrop:o}=this.props;o&&(o(e,V.get($),t),this.setState({isOver:!1}))}cloneChildrenWithShallowMergedProps(e,t){if(e)return P.Children.map(e,e=>P.isValidElement(e)?P.cloneElement(e,t):e)}render(){let{children:e,className:t,forwardDndPropsToChildren:o,style:r}=this.props,{isDragging:i,isDroppable:n,isOver:s}=this.state,l=this.isDraggable(),a=L()("dnd-component",t,{draggable:l,dragging:i,droppable:n,hovering:s});return P.createElement("div",{className:a,draggable:l,onDrag:e=>this.onDrag(e),onDragEnter:e=>this.onDragEnter(e),onDragLeave:e=>this.onDragLeave(e),onDragOver:e=>this.onDragOver(e),onDragStart:e=>this.onDragStart(e),onDrop:e=>this.onDrop(e),ref:this.dndComponentRef,style:r},o?this.cloneChildrenWithShallowMergedProps(e,{isDraggable:l,isDragging:i,isDroppable:n,isOver:s}):e)}}var Y=K;function q(e,t,o){return(e=e<=o?e:o)>=t?e:t}function X(e){for(let t in e)if(Object.hasOwn(e,t))return!0;return!1}function J(e,t,o=1){let r=0;for(let i in e)if(Object.hasOwn(e,i)&&t(e[i])&&++r>=o)return!0;return r>=o}let Q="commit-node",ee="merge-conflict-node",et="merge-node",eo="unsupported-rebase-warning-node",er="stash-node",ei="work-dir-changes";var en=((n=en||{}).RowEntry="rowEntry",n.Tooltip="tooltip",n);let es="--num-columns-supported",el={"--graph-row-height":"22px","--font-default":"'Open Sans', Arial, sans-serif !important","--font-monospace":"'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace","--font-size":"62.5%","--fs-1":"1rem","--fs-2":"1.2rem","--fs-3":"1.4rem","--fs-4":"1.6rem","--fs-5":"1.8rem","--fs-6":"2rem","--fs-7":"2.4rem","--button-xs-padding-y":".15rem","--button-xs-padding-x":".25rem","--button-small-padding-y":".25rem","--button-small-padding-x":".5rem","--button-medium-padding-y":".5rem","--button-medium-padding-x":".75rem","--button-large-padding-y":"1rem","--button-large-padding-x":"1.25rem","--button-radius":".2rem","--input-radius":"3px","--about-modal-bg-color":"#e2e4e9","--about-modal-width":"650px","--label__purple-color-f25":"rgba(197,23,182,0.25)","--registration-modal-width":"400px","--file-history-header-height":"35px","--shop-modal-width":"95vw","--shop-modal-height":"95vh","--scrollable-scrollbar-thickness":"14px","--mini-commit-col-left-width":"30px","--mini-commit-col-middle-padding":"6px","--mini-commit-col-right-width":"56px","--fuzzy-finder-repo-color":"rgba(46,206,157,0.1)","--fuzzy-finder-checkout-color":"rgba(6,105,247,0.1)","--fuzzy-finder-history-color":"rgba(197,23,182,0.1)","--handle-width":"7px","--shadow-color":"rgba(0,0,0,0.4)","--graph-color-5-f10":"rgba(205,1,1,0.1)","--graph-color-6-f10":"rgba(242,93,46,0.1)","--graph-color-7-f10":"rgba(242,202,51,0.1)","--graph-color-8-f10":"rgba(123,217,56,0.1)","--graph-color-9-f10":"rgba(46,206,157,0.1)","--graph-color-0-f10":"rgba(21,160,191,0.1)","--graph-color-1-f10":"rgba(6,105,247,0.1)","--graph-color-2-f10":"rgba(142,0,194,0.1)","--graph-color-3-f10":"rgba(197,23,182,0.1)","--graph-color-4-f10":"rgba(217,1,113,0.1)","--graph-color-5-f50":"rgba(205,1,1,0.5)","--graph-color-6-f50":"rgba(242,93,46,0.5)","--graph-color-7-f50":"rgba(242,202,51,0.5)","--graph-color-8-f50":"rgba(123,217,56,0.5)","--graph-color-9-f50":"rgba(46,206,157,0.5)","--graph-color-0-f50":"rgba(21,160,191,0.5)","--graph-color-1-f50":"rgba(6,105,247,0.5)","--graph-color-2-f50":"rgba(142,0,194,0.5)","--graph-color-3-f50":"rgba(197,23,182,0.5)","--graph-color-4-f50":"rgba(217,1,113,0.5)","--axo-orange":"#e75225","--axo-ink":"#141422","--axo-cream":"#f9efc1","--axo-yellow":"#d8c13a","--info-bar-height":"26px","--left-panel-header-height":"60px","--toolbar-height":"48px","--toolbar-border":"1px","--toolbar-item-height":"calc(var(--toolbar-height, 0px) - var(--toolbar-border, 1px))","--expand-detail-panel-transition":"flex-grow 250ms ease-in-out","--conflict-left-color":"rgba(21,160,191,0.25)","--conflict-right-color":"rgba(242,202,51,0.25)","--conflict-output-color":"rgba(197,23,182,0.25)","--graph-color-5-bg50":"#751012","--graph-color-6-bg50":"#873e29","--graph-color-7-bg50":"#87742b","--graph-color-8-bg50":"#4c7c2e","--graph-color-9-bg50":"#257660","--graph-color-0-bg50":"#195f71","--graph-color-1-bg50":"#11448d","--graph-color-2-bg50":"#550f73","--graph-color-3-bg50":"#711b6d","--graph-color-4-bg50":"#7b104a","--graph-color-5-bg45":"#6c1114","--graph-color-6-bg45":"#7c3a28","--graph-color-7-bg45":"#7c6b2a","--graph-color-8-bg45":"#47722c","--graph-color-9-bg45":"#246d5a","--graph-color-0-bg45":"#195969","--graph-color-1-bg45":"#124082","--graph-color-2-bg45":"#4f116b","--graph-color-3-bg45":"#681b65","--graph-color-4-bg45":"#711146","--graph-color-5-bg25":"#48171b","--graph-color-6-bg25":"#522e26","--graph-color-7-bg25":"#524927","--graph-color-8-bg25":"#344d28","--graph-color-9-bg25":"#214a42","--graph-color-0-bg25":"#1a3f4a","--graph-color-1-bg25":"#173158","--graph-color-2-bg25":"#39174b","--graph-color-3-bg25":"#461c48","--graph-color-4-bg25":"#4b1737","--graph-color-5-bg15":"#371a1e","--graph-color-6-bg15":"#3c2725","--graph-color-7-bg15":"#3c3825","--graph-color-8-bg15":"#2a3a26","--graph-color-9-bg15":"#1f3835","--graph-color-0-bg15":"#1b323a","--graph-color-1-bg15":"#192943","--graph-color-2-bg15":"#2d1a3b","--graph-color-3-bg15":"#351d39","--graph-color-4-bg15":"#381a2f","--semi-bold":"500","--bold":"600","--num-columns-supported":"10","--column-0-color":"#15a0bf","--column-1-color":"#0669f7","--column-2-color":"#8e00c2","--column-3-color":"#c517b6","--column-4-color":"#d90171","--column-5-color":"#cd0101","--column-6-color":"#f25d2e","--column-7-color":"#f2ca33","--column-8-color":"#7bd938","--column-9-color":"#2ece9d","--red":"#D9413D","--orange":"#DE9B43","--yellow":"#ECB91C","--green":"#5CB85C","--blue":"#4D88FF","--ltblue":"#5bc0de","--app__bg0":"#1C1E23","--toolbar__bg0":"rgb(42,45,52)","--toolbar__bg1":"rgb(51,55,63)","--toolbar__bg2":"rgb(65,70,80)","--panel__bg0":"rgb(39,42,49)","--panel__bg1":"rgb(50,54,63)","--panel__bg2":"rgb(61,66,77)","--input__bg":"rgba(0,0,0,0.2)","--input-bg-warn-color":"rgba(222,155,67,0.6)","--panel-border":"rgb(19,20,24)","--section-border":"rgba(255,255,255,0.08)","--subtle-border":"rgba(255,255,255,0.04)","--modal-overlay-color":"rgba(0,0,0,.5)","--graph-color-0":"#15a0bf","--graph-color-1":"#0669f7","--graph-color-2":"#8e00c2","--graph-color-3":"#c517b6","--graph-color-4":"#d90171","--graph-color-5":"#cd0101","--graph-color-6":"#f25d2e","--graph-color-7":"#f2ca33","--graph-color-8":"#7bd938","--graph-color-9":"#2ece9d","--text-selected":"#FFFFFF","--text-selected-row":"#FFFFFF","--text-dimmed":"rgba(255,255,255,0.2)","--text-dimmed-selected":"rgba(255,255,255,0.5)","--text-normal":"rgba(255,255,255,0.75)","--text-secondary":"rgba(255,255,255,0.6)","--text-disabled":"rgba(255,255,255,0.4)","--text-accent":"#93A9EC","--text-inverse":"#222222","--text-bright":"#FFFFFF","--btn-text":"rgba(255,255,255,0.75)","--btn-text-hover":"#FFFFFF","--default-border":"rgba(255,255,255,0.75)","--default-bg":"transparent","--default-hover":"transparent","--default-border-hover":"#FFFFFF","--primary-border":"#4D88FF","--primary-bg":"rgba(77,136,255,0.2)","--primary-hover":"rgba(77,136,255,0.6)","--success-border":"#5CB85C","--success-bg":"rgba(92,184,92,0.2)","--success-hover":"rgba(92,184,92,0.6)","--warning-border":"#DE9B43","--warning-bg":"rgba(222,155,67,0.2)","--warning-hover":"rgba(222,155,67,0.6)","--danger-border":"#D9413D","--danger-bg":"rgba(217,65,61,0.2)","--danger-hover":"rgba(217,65,61,0.6)","--hover-row":"rgba(77,136,255,0.1)","--hover-row-border":"none","--danger-row":"rgba(217,65,61,0.6)","--selected-row":"rgba(77,136,255,0.2)","--selected-row-border":"none","--warning-row":"rgba(222,155,67,0.6)","--droppable":"rgba(236,185,28,0.3)","--drop-target":"rgba(92,184,92,0.5)","--input--disabled":"rgba(0,0,0,0.1)","--link-color":"#40c5ec","--link-color-bright":"#40c5ec","--form-control-focus":"#4D88FF","--scroll-thumb-border":"#1C1E23","--scroll-thumb-bg":"rgb(65,70,80)","--scroll-thumb-bg-light":"rgb(111,119,136)","--wip-status":"rgba(77,136,255,0.4)","--card__bg":"rgb(61,66,77)","--card-shadow":"rgba(0,0,0,.2)","--statusbar__warning-bg":"#87742b","--label__yellow-color":"#f2ca33","--label__light-blue-color":"#15a0bf","--label__purple-color":"#c517b6","--filtering":"rgba(77,136,255,0.5)","--soloing":"rgba(222,155,67,0.5)","--checked-out":"rgba(92,184,92,0.3)","--soloed":"rgba(222,155,67,0.3)","--filter-match":"rgba(77,136,255,0.5)","--clone__progress":"rgba(77,136,255,0.7)","--toolbar__prompt":"rgba(77,136,255,0.2)","--verified":"rgba(92,184,92,0.3)","--unverified":"rgba(255,255,255,0.1)","--drop-sort-border":"#5CB85C","--terminal__repo-name-color":"turquoise","--terminal__repo-branch-color":"violet","--terminal__repo-tag-color":"lightcoral","--terminal__repo-upstream-color":"yellowgreen","--terminal__background":"#000000","--terminal__cursor":"#FFFFFF","--terminal__cursorAccent":"#000000","--terminal__foreground":"#FFFFFF","--terminal__selection":"#304676","--terminal__black":"#000000","--terminal__red":"#F24A4A","--terminal__green":"#0DBC79","--terminal__yellow":"#E5E510","--terminal__blue":"#4A98EE","--terminal__magenta":"#E063E0","--terminal__cyan":"#11A8CD","--terminal__white":"#E5E5E5","--terminal__brightBlack":"#686868","--terminal__brightRed":"#FF5656","--terminal__brightGreen":"#23D18B","--terminal__brightYellow":"#F5F543","--terminal__brightBlue":"#51A4FF","--terminal__brightMagenta":"#D670D6","--terminal__brightCyan":"#29B8DB","--terminal__brightWhite":"#E5E5E5","--code-bg":"#1C1E23","--code-foreground":"rgba(255,255,255,0.75)","--code-blame-color-0":"#15a0bf","--code-blame-color-1":"#0669f7","--code-blame-color-2":"#8e00c2","--code-blame-color-3":"#c517b6","--code-blame-color-4":"#d90171","--code-blame-color-5":"#cd0101","--code-blame-color-6":"#f25d2e","--code-blame-color-7":"#f2ca33","--code-blame-color-8":"#7bd938","--code-blame-color-9":"#2ece9d","--added-line":"rgba(92,184,92,0.2)","--deleted-line":"rgba(217,65,61,0.2)","--modified-line":"rgba(0,0,0,0.25)","--conflict-info-color":"#15a0bf","--conflict-left-border-color":"#15a0bf","--conflict-right-border-color":"#f2ca33","--conflict-output-border-color":"#c517b6","--scroll-marker-head-color":"#16c216","--scroll-marker-highlights-color":"#e6e62b","--scroll-marker-local-branches-color":"#ffa500","--scroll-marker-pull-requests-color":"#ff8f18","--scroll-marker-remote-branches-color":"#ffd68b","--scroll-marker-selection-color":"#0821ff","--scroll-marker-stashes-color":"#fb94ff","--scroll-marker-tags-color":"#affcff","--scroll-marker-upstream-color":"#9bff9b","--stats-added-color":"#347d39","--stats-deleted-color":"#c93c37","--stats-files-color":"#e2c08d","--stats-bar-border-radius":"3px","--stats-bar-height":"40%"};function ea(e){return`--column-${e}-color`}function eh(e={}){let t={},o=Object.entries(e),r=[];for(let[e,i]of o)i?.includes("var(")?r.push([e,i]):t[e]=i;if(r.length>0){let e=document.querySelector(".gk-graph")||document.documentElement,i=document.createElement("div");for(let[e,t]of(i.style.display="none",o))e.startsWith("--")&&i.style.setProperty(e,t);e.appendChild(i);try{let e=getComputedStyle(i);for(let[o,n]of r){i.style.setProperty("--temp-resolve",n);let r=e.getPropertyValue("--temp-resolve").trim();t[o]=r||n}}finally{e.removeChild(i)}}return function(e={}){return{...el,...e}}(t)}let ec={HEAD:"head",REMOTE:"remote",TAG:"tag",WORKTREE:"worktree"};var ed=((s=ed||{}).LEFT="LEFT",s.RIGHT="RIGHT",s);let eu="#199489",ep=3,ef=26,em=28,eg=22,ev=50*em,ey=em-eg,eS=.5,ew=3,eC=3,eb=em,eR=eg,e_=3,eT=eR/2,ex=56,eE=56,eM=32,eI=eg,eO=eI-4,ez=55,eD=50,ek="short+short",eG=55,eN=50,eA=50,eW=50,eH=55,eL=18,eP=32,eF=2,eB=6,eU=14,eZ=5,ej=eU+eZ,e$=10,eV=55,eK=100,eY=50,eq=10,eX=25,eJ=58,eQ=22,e0=2,e1={dark:1,light:.5},e2=10,e5=12,e3=6,e6=3,e4=12,e7="auto",e9="center",e8=7,te=4,tt="timelineMessage",to="ref",tr="graph",ti="message",tn="author",ts="datetime",tl="sha",ta="changes",th="gk.empty-set-marker";var tc=((l=tc||{}).Compact="compact",l.Rich="rich",l.Text="text",l),td=((a=td||{}).Block="block",a.FullLine="fullLine",a.ThinLine="thinLine",a);let tu={block:{type:"block",baseHeight:+em,minHeight:5,maxHeight:20},fullLine:{type:"fullLine",baseHeight:.5*em,minHeight:2,maxHeight:4},thinLine:{type:"thinLine",baseHeight:.25*em,minHeight:1,maxHeight:2}},tp={stashes:{type:"stashes",colorCssKey:"--scroll-marker-stashes-color",lanes:[0],shape:"block"},tags:{type:"tags",colorCssKey:"--scroll-marker-tags-color",lanes:[2],shape:"block"},remoteBranches:{type:"remoteBranches",colorCssKey:"--scroll-marker-remote-branches-color",lanes:[2],shape:"block"},localBranches:{type:"localBranches",colorCssKey:"--scroll-marker-local-branches-color",lanes:[0],shape:"block"},highlights:{type:"highlights",colorCssKey:"--scroll-marker-highlights-color",lanes:[1],shape:"block"},upstream:{type:"upstream",colorCssKey:"--scroll-marker-upstream-color",lanes:[1,2],shape:"block"},pullRequests:{type:"pullRequests",colorCssKey:"--scroll-marker-pull-requests-color",lanes:[2],shape:"block"},head:{type:"head",colorCssKey:"--scroll-marker-head-color",lanes:[0,1],shape:"block"},selection:{type:"selection",colorCssKey:"--scroll-marker-selection-color",lanes:[0,1,2],shape:"fullLine"}},tf=10,tm=6,tg={[tn]:{headerLabelUntranslated:"GraphHeader-CommitAuthor",isCustomizable:!0,listId:"commit-author-zone",minimumWidth:eM,showIconWidth:ez},[ts]:{headerLabelUntranslated:"GraphHeader-CommitDateTime",isCustomizable:!0,listId:"commit-date-time-zone",minimumWidth:eD,showIconWidth:eG},[ti]:{headerLabelUntranslated:"GraphHeader-CommitMessage",isCustomizable:!0,listId:"commit-message-zone",minimumWidth:eW,showIconWidth:eH},[tl]:{headerLabelUntranslated:"GraphHeader-CommitSha",isCustomizable:!0,listId:"commit-sha-zone",minimumWidth:eN,showIconWidth:eA},[tr]:{headerLabelUntranslated:"GraphHeader-CommitGraph",isCustomizable:!0,listId:"commit-zone",minimumWidth:ex,showIconWidth:eE},[to]:{headerLabelUntranslated:"GraphHeader-BranchTag",isCustomizable:!0,listId:"ref-zone",minimumWidth:eP,showIconWidth:eV},[ta]:{headerLabelUntranslated:"GraphHeader-Changes",isCustomizable:!0,listId:"changes-zone",minimumWidth:eY,showIconWidth:eJ}},tv={hour:24,day:7,week:4,month:12,year:10},ty={added:0,deleted:0,modified:0};var tS=((h=tS||{}).ALWAYS="ALWAYS",h.ON_HOVER="ON_HOVER",h.NEVER="NEVER",h);let tw="pullRequest",tC="upstream",tb="issue",tR=[tw,tC,tb],t_={[ec.WORKTREE]:3,[ec.HEAD]:2,[ec.REMOTE]:1,[ec.TAG]:0};class tT{_graph;_message;_heads;_remotes;_tags;_activeGraphRef;_activeGraphRefGroup;_refGroupsByName;_orderedRefGroups;sha;parents;author;email;date;type;contexts;rowIndex;column;columnForColoring;edgeColumnMaxes;edges;childRefs;timeLineEntry;summary;body;displaySummary;displayBody;set message(e){if(this._message!==e){this._message=e;let t=this._graph.formatCommitMessageCallback(e);this.displaySummary=t.summary,this.displayBody=t.body}}get message(){return this._message}get heads(){return this._heads}set heads(e){this._heads!==e&&(this._heads=e,this.initializeRefGroups())}set remotes(e){this._remotes!==e&&(this._remotes=e,this.initializeRefGroups())}get remotes(){return this._remotes}set tags(e){this._tags!==e&&(this._tags=e,this.initializeRefGroups())}get tags(){return this._tags}get hasRefs(){return this.heads.length>0||this.remotes.length>0||this.tags.length>0}get hasChildRefs(){return this.childRefs.heads.length>0||this.childRefs.remotes.length>0||this.childRefs.tags.length>0}get hidden(){return null==this.rowIndex}get refsData(){if(this.hasRefs||this.hasChildRefs)return 0===this._orderedRefGroups.length&&this.loadGraphRefGroupsData(),{activeGraphRef:this._activeGraphRef,activeGraphRefGroup:this._activeGraphRefGroup,orderedRefGroups:this._orderedRefGroups,refGroupsByName:this._refGroupsByName}}constructor(e,t,o,r,i,n,s,l){this._graph=e,this._heads=t.heads||[],this._remotes=t.remotes||[],this._tags=t.tags||[],this.message=t.message,this.sha=t.sha,this.parents=t.parents,this.author=t.author,this.email=t.email,this.date=t.date,this.type=t.type,this.contexts=t.contexts,this.column=o||0,this.columnForColoring=l,this.edgeColumnMaxes=r||0,this.edges=i||{},this.childRefs=n||{heads:[],tags:[],remotes:[]},this.timeLineEntry=s,this.initializeRefGroups()}initializeRefGroups(){this._activeGraphRefGroup=void 0,this._activeGraphRef=void 0,this._refGroupsByName={},this._orderedRefGroups=[]}addRefToRefGroup(e){let t=e.name;this._refGroupsByName[t]||(this._refGroupsByName[t]=[]),this._refGroupsByName[t].push(e)}loadGraphRefGroupsData(){this.initializeRefGroups();let e=[],{heads:t,tags:o,remotes:r}=this.hasRefs?this:this.childRefs;for(let o of t){var i;let t={...o,refType:ec.HEAD};this.addRefToRefGroup(t),(i=t).refType===ec.HEAD&&tX(i)?(this._activeGraphRefGroup=this._refGroupsByName[t.name],this._activeGraphRef=t,e.unshift(this._refGroupsByName[t.name])):e.push(this._refGroupsByName[t.name])}for(let t of r){let o={...t,fullName:t.owner?`${t.owner}/${t.name}`:t.name,refType:ec.REMOTE},r=this._refGroupsByName[o.name];this.addRefToRefGroup(o),r||e.push(this._refGroupsByName[o.name])}for(let t of o){let o={...t,refType:ec.TAG};this.addRefToRefGroup(o),e.push(this._refGroupsByName[o.name])}this._orderedRefGroups=e.sort((e,t)=>e===this._activeGraphRefGroup?-1:t===this._activeGraphRefGroup?1:t_[e[0].refType]>t_[t[0].refType]?-1:t_[e[0].refType]<t_[t[0].refType]?1:e.length>t.length?-1:e.length<t.length?1:e[0].name.localeCompare(t[0].name))}}let tx=e=>{let t;return(...o)=>{t&&cancelAnimationFrame(t),t=requestAnimationFrame(()=>{e(...o)})}};function tE(e){return 1>Math.abs(e.scrollHeight-e.scrollTop-e.clientHeight)}function tM(e){return e?"string"==typeof e?e:JSON.stringify(e):null}function tI(e,t,o,r){let{id:i}=e;return!i||null===t||t?.[i]===null||r&&t?.[i]?.[r]===null?null:t&&i in t?r&&!t[i]?.[r]?(o(i,[r]),null):r?t?.[i]?.[r]:t?.[i]:(o(i,tR),null)}function tO(e){let t=Math.floor(e/36e5);if(t<24){if(0===t)return{label:"Timeline-Now",value:0};if(1===t)return{label:"Timeline-1HourAgo",value:1};if(t>0)return{label:"Timeline-NHoursAgo",value:t}}let o=Math.floor(e/864e5);if(o<7){if(1===o)return{label:"Timeline-Yesterday",value:1};if(o>0)return{label:"Timeline-NDaysAgo",value:o}}let r=Math.floor(e/6048e5);if(r<5){if(1===r)return{label:"Timeline-1WeekAgo",value:1};if(r>0)return{label:"Timeline-NWeeksAgo",value:r}}let i=new Date,n=new Date(i.getTime()-e),s=(i.getFullYear()-n.getFullYear())*12+(i.getMonth()-n.getMonth());if(s<12){if(1===s)return{label:"Timeline-1MonthAgo",value:1};if(s>0)return{label:"Timeline-NMonthsAgo",value:s}}let l=i.getFullYear()-n.getFullYear();return 1===l?{label:"Timeline-1YearAgo",value:1}:l>0?{label:"Timeline-NYearsAgo",value:l}:{label:"Timeline-Now",value:0}}function tz(e,t){if(t.id)return t.id;let o=t.owner||"";return e===ec.REMOTE?`${e}/${o}/${t.name}`:`${e}/${t.name}`}function tD(e){return tz(e.refType,e)}function tk(e,t=0){for(let o=e.length-1;o>=t;o-=1){let t=e[o];if(t.currentWidth>t.minimumWidth)return t}}function tG(e,t=!1){let o="--scrollable-scrollbar-thickness",r=t||!e[o]?eh(e):e,i=r[o]?parseInt(r[o],10):0;return Number.isNaN(i)?0:i}function tN(e,t){let o=0;for(let r of e)t&&r.type===t||(o+=r.currentWidth);return o}let tA=(e,t)=>e===t[t.length-1].type;function tW(e,t,o){return e+ +!!(t||o||0===e)}function tH(e,t){return e.type===tr&&t>0?e.contentWidth||0:e.currentWidth}function tL(e,t,o,r,i){var n;let s=tB(e,t);return s?(n=o.length,s.currentWidth<tH(s,n))?tG(r,i):0:0}function tP(e,t,o,r,i,n,s,l,a){var h,c,d,u,p,f,m;let g,v=tB(e,t);return v&&(h=v,c=t,d=o,u=r,p=i,f=n.length,m=s,g=em*tW(f,d,u),tA(h.type,c)&&(p<g||m))?tG(l,a):0}function tF(e,t,o){return q(o,e.minimumWidth||0,e.maximumWidth&&!tA(e.type,t)?e.maximumWidth||0:Number.MAX_VALUE)}function tB(e,t){return t.find(({type:t})=>t===e)}function tU(e){return!!e&&e.currentWidth<=e.showIconWidth}function tZ(e,t){return t.findIndex(({type:t})=>t===e)}function tj(e,t,o){let r=0,i=0,n=tZ(e,t);if(n>-1){let e=function(e,t=0){let o=0;for(let r=t;r<e.length;r+=1)o+=e[r].minimumWidth;return o}(t,n+1),s=function(e,t=e.length-1){let o=0;for(let r=0;r<=t;r+=1)o+=e[r].currentWidth;return o}(t,n-1),l=Math.min(t[n].maximumWidth||Number.MAX_VALUE,o-e-s);r=t[n].minimumWidth,i=l}return{min:r,max:i}}function t$(e){let t=!!e&&e===tc.Compact,o=t?1:2,r=t?10:28,i=t?1:3,n=t?1:3,s=t?10:22,l=t?s:eR,a=t?s:s/2+1;return{COMMIT_ZONE_LINE_WIDTH:o,COMMIT_ZONE_GUTTER_WIDTH:r,COMMIT_ZONE_PADDING_LEFT:i,COMMIT_ZONE_PADDING_RIGHT:n,COMMIT_COLUMN_WIDTH:s,COMMIT_NODE_DIAMETER:l,COMMIT_MERGE_NODE_DIAMETER:a,COMMIT_NODE_TOP_OFFSET:.5*eR-.5*l,COMMIT_MERGE_NODE_LEFT_OFFSET:s/2-a/2,COMMIT_MERGE_NODE_TOP_OFFSET:.5*eR-.5*a,COMMIT_ZONE_AVATAR_DIAMETER:l-2*o,COMMIT_ZONE_VIEWPORT_WIDTH_MIN:l+i+n+r,COMMIT_ZONE_SHOW_ICON_WIDTH:t?45:56,IS_COMPACT:t,RADIUS_DIFF_MERGE_NODE_COMMIT_NODE:l/2-a/2}}function tV(e){return e instanceof tT?!!e.refsData?.activeGraphRef:!!e?.heads&&e.heads.some(e=>tX(e))}function tK(e){return[ee,eo,ei].includes(e)}function tY(e){return!!e&&J(e,e=>"number"==typeof e&&e>0)}function tq(e,t){return e.has(t)&&1===e.size}function tX(e){return e.isCurrentHead}class tJ{props;constructor(e){this.props=e}getActiveGraphZone(e){let t=tB(e,this.props.graphZones);return!t||t.isHidden?void 0:t}getGraphRefGroupsByNameForRow(e){let t=this.getRow(e);return t&&t.refsData?.orderedRefGroups||[]}getRow(e){if(!(e<0)&&!(e>this.props.processedRows.length-1))return this.props.processedRows[e]}getZoneWidth(e,t=!0){var o;let r=t?this.getVerticalScrollWidth(e):0;return o=this.props.graphZones,(tB(e,o)?.currentWidth||tg[e].minimumWidth)-r}isDateTimeZoneActive(){return!!this.getActiveGraphZone(ts)}shouldShowTimelines(){return this.props.alwaysShowTimelines||!this.isDateTimeZoneActive()}isFirstRow(e){return 0===e}isColumnFollowingGraphColumn(e){var t;let o,r;return o=tZ(e,t=this.props.graphZones),r=tZ(tr,t),-1!==o&&-1!==r&&o-r==1}isHighlighted(e){if(this.props.processedRows[e]&&this.props.highlightedShas){let t=this.props.processedRows[e]?.sha;return this.props.highlightedShas[t]||!1}return!1}isHovering(e){return!!this.props.processedRows[e]&&this.props.currentlyHoveredCommitSha===this.props.processedRows[e]?.sha}isLastColumn(e){return tA(e,this.props.graphZones)}getSelectedRefGroupByName(){if(1===this.props.selectedShas.size){let e=this.props.selectedShas[Symbol.iterator]().next().value;if(e){let t=this.props.processedGraphRowBySha[e];if(t)return t.refsData?.orderedRefGroups||[]}}return[]}getHorizontalScrollHeight(e){return tL(e,this.props.graphZones,this.props.processedRows,this.props.cssVariables)}getVerticalScrollWidth(e){return tP(e,this.props.graphZones,this.props.hasMoreCommits,this.props.isLoadingRows,this.props.height,this.props.processedRows,this.props.enabledScrollMarkerTypes.length>0,this.props.cssVariables)}shouldUseColumnHeaderIcons(e){let t=tB(e,this.props.graphZones);return!!t&&tU(t)}isMissingHoveredRefGroup(e){if(this.props.highlightedShas)return!1;let t=this.getRow(e);if(!t)return!1;let o=[];if(this.props.dimRowsOfSelectedCommit){let e=this.getSelectedRefGroupByName();if(!e.length)return!1;o=e[0]}else{let{hoveredRefGroup:e}=this.props;if(!e?.length)return!1;o=e}let{name:r,refType:i}=o[0],n=i===ec.TAG,s=t.tags.length>0&&!t.heads.length&&!t.remotes.length,{heads:l,tags:a,remotes:h}=t.hasRefs&&(!s||n)?t:t.childRefs;return!l.length&&!h.length&&!a.length||!l.some(e=>e.name===r&&o.some(e=>e.refType===ec.HEAD))&&!h.some(e=>e.name===r&&o.some(t=>t.refType===ec.REMOTE&&t.owner===e.owner))&&!a.some(e=>e.name===r&&o.some(e=>e.refType===ec.TAG))}isSelected(e){let t=this.getRow(e)?.sha;return!!t&&this.props.selectedShas.has(t)}isSingleSelected(e){let t=this.getRow(e)?.sha;return!!t&&tq(this.props.selectedShas,t)}hasTimeline(e){if(!this.shouldShowTimelines())return!1;let t=this.props.processedRows[e];return!!t?.timeLineEntry&&!(e*em-this.props.scrollTop<em)}rowContainsCurrentHeadRef(e){return tV(e)}}class tQ extends P.PureComponent{resizeObserver;scrollbarContainerRef=P.createRef();horizontalScrollRef=P.createRef();scrollabbleContentRef=P.createRef();verticalScrollRef=P.createRef();outerHorizontalScrollRef=P.createRef();constructor(e){super(e),this.resizeObserver=new ResizeObserver(e=>e.forEach(e=>this.onContainerResized(e.contentRect.width,e.contentRect.height)))}updateScrollbarValues(e,t){this.horizontalScrollRef?.current&&(this.horizontalScrollRef.current.scrollLeft=e||0),this.verticalScrollRef?.current&&(this.verticalScrollRef.current.scrollTop=t||0)}componentDidUpdate(e){let{scrollLeft:t,scrollTop:o}=this.props;(e.scrollLeft!==t||e.scrollTop!==o)&&this.updateScrollbarValues(t,o)}onHorizontalScroll(e){this.props.onScroll&&this.props.onScroll({clientHeight:this.props.height||0,clientWidth:e.target.clientWidth,scrollHeight:this.getAdjustedContentHeight(),scrollLeft:e.target.scrollLeft,scrollTop:this.props.scrollTop||0,scrollWidth:e.target.scrollWidth})}onVerticalScroll(e){let t=1>Math.abs(e.target.scrollTop-(this.props.scrollTop??0));this.props.onScroll&&!t&&this.props.onScroll({clientHeight:e.target.clientHeight,clientWidth:this.props.width||0,scrollHeight:e.target.scrollHeight,scrollLeft:this.props.scrollLeft||0,scrollTop:e.target.scrollTop,scrollWidth:this.props.contentWidth||0})}onWheel(e){if(!this.props.onScroll||!this.verticalScrollRef.current&&!this.props.forceOnVerticalWheel&&!this.horizontalScrollRef.current&&!this.props.forceOnHorizontalWheel)return;let t=this.props.scrollLeft||0,o=t;if(this.horizontalScrollRef.current||this.props.forceOnHorizontalWheel){var r;o+=e.deltaX,(o=o>=0?o:0)>t&&this.horizontalScrollRef?.current&&1>Math.abs((r=this.horizontalScrollRef.current).scrollWidth-r.scrollLeft-r.clientWidth)&&(o=t)}let i=this.props.scrollTop||0,n=i;(this.verticalScrollRef.current||this.props.forceOnVerticalWheel)&&(n+=e.deltaY,(n=n>=0?n:0)>i&&this.verticalScrollRef?.current&&tE(this.verticalScrollRef.current)&&(n=i)),(n!==i||o!==t)&&this.props.onScroll({clientHeight:this.props.height||0,clientWidth:this.props.width||0,scrollHeight:this.getAdjustedContentHeight(),scrollLeft:o>=0?o:0,scrollTop:n>=0?n:0,scrollWidth:this.props.contentWidth||0})}componentDidMount(){this.updateScrollbarValues(this.props.scrollLeft,this.props.scrollTop),this.resizeObserver.observe(this.scrollbarContainerRef.current)}componentWillUnmount(){this.resizeObserver.disconnect()}onContainerResized=tx((e,t)=>{let o=this.props.contentHeight||0,r=this.props.contentWidth||0,i=this.props.scrollTop||0,n=this.props.scrollLeft||0,s=t<o?i:0,l=e<r?n:0;(i!==s||n!==l)&&(this.updateScrollbarValues(l,s),this.props.onScroll?.({clientHeight:t,clientWidth:e,scrollHeight:o,scrollLeft:l,scrollTop:s,scrollWidth:r}))});hasHorizontalScroll(){let{contentWidth:e,displayHorizontalScrollbar:t,forceHorizontalScrollbar:o,width:r}=this.props;return o||t&&r<e}hasVerticalScroll(){let{displayVerticalScrollbar:e,forceVerticalScrollbar:t,height:o}=this.props;return t||e&&o<this.getAdjustedContentHeight()}getHorizontalScrollbarTickness(){return parseInt(this.outerHorizontalScrollRef.current?.clientHeight,10)||0}getAdjustedContentHeight(){return this.props.contentHeight+this.getHorizontalScrollbarTickness()}adjustScrollWhileDragging(e){let t,o=this.getAdjustedContentHeight();if(!this.scrollabbleContentRef.current||this.props.height>=o||!this.props.onScroll)return;let r=this.scrollabbleContentRef.current.getBoundingClientRect(),i=e.clientY-r.top,n=Math.abs(o-this.props.height);if(this.props.scrollTop>0&&i<=20){let e=this.props.scrollTop-20;t={clientHeight:r.height,clientWidth:r.width,scrollHeight:n,scrollLeft:this.props.scrollLeft||0,scrollTop:e>0?e:0,scrollWidth:this.props.contentWidth||0}}if(this.props.scrollTop<n&&i>=this.props.height-20){let e=this.props.scrollTop+20;t={clientHeight:r.height,clientWidth:r.width,scrollHeight:n,scrollLeft:this.props.scrollLeft||0,scrollTop:e<n?e:n,scrollWidth:this.props.contentWidth||0}}t&&this.props.onScroll(t)}render(){let{children:e,contentHeight:t,contentWidth:o,forceHorizontalScrollbar:r,forceVerticalScrollbar:i,height:n,width:s}=this.props,l=this.hasVerticalScroll(),a=this.hasHorizontalScroll(),h=a&&P.createElement("div",{className:"scrollbar-outer horizontal",ref:this.outerHorizontalScrollRef,style:{top:`calc(${n}px - var(--scrollable-scrollbar-thickness))`,width:s}},P.createElement("div",{className:"scrollbar-inner horizontal_scrollbar",onScroll:e=>this.onHorizontalScroll(e),ref:this.horizontalScrollRef,style:{overflowX:r?"scroll":"auto",width:l?`calc(${s}px - var(--scrollable-scrollbar-thickness))`:s}},P.createElement("div",{style:{height:"1px",width:o}}))),c=l&&P.createElement("div",{className:"scrollbar-outer vertical",style:{height:n}},P.createElement("div",{className:"scrollbar-inner vertical_scrollbar",onScroll:e=>this.onVerticalScroll(e),ref:this.verticalScrollRef,style:{overflowY:i?"scroll":"auto",height:a?`calc(${n}px - var(--scrollable-scrollbar-thickness))`:n}},P.createElement("div",{style:{height:`calc(${t}px + var(--scrollable-scrollbar-thickness))`,width:"1px"}})));return P.createElement("div",{className:"scrollbar-container",onWheelCapture:e=>this.onWheel(e),ref:this.scrollbarContainerRef,style:{height:n,width:s}},P.createElement("div",{className:"scrollable-content",onDragOverCapture:e=>this.adjustScrollWhileDragging(e),ref:this.scrollabbleContentRef,style:{height:n,width:s}},e),h,c)}}var t0=tQ,t1=((c=t1||{})[c.Hash=35]="Hash",c[c.Slash=47]="Slash",c[c.Digit0=48]="Digit0",c[c.Digit1=49]="Digit1",c[c.Digit2=50]="Digit2",c[c.Digit3=51]="Digit3",c[c.Digit4=52]="Digit4",c[c.Digit5=53]="Digit5",c[c.Digit6=54]="Digit6",c[c.Digit7=55]="Digit7",c[c.Digit8=56]="Digit8",c[c.Digit9=57]="Digit9",c[c.Backslash=92]="Backslash",c[c.A=65]="A",c[c.B=66]="B",c[c.C=67]="C",c[c.D=68]="D",c[c.E=69]="E",c[c.F=70]="F",c[c.Z=90]="Z",c[c.a=97]="a",c[c.b=98]="b",c[c.c=99]="c",c[c.d=100]="d",c[c.e=101]="e",c[c.f=102]="f",c[c.z=122]="z",c);function t2(e){switch(e){case 48:break;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:case 65:return 10;case 98:case 66:return 11;case 99:case 67:return 12;case 100:case 68:return 13;case 101:case 69:return 14;case 102:case 70:return 15}return 0}function t5(e,t,o){return(o<0&&(o+=1),o>1&&(o-=1),o<1/6)?e+(t-e)*6*o:o<.5?t:o<2/3?e+(t-e)*(2/3-o)*6:e}function t3(e){let t,o,r,i=e.h/360,{s:n,l:s,a:l}=e;if(0===n)t=o=r=s;else{let e=s<.5?s*(1+n):s+n-s*n,l=2*s-e;t=t5(l,e,i+1/3),o=t5(l,e,i),r=t5(l,e,i-1/3)}return{type:"rgba",r:Math.round(255*t),g:Math.round(255*o),b:Math.round(255*r),a:l}}let t6=/^((?:rgb|hsl)a?)\((-?\d+%?)[,\s]+(-?\d+%?)[,\s]+(-?\d+%?)[,\s]*(-?[\d.]+%?)?\)$/i;function t4(e){let t;if(0===(e=e.trim()).length)return null;if(35===e.charCodeAt(0))return function(e){let t=(e=e.trim()).length;if(0===t||35!==e.charCodeAt(0))return null;if(7===t){let t=16*t2(e.charCodeAt(1))+t2(e.charCodeAt(2));return{type:"rgba",r:t,g:16*t2(e.charCodeAt(3))+t2(e.charCodeAt(4)),b:16*t2(e.charCodeAt(5))+t2(e.charCodeAt(6)),a:1}}if(9===t){let t=16*t2(e.charCodeAt(1))+t2(e.charCodeAt(2)),o=16*t2(e.charCodeAt(3))+t2(e.charCodeAt(4));return{type:"rgba",r:t,g:o,b:16*t2(e.charCodeAt(5))+t2(e.charCodeAt(6)),a:(16*t2(e.charCodeAt(7))+t2(e.charCodeAt(8)))/255}}if(4===t){let t=t2(e.charCodeAt(1)),o=t2(e.charCodeAt(2)),r=t2(e.charCodeAt(3));return{type:"rgba",r:16*t+t,g:16*o+o,b:16*r+r,a:1}}if(5===t){let t=t2(e.charCodeAt(1)),o=t2(e.charCodeAt(2)),r=t2(e.charCodeAt(3)),i=t2(e.charCodeAt(4));return{type:"rgba",r:16*t+t,g:16*o+o,b:16*r+r,a:(16*i+i)/255}}return null}(e);let o=t6.exec(e);if(null==o)return null;let r=o[1];switch(r){case"rgb":case"hsl":t=[parseInt(o[2],10),parseInt(o[3],10),parseInt(o[4],10),1];break;case"rgba":case"hsla":t=[parseInt(o[2],10),parseInt(o[3],10),parseInt(o[4],10),parseFloat(o[5])];break;default:return null}return"hsl"===r||"hsla"===r?t3({h:t[0],s:t[1],l:t[2],a:t[3]}):{type:"rgba",r:t[0],g:t[1],b:t[2],a:t[3]}}let t7=e=>e!==Q&&e!==et,t9=/^.*(:?\n){0,2}/m;function t8(e,t=`
|
|
1
|
+
let e;import*as t from"react";import{default as o,findDOMNode as r,flushSync as i}from"react-dom";var n,s,l,a,h,c,d,u,p,f,m,g,v,y,S,w,C,R,b,_,T,x,E,M,I,O,z,D,k,G={42:()=>{},43:(e,t,o)=>{var r=o(201),i=o(842);e.exports=function(e,t){var o=t||{},n={};return void 0===e&&(e={}),e.on=function(t,o){return n[t]?n[t].push(o):n[t]=[o],e},e.once=function(t,o){return o._once=!0,e.on(t,o),e},e.off=function(t,o){var r=arguments.length;if(1===r)delete n[t];else if(0===r)n={};else{var i=n[t];if(!i)return e;i.splice(i.indexOf(o),1)}return e},e.emit=function(){var t=r(arguments);return e.emitterSnapshot(t.shift()).apply(this,t)},e.emitterSnapshot=function(t){var s=(n[t]||[]).slice(0);return function(){var n=r(arguments),l=this||e;if("error"===t&&!1!==o.throws&&!s.length)throw 1===n.length?n[0]:n;return s.forEach(function(r){o.async?i(r,n,l):r.apply(l,n),r._once&&e.off(t,r)}),e}},e}},81:(e,t,o)=>{var r=o(43),i=o(513),n=o(579),s=document,l=s.documentElement;function a(e,t,r,n){o.g.navigator.pointerEnabled?i[t](e,{mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"}[r],n):o.g.navigator.msPointerEnabled?i[t](e,{mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"}[r],n):(i[t](e,{mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"}[r],n),i[t](e,r,n))}function h(e){if(void 0!==e.touches)return e.touches.length;if(void 0!==e.which&&0!==e.which)return e.which;if(void 0!==e.buttons)return e.buttons;var t=e.button;if(void 0!==t)return 1&t?1:2&t?3:4&t?2:0}function c(e,t){return void 0!==o.g[t]?o.g[t]:l.clientHeight?l[e]:s.body[e]}function d(e,t,o){var r,i=e||{},n=i.className;return i.className+=" gu-hide",r=s.elementFromPoint(t,o),i.className=n,r}function u(){return!1}function p(){return!0}function f(e){return e.width||e.right-e.left}function m(e){return e.height||e.bottom-e.top}function g(e){return e.parentNode===s?null:e.parentNode}function v(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||"SELECT"===e.tagName||function e(t){return!!t&&"false"!==t.contentEditable&&("true"===t.contentEditable||e(g(t)))}(e)}function y(e){return e.nextElementSibling||function(){var t=e;do t=t.nextSibling;while(t&&1!==t.nodeType)return t}()}function S(e,t){var o=t.targetTouches&&t.targetTouches.length?t.targetTouches[0]:t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,r={pageX:"clientX",pageY:"clientY"};return e in r&&!(e in o)&&r[e]in o&&(e=r[e]),o[e]}e.exports=function(e,t){var o,w,C,R,b,_,T,x,E,M,I,O,z=arguments.length;1===z&&!1===Array.isArray(e)&&(t=e,e=[]);var D=null,k=t||{};void 0===k.moves&&(k.moves=p),void 0===k.accepts&&(k.accepts=p),void 0===k.invalid&&(k.invalid=function(){return!1}),void 0===k.containers&&(k.containers=e||[]),void 0===k.isContainer&&(k.isContainer=u),void 0===k.copy&&(k.copy=!1),void 0===k.copySortSource&&(k.copySortSource=!1),void 0===k.revertOnSpill&&(k.revertOnSpill=!1),void 0===k.removeOnSpill&&(k.removeOnSpill=!1),void 0===k.direction&&(k.direction="vertical"),void 0===k.ignoreInputTextSelection&&(k.ignoreInputTextSelection=!0),void 0===k.mirrorContainer&&(k.mirrorContainer=s.body);var G=r({containers:k.containers,start:function(e){var t=B(e);t&&U(t)},end:Z,cancel:Y,remove:K,destroy:function(){A(!0),V({})},canMove:function(e){return!!B(e)},dragging:!1});return!0===k.removeOnSpill&&G.on("over",function(e){n.rm(e,"gu-hide")}).on("out",function(e){G.dragging&&n.add(e,"gu-hide")}),A(),G;function N(e){return -1!==G.containers.indexOf(e)||k.isContainer(e)}function A(e){var t=e?"remove":"add";a(l,t,"mousedown",P),a(l,t,"mouseup",V)}function W(e){a(l,e?"remove":"add","mousemove",F)}function H(e){var t=e?"remove":"add";i[t](l,"selectstart",L),i[t](l,"click",L)}function L(e){O&&e.preventDefault()}function P(e){if(_=e.clientX,T=e.clientY,1===h(e)&&!e.metaKey&&!e.ctrlKey){var t=e.target,o=B(t);o&&(O=o,W(),"mousedown"===e.type&&(v(t)?t.focus():e.preventDefault()))}}function F(e){if(O){if(0===h(e))return void V({});if(void 0===e.clientX||e.clientX!==_||void 0===e.clientY||e.clientY!==T){if(k.ignoreInputTextSelection){var t,r=S("clientX",e),i=S("clientY",e);if(v(s.elementFromPoint(r,i)))return}var d=O;W(!0),H(),Z(),U(d);var u={left:(t=C.getBoundingClientRect()).left+c("scrollLeft","pageXOffset"),top:t.top+c("scrollTop","pageYOffset")};R=S("pageX",e)-u.left,b=S("pageY",e)-u.top,n.add(M||C,"gu-transit"),function(){if(!o){var e=C.getBoundingClientRect();(o=C.cloneNode(!0)).style.width=f(e)+"px",o.style.height=m(e)+"px",n.rm(o,"gu-transit"),n.add(o,"gu-mirror"),k.mirrorContainer.appendChild(o),a(l,"add","mousemove",Q),n.add(k.mirrorContainer,"gu-unselectable"),G.emit("cloned",o,C,"mirror")}}(),Q(e)}}}function B(e){if(!(G.dragging&&o||N(e))){for(var t=e;g(e)&&!1===N(g(e));)if(k.invalid(e,t)||!(e=g(e)))return;var r=g(e);if(!(!r||k.invalid(e,t))&&k.moves(e,r,t,y(e)))return{item:e,source:r}}}function U(e){var t,o;t=e.item,o=e.source,("boolean"==typeof k.copy?k.copy:k.copy(t,o))&&(M=e.item.cloneNode(!0),G.emit("cloned",M,e.item,"copy")),w=e.source,C=e.item,x=E=y(e.item),G.dragging=!0,G.emit("drag",C,w)}function Z(){if(G.dragging){var e=M||C;$(e,g(e))}}function j(){O=!1,W(!0),H(!0)}function V(e){if(j(),G.dragging){var t=M||C,r=S("clientX",e),i=S("clientY",e),n=J(d(o,r,i),r,i);n&&(M&&k.copySortSource||!M||n!==w)?$(t,n):k.removeOnSpill?K():Y()}}function $(e,t){var o=g(e);M&&k.copySortSource&&t===w&&o.removeChild(C),X(t)?G.emit("cancel",e,w,w):G.emit("drop",e,t,w,E),q()}function K(){if(G.dragging){var e=M||C,t=g(e);t&&t.removeChild(e),G.emit(M?"cancel":"remove",e,t,w),q()}}function Y(e){if(G.dragging){var t=arguments.length>0?e:k.revertOnSpill,o=M||C,r=g(o),i=X(r);!1===i&&t&&(M?r&&r.removeChild(M):w.insertBefore(o,x)),i||t?G.emit("cancel",o,w,w):G.emit("drop",o,r,w,E),q()}}function q(){var e=M||C;j(),o&&(n.rm(k.mirrorContainer,"gu-unselectable"),a(l,"remove","mousemove",Q),g(o).removeChild(o),o=null),e&&n.rm(e,"gu-transit"),I&&clearTimeout(I),G.dragging=!1,D&&G.emit("out",e,D,w),G.emit("dragend",e),w=C=M=x=E=I=D=null}function X(e,t){var r;return r=void 0!==t?t:o?E:y(M||C),e===w&&r===x}function J(e,t,o){for(var r=e;r&&!function(){if(!1===N(r))return!1;var i=ee(r,e),n=et(r,i,t,o);return!!X(r,n)||k.accepts(C,r,w,n)}();)r=g(r);return r}function Q(e){if(o){e.preventDefault();var t,r=S("clientX",e),i=S("clientY",e),n=r-R,s=i-b;o.style.left=n+"px",o.style.top=s+"px";var l=M||C,a=d(o,r,i),h=J(a,r,i),c=null!==h&&h!==D;(c||null===h)&&(D&&f("out"),D=h,c&&f("over"));var u=g(l);if(h===w&&M&&!k.copySortSource){u&&u.removeChild(l);return}var p=ee(h,a);if(null!==p)t=et(h,p,r,i);else if(!0!==k.revertOnSpill||M){M&&u&&u.removeChild(l);return}else t=x,h=w;(null===t&&c||t!==l&&t!==y(l))&&(E=t,h.insertBefore(l,t),G.emit("shadow",l,h,w))}function f(e){G.emit(e,l,D,w)}}function ee(e,t){for(var o=t;o!==e&&g(o)!==e;)o=g(o);return o===l?null:o}function et(e,t,o,r){var i,n="horizontal"===k.direction;return t!==e?(i=t.getBoundingClientRect(),n?o>i.left+f(i)/2?y(t):t:r>i.top+m(i)/2?y(t):t):function(){var t,i,s,l=e.children.length;for(t=0;t<l;t++)if(s=(i=e.children[t]).getBoundingClientRect(),n&&s.left+s.width/2>o||!n&&s.top+s.height/2>r)return i;return null}()}}},142:()=>{},175:(e,t,o)=>{var r=o(81),i=o(201);e.exports=function(){return r.apply(this,i(arguments)).on("cloned",function(t){e(t),i(t.getElementsByTagName("*")).forEach(e)});function e(e){e.removeAttribute("data-reactid")}}},186:(e,t,o)=>{var r=o(985);function i(){}function n(){}n.resetWarningCache=i,e.exports=function(){function e(e,t,o,i,n,s){if(s!==r){var l=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var o={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:n,resetWarningCache:i};return o.PropTypes=o,o}},201:e=>{e.exports=function(e,t){return Array.prototype.slice.call(e,t)}},292:e=>{e.exports="function"==typeof setImmediate?function(e){setImmediate(e)}:function(e){setTimeout(e,0)}},322:()=>{},326:(e,t,o)=>{var r=o.g.CustomEvent;e.exports=!function(){try{var e=new r("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch{}return!1}()?"function"==typeof document.createEvent?function(e,t){var o=document.createEvent("CustomEvent");return t?o.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):o.initCustomEvent(e,!1,!1,void 0),o}:function(e,t){var o=document.createEventObject();return o.type=e,t?(o.bubbles=!!t.bubbles,o.cancelable=!!t.cancelable,o.detail=t.detail):(o.bubbles=!1,o.cancelable=!1,o.detail=void 0),o}:r},330:(e,t)=>{var o=Symbol.for("react.transitional.element");function r(e,t,r){var i=null;if(void 0!==r&&(i=""+r),void 0!==t.key&&(i=""+t.key),"key"in t)for(var n in r={},t)"key"!==n&&(r[n]=t[n]);else r=t;return{$$typeof:o,type:e,key:i,ref:void 0!==(t=r.ref)?t:null,props:r}}t.Fragment=Symbol.for("react.fragment"),t.jsx=r,t.jsxs=r},386:(e,t,o)=>{var r=[],i="",n=/^on/;for(i in o.g)n.test(i)&&r.push(i.slice(2));e.exports=r},472:()=>{},500:(e,t)=>{var o,r={}.hasOwnProperty;function i(){for(var e="",t=0;t<arguments.length;t++){var o=arguments[t];o&&(e=n(e,function(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return i.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var o in e)r.call(e,o)&&e[o]&&(t=n(t,o));return t}(o)))}return e}function n(e,t){return t?e?e+" "+t:e+t:e}e.exports?(i.default=i,e.exports=i):void 0===(o=(function(){return i}).apply(t,[]))||(e.exports=o)},512:()=>{},513:(e,t,o)=>{var r=o(326),i=o(386),n=o.g.document,s=function(e,t,o,r){return e.addEventListener(t,o,r)},l=function(e,t,o,r){return e.removeEventListener(t,o,r)},a=[];function h(e,t,o){var r=function(e,t,o){var r,i;for(r=0;r<a.length;r++)if((i=a[r]).element===e&&i.type===t&&i.fn===o)return r}(e,t,o);if(r){var i=a[r].wrapper;return a.splice(r,1),i}}o.g.addEventListener||(s=function(e,t,r){return e.attachEvent("on"+t,function(e,t,r){var i=h(e,t,r)||function(t){var i=t||o.g.event;i.target=i.target||i.srcElement,i.preventDefault=i.preventDefault||function(){i.returnValue=!1},i.stopPropagation=i.stopPropagation||function(){i.cancelBubble=!0},i.which=i.which||i.keyCode,r.call(e,i)};return a.push({wrapper:i,element:e,type:t,fn:r}),i}(e,t,r))},l=function(e,t,o){var r=h(e,t,o);if(r)return e.detachEvent("on"+t,r)}),e.exports={add:s,remove:l,fabricate:function(e,t,o){var s,l=-1===i.indexOf(t)?new r(t,{detail:o}):(n.createEvent?(s=n.createEvent("Event")).initEvent(t,!0,!0):n.createEventObject&&(s=n.createEventObject()),s);e.dispatchEvent?e.dispatchEvent(l):e.fireEvent("on"+t,l)}}},514:(e,t,o)=>{var r=o(641).__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;t.c=function(e){return r.H.useMemoCache(e)}},579:e=>{var t={};function o(e){var o=t[e];return o?o.lastIndex=0:t[e]=o=RegExp("(?:^|\\s)"+e+"(?:\\s|$)","g"),o}e.exports={add:function(e,t){var r=e.className;r.length?o(t).test(r)||(e.className+=" "+t):e.className=t},rm:function(e,t){e.className=e.className.replace(o(t)," ").trim()}}},597:e=>{e.exports=function(e,t,o,r,i,n,s,l){if(!e){var a;if(void 0===t)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var h=[o,r,i,n,s,l],c=0;(a=Error(t.replace(/%s/g,function(){return h[c++]}))).name="Invariant Violation"}throw a.framesToPop=1,a}}},606:()=>{},641:(e,o,r)=>{var i;i={},r.d(i,{Children:()=>t.Children,Component:()=>t.Component,Fragment:()=>t.Fragment,PureComponent:()=>t.PureComponent,__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE:()=>t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,cloneElement:()=>t.cloneElement,createContext:()=>t.createContext,createElement:()=>t.createElement,createRef:()=>t.createRef,default:()=>t.default,forwardRef:()=>t.forwardRef,isValidElement:()=>t.isValidElement,memo:()=>t.memo,useCallback:()=>t.useCallback,useContext:()=>t.useContext,useEffect:()=>t.useEffect,useId:()=>t.useId,useLayoutEffect:()=>t.useLayoutEffect,useMemo:()=>t.useMemo,useRef:()=>t.useRef,useState:()=>t.useState,version:()=>t.version}),e.exports=i},656:(e,t,o)=>{e.exports=o(330)},730:e=>{e.exports=function(){}},736:(e,t,o)=>{e.exports=o(186)()},842:(e,t,o)=>{var r=o(292);e.exports=function(e,t,o){e&&r(function(){e.apply(o||null,t||[])})}},898:(e,t,o)=>{e.exports=o(514)},985:e=>{e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},N={};function A(e){var t=N[e];if(void 0!==t)return t.exports;var o=N[e]={exports:{}};return G[e](o,o.exports,A),o.exports}A.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return A.d(t,{a:t}),t},A.d=(e,t)=>{for(var o in t)A.o(t,o)&&!A.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},A.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch{if("object"==typeof window)return window}}(),A.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),A.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var W={};A.r(W),A.d(W,{g:()=>l_});var H=A(500),L=A.n(H),P=A(641);class F{name;notify;constructor(e,t){this.name=e,this.notify=t}}class B{observer;unsubscribeCallback;constructor(e,t){this.observer=e,this.unsubscribeCallback=t}unsubscribe(){this.unsubscribeCallback(this.observer)}}let U=new class{observers;constructor(){this.observers=new Set}broadcast(e){this.observers&&this.observers.forEach(t=>{e.name===t.name&&t.notify(e)})}subscribe(e,t){let o=new F(e,t);return this.observers.add(o),new B(o,e=>{this.observers.delete(e)})}unsubscribe(e){e&&e.unsubscribe()}},Z="ON_DRAG_START",j="ON_DRAG_END",V=null,$=new Map;class K extends P.Component{dndComponentRef=P.createRef();mounted=!1;onDragStartSubscription;onDragEndSubscription;constructor(e){super(e),this.onDragStartSubscription=U.subscribe(Z,e=>{let t=null!==e.content&&$.get(e.content);this.setState({isDroppable:this.canDrop(void 0,t,this.props.dndData)})}),this.onDragEndSubscription=U.subscribe(j,()=>{this.mounted&&this.setState({isDroppable:!1})}),this.state={isDragging:!1,isDroppable:!1,isOver:!1}}componentDidMount(){if(this.mounted=!0,null!==V){let e=$.get(V);this.setState({isDroppable:this.canDrop(void 0,e,this.props.dndData)})}}componentWillUnmount(){this.mounted=!1,this.onDragStartSubscription.unsubscribe(),this.onDragEndSubscription.unsubscribe()}canDrop(e,t,o){let{canDrop:r}=this.props;return r&&("boolean"==typeof r||r(e,t,o))}addDragEndEventListenerOnce(){let e=this.dndComponentRef?.current;e&&(e.removeEventListener("dragend",this.onDragEnd),e.addEventListener("dragend",this.onDragEnd,{once:!0}))}isDraggable(){let{canDrag:e,dndData:t}=this.props;return!!e&&("boolean"==typeof e||e(t))}onDragEnter(e){if(e.stopPropagation(),this.setState({isOver:!0}),this.props.onDragEnter){let t=$.get(V);this.props.onDragEnter(e,t,this.props.dndData)}}onDragLeave(e){e.stopPropagation();let t=$.get(V);this.props.onDragLeave&&this.props.onDragLeave(e,t,this.props.dndData),this.setState({isDroppable:this.canDrop(void 0,t,this.props.dndData),isOver:!1})}onDrag(e){e.stopPropagation()}onDragOver(e){e.stopPropagation();let t=$.get(V);this.canDrop(e,t,this.props.dndData)&&(e.preventDefault(),this.setState({isOver:!0}))}onDragStart(e){e.stopPropagation();let{dndData:t,dndId:o,onBeginDrag:r}=this.props;V=o,$.set(V,t),this.addDragEndEventListenerOnce(),U.broadcast({name:Z,content:V}),r&&r(e,t),this.setState({isDragging:!0})}onDragEnd=e=>{e.stopPropagation();let{dndData:t,onEndDrag:o}=this.props;o&&o(e,$.get(V),t),U.broadcast({name:j,content:V}),$.delete(V),V=null,this.mounted&&this.setState({isDragging:!1})};onDrop(e){e.stopPropagation();let{dndData:t,onDrop:o}=this.props;o&&(o(e,$.get(V),t),this.setState({isOver:!1}))}cloneChildrenWithShallowMergedProps(e,t){if(e)return P.Children.map(e,e=>P.isValidElement(e)?P.cloneElement(e,t):e)}render(){let{children:e,className:t,forwardDndPropsToChildren:o,style:r}=this.props,{isDragging:i,isDroppable:n,isOver:s}=this.state,l=this.isDraggable(),a=L()("dnd-component",t,{draggable:l,dragging:i,droppable:n,hovering:s});return P.createElement("div",{className:a,draggable:l,onDrag:e=>this.onDrag(e),onDragEnter:e=>this.onDragEnter(e),onDragLeave:e=>this.onDragLeave(e),onDragOver:e=>this.onDragOver(e),onDragStart:e=>this.onDragStart(e),onDrop:e=>this.onDrop(e),ref:this.dndComponentRef,style:r},o?this.cloneChildrenWithShallowMergedProps(e,{isDraggable:l,isDragging:i,isDroppable:n,isOver:s}):e)}}var Y=K;function q(e,t,o){return(e=e<=o?e:o)>=t?e:t}function X(e){for(let t in e)if(Object.hasOwn(e,t))return!0;return!1}function J(e,t,o=1){let r=0;for(let i in e)if(Object.hasOwn(e,i)&&t(e[i])&&++r>=o)return!0;return r>=o}let Q="commit-node",ee="merge-conflict-node",et="merge-node",eo="unsupported-rebase-warning-node",er="stash-node",ei="work-dir-changes";var en=((n=en||{}).RowEntry="rowEntry",n.Tooltip="tooltip",n);let es="--num-columns-supported",el={"--graph-row-height":"22px","--font-default":"'Open Sans', Arial, sans-serif !important","--font-monospace":"'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace","--font-size":"62.5%","--fs-1":"1rem","--fs-2":"1.2rem","--fs-3":"1.4rem","--fs-4":"1.6rem","--fs-5":"1.8rem","--fs-6":"2rem","--fs-7":"2.4rem","--button-xs-padding-y":".15rem","--button-xs-padding-x":".25rem","--button-small-padding-y":".25rem","--button-small-padding-x":".5rem","--button-medium-padding-y":".5rem","--button-medium-padding-x":".75rem","--button-large-padding-y":"1rem","--button-large-padding-x":"1.25rem","--button-radius":".2rem","--input-radius":"3px","--about-modal-bg-color":"#e2e4e9","--about-modal-width":"650px","--label__purple-color-f25":"rgba(197,23,182,0.25)","--registration-modal-width":"400px","--file-history-header-height":"35px","--shop-modal-width":"95vw","--shop-modal-height":"95vh","--scrollable-scrollbar-thickness":"14px","--mini-commit-col-left-width":"30px","--mini-commit-col-middle-padding":"6px","--mini-commit-col-right-width":"56px","--fuzzy-finder-repo-color":"rgba(46,206,157,0.1)","--fuzzy-finder-checkout-color":"rgba(6,105,247,0.1)","--fuzzy-finder-history-color":"rgba(197,23,182,0.1)","--handle-width":"7px","--shadow-color":"rgba(0,0,0,0.4)","--graph-color-5-f10":"rgba(205,1,1,0.1)","--graph-color-6-f10":"rgba(242,93,46,0.1)","--graph-color-7-f10":"rgba(242,202,51,0.1)","--graph-color-8-f10":"rgba(123,217,56,0.1)","--graph-color-9-f10":"rgba(46,206,157,0.1)","--graph-color-0-f10":"rgba(21,160,191,0.1)","--graph-color-1-f10":"rgba(6,105,247,0.1)","--graph-color-2-f10":"rgba(142,0,194,0.1)","--graph-color-3-f10":"rgba(197,23,182,0.1)","--graph-color-4-f10":"rgba(217,1,113,0.1)","--graph-color-5-f50":"rgba(205,1,1,0.5)","--graph-color-6-f50":"rgba(242,93,46,0.5)","--graph-color-7-f50":"rgba(242,202,51,0.5)","--graph-color-8-f50":"rgba(123,217,56,0.5)","--graph-color-9-f50":"rgba(46,206,157,0.5)","--graph-color-0-f50":"rgba(21,160,191,0.5)","--graph-color-1-f50":"rgba(6,105,247,0.5)","--graph-color-2-f50":"rgba(142,0,194,0.5)","--graph-color-3-f50":"rgba(197,23,182,0.5)","--graph-color-4-f50":"rgba(217,1,113,0.5)","--axo-orange":"#e75225","--axo-ink":"#141422","--axo-cream":"#f9efc1","--axo-yellow":"#d8c13a","--info-bar-height":"26px","--left-panel-header-height":"60px","--toolbar-height":"48px","--toolbar-border":"1px","--toolbar-item-height":"calc(var(--toolbar-height, 0px) - var(--toolbar-border, 1px))","--expand-detail-panel-transition":"flex-grow 250ms ease-in-out","--conflict-left-color":"rgba(21,160,191,0.25)","--conflict-right-color":"rgba(242,202,51,0.25)","--conflict-output-color":"rgba(197,23,182,0.25)","--graph-color-5-bg50":"#751012","--graph-color-6-bg50":"#873e29","--graph-color-7-bg50":"#87742b","--graph-color-8-bg50":"#4c7c2e","--graph-color-9-bg50":"#257660","--graph-color-0-bg50":"#195f71","--graph-color-1-bg50":"#11448d","--graph-color-2-bg50":"#550f73","--graph-color-3-bg50":"#711b6d","--graph-color-4-bg50":"#7b104a","--graph-color-5-bg45":"#6c1114","--graph-color-6-bg45":"#7c3a28","--graph-color-7-bg45":"#7c6b2a","--graph-color-8-bg45":"#47722c","--graph-color-9-bg45":"#246d5a","--graph-color-0-bg45":"#195969","--graph-color-1-bg45":"#124082","--graph-color-2-bg45":"#4f116b","--graph-color-3-bg45":"#681b65","--graph-color-4-bg45":"#711146","--graph-color-5-bg25":"#48171b","--graph-color-6-bg25":"#522e26","--graph-color-7-bg25":"#524927","--graph-color-8-bg25":"#344d28","--graph-color-9-bg25":"#214a42","--graph-color-0-bg25":"#1a3f4a","--graph-color-1-bg25":"#173158","--graph-color-2-bg25":"#39174b","--graph-color-3-bg25":"#461c48","--graph-color-4-bg25":"#4b1737","--graph-color-5-bg15":"#371a1e","--graph-color-6-bg15":"#3c2725","--graph-color-7-bg15":"#3c3825","--graph-color-8-bg15":"#2a3a26","--graph-color-9-bg15":"#1f3835","--graph-color-0-bg15":"#1b323a","--graph-color-1-bg15":"#192943","--graph-color-2-bg15":"#2d1a3b","--graph-color-3-bg15":"#351d39","--graph-color-4-bg15":"#381a2f","--semi-bold":"500","--bold":"600","--num-columns-supported":"10","--column-0-color":"#15a0bf","--column-1-color":"#0669f7","--column-2-color":"#8e00c2","--column-3-color":"#c517b6","--column-4-color":"#d90171","--column-5-color":"#cd0101","--column-6-color":"#f25d2e","--column-7-color":"#f2ca33","--column-8-color":"#7bd938","--column-9-color":"#2ece9d","--red":"#D9413D","--orange":"#DE9B43","--yellow":"#ECB91C","--green":"#5CB85C","--blue":"#4D88FF","--ltblue":"#5bc0de","--app__bg0":"#1C1E23","--toolbar__bg0":"rgb(42,45,52)","--toolbar__bg1":"rgb(51,55,63)","--toolbar__bg2":"rgb(65,70,80)","--panel__bg0":"rgb(39,42,49)","--panel__bg1":"rgb(50,54,63)","--panel__bg2":"rgb(61,66,77)","--input__bg":"rgba(0,0,0,0.2)","--input-bg-warn-color":"rgba(222,155,67,0.6)","--panel-border":"rgb(19,20,24)","--section-border":"rgba(255,255,255,0.08)","--subtle-border":"rgba(255,255,255,0.04)","--modal-overlay-color":"rgba(0,0,0,.5)","--graph-color-0":"#15a0bf","--graph-color-1":"#0669f7","--graph-color-2":"#8e00c2","--graph-color-3":"#c517b6","--graph-color-4":"#d90171","--graph-color-5":"#cd0101","--graph-color-6":"#f25d2e","--graph-color-7":"#f2ca33","--graph-color-8":"#7bd938","--graph-color-9":"#2ece9d","--text-selected":"#FFFFFF","--text-selected-row":"#FFFFFF","--text-dimmed":"rgba(255,255,255,0.2)","--text-dimmed-selected":"rgba(255,255,255,0.5)","--text-normal":"rgba(255,255,255,0.75)","--text-secondary":"rgba(255,255,255,0.6)","--text-disabled":"rgba(255,255,255,0.4)","--text-accent":"#93A9EC","--text-inverse":"#222222","--text-bright":"#FFFFFF","--btn-text":"rgba(255,255,255,0.75)","--btn-text-hover":"#FFFFFF","--default-border":"rgba(255,255,255,0.75)","--default-bg":"transparent","--default-hover":"transparent","--default-border-hover":"#FFFFFF","--primary-border":"#4D88FF","--primary-bg":"rgba(77,136,255,0.2)","--primary-hover":"rgba(77,136,255,0.6)","--success-border":"#5CB85C","--success-bg":"rgba(92,184,92,0.2)","--success-hover":"rgba(92,184,92,0.6)","--warning-border":"#DE9B43","--warning-bg":"rgba(222,155,67,0.2)","--warning-hover":"rgba(222,155,67,0.6)","--danger-border":"#D9413D","--danger-bg":"rgba(217,65,61,0.2)","--danger-hover":"rgba(217,65,61,0.6)","--hover-row":"rgba(77,136,255,0.1)","--hover-row-border":"none","--danger-row":"rgba(217,65,61,0.6)","--selected-row":"rgba(77,136,255,0.2)","--selected-row-border":"none","--warning-row":"rgba(222,155,67,0.6)","--droppable":"rgba(236,185,28,0.3)","--drop-target":"rgba(92,184,92,0.5)","--input--disabled":"rgba(0,0,0,0.1)","--link-color":"#40c5ec","--link-color-bright":"#40c5ec","--form-control-focus":"#4D88FF","--scroll-thumb-border":"#1C1E23","--scroll-thumb-bg":"rgb(65,70,80)","--scroll-thumb-bg-light":"rgb(111,119,136)","--wip-status":"rgba(77,136,255,0.4)","--card__bg":"rgb(61,66,77)","--card-shadow":"rgba(0,0,0,.2)","--statusbar__warning-bg":"#87742b","--label__yellow-color":"#f2ca33","--label__light-blue-color":"#15a0bf","--label__purple-color":"#c517b6","--filtering":"rgba(77,136,255,0.5)","--soloing":"rgba(222,155,67,0.5)","--checked-out":"rgba(92,184,92,0.3)","--soloed":"rgba(222,155,67,0.3)","--filter-match":"rgba(77,136,255,0.5)","--clone__progress":"rgba(77,136,255,0.7)","--toolbar__prompt":"rgba(77,136,255,0.2)","--verified":"rgba(92,184,92,0.3)","--unverified":"rgba(255,255,255,0.1)","--drop-sort-border":"#5CB85C","--terminal__repo-name-color":"turquoise","--terminal__repo-branch-color":"violet","--terminal__repo-tag-color":"lightcoral","--terminal__repo-upstream-color":"yellowgreen","--terminal__background":"#000000","--terminal__cursor":"#FFFFFF","--terminal__cursorAccent":"#000000","--terminal__foreground":"#FFFFFF","--terminal__selection":"#304676","--terminal__black":"#000000","--terminal__red":"#F24A4A","--terminal__green":"#0DBC79","--terminal__yellow":"#E5E510","--terminal__blue":"#4A98EE","--terminal__magenta":"#E063E0","--terminal__cyan":"#11A8CD","--terminal__white":"#E5E5E5","--terminal__brightBlack":"#686868","--terminal__brightRed":"#FF5656","--terminal__brightGreen":"#23D18B","--terminal__brightYellow":"#F5F543","--terminal__brightBlue":"#51A4FF","--terminal__brightMagenta":"#D670D6","--terminal__brightCyan":"#29B8DB","--terminal__brightWhite":"#E5E5E5","--code-bg":"#1C1E23","--code-foreground":"rgba(255,255,255,0.75)","--code-blame-color-0":"#15a0bf","--code-blame-color-1":"#0669f7","--code-blame-color-2":"#8e00c2","--code-blame-color-3":"#c517b6","--code-blame-color-4":"#d90171","--code-blame-color-5":"#cd0101","--code-blame-color-6":"#f25d2e","--code-blame-color-7":"#f2ca33","--code-blame-color-8":"#7bd938","--code-blame-color-9":"#2ece9d","--added-line":"rgba(92,184,92,0.2)","--deleted-line":"rgba(217,65,61,0.2)","--modified-line":"rgba(0,0,0,0.25)","--conflict-info-color":"#15a0bf","--conflict-left-border-color":"#15a0bf","--conflict-right-border-color":"#f2ca33","--conflict-output-border-color":"#c517b6","--scroll-marker-head-color":"#16c216","--scroll-marker-highlights-color":"#e6e62b","--scroll-marker-local-branches-color":"#ffa500","--scroll-marker-pull-requests-color":"#ff8f18","--scroll-marker-remote-branches-color":"#ffd68b","--scroll-marker-selection-color":"#0821ff","--scroll-marker-stashes-color":"#fb94ff","--scroll-marker-tags-color":"#affcff","--scroll-marker-upstream-color":"#9bff9b","--stats-added-color":"#347d39","--stats-deleted-color":"#c93c37","--stats-files-color":"#e2c08d","--stats-bar-border-radius":"3px","--stats-bar-height":"40%"};function ea(e){return`--column-${e}-color`}function eh(e={}){let t={},o=Object.entries(e),r=[];for(let[e,i]of o)i?.includes("var(")?r.push([e,i]):t[e]=i;if(r.length>0){let e=document.querySelector(".gk-graph")||document.documentElement,i=document.createElement("div");for(let[e,t]of(i.style.display="none",o))e.startsWith("--")&&i.style.setProperty(e,t);e.appendChild(i);try{let e=getComputedStyle(i);for(let[o,n]of r){i.style.setProperty("--temp-resolve",n);let r=e.getPropertyValue("--temp-resolve").trim();t[o]=r||n}}finally{e.removeChild(i)}}return function(e={}){return{...el,...e}}(t)}let ec={HEAD:"head",REMOTE:"remote",TAG:"tag",WORKTREE:"worktree"};var ed=((s=ed||{}).LEFT="LEFT",s.RIGHT="RIGHT",s);let eu="#199489",ep=3,ef=26,em=28,eg=22,ev=50*em,ey=em-eg,eS=.5,ew=3,eC=3,eR=em,eb=eg,e_=3,eT=eb/2,ex=56,eE=56,eM=32,eI=eg,eO=eI-4,ez=55,eD=50,ek="short+short",eG=55,eN=50,eA=50,eW=50,eH=55,eL=18,eP=32,eF=2,eB=6,eU=14,eZ=5,ej=eU+eZ,eV=10,e$=55,eK=100,eY=50,eq=10,eX=25,eJ=58,eQ=22,e0=2,e1={dark:1,light:.5},e2=10,e5=12,e3=6,e6=3,e4=12,e7="auto",e9="center",e8=7,te=4,tt="timelineMessage",to="ref",tr="graph",ti="message",tn="author",ts="datetime",tl="sha",ta="changes",th="gk.empty-set-marker";var tc=((l=tc||{}).Compact="compact",l.Rich="rich",l.Text="text",l),td=((a=td||{}).Block="block",a.FullLine="fullLine",a.ThinLine="thinLine",a);let tu={block:{type:"block",baseHeight:+em,minHeight:5,maxHeight:20},fullLine:{type:"fullLine",baseHeight:.5*em,minHeight:2,maxHeight:4},thinLine:{type:"thinLine",baseHeight:.25*em,minHeight:1,maxHeight:2}},tp={stashes:{type:"stashes",colorCssKey:"--scroll-marker-stashes-color",lanes:[0],shape:"block"},tags:{type:"tags",colorCssKey:"--scroll-marker-tags-color",lanes:[2],shape:"block"},remoteBranches:{type:"remoteBranches",colorCssKey:"--scroll-marker-remote-branches-color",lanes:[2],shape:"block"},localBranches:{type:"localBranches",colorCssKey:"--scroll-marker-local-branches-color",lanes:[0],shape:"block"},highlights:{type:"highlights",colorCssKey:"--scroll-marker-highlights-color",lanes:[1],shape:"block"},upstream:{type:"upstream",colorCssKey:"--scroll-marker-upstream-color",lanes:[1,2],shape:"block"},pullRequests:{type:"pullRequests",colorCssKey:"--scroll-marker-pull-requests-color",lanes:[2],shape:"block"},head:{type:"head",colorCssKey:"--scroll-marker-head-color",lanes:[0,1],shape:"block"},selection:{type:"selection",colorCssKey:"--scroll-marker-selection-color",lanes:[0,1,2],shape:"fullLine"}},tf=10,tm=6,tg={[tn]:{headerLabelUntranslated:"GraphHeader-CommitAuthor",isCustomizable:!0,listId:"commit-author-zone",minimumWidth:eM,showIconWidth:ez},[ts]:{headerLabelUntranslated:"GraphHeader-CommitDateTime",isCustomizable:!0,listId:"commit-date-time-zone",minimumWidth:eD,showIconWidth:eG},[ti]:{headerLabelUntranslated:"GraphHeader-CommitMessage",isCustomizable:!0,listId:"commit-message-zone",minimumWidth:eW,showIconWidth:eH},[tl]:{headerLabelUntranslated:"GraphHeader-CommitSha",isCustomizable:!0,listId:"commit-sha-zone",minimumWidth:eN,showIconWidth:eA},[tr]:{headerLabelUntranslated:"GraphHeader-CommitGraph",isCustomizable:!0,listId:"commit-zone",minimumWidth:ex,showIconWidth:eE},[to]:{headerLabelUntranslated:"GraphHeader-BranchTag",isCustomizable:!0,listId:"ref-zone",minimumWidth:eP,showIconWidth:e$},[ta]:{headerLabelUntranslated:"GraphHeader-Changes",isCustomizable:!0,listId:"changes-zone",minimumWidth:eY,showIconWidth:eJ}},tv={hour:24,day:7,week:4,month:12,year:10},ty={added:0,deleted:0,modified:0};var tS=((h=tS||{}).ALWAYS="ALWAYS",h.ON_HOVER="ON_HOVER",h.NEVER="NEVER",h);let tw="pullRequest",tC="upstream",tR="issue",tb=[tw,tC,tR],t_={[ec.WORKTREE]:3,[ec.HEAD]:2,[ec.REMOTE]:1,[ec.TAG]:0};class tT{_graph;_message;_heads;_remotes;_tags;_activeGraphRef;_activeGraphRefGroup;_refGroupsByName;_orderedRefGroups;sha;parents;author;email;date;type;contexts;rowIndex;column;columnForColoring;edgeColumnMaxes;edges;childRefs;timeLineEntry;summary;body;displaySummary;displayBody;set message(e){if(this._message!==e){this._message=e;let t=this._graph.formatCommitMessageCallback(e);this.displaySummary=t.summary,this.displayBody=t.body}}get message(){return this._message}get heads(){return this._heads}set heads(e){this._heads!==e&&(this._heads=e,this.initializeRefGroups())}set remotes(e){this._remotes!==e&&(this._remotes=e,this.initializeRefGroups())}get remotes(){return this._remotes}set tags(e){this._tags!==e&&(this._tags=e,this.initializeRefGroups())}get tags(){return this._tags}get hasRefs(){return this.heads.length>0||this.remotes.length>0||this.tags.length>0}get hasChildRefs(){return this.childRefs.heads.length>0||this.childRefs.remotes.length>0||this.childRefs.tags.length>0}get hidden(){return null==this.rowIndex}get refsData(){if(this.hasRefs||this.hasChildRefs)return 0===this._orderedRefGroups.length&&this.loadGraphRefGroupsData(),{activeGraphRef:this._activeGraphRef,activeGraphRefGroup:this._activeGraphRefGroup,orderedRefGroups:this._orderedRefGroups,refGroupsByName:this._refGroupsByName}}constructor(e,t,o,r,i,n,s,l){this._graph=e,this._heads=t.heads||[],this._remotes=t.remotes||[],this._tags=t.tags||[],this.message=t.message,this.sha=t.sha,this.parents=t.parents,this.author=t.author,this.email=t.email,this.date=t.date,this.type=t.type,this.contexts=t.contexts,this.column=o||0,this.columnForColoring=l,this.edgeColumnMaxes=r||0,this.edges=i||{},this.childRefs=n||{heads:[],tags:[],remotes:[]},this.timeLineEntry=s,this.initializeRefGroups()}initializeRefGroups(){this._activeGraphRefGroup=void 0,this._activeGraphRef=void 0,this._refGroupsByName={},this._orderedRefGroups=[]}addRefToRefGroup(e){let t=e.name;this._refGroupsByName[t]||(this._refGroupsByName[t]=[]),this._refGroupsByName[t].push(e)}loadGraphRefGroupsData(){this.initializeRefGroups();let e=[],{heads:t,tags:o,remotes:r}=this.hasRefs?this:this.childRefs;for(let o of t){var i;let t={...o,refType:ec.HEAD};this.addRefToRefGroup(t),(i=t).refType===ec.HEAD&&tX(i)?(this._activeGraphRefGroup=this._refGroupsByName[t.name],this._activeGraphRef=t,e.unshift(this._refGroupsByName[t.name])):e.push(this._refGroupsByName[t.name])}for(let t of r){let o={...t,fullName:t.owner?`${t.owner}/${t.name}`:t.name,refType:ec.REMOTE},r=this._refGroupsByName[o.name];this.addRefToRefGroup(o),r||e.push(this._refGroupsByName[o.name])}for(let t of o){let o={...t,refType:ec.TAG};this.addRefToRefGroup(o),e.push(this._refGroupsByName[o.name])}this._orderedRefGroups=e.sort((e,t)=>e===this._activeGraphRefGroup?-1:t===this._activeGraphRefGroup?1:t_[e[0].refType]>t_[t[0].refType]?-1:t_[e[0].refType]<t_[t[0].refType]?1:e.length>t.length?-1:e.length<t.length?1:e[0].name.localeCompare(t[0].name))}}let tx=e=>{let t;return(...o)=>{t&&cancelAnimationFrame(t),t=requestAnimationFrame(()=>{e(...o)})}};function tE(e){return 1>Math.abs(e.scrollHeight-e.scrollTop-e.clientHeight)}function tM(e){return e?"string"==typeof e?e:JSON.stringify(e):null}function tI(e,t,o,r,i){let{id:n}=e;if(!n||null===t||t?.[n]===null||r&&t?.[n]?.[r]===null)return null;let s=()=>{if(!i||!(n in i))return null;let e=i[n];return e?r?e[r]:e:null};return t&&n in t?r&&!t[n]?.[r]?(o(n,[r]),s()):r?t?.[n]?.[r]:t?.[n]:(o(n,tb),s())}function tO(e){let t=Math.floor(e/36e5);if(t<24){if(0===t)return{label:"Timeline-Now",value:0};if(1===t)return{label:"Timeline-1HourAgo",value:1};if(t>0)return{label:"Timeline-NHoursAgo",value:t}}let o=Math.floor(e/864e5);if(o<7){if(1===o)return{label:"Timeline-Yesterday",value:1};if(o>0)return{label:"Timeline-NDaysAgo",value:o}}let r=Math.floor(e/6048e5);if(r<5){if(1===r)return{label:"Timeline-1WeekAgo",value:1};if(r>0)return{label:"Timeline-NWeeksAgo",value:r}}let i=new Date,n=new Date(i.getTime()-e),s=(i.getFullYear()-n.getFullYear())*12+(i.getMonth()-n.getMonth());if(s<12){if(1===s)return{label:"Timeline-1MonthAgo",value:1};if(s>0)return{label:"Timeline-NMonthsAgo",value:s}}let l=i.getFullYear()-n.getFullYear();return 1===l?{label:"Timeline-1YearAgo",value:1}:l>0?{label:"Timeline-NYearsAgo",value:l}:{label:"Timeline-Now",value:0}}function tz(e,t){if(t.id)return t.id;let o=t.owner||"";return e===ec.REMOTE?`${e}/${o}/${t.name}`:`${e}/${t.name}`}function tD(e){return tz(e.refType,e)}function tk(e,t=0){for(let o=e.length-1;o>=t;o-=1){let t=e[o];if(t.currentWidth>t.minimumWidth)return t}}function tG(e,t=!1){let o="--scrollable-scrollbar-thickness",r=t||!e[o]?eh(e):e,i=r[o]?parseInt(r[o],10):0;return Number.isNaN(i)?0:i}function tN(e,t){let o=0;for(let r of e)t&&r.type===t||(o+=r.currentWidth);return o}let tA=(e,t)=>e===t[t.length-1].type;function tW(e,t,o){return e+ +!!(t||o||0===e)}function tH(e,t){return e.type===tr&&t>0?e.contentWidth||0:e.currentWidth}function tL(e,t,o,r,i){var n;let s=tB(e,t);return s?(n=o.length,s.currentWidth<tH(s,n))?tG(r,i):0:0}function tP(e,t,o,r,i,n,s,l,a){var h,c,d,u,p,f,m;let g,v=tB(e,t);return v&&(h=v,c=t,d=o,u=r,p=i,f=n.length,m=s,g=em*tW(f,d,u),tA(h.type,c)&&(p<g||m))?tG(l,a):0}function tF(e,t,o){return q(o,e.minimumWidth||0,e.maximumWidth&&!tA(e.type,t)?e.maximumWidth||0:Number.MAX_VALUE)}function tB(e,t){return t.find(({type:t})=>t===e)}function tU(e){return!!e&&e.currentWidth<=e.showIconWidth}function tZ(e,t){return t.findIndex(({type:t})=>t===e)}function tj(e,t,o){let r=0,i=0,n=tZ(e,t);if(n>-1){let e=function(e,t=0){let o=0;for(let r=t;r<e.length;r+=1)o+=e[r].minimumWidth;return o}(t,n+1),s=function(e,t=e.length-1){let o=0;for(let r=0;r<=t;r+=1)o+=e[r].currentWidth;return o}(t,n-1),l=Math.min(t[n].maximumWidth||Number.MAX_VALUE,o-e-s);r=t[n].minimumWidth,i=l}return{min:r,max:i}}function tV(e){let t=!!e&&e===tc.Compact,o=t?1:2,r=t?10:28,i=t?1:3,n=t?1:3,s=t?10:22,l=t?s:eb,a=t?s:s/2+1;return{COMMIT_ZONE_LINE_WIDTH:o,COMMIT_ZONE_GUTTER_WIDTH:r,COMMIT_ZONE_PADDING_LEFT:i,COMMIT_ZONE_PADDING_RIGHT:n,COMMIT_COLUMN_WIDTH:s,COMMIT_NODE_DIAMETER:l,COMMIT_MERGE_NODE_DIAMETER:a,COMMIT_NODE_TOP_OFFSET:.5*eb-.5*l,COMMIT_MERGE_NODE_LEFT_OFFSET:s/2-a/2,COMMIT_MERGE_NODE_TOP_OFFSET:.5*eb-.5*a,COMMIT_ZONE_AVATAR_DIAMETER:l-2*o,COMMIT_ZONE_VIEWPORT_WIDTH_MIN:l+i+n+r,COMMIT_ZONE_SHOW_ICON_WIDTH:t?45:56,IS_COMPACT:t,RADIUS_DIFF_MERGE_NODE_COMMIT_NODE:l/2-a/2}}function t$(e){return e instanceof tT?!!e.refsData?.activeGraphRef:!!e?.heads&&e.heads.some(e=>tX(e))}function tK(e){return[ee,eo,ei].includes(e)}function tY(e){return!!e&&J(e,e=>"number"==typeof e&&e>0)}function tq(e,t){return e.has(t)&&1===e.size}function tX(e){return e.isCurrentHead}class tJ{props;constructor(e){this.props=e}getActiveGraphZone(e){let t=tB(e,this.props.graphZones);return!t||t.isHidden?void 0:t}getGraphRefGroupsByNameForRow(e){let t=this.getRow(e);return t&&t.refsData?.orderedRefGroups||[]}getRow(e){if(!(e<0)&&!(e>this.props.processedRows.length-1))return this.props.processedRows[e]}getZoneWidth(e,t=!0){var o;let r=t?this.getVerticalScrollWidth(e):0;return o=this.props.graphZones,(tB(e,o)?.currentWidth||tg[e].minimumWidth)-r}isDateTimeZoneActive(){return!!this.getActiveGraphZone(ts)}shouldShowTimelines(){return this.props.alwaysShowTimelines||!this.isDateTimeZoneActive()}isFirstRow(e){return 0===e}isColumnFollowingGraphColumn(e){var t;let o,r;return o=tZ(e,t=this.props.graphZones),r=tZ(tr,t),-1!==o&&-1!==r&&o-r==1}isHighlighted(e){if(this.props.processedRows[e]&&this.props.highlightedShas){let t=this.props.processedRows[e]?.sha;return this.props.highlightedShas[t]||!1}return!1}isHovering(e){return!!this.props.processedRows[e]&&this.props.currentlyHoveredCommitSha===this.props.processedRows[e]?.sha}isLastColumn(e){return tA(e,this.props.graphZones)}getSelectedRefGroupByName(){if(1===this.props.selectedShas.size){let e=this.props.selectedShas[Symbol.iterator]().next().value;if(e){let t=this.props.processedGraphRowBySha[e];if(t)return t.refsData?.orderedRefGroups||[]}}return[]}getHorizontalScrollHeight(e){return tL(e,this.props.graphZones,this.props.processedRows,this.props.cssVariables)}getVerticalScrollWidth(e){return tP(e,this.props.graphZones,this.props.hasMoreCommits,this.props.isLoadingRows,this.props.height,this.props.processedRows,this.props.enabledScrollMarkerTypes.length>0,this.props.cssVariables)}shouldUseColumnHeaderIcons(e){let t=tB(e,this.props.graphZones);return!!t&&tU(t)}isMissingHoveredRefGroup(e){if(this.props.highlightedShas)return!1;let t=this.getRow(e);if(!t)return!1;let o=[];if(this.props.dimRowsOfSelectedCommit){let e=this.getSelectedRefGroupByName();if(!e.length)return!1;o=e[0]}else{let{hoveredRefGroup:e}=this.props;if(!e?.length)return!1;o=e}let{name:r,refType:i}=o[0],n=i===ec.TAG,s=t.tags.length>0&&!t.heads.length&&!t.remotes.length,{heads:l,tags:a,remotes:h}=t.hasRefs&&(!s||n)?t:t.childRefs;return!l.length&&!h.length&&!a.length||!l.some(e=>e.name===r&&o.some(e=>e.refType===ec.HEAD))&&!h.some(e=>e.name===r&&o.some(t=>t.refType===ec.REMOTE&&t.owner===e.owner))&&!a.some(e=>e.name===r&&o.some(e=>e.refType===ec.TAG))}isSelected(e){let t=this.getRow(e)?.sha;return!!t&&this.props.selectedShas.has(t)}isSingleSelected(e){let t=this.getRow(e)?.sha;return!!t&&tq(this.props.selectedShas,t)}hasTimeline(e){if(!this.shouldShowTimelines())return!1;let t=this.props.processedRows[e];return!!t?.timeLineEntry&&!(e*em-this.props.scrollTop<em)}rowContainsCurrentHeadRef(e){return t$(e)}}class tQ extends P.PureComponent{resizeObserver;scrollbarContainerRef=P.createRef();horizontalScrollRef=P.createRef();scrollabbleContentRef=P.createRef();verticalScrollRef=P.createRef();outerHorizontalScrollRef=P.createRef();constructor(e){super(e),this.resizeObserver=new ResizeObserver(e=>e.forEach(e=>this.onContainerResized(e.contentRect.width,e.contentRect.height)))}updateScrollbarValues(e,t){this.horizontalScrollRef?.current&&(this.horizontalScrollRef.current.scrollLeft=e||0),this.verticalScrollRef?.current&&(this.verticalScrollRef.current.scrollTop=t||0)}componentDidUpdate(e){let{scrollLeft:t,scrollTop:o}=this.props;(e.scrollLeft!==t||e.scrollTop!==o)&&this.updateScrollbarValues(t,o)}onHorizontalScroll(e){this.props.onScroll&&this.props.onScroll({clientHeight:this.props.height||0,clientWidth:e.target.clientWidth,scrollHeight:this.getAdjustedContentHeight(),scrollLeft:e.target.scrollLeft,scrollTop:this.props.scrollTop||0,scrollWidth:e.target.scrollWidth})}onVerticalScroll(e){let t=1>Math.abs(e.target.scrollTop-(this.props.scrollTop??0));this.props.onScroll&&!t&&this.props.onScroll({clientHeight:e.target.clientHeight,clientWidth:this.props.width||0,scrollHeight:e.target.scrollHeight,scrollLeft:this.props.scrollLeft||0,scrollTop:e.target.scrollTop,scrollWidth:this.props.contentWidth||0})}onWheel(e){if(!this.props.onScroll||!this.verticalScrollRef.current&&!this.props.forceOnVerticalWheel&&!this.horizontalScrollRef.current&&!this.props.forceOnHorizontalWheel)return;let t=this.props.scrollLeft||0,o=t;if(this.horizontalScrollRef.current||this.props.forceOnHorizontalWheel){var r;o+=e.deltaX,(o=o>=0?o:0)>t&&this.horizontalScrollRef?.current&&1>Math.abs((r=this.horizontalScrollRef.current).scrollWidth-r.scrollLeft-r.clientWidth)&&(o=t)}let i=this.props.scrollTop||0,n=i;(this.verticalScrollRef.current||this.props.forceOnVerticalWheel)&&(n+=e.deltaY,(n=n>=0?n:0)>i&&this.verticalScrollRef?.current&&tE(this.verticalScrollRef.current)&&(n=i)),(n!==i||o!==t)&&this.props.onScroll({clientHeight:this.props.height||0,clientWidth:this.props.width||0,scrollHeight:this.getAdjustedContentHeight(),scrollLeft:o>=0?o:0,scrollTop:n>=0?n:0,scrollWidth:this.props.contentWidth||0})}componentDidMount(){this.updateScrollbarValues(this.props.scrollLeft,this.props.scrollTop),this.resizeObserver.observe(this.scrollbarContainerRef.current)}componentWillUnmount(){this.resizeObserver.disconnect()}onContainerResized=tx((e,t)=>{let o=this.props.contentHeight||0,r=this.props.contentWidth||0,i=this.props.scrollTop||0,n=this.props.scrollLeft||0,s=t<o?i:0,l=e<r?n:0;(i!==s||n!==l)&&(this.updateScrollbarValues(l,s),this.props.onScroll?.({clientHeight:t,clientWidth:e,scrollHeight:o,scrollLeft:l,scrollTop:s,scrollWidth:r}))});hasHorizontalScroll(){let{contentWidth:e,displayHorizontalScrollbar:t,forceHorizontalScrollbar:o,width:r}=this.props;return o||t&&r<e}hasVerticalScroll(){let{displayVerticalScrollbar:e,forceVerticalScrollbar:t,height:o}=this.props;return t||e&&o<this.getAdjustedContentHeight()}getHorizontalScrollbarTickness(){return parseInt(this.outerHorizontalScrollRef.current?.clientHeight,10)||0}getAdjustedContentHeight(){return this.props.contentHeight+this.getHorizontalScrollbarTickness()}adjustScrollWhileDragging(e){let t,o=this.getAdjustedContentHeight();if(!this.scrollabbleContentRef.current||this.props.height>=o||!this.props.onScroll)return;let r=this.scrollabbleContentRef.current.getBoundingClientRect(),i=e.clientY-r.top,n=Math.abs(o-this.props.height);if(this.props.scrollTop>0&&i<=20){let e=this.props.scrollTop-20;t={clientHeight:r.height,clientWidth:r.width,scrollHeight:n,scrollLeft:this.props.scrollLeft||0,scrollTop:e>0?e:0,scrollWidth:this.props.contentWidth||0}}if(this.props.scrollTop<n&&i>=this.props.height-20){let e=this.props.scrollTop+20;t={clientHeight:r.height,clientWidth:r.width,scrollHeight:n,scrollLeft:this.props.scrollLeft||0,scrollTop:e<n?e:n,scrollWidth:this.props.contentWidth||0}}t&&this.props.onScroll(t)}render(){let{children:e,contentHeight:t,contentWidth:o,forceHorizontalScrollbar:r,forceVerticalScrollbar:i,height:n,width:s}=this.props,l=this.hasVerticalScroll(),a=this.hasHorizontalScroll(),h=a&&P.createElement("div",{className:"scrollbar-outer horizontal",ref:this.outerHorizontalScrollRef,style:{top:`calc(${n}px - var(--scrollable-scrollbar-thickness))`,width:s}},P.createElement("div",{className:"scrollbar-inner horizontal_scrollbar",onScroll:e=>this.onHorizontalScroll(e),ref:this.horizontalScrollRef,style:{overflowX:r?"scroll":"auto",width:l?`calc(${s}px - var(--scrollable-scrollbar-thickness))`:s}},P.createElement("div",{style:{height:"1px",width:o}}))),c=l&&P.createElement("div",{className:"scrollbar-outer vertical",style:{height:n}},P.createElement("div",{className:"scrollbar-inner vertical_scrollbar",onScroll:e=>this.onVerticalScroll(e),ref:this.verticalScrollRef,style:{overflowY:i?"scroll":"auto",height:a?`calc(${n}px - var(--scrollable-scrollbar-thickness))`:n}},P.createElement("div",{style:{height:`calc(${t}px + var(--scrollable-scrollbar-thickness))`,width:"1px"}})));return P.createElement("div",{className:"scrollbar-container",onWheelCapture:e=>this.onWheel(e),ref:this.scrollbarContainerRef,style:{height:n,width:s}},P.createElement("div",{className:"scrollable-content",onDragOverCapture:e=>this.adjustScrollWhileDragging(e),ref:this.scrollabbleContentRef,style:{height:n,width:s}},e),h,c)}}var t0=tQ,t1=((c=t1||{})[c.Hash=35]="Hash",c[c.Slash=47]="Slash",c[c.Digit0=48]="Digit0",c[c.Digit1=49]="Digit1",c[c.Digit2=50]="Digit2",c[c.Digit3=51]="Digit3",c[c.Digit4=52]="Digit4",c[c.Digit5=53]="Digit5",c[c.Digit6=54]="Digit6",c[c.Digit7=55]="Digit7",c[c.Digit8=56]="Digit8",c[c.Digit9=57]="Digit9",c[c.Backslash=92]="Backslash",c[c.A=65]="A",c[c.B=66]="B",c[c.C=67]="C",c[c.D=68]="D",c[c.E=69]="E",c[c.F=70]="F",c[c.Z=90]="Z",c[c.a=97]="a",c[c.b=98]="b",c[c.c=99]="c",c[c.d=100]="d",c[c.e=101]="e",c[c.f=102]="f",c[c.z=122]="z",c);function t2(e){switch(e){case 48:break;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:case 65:return 10;case 98:case 66:return 11;case 99:case 67:return 12;case 100:case 68:return 13;case 101:case 69:return 14;case 102:case 70:return 15}return 0}function t5(e,t,o){return(o<0&&(o+=1),o>1&&(o-=1),o<1/6)?e+(t-e)*6*o:o<.5?t:o<2/3?e+(t-e)*(2/3-o)*6:e}function t3(e){let t,o,r,i=e.h/360,{s:n,l:s,a:l}=e;if(0===n)t=o=r=s;else{let e=s<.5?s*(1+n):s+n-s*n,l=2*s-e;t=t5(l,e,i+1/3),o=t5(l,e,i),r=t5(l,e,i-1/3)}return{type:"rgba",r:Math.round(255*t),g:Math.round(255*o),b:Math.round(255*r),a:l}}let t6=/^((?:rgb|hsl)a?)\((-?\d+%?)[,\s]+(-?\d+%?)[,\s]+(-?\d+%?)[,\s]*(-?[\d.]+%?)?\)$/i;function t4(e){let t;if(0===(e=e.trim()).length)return null;if(35===e.charCodeAt(0))return function(e){let t=(e=e.trim()).length;if(0===t||35!==e.charCodeAt(0))return null;if(7===t){let t=16*t2(e.charCodeAt(1))+t2(e.charCodeAt(2));return{type:"rgba",r:t,g:16*t2(e.charCodeAt(3))+t2(e.charCodeAt(4)),b:16*t2(e.charCodeAt(5))+t2(e.charCodeAt(6)),a:1}}if(9===t){let t=16*t2(e.charCodeAt(1))+t2(e.charCodeAt(2)),o=16*t2(e.charCodeAt(3))+t2(e.charCodeAt(4));return{type:"rgba",r:t,g:o,b:16*t2(e.charCodeAt(5))+t2(e.charCodeAt(6)),a:(16*t2(e.charCodeAt(7))+t2(e.charCodeAt(8)))/255}}if(4===t){let t=t2(e.charCodeAt(1)),o=t2(e.charCodeAt(2)),r=t2(e.charCodeAt(3));return{type:"rgba",r:16*t+t,g:16*o+o,b:16*r+r,a:1}}if(5===t){let t=t2(e.charCodeAt(1)),o=t2(e.charCodeAt(2)),r=t2(e.charCodeAt(3)),i=t2(e.charCodeAt(4));return{type:"rgba",r:16*t+t,g:16*o+o,b:16*r+r,a:(16*i+i)/255}}return null}(e);let o=t6.exec(e);if(null==o)return null;let r=o[1];switch(r){case"rgb":case"hsl":t=[parseInt(o[2],10),parseInt(o[3],10),parseInt(o[4],10),1];break;case"rgba":case"hsla":t=[parseInt(o[2],10),parseInt(o[3],10),parseInt(o[4],10),parseFloat(o[5])];break;default:return null}return"hsl"===r||"hsla"===r?t3({h:t[0],s:t[1],l:t[2],a:t[3]}):{type:"rgba",r:t[0],g:t[1],b:t[2],a:t[3]}}let t7=e=>e!==Q&&e!==et,t9=/^.*(:?\n){0,2}/m;function t8(e,t=`
|
|
2
2
|
`){return e.replace(`
|
|
3
|
-
`===t?t9:RegExp(`^.*(:?${t}){0,2}`,"m"),"")}let oe=/^co-authored-by:\s*([^\s<>]+(?:\s+[^\s<>]+)*)\s*<([^<>]+)>/gim;function ot(e){let t=[];for(let o=oe.exec(e);null!==o;o=oe.exec(e)){let[,e,r]=o;t.push({name:e,email:r})}return t}let oo=/(?<literal>\[.*?\])|(?<year>YYYY|YY)|(?<month>M{1,4})|(?<day>Do|DD?)|(?<weekday>d{2,4})|(?<hour>HH?|hh?)|(?<minute>mm?)|(?<second>ss?)|(?<fractionalSecond>SSS)|(?<dayPeriod>A|a)|(?<timeZoneName>ZZ?)/g,or=/(?<dateStyle>full|long|medium|short)(?:\+(?<timeStyle>full|long|medium|short))?/,oi=new Map,on=["th","st","nd","rd"],os={};function ol(e,t,o,r){let i=`${e}${r?"_compact":""}`,n=os[e];return n||(n=o+e*t+t/2,os[i]=n),n}let oa={d:"d",fill:"fill","shape-rendering":"shapeRendering","stroke-linejoin":"strokeLinejoin","stroke-width":"strokeWidth","stroke-dasharray":"strokeDasharray",stroke:"stroke",x1:"x1",x2:"x2",y1:"y1",y2:"y2"};function oh(e,t){let o="";for(let[e,r]of Object.entries(oa)){let i=t[r];i&&(o+=` ${e}="${i}"`)}return`<${e}${o} />`}function oc(e){return oh("line",e)}function od(e,t,o,r){return{fill:"none",shapeRendering:"auto",strokeLinejoin:"round",strokeWidth:o,strokeDasharray:t7(e)?r?1:2:0,stroke:t}}function ou(e,t,o,r){return`${e}_${t}_${o||"+"}${r?"_compact":""}`}function op(e,t,o){return`${e}_${t||"+"}${o?"_compact":""}`}var of=((d=of||{}).arrowDownKey="ArrowDown",d.arrowUpKey="ArrowUp",d.controlKey="Control",d.endKey="End",d.homeKey="Home",d.metaKey="Meta",d.pageDownKey="PageDown",d.pageUpKey="PageUp",d.shiftKey="Shift",d);let om={"CommitDiffSection-FileAdded":"added","CommitDiffSection-FileDeleted":"deleted","CommitDiffSection-FileModified":"modified","CommitDiffSection-FileRenamed":"renamed","CommitDiffSection-NFilesAdded":"{0} added","CommitDiffSection-NFilesDeleted":"{0} deleted","CommitDiffSection-NFilesModified":"{0} modified","CommitDiffSection-NFilesRenamed":"{0} renamed","Graph-IsLoadingRows":"Loading...","Graph-NoCommits":"No commits","Graph-WorkInProgress":"Work in progress","GraphHeader-BranchTag":"BRANCH / TAG","GraphHeader-Changes":"CHANGES","GraphHeader-CommitAuthor":"AUTHOR","GraphHeader-CommitDateTime":"COMMIT DATE / TIME","GraphHeader-CommitGraph":"GRAPH","GraphHeader-CommitMessage":"COMMIT MESSAGE","GraphHeader-CommitSha":"SHA","GraphHeader-EditColumns":"Columns settings","GraphHeader-Filter":"Filter","GraphHeader-HiddenRefs-btn":"Hidden Branches / Tags","OptionalGraphZone-CommitAuthor":"Author","OptionalGraphZone-CommitDateTime":"Date / Time","OptionalGraphZone-CommitSha":"Sha","IssueIcon-Tooltip":"{0}: {1}","PullRequestIcon-Tooltip":`#{0}: {1}
|
|
3
|
+
`===t?t9:RegExp(`^.*(:?${t}){0,2}`,"m"),"")}let oe=/^co-authored-by:\s*([^\s<>]+(?:\s+[^\s<>]+)*)\s*<([^<>]+)>/gim;function ot(e){let t=[];for(let o=oe.exec(e);null!==o;o=oe.exec(e)){let[,e,r]=o;t.push({name:e,email:r})}return t}let oo=/(?<literal>\[.*?\])|(?<year>YYYY|YY)|(?<month>M{1,4})|(?<day>Do|DD?)|(?<weekday>d{2,4})|(?<hour>HH?|hh?)|(?<minute>mm?)|(?<second>ss?)|(?<fractionalSecond>SSS)|(?<dayPeriod>A|a)|(?<timeZoneName>ZZ?)/g,or=/(?<dateStyle>full|long|medium|short)(?:\+(?<timeStyle>full|long|medium|short))?/,oi=new Map,on=["th","st","nd","rd"],os={};function ol(e,t,o,r){let i=`${e}${r?"_compact":""}`,n=os[e];return n||(n=o+e*t+t/2,os[i]=n),n}let oa={d:"d",fill:"fill","shape-rendering":"shapeRendering","stroke-linejoin":"strokeLinejoin","stroke-width":"strokeWidth","stroke-dasharray":"strokeDasharray",stroke:"stroke",x1:"x1",x2:"x2",y1:"y1",y2:"y2"};function oh(e,t){let o="";for(let[e,r]of Object.entries(oa)){let i=t[r];i&&(o+=` ${e}="${i}"`)}return`<${e}${o} />`}function oc(e){return oh("line",e)}function od(e,t,o,r){return{fill:"none",shapeRendering:"auto",strokeLinejoin:"round",strokeWidth:o,strokeDasharray:t7(e)?r?1:2:0,stroke:t}}function ou(e,t,o,r){return`${e}_${t}_${o||"+"}${r?"_compact":""}`}function op(e,t,o){return`${e}_${t||"+"}${o?"_compact":""}`}var of=((d=of||{}).arrowDownKey="ArrowDown",d.arrowLeftKey="ArrowLeft",d.arrowRightKey="ArrowRight",d.arrowUpKey="ArrowUp",d.controlKey="Control",d.endKey="End",d.homeKey="Home",d.metaKey="Meta",d.pageDownKey="PageDown",d.pageUpKey="PageUp",d.shiftKey="Shift",d);let om={"CommitDiffSection-FileAdded":"added","CommitDiffSection-FileDeleted":"deleted","CommitDiffSection-FileModified":"modified","CommitDiffSection-FileRenamed":"renamed","CommitDiffSection-NFilesAdded":"{0} added","CommitDiffSection-NFilesDeleted":"{0} deleted","CommitDiffSection-NFilesModified":"{0} modified","CommitDiffSection-NFilesRenamed":"{0} renamed","Graph-IsLoadingRows":"Loading...","Graph-NoCommits":"No commits","Graph-WorkInProgress":"Work in progress","GraphHeader-BranchTag":"BRANCH / TAG","GraphHeader-Changes":"CHANGES","GraphHeader-CommitAuthor":"AUTHOR","GraphHeader-CommitDateTime":"COMMIT DATE / TIME","GraphHeader-CommitGraph":"GRAPH","GraphHeader-CommitMessage":"COMMIT MESSAGE","GraphHeader-CommitSha":"SHA","GraphHeader-EditColumns":"Columns settings","GraphHeader-Filter":"Filter","GraphHeader-HiddenRefs-btn":"Hidden Branches / Tags","OptionalGraphZone-CommitAuthor":"Author","OptionalGraphZone-CommitDateTime":"Date / Time","OptionalGraphZone-CommitSha":"Sha","IssueIcon-Tooltip":"{0}: {1}","PullRequestIcon-Tooltip":`#{0}: {1}
|
|
4
4
|
Double-click to open pull request on {2}`,"Ref-Current":"Current Branch","Ref-Local":"Local Branch","Ref-Remote":"Remote Branch","Ref-Tag":"Tag","Ref-Worktree":"Worktree","RefZone-EnterBranchName":"enter branch name","RefZone-EnterTagName":"enter tag name","Timeline-Now":"just now","Timeline-1HourAgo":"1 hour ago","Timeline-NHoursAgo":"{0} hours ago","Timeline-Yesterday":"yesterday","Timeline-NDaysAgo":"{0} days ago","Timeline-1WeekAgo":"a week ago","Timeline-NWeeksAgo":"{0} weeks ago","Timeline-1MonthAgo":"a month ago","Timeline-NMonthsAgo":"{0} months ago","Timeline-1YearAgo":"a year ago","Timeline-NYearsAgo":"{0} years ago","Timeline-NPlusYearsAgo":"{0}+ years ago","UpstreamIndicatorIcon-BehindAndAheadTooltip":`{0} commit(s) behind and {1} commit(s) ahead of {2}
|
|
5
5
|
Double-click to pull changes`,"UpstreamIndicatorIcon-BehindTooltip":`{0} commit(s) behind {1}
|
|
6
6
|
Double-click to pull changes`,"UpstreamIndicatorIcon-AheadTooltip":`{0} commit(s) ahead of {1}
|
|
7
|
-
Double-click to push changes`,ResizePanel:"Resize Panel",Stash:"Stash",Hide:"Hide",Show:"Show","WorkDirMessageInput-WIPPlaceholder":"WIP"},og={0:1,90:0,180:-1,270:0},ov={0:0,90:1,180:0,270:-1},oy=eT-e_,oS=` A ${oy} ${oy} 0 0 0 `;function ow(e,t,o){let r=og[o],i=ov[o];return{x:e-eT*r,xOffset:-(r*e_),y:t+eT*i,yOffset:i*e_}}let oC={};var
|
|
7
|
+
Double-click to push changes`,ResizePanel:"Resize Panel",Stash:"Stash",Hide:"Hide",Show:"Show","WorkDirMessageInput-WIPPlaceholder":"WIP"},og={0:1,90:0,180:-1,270:0},ov={0:0,90:1,180:0,270:-1},oy=eT-e_,oS=` A ${oy} ${oy} 0 0 0 `;function ow(e,t,o){let r=og[o],i=ov[o];return{x:e-eT*r,xOffset:-(r*e_),y:t+eT*i,yOffset:i*e_}}let oC={};var oR=function(e,t,o,r,i,n,s,l){let a=od(r,e,s,l);return a.d=function(e,t,o,r){let i=`${e}_${t}_${o}_${r}`,n=oC[i];if(n)return n;let s=ow(e,t,r),l=ow(e,t,o);return n=`M ${s.x} ${s.y}${l.xOffset?` H ${s.x+l.xOffset}`:` V ${s.y+l.yOffset}`}${oS}${l.x+s.xOffset} ${l.y+s.yOffset}${s.xOffset?` H ${l.x}`:` V ${l.y}`}`,oC[i]=n,n}(i,n,o,t),oh("path",a)};let ob={},o_={},oT={},ox={};function oE(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function oM(e){return(oM="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function oI(e){var t=function(e,t){if("object"!=oM(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var r=o.call(e,t||"default");if("object"!=oM(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==oM(t)?t:t+""}function oO(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,oI(r.key),r)}}function oz(e,t,o){return t&&oO(e.prototype,t),o&&oO(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e}function oD(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ok(e,t){if(t&&("object"==oM(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return oD(e)}function oG(e){return(oG=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function oN(e,t){return(oN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function oA(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oN(e,t)}function oW(e,t,o){return(t=oI(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function oH(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function oL(e){this.setState((function(t){var o=this.constructor.getDerivedStateFromProps(e,t);return null!=o?o:null}).bind(this))}function oP(e,t){try{var o=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(o,r)}finally{this.props=o,this.state=r}}function oF(e){var t=e.prototype;if(!t||!t.isReactComponent)throw Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var o=null,r=null,i=null;if("function"==typeof t.componentWillMount?o="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(o="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?r="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(r="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?i="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(i="UNSAFE_componentWillUpdate"),null!==o||null!==r||null!==i)throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
8
8
|
|
|
9
9
|
`+(e.displayName||e.name)+" uses "+("function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()")+" but also contains the following legacy lifecycles:"+(null!==o?`
|
|
10
10
|
`+o:"")+(null!==r?`
|
|
@@ -12,10 +12,10 @@ let e;import*as t from"react";import{default as o,findDOMNode as r,flushSync as
|
|
|
12
12
|
`+i:"")+`
|
|
13
13
|
|
|
14
14
|
The above lifecycles should be removed. Learn more about this warning here:
|
|
15
|
-
https://fb.me/react-async-component-lifecycle-hooks`);if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=oH,t.componentWillReceiveProps=oL),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=oP;var n=t.componentDidUpdate;t.componentDidUpdate=function(e,t,o){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:o;n.call(this,e,t,r)}}return e}function oB(){return(oB=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)({}).hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e}).apply(null,arguments)}oH.__suppressDeprecationWarning=!0,oL.__suppressDeprecationWarning=!0,oP.__suppressDeprecationWarning=!0;let oU=function(){for(var e,t,o=0,r="";o<arguments.length;)(e=arguments[o++])&&(t=function e(t){var o,r,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t))for(o=0;o<t.length;o++)t[o]&&(r=e(t[o]))&&(i&&(i+=" "),i+=r);else for(o in t)t[o]&&(i&&(i+=" "),i+=o);return i}(e))&&(r&&(r+=" "),r+=t);return r};function oZ(e){var t=e.cellCount,o=e.cellSize,r=e.computeMetadataCallback,i=e.computeMetadataCallbackProps,n=e.nextCellsCount,s=e.nextCellSize,l=e.nextScrollToIndex,a=e.scrollToIndex,h=e.updateScrollOffsetForScrollToIndex;(t!==n||("number"==typeof o||"number"==typeof s)&&o!==s)&&(r(i),a>=0&&a===l&&h())}function oj(e,t){if(null==e)return{};var o={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;o[r]=e[r]}return o}function o$(e,t){if(null==e)return{};var o,r,i=oj(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r<n.length;r++)o=n[r],-1===t.indexOf(o)&&({}).propertyIsEnumerable.call(e,o)&&(i[o]=e[o])}return i}var oV=function(){function e(t){var o=t.cellCount,r=t.cellSizeGetter,i=t.estimatedCellSize;oE(this,e),oW(this,"_cellSizeAndPositionData",{}),oW(this,"_lastMeasuredIndex",-1),oW(this,"_lastBatchedIndex",-1),oW(this,"_cellCount",void 0),oW(this,"_cellSizeGetter",void 0),oW(this,"_estimatedCellSize",void 0),this._cellSizeGetter=r,this._cellCount=o,this._estimatedCellSize=i}return oz(e,[{key:"areOffsetsAdjusted",value:function(){return!1}},{key:"configure",value:function(e){var t=e.cellCount,o=e.estimatedCellSize,r=e.cellSizeGetter;this._cellCount=t,this._estimatedCellSize=o,this._cellSizeGetter=r}},{key:"getCellCount",value:function(){return this._cellCount}},{key:"getEstimatedCellSize",value:function(){return this._estimatedCellSize}},{key:"getLastMeasuredIndex",value:function(){return this._lastMeasuredIndex}},{key:"getOffsetAdjustment",value:function(){return 0}},{key:"getSizeAndPositionOfCell",value:function(e){if(e<0||e>=this._cellCount)throw Error("Requested index ".concat(e," is outside of range 0..").concat(this._cellCount));if(e>this._lastMeasuredIndex)for(var t=this.getSizeAndPositionOfLastMeasuredCell(),o=t.offset+t.size,r=this._lastMeasuredIndex+1;r<=e;r++){var i=this._cellSizeGetter({index:r});if(void 0===i||isNaN(i))throw Error("Invalid size returned for cell ".concat(r," of value ").concat(i));null===i?(this._cellSizeAndPositionData[r]={offset:o,size:0},this._lastBatchedIndex=e):(this._cellSizeAndPositionData[r]={offset:o,size:i},o+=i,this._lastMeasuredIndex=e)}return this._cellSizeAndPositionData[e]}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}}},{key:"getTotalSize",value:function(){var e=this.getSizeAndPositionOfLastMeasuredCell();return e.offset+e.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize}},{key:"getUpdatedOffsetForIndex",value:function(e){var t,o=e.align,r=e.containerSize,i=e.currentOffset,n=e.targetIndex;if(r<=0)return 0;var s=this.getSizeAndPositionOfCell(n),l=s.offset,a=l-r+s.size;switch(void 0===o?"auto":o){case"start":t=l;break;case"end":t=a;break;case"center":t=l-(r-s.size)/2;break;default:t=Math.max(a,Math.min(l,i))}return Math.max(0,Math.min(this.getTotalSize()-r,t))}},{key:"getVisibleCellRange",value:function(e){var t=e.containerSize,o=e.offset;if(0===this.getTotalSize())return{};var r=o+t,i=this._findNearestCell(o),n=this.getSizeAndPositionOfCell(i);o=n.offset+n.size;for(var s=i;o<r&&s<this._cellCount-1;)s++,o+=this.getSizeAndPositionOfCell(s).size;return{start:i,stop:s}}},{key:"resetCell",value:function(e){this._lastMeasuredIndex=Math.min(this._lastMeasuredIndex,e-1)}},{key:"_binarySearch",value:function(e,t,o){for(;t<=e;){var r=t+Math.floor((e-t)/2),i=this.getSizeAndPositionOfCell(r).offset;if(i===o)return r;i<o?t=r+1:i>o&&(e=r-1)}return t>0?t-1:0}},{key:"_exponentialSearch",value:function(e,t){for(var o=1;e<this._cellCount&&this.getSizeAndPositionOfCell(e).offset<t;)e+=o,o*=2;return this._binarySearch(Math.min(e,this._cellCount-1),Math.floor(e/2),t)}},{key:"_findNearestCell",value:function(e){if(isNaN(e))throw Error("Invalid offset ".concat(e," specified"));e=Math.max(0,e);var t=this.getSizeAndPositionOfLastMeasuredCell(),o=Math.max(0,this._lastMeasuredIndex);return t.offset>=e?this._binarySearch(o,0,e):this._exponentialSearch(o,e)}}]),e}(),oK=function(){function e(t){var o=t.maxScrollSize,r=void 0===o?"undefined"!=typeof window&&window.chrome?0xffff8c:15e5:o,i=o$(t,["maxScrollSize"]);oE(this,e),oW(this,"_cellSizeAndPositionManager",void 0),oW(this,"_maxScrollSize",void 0),this._cellSizeAndPositionManager=new oV(i),this._maxScrollSize=r}return oz(e,[{key:"areOffsetsAdjusted",value:function(){return this._cellSizeAndPositionManager.getTotalSize()>this._maxScrollSize}},{key:"configure",value:function(e){this._cellSizeAndPositionManager.configure(e)}},{key:"getCellCount",value:function(){return this._cellSizeAndPositionManager.getCellCount()}},{key:"getEstimatedCellSize",value:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()}},{key:"getLastMeasuredIndex",value:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()}},{key:"getOffsetAdjustment",value:function(e){var t=e.containerSize,o=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),i=this.getTotalSize();return Math.round(this._getOffsetPercentage({containerSize:t,offset:o,totalSize:i})*(i-r))}},{key:"getSizeAndPositionOfCell",value:function(e){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(e)}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()}},{key:"getTotalSize",value:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())}},{key:"getUpdatedOffsetForIndex",value:function(e){var t=e.align,o=e.containerSize,r=e.currentOffset,i=e.targetIndex;r=this._safeOffsetToOffset({containerSize:o,offset:r});var n=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({align:void 0===t?"auto":t,containerSize:o,currentOffset:r,targetIndex:i});return this._offsetToSafeOffset({containerSize:o,offset:n})}},{key:"getVisibleCellRange",value:function(e){var t=e.containerSize,o=e.offset;return o=this._safeOffsetToOffset({containerSize:t,offset:o}),this._cellSizeAndPositionManager.getVisibleCellRange({containerSize:t,offset:o})}},{key:"resetCell",value:function(e){this._cellSizeAndPositionManager.resetCell(e)}},{key:"_getOffsetPercentage",value:function(e){var t=e.containerSize,o=e.offset,r=e.totalSize;return r<=t?0:o/(r-t)}},{key:"_offsetToSafeOffset",value:function(e){var t=e.containerSize,o=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),i=this.getTotalSize();return r===i?o:Math.round(this._getOffsetPercentage({containerSize:t,offset:o,totalSize:r})*(i-t))}},{key:"_safeOffsetToOffset",value:function(e){var t=e.containerSize,o=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),i=this.getTotalSize();return r===i?o:Math.round(this._getOffsetPercentage({containerSize:t,offset:o,totalSize:i})*(r-t))}}]),e}();function oY(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t={};return function(o){var r=o.callback,i=o.indices,n=Object.keys(i),s=!e||n.every(function(e){var t=i[e];return Array.isArray(t)?t.length>0:t>=0}),l=n.length!==Object.keys(t).length||n.some(function(e){var o=t[e],r=i[e];return Array.isArray(r)?o.join(",")!==r.join(","):o!==r});t=i,s&&l&&r(i)}}function oq(e){var t=e.cellSize,o=e.cellSizeAndPositionManager,r=e.previousCellsCount,i=e.previousCellSize,n=e.previousScrollToAlignment,s=e.previousScrollToIndex,l=e.previousSize,a=e.scrollOffset,h=e.scrollToAlignment,c=e.scrollToIndex,d=e.size,u=e.sizeJustIncreasedFromZero,p=e.updateScrollIndexCallback,f=o.getCellCount(),m=c>=0&&c<f;m&&(d!==l||u||!i||"number"==typeof t&&t!==i||h!==n||c!==s)?p(c):!m&&f>0&&(d<l||f<r)&&a>o.getTotalSize()-d&&p(f-1)}let oX=!!("undefined"!=typeof window&&window.document&&window.document.createElement);function oJ(e){if((!y&&0!==y||e)&&oX){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),y=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return y}var oQ=(S="undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).requestAnimationFrame||S.webkitRequestAnimationFrame||S.mozRequestAnimationFrame||S.oRequestAnimationFrame||S.msRequestAnimationFrame||function(e){return S.setTimeout(e,1e3/60)},o0=S.cancelAnimationFrame||S.webkitCancelAnimationFrame||S.mozCancelAnimationFrame||S.oCancelAnimationFrame||S.msCancelAnimationFrame||function(e){S.clearTimeout(e)},o1=function(e){return o0(e.id)},o2=function(e,t){Promise.resolve().then(function(){o=Date.now()});var o,r={id:oQ(function i(){Date.now()-o>=t?e.call():r.id=oQ(i)})};return r};function o5(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}function o3(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?o5(o,!0).forEach(function(t){oW(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):o5(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}var o6="requested",o4=(C=w=function(e){function t(e){var o;return oE(this,t),oW(oD(o=ok(this,oG(t).call(this,e))),"_onGridRenderedMemoizer",oY()),oW(oD(o),"_onScrollMemoizer",oY(!1)),oW(oD(o),"_deferredInvalidateColumnIndex",null),oW(oD(o),"_deferredInvalidateRowIndex",null),oW(oD(o),"_recomputeScrollLeftFlag",!1),oW(oD(o),"_recomputeScrollTopFlag",!1),oW(oD(o),"_horizontalScrollBarSize",0),oW(oD(o),"_verticalScrollBarSize",0),oW(oD(o),"_scrollbarPresenceChanged",!1),oW(oD(o),"_scrollingContainer",void 0),oW(oD(o),"_childrenToDisplay",void 0),oW(oD(o),"_columnStartIndex",void 0),oW(oD(o),"_columnStopIndex",void 0),oW(oD(o),"_rowStartIndex",void 0),oW(oD(o),"_rowStopIndex",void 0),oW(oD(o),"_renderedColumnStartIndex",0),oW(oD(o),"_renderedColumnStopIndex",0),oW(oD(o),"_renderedRowStartIndex",0),oW(oD(o),"_renderedRowStopIndex",0),oW(oD(o),"_initialScrollTop",void 0),oW(oD(o),"_initialScrollLeft",void 0),oW(oD(o),"_disablePointerEventsTimeoutId",void 0),oW(oD(o),"_styleCache",{}),oW(oD(o),"_cellCache",{}),oW(oD(o),"_debounceScrollEndedCallback",function(){o._disablePointerEventsTimeoutId=null,o.setState({isScrolling:!1,needToResetStyleCache:!1})}),oW(oD(o),"_invokeOnGridRenderedHelper",function(){var e=o.props.onSectionRendered;o._onGridRenderedMemoizer({callback:e,indices:{columnOverscanStartIndex:o._columnStartIndex,columnOverscanStopIndex:o._columnStopIndex,columnStartIndex:o._renderedColumnStartIndex,columnStopIndex:o._renderedColumnStopIndex,rowOverscanStartIndex:o._rowStartIndex,rowOverscanStopIndex:o._rowStopIndex,rowStartIndex:o._renderedRowStartIndex,rowStopIndex:o._renderedRowStopIndex}})}),oW(oD(o),"_onWheel",function(e){var t=e.deltaX,r=e.deltaY;o.handleWheelEvent({deltaX:t,deltaY:r})}),oW(oD(o),"_setScrollingContainerRef",function(e){e&&(e.removeEventListener("wheel",o.preventDefault),e.addEventListener("wheel",o.preventDefault,{passive:!1})),o._scrollingContainer=e}),oW(oD(o),"_onScroll",function(e){e.target===o._scrollingContainer&&o.handleScrollEvent(e.target)}),o.state={instanceProps:{columnSizeAndPositionManager:new oK({cellCount:e.columnCount,cellSizeGetter:function(o){return t._wrapSizeGetter(e.columnWidth)(o)},estimatedCellSize:t._getEstimatedColumnSize(e)}),rowSizeAndPositionManager:new oK({cellCount:e.rowCount,cellSizeGetter:function(o){return t._wrapSizeGetter(e.rowHeight)(o)},estimatedCellSize:t._getEstimatedRowSize(e)}),prevColumnWidth:e.columnWidth,prevRowHeight:e.rowHeight,prevColumnCount:e.columnCount,prevRowCount:e.rowCount,prevIsScrolling:!0===e.isScrolling,prevScrollToColumn:e.scrollToColumn,prevScrollToRow:e.scrollToRow,scrollbarSize:0,scrollbarSizeMeasured:!1},isScrolling:!1,scrollDirectionHorizontal:1,scrollDirectionVertical:1,scrollLeft:0,scrollTop:0,scrollPositionChangeReason:null,needToResetStyleCache:!1},e.scrollToRow>0&&(o._initialScrollTop=o._getCalculatedScrollTop(e,o.state)),e.scrollToColumn>0&&(o._initialScrollLeft=o._getCalculatedScrollLeft(e,o.state)),o}return oA(t,e),oz(t,[{key:"getOffsetForCell",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,o=void 0===t?this.props.scrollToAlignment:t,r=e.columnIndex,i=void 0===r?this.props.scrollToColumn:r,n=e.rowIndex,s=void 0===n?this.props.scrollToRow:n,l=o3({},this.props,{scrollToAlignment:o,scrollToColumn:i,scrollToRow:s});return{scrollLeft:this._getCalculatedScrollLeft(l),scrollTop:this._getCalculatedScrollTop(l)}}},{key:"getTotalRowsHeight",value:function(){return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize()}},{key:"getTotalColumnsWidth",value:function(){return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize()}},{key:"handleScrollEvent",value:function(e){var t=e.scrollLeft,o=e.scrollTop,r=void 0===o?0:o;if(!(r<0)){this._debounceScrollEnded();var i=this.props,n=i.autoHeight,s=i.autoWidth,l=i.height,a=i.width,h=this.state.instanceProps,c=h.scrollbarSize,d=h.rowSizeAndPositionManager.getTotalSize(),u=h.columnSizeAndPositionManager.getTotalSize(),p=Math.min(Math.max(0,u-a+c),void 0===t?0:t),f=Math.min(Math.max(0,d-l+c),r);if(this.state.scrollLeft!==p||this.state.scrollTop!==f){var m={isScrolling:!0,scrollDirectionHorizontal:p!==this.state.scrollLeft?p>this.state.scrollLeft?1:-1:this.state.scrollDirectionHorizontal,scrollDirectionVertical:f!==this.state.scrollTop?f>this.state.scrollTop?1:-1:this.state.scrollDirectionVertical,scrollPositionChangeReason:"observed"};n||(m.scrollTop=f),s||(m.scrollLeft=p),m.needToResetStyleCache=!1,this.setState(m)}this._invokeOnScrollMemoizer({scrollLeft:p,scrollTop:f,totalColumnsWidth:u,totalRowsHeight:d})}}},{key:"preventDefault",value:function(e){e.preventDefault()}},{key:"handleWheelEvent",value:function(e){var t=e.deltaX,o=e.deltaY;this._debounceScrollEnded();var r=this.props,i=r.autoHeight,n=r.autoWidth,s=r.height,l=r.width,a=this.state.instanceProps.scrollbarSize,h=this.state.instanceProps.rowSizeAndPositionManager.getTotalSize(),c=this.state.instanceProps.columnSizeAndPositionManager.getTotalSize(),d=Math.min(Math.max(0,c-l+a),Math.max(0,this._scrollingContainer.scrollLeft+t)),u=Math.min(Math.max(0,h-s+a),Math.max(0,this._scrollingContainer.scrollTop+o));if(this.state.scrollLeft!==d||this.state.scrollTop!==u){var p={isScrolling:!0,scrollDirectionHorizontal:d!==this.state.scrollLeft?d>this.state.scrollLeft?1:-1:this.state.scrollDirectionHorizontal,scrollDirectionVertical:u!==this.state.scrollTop?u>this.state.scrollTop?1:-1:this.state.scrollDirectionVertical,scrollPositionChangeReason:o6};i||(p.scrollTop=u),n||(p.scrollLeft=d),p.needToResetStyleCache=!1,this.setState(p)}this._invokeOnScrollMemoizer({scrollLeft:d,scrollTop:u,totalColumnsWidth:c,totalRowsHeight:h})}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,o=e.rowIndex;this._deferredInvalidateColumnIndex="number"==typeof this._deferredInvalidateColumnIndex?Math.min(this._deferredInvalidateColumnIndex,t):t,this._deferredInvalidateRowIndex="number"==typeof this._deferredInvalidateRowIndex?Math.min(this._deferredInvalidateRowIndex,o):o}},{key:"measureAllCells",value:function(){var e=this.props,t=e.columnCount,o=e.rowCount,r=this.state.instanceProps;r.columnSizeAndPositionManager.getSizeAndPositionOfCell(t-1),r.rowSizeAndPositionManager.getSizeAndPositionOfCell(o-1)}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,o=void 0===t?0:t,r=e.rowIndex,i=void 0===r?0:r,n=this.props,s=n.scrollToColumn,l=n.scrollToRow,a=this.state.instanceProps;a.columnSizeAndPositionManager.resetCell(o),a.rowSizeAndPositionManager.resetCell(i),this._recomputeScrollLeftFlag=s>=0&&(1===this.state.scrollDirectionHorizontal?o<=s:o>=s),this._recomputeScrollTopFlag=l>=0&&(1===this.state.scrollDirectionVertical?i<=l:i>=l),this._styleCache={},this._cellCache={},this.forceUpdate()}},{key:"scrollToCell",value:function(e){var t=e.columnIndex,o=e.rowIndex,r=this.props,i=r.columnCount,n=r.onScrollToTargetCausedUpdate,s=this.state,l=s.scrollLeft,a=s.scrollTop,h=this.props,c=this.state,d=void 0,u=void 0;if(i>1&&void 0!==t){var p=this._updateScrollLeftForScrollToColumn(o3({},h,{scrollToColumn:t}),c,!0);p&&"number"==typeof p.scrollLeft&&p.scrollLeft>=0&&(d=p.scrollLeft)}if(void 0!==o){var f=this._updateScrollTopForScrollToRow(o3({},h,{scrollToRow:o}),c,!0);f&&"number"==typeof f.scrollTop&&f.scrollTop>=0&&(u=f.scrollTop)}if(n&&("number"==typeof d||"number"==typeof u)){var m="number"!=typeof d?d:l,g="number"!=typeof u?u:a;n({clientHeight:h.height,clientWidth:h.width,scrollHeight:this.getTotalRowsHeight(),scrollLeft:m,scrollTop:g,scrollWidth:this.getTotalColumnsWidth()})}}},{key:"componentDidMount",value:function(){var e=this.props,o=e.getScrollbarSize,r=e.height,i=e.scrollLeft,n=e.scrollToColumn,s=e.scrollTop,l=e.scrollToRow,a=e.width,h=this.state.instanceProps;if(this._initialScrollTop=0,this._initialScrollLeft=0,this._handleInvalidatedGridSize(),h.scrollbarSizeMeasured||this.setState(function(e){var t=o3({},e,{needToResetStyleCache:!1});return t.instanceProps.scrollbarSize=o(),t.instanceProps.scrollbarSizeMeasured=!0,t}),"number"==typeof i&&i>=0||"number"==typeof s&&s>=0){var c=t._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:i,scrollTop:s});c&&(c.needToResetStyleCache=!1,this.setState(c))}this._scrollingContainer&&(this._scrollingContainer.scrollLeft!==this.state.scrollLeft&&(this._scrollingContainer.scrollLeft=this.state.scrollLeft),this._scrollingContainer.scrollTop!==this.state.scrollTop&&(this._scrollingContainer.scrollTop=this.state.scrollTop));var d=r>0&&a>0;n>=0&&d&&this._updateScrollLeftForScrollToColumn(),l>=0&&d&&this._updateScrollTopForScrollToRow(),this._invokeOnGridRenderedHelper(),this._invokeOnScrollMemoizer({scrollLeft:i||0,scrollTop:s||0,totalColumnsWidth:h.columnSizeAndPositionManager.getTotalSize(),totalRowsHeight:h.rowSizeAndPositionManager.getTotalSize()}),this._maybeCallOnScrollbarPresenceChange()}},{key:"componentDidUpdate",value:function(e,t){var o=this,r=this.props,i=r.autoHeight,n=r.autoWidth,s=r.columnCount,l=r.height,a=r.rowCount,h=r.scrollToAlignment,c=r.scrollToColumn,d=r.scrollToRow,u=r.width,p=this.state,f=p.scrollLeft,m=p.scrollPositionChangeReason,g=p.scrollTop,v=p.instanceProps;this._handleInvalidatedGridSize();var y=s>0&&0===e.columnCount||a>0&&0===e.rowCount;m===o6&&(!n&&f>=0&&(f!==this._scrollingContainer.scrollLeft||y)&&(this._scrollingContainer.scrollLeft=f),!i&&g>=0&&(g!==this._scrollingContainer.scrollTop||y)&&(this._scrollingContainer.scrollTop=g));var S=(0===e.width||0===e.height)&&l>0&&u>0;if(this._recomputeScrollLeftFlag?(this._recomputeScrollLeftFlag=!1,this._updateScrollLeftForScrollToColumn(this.props)):oq({cellSizeAndPositionManager:v.columnSizeAndPositionManager,previousCellsCount:e.columnCount,previousCellSize:e.columnWidth,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToColumn,previousSize:e.width,scrollOffset:f,scrollToAlignment:h,scrollToIndex:c,size:u,sizeJustIncreasedFromZero:S,updateScrollIndexCallback:function(){return o._updateScrollLeftForScrollToColumn(o.props)}}),this._recomputeScrollTopFlag?(this._recomputeScrollTopFlag=!1,this._updateScrollTopForScrollToRow(this.props)):oq({cellSizeAndPositionManager:v.rowSizeAndPositionManager,previousCellsCount:e.rowCount,previousCellSize:e.rowHeight,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToRow,previousSize:e.height,scrollOffset:g,scrollToAlignment:h,scrollToIndex:d,size:l,sizeJustIncreasedFromZero:S,updateScrollIndexCallback:function(){return o._updateScrollTopForScrollToRow(o.props)}}),this._invokeOnGridRenderedHelper(),f!==t.scrollLeft||g!==t.scrollTop){var w=v.rowSizeAndPositionManager.getTotalSize(),C=v.columnSizeAndPositionManager.getTotalSize();this._invokeOnScrollMemoizer({scrollLeft:f,scrollTop:g,totalColumnsWidth:C,totalRowsHeight:w})}this._maybeCallOnScrollbarPresenceChange()}},{key:"componentWillUnmount",value:function(){this._scrollingContainer&&this._scrollingContainer.removeEventListener("wheel",this.preventDefault),this._disablePointerEventsTimeoutId&&o1(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var e=this.props,t=e.autoContainerWidth,o=e.autoHeight,r=e.autoWidth,i=e.className,n=e.containerProps,s=e.containerRole,l=e.containerStyle,a=e.height,h=e.id,c=e.noContentRenderer,d=e.role,u=e.style,p=e.tabIndex,f=e.width,m=this.state,g=m.instanceProps,v=m.needToResetStyleCache,y=this._isScrolling(),S={boxSizing:"border-box",direction:"ltr",height:o?"auto":a,position:"relative",width:r?"auto":f,WebkitOverflowScrolling:"touch",willChange:"transform"};v&&(this._styleCache={}),this.state.isScrolling||this._resetStyleCache(),this._calculateChildrenToRender(this.props,this.state);var w=g.columnSizeAndPositionManager.getTotalSize(),C=g.rowSizeAndPositionManager.getTotalSize(),b=C>a?g.scrollbarSize:0,R=w>f?g.scrollbarSize:0;(R!==this._horizontalScrollBarSize||b!==this._verticalScrollBarSize)&&(this._horizontalScrollBarSize=R,this._verticalScrollBarSize=b,this._scrollbarPresenceChanged=!0),S.overflowX=w+b<=f?"hidden":"auto",S.overflowY=C+R<=a?"hidden":"auto";var _=this._childrenToDisplay,T=0===_.length&&a>0&&f>0;return P.createElement("div",oB({ref:this._setScrollingContainerRef},n,{"aria-label":this.props["aria-label"],"aria-readonly":this.props["aria-readonly"],className:oU("ReactVirtualized__Grid",i),id:h,onScroll:this._onScroll,onWheel:this._onWheel,role:d,style:o3({},S,{},u),tabIndex:p}),_.length>0&&P.createElement("div",{className:"ReactVirtualized__Grid__innerScrollContainer",role:s,style:o3({width:t?"auto":w,height:C,maxWidth:w,maxHeight:C,overflow:"hidden",pointerEvents:y?"none":"",position:"relative"},l)},_),T&&c())}},{key:"_calculateChildrenToRender",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,o=e.cellRenderer,r=e.cellRangeRenderer,i=e.columnCount,n=e.deferredMeasurementCache,s=e.height,l=e.overscanColumnCount,a=e.overscanIndicesGetter,h=e.overscanRowCount,c=e.rowCount,d=e.width,u=e.isScrollingOptOut,p=t.scrollDirectionHorizontal,f=t.scrollDirectionVertical,m=t.instanceProps,g=this._initialScrollTop>0?this._initialScrollTop:t.scrollTop,v=this._initialScrollLeft>0?this._initialScrollLeft:t.scrollLeft,y=this._isScrolling(e,t);if(this._childrenToDisplay=[],s>0&&d>0){var S=m.columnSizeAndPositionManager.getVisibleCellRange({containerSize:d,offset:v}),w=m.rowSizeAndPositionManager.getVisibleCellRange({containerSize:s,offset:g}),C=m.columnSizeAndPositionManager.getOffsetAdjustment({containerSize:d,offset:v}),b=m.rowSizeAndPositionManager.getOffsetAdjustment({containerSize:s,offset:g});this._renderedColumnStartIndex=S.start,this._renderedColumnStopIndex=S.stop,this._renderedRowStartIndex=w.start,this._renderedRowStopIndex=w.stop;var R=a({direction:"horizontal",cellCount:i,overscanCellsCount:l,scrollDirection:p,startIndex:"number"==typeof S.start?S.start:0,stopIndex:"number"==typeof S.stop?S.stop:-1}),_=a({direction:"vertical",cellCount:c,overscanCellsCount:h,scrollDirection:f,startIndex:"number"==typeof w.start?w.start:0,stopIndex:"number"==typeof w.stop?w.stop:-1}),T=R.overscanStartIndex,x=R.overscanStopIndex,E=_.overscanStartIndex,M=_.overscanStopIndex;if(n){if(!n.hasFixedHeight()){for(var I=E;I<=M;I++)if(!n.has(I,0)){T=0,x=i-1;break}}if(!n.hasFixedWidth()){for(var O=T;O<=x;O++)if(!n.has(0,O)){E=0,M=c-1;break}}}this._childrenToDisplay=r({cellCache:this._cellCache,cellRenderer:o,columnSizeAndPositionManager:m.columnSizeAndPositionManager,columnStartIndex:T,columnStopIndex:x,deferredMeasurementCache:n,horizontalOffsetAdjustment:C,isScrolling:y,isScrollingOptOut:u,parent:this,rowSizeAndPositionManager:m.rowSizeAndPositionManager,rowStartIndex:E,rowStopIndex:M,scrollLeft:v,scrollTop:g,styleCache:this._styleCache,verticalOffsetAdjustment:b,visibleColumnIndices:S,visibleRowIndices:w}),this._columnStartIndex=T,this._columnStopIndex=x,this._rowStartIndex=E,this._rowStopIndex=M}}},{key:"_debounceScrollEnded",value:function(){var e=this.props.scrollingResetTimeInterval;this._disablePointerEventsTimeoutId&&o1(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=o2(this._debounceScrollEndedCallback,e)}},{key:"_handleInvalidatedGridSize",value:function(){if("number"==typeof this._deferredInvalidateColumnIndex&&"number"==typeof this._deferredInvalidateRowIndex){var e=this._deferredInvalidateColumnIndex,t=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:e,rowIndex:t})}}},{key:"_invokeOnScrollMemoizer",value:function(e){var t=this,o=e.scrollLeft,r=e.scrollTop,i=e.totalColumnsWidth,n=e.totalRowsHeight;this._onScrollMemoizer({callback:function(e){var o=e.scrollLeft,r=e.scrollTop,s=t.props,l=s.height;(0,s.onScroll)({clientHeight:l,clientWidth:s.width,scrollHeight:n,scrollLeft:o,scrollTop:r,scrollWidth:i})},indices:{scrollLeft:o,scrollTop:r}})}},{key:"_isScrolling",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return Object.hasOwnProperty.call(e,"isScrolling")?!!e.isScrolling:!!t.isScrolling}},{key:"_maybeCallOnScrollbarPresenceChange",value:function(){if(this._scrollbarPresenceChanged){var e=this.props.onScrollbarPresenceChange;this._scrollbarPresenceChanged=!1,e({horizontal:this._horizontalScrollBarSize>0,size:this.state.instanceProps.scrollbarSize,vertical:this._verticalScrollBarSize>0})}}},{key:"scrollToPosition",value:function(e){var o=e.scrollLeft,r=e.scrollTop,i=t._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:o,scrollTop:r});i&&(i.needToResetStyleCache=!1,this.setState(i))}},{key:"_getCalculatedScrollLeft",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return t._getCalculatedScrollLeft(e,o)}},{key:"_updateScrollLeftForScrollToColumn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=t._getScrollLeftForScrollToColumnStateUpdate(e,o);if(i)return i.needToResetStyleCache=!1,this.setState(i),e.onScrollToTargetCausedUpdate&&!r&&e.onScrollToTargetCausedUpdate({clientHeight:e.height,clientWidth:e.width,scrollHeight:this.getTotalRowsHeight(),scrollLeft:i.scrollLeft,scrollTop:i.scrollTop,scrollWidth:this.getTotalColumnsWidth()}),i}},{key:"_getCalculatedScrollTop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return t._getCalculatedScrollTop(e,o)}},{key:"_resetStyleCache",value:function(){var e=this._styleCache,t=this._cellCache,o=this.props.isScrollingOptOut;this._cellCache={},this._styleCache={};for(var r=this._rowStartIndex;r<=this._rowStopIndex;r++)for(var i=this._columnStartIndex;i<=this._columnStopIndex;i++){var n="".concat(r,"-").concat(i);this._styleCache[n]=e[n],o&&(this._cellCache[n]=t[n])}}},{key:"_updateScrollTopForScrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=t._getScrollTopForScrollToRowStateUpdate(e,o);if(i)return i.needToResetStyleCache=!1,this.setState(i),e.onScrollToTargetCausedUpdate&&!r&&e.onScrollToTargetCausedUpdate({clientHeight:e.height,clientWidth:e.width,scrollHeight:this.getTotalRowsHeight(),scrollLeft:i.scrollLeft,scrollTop:i.scrollTop,scrollWidth:this.getTotalColumnsWidth()}),i}}],[{key:"getDerivedStateFromProps",value:function(e,o){var r,i,n={};0===e.columnCount&&0!==o.scrollLeft||0===e.rowCount&&0!==o.scrollTop?(n.scrollLeft=0,n.scrollTop=0):(e.scrollLeft!==o.scrollLeft&&e.scrollToColumn<0||e.scrollTop!==o.scrollTop&&e.scrollToRow<0)&&Object.assign(n,t._getScrollToPositionStateUpdate({prevState:o,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}));var s=o.instanceProps;return n.needToResetStyleCache=!1,(e.columnWidth!==s.prevColumnWidth||e.rowHeight!==s.prevRowHeight)&&(n.needToResetStyleCache=!0),s.columnSizeAndPositionManager.configure({cellCount:e.columnCount,estimatedCellSize:t._getEstimatedColumnSize(e),cellSizeGetter:t._wrapSizeGetter(e.columnWidth)}),s.rowSizeAndPositionManager.configure({cellCount:e.rowCount,estimatedCellSize:t._getEstimatedRowSize(e),cellSizeGetter:t._wrapSizeGetter(e.rowHeight)}),(0===s.prevColumnCount||0===s.prevRowCount)&&(s.prevColumnCount=0,s.prevRowCount=0),e.autoHeight&&!1===e.isScrolling&&!0===s.prevIsScrolling&&Object.assign(n,{isScrolling:!1}),oZ({cellCount:s.prevColumnCount,cellSize:"number"==typeof s.prevColumnWidth?s.prevColumnWidth:null,computeMetadataCallback:function(){return s.columnSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.columnCount,nextCellSize:"number"==typeof e.columnWidth?e.columnWidth:null,nextScrollToIndex:e.scrollToColumn,scrollToIndex:s.prevScrollToColumn,updateScrollOffsetForScrollToIndex:function(){r=t._getScrollLeftForScrollToColumnStateUpdate(e,o)}}),oZ({cellCount:s.prevRowCount,cellSize:"number"==typeof s.prevRowHeight?s.prevRowHeight:null,computeMetadataCallback:function(){return s.rowSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.rowCount,nextCellSize:"number"==typeof e.rowHeight?e.rowHeight:null,nextScrollToIndex:e.scrollToRow,scrollToIndex:s.prevScrollToRow,updateScrollOffsetForScrollToIndex:function(){i=t._getScrollTopForScrollToRowStateUpdate(e,o)}}),s.prevColumnCount=e.columnCount,s.prevColumnWidth=e.columnWidth,s.prevIsScrolling=!0===e.isScrolling,s.prevRowCount=e.rowCount,s.prevRowHeight=e.rowHeight,s.prevScrollToColumn=e.scrollToColumn,s.prevScrollToRow=e.scrollToRow,s.scrollbarSize=e.getScrollbarSize(),void 0===s.scrollbarSize?(s.scrollbarSizeMeasured=!1,s.scrollbarSize=0):s.scrollbarSizeMeasured=!0,n.instanceProps=s,o3({},n,{},r,{},i)}},{key:"_getEstimatedColumnSize",value:function(e){return"number"==typeof e.columnWidth?e.columnWidth:e.estimatedColumnSize}},{key:"_getEstimatedRowSize",value:function(e){return"number"==typeof e.rowHeight?e.rowHeight:e.estimatedRowSize}},{key:"_getScrollToPositionStateUpdate",value:function(e){var t=e.prevState,o=e.scrollLeft,r=e.scrollTop,i={scrollPositionChangeReason:o6};return("number"==typeof o&&o>=0&&(i.scrollDirectionHorizontal=o>t.scrollLeft?1:-1,i.scrollLeft=o),"number"==typeof r&&r>=0&&(i.scrollDirectionVertical=r>t.scrollTop?1:-1,i.scrollTop=r),"number"==typeof o&&o>=0&&o!==t.scrollLeft||"number"==typeof r&&r>=0&&r!==t.scrollTop)?i:{}}},{key:"_wrapSizeGetter",value:function(e){return"function"==typeof e?e:function(){return e}}},{key:"_getCalculatedScrollLeft",value:function(e,t){var o=e.columnCount,r=e.height,i=e.scrollToAlignment,n=e.scrollToColumn,s=e.width,l=t.scrollLeft,a=t.instanceProps;if(o>0){var h=o-1,c=n<0?h:Math.min(h,n),d=a.rowSizeAndPositionManager.getTotalSize(),u=a.scrollbarSizeMeasured&&d>r?a.scrollbarSize:0;return a.columnSizeAndPositionManager.getUpdatedOffsetForIndex({align:i,containerSize:s-u,currentOffset:l,targetIndex:c})}return 0}},{key:"_getScrollLeftForScrollToColumnStateUpdate",value:function(e,o){var r=o.scrollLeft,i=t._getCalculatedScrollLeft(e,o);return"number"==typeof i&&i>=0&&r!==i?t._getScrollToPositionStateUpdate({prevState:o,scrollLeft:i,scrollTop:-1}):{}}},{key:"_getCalculatedScrollTop",value:function(e,t){var o=e.height,r=e.rowCount,i=e.scrollToAlignment,n=e.scrollToRow,s=e.width,l=t.scrollTop,a=t.instanceProps;if(r>0){var h=r-1,c=n<0?h:Math.min(h,n),d=a.columnSizeAndPositionManager.getTotalSize(),u=a.scrollbarSizeMeasured&&d>s?a.scrollbarSize:0;return a.rowSizeAndPositionManager.getUpdatedOffsetForIndex({align:i,containerSize:o-u,currentOffset:l,targetIndex:c})}return 0}},{key:"_getScrollTopForScrollToRowStateUpdate",value:function(e,o){var r=o.scrollTop,i=t._getCalculatedScrollTop(e,o);return"number"==typeof i&&i>=0&&r!==i?t._getScrollToPositionStateUpdate({prevState:o,scrollLeft:-1,scrollTop:i}):{}}}]),t}(P.PureComponent),oW(w,"propTypes",null),C);function o7(e){var t=e.cellCount,o=e.overscanCellsCount,r=e.scrollDirection,i=e.startIndex,n=e.stopIndex;return(o=Math.max(1,o),1===r)?{overscanStartIndex:Math.max(0,i-1),overscanStopIndex:Math.min(t-1,n+o)}:{overscanStartIndex:Math.max(0,i-o),overscanStopIndex:Math.min(t-1,n+1)}}function o9(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}oW(o4,"defaultProps",{"aria-label":"grid","aria-readonly":!0,autoContainerWidth:!1,autoHeight:!1,autoWidth:!1,cellRangeRenderer:function(e){for(var t=e.cellCache,o=e.cellRenderer,r=e.columnSizeAndPositionManager,i=e.columnStartIndex,n=e.columnStopIndex,s=e.deferredMeasurementCache,l=e.horizontalOffsetAdjustment,a=e.isScrolling,h=e.isScrollingOptOut,c=e.parent,d=e.rowSizeAndPositionManager,u=e.rowStartIndex,p=e.rowStopIndex,f=e.styleCache,m=e.verticalOffsetAdjustment,g=e.visibleColumnIndices,v=e.visibleRowIndices,y=[],S=r.areOffsetsAdjusted()||d.areOffsetsAdjusted(),w=!a&&!S,C=u;C<=p;C++)for(var b=d.getSizeAndPositionOfCell(C),R=i;R<=n;R++){var _=r.getSizeAndPositionOfCell(R),T=R>=g.start&&R<=g.stop&&C>=v.start&&C<=v.stop,x="".concat(C,"-").concat(R),E=void 0;w&&f[x]?E=f[x]:s&&!s.has(C,R)?E={height:"auto",left:0,position:"absolute",top:0,width:"auto"}:(E={height:b.size,left:_.offset+l,position:"absolute",top:b.offset+m,width:_.size},f[x]=E);var M={columnIndex:R,isScrolling:a,isVisible:T,key:x,parent:c,rowIndex:C,style:E},I=void 0;(h||a)&&!l&&!m?(t[x]||(t[x]=o(M)),I=t[x]):I=o(M),null!=I&&!1!==I&&y.push(I)}return y},containerRole:"rowgroup",containerStyle:{},estimatedColumnSize:100,estimatedRowSize:30,getScrollbarSize:oJ,noContentRenderer:function(){return null},onScroll:function(){},onScrollbarPresenceChange:function(){},onSectionRendered:function(){},overscanColumnCount:0,overscanIndicesGetter:function(e){var t=e.cellCount,o=e.overscanCellsCount,r=e.scrollDirection,i=e.startIndex,n=e.stopIndex;return 1===r?{overscanStartIndex:Math.max(0,i),overscanStopIndex:Math.min(t-1,n+o)}:{overscanStartIndex:Math.max(0,i-o),overscanStopIndex:Math.min(t-1,n)}},overscanRowCount:10,role:"grid",scrollingResetTimeInterval:150,scrollToAlignment:"auto",scrollToColumn:-1,scrollToRow:-1,style:{},tabIndex:0,isScrollingOptOut:!1}),oF(o4);var o8=(R=b=function(e){function t(){oE(this,t);for(var e,o,r=arguments.length,i=Array(r),n=0;n<r;n++)i[n]=arguments[n];return oW(oD(o=ok(this,(e=oG(t)).call.apply(e,[this].concat(i)))),"state",{scrollToColumn:0,scrollToRow:0,instanceProps:{prevScrollToColumn:0,prevScrollToRow:0}}),oW(oD(o),"_columnStartIndex",0),oW(oD(o),"_columnStopIndex",0),oW(oD(o),"_rowStartIndex",0),oW(oD(o),"_rowStopIndex",0),oW(oD(o),"_onKeyDown",function(e){var t=o.props,r=t.columnCount,i=t.disabled,n=t.mode,s=t.rowCount;if(!i){var l=o._getScrollState(),a=l.scrollToColumn,h=l.scrollToRow,c=o._getScrollState(),d=c.scrollToColumn,u=c.scrollToRow;switch(e.key){case"ArrowDown":u="cells"===n?Math.min(u+1,s-1):Math.min(o._rowStopIndex+1,s-1);break;case"ArrowLeft":d="cells"===n?Math.max(d-1,0):Math.max(o._columnStartIndex-1,0);break;case"ArrowRight":d="cells"===n?Math.min(d+1,r-1):Math.min(o._columnStopIndex+1,r-1);break;case"ArrowUp":u="cells"===n?Math.max(u-1,0):Math.max(o._rowStartIndex-1,0)}(d!==a||u!==h)&&(e.preventDefault(),o._updateScrollState({scrollToColumn:d,scrollToRow:u}))}}),oW(oD(o),"_onSectionRendered",function(e){var t=e.columnStartIndex,r=e.columnStopIndex,i=e.rowStartIndex,n=e.rowStopIndex;o._columnStartIndex=t,o._columnStopIndex=r,o._rowStartIndex=i,o._rowStopIndex=n}),o}return oA(t,e),oz(t,[{key:"setScrollIndexes",value:function(e){var t=e.scrollToColumn,o=e.scrollToRow;this.setState({scrollToRow:o,scrollToColumn:t})}},{key:"render",value:function(){var e=this.props,t=e.className,o=e.children,r=this._getScrollState(),i=r.scrollToColumn,n=r.scrollToRow;return P.createElement("div",{className:t,onKeyDown:this._onKeyDown},o({onSectionRendered:this._onSectionRendered,scrollToColumn:i,scrollToRow:n}))}},{key:"_getScrollState",value:function(){return this.props.isControlled?this.props:this.state}},{key:"_updateScrollState",value:function(e){var t=e.scrollToColumn,o=e.scrollToRow,r=this.props,i=r.isControlled,n=r.onScrollToChange;"function"==typeof n&&n({scrollToColumn:t,scrollToRow:o}),i||this.setState({scrollToColumn:t,scrollToRow:o})}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.isControlled?{}:e.scrollToColumn!==t.instanceProps.prevScrollToColumn||e.scrollToRow!==t.instanceProps.prevScrollToRow?function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?o9(o,!0).forEach(function(t){oW(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):o9(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}({},t,{scrollToColumn:e.scrollToColumn,scrollToRow:e.scrollToRow,instanceProps:{prevScrollToColumn:e.scrollToColumn,prevScrollToRow:e.scrollToRow}}):{}}}]),t}(P.PureComponent),oW(b,"propTypes",null),R);function re(e,t){var o=void 0!==t?t:"undefined"!=typeof window?window:"undefined"!=typeof self?self:A.g,r=void 0!==o.document&&o.document.attachEvent;if(!r){var i,n,s=(i=o.requestAnimationFrame||o.mozRequestAnimationFrame||o.webkitRequestAnimationFrame||function(e){return o.setTimeout(e,20)},function(e){return i(e)}),l=(n=o.cancelAnimationFrame||o.mozCancelAnimationFrame||o.webkitCancelAnimationFrame||o.clearTimeout,function(e){return n(e)}),a=function(e){var t=e.__resizeTriggers__,o=t.firstElementChild,r=t.lastElementChild,i=o.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,i.style.width=o.offsetWidth+1+"px",i.style.height=o.offsetHeight+1+"px",o.scrollLeft=o.scrollWidth,o.scrollTop=o.scrollHeight},h=function(e){if(!(e.target.className&&"function"==typeof e.target.className.indexOf&&0>e.target.className.indexOf("contract-trigger")&&0>e.target.className.indexOf("expand-trigger"))){var t=this;a(this),this.__resizeRAF__&&l(this.__resizeRAF__),this.__resizeRAF__=s(function(){(t.offsetWidth!=t.__resizeLast__.width||t.offsetHeight!=t.__resizeLast__.height)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach(function(o){o.call(t,e)}))})}},c=!1,d="",u="animationstart",p="Webkit Moz O ms".split(" "),f="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),m=o.document.createElement("fakeelement");if(void 0!==m.style.animationName&&(c=!0),!1===c){for(var g=0;g<p.length;g++)if(void 0!==m.style[p[g]+"AnimationName"]){d="-"+p[g].toLowerCase()+"-",u=f[g],c=!0;break}}var v="resizeanim",y="@"+d+"keyframes "+v+" { from { opacity: 0; } to { opacity: 0; } } ",S=d+"animation: 1ms "+v+"; "}var w=function(t){if(!t.getElementById("detectElementResize")){var o=(y||"")+".resize-triggers { "+(S||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',r=t.head||t.getElementsByTagName("head")[0],i=t.createElement("style");i.id="detectElementResize",i.type="text/css",null!=e&&i.setAttribute("nonce",e),i.styleSheet?i.styleSheet.cssText=o:i.appendChild(t.createTextNode(o)),r.appendChild(i)}};return{addResizeListener:function(e,t){if(r)e.attachEvent("onresize",t);else{if(!e.__resizeTriggers__){var i=e.ownerDocument,n=o.getComputedStyle(e);n&&"static"==n.position&&(e.style.position="relative"),w(i),e.__resizeLast__={},e.__resizeListeners__=[],(e.__resizeTriggers__=i.createElement("div")).className="resize-triggers";var s='<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>';if(window.trustedTypes){var l=trustedTypes.createPolicy("react-virtualized-auto-sizer",{createHTML:function(){return s}});e.__resizeTriggers__.innerHTML=l.createHTML("")}else e.__resizeTriggers__.innerHTML=s;e.appendChild(e.__resizeTriggers__),a(e),e.addEventListener("scroll",h,!0),u&&(e.__resizeTriggers__.__animationListener__=function(t){t.animationName==v&&a(e)},e.__resizeTriggers__.addEventListener(u,e.__resizeTriggers__.__animationListener__))}e.__resizeListeners__.push(t)}},removeResizeListener:function(e,t){if(r)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",h,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(u,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch{}}}}}function rt(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}oW(o8,"defaultProps",{disabled:!1,isControlled:!1,mode:"edges",scrollToColumn:0,scrollToRow:0}),oF(o8);var ro=(T=_=function(e){function t(){oE(this,t);for(var e,o,r=arguments.length,i=Array(r),n=0;n<r;n++)i[n]=arguments[n];return oW(oD(o=ok(this,(e=oG(t)).call.apply(e,[this].concat(i)))),"state",{height:o.props.defaultHeight||0,width:o.props.defaultWidth||0}),oW(oD(o),"_parentNode",void 0),oW(oD(o),"_autoSizer",void 0),oW(oD(o),"_window",void 0),oW(oD(o),"_detectElementResize",void 0),oW(oD(o),"_onResize",function(){var e=o.props,t=e.disableHeight,r=e.disableWidth,i=e.onResize;if(o._parentNode){var n=o._parentNode.offsetHeight||0,s=o._parentNode.offsetWidth||0,l=(o._window||window).getComputedStyle(o._parentNode)||{},a=parseInt(l.paddingLeft,10)||0,h=parseInt(l.paddingRight,10)||0,c=parseInt(l.paddingTop,10)||0,d=parseInt(l.paddingBottom,10)||0,u=n-c-d,p=s-a-h;(t||o.state.height===u)&&(r||o.state.width===p)||(o.setState({height:n-c-d,width:s-a-h}),i({height:n,width:s}))}}),oW(oD(o),"_setRef",function(e){o._autoSizer=e}),o}return oA(t,e),oz(t,[{key:"componentDidMount",value:function(){var e=this.props.nonce;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._window=this._autoSizer.parentNode.ownerDocument.defaultView,this._detectElementResize=re(e,this._window),this._detectElementResize.addResizeListener(this._parentNode,this._onResize),this._onResize())}},{key:"componentWillUnmount",value:function(){this._detectElementResize&&this._parentNode&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize)}},{key:"render",value:function(){var e=this.props,t=e.children,o=e.className,r=e.disableHeight,i=e.disableWidth,n=e.style,s=this.state,l=s.height,a=s.width,h={overflow:"visible"},c={};return r||(h.height=0,c.height=l),i||(h.width=0,c.width=a),P.createElement("div",{className:o,ref:this._setRef,style:function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?rt(o,!0).forEach(function(t){oW(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):rt(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}({},h,{},n)},t(c))}}]),t}(P.Component),oW(_,"propTypes",null),T);oW(ro,"defaultProps",{onResize:function(){},disableHeight:!1,disableWidth:!1,style:{}});var rr=(E=x=function(e){function t(){oE(this,t);for(var e,o,r=arguments.length,i=Array(r),n=0;n<r;n++)i[n]=arguments[n];return oW(oD(o=ok(this,(e=oG(t)).call.apply(e,[this].concat(i)))),"_child",void 0),oW(oD(o),"_measure",function(){var e=o.props,t=e.cache,r=e.columnIndex,i=void 0===r?0:r,n=e.parent,s=e.rowIndex,l=void 0===s?o.props.index||0:s,a=o._getCellMeasurements(),h=a.height,c=a.width;(h!==t.getHeight(l,i)||c!==t.getWidth(l,i))&&(t.set(l,i,c,h),n&&"function"==typeof n.recomputeGridSize&&n.recomputeGridSize({columnIndex:i,rowIndex:l}))}),oW(oD(o),"_registerChild",function(e){e&&Element,o._child=e,e&&o._maybeMeasureCell()}),o}return oA(t,e),oz(t,[{key:"componentDidMount",value:function(){this._maybeMeasureCell()}},{key:"componentDidUpdate",value:function(){this._maybeMeasureCell()}},{key:"render",value:function(){var e=this.props.children;return"function"==typeof e?e({measure:this._measure,registerChild:this._registerChild}):e}},{key:"_getCellMeasurements",value:function(){var e=this.props.cache,t=this._child||r(this);if(!t||!t.ownerDocument||!t.ownerDocument.defaultView||!(t instanceof t.ownerDocument.defaultView.HTMLElement))return{height:0,width:0};var o=t.style.width,i=t.style.height;e.hasFixedWidth()||(t.style.width="auto"),e.hasFixedHeight()||(t.style.height="auto");var n=Math.ceil(t.offsetHeight),s=Math.ceil(t.offsetWidth);return o&&(t.style.width=o),i&&(t.style.height=i),{height:n,width:s}}},{key:"_maybeMeasureCell",value:function(){var e=this.props,t=e.cache,o=e.columnIndex,r=void 0===o?0:o,i=e.parent,n=e.rowIndex,s=void 0===n?this.props.index||0:n;if(!t.has(s,r)){var l=this._getCellMeasurements(),a=l.height,h=l.width;t.set(s,r,h,a),i&&"function"==typeof i.invalidateCellSizeAfterRender&&i.invalidateCellSizeAfterRender({columnIndex:r,rowIndex:s})}}}]),t}(P.PureComponent),oW(x,"propTypes",null),E);function ri(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}oW(rr,"__internalCellMeasurerFlag",!1);var rn="requested",rs=function(e){function t(){oE(this,t);for(var e,o,r=arguments.length,i=Array(r),n=0;n<r;n++)i[n]=arguments[n];return oW(oD(o=ok(this,(e=oG(t)).call.apply(e,[this].concat(i)))),"state",{isScrolling:!1,scrollLeft:0,scrollTop:0}),oW(oD(o),"_calculateSizeAndPositionDataOnNextUpdate",!1),oW(oD(o),"_onSectionRenderedMemoizer",oY()),oW(oD(o),"_onScrollMemoizer",oY(!1)),oW(oD(o),"_invokeOnSectionRenderedHelper",function(){var e=o.props,t=e.cellLayoutManager,r=e.onSectionRendered;o._onSectionRenderedMemoizer({callback:r,indices:{indices:t.getLastRenderedIndices()}})}),oW(oD(o),"_setScrollingContainerRef",function(e){o._scrollingContainer=e}),oW(oD(o),"_updateScrollPositionForScrollToCell",function(){var e=o.props,t=e.cellLayoutManager,r=e.height,i=e.scrollToAlignment,n=e.scrollToCell,s=e.width,l=o.state,a=l.scrollLeft,h=l.scrollTop;if(n>=0){var c=t.getScrollPositionForCell({align:i,cellIndex:n,height:r,scrollLeft:a,scrollTop:h,width:s});(c.scrollLeft!==a||c.scrollTop!==h)&&o._setScrollPosition(c)}}),oW(oD(o),"_onScroll",function(e){if(e.target===o._scrollingContainer){o._enablePointerEventsAfterDelay();var t=o.props,r=t.cellLayoutManager,i=t.height,n=t.isScrollingChange,s=t.width,l=o._scrollbarSize,a=r.getTotalSize(),h=a.height,c=a.width,d=Math.max(0,Math.min(c-s+l,e.target.scrollLeft)),u=Math.max(0,Math.min(h-i+l,e.target.scrollTop));if(o.state.scrollLeft!==d||o.state.scrollTop!==u){var p=e.cancelable?"observed":rn;o.state.isScrolling||n(!0),o.setState({isScrolling:!0,scrollLeft:d,scrollPositionChangeReason:p,scrollTop:u})}o._invokeOnScrollMemoizer({scrollLeft:d,scrollTop:u,totalWidth:c,totalHeight:h})}}),o._scrollbarSize=oJ(),void 0===o._scrollbarSize?(o._scrollbarSizeMeasured=!1,o._scrollbarSize=0):o._scrollbarSizeMeasured=!0,o}return oA(t,e),oz(t,[{key:"recomputeCellSizesAndPositions",value:function(){this._calculateSizeAndPositionDataOnNextUpdate=!0,this.forceUpdate()}},{key:"componentDidMount",value:function(){var e=this.props,t=e.cellLayoutManager,o=e.scrollLeft,r=e.scrollToCell,i=e.scrollTop;this._scrollbarSizeMeasured||(this._scrollbarSize=oJ(),this._scrollbarSizeMeasured=!0,this.setState({})),r>=0?this._updateScrollPositionForScrollToCell():(o>=0||i>=0)&&this._setScrollPosition({scrollLeft:o,scrollTop:i}),this._invokeOnSectionRenderedHelper();var n=t.getTotalSize(),s=n.height,l=n.width;this._invokeOnScrollMemoizer({scrollLeft:o||0,scrollTop:i||0,totalHeight:s,totalWidth:l})}},{key:"componentDidUpdate",value:function(e,t){var o=this.props,r=o.height,i=o.scrollToAlignment,n=o.scrollToCell,s=o.width,l=this.state,a=l.scrollLeft,h=l.scrollPositionChangeReason,c=l.scrollTop;h===rn&&(a>=0&&a!==t.scrollLeft&&a!==this._scrollingContainer.scrollLeft&&(this._scrollingContainer.scrollLeft=a),c>=0&&c!==t.scrollTop&&c!==this._scrollingContainer.scrollTop&&(this._scrollingContainer.scrollTop=c)),(r!==e.height||i!==e.scrollToAlignment||n!==e.scrollToCell||s!==e.width)&&this._updateScrollPositionForScrollToCell(),this._invokeOnSectionRenderedHelper()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var e=this.props,t=e.autoHeight,o=e.cellCount,r=e.cellLayoutManager,i=e.className,n=e.height,s=e.horizontalOverscanSize,l=e.id,a=e.noContentRenderer,h=e.style,c=e.verticalOverscanSize,d=e.width,u=this.state,p=u.isScrolling,f=u.scrollLeft,m=u.scrollTop;(this._lastRenderedCellCount!==o||this._lastRenderedCellLayoutManager!==r||this._calculateSizeAndPositionDataOnNextUpdate)&&(this._lastRenderedCellCount=o,this._lastRenderedCellLayoutManager=r,this._calculateSizeAndPositionDataOnNextUpdate=!1,r.calculateSizeAndPositionData());var g=r.getTotalSize(),v=g.height,y=g.width,S=Math.max(0,f-s),w=Math.max(0,m-c),C=Math.min(y,f+d+s),b=Math.min(v,m+n+c),R=n>0&&d>0?r.cellRenderers({height:b-w,isScrolling:p,width:C-S,x:S,y:w}):[],_={boxSizing:"border-box",direction:"ltr",height:t?"auto":n,position:"relative",WebkitOverflowScrolling:"touch",width:d,willChange:"transform"},T=v>n?this._scrollbarSize:0,x=y>d?this._scrollbarSize:0;return _.overflowX=y+T<=d?"hidden":"auto",_.overflowY=v+x<=n?"hidden":"auto",P.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:oU("ReactVirtualized__Collection",i),id:l,onScroll:this._onScroll,role:"grid",style:function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?ri(o,!0).forEach(function(t){oW(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):ri(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}({},_,{},h),tabIndex:0},o>0&&P.createElement("div",{className:"ReactVirtualized__Collection__innerScrollContainer",style:{height:v,maxHeight:v,maxWidth:y,overflow:"hidden",pointerEvents:p?"none":"",width:y}},R),0===o&&a())}},{key:"_enablePointerEventsAfterDelay",value:function(){var e=this;this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=setTimeout(function(){(0,e.props.isScrollingChange)(!1),e._disablePointerEventsTimeoutId=null,e.setState({isScrolling:!1})},150)}},{key:"_invokeOnScrollMemoizer",value:function(e){var t=this,o=e.scrollLeft,r=e.scrollTop,i=e.totalHeight,n=e.totalWidth;this._onScrollMemoizer({callback:function(e){var o=e.scrollLeft,r=e.scrollTop,s=t.props,l=s.height;(0,s.onScroll)({clientHeight:l,clientWidth:s.width,scrollHeight:i,scrollLeft:o,scrollTop:r,scrollWidth:n})},indices:{scrollLeft:o,scrollTop:r}})}},{key:"_setScrollPosition",value:function(e){var t=e.scrollLeft,o=e.scrollTop,r={scrollPositionChangeReason:rn};t>=0&&(r.scrollLeft=t),o>=0&&(r.scrollTop=o),(t>=0&&t!==this.state.scrollLeft||o>=0&&o!==this.state.scrollTop)&&this.setState(r)}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 0===e.cellCount&&(0!==t.scrollLeft||0!==t.scrollTop)?{scrollLeft:0,scrollTop:0,scrollPositionChangeReason:rn}:e.scrollLeft!==t.scrollLeft||e.scrollTop!==t.scrollTop?{scrollLeft:null!=e.scrollLeft?e.scrollLeft:t.scrollLeft,scrollTop:null!=e.scrollTop?e.scrollTop:t.scrollTop,scrollPositionChangeReason:rn}:null}}]),t}(P.PureComponent);oW(rs,"defaultProps",{"aria-label":"grid",horizontalOverscanSize:0,noContentRenderer:function(){return null},onScroll:function(){return null},onSectionRendered:function(){return null},scrollToAlignment:"auto",scrollToCell:-1,style:{},verticalOverscanSize:0}),rs.propTypes={},oF(rs);var rl=function(){function e(t){var o=t.height,r=t.width,i=t.x,n=t.y;oE(this,e),this.height=o,this.width=r,this.x=i,this.y=n,this._indexMap={},this._indices=[]}return oz(e,[{key:"addCellIndex",value:function(e){var t=e.index;this._indexMap[t]||(this._indexMap[t]=!0,this._indices.push(t))}},{key:"getCellIndices",value:function(){return this._indices}},{key:"toString",value:function(){return"".concat(this.x,",").concat(this.y," ").concat(this.width,"x").concat(this.height)}}]),e}(),ra=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;oE(this,e),this._sectionSize=t,this._cellMetadata=[],this._sections={}}return oz(e,[{key:"getCellIndices",value:function(e){var t=e.height,o=e.width,r=e.x,i=e.y,n={};return this.getSections({height:t,width:o,x:r,y:i}).forEach(function(e){return e.getCellIndices().forEach(function(e){n[e]=e})}),Object.keys(n).map(function(e){return n[e]})}},{key:"getCellMetadata",value:function(e){var t=e.index;return this._cellMetadata[t]}},{key:"getSections",value:function(e){for(var t=e.height,o=e.width,r=e.x,i=e.y,n=Math.floor(r/this._sectionSize),s=Math.floor((r+o-1)/this._sectionSize),l=Math.floor(i/this._sectionSize),a=Math.floor((i+t-1)/this._sectionSize),h=[],c=n;c<=s;c++)for(var d=l;d<=a;d++){var u="".concat(c,".").concat(d);this._sections[u]||(this._sections[u]=new rl({height:this._sectionSize,width:this._sectionSize,x:c*this._sectionSize,y:d*this._sectionSize})),h.push(this._sections[u])}return h}},{key:"getTotalSectionCount",value:function(){return Object.keys(this._sections).length}},{key:"toString",value:function(){var e=this;return Object.keys(this._sections).map(function(t){return e._sections[t].toString()})}},{key:"registerCell",value:function(e){var t=e.cellMetadatum,o=e.index;this._cellMetadata[o]=t,this.getSections(t).forEach(function(e){return e.addCellIndex({index:o})})}}]),e}();function rh(e){var t=e.align,o=e.cellOffset,r=e.cellSize,i=e.containerSize,n=e.currentOffset,s=o-i+r;switch(void 0===t?"auto":t){case"start":return o;case"end":return s;case"center":return o-(i-r)/2;default:return Math.max(s,Math.min(o,n))}}var rc=function(e){function t(e,o){var r;return oE(this,t),(r=ok(this,oG(t).call(this,e,o)))._cellMetadata=[],r._lastRenderedCellIndices=[],r._cellCache=[],r._isScrollingChange=r._isScrollingChange.bind(oD(r)),r._setCollectionViewRef=r._setCollectionViewRef.bind(oD(r)),r}return oA(t,e),oz(t,[{key:"forceUpdate",value:function(){void 0!==this._collectionView&&this._collectionView.forceUpdate()}},{key:"recomputeCellSizesAndPositions",value:function(){this._cellCache=[],this._collectionView.recomputeCellSizesAndPositions()}},{key:"render",value:function(){var e=oB({},this.props);return P.createElement(rs,oB({cellLayoutManager:this,isScrollingChange:this._isScrollingChange,ref:this._setCollectionViewRef},e))}},{key:"calculateSizeAndPositionData",value:function(){var e=this.props,t=function(e){for(var t=e.cellCount,o=e.cellSizeAndPositionGetter,r=e.sectionSize,i=[],n=new ra(r),s=0,l=0,a=0;a<t;a++){var h=o({index:a});if(null==h.height||isNaN(h.height)||null==h.width||isNaN(h.width)||null==h.x||isNaN(h.x)||null==h.y||isNaN(h.y))throw Error("Invalid metadata returned for cell ".concat(a,`:
|
|
15
|
+
https://fb.me/react-async-component-lifecycle-hooks`);if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=oH,t.componentWillReceiveProps=oL),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=oP;var n=t.componentDidUpdate;t.componentDidUpdate=function(e,t,o){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:o;n.call(this,e,t,r)}}return e}function oB(){return(oB=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)({}).hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e}).apply(null,arguments)}oH.__suppressDeprecationWarning=!0,oL.__suppressDeprecationWarning=!0,oP.__suppressDeprecationWarning=!0;let oU=function(){for(var e,t,o=0,r="";o<arguments.length;)(e=arguments[o++])&&(t=function e(t){var o,r,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t))for(o=0;o<t.length;o++)t[o]&&(r=e(t[o]))&&(i&&(i+=" "),i+=r);else for(o in t)t[o]&&(i&&(i+=" "),i+=o);return i}(e))&&(r&&(r+=" "),r+=t);return r};function oZ(e){var t=e.cellCount,o=e.cellSize,r=e.computeMetadataCallback,i=e.computeMetadataCallbackProps,n=e.nextCellsCount,s=e.nextCellSize,l=e.nextScrollToIndex,a=e.scrollToIndex,h=e.updateScrollOffsetForScrollToIndex;(t!==n||("number"==typeof o||"number"==typeof s)&&o!==s)&&(r(i),a>=0&&a===l&&h())}function oj(e,t){if(null==e)return{};var o={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;o[r]=e[r]}return o}function oV(e,t){if(null==e)return{};var o,r,i=oj(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r<n.length;r++)o=n[r],-1===t.indexOf(o)&&({}).propertyIsEnumerable.call(e,o)&&(i[o]=e[o])}return i}var o$=function(){function e(t){var o=t.cellCount,r=t.cellSizeGetter,i=t.estimatedCellSize;oE(this,e),oW(this,"_cellSizeAndPositionData",{}),oW(this,"_lastMeasuredIndex",-1),oW(this,"_lastBatchedIndex",-1),oW(this,"_cellCount",void 0),oW(this,"_cellSizeGetter",void 0),oW(this,"_estimatedCellSize",void 0),this._cellSizeGetter=r,this._cellCount=o,this._estimatedCellSize=i}return oz(e,[{key:"areOffsetsAdjusted",value:function(){return!1}},{key:"configure",value:function(e){var t=e.cellCount,o=e.estimatedCellSize,r=e.cellSizeGetter;this._cellCount=t,this._estimatedCellSize=o,this._cellSizeGetter=r}},{key:"getCellCount",value:function(){return this._cellCount}},{key:"getEstimatedCellSize",value:function(){return this._estimatedCellSize}},{key:"getLastMeasuredIndex",value:function(){return this._lastMeasuredIndex}},{key:"getOffsetAdjustment",value:function(){return 0}},{key:"getSizeAndPositionOfCell",value:function(e){if(e<0||e>=this._cellCount)throw Error("Requested index ".concat(e," is outside of range 0..").concat(this._cellCount));if(e>this._lastMeasuredIndex)for(var t=this.getSizeAndPositionOfLastMeasuredCell(),o=t.offset+t.size,r=this._lastMeasuredIndex+1;r<=e;r++){var i=this._cellSizeGetter({index:r});if(void 0===i||isNaN(i))throw Error("Invalid size returned for cell ".concat(r," of value ").concat(i));null===i?(this._cellSizeAndPositionData[r]={offset:o,size:0},this._lastBatchedIndex=e):(this._cellSizeAndPositionData[r]={offset:o,size:i},o+=i,this._lastMeasuredIndex=e)}return this._cellSizeAndPositionData[e]}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}}},{key:"getTotalSize",value:function(){var e=this.getSizeAndPositionOfLastMeasuredCell();return e.offset+e.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize}},{key:"getUpdatedOffsetForIndex",value:function(e){var t,o=e.align,r=e.containerSize,i=e.currentOffset,n=e.targetIndex;if(r<=0)return 0;var s=this.getSizeAndPositionOfCell(n),l=s.offset,a=l-r+s.size;switch(void 0===o?"auto":o){case"start":t=l;break;case"end":t=a;break;case"center":t=l-(r-s.size)/2;break;default:t=Math.max(a,Math.min(l,i))}return Math.max(0,Math.min(this.getTotalSize()-r,t))}},{key:"getVisibleCellRange",value:function(e){var t=e.containerSize,o=e.offset;if(0===this.getTotalSize())return{};var r=o+t,i=this._findNearestCell(o),n=this.getSizeAndPositionOfCell(i);o=n.offset+n.size;for(var s=i;o<r&&s<this._cellCount-1;)s++,o+=this.getSizeAndPositionOfCell(s).size;return{start:i,stop:s}}},{key:"resetCell",value:function(e){this._lastMeasuredIndex=Math.min(this._lastMeasuredIndex,e-1)}},{key:"_binarySearch",value:function(e,t,o){for(;t<=e;){var r=t+Math.floor((e-t)/2),i=this.getSizeAndPositionOfCell(r).offset;if(i===o)return r;i<o?t=r+1:i>o&&(e=r-1)}return t>0?t-1:0}},{key:"_exponentialSearch",value:function(e,t){for(var o=1;e<this._cellCount&&this.getSizeAndPositionOfCell(e).offset<t;)e+=o,o*=2;return this._binarySearch(Math.min(e,this._cellCount-1),Math.floor(e/2),t)}},{key:"_findNearestCell",value:function(e){if(isNaN(e))throw Error("Invalid offset ".concat(e," specified"));e=Math.max(0,e);var t=this.getSizeAndPositionOfLastMeasuredCell(),o=Math.max(0,this._lastMeasuredIndex);return t.offset>=e?this._binarySearch(o,0,e):this._exponentialSearch(o,e)}}]),e}(),oK=function(){function e(t){var o=t.maxScrollSize,r=void 0===o?"undefined"!=typeof window&&window.chrome?0xffff8c:15e5:o,i=oV(t,["maxScrollSize"]);oE(this,e),oW(this,"_cellSizeAndPositionManager",void 0),oW(this,"_maxScrollSize",void 0),this._cellSizeAndPositionManager=new o$(i),this._maxScrollSize=r}return oz(e,[{key:"areOffsetsAdjusted",value:function(){return this._cellSizeAndPositionManager.getTotalSize()>this._maxScrollSize}},{key:"configure",value:function(e){this._cellSizeAndPositionManager.configure(e)}},{key:"getCellCount",value:function(){return this._cellSizeAndPositionManager.getCellCount()}},{key:"getEstimatedCellSize",value:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()}},{key:"getLastMeasuredIndex",value:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()}},{key:"getOffsetAdjustment",value:function(e){var t=e.containerSize,o=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),i=this.getTotalSize();return Math.round(this._getOffsetPercentage({containerSize:t,offset:o,totalSize:i})*(i-r))}},{key:"getSizeAndPositionOfCell",value:function(e){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(e)}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()}},{key:"getTotalSize",value:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())}},{key:"getUpdatedOffsetForIndex",value:function(e){var t=e.align,o=e.containerSize,r=e.currentOffset,i=e.targetIndex;r=this._safeOffsetToOffset({containerSize:o,offset:r});var n=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({align:void 0===t?"auto":t,containerSize:o,currentOffset:r,targetIndex:i});return this._offsetToSafeOffset({containerSize:o,offset:n})}},{key:"getVisibleCellRange",value:function(e){var t=e.containerSize,o=e.offset;return o=this._safeOffsetToOffset({containerSize:t,offset:o}),this._cellSizeAndPositionManager.getVisibleCellRange({containerSize:t,offset:o})}},{key:"resetCell",value:function(e){this._cellSizeAndPositionManager.resetCell(e)}},{key:"_getOffsetPercentage",value:function(e){var t=e.containerSize,o=e.offset,r=e.totalSize;return r<=t?0:o/(r-t)}},{key:"_offsetToSafeOffset",value:function(e){var t=e.containerSize,o=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),i=this.getTotalSize();return r===i?o:Math.round(this._getOffsetPercentage({containerSize:t,offset:o,totalSize:r})*(i-t))}},{key:"_safeOffsetToOffset",value:function(e){var t=e.containerSize,o=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),i=this.getTotalSize();return r===i?o:Math.round(this._getOffsetPercentage({containerSize:t,offset:o,totalSize:i})*(r-t))}}]),e}();function oY(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t={};return function(o){var r=o.callback,i=o.indices,n=Object.keys(i),s=!e||n.every(function(e){var t=i[e];return Array.isArray(t)?t.length>0:t>=0}),l=n.length!==Object.keys(t).length||n.some(function(e){var o=t[e],r=i[e];return Array.isArray(r)?o.join(",")!==r.join(","):o!==r});t=i,s&&l&&r(i)}}function oq(e){var t=e.cellSize,o=e.cellSizeAndPositionManager,r=e.previousCellsCount,i=e.previousCellSize,n=e.previousScrollToAlignment,s=e.previousScrollToIndex,l=e.previousSize,a=e.scrollOffset,h=e.scrollToAlignment,c=e.scrollToIndex,d=e.size,u=e.sizeJustIncreasedFromZero,p=e.updateScrollIndexCallback,f=o.getCellCount(),m=c>=0&&c<f;m&&(d!==l||u||!i||"number"==typeof t&&t!==i||h!==n||c!==s)?p(c):!m&&f>0&&(d<l||f<r)&&a>o.getTotalSize()-d&&p(f-1)}let oX=!!("undefined"!=typeof window&&window.document&&window.document.createElement);function oJ(e){if((!y&&0!==y||e)&&oX){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),y=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return y}var oQ=(S="undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).requestAnimationFrame||S.webkitRequestAnimationFrame||S.mozRequestAnimationFrame||S.oRequestAnimationFrame||S.msRequestAnimationFrame||function(e){return S.setTimeout(e,1e3/60)},o0=S.cancelAnimationFrame||S.webkitCancelAnimationFrame||S.mozCancelAnimationFrame||S.oCancelAnimationFrame||S.msCancelAnimationFrame||function(e){S.clearTimeout(e)},o1=function(e){return o0(e.id)},o2=function(e,t){Promise.resolve().then(function(){o=Date.now()});var o,r={id:oQ(function i(){Date.now()-o>=t?e.call():r.id=oQ(i)})};return r};function o5(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}function o3(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?o5(o,!0).forEach(function(t){oW(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):o5(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}var o6="requested",o4=(C=w=function(e){function t(e){var o;return oE(this,t),oW(oD(o=ok(this,oG(t).call(this,e))),"_onGridRenderedMemoizer",oY()),oW(oD(o),"_onScrollMemoizer",oY(!1)),oW(oD(o),"_deferredInvalidateColumnIndex",null),oW(oD(o),"_deferredInvalidateRowIndex",null),oW(oD(o),"_recomputeScrollLeftFlag",!1),oW(oD(o),"_recomputeScrollTopFlag",!1),oW(oD(o),"_horizontalScrollBarSize",0),oW(oD(o),"_verticalScrollBarSize",0),oW(oD(o),"_scrollbarPresenceChanged",!1),oW(oD(o),"_scrollingContainer",void 0),oW(oD(o),"_childrenToDisplay",void 0),oW(oD(o),"_columnStartIndex",void 0),oW(oD(o),"_columnStopIndex",void 0),oW(oD(o),"_rowStartIndex",void 0),oW(oD(o),"_rowStopIndex",void 0),oW(oD(o),"_renderedColumnStartIndex",0),oW(oD(o),"_renderedColumnStopIndex",0),oW(oD(o),"_renderedRowStartIndex",0),oW(oD(o),"_renderedRowStopIndex",0),oW(oD(o),"_initialScrollTop",void 0),oW(oD(o),"_initialScrollLeft",void 0),oW(oD(o),"_disablePointerEventsTimeoutId",void 0),oW(oD(o),"_styleCache",{}),oW(oD(o),"_cellCache",{}),oW(oD(o),"_debounceScrollEndedCallback",function(){o._disablePointerEventsTimeoutId=null,o.setState({isScrolling:!1,needToResetStyleCache:!1})}),oW(oD(o),"_invokeOnGridRenderedHelper",function(){var e=o.props.onSectionRendered;o._onGridRenderedMemoizer({callback:e,indices:{columnOverscanStartIndex:o._columnStartIndex,columnOverscanStopIndex:o._columnStopIndex,columnStartIndex:o._renderedColumnStartIndex,columnStopIndex:o._renderedColumnStopIndex,rowOverscanStartIndex:o._rowStartIndex,rowOverscanStopIndex:o._rowStopIndex,rowStartIndex:o._renderedRowStartIndex,rowStopIndex:o._renderedRowStopIndex}})}),oW(oD(o),"_onWheel",function(e){var t=e.deltaX,r=e.deltaY;o.handleWheelEvent({deltaX:t,deltaY:r})}),oW(oD(o),"_setScrollingContainerRef",function(e){e&&(e.removeEventListener("wheel",o.preventDefault),e.addEventListener("wheel",o.preventDefault,{passive:!1})),o._scrollingContainer=e}),oW(oD(o),"_onScroll",function(e){e.target===o._scrollingContainer&&o.handleScrollEvent(e.target)}),o.state={instanceProps:{columnSizeAndPositionManager:new oK({cellCount:e.columnCount,cellSizeGetter:function(o){return t._wrapSizeGetter(e.columnWidth)(o)},estimatedCellSize:t._getEstimatedColumnSize(e)}),rowSizeAndPositionManager:new oK({cellCount:e.rowCount,cellSizeGetter:function(o){return t._wrapSizeGetter(e.rowHeight)(o)},estimatedCellSize:t._getEstimatedRowSize(e)}),prevColumnWidth:e.columnWidth,prevRowHeight:e.rowHeight,prevColumnCount:e.columnCount,prevRowCount:e.rowCount,prevIsScrolling:!0===e.isScrolling,prevScrollToColumn:e.scrollToColumn,prevScrollToRow:e.scrollToRow,scrollbarSize:0,scrollbarSizeMeasured:!1},isScrolling:!1,scrollDirectionHorizontal:1,scrollDirectionVertical:1,scrollLeft:0,scrollTop:0,scrollPositionChangeReason:null,needToResetStyleCache:!1},e.scrollToRow>0&&(o._initialScrollTop=o._getCalculatedScrollTop(e,o.state)),e.scrollToColumn>0&&(o._initialScrollLeft=o._getCalculatedScrollLeft(e,o.state)),o}return oA(t,e),oz(t,[{key:"getOffsetForCell",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,o=void 0===t?this.props.scrollToAlignment:t,r=e.columnIndex,i=void 0===r?this.props.scrollToColumn:r,n=e.rowIndex,s=void 0===n?this.props.scrollToRow:n,l=o3({},this.props,{scrollToAlignment:o,scrollToColumn:i,scrollToRow:s});return{scrollLeft:this._getCalculatedScrollLeft(l),scrollTop:this._getCalculatedScrollTop(l)}}},{key:"getTotalRowsHeight",value:function(){return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize()}},{key:"getTotalColumnsWidth",value:function(){return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize()}},{key:"handleScrollEvent",value:function(e){var t=e.scrollLeft,o=e.scrollTop,r=void 0===o?0:o;if(!(r<0)){this._debounceScrollEnded();var i=this.props,n=i.autoHeight,s=i.autoWidth,l=i.height,a=i.width,h=this.state.instanceProps,c=h.scrollbarSize,d=h.rowSizeAndPositionManager.getTotalSize(),u=h.columnSizeAndPositionManager.getTotalSize(),p=Math.min(Math.max(0,u-a+c),void 0===t?0:t),f=Math.min(Math.max(0,d-l+c),r);if(this.state.scrollLeft!==p||this.state.scrollTop!==f){var m={isScrolling:!0,scrollDirectionHorizontal:p!==this.state.scrollLeft?p>this.state.scrollLeft?1:-1:this.state.scrollDirectionHorizontal,scrollDirectionVertical:f!==this.state.scrollTop?f>this.state.scrollTop?1:-1:this.state.scrollDirectionVertical,scrollPositionChangeReason:"observed"};n||(m.scrollTop=f),s||(m.scrollLeft=p),m.needToResetStyleCache=!1,this.setState(m)}this._invokeOnScrollMemoizer({scrollLeft:p,scrollTop:f,totalColumnsWidth:u,totalRowsHeight:d})}}},{key:"preventDefault",value:function(e){e.preventDefault()}},{key:"handleWheelEvent",value:function(e){var t=e.deltaX,o=e.deltaY;this._debounceScrollEnded();var r=this.props,i=r.autoHeight,n=r.autoWidth,s=r.height,l=r.width,a=this.state.instanceProps.scrollbarSize,h=this.state.instanceProps.rowSizeAndPositionManager.getTotalSize(),c=this.state.instanceProps.columnSizeAndPositionManager.getTotalSize(),d=Math.min(Math.max(0,c-l+a),Math.max(0,this._scrollingContainer.scrollLeft+t)),u=Math.min(Math.max(0,h-s+a),Math.max(0,this._scrollingContainer.scrollTop+o));if(this.state.scrollLeft!==d||this.state.scrollTop!==u){var p={isScrolling:!0,scrollDirectionHorizontal:d!==this.state.scrollLeft?d>this.state.scrollLeft?1:-1:this.state.scrollDirectionHorizontal,scrollDirectionVertical:u!==this.state.scrollTop?u>this.state.scrollTop?1:-1:this.state.scrollDirectionVertical,scrollPositionChangeReason:o6};i||(p.scrollTop=u),n||(p.scrollLeft=d),p.needToResetStyleCache=!1,this.setState(p)}this._invokeOnScrollMemoizer({scrollLeft:d,scrollTop:u,totalColumnsWidth:c,totalRowsHeight:h})}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,o=e.rowIndex;this._deferredInvalidateColumnIndex="number"==typeof this._deferredInvalidateColumnIndex?Math.min(this._deferredInvalidateColumnIndex,t):t,this._deferredInvalidateRowIndex="number"==typeof this._deferredInvalidateRowIndex?Math.min(this._deferredInvalidateRowIndex,o):o}},{key:"measureAllCells",value:function(){var e=this.props,t=e.columnCount,o=e.rowCount,r=this.state.instanceProps;r.columnSizeAndPositionManager.getSizeAndPositionOfCell(t-1),r.rowSizeAndPositionManager.getSizeAndPositionOfCell(o-1)}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,o=void 0===t?0:t,r=e.rowIndex,i=void 0===r?0:r,n=this.props,s=n.scrollToColumn,l=n.scrollToRow,a=this.state.instanceProps;a.columnSizeAndPositionManager.resetCell(o),a.rowSizeAndPositionManager.resetCell(i),this._recomputeScrollLeftFlag=s>=0&&(1===this.state.scrollDirectionHorizontal?o<=s:o>=s),this._recomputeScrollTopFlag=l>=0&&(1===this.state.scrollDirectionVertical?i<=l:i>=l),this._styleCache={},this._cellCache={},this.forceUpdate()}},{key:"scrollToCell",value:function(e){var t=e.columnIndex,o=e.rowIndex,r=this.props,i=r.columnCount,n=r.onScrollToTargetCausedUpdate,s=this.state,l=s.scrollLeft,a=s.scrollTop,h=this.props,c=this.state,d=void 0,u=void 0;if(i>1&&void 0!==t){var p=this._updateScrollLeftForScrollToColumn(o3({},h,{scrollToColumn:t}),c,!0);p&&"number"==typeof p.scrollLeft&&p.scrollLeft>=0&&(d=p.scrollLeft)}if(void 0!==o){var f=this._updateScrollTopForScrollToRow(o3({},h,{scrollToRow:o}),c,!0);f&&"number"==typeof f.scrollTop&&f.scrollTop>=0&&(u=f.scrollTop)}if(n&&("number"==typeof d||"number"==typeof u)){var m="number"!=typeof d?d:l,g="number"!=typeof u?u:a;n({clientHeight:h.height,clientWidth:h.width,scrollHeight:this.getTotalRowsHeight(),scrollLeft:m,scrollTop:g,scrollWidth:this.getTotalColumnsWidth()})}}},{key:"componentDidMount",value:function(){var e=this.props,o=e.getScrollbarSize,r=e.height,i=e.scrollLeft,n=e.scrollToColumn,s=e.scrollTop,l=e.scrollToRow,a=e.width,h=this.state.instanceProps;if(this._initialScrollTop=0,this._initialScrollLeft=0,this._handleInvalidatedGridSize(),h.scrollbarSizeMeasured||this.setState(function(e){var t=o3({},e,{needToResetStyleCache:!1});return t.instanceProps.scrollbarSize=o(),t.instanceProps.scrollbarSizeMeasured=!0,t}),"number"==typeof i&&i>=0||"number"==typeof s&&s>=0){var c=t._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:i,scrollTop:s});c&&(c.needToResetStyleCache=!1,this.setState(c))}this._scrollingContainer&&(this._scrollingContainer.scrollLeft!==this.state.scrollLeft&&(this._scrollingContainer.scrollLeft=this.state.scrollLeft),this._scrollingContainer.scrollTop!==this.state.scrollTop&&(this._scrollingContainer.scrollTop=this.state.scrollTop));var d=r>0&&a>0;n>=0&&d&&this._updateScrollLeftForScrollToColumn(),l>=0&&d&&this._updateScrollTopForScrollToRow(),this._invokeOnGridRenderedHelper(),this._invokeOnScrollMemoizer({scrollLeft:i||0,scrollTop:s||0,totalColumnsWidth:h.columnSizeAndPositionManager.getTotalSize(),totalRowsHeight:h.rowSizeAndPositionManager.getTotalSize()}),this._maybeCallOnScrollbarPresenceChange()}},{key:"componentDidUpdate",value:function(e,t){var o=this,r=this.props,i=r.autoHeight,n=r.autoWidth,s=r.columnCount,l=r.height,a=r.rowCount,h=r.scrollToAlignment,c=r.scrollToColumn,d=r.scrollToRow,u=r.width,p=this.state,f=p.scrollLeft,m=p.scrollPositionChangeReason,g=p.scrollTop,v=p.instanceProps;this._handleInvalidatedGridSize();var y=s>0&&0===e.columnCount||a>0&&0===e.rowCount;m===o6&&(!n&&f>=0&&(f!==this._scrollingContainer.scrollLeft||y)&&(this._scrollingContainer.scrollLeft=f),!i&&g>=0&&(g!==this._scrollingContainer.scrollTop||y)&&(this._scrollingContainer.scrollTop=g));var S=(0===e.width||0===e.height)&&l>0&&u>0;if(this._recomputeScrollLeftFlag?(this._recomputeScrollLeftFlag=!1,this._updateScrollLeftForScrollToColumn(this.props)):oq({cellSizeAndPositionManager:v.columnSizeAndPositionManager,previousCellsCount:e.columnCount,previousCellSize:e.columnWidth,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToColumn,previousSize:e.width,scrollOffset:f,scrollToAlignment:h,scrollToIndex:c,size:u,sizeJustIncreasedFromZero:S,updateScrollIndexCallback:function(){return o._updateScrollLeftForScrollToColumn(o.props)}}),this._recomputeScrollTopFlag?(this._recomputeScrollTopFlag=!1,this._updateScrollTopForScrollToRow(this.props)):oq({cellSizeAndPositionManager:v.rowSizeAndPositionManager,previousCellsCount:e.rowCount,previousCellSize:e.rowHeight,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToRow,previousSize:e.height,scrollOffset:g,scrollToAlignment:h,scrollToIndex:d,size:l,sizeJustIncreasedFromZero:S,updateScrollIndexCallback:function(){return o._updateScrollTopForScrollToRow(o.props)}}),this._invokeOnGridRenderedHelper(),f!==t.scrollLeft||g!==t.scrollTop){var w=v.rowSizeAndPositionManager.getTotalSize(),C=v.columnSizeAndPositionManager.getTotalSize();this._invokeOnScrollMemoizer({scrollLeft:f,scrollTop:g,totalColumnsWidth:C,totalRowsHeight:w})}this._maybeCallOnScrollbarPresenceChange()}},{key:"componentWillUnmount",value:function(){this._scrollingContainer&&this._scrollingContainer.removeEventListener("wheel",this.preventDefault),this._disablePointerEventsTimeoutId&&o1(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var e=this.props,t=e.autoContainerWidth,o=e.autoHeight,r=e.autoWidth,i=e.className,n=e.containerProps,s=e.containerRole,l=e.containerStyle,a=e.height,h=e.id,c=e.noContentRenderer,d=e.role,u=e.style,p=e.tabIndex,f=e.width,m=this.state,g=m.instanceProps,v=m.needToResetStyleCache,y=this._isScrolling(),S={boxSizing:"border-box",direction:"ltr",height:o?"auto":a,position:"relative",width:r?"auto":f,WebkitOverflowScrolling:"touch",willChange:"transform"};v&&(this._styleCache={}),this.state.isScrolling||this._resetStyleCache(),this._calculateChildrenToRender(this.props,this.state);var w=g.columnSizeAndPositionManager.getTotalSize(),C=g.rowSizeAndPositionManager.getTotalSize(),R=C>a?g.scrollbarSize:0,b=w>f?g.scrollbarSize:0;(b!==this._horizontalScrollBarSize||R!==this._verticalScrollBarSize)&&(this._horizontalScrollBarSize=b,this._verticalScrollBarSize=R,this._scrollbarPresenceChanged=!0),S.overflowX=w+R<=f?"hidden":"auto",S.overflowY=C+b<=a?"hidden":"auto";var _=this._childrenToDisplay,T=0===_.length&&a>0&&f>0;return P.createElement("div",oB({ref:this._setScrollingContainerRef},n,{"aria-label":this.props["aria-label"],"aria-readonly":this.props["aria-readonly"],className:oU("ReactVirtualized__Grid",i),id:h,onScroll:this._onScroll,onWheel:this._onWheel,role:d,style:o3({},S,{},u),tabIndex:p}),_.length>0&&P.createElement("div",{className:"ReactVirtualized__Grid__innerScrollContainer",role:s,style:o3({width:t?"auto":w,height:C,maxWidth:w,maxHeight:C,overflow:"hidden",pointerEvents:y?"none":"",position:"relative"},l)},_),T&&c())}},{key:"_calculateChildrenToRender",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,o=e.cellRenderer,r=e.cellRangeRenderer,i=e.columnCount,n=e.deferredMeasurementCache,s=e.height,l=e.overscanColumnCount,a=e.overscanIndicesGetter,h=e.overscanRowCount,c=e.rowCount,d=e.width,u=e.isScrollingOptOut,p=t.scrollDirectionHorizontal,f=t.scrollDirectionVertical,m=t.instanceProps,g=this._initialScrollTop>0?this._initialScrollTop:t.scrollTop,v=this._initialScrollLeft>0?this._initialScrollLeft:t.scrollLeft,y=this._isScrolling(e,t);if(this._childrenToDisplay=[],s>0&&d>0){var S=m.columnSizeAndPositionManager.getVisibleCellRange({containerSize:d,offset:v}),w=m.rowSizeAndPositionManager.getVisibleCellRange({containerSize:s,offset:g}),C=m.columnSizeAndPositionManager.getOffsetAdjustment({containerSize:d,offset:v}),R=m.rowSizeAndPositionManager.getOffsetAdjustment({containerSize:s,offset:g});this._renderedColumnStartIndex=S.start,this._renderedColumnStopIndex=S.stop,this._renderedRowStartIndex=w.start,this._renderedRowStopIndex=w.stop;var b=a({direction:"horizontal",cellCount:i,overscanCellsCount:l,scrollDirection:p,startIndex:"number"==typeof S.start?S.start:0,stopIndex:"number"==typeof S.stop?S.stop:-1}),_=a({direction:"vertical",cellCount:c,overscanCellsCount:h,scrollDirection:f,startIndex:"number"==typeof w.start?w.start:0,stopIndex:"number"==typeof w.stop?w.stop:-1}),T=b.overscanStartIndex,x=b.overscanStopIndex,E=_.overscanStartIndex,M=_.overscanStopIndex;if(n){if(!n.hasFixedHeight()){for(var I=E;I<=M;I++)if(!n.has(I,0)){T=0,x=i-1;break}}if(!n.hasFixedWidth()){for(var O=T;O<=x;O++)if(!n.has(0,O)){E=0,M=c-1;break}}}this._childrenToDisplay=r({cellCache:this._cellCache,cellRenderer:o,columnSizeAndPositionManager:m.columnSizeAndPositionManager,columnStartIndex:T,columnStopIndex:x,deferredMeasurementCache:n,horizontalOffsetAdjustment:C,isScrolling:y,isScrollingOptOut:u,parent:this,rowSizeAndPositionManager:m.rowSizeAndPositionManager,rowStartIndex:E,rowStopIndex:M,scrollLeft:v,scrollTop:g,styleCache:this._styleCache,verticalOffsetAdjustment:R,visibleColumnIndices:S,visibleRowIndices:w}),this._columnStartIndex=T,this._columnStopIndex=x,this._rowStartIndex=E,this._rowStopIndex=M}}},{key:"_debounceScrollEnded",value:function(){var e=this.props.scrollingResetTimeInterval;this._disablePointerEventsTimeoutId&&o1(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=o2(this._debounceScrollEndedCallback,e)}},{key:"_handleInvalidatedGridSize",value:function(){if("number"==typeof this._deferredInvalidateColumnIndex&&"number"==typeof this._deferredInvalidateRowIndex){var e=this._deferredInvalidateColumnIndex,t=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:e,rowIndex:t})}}},{key:"_invokeOnScrollMemoizer",value:function(e){var t=this,o=e.scrollLeft,r=e.scrollTop,i=e.totalColumnsWidth,n=e.totalRowsHeight;this._onScrollMemoizer({callback:function(e){var o=e.scrollLeft,r=e.scrollTop,s=t.props,l=s.height;(0,s.onScroll)({clientHeight:l,clientWidth:s.width,scrollHeight:n,scrollLeft:o,scrollTop:r,scrollWidth:i})},indices:{scrollLeft:o,scrollTop:r}})}},{key:"_isScrolling",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return Object.hasOwnProperty.call(e,"isScrolling")?!!e.isScrolling:!!t.isScrolling}},{key:"_maybeCallOnScrollbarPresenceChange",value:function(){if(this._scrollbarPresenceChanged){var e=this.props.onScrollbarPresenceChange;this._scrollbarPresenceChanged=!1,e({horizontal:this._horizontalScrollBarSize>0,size:this.state.instanceProps.scrollbarSize,vertical:this._verticalScrollBarSize>0})}}},{key:"scrollToPosition",value:function(e){var o=e.scrollLeft,r=e.scrollTop,i=t._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:o,scrollTop:r});i&&(i.needToResetStyleCache=!1,this.setState(i))}},{key:"_getCalculatedScrollLeft",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return t._getCalculatedScrollLeft(e,o)}},{key:"_updateScrollLeftForScrollToColumn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=t._getScrollLeftForScrollToColumnStateUpdate(e,o);if(i)return i.needToResetStyleCache=!1,this.setState(i),e.onScrollToTargetCausedUpdate&&!r&&e.onScrollToTargetCausedUpdate({clientHeight:e.height,clientWidth:e.width,scrollHeight:this.getTotalRowsHeight(),scrollLeft:i.scrollLeft,scrollTop:i.scrollTop,scrollWidth:this.getTotalColumnsWidth()}),i}},{key:"_getCalculatedScrollTop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return t._getCalculatedScrollTop(e,o)}},{key:"_resetStyleCache",value:function(){var e=this._styleCache,t=this._cellCache,o=this.props.isScrollingOptOut;this._cellCache={},this._styleCache={};for(var r=this._rowStartIndex;r<=this._rowStopIndex;r++)for(var i=this._columnStartIndex;i<=this._columnStopIndex;i++){var n="".concat(r,"-").concat(i);this._styleCache[n]=e[n],o&&(this._cellCache[n]=t[n])}}},{key:"_updateScrollTopForScrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=t._getScrollTopForScrollToRowStateUpdate(e,o);if(i)return i.needToResetStyleCache=!1,this.setState(i),e.onScrollToTargetCausedUpdate&&!r&&e.onScrollToTargetCausedUpdate({clientHeight:e.height,clientWidth:e.width,scrollHeight:this.getTotalRowsHeight(),scrollLeft:i.scrollLeft,scrollTop:i.scrollTop,scrollWidth:this.getTotalColumnsWidth()}),i}}],[{key:"getDerivedStateFromProps",value:function(e,o){var r,i,n={};0===e.columnCount&&0!==o.scrollLeft||0===e.rowCount&&0!==o.scrollTop?(n.scrollLeft=0,n.scrollTop=0):(e.scrollLeft!==o.scrollLeft&&e.scrollToColumn<0||e.scrollTop!==o.scrollTop&&e.scrollToRow<0)&&Object.assign(n,t._getScrollToPositionStateUpdate({prevState:o,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}));var s=o.instanceProps;return n.needToResetStyleCache=!1,(e.columnWidth!==s.prevColumnWidth||e.rowHeight!==s.prevRowHeight)&&(n.needToResetStyleCache=!0),s.columnSizeAndPositionManager.configure({cellCount:e.columnCount,estimatedCellSize:t._getEstimatedColumnSize(e),cellSizeGetter:t._wrapSizeGetter(e.columnWidth)}),s.rowSizeAndPositionManager.configure({cellCount:e.rowCount,estimatedCellSize:t._getEstimatedRowSize(e),cellSizeGetter:t._wrapSizeGetter(e.rowHeight)}),(0===s.prevColumnCount||0===s.prevRowCount)&&(s.prevColumnCount=0,s.prevRowCount=0),e.autoHeight&&!1===e.isScrolling&&!0===s.prevIsScrolling&&Object.assign(n,{isScrolling:!1}),oZ({cellCount:s.prevColumnCount,cellSize:"number"==typeof s.prevColumnWidth?s.prevColumnWidth:null,computeMetadataCallback:function(){return s.columnSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.columnCount,nextCellSize:"number"==typeof e.columnWidth?e.columnWidth:null,nextScrollToIndex:e.scrollToColumn,scrollToIndex:s.prevScrollToColumn,updateScrollOffsetForScrollToIndex:function(){r=t._getScrollLeftForScrollToColumnStateUpdate(e,o)}}),oZ({cellCount:s.prevRowCount,cellSize:"number"==typeof s.prevRowHeight?s.prevRowHeight:null,computeMetadataCallback:function(){return s.rowSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.rowCount,nextCellSize:"number"==typeof e.rowHeight?e.rowHeight:null,nextScrollToIndex:e.scrollToRow,scrollToIndex:s.prevScrollToRow,updateScrollOffsetForScrollToIndex:function(){i=t._getScrollTopForScrollToRowStateUpdate(e,o)}}),s.prevColumnCount=e.columnCount,s.prevColumnWidth=e.columnWidth,s.prevIsScrolling=!0===e.isScrolling,s.prevRowCount=e.rowCount,s.prevRowHeight=e.rowHeight,s.prevScrollToColumn=e.scrollToColumn,s.prevScrollToRow=e.scrollToRow,s.scrollbarSize=e.getScrollbarSize(),void 0===s.scrollbarSize?(s.scrollbarSizeMeasured=!1,s.scrollbarSize=0):s.scrollbarSizeMeasured=!0,n.instanceProps=s,o3({},n,{},r,{},i)}},{key:"_getEstimatedColumnSize",value:function(e){return"number"==typeof e.columnWidth?e.columnWidth:e.estimatedColumnSize}},{key:"_getEstimatedRowSize",value:function(e){return"number"==typeof e.rowHeight?e.rowHeight:e.estimatedRowSize}},{key:"_getScrollToPositionStateUpdate",value:function(e){var t=e.prevState,o=e.scrollLeft,r=e.scrollTop,i={scrollPositionChangeReason:o6};return("number"==typeof o&&o>=0&&(i.scrollDirectionHorizontal=o>t.scrollLeft?1:-1,i.scrollLeft=o),"number"==typeof r&&r>=0&&(i.scrollDirectionVertical=r>t.scrollTop?1:-1,i.scrollTop=r),"number"==typeof o&&o>=0&&o!==t.scrollLeft||"number"==typeof r&&r>=0&&r!==t.scrollTop)?i:{}}},{key:"_wrapSizeGetter",value:function(e){return"function"==typeof e?e:function(){return e}}},{key:"_getCalculatedScrollLeft",value:function(e,t){var o=e.columnCount,r=e.height,i=e.scrollToAlignment,n=e.scrollToColumn,s=e.width,l=t.scrollLeft,a=t.instanceProps;if(o>0){var h=o-1,c=n<0?h:Math.min(h,n),d=a.rowSizeAndPositionManager.getTotalSize(),u=a.scrollbarSizeMeasured&&d>r?a.scrollbarSize:0;return a.columnSizeAndPositionManager.getUpdatedOffsetForIndex({align:i,containerSize:s-u,currentOffset:l,targetIndex:c})}return 0}},{key:"_getScrollLeftForScrollToColumnStateUpdate",value:function(e,o){var r=o.scrollLeft,i=t._getCalculatedScrollLeft(e,o);return"number"==typeof i&&i>=0&&r!==i?t._getScrollToPositionStateUpdate({prevState:o,scrollLeft:i,scrollTop:-1}):{}}},{key:"_getCalculatedScrollTop",value:function(e,t){var o=e.height,r=e.rowCount,i=e.scrollToAlignment,n=e.scrollToRow,s=e.width,l=t.scrollTop,a=t.instanceProps;if(r>0){var h=r-1,c=n<0?h:Math.min(h,n),d=a.columnSizeAndPositionManager.getTotalSize(),u=a.scrollbarSizeMeasured&&d>s?a.scrollbarSize:0;return a.rowSizeAndPositionManager.getUpdatedOffsetForIndex({align:i,containerSize:o-u,currentOffset:l,targetIndex:c})}return 0}},{key:"_getScrollTopForScrollToRowStateUpdate",value:function(e,o){var r=o.scrollTop,i=t._getCalculatedScrollTop(e,o);return"number"==typeof i&&i>=0&&r!==i?t._getScrollToPositionStateUpdate({prevState:o,scrollLeft:-1,scrollTop:i}):{}}}]),t}(P.PureComponent),oW(w,"propTypes",null),C);function o7(e){var t=e.cellCount,o=e.overscanCellsCount,r=e.scrollDirection,i=e.startIndex,n=e.stopIndex;return(o=Math.max(1,o),1===r)?{overscanStartIndex:Math.max(0,i-1),overscanStopIndex:Math.min(t-1,n+o)}:{overscanStartIndex:Math.max(0,i-o),overscanStopIndex:Math.min(t-1,n+1)}}function o9(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}oW(o4,"defaultProps",{"aria-label":"grid","aria-readonly":!0,autoContainerWidth:!1,autoHeight:!1,autoWidth:!1,cellRangeRenderer:function(e){for(var t=e.cellCache,o=e.cellRenderer,r=e.columnSizeAndPositionManager,i=e.columnStartIndex,n=e.columnStopIndex,s=e.deferredMeasurementCache,l=e.horizontalOffsetAdjustment,a=e.isScrolling,h=e.isScrollingOptOut,c=e.parent,d=e.rowSizeAndPositionManager,u=e.rowStartIndex,p=e.rowStopIndex,f=e.styleCache,m=e.verticalOffsetAdjustment,g=e.visibleColumnIndices,v=e.visibleRowIndices,y=[],S=r.areOffsetsAdjusted()||d.areOffsetsAdjusted(),w=!a&&!S,C=u;C<=p;C++)for(var R=d.getSizeAndPositionOfCell(C),b=i;b<=n;b++){var _=r.getSizeAndPositionOfCell(b),T=b>=g.start&&b<=g.stop&&C>=v.start&&C<=v.stop,x="".concat(C,"-").concat(b),E=void 0;w&&f[x]?E=f[x]:s&&!s.has(C,b)?E={height:"auto",left:0,position:"absolute",top:0,width:"auto"}:(E={height:R.size,left:_.offset+l,position:"absolute",top:R.offset+m,width:_.size},f[x]=E);var M={columnIndex:b,isScrolling:a,isVisible:T,key:x,parent:c,rowIndex:C,style:E},I=void 0;(h||a)&&!l&&!m?(t[x]||(t[x]=o(M)),I=t[x]):I=o(M),null!=I&&!1!==I&&y.push(I)}return y},containerRole:"rowgroup",containerStyle:{},estimatedColumnSize:100,estimatedRowSize:30,getScrollbarSize:oJ,noContentRenderer:function(){return null},onScroll:function(){},onScrollbarPresenceChange:function(){},onSectionRendered:function(){},overscanColumnCount:0,overscanIndicesGetter:function(e){var t=e.cellCount,o=e.overscanCellsCount,r=e.scrollDirection,i=e.startIndex,n=e.stopIndex;return 1===r?{overscanStartIndex:Math.max(0,i),overscanStopIndex:Math.min(t-1,n+o)}:{overscanStartIndex:Math.max(0,i-o),overscanStopIndex:Math.min(t-1,n)}},overscanRowCount:10,role:"grid",scrollingResetTimeInterval:150,scrollToAlignment:"auto",scrollToColumn:-1,scrollToRow:-1,style:{},tabIndex:0,isScrollingOptOut:!1}),oF(o4);var o8=(b=R=function(e){function t(){oE(this,t);for(var e,o,r=arguments.length,i=Array(r),n=0;n<r;n++)i[n]=arguments[n];return oW(oD(o=ok(this,(e=oG(t)).call.apply(e,[this].concat(i)))),"state",{scrollToColumn:0,scrollToRow:0,instanceProps:{prevScrollToColumn:0,prevScrollToRow:0}}),oW(oD(o),"_columnStartIndex",0),oW(oD(o),"_columnStopIndex",0),oW(oD(o),"_rowStartIndex",0),oW(oD(o),"_rowStopIndex",0),oW(oD(o),"_onKeyDown",function(e){var t=o.props,r=t.columnCount,i=t.disabled,n=t.mode,s=t.rowCount;if(!i){var l=o._getScrollState(),a=l.scrollToColumn,h=l.scrollToRow,c=o._getScrollState(),d=c.scrollToColumn,u=c.scrollToRow;switch(e.key){case"ArrowDown":u="cells"===n?Math.min(u+1,s-1):Math.min(o._rowStopIndex+1,s-1);break;case"ArrowLeft":d="cells"===n?Math.max(d-1,0):Math.max(o._columnStartIndex-1,0);break;case"ArrowRight":d="cells"===n?Math.min(d+1,r-1):Math.min(o._columnStopIndex+1,r-1);break;case"ArrowUp":u="cells"===n?Math.max(u-1,0):Math.max(o._rowStartIndex-1,0)}(d!==a||u!==h)&&(e.preventDefault(),o._updateScrollState({scrollToColumn:d,scrollToRow:u}))}}),oW(oD(o),"_onSectionRendered",function(e){var t=e.columnStartIndex,r=e.columnStopIndex,i=e.rowStartIndex,n=e.rowStopIndex;o._columnStartIndex=t,o._columnStopIndex=r,o._rowStartIndex=i,o._rowStopIndex=n}),o}return oA(t,e),oz(t,[{key:"setScrollIndexes",value:function(e){var t=e.scrollToColumn,o=e.scrollToRow;this.setState({scrollToRow:o,scrollToColumn:t})}},{key:"render",value:function(){var e=this.props,t=e.className,o=e.children,r=this._getScrollState(),i=r.scrollToColumn,n=r.scrollToRow;return P.createElement("div",{className:t,onKeyDown:this._onKeyDown},o({onSectionRendered:this._onSectionRendered,scrollToColumn:i,scrollToRow:n}))}},{key:"_getScrollState",value:function(){return this.props.isControlled?this.props:this.state}},{key:"_updateScrollState",value:function(e){var t=e.scrollToColumn,o=e.scrollToRow,r=this.props,i=r.isControlled,n=r.onScrollToChange;"function"==typeof n&&n({scrollToColumn:t,scrollToRow:o}),i||this.setState({scrollToColumn:t,scrollToRow:o})}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.isControlled?{}:e.scrollToColumn!==t.instanceProps.prevScrollToColumn||e.scrollToRow!==t.instanceProps.prevScrollToRow?function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?o9(o,!0).forEach(function(t){oW(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):o9(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}({},t,{scrollToColumn:e.scrollToColumn,scrollToRow:e.scrollToRow,instanceProps:{prevScrollToColumn:e.scrollToColumn,prevScrollToRow:e.scrollToRow}}):{}}}]),t}(P.PureComponent),oW(R,"propTypes",null),b);function re(e,t){var o=void 0!==t?t:"undefined"!=typeof window?window:"undefined"!=typeof self?self:A.g,r=void 0!==o.document&&o.document.attachEvent;if(!r){var i,n,s=(i=o.requestAnimationFrame||o.mozRequestAnimationFrame||o.webkitRequestAnimationFrame||function(e){return o.setTimeout(e,20)},function(e){return i(e)}),l=(n=o.cancelAnimationFrame||o.mozCancelAnimationFrame||o.webkitCancelAnimationFrame||o.clearTimeout,function(e){return n(e)}),a=function(e){var t=e.__resizeTriggers__,o=t.firstElementChild,r=t.lastElementChild,i=o.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,i.style.width=o.offsetWidth+1+"px",i.style.height=o.offsetHeight+1+"px",o.scrollLeft=o.scrollWidth,o.scrollTop=o.scrollHeight},h=function(e){if(!(e.target.className&&"function"==typeof e.target.className.indexOf&&0>e.target.className.indexOf("contract-trigger")&&0>e.target.className.indexOf("expand-trigger"))){var t=this;a(this),this.__resizeRAF__&&l(this.__resizeRAF__),this.__resizeRAF__=s(function(){(t.offsetWidth!=t.__resizeLast__.width||t.offsetHeight!=t.__resizeLast__.height)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach(function(o){o.call(t,e)}))})}},c=!1,d="",u="animationstart",p="Webkit Moz O ms".split(" "),f="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),m=o.document.createElement("fakeelement");if(void 0!==m.style.animationName&&(c=!0),!1===c){for(var g=0;g<p.length;g++)if(void 0!==m.style[p[g]+"AnimationName"]){d="-"+p[g].toLowerCase()+"-",u=f[g],c=!0;break}}var v="resizeanim",y="@"+d+"keyframes "+v+" { from { opacity: 0; } to { opacity: 0; } } ",S=d+"animation: 1ms "+v+"; "}var w=function(t){if(!t.getElementById("detectElementResize")){var o=(y||"")+".resize-triggers { "+(S||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',r=t.head||t.getElementsByTagName("head")[0],i=t.createElement("style");i.id="detectElementResize",i.type="text/css",null!=e&&i.setAttribute("nonce",e),i.styleSheet?i.styleSheet.cssText=o:i.appendChild(t.createTextNode(o)),r.appendChild(i)}};return{addResizeListener:function(e,t){if(r)e.attachEvent("onresize",t);else{if(!e.__resizeTriggers__){var i=e.ownerDocument,n=o.getComputedStyle(e);n&&"static"==n.position&&(e.style.position="relative"),w(i),e.__resizeLast__={},e.__resizeListeners__=[],(e.__resizeTriggers__=i.createElement("div")).className="resize-triggers";var s='<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>';if(window.trustedTypes){var l=trustedTypes.createPolicy("react-virtualized-auto-sizer",{createHTML:function(){return s}});e.__resizeTriggers__.innerHTML=l.createHTML("")}else e.__resizeTriggers__.innerHTML=s;e.appendChild(e.__resizeTriggers__),a(e),e.addEventListener("scroll",h,!0),u&&(e.__resizeTriggers__.__animationListener__=function(t){t.animationName==v&&a(e)},e.__resizeTriggers__.addEventListener(u,e.__resizeTriggers__.__animationListener__))}e.__resizeListeners__.push(t)}},removeResizeListener:function(e,t){if(r)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",h,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(u,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch{}}}}}function rt(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}oW(o8,"defaultProps",{disabled:!1,isControlled:!1,mode:"edges",scrollToColumn:0,scrollToRow:0}),oF(o8);var ro=(T=_=function(e){function t(){oE(this,t);for(var e,o,r=arguments.length,i=Array(r),n=0;n<r;n++)i[n]=arguments[n];return oW(oD(o=ok(this,(e=oG(t)).call.apply(e,[this].concat(i)))),"state",{height:o.props.defaultHeight||0,width:o.props.defaultWidth||0}),oW(oD(o),"_parentNode",void 0),oW(oD(o),"_autoSizer",void 0),oW(oD(o),"_window",void 0),oW(oD(o),"_detectElementResize",void 0),oW(oD(o),"_onResize",function(){var e=o.props,t=e.disableHeight,r=e.disableWidth,i=e.onResize;if(o._parentNode){var n=o._parentNode.offsetHeight||0,s=o._parentNode.offsetWidth||0,l=(o._window||window).getComputedStyle(o._parentNode)||{},a=parseInt(l.paddingLeft,10)||0,h=parseInt(l.paddingRight,10)||0,c=parseInt(l.paddingTop,10)||0,d=parseInt(l.paddingBottom,10)||0,u=n-c-d,p=s-a-h;(t||o.state.height===u)&&(r||o.state.width===p)||(o.setState({height:n-c-d,width:s-a-h}),i({height:n,width:s}))}}),oW(oD(o),"_setRef",function(e){o._autoSizer=e}),o}return oA(t,e),oz(t,[{key:"componentDidMount",value:function(){var e=this.props.nonce;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._window=this._autoSizer.parentNode.ownerDocument.defaultView,this._detectElementResize=re(e,this._window),this._detectElementResize.addResizeListener(this._parentNode,this._onResize),this._onResize())}},{key:"componentWillUnmount",value:function(){this._detectElementResize&&this._parentNode&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize)}},{key:"render",value:function(){var e=this.props,t=e.children,o=e.className,r=e.disableHeight,i=e.disableWidth,n=e.style,s=this.state,l=s.height,a=s.width,h={overflow:"visible"},c={};return r||(h.height=0,c.height=l),i||(h.width=0,c.width=a),P.createElement("div",{className:o,ref:this._setRef,style:function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?rt(o,!0).forEach(function(t){oW(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):rt(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}({},h,{},n)},t(c))}}]),t}(P.Component),oW(_,"propTypes",null),T);oW(ro,"defaultProps",{onResize:function(){},disableHeight:!1,disableWidth:!1,style:{}});var rr=(E=x=function(e){function t(){oE(this,t);for(var e,o,r=arguments.length,i=Array(r),n=0;n<r;n++)i[n]=arguments[n];return oW(oD(o=ok(this,(e=oG(t)).call.apply(e,[this].concat(i)))),"_child",void 0),oW(oD(o),"_measure",function(){var e=o.props,t=e.cache,r=e.columnIndex,i=void 0===r?0:r,n=e.parent,s=e.rowIndex,l=void 0===s?o.props.index||0:s,a=o._getCellMeasurements(),h=a.height,c=a.width;(h!==t.getHeight(l,i)||c!==t.getWidth(l,i))&&(t.set(l,i,c,h),n&&"function"==typeof n.recomputeGridSize&&n.recomputeGridSize({columnIndex:i,rowIndex:l}))}),oW(oD(o),"_registerChild",function(e){e&&Element,o._child=e,e&&o._maybeMeasureCell()}),o}return oA(t,e),oz(t,[{key:"componentDidMount",value:function(){this._maybeMeasureCell()}},{key:"componentDidUpdate",value:function(){this._maybeMeasureCell()}},{key:"render",value:function(){var e=this.props.children;return"function"==typeof e?e({measure:this._measure,registerChild:this._registerChild}):e}},{key:"_getCellMeasurements",value:function(){var e=this.props.cache,t=this._child||r(this);if(!t||!t.ownerDocument||!t.ownerDocument.defaultView||!(t instanceof t.ownerDocument.defaultView.HTMLElement))return{height:0,width:0};var o=t.style.width,i=t.style.height;e.hasFixedWidth()||(t.style.width="auto"),e.hasFixedHeight()||(t.style.height="auto");var n=Math.ceil(t.offsetHeight),s=Math.ceil(t.offsetWidth);return o&&(t.style.width=o),i&&(t.style.height=i),{height:n,width:s}}},{key:"_maybeMeasureCell",value:function(){var e=this.props,t=e.cache,o=e.columnIndex,r=void 0===o?0:o,i=e.parent,n=e.rowIndex,s=void 0===n?this.props.index||0:n;if(!t.has(s,r)){var l=this._getCellMeasurements(),a=l.height,h=l.width;t.set(s,r,h,a),i&&"function"==typeof i.invalidateCellSizeAfterRender&&i.invalidateCellSizeAfterRender({columnIndex:r,rowIndex:s})}}}]),t}(P.PureComponent),oW(x,"propTypes",null),E);function ri(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}oW(rr,"__internalCellMeasurerFlag",!1);var rn="requested",rs=function(e){function t(){oE(this,t);for(var e,o,r=arguments.length,i=Array(r),n=0;n<r;n++)i[n]=arguments[n];return oW(oD(o=ok(this,(e=oG(t)).call.apply(e,[this].concat(i)))),"state",{isScrolling:!1,scrollLeft:0,scrollTop:0}),oW(oD(o),"_calculateSizeAndPositionDataOnNextUpdate",!1),oW(oD(o),"_onSectionRenderedMemoizer",oY()),oW(oD(o),"_onScrollMemoizer",oY(!1)),oW(oD(o),"_invokeOnSectionRenderedHelper",function(){var e=o.props,t=e.cellLayoutManager,r=e.onSectionRendered;o._onSectionRenderedMemoizer({callback:r,indices:{indices:t.getLastRenderedIndices()}})}),oW(oD(o),"_setScrollingContainerRef",function(e){o._scrollingContainer=e}),oW(oD(o),"_updateScrollPositionForScrollToCell",function(){var e=o.props,t=e.cellLayoutManager,r=e.height,i=e.scrollToAlignment,n=e.scrollToCell,s=e.width,l=o.state,a=l.scrollLeft,h=l.scrollTop;if(n>=0){var c=t.getScrollPositionForCell({align:i,cellIndex:n,height:r,scrollLeft:a,scrollTop:h,width:s});(c.scrollLeft!==a||c.scrollTop!==h)&&o._setScrollPosition(c)}}),oW(oD(o),"_onScroll",function(e){if(e.target===o._scrollingContainer){o._enablePointerEventsAfterDelay();var t=o.props,r=t.cellLayoutManager,i=t.height,n=t.isScrollingChange,s=t.width,l=o._scrollbarSize,a=r.getTotalSize(),h=a.height,c=a.width,d=Math.max(0,Math.min(c-s+l,e.target.scrollLeft)),u=Math.max(0,Math.min(h-i+l,e.target.scrollTop));if(o.state.scrollLeft!==d||o.state.scrollTop!==u){var p=e.cancelable?"observed":rn;o.state.isScrolling||n(!0),o.setState({isScrolling:!0,scrollLeft:d,scrollPositionChangeReason:p,scrollTop:u})}o._invokeOnScrollMemoizer({scrollLeft:d,scrollTop:u,totalWidth:c,totalHeight:h})}}),o._scrollbarSize=oJ(),void 0===o._scrollbarSize?(o._scrollbarSizeMeasured=!1,o._scrollbarSize=0):o._scrollbarSizeMeasured=!0,o}return oA(t,e),oz(t,[{key:"recomputeCellSizesAndPositions",value:function(){this._calculateSizeAndPositionDataOnNextUpdate=!0,this.forceUpdate()}},{key:"componentDidMount",value:function(){var e=this.props,t=e.cellLayoutManager,o=e.scrollLeft,r=e.scrollToCell,i=e.scrollTop;this._scrollbarSizeMeasured||(this._scrollbarSize=oJ(),this._scrollbarSizeMeasured=!0,this.setState({})),r>=0?this._updateScrollPositionForScrollToCell():(o>=0||i>=0)&&this._setScrollPosition({scrollLeft:o,scrollTop:i}),this._invokeOnSectionRenderedHelper();var n=t.getTotalSize(),s=n.height,l=n.width;this._invokeOnScrollMemoizer({scrollLeft:o||0,scrollTop:i||0,totalHeight:s,totalWidth:l})}},{key:"componentDidUpdate",value:function(e,t){var o=this.props,r=o.height,i=o.scrollToAlignment,n=o.scrollToCell,s=o.width,l=this.state,a=l.scrollLeft,h=l.scrollPositionChangeReason,c=l.scrollTop;h===rn&&(a>=0&&a!==t.scrollLeft&&a!==this._scrollingContainer.scrollLeft&&(this._scrollingContainer.scrollLeft=a),c>=0&&c!==t.scrollTop&&c!==this._scrollingContainer.scrollTop&&(this._scrollingContainer.scrollTop=c)),(r!==e.height||i!==e.scrollToAlignment||n!==e.scrollToCell||s!==e.width)&&this._updateScrollPositionForScrollToCell(),this._invokeOnSectionRenderedHelper()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var e=this.props,t=e.autoHeight,o=e.cellCount,r=e.cellLayoutManager,i=e.className,n=e.height,s=e.horizontalOverscanSize,l=e.id,a=e.noContentRenderer,h=e.style,c=e.verticalOverscanSize,d=e.width,u=this.state,p=u.isScrolling,f=u.scrollLeft,m=u.scrollTop;(this._lastRenderedCellCount!==o||this._lastRenderedCellLayoutManager!==r||this._calculateSizeAndPositionDataOnNextUpdate)&&(this._lastRenderedCellCount=o,this._lastRenderedCellLayoutManager=r,this._calculateSizeAndPositionDataOnNextUpdate=!1,r.calculateSizeAndPositionData());var g=r.getTotalSize(),v=g.height,y=g.width,S=Math.max(0,f-s),w=Math.max(0,m-c),C=Math.min(y,f+d+s),R=Math.min(v,m+n+c),b=n>0&&d>0?r.cellRenderers({height:R-w,isScrolling:p,width:C-S,x:S,y:w}):[],_={boxSizing:"border-box",direction:"ltr",height:t?"auto":n,position:"relative",WebkitOverflowScrolling:"touch",width:d,willChange:"transform"},T=v>n?this._scrollbarSize:0,x=y>d?this._scrollbarSize:0;return _.overflowX=y+T<=d?"hidden":"auto",_.overflowY=v+x<=n?"hidden":"auto",P.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:oU("ReactVirtualized__Collection",i),id:l,onScroll:this._onScroll,role:"grid",style:function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?ri(o,!0).forEach(function(t){oW(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):ri(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}({},_,{},h),tabIndex:0},o>0&&P.createElement("div",{className:"ReactVirtualized__Collection__innerScrollContainer",style:{height:v,maxHeight:v,maxWidth:y,overflow:"hidden",pointerEvents:p?"none":"",width:y}},b),0===o&&a())}},{key:"_enablePointerEventsAfterDelay",value:function(){var e=this;this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=setTimeout(function(){(0,e.props.isScrollingChange)(!1),e._disablePointerEventsTimeoutId=null,e.setState({isScrolling:!1})},150)}},{key:"_invokeOnScrollMemoizer",value:function(e){var t=this,o=e.scrollLeft,r=e.scrollTop,i=e.totalHeight,n=e.totalWidth;this._onScrollMemoizer({callback:function(e){var o=e.scrollLeft,r=e.scrollTop,s=t.props,l=s.height;(0,s.onScroll)({clientHeight:l,clientWidth:s.width,scrollHeight:i,scrollLeft:o,scrollTop:r,scrollWidth:n})},indices:{scrollLeft:o,scrollTop:r}})}},{key:"_setScrollPosition",value:function(e){var t=e.scrollLeft,o=e.scrollTop,r={scrollPositionChangeReason:rn};t>=0&&(r.scrollLeft=t),o>=0&&(r.scrollTop=o),(t>=0&&t!==this.state.scrollLeft||o>=0&&o!==this.state.scrollTop)&&this.setState(r)}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 0===e.cellCount&&(0!==t.scrollLeft||0!==t.scrollTop)?{scrollLeft:0,scrollTop:0,scrollPositionChangeReason:rn}:e.scrollLeft!==t.scrollLeft||e.scrollTop!==t.scrollTop?{scrollLeft:null!=e.scrollLeft?e.scrollLeft:t.scrollLeft,scrollTop:null!=e.scrollTop?e.scrollTop:t.scrollTop,scrollPositionChangeReason:rn}:null}}]),t}(P.PureComponent);oW(rs,"defaultProps",{"aria-label":"grid",horizontalOverscanSize:0,noContentRenderer:function(){return null},onScroll:function(){return null},onSectionRendered:function(){return null},scrollToAlignment:"auto",scrollToCell:-1,style:{},verticalOverscanSize:0}),rs.propTypes={},oF(rs);var rl=function(){function e(t){var o=t.height,r=t.width,i=t.x,n=t.y;oE(this,e),this.height=o,this.width=r,this.x=i,this.y=n,this._indexMap={},this._indices=[]}return oz(e,[{key:"addCellIndex",value:function(e){var t=e.index;this._indexMap[t]||(this._indexMap[t]=!0,this._indices.push(t))}},{key:"getCellIndices",value:function(){return this._indices}},{key:"toString",value:function(){return"".concat(this.x,",").concat(this.y," ").concat(this.width,"x").concat(this.height)}}]),e}(),ra=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;oE(this,e),this._sectionSize=t,this._cellMetadata=[],this._sections={}}return oz(e,[{key:"getCellIndices",value:function(e){var t=e.height,o=e.width,r=e.x,i=e.y,n={};return this.getSections({height:t,width:o,x:r,y:i}).forEach(function(e){return e.getCellIndices().forEach(function(e){n[e]=e})}),Object.keys(n).map(function(e){return n[e]})}},{key:"getCellMetadata",value:function(e){var t=e.index;return this._cellMetadata[t]}},{key:"getSections",value:function(e){for(var t=e.height,o=e.width,r=e.x,i=e.y,n=Math.floor(r/this._sectionSize),s=Math.floor((r+o-1)/this._sectionSize),l=Math.floor(i/this._sectionSize),a=Math.floor((i+t-1)/this._sectionSize),h=[],c=n;c<=s;c++)for(var d=l;d<=a;d++){var u="".concat(c,".").concat(d);this._sections[u]||(this._sections[u]=new rl({height:this._sectionSize,width:this._sectionSize,x:c*this._sectionSize,y:d*this._sectionSize})),h.push(this._sections[u])}return h}},{key:"getTotalSectionCount",value:function(){return Object.keys(this._sections).length}},{key:"toString",value:function(){var e=this;return Object.keys(this._sections).map(function(t){return e._sections[t].toString()})}},{key:"registerCell",value:function(e){var t=e.cellMetadatum,o=e.index;this._cellMetadata[o]=t,this.getSections(t).forEach(function(e){return e.addCellIndex({index:o})})}}]),e}();function rh(e){var t=e.align,o=e.cellOffset,r=e.cellSize,i=e.containerSize,n=e.currentOffset,s=o-i+r;switch(void 0===t?"auto":t){case"start":return o;case"end":return s;case"center":return o-(i-r)/2;default:return Math.max(s,Math.min(o,n))}}var rc=function(e){function t(e,o){var r;return oE(this,t),(r=ok(this,oG(t).call(this,e,o)))._cellMetadata=[],r._lastRenderedCellIndices=[],r._cellCache=[],r._isScrollingChange=r._isScrollingChange.bind(oD(r)),r._setCollectionViewRef=r._setCollectionViewRef.bind(oD(r)),r}return oA(t,e),oz(t,[{key:"forceUpdate",value:function(){void 0!==this._collectionView&&this._collectionView.forceUpdate()}},{key:"recomputeCellSizesAndPositions",value:function(){this._cellCache=[],this._collectionView.recomputeCellSizesAndPositions()}},{key:"render",value:function(){var e=oB({},this.props);return P.createElement(rs,oB({cellLayoutManager:this,isScrollingChange:this._isScrollingChange,ref:this._setCollectionViewRef},e))}},{key:"calculateSizeAndPositionData",value:function(){var e=this.props,t=function(e){for(var t=e.cellCount,o=e.cellSizeAndPositionGetter,r=e.sectionSize,i=[],n=new ra(r),s=0,l=0,a=0;a<t;a++){var h=o({index:a});if(null==h.height||isNaN(h.height)||null==h.width||isNaN(h.width)||null==h.x||isNaN(h.x)||null==h.y||isNaN(h.y))throw Error("Invalid metadata returned for cell ".concat(a,`:
|
|
16
16
|
x:`).concat(h.x,", y:").concat(h.y,", width:").concat(h.width,", height:").concat(h.height));s=Math.max(s,h.y+h.height),l=Math.max(l,h.x+h.width),i[a]=h,n.registerCell({cellMetadatum:h,index:a})}return{cellMetadata:i,height:s,sectionManager:n,width:l}}({cellCount:e.cellCount,cellSizeAndPositionGetter:e.cellSizeAndPositionGetter,sectionSize:e.sectionSize});this._cellMetadata=t.cellMetadata,this._sectionManager=t.sectionManager,this._height=t.height,this._width=t.width}},{key:"getLastRenderedIndices",value:function(){return this._lastRenderedCellIndices}},{key:"getScrollPositionForCell",value:function(e){var t=e.align,o=e.cellIndex,r=e.height,i=e.scrollLeft,n=e.scrollTop,s=e.width,l=this.props.cellCount;if(o>=0&&o<l){var a=this._cellMetadata[o];i=rh({align:t,cellOffset:a.x,cellSize:a.width,containerSize:s,currentOffset:i,targetIndex:o}),n=rh({align:t,cellOffset:a.y,cellSize:a.height,containerSize:r,currentOffset:n,targetIndex:o})}return{scrollLeft:i,scrollTop:n}}},{key:"getTotalSize",value:function(){return{height:this._height,width:this._width}}},{key:"cellRenderers",value:function(e){var t=this,o=e.height,r=e.isScrolling,i=e.width,n=e.x,s=e.y,l=this.props,a=l.cellGroupRenderer,h=l.cellRenderer;return this._lastRenderedCellIndices=this._sectionManager.getCellIndices({height:o,width:i,x:n,y:s}),a({cellCache:this._cellCache,cellRenderer:h,cellSizeAndPositionGetter:function(e){var o=e.index;return t._sectionManager.getCellMetadata({index:o})},indices:this._lastRenderedCellIndices,isScrolling:r})}},{key:"_isScrollingChange",value:function(e){e||(this._cellCache=[])}},{key:"_setCollectionViewRef",value:function(e){this._collectionView=e}}]),t}(P.PureComponent);function rd(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,r=Array(t);o<t;o++)r[o]=e[o];return r}function ru(e,t){if(e){if("string"==typeof e)return rd(e,t);var o=({}).toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?rd(e,t):void 0}}oW(rc,"defaultProps",{"aria-label":"grid",cellGroupRenderer:function(e){var t=e.cellCache,o=e.cellRenderer,r=e.cellSizeAndPositionGetter,i=e.indices,n=e.isScrolling;return i.map(function(e){var i=r({index:e}),s={index:e,isScrolling:n,key:e,style:{height:i.height,left:i.x,position:"absolute",top:i.y,width:i.width}};return n?(e in t||(t[e]=o(s)),t[e]):o(s)}).filter(function(e){return!!e})}}),rc.propTypes={},function(e){function t(e,o){var r;return oE(this,t),(r=ok(this,oG(t).call(this,e,o)))._registerChild=r._registerChild.bind(oD(r)),r}return oA(t,e),oz(t,[{key:"componentDidUpdate",value:function(e){var t=this.props,o=t.columnMaxWidth,r=t.columnMinWidth,i=t.columnCount,n=t.width;(o!==e.columnMaxWidth||r!==e.columnMinWidth||i!==e.columnCount||n!==e.width)&&this._registeredChild&&this._registeredChild.recomputeGridSize()}},{key:"render",value:function(){var e=this.props,t=e.children,o=e.columnMaxWidth,r=e.columnMinWidth,i=e.columnCount,n=e.width,s=o?Math.min(o,n):n,l=n/i;return t({adjustedWidth:Math.min(n,(l=Math.floor(l=Math.min(s,l=Math.max(r||1,l))))*i),columnWidth:l,getColumnWidth:function(){return l},registerChild:this._registerChild})}},{key:"_registerChild",value:function(e){if(e&&"function"!=typeof e.recomputeGridSize)throw Error("Unexpected child type registered; only Grid/MultiGrid children are supported.");this._registeredChild=e,this._registeredChild&&this._registeredChild.recomputeGridSize()}}]),t}(P.PureComponent).propTypes={};var rp=function(e){function t(e,o){var r;return oE(this,t),(r=ok(this,oG(t).call(this,e,o)))._loadMoreRowsMemoizer=oY(),r._onRowsRendered=r._onRowsRendered.bind(oD(r)),r._registerChild=r._registerChild.bind(oD(r)),r}return oA(t,e),oz(t,[{key:"resetLoadMoreRowsCache",value:function(e){this._loadMoreRowsMemoizer=oY(),e&&this._doStuff(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"render",value:function(){return(0,this.props.children)({onRowsRendered:this._onRowsRendered,registerChild:this._registerChild})}},{key:"_loadUnloadedRanges",value:function(e){var t=this,o=this.props.loadMoreRows;e.forEach(function(e){var r=o(e);r&&r.then(function(){var o,r,i,n,s;r=(o={lastRenderedStartIndex:t._lastRenderedStartIndex,lastRenderedStopIndex:t._lastRenderedStopIndex,startIndex:e.startIndex,stopIndex:e.stopIndex}).lastRenderedStartIndex,i=o.lastRenderedStopIndex,n=o.startIndex,s=o.stopIndex,!(n>i||s<r)&&t._registeredChild&&function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o="function"==typeof e.recomputeGridSize?e.recomputeGridSize:e.recomputeRowHeights;o?o.call(e,t):e.forceUpdate()}(t._registeredChild,t._lastRenderedStartIndex)})})}},{key:"_onRowsRendered",value:function(e){var t=e.startIndex,o=e.stopIndex;this._lastRenderedStartIndex=t,this._lastRenderedStopIndex=o,this._doStuff(t,o)}},{key:"_doStuff",value:function(e,t){var o,r,i=this,n=this.props,s=n.isRowLoaded,l=n.minimumBatchSize,a=n.rowCount,h=n.threshold,c=function(e){for(var t=e.isRowLoaded,o=e.minimumBatchSize,r=e.rowCount,i=e.startIndex,n=e.stopIndex,s=[],l=null,a=null,h=i;h<=n;h++)t({index:h})?null!==a&&(s.push({startIndex:l,stopIndex:a}),l=a=null):(a=h,null===l&&(l=h));if(null!==a){for(var c=Math.min(Math.max(a,l+o-1),r-1),d=a+1;d<=c;d++)if(t({index:d}))break;else a=d;s.push({startIndex:l,stopIndex:a})}if(s.length)for(var u=s[0];u.stopIndex-u.startIndex+1<o&&u.startIndex>0;){var p=u.startIndex-1;if(t({index:p}))break;u.startIndex=p}return s}({isRowLoaded:s,minimumBatchSize:l,rowCount:a,startIndex:Math.max(0,e-h),stopIndex:Math.min(a-1,t+h)}),d=(r=[]).concat.apply(r,function(e){if(Array.isArray(e))return rd(e)}(o=c.map(function(e){return[e.startIndex,e.stopIndex]}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(o)||ru(o)||function(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
17
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}());this._loadMoreRowsMemoizer({callback:function(){i._loadUnloadedRanges(c)},indices:{squashedUnloadedRanges:d}})}},{key:"_registerChild",value:function(e){this._registeredChild=e}}]),t}(P.PureComponent);oW(rp,"defaultProps",{minimumBatchSize:10,rowCount:0,threshold:15}),rp.propTypes={};var rf=(I=M=function(e){function t(){oE(this,t);for(var e,o,r=arguments.length,i=Array(r),n=0;n<r;n++)i[n]=arguments[n];return oW(oD(o=ok(this,(e=oG(t)).call.apply(e,[this].concat(i)))),"Grid",void 0),oW(oD(o),"_cellRenderer",function(e){var t=e.parent,r=e.rowIndex,i=e.style,n=e.isScrolling,s=e.isVisible,l=e.key,a=o.props.rowRenderer,h=Object.getOwnPropertyDescriptor(i,"width");return h&&h.writable&&(i.width="100%"),a({index:r,style:i,isScrolling:n,isVisible:s,key:l,parent:t})}),oW(oD(o),"_setRef",function(e){o.Grid=e}),oW(oD(o),"_onScroll",function(e){var t=e.clientHeight,r=e.scrollHeight,i=e.scrollTop;(0,o.props.onScroll)({clientHeight:t,scrollHeight:r,scrollTop:i})}),oW(oD(o),"_onScrollToRowCausedUpdate",function(e){var t=e.clientHeight,r=e.scrollHeight,i=e.scrollTop;(0,o.props.onScrollToRowCausedUpdate)({clientHeight:t,scrollHeight:r,scrollTop:i})}),oW(oD(o),"_onSectionRendered",function(e){var t=e.rowOverscanStartIndex,r=e.rowOverscanStopIndex,i=e.rowStartIndex,n=e.rowStopIndex;(0,o.props.onRowsRendered)({overscanStartIndex:t,overscanStopIndex:r,startIndex:i,stopIndex:n})}),o}return oA(t,e),oz(t,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(e){var t=e.alignment,o=e.index;return this.Grid?this.Grid.getOffsetForCell({alignment:t,rowIndex:o,columnIndex:0}).scrollTop:0}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,o=e.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:o,columnIndex:t})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,o=e.rowIndex;this.Grid&&this.Grid.recomputeGridSize({rowIndex:void 0===o?0:o,columnIndex:void 0===t?0:t})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e,columnIndex:0})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"render",value:function(){var e=this.props,t=e.className,o=e.noRowsRenderer,r=e.scrollToIndex,i=e.width,n=oU("ReactVirtualized__List",t);return P.createElement(o4,oB({},this.props,{autoContainerWidth:!0,cellRenderer:this._cellRenderer,className:n,columnWidth:i,columnCount:1,noContentRenderer:o,onScroll:this._onScroll,onScrollToTargetCausedUpdate:this._onScrollToRowCausedUpdate,onSectionRendered:this._onSectionRendered,ref:this._setRef,scrollToRow:r}))}}]),t}(P.PureComponent),oW(M,"propTypes",null),I);oW(rf,"defaultProps",{autoHeight:!1,estimatedRowSize:30,onScroll:function(){},onScrollToRowCausedUpdate:function(){},noRowsRenderer:function(){return null},onRowsRendered:function(){},overscanIndicesGetter:o7,overscanRowCount:10,scrollToAlignment:"auto",scrollToIndex:-1,style:{}});let rm=function(e,t,o,r,i){return"function"==typeof o?function(e,t,o,r,i){for(var n=o+1;t<=o;){var s=t+o>>>1;i(e[s],r)>=0?(n=s,o=s-1):t=s+1}return n}(e,void 0===r?0:0|r,void 0===i?e.length-1:0|i,t,o):function(e,t,o,r){for(var i=o+1;t<=o;){var n=t+o>>>1;e[n]>=r?(i=n,o=n-1):t=n+1}return i}(e,void 0===o?0:0|o,void 0===r?e.length-1:0|r,t)};function rg(e,t,o,r,i){this.mid=e,this.left=t,this.right=o,this.leftPoints=r,this.rightPoints=i,this.count=(t?t.count:0)+(o?o.count:0)+r.length}var rv=rg.prototype;function ry(e,t){e.mid=t.mid,e.left=t.left,e.right=t.right,e.leftPoints=t.leftPoints,e.rightPoints=t.rightPoints,e.count=t.count}function rS(e,t){var o=rM(t);e.mid=o.mid,e.left=o.left,e.right=o.right,e.leftPoints=o.leftPoints,e.rightPoints=o.rightPoints,e.count=o.count}function rw(e,t){var o=e.intervals([]);o.push(t),rS(e,o)}function rC(e,t){var o=e.intervals([]),r=o.indexOf(t);return r<0?0:(o.splice(r,1),rS(e,o),1)}function
|
|
18
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}(),i=t[0],n=(t[1],t[2]);return o(n,r._leftMap[n],i)})}},{key:"setPosition",value:function(e,t,o,r){this._intervalTree.insert([o,o+r,e]),this._leftMap[e]=t;var i=this._columnSizeMap,n=i[t];void 0===n?i[t]=o+r:i[t]=Math.max(n,o+r)}},{key:"count",get:function(){return this._intervalTree.count}},{key:"shortestColumnSize",get:function(){var e=this._columnSizeMap,t=0;for(var o in e){var r=e[o];t=0===t?r:Math.min(t,r)}return t}},{key:"tallestColumnSize",get:function(){var e=this._columnSizeMap,t=0;for(var o in e)t=Math.max(t,e[o]);return t}}]),e}();function rD(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}var rk=(z=O=function(e){function t(){oE(this,t);for(var e,o,r=arguments.length,i=Array(r),n=0;n<r;n++)i[n]=arguments[n];return oW(oD(o=ok(this,(e=oG(t)).call.apply(e,[this].concat(i)))),"state",{isScrolling:!1,scrollTop:0}),oW(oD(o),"_debounceResetIsScrollingId",void 0),oW(oD(o),"_invalidateOnUpdateStartIndex",null),oW(oD(o),"_invalidateOnUpdateStopIndex",null),oW(oD(o),"_positionCache",new rz),oW(oD(o),"_startIndex",null),oW(oD(o),"_startIndexMemoized",null),oW(oD(o),"_stopIndex",null),oW(oD(o),"_stopIndexMemoized",null),oW(oD(o),"_debounceResetIsScrollingCallback",function(){o.setState({isScrolling:!1})}),oW(oD(o),"_setScrollingContainerRef",function(e){o._scrollingContainer=e}),oW(oD(o),"_onScroll",function(e){var t=o.props.height,r=e.currentTarget.scrollTop,i=Math.min(Math.max(0,o._getEstimatedTotalHeight()-t),r);r===i&&(o._debounceResetIsScrolling(),o.state.scrollTop!==i&&o.setState({isScrolling:!0,scrollTop:i}))}),o}return oA(t,e),oz(t,[{key:"clearCellPositions",value:function(){this._positionCache=new rz,this.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.rowIndex;null===this._invalidateOnUpdateStartIndex?(this._invalidateOnUpdateStartIndex=t,this._invalidateOnUpdateStopIndex=t):(this._invalidateOnUpdateStartIndex=Math.min(this._invalidateOnUpdateStartIndex,t),this._invalidateOnUpdateStopIndex=Math.max(this._invalidateOnUpdateStopIndex,t))}},{key:"recomputeCellPositions",value:function(){var e=this._positionCache.count-1;this._positionCache=new rz,this._populatePositionCache(0,e),this.forceUpdate()}},{key:"componentDidMount",value:function(){this._checkInvalidateOnUpdate(),this._invokeOnScrollCallback(),this._invokeOnCellsRenderedCallback()}},{key:"componentDidUpdate",value:function(e,t){this._checkInvalidateOnUpdate(),this._invokeOnScrollCallback(),this._invokeOnCellsRenderedCallback(),this.props.scrollTop!==e.scrollTop&&this._debounceResetIsScrolling()}},{key:"componentWillUnmount",value:function(){this._debounceResetIsScrollingId&&o1(this._debounceResetIsScrollingId)}},{key:"render",value:function(){var e,t=this,o=this.props,r=o.autoHeight,i=o.cellCount,n=o.cellMeasurerCache,s=o.cellRenderer,l=o.className,a=o.height,h=o.id,c=o.keyMapper,d=o.overscanByPixels,u=o.role,p=o.style,f=o.tabIndex,m=o.width,g=o.rowDirection,v=this.state,y=v.isScrolling,S=v.scrollTop,w=[],C=this._getEstimatedTotalHeight(),b=this._positionCache.shortestColumnSize,R=this._positionCache.count,_=0;if(this._positionCache.range(Math.max(0,S-d),a+2*d,function(o,r,i){var l;void 0===e?(_=o,e=o):(_=Math.min(_,o),e=Math.max(e,o)),w.push(s({index:o,isScrolling:y,key:c(o),parent:t,style:(oW(l={height:n.getHeight(o)},"ltr"===g?"left":"right",r),oW(l,"position","absolute"),oW(l,"top",i),oW(l,"width",n.getWidth(o)),l)}))}),b<S+a+d&&R<i)for(var T=Math.min(i-R,Math.ceil((S+a+d-b)/n.defaultHeight*m/n.defaultWidth)),x=R;x<R+T;x++)e=x,w.push(s({index:x,isScrolling:y,key:c(x),parent:this,style:{width:n.getWidth(x)}}));return this._startIndex=_,this._stopIndex=e,P.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:oU("ReactVirtualized__Masonry",l),id:h,onScroll:this._onScroll,role:u,style:function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?rD(o,!0).forEach(function(t){oW(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):rD(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}({boxSizing:"border-box",direction:"ltr",height:r?"auto":a,overflowX:"hidden",overflowY:C<a?"hidden":"auto",position:"relative",width:m,WebkitOverflowScrolling:"touch",willChange:"transform"},p),tabIndex:f},P.createElement("div",{className:"ReactVirtualized__Masonry__innerScrollContainer",style:{width:"100%",height:C,maxWidth:"100%",maxHeight:C,overflow:"hidden",pointerEvents:y?"none":"",position:"relative"}},w))}},{key:"_checkInvalidateOnUpdate",value:function(){if("number"==typeof this._invalidateOnUpdateStartIndex){var e=this._invalidateOnUpdateStartIndex,t=this._invalidateOnUpdateStopIndex;this._invalidateOnUpdateStartIndex=null,this._invalidateOnUpdateStopIndex=null,this._populatePositionCache(e,t),this.forceUpdate()}}},{key:"_debounceResetIsScrolling",value:function(){var e=this.props.scrollingResetTimeInterval;this._debounceResetIsScrollingId&&o1(this._debounceResetIsScrollingId),this._debounceResetIsScrollingId=o2(this._debounceResetIsScrollingCallback,e)}},{key:"_getEstimatedTotalHeight",value:function(){var e=this.props,t=e.cellCount,o=e.cellMeasurerCache,r=Math.max(1,Math.floor(e.width/o.defaultWidth));return this._positionCache.estimateTotalHeight(t,r,o.defaultHeight)}},{key:"_invokeOnScrollCallback",value:function(){var e=this.props,t=e.height,o=e.onScroll,r=this.state.scrollTop;this._onScrollMemoized!==r&&(o({clientHeight:t,scrollHeight:this._getEstimatedTotalHeight(),scrollTop:r}),this._onScrollMemoized=r)}},{key:"_invokeOnCellsRenderedCallback",value:function(){(this._startIndexMemoized!==this._startIndex||this._stopIndexMemoized!==this._stopIndex)&&((0,this.props.onCellsRendered)({startIndex:this._startIndex,stopIndex:this._stopIndex}),this._startIndexMemoized=this._startIndex,this._stopIndexMemoized=this._stopIndex)}},{key:"_populatePositionCache",value:function(e,t){for(var o=this.props,r=o.cellMeasurerCache,i=o.cellPositioner,n=e;n<=t;n++){var s=i(n),l=s.left,a=s.top;this._positionCache.setPosition(n,l,a,r.getHeight(n))}}}],[{key:"getDerivedStateFromProps",value:function(e,t){return void 0!==e.scrollTop&&t.scrollTop!==e.scrollTop?{isScrolling:!0,scrollTop:e.scrollTop}:null}}]),t}(P.PureComponent),oW(O,"propTypes",null),z);function rG(){}oW(rk,"defaultProps",{autoHeight:!1,keyMapper:function(e){return e},onCellsRendered:rG,onScroll:rG,overscanByPixels:20,role:"grid",scrollingResetTimeInterval:150,style:{},tabIndex:0,rowDirection:"ltr"}),oF(rk);var rN=function(){function e(){var t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};oE(this,e),oW(this,"_cellMeasurerCache",void 0),oW(this,"_columnIndexOffset",void 0),oW(this,"_rowIndexOffset",void 0),oW(this,"columnWidth",function(e){var o=e.index;t._cellMeasurerCache.columnWidth({index:o+t._columnIndexOffset})}),oW(this,"rowHeight",function(e){var o=e.index;t._cellMeasurerCache.rowHeight({index:o+t._rowIndexOffset})});var r=o.cellMeasurerCache,i=o.columnIndexOffset,n=o.rowIndexOffset;this._cellMeasurerCache=r,this._columnIndexOffset=void 0===i?0:i,this._rowIndexOffset=void 0===n?0:n}return oz(e,[{key:"clear",value:function(e,t){this._cellMeasurerCache.clear(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"clearAll",value:function(){this._cellMeasurerCache.clearAll()}},{key:"hasFixedHeight",value:function(){return this._cellMeasurerCache.hasFixedHeight()}},{key:"hasFixedWidth",value:function(){return this._cellMeasurerCache.hasFixedWidth()}},{key:"getHeight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.getHeight(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"getWidth",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.getWidth(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"has",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.has(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"set",value:function(e,t,o,r){this._cellMeasurerCache.set(e+this._rowIndexOffset,t+this._columnIndexOffset,o,r)}},{key:"defaultHeight",get:function(){return this._cellMeasurerCache.defaultHeight}},{key:"defaultWidth",get:function(){return this._cellMeasurerCache.defaultWidth}}]),e}();function rA(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}function rW(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?rA(o,!0).forEach(function(t){oW(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):rA(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}var rH=function(e){function t(e,o){oE(this,t),oW(oD(r=ok(this,oG(t).call(this,e,o))),"state",{scrollLeft:0,scrollTop:0,scrollbarSize:0,showHorizontalScrollbar:!1,showVerticalScrollbar:!1}),oW(oD(r),"_deferredInvalidateColumnIndex",null),oW(oD(r),"_deferredInvalidateRowIndex",null),oW(oD(r),"_bottomLeftGridRef",function(e){r._bottomLeftGrid=e}),oW(oD(r),"_bottomRightGridRef",function(e){r._bottomRightGrid=e}),oW(oD(r),"_cellRendererBottomLeftGrid",function(e){var t=e.rowIndex,o=o$(e,["rowIndex"]),i=r.props,n=i.cellRenderer,s=i.fixedRowCount;return t===i.rowCount-s?P.createElement("div",{key:o.key,style:rW({},o.style,{height:20})}):n(rW({},o,{parent:oD(r),rowIndex:t+s}))}),oW(oD(r),"_cellRendererBottomRightGrid",function(e){var t=e.columnIndex,o=e.rowIndex,i=o$(e,["columnIndex","rowIndex"]),n=r.props,s=n.cellRenderer,l=n.fixedColumnCount,a=n.fixedRowCount;return s(rW({},i,{columnIndex:t+l,parent:oD(r),rowIndex:o+a}))}),oW(oD(r),"_cellRendererTopRightGrid",function(e){var t=e.columnIndex,o=o$(e,["columnIndex"]),i=r.props,n=i.cellRenderer,s=i.columnCount,l=i.fixedColumnCount;return t===s-l?P.createElement("div",{key:o.key,style:rW({},o.style,{width:20})}):n(rW({},o,{columnIndex:t+l,parent:oD(r)}))}),oW(oD(r),"_columnWidthRightGrid",function(e){var t=e.index,o=r.props,i=o.columnCount,n=o.fixedColumnCount,s=o.columnWidth,l=r.state,a=l.scrollbarSize;return l.showHorizontalScrollbar&&t===i-n?a:"function"==typeof s?s({index:t+n}):s}),oW(oD(r),"_onScroll",function(e){var t=e.scrollLeft,o=e.scrollTop;r.setState({scrollLeft:t,scrollTop:o});var i=r.props.onScroll;i&&i(e)}),oW(oD(r),"_onScrollbarPresenceChange",function(e){var t=e.horizontal,o=e.size,i=e.vertical,n=r.state,s=n.showHorizontalScrollbar,l=n.showVerticalScrollbar;if(t!==s||i!==l){r.setState({scrollbarSize:o,showHorizontalScrollbar:t,showVerticalScrollbar:i});var a=r.props.onScrollbarPresenceChange;"function"==typeof a&&a({horizontal:t,size:o,vertical:i})}}),oW(oD(r),"_onScrollLeft",function(e){var t=e.scrollLeft;r._onScroll({scrollLeft:t,scrollTop:r.state.scrollTop})}),oW(oD(r),"_onScrollTop",function(e){var t=e.scrollTop;r._onScroll({scrollTop:t,scrollLeft:r.state.scrollLeft})}),oW(oD(r),"_rowHeightBottomGrid",function(e){var t=e.index,o=r.props,i=o.fixedRowCount,n=o.rowCount,s=o.rowHeight,l=r.state,a=l.scrollbarSize;return l.showVerticalScrollbar&&t===n-i?a:"function"==typeof s?s({index:t+i}):s}),oW(oD(r),"_topLeftGridRef",function(e){r._topLeftGrid=e}),oW(oD(r),"_topRightGridRef",function(e){r._topRightGrid=e});var r,i=e.deferredMeasurementCache,n=e.fixedColumnCount,s=e.fixedRowCount;return r._maybeCalculateCachedStyles(!0),i&&(r._deferredMeasurementCacheBottomLeftGrid=s>0?new rN({cellMeasurerCache:i,columnIndexOffset:0,rowIndexOffset:s}):i,r._deferredMeasurementCacheBottomRightGrid=n>0||s>0?new rN({cellMeasurerCache:i,columnIndexOffset:n,rowIndexOffset:s}):i,r._deferredMeasurementCacheTopRightGrid=n>0?new rN({cellMeasurerCache:i,columnIndexOffset:n,rowIndexOffset:0}):i),r}return oA(t,e),oz(t,[{key:"forceUpdateGrids",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.forceUpdate(),this._bottomRightGrid&&this._bottomRightGrid.forceUpdate(),this._topLeftGrid&&this._topLeftGrid.forceUpdate(),this._topRightGrid&&this._topRightGrid.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,o=void 0===t?0:t,r=e.rowIndex,i=void 0===r?0:r;this._deferredInvalidateColumnIndex="number"==typeof this._deferredInvalidateColumnIndex?Math.min(this._deferredInvalidateColumnIndex,o):o,this._deferredInvalidateRowIndex="number"==typeof this._deferredInvalidateRowIndex?Math.min(this._deferredInvalidateRowIndex,i):i}},{key:"measureAllCells",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.measureAllCells(),this._bottomRightGrid&&this._bottomRightGrid.measureAllCells(),this._topLeftGrid&&this._topLeftGrid.measureAllCells(),this._topRightGrid&&this._topRightGrid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,o=void 0===t?0:t,r=e.rowIndex,i=void 0===r?0:r,n=this.props,s=n.fixedColumnCount,l=n.fixedRowCount,a=Math.max(0,o-s),h=Math.max(0,i-l);this._bottomLeftGrid&&this._bottomLeftGrid.recomputeGridSize({columnIndex:o,rowIndex:h}),this._bottomRightGrid&&this._bottomRightGrid.recomputeGridSize({columnIndex:a,rowIndex:h}),this._topLeftGrid&&this._topLeftGrid.recomputeGridSize({columnIndex:o,rowIndex:i}),this._topRightGrid&&this._topRightGrid.recomputeGridSize({columnIndex:a,rowIndex:i}),this._leftGridWidth=null,this._topGridHeight=null,this._maybeCalculateCachedStyles(!0)}},{key:"componentDidMount",value:function(){var e=this.props,t=e.scrollLeft,o=e.scrollTop;if(t>0||o>0){var r={};t>0&&(r.scrollLeft=t),o>0&&(r.scrollTop=o),this.setState(r)}this._handleInvalidatedGridSize()}},{key:"componentDidUpdate",value:function(){this._handleInvalidatedGridSize()}},{key:"render",value:function(){var e=this.props,t=e.onScroll,o=e.onSectionRendered,r=(e.onScrollbarPresenceChange,e.scrollLeft,e.scrollToColumn),i=(e.scrollTop,e.scrollToRow),n=o$(e,["onScroll","onSectionRendered","onScrollbarPresenceChange","scrollLeft","scrollToColumn","scrollTop","scrollToRow"]);if(this._prepareForRender(),0===this.props.width||0===this.props.height)return null;var s=this.state,l=s.scrollLeft,a=s.scrollTop;return P.createElement("div",{style:this._containerOuterStyle},P.createElement("div",{style:this._containerTopStyle},this._renderTopLeftGrid(n),this._renderTopRightGrid(rW({},n,{onScroll:t,scrollLeft:l}))),P.createElement("div",{style:this._containerBottomStyle},this._renderBottomLeftGrid(rW({},n,{onScroll:t,scrollTop:a})),this._renderBottomRightGrid(rW({},n,{onScroll:t,onSectionRendered:o,scrollLeft:l,scrollToColumn:r,scrollToRow:i,scrollTop:a}))))}},{key:"_getBottomGridHeight",value:function(e){return e.height-this._getTopGridHeight(e)}},{key:"_getLeftGridWidth",value:function(e){var t=e.fixedColumnCount,o=e.columnWidth;if(null==this._leftGridWidth)if("function"==typeof o){for(var r=0,i=0;i<t;i++)r+=o({index:i});this._leftGridWidth=r}else this._leftGridWidth=o*t;return this._leftGridWidth}},{key:"_getRightGridWidth",value:function(e){return e.width-this._getLeftGridWidth(e)}},{key:"_getTopGridHeight",value:function(e){var t=e.fixedRowCount,o=e.rowHeight;if(null==this._topGridHeight)if("function"==typeof o){for(var r=0,i=0;i<t;i++)r+=o({index:i});this._topGridHeight=r}else this._topGridHeight=o*t;return this._topGridHeight}},{key:"_handleInvalidatedGridSize",value:function(){if("number"==typeof this._deferredInvalidateColumnIndex){var e=this._deferredInvalidateColumnIndex,t=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:e,rowIndex:t}),this.forceUpdate()}}},{key:"_maybeCalculateCachedStyles",value:function(e){var t=this.props,o=t.columnWidth,r=t.enableFixedColumnScroll,i=t.enableFixedRowScroll,n=t.height,s=t.fixedColumnCount,l=t.fixedRowCount,a=t.rowHeight,h=t.style,c=t.styleBottomLeftGrid,d=t.styleBottomRightGrid,u=t.styleTopLeftGrid,p=t.styleTopRightGrid,f=t.width,m=e||n!==this._lastRenderedHeight||f!==this._lastRenderedWidth,g=e||o!==this._lastRenderedColumnWidth||s!==this._lastRenderedFixedColumnCount,v=e||l!==this._lastRenderedFixedRowCount||a!==this._lastRenderedRowHeight;(e||m||h!==this._lastRenderedStyle)&&(this._containerOuterStyle=rW({height:n,overflow:"visible",width:f},h)),(e||m||v)&&(this._containerTopStyle={height:this._getTopGridHeight(this.props),position:"relative",width:f},this._containerBottomStyle={height:n-this._getTopGridHeight(this.props),overflow:"visible",position:"relative",width:f}),(e||c!==this._lastRenderedStyleBottomLeftGrid)&&(this._bottomLeftGridStyle=rW({left:0,overflowX:"hidden",overflowY:r?"auto":"hidden",position:"absolute"},c)),(e||g||d!==this._lastRenderedStyleBottomRightGrid)&&(this._bottomRightGridStyle=rW({left:this._getLeftGridWidth(this.props),position:"absolute"},d)),(e||u!==this._lastRenderedStyleTopLeftGrid)&&(this._topLeftGridStyle=rW({left:0,overflowX:"hidden",overflowY:"hidden",position:"absolute",top:0},u)),(e||g||p!==this._lastRenderedStyleTopRightGrid)&&(this._topRightGridStyle=rW({left:this._getLeftGridWidth(this.props),overflowX:i?"auto":"hidden",overflowY:"hidden",position:"absolute",top:0},p)),this._lastRenderedColumnWidth=o,this._lastRenderedFixedColumnCount=s,this._lastRenderedFixedRowCount=l,this._lastRenderedHeight=n,this._lastRenderedRowHeight=a,this._lastRenderedStyle=h,this._lastRenderedStyleBottomLeftGrid=c,this._lastRenderedStyleBottomRightGrid=d,this._lastRenderedStyleTopLeftGrid=u,this._lastRenderedStyleTopRightGrid=p,this._lastRenderedWidth=f}},{key:"_prepareForRender",value:function(){(this._lastRenderedColumnWidth!==this.props.columnWidth||this._lastRenderedFixedColumnCount!==this.props.fixedColumnCount)&&(this._leftGridWidth=null),(this._lastRenderedFixedRowCount!==this.props.fixedRowCount||this._lastRenderedRowHeight!==this.props.rowHeight)&&(this._topGridHeight=null),this._maybeCalculateCachedStyles(),this._lastRenderedColumnWidth=this.props.columnWidth,this._lastRenderedFixedColumnCount=this.props.fixedColumnCount,this._lastRenderedFixedRowCount=this.props.fixedRowCount,this._lastRenderedRowHeight=this.props.rowHeight}},{key:"_renderBottomLeftGrid",value:function(e){var t=e.enableFixedColumnScroll,o=e.fixedColumnCount,r=e.fixedRowCount,i=e.rowCount,n=e.hideBottomLeftGridScrollbar,s=this.state.showVerticalScrollbar;if(!o)return null;var l=this._getBottomGridHeight(e),a=this._getLeftGridWidth(e),h=this.state.showVerticalScrollbar?this.state.scrollbarSize:0,c=P.createElement(o4,oB({},e,{cellRenderer:this._cellRendererBottomLeftGrid,className:this.props.classNameBottomLeftGrid,columnCount:o,deferredMeasurementCache:this._deferredMeasurementCacheBottomLeftGrid,height:l,onScroll:t?this._onScrollTop:void 0,ref:this._bottomLeftGridRef,rowCount:Math.max(0,i-r)+ +!!s,rowHeight:this._rowHeightBottomGrid,style:this._bottomLeftGridStyle,tabIndex:null,width:n?a+h:a}));return n?P.createElement("div",{className:"BottomLeftGrid_ScrollWrapper",style:rW({},this._bottomLeftGridStyle,{height:l,width:a,overflowY:"hidden"})},c):c}},{key:"_renderBottomRightGrid",value:function(e){var t=e.columnCount,o=e.fixedColumnCount,r=e.fixedRowCount,i=e.rowCount,n=e.scrollToColumn,s=e.scrollToRow;return P.createElement(o4,oB({},e,{cellRenderer:this._cellRendererBottomRightGrid,className:this.props.classNameBottomRightGrid,columnCount:Math.max(0,t-o),columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheBottomRightGrid,height:this._getBottomGridHeight(e),onScroll:this._onScroll,onScrollbarPresenceChange:this._onScrollbarPresenceChange,ref:this._bottomRightGridRef,rowCount:Math.max(0,i-r),rowHeight:this._rowHeightBottomGrid,scrollToColumn:n-o,scrollToRow:s-r,style:this._bottomRightGridStyle,width:this._getRightGridWidth(e)}))}},{key:"_renderTopLeftGrid",value:function(e){var t=e.fixedColumnCount,o=e.fixedRowCount;return t&&o?P.createElement(o4,oB({},e,{className:this.props.classNameTopLeftGrid,columnCount:t,height:this._getTopGridHeight(e),ref:this._topLeftGridRef,rowCount:o,style:this._topLeftGridStyle,tabIndex:null,width:this._getLeftGridWidth(e)})):null}},{key:"_renderTopRightGrid",value:function(e){var t=e.columnCount,o=e.enableFixedRowScroll,r=e.fixedColumnCount,i=e.fixedRowCount,n=e.scrollLeft,s=e.hideTopRightGridScrollbar,l=this.state,a=l.showHorizontalScrollbar,h=l.scrollbarSize;if(!i)return null;var c=this._getTopGridHeight(e),d=this._getRightGridWidth(e),u=c,p=this._topRightGridStyle;s&&(u=c+(a?h:0),p=rW({},this._topRightGridStyle,{left:0}));var f=P.createElement(o4,oB({},e,{cellRenderer:this._cellRendererTopRightGrid,className:this.props.classNameTopRightGrid,columnCount:Math.max(0,t-r)+ +!!a,columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheTopRightGrid,height:u,onScroll:o?this._onScrollLeft:void 0,ref:this._topRightGridRef,rowCount:i,scrollLeft:n,style:p,tabIndex:null,width:d}));return s?P.createElement("div",{className:"TopRightGrid_ScrollWrapper",style:rW({},this._topRightGridStyle,{height:c,width:d,overflowX:"hidden"})},f):f}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.scrollLeft!==t.scrollLeft||e.scrollTop!==t.scrollTop?{scrollLeft:null!=e.scrollLeft&&e.scrollLeft>=0?e.scrollLeft:t.scrollLeft,scrollTop:null!=e.scrollTop&&e.scrollTop>=0?e.scrollTop:t.scrollTop}:null}}]),t}(P.PureComponent);function rL(e){var t=e.className,o=e.columns,r=e.style;return P.createElement("div",{className:t,role:"row",style:r},o)}oW(rH,"defaultProps",{classNameBottomLeftGrid:"",classNameBottomRightGrid:"",classNameTopLeftGrid:"",classNameTopRightGrid:"",enableFixedColumnScroll:!1,enableFixedRowScroll:!1,fixedColumnCount:0,fixedRowCount:0,scrollToColumn:-1,scrollToRow:-1,style:{},styleBottomLeftGrid:{},styleBottomRightGrid:{},styleTopLeftGrid:{},styleTopRightGrid:{},hideTopRightGridScrollbar:!1,hideBottomLeftGridScrollbar:!1}),rH.propTypes={},oF(rH),function(e){function t(e,o){var r;return oE(this,t),(r=ok(this,oG(t).call(this,e,o))).state={clientHeight:0,clientWidth:0,scrollHeight:0,scrollLeft:0,scrollTop:0,scrollWidth:0},r._onScroll=r._onScroll.bind(oD(r)),r}return oA(t,e),oz(t,[{key:"render",value:function(){var e=this.props.children,t=this.state,o=t.clientHeight,r=t.clientWidth,i=t.scrollHeight,n=t.scrollLeft,s=t.scrollTop,l=t.scrollWidth;return e({clientHeight:o,clientWidth:r,onScroll:this._onScroll,scrollHeight:i,scrollLeft:n,scrollTop:s,scrollWidth:l})}},{key:"_onScroll",value:function(e){var t=e.clientHeight,o=e.clientWidth,r=e.scrollHeight,i=e.scrollLeft,n=e.scrollTop,s=e.scrollWidth;this.setState({clientHeight:t,clientWidth:o,scrollHeight:r,scrollLeft:i,scrollTop:n,scrollWidth:s})}}]),t}(P.PureComponent).propTypes={},rL.propTypes=null;let rP="DESC";function rF(e){var t=e.sortDirection,o=oU("ReactVirtualized__Table__sortableHeaderIcon",{"ReactVirtualized__Table__sortableHeaderIcon--ASC":"ASC"===t,"ReactVirtualized__Table__sortableHeaderIcon--DESC":t===rP});return P.createElement("svg",{className:o,width:18,height:18,viewBox:"0 0 24 24"},"ASC"===t?P.createElement("path",{d:"M7 14l5-5 5 5z"}):P.createElement("path",{d:"M7 10l5 5 5-5z"}),P.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))}function rB(e){var t=e.dataKey,o=e.label,r=e.sortBy,i=e.sortDirection,n=[P.createElement("span",{className:"ReactVirtualized__Table__headerTruncatedText",key:"label",title:"string"==typeof o?o:null},o)];return r===t&&n.push(P.createElement(rF,{key:"SortIndicator",sortDirection:i})),n}function rU(e){var t=e.className,o=e.columns,r=e.index,i=e.key,n=e.onRowClick,s=e.onRowDoubleClick,l=e.onRowMouseOut,a=e.onRowMouseOver,h=e.onRowRightClick,c=e.rowData,d=e.style,u={"aria-rowindex":r+1};return(n||s||l||a||h)&&(u["aria-label"]="row",u.tabIndex=0,n&&(u.onClick=function(e){return n({event:e,index:r,rowData:c})}),s&&(u.onDoubleClick=function(e){return s({event:e,index:r,rowData:c})}),l&&(u.onMouseOut=function(e){return l({event:e,index:r,rowData:c})}),a&&(u.onMouseOver=function(e){return a({event:e,index:r,rowData:c})}),h&&(u.onContextMenu=function(e){return h({event:e,index:r,rowData:c})})),P.createElement("div",oB({},u,{className:t,key:i,role:"row",style:d}),o)}rF.propTypes={},rB.propTypes=null,rU.propTypes=null;var rZ=function(e){function t(){return oE(this,t),ok(this,oG(t).apply(this,arguments))}return oA(t,e),t}(P.Component);function rj(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}function r$(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?rj(o,!0).forEach(function(t){oW(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):rj(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}oW(rZ,"defaultProps",{cellDataGetter:function(e){var t=e.dataKey,o=e.rowData;return"function"==typeof o.get?o.get(t):o[t]},cellRenderer:function(e){var t=e.cellData;return null==t?"":String(t)},defaultSortDirection:"ASC",flexGrow:0,flexShrink:1,headerRenderer:rB,style:{}}),rZ.propTypes={};var rV=function(e){function t(e){var o;return oE(this,t),(o=ok(this,oG(t).call(this,e))).state={scrollbarWidth:0},o._createColumn=o._createColumn.bind(oD(o)),o._createRow=o._createRow.bind(oD(o)),o._onScroll=o._onScroll.bind(oD(o)),o._onSectionRendered=o._onSectionRendered.bind(oD(o)),o._setRef=o._setRef.bind(oD(o)),o}return oA(t,e),oz(t,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(e){var t=e.alignment,o=e.index;return this.Grid?this.Grid.getOffsetForCell({alignment:t,rowIndex:o}).scrollTop:0}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,o=e.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:o,columnIndex:t})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,o=e.rowIndex;this.Grid&&this.Grid.recomputeGridSize({rowIndex:void 0===o?0:o,columnIndex:void 0===t?0:t})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"getScrollbarWidth",value:function(){if(this.Grid){var e=r(this.Grid),t=e.clientWidth||0;return(e.offsetWidth||0)-t}return 0}},{key:"componentDidMount",value:function(){this._setScrollbarWidth()}},{key:"componentDidUpdate",value:function(){this._setScrollbarWidth()}},{key:"render",value:function(){var e=this,t=this.props,o=t.children,r=t.className,i=t.disableHeader,n=t.gridClassName,s=t.gridStyle,l=t.headerHeight,a=t.headerRowRenderer,h=t.height,c=t.id,d=t.noRowsRenderer,u=t.rowClassName,p=t.rowStyle,f=t.scrollToIndex,m=t.style,g=t.width,v=this.state.scrollbarWidth,y="function"==typeof u?u({index:-1}):u,S="function"==typeof p?p({index:-1}):p;return this._cachedColumnStyles=[],P.Children.toArray(o).forEach(function(t,o){var r=e._getFlexStyleForColumn(t,t.props.style);e._cachedColumnStyles[o]=r$({overflow:"hidden"},r)}),P.createElement("div",{"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-colcount":P.Children.toArray(o).length,"aria-rowcount":this.props.rowCount,className:oU("ReactVirtualized__Table",r),id:c,role:"grid",style:m},!i&&a({className:oU("ReactVirtualized__Table__headerRow",y),columns:this._getHeaderColumns(),style:r$({height:l,overflow:"hidden",paddingRight:v,width:g},S)}),P.createElement(o4,oB({},this.props,{"aria-readonly":null,autoContainerWidth:!0,className:oU("ReactVirtualized__Table__Grid",n),cellRenderer:this._createRow,columnWidth:g,columnCount:1,height:i?h:h-l,id:void 0,noContentRenderer:d,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,role:"rowgroup",scrollbarWidth:v,scrollToRow:f,style:r$({},s,{overflowX:"hidden"})})))}},{key:"_createColumn",value:function(e){var t=e.column,o=e.columnIndex,r=e.isScrolling,i=e.parent,n=e.rowData,s=e.rowIndex,l=this.props.onColumnClick,a=t.props,h=a.cellDataGetter,c=a.cellRenderer,d=a.className,u=a.columnData,p=a.dataKey,f=a.id,m=c({cellData:h({columnData:u,dataKey:p,rowData:n}),columnData:u,columnIndex:o,dataKey:p,isScrolling:r,parent:i,rowData:n,rowIndex:s}),g=this._cachedColumnStyles[o],v="string"==typeof m?m:null;return P.createElement("div",{"aria-colindex":o+1,"aria-describedby":f,className:oU("ReactVirtualized__Table__rowColumn",d),key:"Row"+s+"-Col"+o,onClick:function(e){l&&l({columnData:u,dataKey:p,event:e})},role:"gridcell",style:g,title:v},m)}},{key:"_createHeader",value:function(e){var t,o,r,i,n,s=e.column,l=e.index,a=this.props,h=a.headerClassName,c=a.headerStyle,d=a.onHeaderClick,u=a.sort,p=a.sortBy,f=a.sortDirection,m=s.props,g=m.columnData,v=m.dataKey,y=m.defaultSortDirection,S=m.disableSort,w=m.headerRenderer,C=m.id,b=m.label,R=!S&&u,_=oU("ReactVirtualized__Table__headerColumn",h,s.props.headerClassName,{ReactVirtualized__Table__sortableHeaderColumn:R}),T=this._getFlexStyleForColumn(s,r$({},c,{},s.props.headerStyle)),x=w({columnData:g,dataKey:v,disableSort:S,label:b,sortBy:p,sortDirection:f});if(R||d){var E=p!==v?y:f===rP?"ASC":rP,M=function(e){R&&u({defaultSortDirection:y,event:e,sortBy:v,sortDirection:E}),d&&d({columnData:g,dataKey:v,event:e})};n=s.props["aria-label"]||b||v,i="none",r=0,t=M,o=function(e){("Enter"===e.key||" "===e.key)&&M(e)}}return p===v&&(i="ASC"===f?"ascending":"descending"),P.createElement("div",{"aria-label":n,"aria-sort":i,className:_,id:C,key:"Header-Col"+l,onClick:t,onKeyDown:o,role:"columnheader",style:T,tabIndex:r},x)}},{key:"_createRow",value:function(e){var t=this,o=e.rowIndex,r=e.isScrolling,i=e.key,n=e.parent,s=e.style,l=this.props,a=l.children,h=l.onRowClick,c=l.onRowDoubleClick,d=l.onRowRightClick,u=l.onRowMouseOver,p=l.onRowMouseOut,f=l.rowClassName,m=l.rowGetter,g=l.rowRenderer,v=l.rowStyle,y=this.state.scrollbarWidth,S="function"==typeof f?f({index:o}):f,w="function"==typeof v?v({index:o}):v,C=m({index:o}),b=P.Children.toArray(a).map(function(e,i){return t._createColumn({column:e,columnIndex:i,isScrolling:r,parent:n,rowData:C,rowIndex:o,scrollbarWidth:y})}),R=oU("ReactVirtualized__Table__row",S),_=r$({},s,{height:this._getRowHeight(o),overflow:"hidden",paddingRight:y},w);return g({className:R,columns:b,index:o,isScrolling:r,key:i,onRowClick:h,onRowDoubleClick:c,onRowRightClick:d,onRowMouseOver:u,onRowMouseOut:p,rowData:C,style:_})}},{key:"_getFlexStyleForColumn",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o="".concat(e.props.flexGrow," ").concat(e.props.flexShrink," ").concat(e.props.width,"px"),r=r$({},t,{flex:o,msFlex:o,WebkitFlex:o});return e.props.maxWidth&&(r.maxWidth=e.props.maxWidth),e.props.minWidth&&(r.minWidth=e.props.minWidth),r}},{key:"_getHeaderColumns",value:function(){var e=this,t=this.props,o=t.children;return(t.disableHeader?[]:P.Children.toArray(o)).map(function(t,o){return e._createHeader({column:t,index:o})})}},{key:"_getRowHeight",value:function(e){var t=this.props.rowHeight;return"function"==typeof t?t({index:e}):t}},{key:"_onScroll",value:function(e){var t=e.clientHeight,o=e.scrollHeight,r=e.scrollTop;(0,this.props.onScroll)({clientHeight:t,scrollHeight:o,scrollTop:r})}},{key:"_onSectionRendered",value:function(e){var t=e.rowOverscanStartIndex,o=e.rowOverscanStopIndex,r=e.rowStartIndex,i=e.rowStopIndex;(0,this.props.onRowsRendered)({overscanStartIndex:t,overscanStopIndex:o,startIndex:r,stopIndex:i})}},{key:"_setRef",value:function(e){this.Grid=e}},{key:"_setScrollbarWidth",value:function(){var e=this.getScrollbarWidth();this.setState({scrollbarWidth:e})}}]),t}(P.PureComponent);oW(rV,"defaultProps",{disableHeader:!1,estimatedRowSize:30,headerHeight:0,headerStyle:{},noRowsRenderer:function(){return null},onRowsRendered:function(){return null},onScroll:function(){return null},overscanIndicesGetter:o7,overscanRowCount:10,rowRenderer:rU,headerRowRenderer:rL,rowStyle:{},scrollToAlignment:"auto",scrollToIndex:-1,style:{}}),rV.propTypes={};var rK=[],rY=null,rq=null;function rX(){rq&&(rq=null,document.body&&null!=rY&&(document.body.style.pointerEvents=rY),rY=null)}function rJ(){rX(),rK.forEach(function(e){return e.__resetIsScrolling()})}function rQ(e){var t;e.currentTarget===window&&null==rY&&document.body&&(rY=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),rq&&o1(rq),t=0,rK.forEach(function(e){t=Math.max(t,e.props.scrollingResetTimeInterval)}),rq=o2(rJ,t),rK.forEach(function(t){t.props.scrollElement===e.currentTarget&&t.__handleWindowScrollEvent()})}function r0(e,t){rK.some(function(e){return e.props.scrollElement===t})||t.addEventListener("scroll",rQ),rK.push(e)}function r1(e,t){!(rK=rK.filter(function(t){return t!==e})).length&&(t.removeEventListener("scroll",rQ),rq&&(o1(rq),rX()))}var r2=function(e){return e===window},r5=function(e){return e.getBoundingClientRect()};function r3(e,t){if(!e)return{height:t.serverHeight,width:t.serverWidth};if(!r2(e))return r5(e);var o=window,r=o.innerHeight,i=o.innerWidth;return{height:"number"==typeof r?r:0,width:"number"==typeof i?i:0}}function r6(e){return r2(e)&&document.documentElement?{top:"scrollY"in window?window.scrollY:document.documentElement.scrollTop,left:"scrollX"in window?window.scrollX:document.documentElement.scrollLeft}:{top:e.scrollTop,left:e.scrollLeft}}function r4(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}var r7=function(){return"undefined"!=typeof window?window:void 0},r9=(k=D=function(e){function t(){oE(this,t);for(var e,o,r=arguments.length,i=Array(r),n=0;n<r;n++)i[n]=arguments[n];return oW(oD(o=ok(this,(e=oG(t)).call.apply(e,[this].concat(i)))),"_window",r7()),oW(oD(o),"_isMounted",!1),oW(oD(o),"_positionFromTop",0),oW(oD(o),"_positionFromLeft",0),oW(oD(o),"_detectElementResize",void 0),oW(oD(o),"_child",void 0),oW(oD(o),"state",function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?r4(o,!0).forEach(function(t){oW(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):r4(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}({},r3(o.props.scrollElement,o.props),{isScrolling:!1,scrollLeft:0,scrollTop:0})),oW(oD(o),"_registerChild",function(e){e&&Element,o._child=e,o.updatePosition()}),oW(oD(o),"_onChildScroll",function(e){var t=e.scrollTop;if(o.state.scrollTop!==t){var r=o.props.scrollElement;r&&("function"==typeof r.scrollTo?r.scrollTo(0,t+o._positionFromTop):r.scrollTop=t+o._positionFromTop)}}),oW(oD(o),"_registerResizeListener",function(e){e===window?window.addEventListener("resize",o._onResize,!1):o._detectElementResize.addResizeListener(e,o._onResize)}),oW(oD(o),"_unregisterResizeListener",function(e){e===window?window.removeEventListener("resize",o._onResize,!1):e&&o._detectElementResize.removeResizeListener(e,o._onResize)}),oW(oD(o),"_onResize",function(){o.updatePosition()}),oW(oD(o),"__handleWindowScrollEvent",function(){if(o._isMounted){var e=o.props.onScroll,t=o.props.scrollElement;if(t){var r=r6(t),i=Math.max(0,r.left-o._positionFromLeft),n=Math.max(0,r.top-o._positionFromTop);o.setState({isScrolling:!0,scrollLeft:i,scrollTop:n}),e({scrollLeft:i,scrollTop:n})}}}),oW(oD(o),"__resetIsScrolling",function(){o.setState({isScrolling:!1})}),o}return oA(t,e),oz(t,[{key:"updatePosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.scrollElement,t=this.props.onResize,o=this.state,i=o.height,n=o.width,s=this._child||r(this);if(s instanceof Element&&e){var l=function(e,t){if(r2(t)&&document.documentElement){var o=document.documentElement,r=r5(e),i=r5(o);return{top:r.top-i.top,left:r.left-i.left}}var n=r6(t),s=r5(e),l=r5(t);return{top:s.top+n.top-l.top,left:s.left+n.left-l.left}}(s,e);this._positionFromTop=l.top,this._positionFromLeft=l.left}var a=r3(e,this.props);(i!==a.height||n!==a.width)&&(this.setState({height:a.height,width:a.width}),t({height:a.height,width:a.width}))}},{key:"componentDidMount",value:function(){var e=this.props.scrollElement;this._detectElementResize=re(),this.updatePosition(e),e&&(r0(this,e),this._registerResizeListener(e)),this._isMounted=!0}},{key:"componentDidUpdate",value:function(e,t){var o=this.props.scrollElement,r=e.scrollElement;r!==o&&null!=r&&null!=o&&(this.updatePosition(o),r1(this,r),r0(this,o),this._unregisterResizeListener(r),this._registerResizeListener(o))}},{key:"componentWillUnmount",value:function(){var e=this.props.scrollElement;e&&(r1(this,e),this._unregisterResizeListener(e)),this._isMounted=!1}},{key:"render",value:function(){var e=this.props.children,t=this.state,o=t.isScrolling,r=t.scrollTop,i=t.scrollLeft,n=t.height,s=t.width;return e({onChildScroll:this._onChildScroll,registerChild:this._registerChild,height:n,isScrolling:o,scrollLeft:i,scrollTop:r,width:s})}}]),t}(P.PureComponent),oW(D,"propTypes",null),k);oW(r9,"defaultProps",{onResize:function(){},onScroll:function(){},scrollingResetTimeInterval:150,scrollElement:r7(),serverHeight:0,serverWidth:0});var r8=A(259),ie=function(){return(ie=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var i in t=arguments[o])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},it={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},io={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},ir={width:"20px",height:"20px",position:"absolute",zIndex:1},ii={top:ie(ie({},it),{top:"-5px"}),right:ie(ie({},io),{left:void 0,right:"-5px"}),bottom:ie(ie({},it),{top:void 0,bottom:"-5px"}),left:ie(ie({},io),{left:"-5px"}),topRight:ie(ie({},ir),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:ie(ie({},ir),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:ie(ie({},ir),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:ie(ie({},ir),{left:"-10px",top:"-10px",cursor:"nw-resize"})},is=(0,P.memo)(function(e){var t=e.onResizeStart,o=e.direction,r=e.children,i=e.replaceStyles,n=e.className,s=(0,P.useCallback)(function(e){t(e,o)},[t,o]),l=(0,P.useCallback)(function(e){t(e,o)},[t,o]),a=(0,P.useMemo)(function(){return ie(ie({position:"absolute",userSelect:"none"},ii[o]),null!=i?i:{})},[i,o]);return(0,r8.jsx)("div",{className:n||void 0,style:a,onMouseDown:s,onTouchStart:l,children:r})}),il=(u=function(e,t){return(u=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),ia=function(){return(ia=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var i in t=arguments[o])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},ih={width:"auto",height:"auto"},ic=function(e,t,o){return Math.max(Math.min(e,o),t)},id=function(e,t,o){var r=Math.round(e/t);return r*t+o*(r-1)},iu=function(e,t){return RegExp(e,"i").test(t)},ip=function(e){return!!(e.touches&&e.touches.length)},im=function(e,t,o){void 0===o&&(o=0);var r=t.reduce(function(o,r,i){return Math.abs(r-e)<Math.abs(t[o]-e)?i:o},0),i=Math.abs(t[r]-e);return 0===o||i<o?t[r]:e},ig=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:"".concat(e,"px")},iv=function(e,t,o,r){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%")){var i=Number(e.replace("%",""))/100;return t*i}if(e.endsWith("vw")){var i=Number(e.replace("vw",""))/100;return o*i}if(e.endsWith("vh")){var i=Number(e.replace("vh",""))/100;return r*i}}return e},iy=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],iS="__resizable_base__",iw=function(e){function t(t){var o,r,i,n,s=e.call(this,t)||this;return s.ratio=1,s.resizable=null,s.parentLeft=0,s.parentTop=0,s.resizableLeft=0,s.resizableRight=0,s.resizableTop=0,s.resizableBottom=0,s.targetLeft=0,s.targetTop=0,s.delta={width:0,height:0},s.appendBase=function(){if(!s.resizable||!s.window)return null;var e=s.parentNode;if(!e)return null;var t=s.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(iS):t.className+=iS,e.appendChild(t),t},s.removeBase=function(e){var t=s.parentNode;t&&t.removeChild(e)},s.state={isResizing:!1,width:null!=(r=null==(o=s.propsSize)?void 0:o.width)?r:"auto",height:null!=(n=null==(i=s.propsSize)?void 0:i.height)?n:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},s.onResizeStart=s.onResizeStart.bind(s),s.onMouseMove=s.onMouseMove.bind(s),s.onMouseUp=s.onMouseUp.bind(s),s}return il(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||ih},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var o=this.resizable.offsetWidth,r=this.resizable.offsetHeight,i=this.resizable.style.position;"relative"!==i&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:o,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:r,this.resizable.style.position=i}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,o=function(t){var o;if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&(null==(o=e.propsSize[t])?void 0:o.toString().endsWith("%"))){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var r=e.getParentSize(),i=Number(e.state[t].toString().replace("px",""))/r[t]*100;return"".concat(i,"%")}return ig(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?ig(t.width):o("width"),height:t&&void 0!==t.height&&!this.state.isResizing?ig(t.height):o("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,o=this.parentNode.style.flexWrap;"wrap"!==o&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var r={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=o),this.removeBase(e),r},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var o=this.propsSize&&this.propsSize[t];return"auto"===this.state[t]&&this.state.original[t]===e&&(void 0===o||"auto"===o)?"auto":e},t.prototype.calculateNewMaxFromBoundary=function(e,t){var o,r,i=this.props.boundsByDirection,n=this.state.direction,s=i&&iu("left",n),l=i&&iu("top",n);if("parent"===this.props.bounds){var a=this.parentNode;a&&(o=s?this.resizableRight-this.parentLeft:a.offsetWidth+(this.parentLeft-this.resizableLeft),r=l?this.resizableBottom-this.parentTop:a.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(o=s?this.resizableRight:this.window.innerWidth-this.resizableLeft,r=l?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(o=s?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),r=l?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return o&&Number.isFinite(o)&&(e=e&&e<o?e:o),r&&Number.isFinite(r)&&(t=t&&t<r?t:r),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var o,r=this.props.scale||1,i=Array.isArray(o=this.props.resizeRatio||1)?o:[o,o],n=i[0],s=i[1],l=this.state,a=l.direction,h=l.original,c=this.props,d=c.lockAspectRatio,u=c.lockAspectRatioExtraHeight,p=c.lockAspectRatioExtraWidth,f=h.width,m=h.height,g=u||0,v=p||0;return iu("right",a)&&(f=h.width+(e-h.x)*n/r,d&&(m=(f-v)/this.ratio+g)),iu("left",a)&&(f=h.width-(e-h.x)*n/r,d&&(m=(f-v)/this.ratio+g)),iu("bottom",a)&&(m=h.height+(t-h.y)*s/r,d&&(f=(m-g)*this.ratio+v)),iu("top",a)&&(m=h.height-(t-h.y)*s/r,d&&(f=(m-g)*this.ratio+v)),{newWidth:f,newHeight:m}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,o,r){var i=this.props,n=i.lockAspectRatio,s=i.lockAspectRatioExtraHeight,l=i.lockAspectRatioExtraWidth,a=void 0===r.width?10:r.width,h=void 0===o.width||o.width<0?e:o.width,c=void 0===r.height?10:r.height,d=void 0===o.height||o.height<0?t:o.height,u=s||0,p=l||0;if(n){var f=(c-u)*this.ratio+p,m=(d-u)*this.ratio+p,g=(a-p)/this.ratio+u,v=(h-p)/this.ratio+u,y=Math.max(c,g),S=Math.min(d,v);e=ic(e,Math.max(a,f),Math.min(h,m)),t=ic(t,y,S)}else e=ic(e,a,h),t=ic(t,c,d);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){var e=1/(this.props.scale||1);if("parent"===this.props.bounds){var t=this.parentNode;if(t){var o=t.getBoundingClientRect();this.parentLeft=o.left*e,this.parentTop=o.top*e}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var r=this.props.bounds.getBoundingClientRect();this.targetLeft=r.left*e,this.targetTop=r.top*e}if(this.resizable){var i=this.resizable.getBoundingClientRect(),n=i.left,s=i.top,l=i.right,a=i.bottom;this.resizableLeft=n*e,this.resizableRight=l*e,this.resizableTop=s*e,this.resizableBottom=a*e}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var o,r,i=0,n=0;if(e.nativeEvent&&((o=e.nativeEvent).clientX||0===o.clientX)&&(o.clientY||0===o.clientY)?(i=e.nativeEvent.clientX,n=e.nativeEvent.clientY):e.nativeEvent&&ip(e.nativeEvent)&&(i=e.nativeEvent.touches[0].clientX,n=e.nativeEvent.touches[0].clientY),!this.props.onResizeStart||!this.resizable||!1!==this.props.onResizeStart(e,t,this.resizable)){this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var s=this.window.getComputedStyle(this.resizable);if("auto"!==s.flexBasis){var l=this.parentNode;if(l){var a=this.window.getComputedStyle(l).flexDirection;this.flexDir=a.startsWith("row")?"row":"column",r=s.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var h={original:{x:i,y:n,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:ia(ia({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:r};this.setState(h)}}},t.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&ip(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var o,r,n,s,l,a,h=this.props,c=h.maxWidth,d=h.maxHeight,u=h.minWidth,p=h.minHeight,f=ip(e)?e.touches[0].clientX:e.clientX,m=ip(e)?e.touches[0].clientY:e.clientY,g=this.state,v=g.direction,y=g.original,S=g.width,w=g.height,C=this.getParentSize(),b=(o=this.window.innerWidth,r=this.window.innerHeight,n=c,s=d,l=u,a=p,n=iv(n,C.width,o,r),s=iv(s,C.height,o,r),l=iv(l,C.width,o,r),a=iv(a,C.height,o,r),{maxWidth:void 0===n?void 0:Number(n),maxHeight:void 0===s?void 0:Number(s),minWidth:void 0===l?void 0:Number(l),minHeight:void 0===a?void 0:Number(a)});c=b.maxWidth,d=b.maxHeight,u=b.minWidth,p=b.minHeight;var R=this.calculateNewSizeFromDirection(f,m),_=R.newHeight,T=R.newWidth,x=this.calculateNewMaxFromBoundary(c,d);this.props.snap&&this.props.snap.x&&(T=im(T,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(_=im(_,this.props.snap.y,this.props.snapGap));var E=this.calculateNewSizeFromAspectRatio(T,_,{width:x.maxWidth,height:x.maxHeight},{width:u,height:p});if(T=E.newWidth,_=E.newHeight,this.props.grid){var M=id(T,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),I=id(_,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),O=this.props.snapGap||0,z=0===O||Math.abs(M-T)<=O?M:T,D=0===O||Math.abs(I-_)<=O?I:_;T=z,_=D}var k={width:T-y.width,height:_-y.height};if(this.delta=k,S&&"string"==typeof S){if(S.endsWith("%")){var G=T/C.width*100;T="".concat(G,"%")}else if(S.endsWith("vw")){var N=T/this.window.innerWidth*100;T="".concat(N,"vw")}else if(S.endsWith("vh")){var A=T/this.window.innerHeight*100;T="".concat(A,"vh")}}if(w&&"string"==typeof w){if(w.endsWith("%")){var G=_/C.height*100;_="".concat(G,"%")}else if(w.endsWith("vw")){var N=_/this.window.innerWidth*100;_="".concat(N,"vw")}else if(w.endsWith("vh")){var A=_/this.window.innerHeight*100;_="".concat(A,"vh")}}var W={width:this.createSizeForCssProperty(T,"width"),height:this.createSizeForCssProperty(_,"height")};"row"===this.flexDir?W.flexBasis=W.width:"column"===this.flexDir&&(W.flexBasis=W.height);var H=this.state.width!==W.width,L=this.state.height!==W.height,P=this.state.flexBasis!==W.flexBasis,F=H||L||P;F&&i(function(){t.setState(W)}),this.props.onResize&&F&&this.props.onResize(e,v,this.resizable,k)}},t.prototype.onMouseUp=function(e){var t,o,r=this.state,i=r.isResizing,n=r.direction;r.original,i&&this.resizable&&(this.props.onResizeStop&&this.props.onResizeStop(e,n,this.resizable,this.delta),this.props.size&&this.setState({width:null!=(t=this.props.size.width)?t:"auto",height:null!=(o=this.props.size.height)?o:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:ia(ia({},this.state.backgroundStyle),{cursor:"auto"})}))},t.prototype.updateSize=function(e){var t,o;this.setState({width:null!=(t=e.width)?t:"auto",height:null!=(o=e.height)?o:"auto"})},t.prototype.renderResizer=function(){var e=this,t=this.props,o=t.enable,r=t.handleStyles,i=t.handleClasses,n=t.handleWrapperStyle,s=t.handleWrapperClass,l=t.handleComponent;if(!o)return null;var a=Object.keys(o).map(function(t){return!1!==o[t]?(0,r8.jsx)(is,{direction:t,onResizeStart:e.onResizeStart,replaceStyles:r&&r[t],className:i&&i[t],children:l&&l[t]?l[t]:null},t):null});return(0,r8.jsx)("div",{className:s,style:n,children:a})},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce(function(t,o){return -1!==iy.indexOf(o)||(t[o]=e.props[o]),t},{}),o=ia(ia(ia({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(o.flexBasis=this.state.flexBasis);var r=this.props.as||"div";return(0,r8.jsxs)(r,ia({style:o,className:this.props.className},t,{ref:function(t){t&&(e.resizable=t)},children:[this.state.isResizing&&(0,r8.jsx)("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(P.PureComponent);let iC={top:!1,right:!1,bottom:!1,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},ib={min:0,max:1/0},iR=({height:e,heightConstraints:t,width:o,widthConstraints:r})=>({height:q(e,t.min,t.max),width:q(o,r.min,r.max)}),i_=({enable:e,height:t,heightConstraints:o,resizeEdge:r,width:i=0,widthConstraints:n})=>({...iR({height:t,widthConstraints:n,heightConstraints:o,width:i}),enable:void 0===e||e,horizontal:"left"===r||"right"===r,initialHeight:t,initialWidth:i,resizing:!1,vertical:"top"===r||"bottom"===r});class iT extends P.PureComponent{static defaultProps={className:"",enable:!0,heightConstraints:ib,resizeContentClassName:"",resizeHandleClassName:"",style:{},wrapperStyle:{},translate:()=>"",wrapChildrenInDivContainer:!0,widthConstraints:ib};constructor(e){super(e),this.state=i_(e)}static getDerivedStateFromProps(e,t){return t.resizing?t:i_(e)}componentDidUpdate(e){let{onResizeFromPropChange:t}=this.props,{height:o,resizing:r,width:i}=this.state,{onResizeFromPropChange:n}=e;if(r)return;let{height:s,width:l}=this.state,a=n||t;a&&(s!==o||l!==i)&&a({height:s,width:l,originalHeight:o,originalWidth:i})}_onResize=(e,t,o,{height:r,width:i})=>{let{onResize:n}=this.props,{height:s,horizontal:l,vertical:a,width:h}=this.state,{height:c,width:d}=(({deltaWidth:e,deltaHeight:t},{heightConstraints:o,widthConstraints:r},{initialHeight:i,initialWidth:n})=>iR({height:i+t,heightConstraints:o,width:n+e,widthConstraints:r}))({deltaWidth:i,deltaHeight:r},this.props,this.state),u=l&&d!==h,p=a&&c!==s;(u||p)&&(this.setState({height:p?c:s,width:u?d:h}),n&&n({height:p?c:void 0,width:u?d:void 0}))};_onResizeStart=e=>{e.preventDefault(),e.stopPropagation();let{onResizeStart:t}=this.props,{height:o,horizontal:r,vertical:i,width:n}=this.state;this.setState({resizing:!0}),t&&t({height:i?o:void 0,width:r?n:void 0})};_onResizeEnd=()=>{let{onResizeEnd:e}=this.props,{height:t,horizontal:o,vertical:r,width:i,initialWidth:n,initialHeight:s}=this.state;this.setState({initialWidth:i,initialHeight:t,resizing:!1}),(n!==i||s!==t)&&e&&e({width:o?i:void 0,height:r?t:void 0})};render(){let{children:e,className:t,handleStyles:o,id:r,resizeContentClassName:i,resizeEdge:n,resizeHandleClassName:s,style:l,translate:a,heightConstraints:h,wrapChildrenInDivContainer:c,widthConstraints:d}=this.props,{enable:u,height:p,horizontal:f,resizing:m,vertical:g,width:v}=this.state,{display:y,...S}=l,{min:w,max:C}=d,{min:b,max:R}=h,_={...this.props.wrapperStyle};f&&(_.width=v,_.minWidth=v),g&&(_.height=p,_.minHeight=p);let T=L()("resizable",t,{resizing:m}),x=L()("contents",i,`resize-edge-${n}`,{horizontal:f,vertical:g}),E=L()(n,s,"resizable-handle",{horizontal:f,vertical:g}),M=P.createElement("span",{title:a("ResizePanel")});return P.createElement("div",{"data-testid":`resizable-${r||""}`,style:{..._,display:y}},P.createElement(iw,{className:T,"data-testid":`resizable-core-${r||""}`,enable:{...iC,[n]:u},handleClasses:{[n]:E},handleComponent:{[n]:M},handleStyles:o,maxHeight:g?R:void 0,maxWidth:f?C:void 0,minHeight:g?b:void 0,minWidth:f?w:void 0,onResize:this._onResize,onResizeStart:this._onResizeStart,onResizeStop:this._onResizeEnd,size:{height:g?p:"100%",width:f?v:"100%"},style:S},c?P.createElement("div",{className:x,style:{userSelect:"none"}},e):e))}}var ix=A(315);let iE=L()("absolute","top-0","right-0","bottom-0","left-0","time-line"),iM=L()(iE,"z2");var iI=function({z2:e}){return P.createElement("div",{className:e?iM:iE,style:{height:2}})};function iO({message:e}){return P.default.createElement("span",{className:"time-line-message-container"},P.default.createElement("span",{className:"time-line-message"},e))}let iz=L()("graph-row-wrapper","grow-3","height-100","graph-zone-column","min-width-0","pb3","pointer","pt3","relative"),iD=L()("graph-row","height-100-percent","flex");function ik(e){let t,o,r,i=(0,ix.c)(18),{processedRows:n,scrollTop:s,translate:l}=e;if(i[0]!==n){t=[];for(let e=0;e<n.length;e++){let o=n[e];o.timeLineEntry&&t.push({row:o,index:e,position:e*em})}i[0]=n,i[1]=t}else t=i[1];let a=t;e:{let e,t,r,n;if(!a.length){o=null;break e}if(i[2]!==s||i[3]!==a){for(let o of a)if(o.position<=s)e=o.row;else{t=o;break}i[2]=s,i[3]=a,i[4]=e,i[5]=t}else e=i[4],t=i[5];if(t&&t.position-s<=em/2&&(e=t.row),!e){o=null;break e}i[6]!==e.timeLineEntry?(r=e.timeLineEntry??{},i[6]=e.timeLineEntry,i[7]=r):r=i[7];let{label:h,value:c}=r,d=void 0===h?"":h,u=void 0===c?0:c;i[8]!==d||i[9]!==l||i[10]!==u?(n=l(d,u),i[8]=d,i[9]=l,i[10]=u,i[11]=n):n=i[11],o=n}let h=o;if(null==h||s<em)return null;if(i[12]!==h){let e,t,o,n;i[14]===Symbol.for("react.memo_cache_sentinel")?(e={className:"sticky-timeline-container"},i[14]=e):e=i[14],i[15]===Symbol.for("react.memo_cache_sentinel")?(t={className:iz},o=P.default.createElement(iI,null),i[15]=t,i[16]=o):(t=i[15],o=i[16]),i[17]===Symbol.for("react.memo_cache_sentinel")?(n={className:iD},i[17]=n):n=i[17],r=P.default.createElement("div",e,P.default.createElement("div",t,o,P.default.createElement("div",n,P.default.createElement(iO,{message:h})))),i[12]=h,i[13]=r}else r=i[13];return r}class iG extends P.PureComponent{canvas;componentDidMount(){this.updateCanvas()}componentDidUpdate(e){(e.branchUpstreamRowIndices!==this.props.branchUpstreamRowIndices||e.markerRowIndices!==this.props.markerRowIndices||e.totalRows!==this.props.totalRows||e.viewportHeight!==this.props.viewportHeight||e.viewportWidth!==this.props.viewportWidth||e.markerColors!==this.props.markerColors||e.enabledScrollMarkerTypes!==this.props.enabledScrollMarkerTypes||e.scrollWidth!==this.props.scrollWidth)&&this.updateCanvas()}updateCanvas(e){let{branchUpstreamRowIndices:t,enabledScrollMarkerTypes:o,viewportHeight:r,markerRowIndices:i,markerColors:n,scrollWidth:s,totalRows:l}=e||this.props,a=this.canvas.getContext("2d");a.canvas.width=s,a.canvas.height=r;let h=s/ep;for(let[e,s]of(a.clearRect(0,0,a.canvas.width,a.canvas.height),Object.entries(tp))){if(!o.includes(e)&&!("remoteBranches"===e&&o.includes("localBranches")))continue;let c="remoteBranches"!==e||o.includes("remoteBranches")?i[e]||[]:t,d=n[e],u=s.lanes;d&&c.length&&(a.fillStyle=d,c.forEach(t=>{let{height:o,offset:i}=function(e,t,o){let r=t*em,{shape:i}=tp[e],n=tu[i];if(!n)return{height:0,offset:0};let{baseHeight:s,minHeight:l,maxHeight:a}=n,h=o/r*s;void 0!==l&&h<l&&(h=l),void 0!==a&&h>a&&(h=a);let c=o/r*em,d=h>=c?0:(c-h)/2;return{height:h,offset:d}}(e,l,r);u.length&&a.fillRect(u[0]*h,function(e,t,o){let r=o*em;return e*em/r*t}(t,r,l)+i-.5*o,h*u.length,o)}))}}render(){return P.createElement("canvas",{className:"graph-scroll-markers",ref:e=>{this.canvas=e}})}}var iN=function({children:e,className:t,height:r,heightAdjustment:i,graphZoneType:n,scrollTop:s,style:l}){let a=tg[n].listId,h=document.getElementById(a),c=h?.scrollHeight||0,d=r-28;void 0!==s&&(d=Number(l.top)-s,h&&c-r-s<0&&(d=r-i-28));let u={top:d,zIndex:2},p=P.createElement("span",{className:"absolute",style:u},e);return P.createElement("div",{className:t,style:l},h?o.createPortal(p,document.getElementById("graph-container")):p)};function iA({inline:e,getExternalIcon:t,message:o,size:r=100,useSimpleSpinner:i}){let n=L()("loading-spinner",{"inline-block":e,ml2:e,"shrink-0":e}),s=L()("spinner","mr1",{"inline-block":e}),l={height:r,width:r},a=L()("message",{"inline-block":e,mx2:e}),h=i?P.createElement("span",{className:s,style:l},t("loading")):P.createElement("div",{className:s,style:l},P.createElement("img",{className:"ring outer",src:"../../../images/spinner-outer-ring.svg",style:l}),P.createElement("img",{className:"ring inner",src:"../../../images/spinner-inner-ring.svg",style:l}),P.createElement("img",{className:"bg-img",src:"../../../images/spinner-kraken.svg",style:l}));return P.createElement("div",{className:n},h,o&&P.createElement("div",{className:a},o))}class iW extends P.Component{render(){let{currentCommits:e,customFooterRow:t,graphZoneType:o,hasMoreCommits:r,height:i,horizontalScrollHeight:n,getExternalIcon:s,isLoadingRows:l,scrollTop:a,style:h,translate:c}=this.props,d=P.createElement(iA,{className:"loading-spinner",getExternalIcon:s,size:20,useSimpleSpinner:!0}),u=P.createElement("div",{className:"flex items-center"},P.createElement("span",{style:{paddingRight:"5px"}},d)),p=0!==(e>0?e:0)||r?t:P.createElement(P.Fragment,null,c("Graph-NoCommits")),f=P.createElement("div",{className:"graph-adjust-commit-count p1"},l?u:p);return P.createElement(iN,{graphZoneType:o,height:i,heightAdjustment:n,scrollTop:a,style:h},f)}}function iH({branchUpstreamRowIndices:e,rowCount:t,cellRenderersByIds:o,columnIndex:r,customFooterRow:i,enabledScrollMarkerTypes:n,enableResizer:s,getExternalIcon:l,getKeyForCell:a,graphHeight:h,graphWidth:c,graphZoneType:d,graphZones:u,hasMoreCommits:p,horizontalScrollHeight:f,isCommitListFiltered:m,isLoadingRows:g,markerColors:v,markerRowIndices:y,onResize:S,onResizeEnd:w,onResizeFromPropChange:C,onScroll:b,onScrollToRowCausedUpdate:R,onZoneEnter:_,processedRows:T,scrollLeft:x,scrollToAlignment:E,scrollToIndex:M,scrollTop:I,smartCellRangeRenderer:O,stickyTimeline:z,translate:D,verticalScrollWidth:k}){let G=tB(d,u);if(!G)return null;let N=document.getElementById(G.listId),A=tA(d,u),W=p||g||0===t,H=tW(t,p,g),F=tH(G,t),B=em*tW(t,p,g),U=k>0,Z=!m&&n.length>0,j=L()("graph-panel","react-virtualized-list","pad-for-horizontal-scrollbar",d===to?"z3":null,{"pad-for-vertical-scrollbar":U}),$=d===tr?{...!A&&{position:"static"},...A&&{width:G.currentWidth>F?G.currentWidth:F,maxWidth:"none"}}:void 0,V=(e,n,s,u,m,v,y,S)=>P.createElement(o4,{autoContainerWidth:!0,cellRangeRenderer:O,cellRenderer:n=>((e,n)=>{let s;if(n.rowIndex>t-1)return W&&0===r?P.createElement(iW,{currentCommits:t-1,customFooterRow:i,getExternalIcon:l,graphZoneType:d,hasMoreCommits:p,height:h,horizontalScrollHeight:f,isLoadingRows:g,key:a(n.rowIndex),scrollTop:I,style:n.style,translate:D}):void 0;let c={...n,style:{...n.style}};tt===e&&(c.style.top=Number(n.style.top)-I);let u=o[e];return u?(s=u(c),P.createElement("span",{"data-column-name":e,"data-row-idx":n.rowIndex,key:`gk-row-${n.key}`,style:{top:n.style.top}},s)):void 0})(e,n),className:s,columnCount:1,columnWidth:S,containerStyle:u,height:y,id:n,key:n,onScrollToTargetCausedUpdate:R?e=>R(d,e,c,h,p):void 0,overscanRowCount:0,rowCount:H,rowHeight:em,scrollLeft:x,scrollToAlignment:E,scrollTop:I,scrollToRow:M,style:m,tabIndex:null,width:v}),K=V(G.type,G.listId,j,$,{position:"absolute"},G.currentWidth,h,F),Y=A?P.createElement("div",{className:"timeline-column-container",onWheelCapture:e=>{let t;(t=(t=I+e.deltaY)>=0?t:0)>I&&N&&tE(N)||b(d,{clientHeight:B,clientWidth:F,scrollHeight:f,scrollLeft:0,scrollTop:t>=0?t:0,scrollWidth:k},c,h,p)}},z&&T&&P.createElement(ik,{processedRows:T,scrollTop:I,translate:D}),V(tt,"timeline-column","graph-panel react-virtualized-list timeline-column",{overflow:"visible",zIndex:3,maxHeight:B},{position:"absolute",right:0,zIndex:3,maxHeight:h},1,h,1)):void 0,q=K&&P.createElement(P.Fragment,null,Y,Z&&A?P.createElement(iG,{branchUpstreamRowIndices:e,enabledScrollMarkerTypes:n,markerColors:v,markerRowIndices:y,scrollWidth:k,totalRows:H,viewportHeight:h<B?h:B,viewportWidth:G.currentWidth}):null,P.createElement(t0,{contentHeight:B,contentWidth:F,displayHorizontalScrollbar:G.type===tr,displayVerticalScrollbar:A,forceOnVerticalWheel:!A,forceVerticalScrollbar:A&&Z,height:h,onScroll:e=>{!(e.scrollTop>I&&N&&tE(N))&&b(d,e,c,h,p)},scrollLeft:x,scrollTop:I,width:G.currentWidth},K)),X=P.createElement("div",{onMouseEnter:_},q);return A?X:P.createElement(iT,{enable:s,height:h,id:`${d}Column`,key:`${d}Column`,onResize:S?e=>S(G,e):void 0,onResizeEnd:w?e=>w(G,e):void 0,onResizeFromPropChange:C?e=>C(G,e):void 0,resizeContentClassName:"z1",resizeEdge:"right",resizeHandleClassName:"z1",width:G.currentWidth,widthConstraints:tj(d,u,c)},X)}var iL=A(175),iP=A.n(iL);let iF="dnd-container";class iB extends P.PureComponent{dndDrake;childReactElementsById={};constructor(e){super(e),this.loadChildrenReactElements(this.props.children)}componentDidMount(){this.dndDrake&&this.dndDrake.on("drop",this.onDrop)}componentDidUpdate(e){this.props.children!==e.children&&this.loadChildrenReactElements(e.children)}componentWillUnmount(){this.dndDrake&&this.dndDrake.destroy()}onDrop=(e,t,o,r)=>{if(this.props.onDrop&&e.id){let t=this.sanitizeId(e.id),o=r?.id?this.sanitizeId(r.id):null,i=this.childReactElementsById[t],n=o?this.childReactElementsById[o]:null;i&&this.props.onDrop(i,n)}};isContainerCallback=e=>e?.classList.contains(iF)??!1;movesCallback=e=>!!e?.id&&this.isDraggable(e.id);acceptsCallback=(e,t,o,r)=>!!e?.id&&this.isDroppable(e.id,r?.id);invalidCallBack=()=>!1;dndDecorator=e=>{if(e){let t={isContainer:this.isContainerCallback,mirrorContainer:this.props.mirrorContainer,moves:this.movesCallback,accepts:this.acceptsCallback,invalid:this.invalidCallBack,direction:this.props.direction||"horizontal",copy:!1,copySortSource:!1,revertOnSpill:!1,removeOnSpill:!1,ignoreInputTextSelection:!0};this.dndDrake=iP()([e],t)}};loadChildrenReactElements(e){this.childReactElementsById={},e&&(e instanceof Array?e.forEach(e=>{P.isValidElement(e)&&this.addChildReactElement(e)}):P.isValidElement(e)&&this.addChildReactElement(e))}addChildReactElement(e){let t=e.props.id;t&&(this.childReactElementsById[this.sanitizeId(t)]=e)}sanitizeId(e){return e.trim().toLowerCase().replace(/-/g,"").replace(/_/g,"")}isDraggable(e){if(this.props.isDraggable){let t=this.sanitizeId(e),o=this.childReactElementsById[t];return!!o&&this.props.isDraggable(o)}return!1}isDroppable(e,t){if(this.props.isDroppable){let o=this.sanitizeId(e),r=t?this.sanitizeId(t):null,i=this.childReactElementsById[o],n=r?this.childReactElementsById[r]:null;if(i)return this.props.isDroppable(i,n)}return!1}render(){let{children:e,className:t}=this.props,o=L()(iF,t);return P.createElement("div",{className:o,ref:this.dndDecorator},e)}}function iU(){return(0,P.useState)(null)}let iZ=e=>e&&"function"!=typeof e?t=>{e.current=t}:e,ij=function(e,t){return(0,P.useMemo)(()=>{let o,r;return o=iZ(e),r=iZ(t),e=>{o&&o(e),r&&r(e)}},[e,t])};var i$=Object.prototype.hasOwnProperty;function iV(e,t,o){for(o of e.keys())if(iK(o,t))return o}function iK(e,t){var o,r,i;if(e===t)return!0;if(e&&t&&(o=e.constructor)===t.constructor){if(o===Date)return e.getTime()===t.getTime();if(o===RegExp)return e.toString()===t.toString();if(o===Array){if((r=e.length)===t.length)for(;r--&&iK(e[r],t[r]););return -1===r}if(o===Set){if(e.size!==t.size)return!1;for(r of e)if((i=r)&&"object"==typeof i&&!(i=iV(t,i))||!t.has(i))return!1;return!0}if(o===Map){if(e.size!==t.size)return!1;for(r of e)if((i=r[0])&&"object"==typeof i&&!(i=iV(t,i))||!iK(r[1],t.get(i)))return!1;return!0}if(o===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(o===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return -1===r}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return -1===r}if(!o||"object"==typeof e){for(o in r=0,e)if(i$.call(e,o)&&++r&&!i$.call(t,o)||!(o in t)||!iK(e[o],t[o]))return!1;return Object.keys(t).length===r}}return e!=e&&t!=t}let iY=function(e){let t,o,r=(t=(0,P.useRef)(!0),o=(0,P.useRef)(()=>t.current),(0,P.useEffect)(()=>(t.current=!0,()=>{t.current=!1}),[]),o.current);return[e[0],(0,P.useCallback)(t=>{if(r())return e[1](t)},[r,e[1]])]};function iq(e){return e.split("-")[0]}function iX(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function iJ(e){var t=iX(e).Element;return e instanceof t||e instanceof Element}function iQ(e){var t=iX(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function i0(e){if("undefined"==typeof ShadowRoot)return!1;var t=iX(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var i1=Math.max,i2=Math.min,i5=Math.round;function i3(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function i6(){return!/^((?!chrome|android).)*safari/i.test(i3())}function i4(e,t,o){void 0===t&&(t=!1),void 0===o&&(o=!1);var r=e.getBoundingClientRect(),i=1,n=1;t&&iQ(e)&&(i=e.offsetWidth>0&&i5(r.width)/e.offsetWidth||1,n=e.offsetHeight>0&&i5(r.height)/e.offsetHeight||1);var s=(iJ(e)?iX(e):window).visualViewport,l=!i6()&&o,a=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/n,c=r.width/i,d=r.height/n;return{width:c,height:d,top:h,right:a+c,bottom:h+d,left:a,x:a,y:h}}function i7(e){var t=i4(e),o=e.offsetWidth,r=e.offsetHeight;return 1>=Math.abs(t.width-o)&&(o=t.width),1>=Math.abs(t.height-r)&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:o,height:r}}function i9(e,t){var o=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(o&&i0(o)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function i8(e){return e?(e.nodeName||"").toLowerCase():null}function ne(e){return iX(e).getComputedStyle(e)}function nt(e){return((iJ(e)?e.ownerDocument:e.document)||window.document).documentElement}function no(e){return"html"===i8(e)?e:e.assignedSlot||e.parentNode||(i0(e)?e.host:null)||nt(e)}function nr(e){return iQ(e)&&"fixed"!==ne(e).position?e.offsetParent:null}function ni(e){for(var t=iX(e),o=nr(e);o&&["table","td","th"].indexOf(i8(o))>=0&&"static"===ne(o).position;)o=nr(o);return o&&("html"===i8(o)||"body"===i8(o)&&"static"===ne(o).position)?t:o||function(e){var t=/firefox/i.test(i3());if(/Trident/i.test(i3())&&iQ(e)&&"fixed"===ne(e).position)return null;var o=no(e);for(i0(o)&&(o=o.host);iQ(o)&&0>["html","body"].indexOf(i8(o));){var r=ne(o);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return o;o=o.parentNode}return null}(e)||t}function nn(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ns(e,t,o){return i1(e,i2(t,o))}function nl(){return{top:0,right:0,bottom:0,left:0}}function na(e){return Object.assign({},nl(),e)}function nh(e,t){return t.reduce(function(t,o){return t[o]=e,t},{})}var nc="bottom",nd="right",nu="left",np="auto",nf=["top",nc,nd,nu],nm="start",ng="viewport",nv="popper",ny=nf.reduce(function(e,t){return e.concat([t+"-"+nm,t+"-end"])},[]),nS=[].concat(nf,[np]).reduce(function(e,t){return e.concat([t,t+"-"+nm,t+"-end"])},[]),nw=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function nC(e){return e.split("-")[1]}var nb={top:"auto",right:"auto",bottom:"auto",left:"auto"};function nR(e){var t,o,r,i,n,s,l,a=e.popper,h=e.popperRect,c=e.placement,d=e.variation,u=e.offsets,p=e.position,f=e.gpuAcceleration,m=e.adaptive,g=e.roundOffsets,v=e.isFixed,y=u.x,S=void 0===y?0:y,w=u.y,C=void 0===w?0:w,b="function"==typeof g?g({x:S,y:C}):{x:S,y:C};S=b.x,C=b.y;var R=u.hasOwnProperty("x"),_=u.hasOwnProperty("y"),T=nu,x="top",E=window;if(m){var M=ni(a),I="clientHeight",O="clientWidth";M===iX(a)&&"static"!==ne(M=nt(a)).position&&"absolute"===p&&(I="scrollHeight",O="scrollWidth"),("top"===c||(c===nu||c===nd)&&"end"===d)&&(x=nc,C-=(v&&M===E&&E.visualViewport?E.visualViewport.height:M[I])-h.height,C*=f?1:-1),(c===nu||("top"===c||c===nc)&&"end"===d)&&(T=nd,S-=(v&&M===E&&E.visualViewport?E.visualViewport.width:M[O])-h.width,S*=f?1:-1)}var z=Object.assign({position:p},m&&nb),D=!0===g?(t={x:S,y:C},o=iX(a),r=t.x,i=t.y,{x:i5(r*(n=o.devicePixelRatio||1))/n||0,y:i5(i*n)/n||0}):{x:S,y:C};return(S=D.x,C=D.y,f)?Object.assign({},z,((l={})[x]=_?"0":"",l[T]=R?"0":"",l.transform=1>=(E.devicePixelRatio||1)?"translate("+S+"px, "+C+"px)":"translate3d("+S+"px, "+C+"px, 0)",l)):Object.assign({},z,((s={})[x]=_?C+"px":"",s[T]=R?S+"px":"",s.transform="",s))}var n_={passive:!0},nT={left:"right",right:"left",bottom:"top",top:"bottom"};function nx(e){return e.replace(/left|right|bottom|top/g,function(e){return nT[e]})}var nE={start:"end",end:"start"};function nM(e){return e.replace(/start|end/g,function(e){return nE[e]})}function nI(e){var t=iX(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function nO(e){return i4(nt(e)).left+nI(e).scrollLeft}function nz(e){var t=ne(e),o=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(o+i+r)}function nD(e,t){void 0===t&&(t=[]);var o,r=function e(t){return["html","body","#document"].indexOf(i8(t))>=0?t.ownerDocument.body:iQ(t)&&nz(t)?t:e(no(t))}(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),n=iX(r),s=i?[n].concat(n.visualViewport||[],nz(r)?r:[]):r,l=t.concat(s);return i?l:l.concat(nD(no(s)))}function nk(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function nG(e,t,o){var r,i,n,s,l,a,h,c,d,u;return t===ng?nk(function(e,t){var o=iX(e),r=nt(e),i=o.visualViewport,n=r.clientWidth,s=r.clientHeight,l=0,a=0;if(i){n=i.width,s=i.height;var h=i6();(h||!h&&"fixed"===t)&&(l=i.offsetLeft,a=i.offsetTop)}return{width:n,height:s,x:l+nO(e),y:a}}(e,o)):iJ(t)?((r=i4(t,!1,"fixed"===o)).top=r.top+t.clientTop,r.left=r.left+t.clientLeft,r.bottom=r.top+t.clientHeight,r.right=r.left+t.clientWidth,r.width=t.clientWidth,r.height=t.clientHeight,r.x=r.left,r.y=r.top,r):nk((i=nt(e),s=nt(i),l=nI(i),a=null==(n=i.ownerDocument)?void 0:n.body,h=i1(s.scrollWidth,s.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),c=i1(s.scrollHeight,s.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),d=-l.scrollLeft+nO(i),u=-l.scrollTop,"rtl"===ne(a||s).direction&&(d+=i1(s.clientWidth,a?a.clientWidth:0)-h),{width:h,height:c,x:d,y:u}))}function nN(e){var t,o=e.reference,r=e.element,i=e.placement,n=i?iq(i):null,s=i?nC(i):null,l=o.x+o.width/2-r.width/2,a=o.y+o.height/2-r.height/2;switch(n){case"top":t={x:l,y:o.y-r.height};break;case nc:t={x:l,y:o.y+o.height};break;case nd:t={x:o.x+o.width,y:a};break;case nu:t={x:o.x-r.width,y:a};break;default:t={x:o.x,y:o.y}}var h=n?nn(n):null;if(null!=h){var c="y"===h?"height":"width";switch(s){case nm:t[h]=t[h]-(o[c]/2-r[c]/2);break;case"end":t[h]=t[h]+(o[c]/2-r[c]/2)}}return t}function nA(e,t){void 0===t&&(t={});var o,r,i,n,s,l,a,h,c=t,d=c.placement,u=void 0===d?e.placement:d,p=c.strategy,f=void 0===p?e.strategy:p,m=c.boundary,g=c.rootBoundary,v=c.elementContext,y=void 0===v?nv:v,S=c.altBoundary,w=c.padding,C=void 0===w?0:w,b=na("number"!=typeof C?C:nh(C,nf)),R=e.rects.popper,_=e.elements[void 0!==S&&S?y===nv?"reference":nv:y],T=(o=iJ(_)?_:_.contextElement||nt(e.elements.popper),r=void 0===m?"clippingParents":m,i=void 0===g?ng:g,a=(l=[].concat("clippingParents"===r?(n=nD(no(o)),!iJ(s=["absolute","fixed"].indexOf(ne(o).position)>=0&&iQ(o)?ni(o):o)?[]:n.filter(function(e){return iJ(e)&&i9(e,s)&&"body"!==i8(e)})):[].concat(r),[i]))[0],(h=l.reduce(function(e,t){var r=nG(o,t,f);return e.top=i1(r.top,e.top),e.right=i2(r.right,e.right),e.bottom=i2(r.bottom,e.bottom),e.left=i1(r.left,e.left),e},nG(o,a,f))).width=h.right-h.left,h.height=h.bottom-h.top,h.x=h.left,h.y=h.top,h),x=i4(e.elements.reference),E=nN({reference:x,element:R,strategy:"absolute",placement:u}),M=nk(Object.assign({},R,E)),I=y===nv?M:x,O={top:T.top-I.top+b.top,bottom:I.bottom-T.bottom+b.bottom,left:T.left-I.left+b.left,right:I.right-T.right+b.right},z=e.modifiersData.offset;if(y===nv&&z){var D=z[u];Object.keys(O).forEach(function(e){var t=[nd,nc].indexOf(e)>=0?1:-1,o=["top",nc].indexOf(e)>=0?"y":"x";O[e]+=D[o]*t})}return O}function nW(e,t,o){return void 0===o&&(o={x:0,y:0}),{top:e.top-t.height-o.y,right:e.right-t.width+o.x,bottom:e.bottom-t.height+o.y,left:e.left-t.width-o.x}}function nH(e){return["top",nd,nc,nu].some(function(t){return e[t]>=0})}var nL={placement:"bottom",modifiers:[],strategy:"absolute"};function nP(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}let nF=(m=void 0===(f=(p={defaultModifiers:[{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,o=e.name,r=t.rects.reference,i=t.rects.popper,n=t.modifiersData.preventOverflow,s=nA(t,{elementContext:"reference"}),l=nA(t,{altBoundary:!0}),a=nW(s,r),h=nW(l,i,n),c=nH(a),d=nH(h);t.modifiersData[o]={referenceClippingOffsets:a,popperEscapeOffsets:h,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,o=e.name;t.modifiersData[o]=nN({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,o=e.options,r=o.gpuAcceleration,i=o.adaptive,n=o.roundOffsets,s=void 0===n||n,l={placement:iq(t.placement),variation:nC(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:void 0===r||r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,nR(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:void 0===i||i,roundOffsets:s})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,nR(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,o=e.instance,r=e.options,i=r.scroll,n=void 0===i||i,s=r.resize,l=void 0===s||s,a=iX(t.elements.popper),h=[].concat(t.scrollParents.reference,t.scrollParents.popper);return n&&h.forEach(function(e){e.addEventListener("scroll",o.update,n_)}),l&&a.addEventListener("resize",o.update,n_),function(){n&&h.forEach(function(e){e.removeEventListener("scroll",o.update,n_)}),l&&a.removeEventListener("resize",o.update,n_)}},data:{}},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,o=e.options,r=e.name,i=o.offset,n=void 0===i?[0,0]:i,s=nS.reduce(function(e,o){var r,i,s,l,a,h;return e[o]=(r=t.rects,s=[nu,"top"].indexOf(i=iq(o))>=0?-1:1,a=(l="function"==typeof n?n(Object.assign({},r,{placement:o})):n)[0],h=l[1],a=a||0,h=(h||0)*s,[nu,nd].indexOf(i)>=0?{x:h,y:a}:{x:a,y:h}),e},{}),l=s[t.placement],a=l.x,h=l.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=a,t.modifiersData.popperOffsets.y+=h),t.modifiersData[r]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,o=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=o.mainAxis,n=void 0===i||i,s=o.altAxis,l=void 0===s||s,a=o.fallbackPlacements,h=o.padding,c=o.boundary,d=o.rootBoundary,u=o.altBoundary,p=o.flipVariations,f=void 0===p||p,m=o.allowedAutoPlacements,g=t.options.placement,v=iq(g)===g,y=a||(v||!f?[nx(g)]:function(e){if(iq(e)===np)return[];var t=nx(e);return[nM(e),t,nM(t)]}(g)),S=[g].concat(y).reduce(function(e,o){var r,i,n,s,l,a,u,p,g,v,y,S;return e.concat(iq(o)===np?(i=(r={placement:o,boundary:c,rootBoundary:d,padding:h,flipVariations:f,allowedAutoPlacements:m}).placement,n=r.boundary,s=r.rootBoundary,l=r.padding,a=r.flipVariations,p=void 0===(u=r.allowedAutoPlacements)?nS:u,0===(y=(v=(g=nC(i))?a?ny:ny.filter(function(e){return nC(e)===g}):nf).filter(function(e){return p.indexOf(e)>=0})).length&&(y=v),Object.keys(S=y.reduce(function(e,o){return e[o]=nA(t,{placement:o,boundary:n,rootBoundary:s,padding:l})[iq(o)],e},{})).sort(function(e,t){return S[e]-S[t]})):o)},[]),w=t.rects.reference,C=t.rects.popper,b=new Map,R=!0,_=S[0],T=0;T<S.length;T++){var x=S[T],E=iq(x),M=nC(x)===nm,I=["top",nc].indexOf(E)>=0,O=I?"width":"height",z=nA(t,{placement:x,boundary:c,rootBoundary:d,altBoundary:u,padding:h}),D=I?M?nd:nu:M?nc:"top";w[O]>C[O]&&(D=nx(D));var k=nx(D),G=[];if(n&&G.push(z[E]<=0),l&&G.push(z[D]<=0,z[k]<=0),G.every(function(e){return e})){_=x,R=!1;break}b.set(x,G)}if(R)for(var N=f?3:1,A=function(e){var t=S.find(function(t){var o=b.get(t);if(o)return o.slice(0,e).every(function(e){return e})});if(t)return _=t,"break"},W=N;W>0&&"break"!==A(W);W--);t.placement!==_&&(t.modifiersData[r]._skip=!0,t.placement=_,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,o=e.options,r=e.name,i=o.mainAxis,n=o.altAxis,s=o.boundary,l=o.rootBoundary,a=o.altBoundary,h=o.padding,c=o.tether,d=void 0===c||c,u=o.tetherOffset,p=void 0===u?0:u,f=nA(t,{boundary:s,rootBoundary:l,padding:h,altBoundary:a}),m=iq(t.placement),g=nC(t.placement),v=!g,y=nn(m),S="x"===y?"y":"x",w=t.modifiersData.popperOffsets,C=t.rects.reference,b=t.rects.popper,R="function"==typeof p?p(Object.assign({},t.rects,{placement:t.placement})):p,_="number"==typeof R?{mainAxis:R,altAxis:R}:Object.assign({mainAxis:0,altAxis:0},R),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,x={x:0,y:0};if(w){if(void 0===i||i){var E,M="y"===y?"top":nu,I="y"===y?nc:nd,O="y"===y?"height":"width",z=w[y],D=z+f[M],k=z-f[I],G=d?-b[O]/2:0,N=g===nm?C[O]:b[O],A=g===nm?-b[O]:-C[O],W=t.elements.arrow,H=d&&W?i7(W):{width:0,height:0},L=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:nl(),P=L[M],F=L[I],B=ns(0,C[O],H[O]),U=v?C[O]/2-G-B-P-_.mainAxis:N-B-P-_.mainAxis,Z=v?-C[O]/2+G+B+F+_.mainAxis:A+B+F+_.mainAxis,j=t.elements.arrow&&ni(t.elements.arrow),$=j?"y"===y?j.clientTop||0:j.clientLeft||0:0,V=null!=(E=null==T?void 0:T[y])?E:0,K=ns(d?i2(D,z+U-V-$):D,z,d?i1(k,z+Z-V):k);w[y]=K,x[y]=K-z}if(void 0!==n&&n){var Y,q,X="x"===y?"top":nu,J="x"===y?nc:nd,Q=w[S],ee="y"===S?"height":"width",et=Q+f[X],eo=Q-f[J],er=-1!==["top",nu].indexOf(m),ei=null!=(q=null==T?void 0:T[S])?q:0,en=er?et:Q-C[ee]-b[ee]-ei+_.altAxis,es=er?Q+C[ee]+b[ee]-ei-_.altAxis:eo,el=d&&er?(Y=ns(en,Q,es))>es?es:Y:ns(d?en:et,Q,d?es:eo);w[S]=el,x[S]=el-Q}t.modifiersData[r]=x}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,o=e.state,r=e.name,i=e.options,n=o.elements.arrow,s=o.modifiersData.popperOffsets,l=iq(o.placement),a=nn(l),h=[nu,nd].indexOf(l)>=0?"height":"width";if(n&&s){var c,d=(c=i.padding,na("number"!=typeof(c="function"==typeof c?c(Object.assign({},o.rects,{placement:o.placement})):c)?c:nh(c,nf))),u=i7(n),p="y"===a?"top":nu,f="y"===a?nc:nd,m=o.rects.reference[h]+o.rects.reference[a]-s[a]-o.rects.popper[h],g=s[a]-o.rects.reference[a],v=ni(n),y=v?"y"===a?v.clientHeight||0:v.clientWidth||0:0,S=d[p],w=y-u[h]-d[f],C=y/2-u[h]/2+(m/2-g/2),b=ns(S,C,w);o.modifiersData[r]=((t={})[a]=b,t.centerOffset=b-C,t)}},effect:function(e){var t=e.state,o=e.options.element,r=void 0===o?"[data-popper-arrow]":o;null==r||("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&i9(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]}]}).defaultModifiers)?[]:f,v=void 0===(g=p.defaultOptions)?nL:g,function(e,t,o){void 0===o&&(o=v);var r,i,n={placement:"bottom",orderedModifiers:[],options:Object.assign({},nL,v),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},s=[],l=!1,a={state:n,setOptions:function(o){var r,i,l,c,d,u,p="function"==typeof o?o(n.options):o;h(),n.options=Object.assign({},v,n.options,p),n.scrollParents={reference:iJ(e)?nD(e):e.contextElement?nD(e.contextElement):[],popper:nD(t)};var f=(i=Object.keys(r=[].concat(m,n.options.modifiers).reduce(function(e,t){var o=e[t.name];return e[t.name]=o?Object.assign({},o,t,{options:Object.assign({},o.options,t.options),data:Object.assign({},o.data,t.data)}):t,e},{})).map(function(e){return r[e]}),l=new Map,c=new Set,d=[],i.forEach(function(e){l.set(e.name,e)}),i.forEach(function(e){c.has(e.name)||function e(t){c.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!c.has(t)){var o=l.get(t);o&&e(o)}}),d.push(t)}(e)}),u=d,nw.reduce(function(e,t){return e.concat(u.filter(function(e){return e.phase===t}))},[]));return n.orderedModifiers=f.filter(function(e){return e.enabled}),n.orderedModifiers.forEach(function(e){var t=e.name,o=e.options,r=e.effect;if("function"==typeof r){var i=r({state:n,name:t,instance:a,options:void 0===o?{}:o});s.push(i||function(){})}}),a.update()},forceUpdate:function(){if(!l){var e=n.elements,t=e.reference,o=e.popper;if(nP(t,o)){n.rects={reference:(r=ni(o),i="fixed"===n.options.strategy,s=iQ(r),u=iQ(r)&&(c=i5((h=r.getBoundingClientRect()).width)/r.offsetWidth||1,d=i5(h.height)/r.offsetHeight||1,1!==c||1!==d),p=nt(r),f=i4(t,u,i),m={scrollLeft:0,scrollTop:0},g={x:0,y:0},(s||!s&&!i)&&(("body"!==i8(r)||nz(p))&&(m=function(e){return e!==iX(e)&&iQ(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:nI(e)}(r)),iQ(r)?(g=i4(r,!0),g.x+=r.clientLeft,g.y+=r.clientTop):p&&(g.x=nO(p))),{x:f.left+m.scrollLeft-g.x,y:f.top+m.scrollTop-g.y,width:f.width,height:f.height}),popper:i7(o)},n.reset=!1,n.placement=n.options.placement,n.orderedModifiers.forEach(function(e){return n.modifiersData[e.name]=Object.assign({},e.data)});for(var r,i,s,h,c,d,u,p,f,m,g,v=0;v<n.orderedModifiers.length;v++){if(!0===n.reset){n.reset=!1,v=-1;continue}var y=n.orderedModifiers[v],S=y.fn,w=y.options,C=void 0===w?{}:w,b=y.name;"function"==typeof S&&(n=S({state:n,options:C,name:b,instance:a})||n)}}}},update:(r=function(){return new Promise(function(e){a.forceUpdate(),e(n)})},function(){return i||(i=new Promise(function(e){Promise.resolve().then(function(){i=void 0,e(r())})})),i}),destroy:function(){h(),l=!0}};if(!nP(e,t))return a;function h(){s.forEach(function(e){return e()}),s=[]}return a.setOptions(o).then(function(e){!l&&o.onFirstUpdate&&o.onFirstUpdate(e)}),a}),nB=["enabled","placement","strategy","modifiers"],nU={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>void 0},nZ={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:({state:e})=>()=>{let{reference:t,popper:o}=e.elements;if("removeAttribute"in t){let e=(t.getAttribute("aria-describedby")||"").split(",").filter(e=>e.trim()!==o.id);e.length?t.setAttribute("aria-describedby",e.join(",")):t.removeAttribute("aria-describedby")}},fn:({state:e})=>{var t;let{popper:o,reference:r}=e.elements,i=null==(t=o.getAttribute("role"))?void 0:t.toLowerCase();if(o.id&&"tooltip"===i&&"setAttribute"in r){let e=r.getAttribute("aria-describedby");if(e&&-1!==e.split(",").indexOf(o.id))return;r.setAttribute("aria-describedby",e?`${e},${o.id}`:o.id)}}},nj=[],n$=function(e,t,o={}){let{enabled:r=!0,placement:i="bottom",strategy:n="absolute",modifiers:s=nj}=o,l=function(e,t){if(null==e)return{};var o={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;o[r]=e[r]}return o}(o,nB),a=(0,P.useRef)(s),h=(0,P.useRef)(),c=(0,P.useCallback)(()=>{var e;null==(e=h.current)||e.update()},[]),d=(0,P.useCallback)(()=>{var e;null==(e=h.current)||e.forceUpdate()},[]),[u,p]=iY((0,P.useState)({placement:i,update:c,forceUpdate:d,attributes:{},styles:{popper:{},arrow:{}}})),f=(0,P.useMemo)(()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:e})=>{let t={},o={};Object.keys(e.elements).forEach(r=>{t[r]=e.styles[r],o[r]=e.attributes[r]}),p({state:e,styles:t,attributes:o,update:c,forceUpdate:d,placement:e.placement})}}),[c,d,p]),m=(0,P.useMemo)(()=>(iK(a.current,s)||(a.current=s),a.current),[s]);return(0,P.useEffect)(()=>{h.current&&r&&h.current.setOptions({placement:i,strategy:n,modifiers:[...m,f,nU]})},[n,i,f,r,m]),(0,P.useEffect)(()=>{if(r&&null!=e&&null!=t)return h.current=nF(e,t,Object.assign({},l,{placement:i,strategy:n,modifiers:[...m,nZ,f]})),()=>{null!=h.current&&(h.current.destroy(),h.current=void 0,p(e=>Object.assign({},e,{attributes:{},styles:{popper:{}}})))}},[r,e,t]),u};var nV=!1,nK=!1;try{var nY={get passive(){return nV=!0},get once(){return nK=nV=!0}};oX&&(window.addEventListener("test",nY,nY),window.removeEventListener("test",nY,!0))}catch{}let nq=function(e,t,o,r){if(r&&"boolean"!=typeof r&&!nK){var i=r.once,n=r.capture,s=o;!nK&&i&&(s=o.__once||function e(r){this.removeEventListener(t,e,n),o.call(this,r)},o.__once=s),e.addEventListener(t,s,nV?r:n)}e.addEventListener(t,o,r)},nX=function(e,t,o,r){var i=r&&"boolean"!=typeof r?r.capture:r;e.removeEventListener(t,o,i),o.__once&&e.removeEventListener(t,o.__once,i)},nJ=function(e,t,o,r){return nq(e,t,o,r),function(){nX(e,t,o,r)}};function nQ(e){return e&&e.ownerDocument||document}let n0=function(e){let t=(0,P.useRef)(e);return(0,P.useEffect)(()=>{t.current=e},[e]),t};function n1(e){let t=n0(e);return(0,P.useCallback)(function(...e){return t.current&&t.current(...e)},[t])}function n2(e,t){return e.contains?e.contains(t):e.compareDocumentPosition?e===t||!!(16&e.compareDocumentPosition(t)):void 0}var n5=A(730),n3=A.n(n5);let n6=()=>{},n4=e=>e&&("current"in e?e.current:e),n7={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"},n9=function(e,t=n6,{disabled:o,clickTrigger:r="click"}={}){let i=(0,P.useRef)(!1),n=(0,P.useRef)(!1),s=(0,P.useCallback)(t=>{let o=n4(e);n3()(!!o,"ClickOutside captured a close event but does not have a ref to compare it to. useClickOutside(), should be passed a ref that resolves to a DOM node"),i.current=!o||!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)||0!==t.button||!!n2(o,t.target)||n.current,n.current=!1},[e]),l=n1(t=>{let o=n4(e);o&&n2(o,t.target)?n.current=!0:n.current=!1}),a=n1(e=>{i.current||t(e)});(0,P.useEffect)(()=>{var t,i;if(o||null==e)return;let n=nQ(n4(e)),h=n.defaultView||window,c=null!=(t=h.event)?t:null==(i=h.parent)?void 0:i.event,d=null;n7[r]&&(d=nJ(n,n7[r],l,!0));let u=nJ(n,r,s,!0),p=nJ(n,r,e=>{if(e===c){c=void 0;return}a(e)}),f=[];return"ontouchstart"in n.documentElement&&(f=[].slice.call(n.body.children).map(e=>nJ(e,"mousemove",n6))),()=>{null==d||d(),u(),p(),f.forEach(e=>e())}},[e,o,r,s,l,a])};function n8(e){let t;if(!e||"function"==typeof e)return null;let{major:o}={major:+(t=P.version.split("."))[0],minor:+t[1],patch:+t[2]};return o>=19?e.props.ref:e.ref}let se=()=>{},st=function(e,t,{disabled:o,clickTrigger:r}={}){let i=t||se;n9(e,i,{disabled:o,clickTrigger:r});let n=n1(e=>{("Escape"===e.code||27===e.keyCode)&&i(e)});(0,P.useEffect)(()=>{if(o||null==e)return;let t=nQ(n4(e)),r=(t.defaultView||window).event,i=nJ(t,"keyup",e=>{if(e===r){r=void 0;return}n(e)});return()=>{i()}},[e,o,n])},so=(0,P.createContext)(oX?window:void 0);so.Provider;let sr=(e,t)=>oX?null==e?(t||nQ()).body:("function"==typeof e&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect))?e:null:null;function si(e,t){let o=(0,P.useContext)(so),[r,i]=(0,P.useState)(()=>sr(e,null==o?void 0:o.document));if(!r){let t=sr(e);t&&i(t)}return(0,P.useEffect)(()=>{t&&r&&t(r)},[t,r]),(0,P.useEffect)(()=>{let t=sr(e);t!==r&&i(t)},[e,r]),r}let sn=void 0!==A.g&&A.g.navigator&&"ReactNative"===A.g.navigator.product,ss="undefined"!=typeof document||sn?P.useLayoutEffect:P.useEffect,sl=function({children:e,in:t,onExited:o,mountOnEnter:r,unmountOnExit:i}){let n=(0,P.useRef)(null),s=(0,P.useRef)(t),l=n1(o);(0,P.useEffect)(()=>{t?s.current=!0:l(n.current)},[t,l]);let a=ij(n,n8(e)),h=(0,P.cloneElement)(e,{ref:a});return t?h:i||!s.current&&r?null:h},sa=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"],sh=["component"],sc=P.forwardRef((e,t)=>{let{component:o}=e,r=function(e){let{onEnter:t,onEntering:o,onEntered:r,onExit:i,onExiting:n,onExited:s,addEndListener:l,children:a}=e,h=function(e,t){if(null==e)return{};var o={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;o[r]=e[r]}return o}(e,sa),c=(0,P.useRef)(null),d=ij(c,n8(a)),u=e=>t=>{e&&c.current&&e(c.current,t)},p=(0,P.useCallback)(u(t),[t]),f=(0,P.useCallback)(u(o),[o]),m=(0,P.useCallback)(u(r),[r]),g=(0,P.useCallback)(u(i),[i]),v=(0,P.useCallback)(u(n),[n]),y=(0,P.useCallback)(u(s),[s]),S=(0,P.useCallback)(u(l),[l]);return Object.assign({},h,{nodeRef:c},t&&{onEnter:p},o&&{onEntering:f},r&&{onEntered:m},i&&{onExit:g},n&&{onExiting:v},s&&{onExited:y},l&&{addEndListener:S},{children:"function"==typeof a?(e,t)=>a(e,Object.assign({},t,{ref:d})):(0,P.cloneElement)(a,{ref:d})})}(function(e,t){if(null==e)return{};var o={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;o[r]=e[r]}return o}(e,sh));return(0,r8.jsx)(o,Object.assign({ref:t},r))});function sd({children:e,in:t,onExited:o,onEntered:r,transition:i}){let[n,s]=(0,P.useState)(!t);t&&n&&s(!1);let l=ij(function({in:e,onTransition:t}){let o=(0,P.useRef)(null),r=(0,P.useRef)(!0),i=n1(t);return ss(()=>{if(!o.current)return;let t=!1;return i({in:e,element:o.current,initial:r.current,isStale:()=>t}),()=>{t=!0}},[e,i]),ss(()=>(r.current=!1,()=>{r.current=!0}),[]),o}({in:!!t,onTransition:e=>{Promise.resolve(i(e)).then(()=>{e.isStale()||(e.in?null==r||r(e.element,e.initial):(s(!0),null==o||o(e.element)))},t=>{throw e.in||s(!0),t})}}),n8(e));return n&&!t?null:(0,P.cloneElement)(e,{ref:l})}let su=P.forwardRef((e,t)=>{var r;let{flip:i,offset:n,placement:s,containerPadding:l,popperConfig:a={},transition:h,runTransition:c}=e,[d,u]=iU(),[p,f]=iU(),m=ij(u,t),g=si(e.container),v=si(e.target),[y,S]=(0,P.useState)(!e.show),w=n$(v,d,function({enabled:e,enableEvents:t,placement:o,flip:r,offset:i,fixed:n,containerPadding:s,arrowElement:l,popperConfig:a={}}){var h,c,d,u,p,f;let m,g=(f=a.modifiers,m={},Array.isArray(f)?(null==f||f.forEach(e=>{m[e.name]=e}),m):f||m);return Object.assign({},a,{placement:o,enabled:e,strategy:n?"fixed":a.strategy,modifiers:function(e={}){return Array.isArray(e)?e:Object.keys(e).map(t=>(e[t].name=t,e[t]))}(Object.assign({},g,{eventListeners:{enabled:t,options:null==(h=g.eventListeners)?void 0:h.options},preventOverflow:Object.assign({},g.preventOverflow,{options:s?Object.assign({padding:s},null==(c=g.preventOverflow)?void 0:c.options):null==(d=g.preventOverflow)?void 0:d.options}),offset:{options:Object.assign({offset:i},null==(u=g.offset)?void 0:u.options)},arrow:Object.assign({},g.arrow,{enabled:!!l,options:Object.assign({},null==(p=g.arrow)?void 0:p.options,{element:l})}),flip:Object.assign({enabled:!!r},g.flip)}))})}({placement:s,enableEvents:!!e.show,containerPadding:l||5,flip:i,offset:n,arrowElement:p,popperConfig:a}));e.show&&y&&S(!1);let C=e.show||!y;if(st(d,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!C)return null;let{onExit:b,onExiting:R,onEnter:_,onEntering:T,onEntered:x}=e,E=e.children(Object.assign({},w.attributes.popper,{style:w.styles.popper,ref:m}),{popper:w,placement:s,show:!!e.show,arrowProps:Object.assign({},w.attributes.arrow,{style:w.styles.arrow,ref:f})});return r={in:!!e.show,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:E,onExit:b,onExiting:R,onExited:(...t)=>{S(!0),e.onExited&&e.onExited(...t)},onEnter:_,onEntering:T,onEntered:x},E=h?(0,r8.jsx)(sc,Object.assign({},r,{component:h})):c?(0,r8.jsx)(sd,Object.assign({},r,{transition:c})):(0,r8.jsx)(sl,Object.assign({},r)),g?o.createPortal(E,g):null});su.displayName="Overlay";let sp=function(e){let t=(0,P.useRef)(e);return(0,P.useEffect)(()=>{t.current=e},[e]),t},sf=void 0!==A.g&&A.g.navigator&&"ReactNative"===A.g.navigator.product,sm="undefined"!=typeof document||sf?P.useLayoutEffect:P.useEffect,sg=e=>e&&"function"!=typeof e?t=>{e.current=t}:e,sv=function(e,t){return(0,P.useMemo)(()=>{let o,r;return o=sg(e),r=sg(t),e=>{o&&o(e),r&&r(e)}},[e,t])};function sy(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}let sS=P.createContext({prefixes:{},breakpoints:["xxl","xl","lg","md","sm","xs"],minBreakpoint:"xs"}),{Consumer:sw,Provider:sC}=sS;function sb(e,t){let{prefixes:o}=(0,P.useContext)(sS);return e||o[t]||t}function sR(){let{dir:e}=(0,P.useContext)(sS);return"rtl"===e}let s_=P.forwardRef(({className:e,bsPrefix:t,as:o="div",...r},i)=>(t=sb(t,"popover-header"),(0,r8.jsx)(o,{ref:i,className:L()(e,t),...r})));s_.displayName="PopoverHeader";let sT=P.forwardRef(({className:e,bsPrefix:t,as:o="div",...r},i)=>(t=sb(t,"popover-body"),(0,r8.jsx)(o,{ref:i,className:L()(e,t),...r})));function sx(e,t){let o=e;return"left"===e?o=t?"end":"start":"right"===e&&(o=t?"start":"end"),o}function sE(e="absolute"){return{position:e,top:"0",left:"0",opacity:"0",pointerEvents:"none"}}sT.displayName="PopoverBody",P.Component;let sM=P.forwardRef(({bsPrefix:e,placement:t="right",className:o,style:r,children:i,body:n,arrowProps:s,hasDoneInitialMeasure:l,popper:a,show:h,...c},d)=>{let u=sb(e,"popover"),p=sR(),[f]=(null==t?void 0:t.split("-"))||[],m=sx(f,p),g=r;return h&&!l&&(g={...r,...sE(null==a?void 0:a.strategy)}),(0,r8.jsxs)("div",{ref:d,role:"tooltip",style:g,"x-placement":f,className:L()(o,u,f&&`bs-popover-${m}`),...c,children:[(0,r8.jsx)("div",{className:"popover-arrow",...s}),n?(0,r8.jsx)(sT,{children:i}):i]})});sM.displayName="Popover";let sI=Object.assign(sM,{Header:s_,Body:sT,POPPER_OFFSET:[0,8]}),sO=P.forwardRef(({bsPrefix:e,placement:t="right",className:o,style:r,children:i,arrowProps:n,hasDoneInitialMeasure:s,popper:l,show:a,...h},c)=>{e=sb(e,"tooltip");let d=sR(),[u]=(null==t?void 0:t.split("-"))||[],p=sx(u,d),f=r;return a&&!s&&(f={...r,...sE(null==l?void 0:l.strategy)}),(0,r8.jsxs)("div",{ref:c,style:f,role:"tooltip","x-placement":u,className:L()(o,e,`bs-tooltip-${p}`),...h,children:[(0,r8.jsx)("div",{className:"tooltip-arrow",...n}),(0,r8.jsx)("div",{className:`${e}-inner`,children:i})]})});sO.displayName="Tooltip";let sz=Object.assign(sO,{TOOLTIP_OFFSET:[0,6]}),sD=P.default.createContext(null);var sk="unmounted",sG="exited",sN="entering",sA="entered",sW="exiting",sH=function(e){function t(t,o){var r,i=e.call(this,t,o)||this,n=o&&!o.isMounting?t.enter:t.appear;return i.appearStatus=null,t.in?n?(r=sG,i.appearStatus=sN):r=sA:r=t.unmountOnExit||t.mountOnEnter?sk:sG,i.state={status:r},i.nextCallback=null,i}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,oN(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===sk?{status:sG}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(e){var t=null;if(e!==this.props){var o=this.state.status;this.props.in?o!==sN&&o!==sA&&(t=sN):(o===sN||o===sA)&&(t=sW)}this.updateStatus(!1,t)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var e,t,o,r=this.props.timeout;return e=t=o=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,o=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:o}},r.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===sN){if(this.props.unmountOnExit||this.props.mountOnEnter){var r=this.props.nodeRef?this.props.nodeRef.current:o.findDOMNode(this);r&&r.scrollTop}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===sG&&this.setState({status:sk})},r.performEnter=function(e){var t=this,r=this.props.enter,i=this.context?this.context.isMounting:e,n=this.props.nodeRef?[i]:[o.findDOMNode(this),i],s=n[0],l=n[1],a=this.getTimeouts(),h=i?a.appear:a.enter;(e||r)&&1?(this.props.onEnter(s,l),this.safeSetState({status:sN},function(){t.props.onEntering(s,l),t.onTransitionEnd(h,function(){t.safeSetState({status:sA},function(){t.props.onEntered(s,l)})})})):this.safeSetState({status:sA},function(){t.props.onEntered(s)})},r.performExit=function(){var e=this,t=this.props.exit,r=this.getTimeouts(),i=this.props.nodeRef?void 0:o.findDOMNode(this);t?(this.props.onExit(i),this.safeSetState({status:sW},function(){e.props.onExiting(i),e.onTransitionEnd(r.exit,function(){e.safeSetState({status:sG},function(){e.props.onExited(i)})})})):this.safeSetState({status:sG},function(){e.props.onExited(i)})},r.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},r.setNextCallback=function(e){var t=this,o=!0;return this.nextCallback=function(r){o&&(o=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},r.onTransitionEnd=function(e,t){this.setNextCallback(t);var r=this.props.nodeRef?this.props.nodeRef.current:o.findDOMNode(this),i=null==e&&!this.props.addEndListener;if(!r||i)return void setTimeout(this.nextCallback,0);if(this.props.addEndListener){var n=this.props.nodeRef?[this.nextCallback]:[r,this.nextCallback],s=n[0],l=n[1];this.props.addEndListener(s,l)}null!=e&&setTimeout(this.nextCallback,e)},r.render=function(){var e=this.state.status;if(e===sk)return null;var t=this.props,o=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,oj(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return P.default.createElement(sD.Provider,{value:null},"function"==typeof o?o(e,r):P.default.cloneElement(P.default.Children.only(o),r))},t}(P.default.Component);function sL(){}sH.contextType=sD,sH.propTypes={},sH.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:sL,onEntering:sL,onEntered:sL,onExit:sL,onExiting:sL,onExited:sL},sH.UNMOUNTED=sk,sH.EXITED=sG,sH.ENTERING=sN,sH.ENTERED=sA,sH.EXITING=sW;var sP=/([A-Z])/g,sF=/^ms-/;function sB(e){return e.replace(sP,"-$1").toLowerCase().replace(sF,"-ms-")}var sU=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;let sZ=function(e,t){var o,r,i="",n="";if("string"==typeof t){return e.style.getPropertyValue(sB(t))||((r=nQ(o=e))&&r.defaultView||window).getComputedStyle(o,void 0).getPropertyValue(sB(t))}Object.keys(t).forEach(function(o){var r=t[o];r||0===r?o&&sU.test(o)?n+=o+"("+r+") ":i+=sB(o)+": "+r+";":e.style.removeProperty(sB(o))}),n&&(i+="transform: "+n+";"),e.style.cssText+=";"+i};function sj(e,t){let o=sZ(e,t)||"",r=-1===o.indexOf("ms")?1e3:1;return parseFloat(o)*r}function s$(e,t){let o=sj(e,"transitionDuration"),r=sj(e,"transitionDelay"),i=function(e,t,o,r){null==o&&(n=-1===(i=sZ(e,"transitionDuration")||"").indexOf("ms")?1e3:1,o=parseFloat(i)*n||0);var i,n,s,l,a,h=(s=!1,l=setTimeout(function(){s||function(e,t,o,r){if(void 0===o&&(o=!1),void 0===r&&(r=!0),e){var i=document.createEvent("HTMLEvents");i.initEvent(t,o,r),e.dispatchEvent(i)}}(e,"transitionend",!0)},o+5),a=nJ(e,"transitionend",function(){s=!0},{once:!0}),function(){clearTimeout(l),a()}),c=nJ(e,"transitionend",t);return function(){h(),c()}}(e,o=>{o.target===e&&(i(),t(o))},o+r)}function sV(e){return e&&"setState"in e?o.findDOMNode(e):null!=e?e:null}let sK=P.default.forwardRef(({onEnter:e,onEntering:t,onEntered:o,onExit:r,onExiting:i,onExited:n,addEndListener:s,children:l,childRef:a,...h},c)=>{let d=(0,P.useRef)(null),u=sv(d,a),p=e=>{u(sV(e))},f=e=>t=>{e&&d.current&&e(d.current,t)},m=(0,P.useCallback)(f(e),[e]),g=(0,P.useCallback)(f(t),[t]),v=(0,P.useCallback)(f(o),[o]),y=(0,P.useCallback)(f(r),[r]),S=(0,P.useCallback)(f(i),[i]),w=(0,P.useCallback)(f(n),[n]),C=(0,P.useCallback)(f(s),[s]);return(0,r8.jsx)(sH,{ref:c,...h,onEnter:m,onEntered:v,onEntering:g,onExit:y,onExited:w,onExiting:S,addEndListener:C,nodeRef:d,children:"function"==typeof l?(e,t)=>l(e,{...t,ref:p}):P.default.cloneElement(l,{ref:p})})});sK.displayName="TransitionWrapper";let sY={[sN]:"show",[sA]:"show"},sq=P.forwardRef(({className:e,children:t,transitionClasses:o={},onEnter:r,...i},n)=>{let s={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...i},l=(0,P.useCallback)((e,t)=>{e.offsetHeight,null==r||r(e,t)},[r]);return(0,r8.jsx)(sK,{ref:n,addEndListener:s$,...s,onEnter:l,childRef:n8(t),children:(r,i)=>P.cloneElement(t,{...i,className:L()("fade",e,t.props.className,sY[r],o[r])})})});sq.displayName="Fade";let sX=sq,sJ=P.forwardRef(({children:e,transition:t=sX,popperConfig:o={},rootClose:r=!1,placement:i="top",show:n=!1,...s},l)=>{var a;let h,c,d,u,p,f=(0,P.useRef)({}),[m,g]=(0,P.useState)(null),[v,y]=(a=s.offset,h=(0,P.useRef)(null),c=sb(void 0,"popover"),d=sb(void 0,"tooltip"),u=(0,P.useMemo)(()=>({name:"offset",options:{offset:()=>{if(a)return a;if(h.current){if(sy(h.current,c))return sI.POPPER_OFFSET;if(sy(h.current,d))return sz.TOOLTIP_OFFSET}return[0,0]}}}),[a,c,d]),[h,[u]]),S=sv(l,v),w=!0===t?sX:t||void 0,C=(p=sp(e=>{g(e),null==o||null==o.onFirstUpdate||o.onFirstUpdate(e)}),(0,P.useCallback)(function(...e){return p.current&&p.current(...e)},[p]));return sm(()=>{m&&s.target&&(null==f.current.scheduleUpdate||f.current.scheduleUpdate())},[m,s.target]),(0,P.useEffect)(()=>{n||g(null)},[n]),(0,r8.jsx)(su,{...s,ref:S,popperConfig:{...o,modifiers:y.concat(o.modifiers||[]),onFirstUpdate:C},transition:w,rootClose:r,placement:i,show:n,children:(r,{arrowProps:i,popper:n,show:s})=>{var l;!function(e,t){let{ref:o}=e,{ref:r}=t;e.ref=o.__wrapped||(o.__wrapped=e=>o(sV(e))),t.ref=r.__wrapped||(r.__wrapped=e=>r(sV(e)))}(r,i);let a=null==n?void 0:n.placement,h=Object.assign(f.current,{state:null==n?void 0:n.state,scheduleUpdate:null==n?void 0:n.update,placement:a,outOfBoundaries:(null==n||null==(l=n.state)||null==(l=l.modifiersData.hide)?void 0:l.isReferenceHidden)||!1,strategy:o.strategy}),c=!!m;return"function"==typeof e?e({...r,placement:a,show:s,...!t&&s&&{className:"show"},popper:h,arrowProps:i,hasDoneInitialMeasure:c}):P.cloneElement(e,{...r,placement:a,arrowProps:i,popper:h,hasDoneInitialMeasure:c,className:L()(e.props.className,!t&&s&&"show"),style:{...e.props.style,...r.style}})}})});sJ.displayName="Overlay";var sQ=A(736),s0=A.n(sQ);let s1=0x80000000-1;function s2(e,t,o){let[r]=t,i=r.currentTarget,n=r.relatedTarget||r.nativeEvent[o];n&&n===i||n2(i,n)||e(...t)}A(597),s0().oneOf(["click","hover","focus"]);let s5=({trigger:e=["hover","focus"],overlay:t,children:o,popperConfig:r={},show:i,defaultShow:n=!1,onToggle:s,delay:l,placement:a,flip:h=a&&-1!==a.indexOf("auto"),...c})=>{var d,u,p,f,m,g,v;let y,S,w,C,b,R,_=(0,P.useRef)(null),T=sv(_,n8(o)),x=(b=(y=(0,P.useRef)(!0),S=(0,P.useRef)(()=>y.current),(0,P.useEffect)(()=>(y.current=!0,()=>{y.current=!1}),[]),S.current),R=(0,P.useRef)(),v=()=>clearTimeout(R.current),(w=(0,P.useRef)(v)).current=v,C=w,(0,P.useEffect)(()=>()=>C.current(),[]),(0,P.useMemo)(()=>{let e=()=>clearTimeout(R.current);return{set:function(t,o=0){b()&&(e(),o<=s1?R.current=setTimeout(t,o):function e(t,o,r){let i=r-Date.now();t.current=i<=s1?setTimeout(o,i):setTimeout(()=>e(t,o,r),s1)}(R,t,Date.now()+o))},clear:e,handleRef:R}},[])),E=(0,P.useRef)(""),[M,I]=(d=(0,P.useRef)(void 0!==i),p=(u=(0,P.useState)(n))[0],f=u[1],m=void 0!==i,g=d.current,d.current=m,!m&&g&&p!==n&&f(n),[m?i:p,(0,P.useCallback)(function(e){for(var t=arguments.length,o=Array(t>1?t-1:0),r=1;r<t;r++)o[r-1]=arguments[r];s&&s.apply(void 0,[e].concat(o)),f(e)},[s])]),O=l&&"object"==typeof l?l:{show:l,hide:l},{onFocus:z,onBlur:D,onClick:k}="function"!=typeof o?P.Children.only(o).props:{},G=(0,P.useCallback)(()=>{(x.clear(),E.current="show",O.show)?x.set(()=>{"show"===E.current&&I(!0)},O.show):I(!0)},[O.show,I,x]),N=(0,P.useCallback)(()=>{(x.clear(),E.current="hide",O.hide)?x.set(()=>{"hide"===E.current&&I(!1)},O.hide):I(!1)},[O.hide,I,x]),A=(0,P.useCallback)((...e)=>{G(),null==z||z(...e)},[G,z]),W=(0,P.useCallback)((...e)=>{N(),null==D||D(...e)},[N,D]),H=(0,P.useCallback)((...e)=>{I(!M),null==k||k(...e)},[k,I,M]),L=(0,P.useCallback)((...e)=>{s2(G,e,"fromElement")},[G]),F=(0,P.useCallback)((...e)=>{s2(N,e,"toElement")},[N]),B=null==e?[]:[].concat(e),U={ref:e=>{T(sV(e))}};return -1!==B.indexOf("click")&&(U.onClick=H),-1!==B.indexOf("focus")&&(U.onFocus=A,U.onBlur=W),-1!==B.indexOf("hover")&&(U.onMouseOver=L,U.onMouseOut=F),(0,r8.jsxs)(r8.Fragment,{children:["function"==typeof o?o(U):(0,P.cloneElement)(o,U),(0,r8.jsx)(sJ,{...c,show:M,onHide:N,flip:h,placement:a,popperConfig:r,target:_.current,children:t})]})},s3={},s6=document.createElement("canvas");s6.id="gk-graph-avatar-canvas";class s4 extends P.Component{image;constructor(e){super(e),this.image=new Image,this.image.crossOrigin="anonymous",this.image.onload=()=>this.refreshImage(),this.state={dataURL:void 0}}static getDerivedStateFromProps(e,t){return{dataURL:!e.url&&t.dataURL?void 0:t.dataURL}}componentDidMount(){let{url:e}=this.props;e&&this.startImgLoading(e)}componentDidUpdate(e){let{url:t}=this.props;t&&e.url!==t&&this.startImgLoading(t)}componentWillUnmount(){this.image=void 0}refreshImage(){let e;if(this.image){if(this.image.complete){let t=this.image.height,o=this.image.width,r=s6.getContext("2d");r.canvas.width=o,r.canvas.height=t,r.drawImage(this.image,0,0,o,t),e=s6.toDataURL(),s3[this.image.src]=e}this.setState({dataURL:e})}}startImgLoading(e){if(!this.image)return;let t=s3[e];t?this.setState({dataURL:t}):this.image.src=e}render(){let{avatarClassName:e,avatarStyle:t,children:o,className:r,context:i,enableTransparentBackground:n,style:s,height:l,hint:a,size:h,width:c}=this.props,{dataURL:d}=this.state,u=!d,p=u?s:{...s,...t,background:`url(${d}) 0% 0% / ${h}px no-repeat ${n?"":"var(--app__bg0, #1c1e23)"}`,height:l||h,width:c||h},f=L()(r,u?"":e,!u&&{avatar:!0}),m=u?P.createElement(P.Fragment,null,o):void 0;return P.createElement("div",{className:f,"data-test-class":d?"avatar":"local-avatar","data-vscode-context":tM(i),style:p,title:a},m)}}function s7({icon:e,tooltipClassName:t="",tooltipId:o,tooltipText:r}){return r&&o?P.createElement(s5,{delay:400,overlay:P.createElement(sz,{className:L()("gk-graph","bs-tooltip",t),id:o},r),placement:"top",trigger:["hover","focus"]},e||P.createElement("span",null)):P.createElement(P.Fragment,null," ",e||P.createElement("span",null)," ")}function s9({id:e,toolTipText:t,getExternalIcon:o,issueTrackerType:r}){return P.createElement(s7,{icon:o(`issue-${r}`),tooltipClassName:"wide pull-left",tooltipId:`issue-tooltip-${e}`,tooltipText:t?t.trim():""})}function s8({hostingServiceType:e,icon:t,id:o,toolTipText:r}){return P.createElement(s7,{icon:t,tooltipClassName:"wide pull-left",tooltipId:`pr-tooltip-${e}-${o}`,tooltipText:r?r.trim():""})}function le({icon:e,type:t,upstream:o,tooltipText:r}){return P.createElement(s7,{icon:e,tooltipClassName:"wide pull-left",tooltipId:`upstream-indicator-tooltip-${t}-${o}`,tooltipText:r})}function lt({avatarClassName:e,avatarUrl:t,context:o,icon:r,tooltipText:i}){return P.createElement(s7,{icon:P.createElement("span",{className:"ref-avatar"},P.createElement(s4,{avatarClassName:e,context:o,enableTransparentBackground:!0,size:14,url:t},r)),tooltipId:`remote-icon-${i||"tooltipText"}`,tooltipText:i})}function lo(e){switch(e){case"github":return"GitHub";case"githubEnterprise":return"GitHub Enterprise";case"gitlab":return"GitLab";case"gitlabSelfHosted":return"GitLab Self-Hosted";case"azureDevops":return"Azure DevOps";case"bitbucket":return"Bitbucket";case"bitbucketServer":return"Bitbucket Server";default:return e}}var lr=function({className:e,name:t}){return P.createElement("span",{className:L()("ref-name","truncate",e),style:{height:eL}},t)};function li(e,t,o,r=0){let i,n,s,{annotated:l,refType:a,message:h,name:c}=t;switch(a){case ec.REMOTE:{n=t.hostingServiceType?`${ec.REMOTE}-${t.hostingServiceType}`:ec.REMOTE,i=t.avatarUrl;let e=`${c} (${o("Ref-Remote")})`;s=t.owner?`${t.owner} -> ${e}`:e;break}case ec.TAG:n=ec.TAG,s=`${l&&h?h:c} (${o("Ref-Tag")})`;break;case ec.HEAD:default:{let e=null!=t.worktreeId;n=e?ec.WORKTREE:ec.HEAD,s=`${c} (${o(e?"Ref-Worktree":"Ref-Local")})`}}let d=t.context||void 0,u=P.createElement("span",{"data-vscode-context":tM(d)},e(n));return P.createElement(lt,{avatarUrl:i||"",context:d,icon:u,key:`ref-icon-${r}-${a}-${c}`,tooltipText:s})}class ln extends P.PureComponent{getContextForRefGroupIfExists(e,t,o){let r,i=!1,n=!1,s=!1;for(let l of e){if(l.refType===ec.HEAD)return o?l.contextGroup||t:l.context;l.refType===ec.REMOTE&&("origin"===l.owner?(i=!0,r=o?l.contextGroup||t:l.context):i||"upstream"!==l.owner?i||n||(s=!0,r=o?l.contextGroup||t:l.context):(n=!0,r=o?l.contextGroup||t:l.context)),i||n||s||(r=o?l.contextGroup||t:l.context)}return r}getDecoratedRefIcon(e,t,o,r,i){return P.createElement("div",{className:i,"data-vscode-context":tM(r),key:e,onClick:e=>this.onClickMetadata(e,o),onDoubleClick:e=>this.onDoubleClickMetadata(e,o)},t)}getPullRequestIconsAndTooltipsForRef(e,t,o){let r,{getExternalIcon:i,onMissingRefMetadata:n,translate:s}=this.props;if(!(r=t.refType===ec.HEAD?t.upstream?e?.[t.upstream.id]?.[tw]:null:tI(t,e,n,tw))||0===r.length)return null;let l=[];for(let e of r){let{context:r,hostingServiceType:n,id:a,title:h}=e;if(o.has(a))continue;o.add(a);let c={refId:t.id,type:tw,data:e},d=`pr-icon-${t.refType}-${t.name}-${a}`,u=this.getDecoratedRefIcon(d,i("pull-request"),c,r,L()("ref-pull-request"));l.push(P.createElement(s8,{hostingServiceType:n,icon:u,id:a,key:d,toolTipText:h&&""!==h.trim()?s("PullRequestIcon-Tooltip",a,h,lo(n)):""}))}return l}getUpstreamIndicatorIconsAndTooltipsForRef(e,t){let{getExternalIcon:o,onMissingRefMetadata:r,translate:i}=this.props,n=tI(t,e,r,tC);if(!n||0===n.ahead&&0===n.behind)return null;let s={refId:t.id,type:tC,data:n},l=n.ahead>0,a=n.behind>0,h=n.context;if(l||a){let e,r,c=l?`${n.ahead>99?"99+":n.ahead}`:"",d=a?`${n.behind>99?"99+":n.behind}`:"",u=`${n.owner}/${n.name}`;a&&l?(e=i("UpstreamIndicatorIcon-BehindAndAheadTooltip",d,c,u),r="ahead-behind"):a?(e=i("UpstreamIndicatorIcon-BehindTooltip",d,u),r="behind"):l&&(e=i("UpstreamIndicatorIcon-AheadTooltip",c,u),r="ahead");let p=P.createElement(P.Fragment,null,a?P.createElement(P.Fragment,null,P.createElement("span",{className:"ref-upstream-behind"},d),o("upstream-behind")):null,l?P.createElement(P.Fragment,null,P.createElement("span",{className:"ref-upstream-ahead"},c),o("upstream-ahead")):null);return P.createElement(le,{icon:this.getDecoratedRefIcon(`ref-upstream-${t.id}`,p,s,h,"ref-upstream"),tooltipText:e,type:r,upstream:u})}return null}getIssueIconsAndTooltipsForRef(e,t,o){let{getExternalIcon:r,onMissingRefMetadata:i,translate:n}=this.props,s=tI(t,e,i,tb);if(!s||0===s.length)return null;let l=[];for(let e of s){if(o.has(e.id))continue;let i={refId:t.id,type:tb,data:e};o.add(e.id);let s=P.createElement(s9,{getExternalIcon:r,id:e.id,issueTrackerType:e.issueTrackerType,key:`issue-icon-${e.id}`,toolTipText:e.title&&""!==e.title.trim()?n("IssueIcon-Tooltip",e.displayId,e.title):""}),a=e.context||void 0;l.push(this.getDecoratedRefIcon(`ref-issue-${e.id}`,s,i,a,L()("ref-issue")))}return l}onContextMenu=e=>{let{onContextMenu:t,refGroup:o,sha:r}=this.props;t(e,o,r)};onClick=e=>{let{onClick:t,refGroup:o,sha:r}=this.props;t(e,o,r)};onClickMetadata=(e,t)=>{e.stopPropagation();let{onClick:o,refGroup:r,sha:i}=this.props;o(e,r,i,t)};onDoubleClick=e=>{let{onDoubleClick:t,refGroup:o,sha:r}=this.props;t(e,o,r)};onDoubleClickMetadata=(e,t)=>{e.stopPropagation();let{onDoubleClick:o,refGroup:r,sha:i}=this.props;o(e,r,i,t)};render(){let{enableShowHideRefsOptions:e,hasActive:t,hasRefs:o,isActive:r,isGhostRef:i,getExternalIcon:n,groupIsHovered:s,isInUnsupportedRebase:l,onRefBeginDrag:a,onRefDragEnter:h,onRefDragLeave:c,onRefDrop:d,onRefCanDrag:u,onRefCanDrop:p,onRefEndDrag:f,isRefGroupIncluded:m,refGroup:g,refGroupContext:v,refIconsPosition:y,refMetadata:S,onHovered:w,onHideRefClick:C,sha:b,showRemoteNamesOnRefs:R,enabledRefMetadataTypes:_,translate:T,type:x,useColumnHeaderIcons:E}=this.props,M=e&&!t&&s&&!m,I=y===ed.LEFT,O=y===ed.RIGHT,z=L()("ref-node-wrapper","flex"),D=L()("ref-node","flex","items-center","p1",{"has-active":t,"dim-ref":!o&&s,"is-active":r}),k="";g.length>0&&(k=R&&g[0].fullName||g[0].name);let G=L()({"display-none":E&&!s&&O,mr1:O}),N=P.createElement(lr,{className:G,name:k}),A=[],W=[],H=[],F=null,B=new Set,U=new Set;g.forEach((e,t)=>{if(A.push(li(n,e,T,t)),_.includes(tb)&&(e.refType===ec.HEAD||e.refType===ec.REMOTE)){let t=this.getIssueIconsAndTooltipsForRef(S,e,U);t&&H.push(...t)}if(_.includes(tw)&&e.refType===ec.REMOTE){let t=this.getPullRequestIconsAndTooltipsForRef(S,e,B);t&&W.push(...t)}_.includes(tC)&&e.refType===ec.HEAD&&(F=this.getUpstreamIndicatorIconsAndTooltipsForRef(S,e))});let Z=P.createElement("span",{className:L()("flex","items-center","ref-icons",{"is-active":r,"is-left-position":I})},[...A,...W,...H]),j=r?P.createElement(s7,{icon:P.createElement("span",{className:L()("ref-icon-current")},n("check")),tooltipId:"ref-icon-current",tooltipText:T("Ref-Current")}):null,$=this.getContextForRefGroupIfExists(g,v),V=this.getContextForRefGroupIfExists(g,v,!0),K=M?P.createElement("span",{className:"flex ml-auto"},P.createElement(s7,{icon:P.createElement("span",{className:L()("mr1","button"),onClick:e=>C(e,g,b)},n("hide")),tooltipId:`ref-node-toggle-visibility-btn-${k}`,tooltipText:T("Hide")})):null;return P.createElement(Y,{canDrag:e=>u(e),canDrop:(e,t,o)=>p(e,t,o),className:z,"data-vscode-context":tM(V),dndData:{commitType:x,isGhostRef:i,isInUnsupportedRebase:l,refGroup:g,sha:b},dndId:`DndRefNode_${g[0].id}`,onBeginDrag:(e,t)=>a(e,t),onDragEnter:(e,t,o)=>h(e,t,o),onDragLeave:(e,t,o)=>c(e,t,o),onDrop:(e,t,o)=>d(e,t,o),onEndDrag:(e,t,o)=>f(e,t,o),style:{minWidth:0,marginLeft:3,height:eg}},P.createElement("span",{className:D,"data-test-class":"ref-node-span","data-vscode-context":tM($),onContextMenu:l?void 0:this.onContextMenu,onDoubleClick:l?void 0:this.onDoubleClick,onMouseDown:this.onClick,onMouseEnter:e=>w(e,g,b),style:{minWidth:"100%"}},j,I&&Z,N,O&&Z,F,K))}}class ls extends P.Component{headIconsRef=P.createRef();containerRef=P.createRef();popoverMenuTargetRef=P.createRef();constructor(e){super(e),this.state={showPopoverMenu:!1}}onHiddenRefsClick=e=>{let{showPopoverMenu:t}=this.state;e.stopPropagation(),this.setState({showPopoverMenu:!t})};onShowRefNodes=(e,t,o)=>{this.props.onToggleRefNodesShown(e,t,o),X(this.props.excludeRefsById)||this.setState({showPopoverMenu:!0})};compareGraphRefOpts(e,t){let o=e.name.localeCompare(t.name);return 0===o&&e.type===ec.REMOTE?-1:o}render(){let{columnSetting:e,enableResizer:t,enableShowHideRefsOptions:o,getExternalIcon:r,graphWidth:i,graphZones:n,graphZoneType:s,excludeRefsById:l,includeOnlyRefsById:a,isDraggable:h,onFilterColumnClick:c,onHover:d,onResize:u,onResizeEnd:p,onResizeFromPropChange:f,onResizeStart:m,onUnhover:g,onSettingsClick:v,rowsStatsLoading:y,settingsContext:S,showRemoteNamesOnRefs:w,translate:C}=this.props,{showPopoverMenu:b}=this.state,R=tB(s,n);if(!R)return null;let _=tA(s,n),T=R.currentWidth-te,x=`${s}-header`,E=tU(R),M=e?.isFilterable||!1,I=E&&(M||o),O=L()("columns-btn",{"small-btn":I}),z=null,D=null;if(s===to){let e=Object.entries(l),t=Object.values(a),i=t.length>0,n=i&&t.some(e=>e.type===ec.TAG),s=e.filter(e=>e[1].type===ec.TAG&&(!i||!n)||!a[e[0]]);s.length>0&&(D=s.sort((e,t)=>this.compareGraphRefOpts(e[1],t[1])).map((e,t)=>{let o=e[0],i=e[1];l[o].id=o;let n={name:i.name,refType:i.type,owner:i.owner,avatarUrl:i.avatarUrl},s=(w||"*"===n.name)&&n.refType===ec.REMOTE?`${n.owner}/${n.name}`:n.name;return P.createElement("li",{id:o,key:o,onClick:e=>this.onShowRefNodes(e,[l[o]],!0)},li(r,n,C,t),P.createElement("span",{className:"ml1 text-ellipsis"},s))}),z=o?P.createElement("div",{className:L()(O,"right","text-normal","button",b?"active":null),ref:this.popoverMenuTargetRef},P.createElement(s7,{icon:P.createElement("span",{onClick:this.onHiddenRefsClick},r("hide")),tooltipId:"header-ref-node-hidden-refs-btn",tooltipText:C("GraphHeader-HiddenRefs-btn")})):null)}let k=M?P.createElement("div",{className:L()(O,"columns-filter","right","fs-1",{filtering:e?.isFilterActive||!1})},P.createElement(s7,{icon:P.createElement("span",{className:"columns-filter-icon text-disabled hover-icon",id:`${s}-header-filter`,onClick:e=>c(e,s),style:{height:eQ,marginBottom:e0}},r("filter")),tooltipId:"header-columns-filter",tooltipText:C("GraphHeader-Filter")})):null,G=!E&&s===ta&&y?P.createElement("span",{className:L()(O,"spinner")},r("loading")):null,N=P.createElement(sJ,{container:this.containerRef.current,onHide:b?()=>{this.setState({showPopoverMenu:!1})}:void 0,placement:"bottom",rootClose:b,show:b,target:this.popoverMenuTargetRef.current},e=>P.createElement(sI,{className:L()({"is-last-header":_}),id:"opts-popover",...e},P.createElement("ul",null,D))),A=_&&v?P.createElement("div",{className:L()("columns-btn","columns-settings","right","fs-1"),"data-vscode-context":tM(S)},P.createElement(s7,{icon:P.createElement("span",{className:"columns-settings-icon text-disabled hover-icon",onClick:e=>v(e,i)},r("settings")),tooltipId:"header-columns-settings",tooltipText:C("GraphHeader-EditColumns")})):null,W=this.headIconsRef?.current?.clientWidth??0,H=P.createElement("div",{className:"header-columns-icons",ref:this.headIconsRef},A,G,k,z),F=E?P.createElement(P.Fragment,null,P.createElement("div",{className:L()(O,"justify-start",{ml1:!I}),style:{width:T-W},title:C(R.headerLabelUntranslated)},r(function(e){switch(e){case tr:return"graph";case to:return"branch";case ti:return"message";case tn:return"author";case ts:return"datetime";case tl:return"commit";case ta:return"changes";default:return}}(s))),H):P.createElement(P.Fragment,null,P.createElement("div",{className:"text-disabled text-ellipsis",style:{height:eQ,overflow:"hidden",width:T-W}},P.createElement("span",{className:"fs-1 ml1 font-monospace"},C(R.headerLabelUntranslated))),H),B=P.createElement("div",{onMouseEnter:d,onMouseLeave:g},N,F),U=L()("panel-bg0","graph-header",{"is-draggable":h,"is-last-header":_});return P.createElement("div",{className:U,id:x,key:x,ref:this.containerRef,style:{zIndex:2,transform:"translate3d(0, 0, 0)",..._?{minWidth:T}:{display:"flex",minWidth:R.currentWidth,width:R.currentWidth}}},_?B:P.createElement(iT,{className:U,enable:t,handleStyles:{right:{right:0}},height:eQ,id:`${s}HeaderColumn`,onResize:u?e=>u(R,e):void 0,onResizeEnd:p?e=>p(R,e):void 0,onResizeFromPropChange:f?e=>f(R,e):void 0,onResizeStart:m?e=>m(R,e):void 0,resizeContentClassName:"z1",resizeEdge:"right",resizeHandleClassName:"z2 border-right",style:{display:"flex"},translate:C,width:R.currentWidth,widthConstraints:tj(s,n,i)},B))}}class ll extends P.PureComponent{canDrag=!1;isDraggable=e=>this.canDrag&&e.props.isDraggable;isDroppable=(e,t)=>e.props.graphZoneType!==t?.props?.graphZoneType&&(!t||t.props.isDroppable);onDrop=(e,t)=>{this.props.onColumnReOrdered&&this.props.onColumnReOrdered(e.props.graphZoneType,t?t.props.graphZoneType:null)};onZoneHover=()=>{this.canDrag=!0};onZoneUnHover=()=>{this.canDrag=!1};render(){let{columnsSettings:e,dragAppendToContainer:t,enableResizer:o,enableShowHideRefsOptions:r,getExternalIcon:i,excludeRefsById:n,headerContext:s,includeOnlyRefsById:l,onFilterColumnClick:a,onPopupGraphHeaderContextMenu:h,onGraphZoneResize:c,onGraphZoneResizeEnd:d,onGraphZoneResizeFromPropChange:u,onSettingsClick:p,onToggleRefNodesShown:f,graphZones:m,repoPath:g,rowsStatsLoading:v,showRemoteNamesOnRefs:y,translate:S,width:w,height:C,settingsContext:b}=this.props,R=P.createElement("div",{className:"panel-bg0",style:{height:eQ,marginBottom:e0,marginLeft:-e8,minWidth:e8+te}});return P.createElement("div",{className:"graph-header flex","data-vscode-context":tM(s),onContextMenu:h?e=>h(e,w):void 0,onMouseDownCapture:this.props.onMouseDownCapture,onMouseMoveCapture:this.props.onMouseMoveCapture,onMouseUpCapture:this.props.onMouseUpCapture,onWheelCapture:this.props.onWheel,style:{height:eQ,marginBottom:e0}},R,P.createElement(iB,{className:"flex",direction:"horizontal",isDraggable:this.isDraggable,isDroppable:this.isDroppable,mirrorContainer:t,onDrop:this.onDrop},m.map(t=>P.createElement(ls,{columnSetting:e[t.type],enableResizer:o,enableShowHideRefsOptions:r,excludeRefsById:n,getExternalIcon:i,graphHeight:C,graphWidth:w,graphZones:m,graphZoneType:t.type,id:`${t.type}Header`,includeOnlyRefsById:l,isDraggable:t.isCustomizable,isDroppable:t.isCustomizable,key:`${t.type}Header`,onFilterColumnClick:a,onHover:this.onZoneHover,onResize:c,onResizeEnd:d,onResizeFromPropChange:u,onSettingsClick:p,onToggleRefNodesShown:f,onUnhover:this.onZoneUnHover,repoPath:g,rowsStatsLoading:v,settingsContext:b,showRemoteNamesOnRefs:y,translate:S}))))}}function la(e){let{constraints:{max:t,min:o},stats:{files:r,additions:i,deletions:n},getExternalIcon:s,isLastColumn:l,isRowSelected:a,verticalScrollWidth:h,zoneWidth:c}=e,d=i+n,u=Math.max(o,Math.min(t,d)),p=l?h+eX:eX;d<=u&&(p+=eX);let f=Math.max(eq,u/t*(c-52-p));return P.createElement("div",{className:L()("changes-zone",a?"selected":null)},P.createElement("span",{className:"changes-files",style:{width:52}},P.createElement("span",{className:"mr1"},s("files")),P.createElement("span",{className:"mr1"},r>999?"999+":r)),P.createElement("span",{className:"changes-bar",style:{width:f}},i?P.createElement("div",{className:"changes-sub-bar added",style:{width:i/d*f}}):null,n?P.createElement("div",{className:"changes-sub-bar deleted",style:{width:n/d*f}}):null))}let lh=P.createElement("div",{className:"color-strip height-100",style:{width:2}}),lc={},ld={};class lu extends P.PureComponent{render(){let e,t,{clearCurrentlyHoveredGraphCommit:o,children:r,column:i,columnForColoring:n,context:s,currentlyHoveredCommitSha:l,dimRowsOfSelectedCommit:a,getExternalIcon:h,graphZoneType:c,hasAvatars:d,highlightRowsOnRefHover:u,isDimmedMergeCommitRow:p,isHighlighted:f,isHovering:m,isLastColumn:g,isInUnsupportedRebase:v,isMissingHoveredRefGroup:y,isSelected:S,numGraphColumns:w,onContextMenu:C,onClickCommit:b,onDoubleClickCommit:R,rowContext:_,sha:T,showColorStrip:x,showConflictIcon:E,showTimeline:M,setAsCurrentlyHoveredGraphCommit:I,style:O,title:z,type:D,verticalScrollWidth:k,zoneWidth:G}=this.props,N=((t=lc[e=D+m.toString()])||(t=L()("graph-row-wrapper","grow-3","height-100","graph-zone-column","min-width-0","pb3","pointer","pt3","relative",D,{"is-hovering":m}),lc[e]=t),t),A=function(e,t,o,r,i,n=!1,s=!1,l=!1,a=!1){let h=`${e}${t}${r}${o}${n}${s}${l}${a}${i}`,c=ld[h];return c||(c=L()(`column-${t%i+1}`,"graph-row","height-100-percent","flex",e,{"is-selected":r},{"is-highlighted":o},{"dimmed-row":a&&!o||n&&(s||l)}),ld[h]=c),c}(D,n??i,f,S,w,y,u,a,p),W=M?P.createElement(iI,null):null;return P.createElement("div",{className:N,"data-vscode-context":tM(_),onContextMenu:v?void 0:e=>C(e,c,T),onDoubleClick:e=>R(e,c,T),onMouseDown:e=>b(e,c,T),onMouseEnter:e=>I(e,c,T,l),onMouseLeave:e=>o(e,c,T,l),style:O},W,P.createElement("div",{className:A,"data-vscode-context":tM(s)},x?lh:null,E?P.createElement("span",{className:L()("ml2")},h("warning")):null,P.createElement("span",{className:L()("graph-zone","width-100","flex-1"),style:{lineHeight:`${eg}px`,...g&&{width:G-k},...d&&{marginLeft:5}},title:z},r)))}}function lp(e){let t=(e||"").trim().toUpperCase();if(0===t.length)return"?";let o=t.split(" ");return 1===o.length?o[0][0]:o.length>1?o[0][0]+o[o.length-1][0]:"?"}function lf(e,t){return e&&t?`${e} <${t}>`:e||t||""}class lm extends P.Component{constructor(e){super(e),this.state={tooltipText:""}}getDefaultAvatar=(e,t,o)=>{var r;let{authorInitials:i,column:n,context:s,cssVariables:l,style:a,fontSize:h,minWidth:c,size:d,title:u=""}=this.props,p=void 0!==n&&l[ea(n)]||eu,f=("hsla"===(r=t4(p.trim())).type&&(r=t3(r)),(299*r.r+587*r.g+114*r.b)/1e3<128)?"#FFFFFF":"#000000",m={alignItems:"center",backgroundColor:p,backgroundSize:d,color:f,display:"flex",fontSize:`${h}px`,fontWeight:"bold",height:e,justifyContent:"center",minWidth:c,top:o,width:t,...a};return P.createElement("div",{className:this.getAvatarClassName(),"data-vscode-context":tM(s),style:m,title:u},i?i.toUpperCase():"")};ensureTooltipText=()=>{let{tooltip:e}=this.props;this.setState({tooltipText:"function"==typeof e?e():e})};getAvatarClassName(){return L()("avatar","gravatar","rad2",this.props.className)}render(){let{tooltipText:e}=this.state,{avatarUrl:t,context:o,style:r,height:i,minWidth:n,size:s,title:l="",tooltip:a,top:h,useAuthorInitialsForAvatars:c,width:d}=this.props,u=i||s,p=d||s,f=h||eR/2-u/2,m={top:f,minWidth:n,...r},g=this.getDefaultAvatar(u,p,f),v=c?g:P.createElement("span",null,P.createElement(s4,{avatarClassName:this.getAvatarClassName(),avatarStyle:m,context:o,height:u,hint:l,size:s,url:t,width:p},this.getDefaultAvatar(u,p,f)));return a?P.createElement(s5,{delay:250,onEnter:this.ensureTooltipText,overlay:P.createElement(sz,{className:"gk-graph",id:"graph-gravatar-tooltip"},e),placement:"top",trigger:["hover","focus"]},v):v}}let lg={type:s0().string,tooltip:s0().bool,as:s0().elementType},lv=P.forwardRef(({as:e="div",className:t,type:o="valid",tooltip:r=!1,...i},n)=>(0,r8.jsx)(e,{...i,ref:n,className:L()(t,`${o}-${r?"tooltip":"feedback"}`)}));lv.displayName="Feedback",lv.propTypes=lg;let ly=P.createContext({}),lS=P.forwardRef(({bsPrefix:e,type:t,size:o,htmlSize:r,id:i,className:n,isValid:s=!1,isInvalid:l=!1,plaintext:a,readOnly:h,as:c="input",...d},u)=>{let{controlId:p}=(0,P.useContext)(ly);return e=sb(e,"form-control"),(0,r8.jsx)(c,{...d,type:t,size:r,ref:u,readOnly:h,id:i||p,className:L()(n,a?`${e}-plaintext`:e,o&&`${e}-${o}`,"color"===t&&`${e}-color`,s&&"is-valid",l&&"is-invalid")})});lS.displayName="FormControl";let lw=Object.assign(lS,{Feedback:lv}),lC={ADDED:"added",DELETED:"deleted",MODIFIED:"modified",RENAMED:"renamed"};class lb extends P.Component{render(){let{fileDiffType:e,getExternalIcon:t,translate:o,noMargin:r}=this.props;if(!e)return null;let i=(e=>{switch(e){case lC.ADDED:return"added";case lC.MODIFIED:return"modified";case lC.DELETED:return"deleted";case lC.RENAMED:return"renamed";default:return null}})(e),n=(e=>{switch(e){case lC.ADDED:return"color-green";case lC.MODIFIED:return"color-orange";case lC.DELETED:return"color-red";case lC.RENAMED:return"color-blue";default:return null}})(e),s=(e=>{switch(e){case lC.ADDED:return"CommitDiffSection-FileAdded";case lC.MODIFIED:return"CommitDiffSection-FileModified";case lC.DELETED:return"CommitDiffSection-FileDeleted";case lC.RENAMED:return"CommitDiffSection-FileRenamed";default:return null}})(e),l=L()("fs-1",n,{mr1:!r});return P.createElement("span",{className:l,title:o(s)},i&&t(i))}}var lR=function({workDirStats:e,getExternalIcon:t,translate:o}){let{added:r,deleted:i,modified:n}=e,{g:s}=W;return r||i||n?P.createElement("span",{className:"wip-stats-pill"},r>0&&P.createElement("span",{className:"wip-stats-pill__item wip-stats-pill__item--added"},P.createElement(lb,{fileDiffType:s.ADDED,getExternalIcon:t,noMargin:!0,style:{},translate:o}),P.createElement("span",{className:"wip-stats-pill__count"},r)),n>0&&P.createElement("span",{className:"wip-stats-pill__item wip-stats-pill__item--modified"},P.createElement(lb,{fileDiffType:s.MODIFIED,getExternalIcon:t,noMargin:!0,style:{},translate:o}),P.createElement("span",{className:"wip-stats-pill__count"},n)),i>0&&P.createElement("span",{className:"wip-stats-pill__item wip-stats-pill__item--deleted"},P.createElement(lb,{fileDiffType:s.DELETED,getExternalIcon:t,noMargin:!0,style:{},translate:o}),P.createElement("span",{className:"wip-stats-pill__count"},i))):null};class l_ extends P.Component{textWidthRef=P.createRef();wrapperRef=P.createRef();static defaultProps={style:{},value:""};componentDidMount(){this.wrapperRef?.current&&(this.wrapperRef.current.style.width="0px")}componentDidUpdate(){this.textWidthRef?.current&&this.wrapperRef?.current&&(this.wrapperRef.current.style.width=`${Number(this.textWidthRef.current.offsetWidth)+35}px`)}componentWillUnmount(){this.props.onBlur&&this.props.onBlur()}onWipKeyDown(e){e.stopPropagation()}render(){let{clearCurrentlyHoveredGraphCommit:e,currentlyHoveredCommitSha:t,getExternalIcon:o,graphZoneType:r,isCommitting:i,isHovering:n,isSelected:s,onBlur:l,onClickCommit:a,onContextMenu:h,onFocus:c,onMessageChange:d,setAsCurrentlyHoveredGraphCommit:u,sha:p,style:f,translate:m,value:g,workDirStats:v}=this.props,y=L()("graph-zone-column","pt3","pb3","pointer","height-100-percent","grow-3","graph-row-wrapper",ei,{"is-hovering":n}),S=L()("column-1","graph-row","flex",{"is-selected":s}),w=P.createElement(lR,{getExternalIcon:o,translate:m,workDirStats:v}),C=P.createElement("div",{className:"work-dir-input",ref:this.wrapperRef},P.createElement(lw,{"data-test-class":"work-dir-input-field",disabled:i,onBlur:e=>l(e),onChange:e=>d(e.target.value),onContextMenu:e=>h(e,r,p),onFocus:e=>c(e),onKeyDown:e=>this.onWipKeyDown(e),placeholder:m("WorkDirMessageInput-WIPPlaceholder"),type:"text",value:g}),P.createElement("div",{className:"text-width","data-test-class":"work-dir-input-message",ref:this.textWidthRef},g));return P.createElement("div",{className:y,onMouseEnter:e=>u(e,r,p,t),onMouseLeave:o=>e(o,r,p,t),style:f},P.createElement("div",{className:S,"data-test-class":"work-dir-message-row-div",onMouseDown:e=>a(e,r,p),style:{position:"relative",width:"100%"}},C,w))}}function lT({hasRefs:e,isActiveSha:t,left:o,type:r,width:i}){let n=L()("ref-line","z4",{"is-active":t});return e&&[Q,et,ee].includes(r)?P.createElement("hr",{className:n,style:{left:o,width:i}}):null}function lx({graphZoneModeConstants:{RADIUS_DIFF_MERGE_NODE_COMMIT_NODE:e},hasRefs:t,isActiveSha:o,nodeOffset:r,type:i}){return P.createElement(lT,{hasRefs:t,isActiveSha:o,left:0,type:i,width:r+(i===et?e:0)})}function lE({className:e,marginLeft:t}){return P.createElement("div",{className:L()("app-bg0","absolute","left-0","right-0","bottom-0","top-0","pt3","pb3",e),style:{marginLeft:t}},P.createElement("div",{className:"commit-bg-color height-100-percent width-100-percent"}))}function lM({column:e,graphZoneModeConstants:{COMMIT_COLUMN_WIDTH:t,COMMIT_NODE_DIAMETER:o,COMMIT_ZONE_GUTTER_WIDTH:r}}){return P.createElement(lE,{className:"z1",marginLeft:r+t*e+o/2})}function lI(){return P.createElement(lE,{marginLeft:0})}let lO=(e,t,o,r,i,n,s=!1)=>{let l={height:n.COMMIT_MERGE_NODE_DIAMETER,left:o+n.COMMIT_MERGE_NODE_LEFT_OFFSET,marginTop:n.COMMIT_MERGE_NODE_TOP_OFFSET,opacity:r,width:n.COMMIT_MERGE_NODE_DIAMETER},a=L()("node",i,"z6"),h=P.createElement(sz,{className:"gk-graph",id:"graph-merge-node-tooltip"},lf(t,e)),c=P.createElement("div",{className:a,"data-test-class":"tree-row-commit-node",style:l});return s?c:P.createElement(s5,{delay:250,overlay:h,placement:"top",trigger:["hover","focus"]},c)};class lz extends P.PureComponent{render(){let{authorEmail:e,authorName:t,getExternalIcon:o,graphZoneModeConstants:r,left:i,opacity:n,suppressNonRefRowTooltips:s,translate:l,type:a}=this.props;return(t||e)&&a===Q?r.IS_COMPACT?lO(e,t,i,n,et,r,s):(({authorEmail:e,authorInitials:t,authorName:o,avatarUrl:r,column:i,context:n,cssVariables:s,graphZoneModeConstants:l,left:a,message:h,opacity:c,suppressNonRefRowTooltips:d,type:u,useAuthorInitialsForAvatars:p})=>P.createElement(lm,{authorInitials:t,avatarUrl:r,className:L()("node",u,"z6"),column:i,context:n,cssVariables:s,fontSize:10,height:l.COMMIT_NODE_DIAMETER,size:l.COMMIT_ZONE_AVATAR_DIAMETER,style:{left:a,opacity:c},tooltip:d?void 0:()=>{let t=o&&""!==o.trim()&&"Unknown"!==o?lf(o,e):e,r=ot(t8(h||"")),i="";if(0===r.length)i=t;else{r.unshift({email:e,name:o});for(let e=0;e<r.length;e+=1){let t=r[e];i+=lf(t.name,t.email),e<r.length-1&&(i+=", ")}}return i},top:l.COMMIT_NODE_TOP_OFFSET,useAuthorInitialsForAvatars:p,width:l.COMMIT_NODE_DIAMETER}))(this.props):a===et||a===ee||a===eo?lO(e,t,i,n,a,r,s):((e,t,o,r,i,n,s,l=!1,a,h=!1)=>{let c,d={height:a.COMMIT_NODE_DIAMETER,left:r,marginTop:a.COMMIT_NODE_TOP_OFFSET,opacity:i,width:a.COMMIT_NODE_DIAMETER};l&&(d.borderWidth=1);let u=L()("gk-graph","node",s,"z6",{compact:l});c=s===er?n("Stash"):s===ei?n("Graph-WorkInProgress"):lf(o,t);let p=P.createElement("div",{className:u,"data-test-class":"tree-row-commit-node",style:d},s!==er||l?null:P.createElement("span",null,e("stash"))),f=P.createElement(sz,{className:"gk-graph",id:"graph-other-node-tooltip"},c);return h?p:P.createElement(s5,{delay:250,overlay:f,placement:"top",trigger:["hover","focus"]},p)})(o,e,t,i,n,l,a,r.IS_COMPACT,r,s)}}class lD extends P.Component{render(){let{columnColorByColumn:e,edgeColumnMax:t,edges:o,nodeColumn:r,graphZoneModeConstants:{COMMIT_COLUMN_WIDTH:i,COMMIT_ZONE_GUTTER_WIDTH:n,COMMIT_ZONE_LINE_WIDTH:s,IS_COMPACT:l}}=this.props,a=function(e,t,o,r,i,n,s,l){let a=function(e,t,o,r){let i="";for(let n=0;n<=t;n++){let{passThrough:t,starting:s,ending:l}=e[n]??{};i=`${i}_${ou(n,o,s?.type,r)}_${ou(n,o,l?.type,r)}_${op(n,t?.type,r)}`}return i}(e,t,o,l),h=ox[a];if(h)return h;let c="";for(let a=0;a<=t;a+=1){let t=e[a];if(!t)continue;let{passThrough:h,starting:d,ending:u}=t;c+=d?function(e,t,o,r,i,n,s,l){var a,h;let c,d,u,p,f,m=ou(e,t,o,l),g=oT[m];return g?g:(g=t===e?(a=r[e],(c=od(o,a,s,l)).x1=ol(t,i,n,l),c.x2=ol(t,i,n,l),c.y1=eb/2,c.y2=eb,oc(c)):(h=r[e],d=od(o,h,s,l),u=t<e?-eT:eT,(p={...d}).x1=ol(e,i,n,l),p.x2=ol(e,i,n,l),p.y1=eb-ew,p.y2=eb,(f={...d}).x1=ol(e,i,n,l)+u,f.x2=ol(t,i,n,l),f.y1=eb/2,f.y2=eb/2,`<g>${ob(h,t<e?180:270,270*(t<e),o,ol(e,i,n,l)+u,eb-ew,s,l)}${oc(p)}${oc(f)}</g>`),oT[m]=g,g)}(a,o,d.type,r,i,n,s,l):"",c+=h?function(e,t,o,r,i,n,s){let l=op(e,t,s),a=o_[l];if(a)return a;let h=ol(e,r,i,s),c=od(t,o[e],n,s);return c.x1=h,c.x2=h,c.y1=0,c.y2=eb,a=oc(c),o_[l]=a,a}(a,h.type,r,i,n,s,l):"",c+=u?function(e,t,o,r,i,n,s,l){var a,h;let c,d,u,p,f,m=ou(e,t,o,l),g=oR[m];return g?g:(g=t===e?(a=r[e],(c=od(o,a,s,l)).x1=ol(t,i,n,l),c.x2=ol(t,i,n,l),c.y1=0,c.y2=eb/2,oc(c)):(h=r[e],d=od(o,h,s,l),u=t<e?-eT:eT,(p={...d}).x1=ol(e,i,n,l),p.x2=ol(e,i,n,l),p.y1=0,p.y2=eC,(f={...d}).x1=ol(e,i,n,l)+u,f.x2=ol(t,i,n,l),f.y1=eb/2,f.y2=eb/2,`<g>${oc(p)}${ob(h,t>e?0:90,t>e?90:180,o,ol(e,i,n,l)+u,eC,s,l)}${oc(f)}</g>`),oR[m]=g,g)}(a,o,u.type,r,i,n,s,l):""}return h=`url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><g>${c}</g></svg>')`,ox[a]=h,h}(o,t,r,e,i,n,s,l);return P.createElement("div",{className:"absolute top-0 right-0 bottom-0 left-0 z2",style:{background:a}})}}function lk({boxShadowAlpha:e,boxShadowLeft:t,children:o,className:r="",left:i,width:n}){return P.createElement("div",{className:L()("absolute","top-0","bottom-0","z3",r),style:{boxShadow:`${t}px 5px 10px rgba(0, 0, 0, ${e})`,left:i,width:n}},o)}function lG({boxShadowAlpha:e,hasTimeline:t,scrollLeft:o,width:r}){return P.createElement(lk,{boxShadowAlpha:e,boxShadowLeft:5,className:"app-bg0 left-0",left:o,width:r},t?P.createElement(iI,{z2:!0}):null)}function lN({boxShadowAlpha:e,commitZoneWidth:t,hasTimeline:o,scrollLeft:r,width:i}){return P.createElement(lk,{boxShadowAlpha:e,boxShadowLeft:-5,left:r+t-i,width:i},o?P.createElement(iI,{z2:!0}):null,P.createElement(lI,null))}class lA extends P.PureComponent{render(){let{authorEmail:e,authorName:t,avatarContext:o,avatarUrl:r,clearCurrentlyHoveredGraphCommit:i,column:n,columnColorByColumn:s,columnForColoring:l,commitZoneWidth:a,cssVariables:h,currentlyHoveredCommitSha:c,edgeColumnMax:d,edges:u,hasRefs:p,hasTimeline:f,getExternalIcon:m,graphZoneModeConstants:g,isActiveSha:v,isInUnsupportedRebase:y,isLastColumn:S,isSelected:w,leftGutterBoxShadowAlpha:C,leftGutterWidth:b,message:R,nodeOffset:_,nodeOpacity:T,numGraphColumns:x,onContextMenu:E,onClickCommit:M,onDoubleClickCommit:I,rightGutterBoxShadowAlpha:O,rightGutterWidth:z,rowContext:D,scrollLeft:k,setAsCurrentlyHoveredGraphCommit:G,sha:N,shouldShowRefLine:A,suppressNonRefRowTooltips:W,style:H,translate:F,type:B,useAuthorInitialsForAvatars:U,zoneContext:Z}=this.props,j=(l??n)%x+1,$=L()("relative","commit-zone","height-100-percent","pt3",B,`column-${j}`,{"is-selected":w,"has-active":v}),V=f?P.createElement(iI,{z2:!0}):null,K=P.createElement("div",{className:$,"data-vscode-context":tM(Z),onContextMenu:y?void 0:e=>E(e,tr,N),onDoubleClick:e=>I(e,tr,N),onMouseDown:e=>M(e,tr,N),onMouseEnter:e=>G(e,tr,N,c),onMouseLeave:e=>i(e,tr,N,c),style:{...H,...S&&{width:"100%"}}},V,P.createElement(lG,{boxShadowAlpha:C,hasTimeline:f,scrollLeft:k,width:b}),A?P.createElement(lx,{graphZoneModeConstants:g,hasRefs:p,isActiveSha:v,nodeOffset:_,type:B}):null,P.createElement(lz,{authorEmail:e,authorInitials:lp(t),authorName:t,avatarUrl:r,column:n,context:o,cssVariables:h,getExternalIcon:m,graphZoneModeConstants:g,left:_,message:R,opacity:T,suppressNonRefRowTooltips:W,translate:F,type:B,useAuthorInitialsForAvatars:U}),P.createElement(lM,{column:n,graphZoneModeConstants:g}),P.createElement(lD,{columnColorByColumn:s,edgeColumnMax:d,edges:u,graphZoneModeConstants:g,nodeColumn:n}),P.createElement(lN,{boxShadowAlpha:O,commitZoneWidth:a,hasTimeline:f,scrollLeft:k,width:z}));return D?P.createElement("div",{"data-vscode-context":tM(D)},K):K}}var lW=function(e,t){let{avatarUrlByEmail:o,onMissingAvatar:r,clearCurrentlyHoveredGraphCommit:i,columnColorByColumn:n,cssVariables:s,currentlyHoveredCommitSha:l,processedRows:a,getExternalIcon:h,graphZoneModeConstants:c,isInUnsupportedRebase:d,leftGutterBoxShadowAlpha:u,leftGutterWidth:p,onCommitContextMenu:f,onClickCommit:m,onDoubleClickCommit:g,nodeOffsetByColumn:v,nodeOpacityByColumn:y,numGraphColumns:S,rightGutterBoxShadowAlpha:w,rightGutterWidth:C,setAsCurrentlyHoveredGraphCommit:b,scrollLeft:R,shouldShowRefLine:_,suppressNonRefRowTooltips:T,translate:x,useAuthorInitialsForAvatars:E}=e,M=new tJ(e);return({rowIndex:e,style:I})=>{let O,z=t(e),D=a[e],k=M.getZoneWidth(tr),{email:G,author:N,contexts:A,message:W,sha:H,type:L}=D,F=D.column,B=A?.graph||void 0,U=A?.avatar||void 0,Z=A?.row||void 0;!E&&((O=o[G])||r(G,H));let j=M.isLastColumn(tr);return P.createElement(lA,{authorEmail:G,authorName:N,avatarContext:U,avatarUrl:O,clearCurrentlyHoveredGraphCommit:i,column:F,columnColorByColumn:n,columnForColoring:D.columnForColoring,commitZoneWidth:k,cssVariables:s,currentlyHoveredCommitSha:l,edgeColumnMax:D.edgeColumnMaxes,edges:D.edges,getExternalIcon:h,graphZoneModeConstants:c,hasRefs:D.hasRefs||!1,hasTimeline:M.hasTimeline(e),isActiveSha:M.rowContainsCurrentHeadRef(D),isInUnsupportedRebase:d,isLastColumn:j,isSelected:M.isSelected(e),key:z,leftGutterBoxShadowAlpha:u,leftGutterWidth:p,message:W,nodeOffset:v[F],nodeOpacity:y[F],numGraphColumns:S,onClickCommit:m,onContextMenu:f,onDoubleClickCommit:g,rightGutterBoxShadowAlpha:w,rightGutterWidth:C,rowContext:Z,scrollLeft:R,setAsCurrentlyHoveredGraphCommit:b,sha:H,shouldShowRefLine:_,style:I,suppressNonRefRowTooltips:T,translate:x,type:L,useAuthorInitialsForAvatars:E,zoneContext:B})}};let lH=P.forwardRef(({controlId:e,as:t="div",...o},r)=>{let i=(0,P.useMemo)(()=>({controlId:e}),[e]);return(0,r8.jsx)(ly.Provider,{value:i,children:(0,r8.jsx)(t,{...o,ref:r})})});lH.displayName="FormGroup";class lL extends P.PureComponent{handleClickOutside(){let{sha:e,shorthand:t,type:o,data:r}=this.props.createRefFormData;this.props.onCancel(t,e,o,r)}constructor(e){super(e);let{createRefFormData:t,formatRefShorthand:o}=this.props,{sha:r,shorthand:i,type:n,data:s}=t;this.state={currentShorthand:o(i,r,n,s),initShorthand:i}}static getDerivedStateFromProps(e,t){let{createRefFormData:o,formatRefShorthand:r}=e,{currentShorthand:i,initShorthand:n}=t,{sha:s,shorthand:l,type:a,data:h}=o,c=l!==n;return c&&r(l,s,a,h)!==i?{currentShorthand:r(l,s,a,h),initShorthand:l}:c?{currentShorthand:i,initShorthand:l}:null}onInputChange(e){let t=e||"";if(e){let{sha:e,type:o,data:r}=this.props.createRefFormData;t=this.props.formatRefShorthand(t,e,o,r)}this.setState({currentShorthand:t}),this.props.onRefShorthandChange?.(t)}render(){let{createRefFormData:e,isRefShorthandValid:t,onCancel:o,onContextMenu:r,onRefCreate:i,refZoneWidth:n,style:s,translate:l}=this.props,{currentShorthand:a}=this.state,{data:h,sha:c,type:d}=e,u=l(d===ec.TAG?"RefZone-EnterTagName":"RefZone-EnterBranchName");return P.createElement("div",{className:"create-ref","data-testid":"create-ref",style:{...s,minWidth:n,width:n}},P.createElement(lH,null,P.createElement(lw,{autoFocus:!0,"data-testid":"create-ref-form-control",isInvalid:a.length>0&&!t(a,c,d,h),onChange:e=>this.onInputChange(e.target?.value),onContextMenu:e=>r(e,a,c,d,h),onKeyDown:e=>{(e.stopPropagation(),"Escape"===e.key)?o(a,c,d,h):c&&"Enter"===e.key&&i(a,c,d,h)},placeholder:u,type:"text",value:a})))}}var lP=function({hasActive:e,overflowCount:t}){return P.createElement("span",{className:L()("overflow-count ml1",{"is-active":e}),"data-test-class":"overflow-count"},"+",t)},lF=function({style:e,children:t,column:o,numGraphColumns:r,onMouseEnter:i,onMouseLeave:n,ref:s,...l}){return P.createElement("div",{...l,className:L()("gk-graph","ref-zone","ref-popover",`column-${o%r+1}`),ref:s},P.createElement("ul",{onMouseEnter:i,onMouseLeave:n,style:{...e,listStyle:"none",padding:0,zIndex:6}},t))},lB=function({enabledRefMetadataTypes:e,column:t,columnForColoring:o,context:r,enableShowHideRefsOptions:i,targetRef:n,hasActive:s,hasRefs:l,getExternalIcon:a,includeOnlyRefsById:h,includeOnlyRemotesByName:c,isGhostRef:d,isHovered:u,isInUnsupportedRebase:p,numGraphColumns:f,onMissingRefMetadata:m,refGroupContexts:g,refGroupsByName:v,refIconsPosition:y,refMetadata:S,refNodeHovered:w,sha:C,showRemoteNamesOnRefs:b,showContextMenuForGroupedRef:R,onClickRef:_,onDoubleClickRef:T,onToggleRefNodesShown:x,onRefBeginDrag:E,onRefCanDrag:M,onRefCanDrop:I,onRefDragEnter:O,onRefDragLeave:z,onRefDrop:D,onRefEndDrag:k,translate:G,type:N,useColumnHeaderIcons:A}){let W=`ref-overlay-container-${(0,P.useId)()}`,H=(0,P.useCallback)((e,t,o)=>{x(e,t.map(e=>({id:tD(e),name:e.name,type:e.refType,owner:e.owner,avatarUrl:e.avatarUrl})),!1,o)},[x]),F=(0,P.useMemo)(()=>v&&v.length>eK?v.slice(0,eK):v,[v]),B=F.length>0?F[0]:null,U=(0,P.useMemo)(()=>u?F:B?[B]:[],[B,u,F]),Z=(0,P.useMemo)(()=>{let e=e$+(B?.length||0)*ej+(s?ej:0);return u?{height:100,position:"relative"}:{minWidth:e}},[B,s,u]),j=(0,P.useMemo)(()=>J(h,e=>e.type===ec.TAG),[h]),$=(0,P.useMemo)(()=>({enabledRefMetadataTypes:e,enableShowHideRefsOptions:i,getExternalIcon:a,groupIsHovered:u,hasActive:s,hasRefs:l,isGhostRef:d,isInUnsupportedRebase:p,onClick:_,onContextMenu:R,onDoubleClick:T,onHideRefClick:H,onHovered:w,onMissingRefMetadata:m,onRefBeginDrag:E,onRefCanDrag:M,onRefCanDrop:I,onRefDragEnter:O,onRefDragLeave:z,onRefDrop:D,onRefEndDrag:k,refIconsPosition:y,refMetadata:S,sha:C,showRemoteNamesOnRefs:b,translate:G,type:N,useColumnHeaderIcons:A}),[i,e,a,s,l,d,u,p,_,T,H,m,E,M,I,O,z,D,k,y,S,w,C,R,b,G,N,A]),V=(0,P.useMemo)(()=>U.map(e=>{let t=e[0],o=g?.[t.name]||void 0,r=e.some(e=>{let t=tD(e);switch(e.refType){case ec.TAG:return j&&!!h[t];case ec.REMOTE:return!!h[t]||e.owner&&c[e.owner];default:return!!h[t]}});return{...$,isActive:t.isCurrentHead,isRefGroupIncluded:r,key:`ref-node-${t.fullName||t.name}`,refGroup:e,refGroupContext:o}}),[$,j,h,c,g,U]);return P.default.createElement("span",{"data-vscode-context":tM(r),style:Z},P.default.createElement("div",{className:L()("ref-nodes-inline",{hidden:u})},V.map(e=>P.default.createElement(ln,{...e,key:e.key}))),P.default.createElement(sJ,{key:W,placement:"right-start",show:u,target:()=>n.current},P.default.createElement(lF,{column:o??t,numGraphColumns:f},V.map(e=>P.default.createElement("li",{key:e.key},P.default.createElement(ln,{...e,key:void 0}))))))};let lU={};class lZ extends P.default.PureComponent{popoverTargetRef=(0,P.createRef)();static defaultProps={style:{}};componentDidUpdate(e){!this.props.hasRefs&&this.props.isSingleSelected&&!e.isSingleSelected&&this.props.hoveredRefZoneSha===this.props.sha&&(this.props.refZoneUnhovered(),this.props.hoveredRefGroup&&this.props.refNodeUnhovered(void 0,this.props.hoveredRefGroup,this.props.sha))}onCustomToggleRefNodesShown=(e,t,o,r)=>{this.props.onToggleRefNodesShown(e,t,o,r),this.props.refZoneUnhovered()};render(){var e;let t,o,{enabledRefMetadataTypes:r,column:i,columnForColoring:n,context:s,enableShowHideRefsOptions:l,showGhostRefsOnRowHover:a,hasActive:h,hasRefs:c,hasTimeline:d,hoveredRefGroup:u,hoveredRefZoneSha:p,getExternalIcon:f,includeOnlyRefsById:m,includeOnlyRemotesByName:g,isInUnsupportedRebase:v,numGraphColumns:y,onClickRef:S,onDoubleClickRef:w,onMissingRefMetadata:C,onRefBeginDrag:b,onRefCanDrag:R,onRefCanDrop:_,onRefDragEnter:T,onRefDragLeave:x,onRefDrop:E,onRefEndDrag:M,refGroupContexts:I,refGroupsByName:O,refIconsPosition:z,refMetadata:D,refNodeHovered:k,refNodeUnhovered:G,refZoneHovered:N,refZoneUnhovered:A,sha:W,shouldShowRefLine:H,showColorStrip:F,showContextMenuForGroupedRef:B,showRemoteNamesOnRefs:U,style:Z,translate:j,type:$,useColumnHeaderIcons:V,width:K,clearCurrentlyHoveredGraphCommit:Y,currentlyHoveredCommitSha:q}=this.props,X=p===W,J={minWidth:K,width:K},Q={...Z,...J},ee=d?P.default.createElement(iI,null):null,et=O.length,eo=e=>{N(W),et?k(e,O[0],W):u&&G(e,u,W)},er=e=>{A(),u&&G(e,u,W),Y(e,to,W,q)},ei=tx((e,t)=>{er(e),b(e,t)}),en=et>0&&!c&&a,es=(e=n??i,(o=lU[t=`${$}${e}${X}${h}${y}${en}`])||(o=L()(`column-${e%y+1}`,"flex","pb3","pt3","ref-zone","relative",$,{"dim-ref":en,"has-active":h,z6:X,z1:!X}),lU[t]=o),o),el=P.default.createElement("div",{className:"color-strip height-100",style:{width:2}});if(!et)return P.default.createElement("div",{className:es,onMouseEnter:eo,onMouseLeave:er,onWheel:er,style:Q},F?el:null,ee);let ea=et-1,eh=ea>0&&!X?P.default.createElement(lP,{hasActive:h,overflowCount:ea}):null;return P.default.createElement("div",{className:es,onMouseEnter:eo,onMouseLeave:er,onWheel:er,style:Q},P.default.createElement("div",{ref:this.popoverTargetRef}),F?el:null,ee,P.default.createElement("div",{className:"flex",style:{minWidth:0,overflow:"hidden",width:K-eB}},P.default.createElement(lB,{column:i,columnForColoring:n,context:s,enabledRefMetadataTypes:r,enableShowHideRefsOptions:l,getExternalIcon:f,hasActive:h,hasRefs:c,includeOnlyRefsById:m,includeOnlyRemotesByName:g,isGhostRef:en,isHovered:X,isInUnsupportedRebase:v,numGraphColumns:y,onClickRef:S,onDoubleClickRef:w,onMissingRefMetadata:C,onRefBeginDrag:ei,onRefCanDrag:R,onRefCanDrop:_,onRefDragEnter:(e,t,o)=>{X||o?.sha!==W||eo(e),T(e,t,o)},onRefDragLeave:x,onRefDrop:E,onRefEndDrag:M,onToggleRefNodesShown:this.onCustomToggleRefNodesShown,refGroupContexts:I,refGroupsByName:O,refIconsPosition:z,refMetadata:D,refNodeHovered:k,sha:W,showContextMenuForGroupedRef:B,showRemoteNamesOnRefs:U,targetRef:this.popoverTargetRef,translate:j,type:$,useColumnHeaderIcons:V}),eh),c&&H?P.default.createElement("div",{className:"absolute left-0 flex z1",style:J},P.default.createElement(lT,{hasRefs:!0,isActiveSha:h,left:eF,type:$,width:"100%"})):null)}}class lj extends P.Component{static getDerivedStateFromProps(e,t){let o={},r=!1;return e.themeOpacityFactor!==t.themeOpacityFactor&&(o.themeOpacityFactor=e.themeOpacityFactor||e1.dark,r=!0),e.dimMergeCommits!==t.dimMergeCommits&&(o.dimMergeCommits=e.dimMergeCommits||!1,r=!0),e.highlightRowsOnRefHover!==t.highlightRowsOnRefHover&&(o.highlightRowsOnRefHover=e.highlightRowsOnRefHover||!1,r=!0),e.showGhostRefsOnRowHover!==t.showGhostRefsOnRowHover&&(o.showGhostRefsOnRowHover=e.showGhostRefsOnRowHover||!1,r=!0),e.showRemoteNamesOnRefs!==t.showRemoteNamesOnRefs&&(o.showRemoteNamesOnRefs=e.showRemoteNamesOnRefs||!1,r=!0),e.enabledRefMetadataTypes!==t.enabledRefMetadataTypes&&(o.enabledRefMetadataTypes=e.enabledRefMetadataTypes||[],r=!0),e.enabledScrollMarkerTypes!==t.enabledScrollMarkerTypes&&(o.enabledScrollMarkerTypes=e.enabledScrollMarkerTypes||[],r=!0),e.graphCommitDescDisplayMode!==t.graphCommitDescDisplayMode&&(o.graphCommitDescDisplayMode=e.graphCommitDescDisplayMode||tS.ALWAYS,r=!0),e.useAuthorInitialsForAvatars!==t.useAuthorInitialsForAvatars&&(o.useAuthorInitialsForAvatars=e.useAuthorInitialsForAvatars||!1,r=!0),e.shaLength!==t.shaLength&&(o.shaLength=e.shaLength,r=!0),e.hasMoreCommits!==t.hasMoreCommits&&(o.hasMoreCommits=e.hasMoreCommits||!1,r=!0),e.isLoadingRows!==t.isLoadingRows&&(o.isLoadingRows=e.isLoadingRows||!1,r=!0),e.rowsStatsLoading!==t.rowsStatsLoading&&(o.rowsStatsLoading=e.rowsStatsLoading||!1,r=!0),e.avatarUrlByEmail!==t.avatarUrlByEmail&&(o.avatarUrlByEmail=e.avatarUrlByEmail||{},r=!0),e.refMetadataById!==t.refMetadataById&&(o.refMetadataById=e.refMetadataById,r=!0),e.contexts!==t.contexts&&(o.contexts=e.contexts,r=!0),e.pendingCommitMessageSummary!==t.pendingCommitMessageSummary&&(o.pendingCommitMessageSummary=e.pendingCommitMessageSummary||"",r=!0),e.enableShowHideRefsOptions!==t.enableShowHideRefsOptions&&(o.enableShowHideRefsOptions=e.enableShowHideRefsOptions||!1,r=!0),e.createRefFormData!==t.createRefFormData&&(o.createRefFormData=e.createRefFormData,r=!0),e.highlightedShas!==t.highlightedShas&&(o.highlightedShas=e.highlightedShas,r=!0),e.workDirStats!==t.workDirStats&&(o.workDirStats=e.workDirStats||ty,r=!0),e.rowsStats!==t.rowsStats&&(o.rowsStats=e.rowsStats,r=!0),r?o:null}graphComponentRef=P.createRef();graphContainerRef=P.createRef();resizeObserver;lastNavSha=null;currentSha=null;isRefContextMenuShown=!1;isMounted=!1;selectedShas=new Set;selectionAnchorSha;selectionFocusSha;processedGraphRowBySha={};shaByRefId={};childrenBySha={};scrollToSha;headSha;headUpstreamSha;lastLazyLoadHeight=0;lastTopVisibleRowIndex=-1;lastBottomVisibleRowIndex=-1;maxColumns=0;orderedGraphRows=[];rowStatsConstraints={min:0,max:0};shouldFireShowMoreCommits=!0;columnsToFreeWhenFound={};hasMergeNodeChildBySha={};_autoLoadTimer;reserverInfoBySha={};columnsUsed={};rowsStats;workDirStats=ty;_markerColorsCache=null;excludeByType={};excludeRefsById={};includeOnlyRefsById={};excludeRemotesByName={};includeOnlyRemotesByName={};highlightedShas={};searchMode="normal";scrollLeft=0;scrollTop=0;graphHeight=585;graphWidth=804;graphZoneModeConstants=t$();graphZonesByType={};graphZoneOrdering=[to,tr,ti,tn,ta,ts,tl];clientHeight=0;missingAvatarsTimer;pendingMissingAvatars={};requestedMissingAvatars={};missingRefsMetadataTimer;pendingMissingRefsMetadata={};requestedMissingRefsMetadata={};branchUpstreamRowIndices=[];downstreamsByUpstream={};timelinesInterval;constructor(e){for(let[t,o]of(super(e),this.resizeObserver=new ResizeObserver(e=>e.forEach(e=>this.onGraphResized(e.contentRect.width,e.contentRect.height))),Object.entries(e.isSelectedBySha||{})))o&&(this.selectedShas.add(t),this.selectionAnchorSha=t,this.selectionFocusSha=t);this.excludeByType=this.props.excludeByType||{},this.excludeRefsById=this.props.excludeRefsById||{},this.excludeRemotesByName=this.getExcludeRemotesByName(),this.includeOnlyRemotesByName=this.getIncludeOnlyRemotesByName(),this.includeOnlyRefsById=this.props.includeOnlyRefsById||{},this.downstreamsByUpstream=this.props.downstreamsByUpstream||{},this.highlightedShas=this.props.highlightedShas||{},this.searchMode=this.props.searchMode||"normal",this.rowsStats=this.props.rowsStats||this.rowsStats,this.workDirStats=this.props.workDirStats||this.workDirStats,this.processRows(this.props.graphRows),this.cleanupSelections(),this.updateMarkerRowIndices(["selection","highlights"]);let t=eh(this.props.cssVariables);this.graphZoneModeConstants=t$(this.props.columnsSettings?.[tr]?.mode),this.maybeSortGraphZoneOrderingFromSettings(this.props.columnsSettings),this.state={avatarUrlByEmail:this.props.avatarUrlByEmail||{},contexts:this.props.contexts,createRefFormData:this.props.createRefFormData,cssVariablesWithDefaults:t,columnColorByColumn:this.getColumnColorByColumn(t),currentlyHoveredCommitSha:void 0,dimMergeCommits:this.props.dimMergeCommits||!1,dimRowsOfSelectedCommit:!1,enableShowHideRefsOptions:this.props.enableShowHideRefsOptions||!1,highlightRowsOnRefHover:this.props.highlightRowsOnRefHover||!1,showGhostRefsOnRowHover:this.props.showGhostRefsOnRowHover||!1,showRemoteNamesOnRefs:this.props.showRemoteNamesOnRefs||!1,enabledRefMetadataTypes:this.props.enabledRefMetadataTypes||[],enabledScrollMarkerTypes:this.props.enabledScrollMarkerTypes||[],graphCommitDescDisplayMode:this.props.graphCommitDescDisplayMode||tS.ALWAYS,graphZones:this.initializeGraphZones(this.props.columnsSettings,this.graphZoneOrdering,580),hasMoreCommits:this.props.hasMoreCommits||!1,height:this.graphHeight,highlightedShas:this.props.highlightedShas,hoveredRefGroup:void 0,hoveredRefZoneSha:void 0,isLoadingRows:this.props.isLoadingRows||!1,numGraphColumns:this.getNumGraphColumns(t),markerRowIndices:{},pendingCommitMessageSummary:this.props.pendingCommitMessageSummary||"",processedRows:[...this.orderedGraphRows],refIconsPosition:this.getRefIconsPositionOrDefault(this.props.refIconsPosition),refMetadataById:this.props.refMetadataById,rowsStats:this.rowsStats,rowsStatsLoading:this.props.rowsStatsLoading||!1,useAuthorInitialsForAvatars:this.props.useAuthorInitialsForAvatars||!1,scrollLeft:this.getScrollLeft(),scrollToAlignment:this.getScrollToAlignment(),scrollToIndex:this.getScrollToIndex(),scrollTop:this.getScrollTop(),shaLength:this.props.shaLength,themeOpacityFactor:this.props.themeOpacityFactor||e1.dark,width:this.graphWidth,workDirStats:this.workDirStats}}componentDidMount(){this.isMounted=!0,this.resizeObserver.observe(this.graphComponentRef.current),window.addEventListener("keydown",this.onWindowKeyDown),window.addEventListener("keyup",this.onWindowKeyUp),window.addEventListener("blur",this.onWindowBlur),this.selectedShas.size&&this.selectCommits([...this.selectedShas],!1,!0)}componentDidUpdate(e,t){let o=!1,r=!1,i={},n=!1;e.searchMode!==this.props.searchMode&&(this.searchMode=this.props.searchMode||"normal",r=!0,i.highlights=!0),e.highlightedShas!==this.props.highlightedShas&&(this.highlightedShas=this.props.highlightedShas||{},"filter"===this.searchMode&&(r=!0),i.highlights=!0),e.excludeByType!==this.props.excludeByType&&(this.excludeByType=this.props.excludeByType||{},this.props.graphRows?.length&&(r=!0)),e.excludeRefsById!==this.props.excludeRefsById&&(this.excludeRefsById=this.props.excludeRefsById||{},this.excludeRemotesByName=this.getExcludeRemotesByName(),this.props.graphRows?.length&&(r=!0)),e.includeOnlyRefsById!==this.props.includeOnlyRefsById&&(this.includeOnlyRefsById=this.props.includeOnlyRefsById||{},this.includeOnlyRemotesByName=this.getIncludeOnlyRemotesByName(),this.props.graphRows?.length&&(r=!0)),e.downstreamsByUpstream!==this.props.downstreamsByUpstream&&(this.downstreamsByUpstream=this.props.downstreamsByUpstream||{},this.props.graphRows?.length&&(r=!0));let s=!this.isSelectedByShaEqual(e.isSelectedBySha,this.props.isSelectedBySha);e.searchMode!==this.props.searchMode&&(n=!0);let l=null!=this.props.isSelectedBySha&&X(this.props.isSelectedBySha);if(this.processedGraphRowBySha&&(s||0===this.selectedShas.size&&l)){let e=this.props.isSelectedBySha?Object.keys(this.props.isSelectedBySha):[];this.selectCommits(e,!1,!0),s&&e.length>0?this.selectionAnchorSha=e[e.length-1]:s&&0===e.length&&(this.selectionAnchorSha=void 0)}if(e.isContainerWindowFocused!==this.props.isContainerWindowFocused&&this.dimRowsOfSelectedCommit(!1),e.graphRows!==this.props.graphRows||e.cssVariables!==this.props.cssVariables||r){this.cleanEdgeCaches(),this._markerColorsCache=null;let t=eh(this.props.cssVariables);n=!0,this.setState({columnColorByColumn:this.getColumnColorByColumn(t),cssVariablesWithDefaults:t,numGraphColumns:this.getNumGraphColumns(t)}),this.cleanupSelections(),o=!0,(this.props.graphRows?.length<e.graphRows?.length||r)&&(this.lastLazyLoadHeight=0)}if(e.workDirStats!==this.props.workDirStats&&(this.workDirStats=this.props.workDirStats||ty,(!tY(e.workDirStats)&&tY(this.props.workDirStats)||tY(e.workDirStats)&&!tY(this.props.workDirStats))&&(n=!0)),e.avatarUrlByEmail!==this.props.avatarUrlByEmail&&(this.requestedMissingAvatars={}),e.refIconsPosition!==this.props.refIconsPosition){let e=this.getRefIconsPositionOrDefault(this.props.refIconsPosition);this.state.refIconsPosition!==e&&this.setState({refIconsPosition:e})}if(e.refMetadataById!==this.props.refMetadataById&&(this.requestedMissingRefsMetadata={},i.pullRequests=!0),e.rowsStats!==this.props.rowsStats&&(this.rowsStats=this.props.rowsStats,this.updateRowStatsConstraints()),e.columnsSettings!==this.props.columnsSettings){if(this.props.columnsSettings?.[tr]?.mode!==e.columnsSettings?.[tr]?.mode){this.cleanEdgeCaches(),this.graphZoneModeConstants=t$(this.props.columnsSettings?.[tr]?.mode),this.updateCommitZoneContentWidthFromChange();let e=this.graphZonesByType[tr];e.currentWidth=e.contentWidth,e.preferredWidth=e.contentWidth,e.minimumWidth=this.graphZoneModeConstants.COMMIT_ZONE_VIEWPORT_WIDTH_MIN,e.showIconWidth=this.graphZoneModeConstants.COMMIT_ZONE_SHOW_ICON_WIDTH,this.loadEdgesBySha(),o=!0}this.props.columnsSettings&&(this.updateZonesFromSettings(this.props.columnsSettings),o=!0)}if(e.createRefFormData!==this.props.createRefFormData&&this.props.createRefFormData?.sha&&(this.selectCommits([this.props.createRefFormData?.sha],!1,!0),this.selectionAnchorSha=this.props.createRefFormData.sha),(e.hasMoreCommits!==this.props.hasMoreCommits||e.onShowMoreCommits!==this.props.onShowMoreCommits)&&this.loadMoreCommitsIfNecessary(this.graphHeight,this.state.hasMoreCommits),n){let e=Array.from(this.selectedShas),t=this.selectionFocusSha;this.processRows(this.props.graphRows);let o=eh(this.props.cssVariables);if(e.length>0){this.cleanupSelections();let o=[];for(let t of e){let e=this.processedGraphRowBySha[t];e?.hidden===!1&&(o.push(e),this.selectedShas.add(t))}if(o.length){if(t){let e=this.processedGraphRowBySha[t];e?.hidden===!1?this.selectionFocusSha=t:(this.selectionFocusSha=o[o.length-1].sha,this._selectionVersion++)}if(this.selectionAnchorSha&&this.selectionAnchorSha!==this.selectionFocusSha){let e=this.processedGraphRowBySha[this.selectionAnchorSha];(null==e||e.hidden)&&(this.selectionAnchorSha=this.selectionFocusSha)}this.props.onSelectGraphRows?.(o),this.updateMarkerRowIndices(["selection"])}else this.selectedShas.clear(),this.selectionFocusSha=void 0,this.selectionAnchorSha=void 0,this._selectionVersion++,this.props.onSelectGraphRows?.([]),this.updateMarkerRowIndices(["selection"])}this.setState({processedRows:[...this.orderedGraphRows],columnColorByColumn:this.getColumnColorByColumn(o)})}if(o){this.updateCommitZoneContentWidthFromChange();let e=this.getOrderedActiveGraphZones();this.expandLastZoneMinWidthForScrollbar(e),this.ensureZoneWidthsMatchGraphWidth(e,this.graphWidth),this.setState({graphZones:e})}let a=Object.keys(i);a.length&&this.updateMarkerRowIndices(a);let h=this.props.graphRows?.length!==e.graphRows?.length,c=this.state.hasMoreCommits!==t.hasMoreCommits,d=this.state.height!==t.height;(h||c||d||o)&&this.autoLoadToFillViewport(),h&&this.loadMoreCommitsIfNecessary(this.graphHeight,this.state.hasMoreCommits)}componentWillUnmount(){this.isMounted=!1,this.clearTimelinesInterval(),null!=this._pendingScrollUpdate&&(cancelAnimationFrame(this._pendingScrollUpdate),this._pendingScrollUpdate=void 0),null!=this._pendingRowsUpdate&&(cancelAnimationFrame(this._pendingRowsUpdate),this._pendingRowsUpdate=void 0),this._autoLoadTimer&&(clearTimeout(this._autoLoadTimer),this._autoLoadTimer=void 0),this._headerHoverRestoreTimer&&(clearTimeout(this._headerHoverRestoreTimer),this._headerHoverRestoreTimer=void 0),window.removeEventListener("keydown",this.onWindowKeyDown),window.removeEventListener("keyup",this.onWindowKeyUp),window.removeEventListener("blur",this.onWindowBlur),this.resizeObserver.disconnect()}focus(){this.graphContainerRef?.current?.focus()}getRefIconsPositionOrDefault(e){return e||ed.LEFT}onGraphVisibleRowsUpdatedThrottled=((e,t,o)=>{let r,i,n,s=!1,l=t;return(...a)=>{void 0!==o&&(i=new Date().getTime(),l=!r||i-r>l+o?o:t),n&&(clearTimeout(n),n=null),s?n=setTimeout(()=>{e(...a)},l):(e(...a),r=new Date().getTime(),s=!0,setTimeout(()=>{s=!1},l))}})(()=>this.onGraphVisibleRowsUpdated(),250,20);onBlurWipNodeInput=e=>{this.props.onBlurWipNodeInput?.(e)};onDoubleClickRef=(e,t,o,r)=>{this.props.onDoubleClickGraphRef?.(e,t,this.processedGraphRowBySha[o],r)};onFocusWipNodeInput=e=>{this.props.onFocusWipNodeInput?.(e)};onFilterColumnClick=(e,t)=>{this.props.onFilterColumnClick?.(e,t)};onCurrentlyHoveredGraphCommit=(e,t,o,r)=>{r!==o&&(this.props.onGraphRowHovered?.(e,t,this.processedGraphRowBySha[o]),this.setState({currentlyHoveredCommitSha:o}))};onClearCurrentlyHoveredGraphCommit=(e,t,o,r)=>{if(!r)return;let i=e.relatedTarget;if(i instanceof HTMLElement){let e=i.closest(".resizable-handle.horizontal");if(null!=e&&!e.closest(`#${to}-header`))return}if((i=e.currentTarget)instanceof HTMLElement){let t=i.getBoundingClientRect();if(e.clientY>=t.top&&e.clientY<=t.bottom)return}this.props.onGraphRowUnhovered?.(e,t,this.processedGraphRowBySha[o]),this.setState({currentlyHoveredCommitSha:void 0})};onGraphColumnReOrdered=(e,t)=>{let o=this.graphZoneOrdering.indexOf(e),r=t?this.graphZoneOrdering.indexOf(t):this.graphZoneOrdering.length-1;t&&o<r&&(r-=1),this.graphZoneOrdering.splice(o,1),this.graphZoneOrdering.splice(r,0,e);let i={};this.graphZoneOrdering.forEach((e,t)=>{this.graphZonesByType[e].order=t,i[e]=this.getGraphColumnSettingFromZoneType(this.graphZonesByType[e])}),this.setState({graphZones:this.initializeGraphZones(i,this.graphZoneOrdering,this.graphWidth)}),this.props.onGraphColumnsReOrdered&&this.props.onGraphColumnsReOrdered(i)};onGraphZoneResize=tx((e,t)=>{if(t?.width){let o=this.getOrderedActiveGraphZones();this.adjustResizedGraphZone(o,e,t,!1),this.setState({graphZones:o})}});onGraphZoneResizeEnd=tx((e,t)=>{if(t?.width){let o=this.getOrderedActiveGraphZones();this.adjustResizedGraphZone(o,e,t,!0),this.setState({graphZones:o})}this.props.onColumnResized&&this.props.onColumnResized(e.type,this.getGraphColumnSettingFromZoneType(this.graphZonesByType[e.type]))});onPopupGraphHeaderContextMenu=(e,t)=>{this.props.onPopupGraphHeaderContextMenu&&this.props.onPopupGraphHeaderContextMenu(e,t)};onSettingsClick=(e,t)=>{this.props.onSettingsClick&&(e.stopPropagation(),this.props.onSettingsClick(e,t))};onMessageChange=e=>{this.setState({pendingCommitMessageSummary:e}),this.props.onMessageChange&&this.props.onMessageChange(e)};onRefBeginDrag=(e,t)=>{this.props.onRefBeginDrag&&this.props.onRefBeginDrag(e,t)};onRefCanDrag=e=>!!this.props.onRefCanDrag&&this.props.onRefCanDrag(e);onRefCanDrop=(e,t,o)=>!!this.props.onRefCanDrop&&this.props.onRefCanDrop(e,t,o);onRefCreate=(e,t,o,r)=>{this.props.onRefCreate&&this.props.onRefCreate(e,t,o,r)};onRefCreateCancel=(e,t,o,r)=>{this.props.onRefCreateCancel&&this.props.onRefCreateCancel(e,t,o,r)};onRefCreateContextMenu=(e,t,o,r,i)=>{this.props.onRefCreateContextMenu&&this.props.onRefCreateContextMenu(e,t,o,r,i)};onRefDragEnter=(e,t,o)=>{this.props.onRefDragEnter&&this.props.onRefDragEnter(e,t,o)};onRefDragLeave=(e,t,o)=>{this.props.onRefDragLeave&&this.props.onRefDragLeave(e,t,o)};onRefDrop=(e,t,o)=>{this.props.onRefDrop&&this.props.onRefDrop(e,t,o)};onRefEndDrag=(e,t,o)=>{this.props.onRefEndDrag&&this.props.onRefEndDrag(e,t,o)};onZoneRowClick(e,t,o){if(0!==e.button)return;let{enableMultiSelection:r,shiftSelectMode:i}=this.props;if(r){let t=this.isMacOSPlatform();if(!t&&e.ctrlKey||t&&e.metaKey){if("topological"===i&&this.selectionAnchorSha&&this.selectionAnchorSha!==o){let e=this.getDirectTopologicalPathBetween(this.selectionAnchorSha,o);if(!e||1===e.length&&e[0]===o)return}this.selectionAnchorSha=o,this.selectCommits([o],!0,!1);return}if(e.shiftKey){if(this.selectionAnchorSha??=this.selectionFocusSha,!this.selectionAnchorSha){this.selectionAnchorSha=o,this.selectCommits([o],!1,!1);return}if(this.selectionAnchorSha!==o){let e=this.getShiftSelectRange(o,this.isCommitListFiltered()?"simple":i);if(e?.length)return void this.selectCommits(e,!1,!1)}}}this.selectionFocusSha=o,this.selectionAnchorSha=o,this.selectCommits([o],!1,!1)}getShiftSelectRange(e,t){if(!this.selectionAnchorSha||!this.processedGraphRowBySha[this.selectionAnchorSha]||!this.processedGraphRowBySha[e])return[e];if("simple"===t){let t=this.processedGraphRowBySha[this.selectionAnchorSha].rowIndex,o=this.processedGraphRowBySha[e].rowIndex,r=[],i=Math.min(t,o),n=Math.max(t,o);for(let e=i;e<=n;e++)this.orderedGraphRows[e]&&r.push(this.orderedGraphRows[e].sha);return r}return this.getTopologicalPathBetween(this.selectionAnchorSha,e)}getTopologicalPathBetween(e,t){let o=this.getDirectTopologicalPathBetween(e,t);if(o&&(o.length>1||1===o.length&&o[0]!==t))return o;let r=this.findNearestTopologicallyReachableCommit(e,t);if(r)return this.getDirectTopologicalPathBetween(e,r)}getDirectTopologicalPathBetween(e,t){if(e===t)return[e];let o=new Set,r=[],i=(e,t,n)=>{if(e===t)return r=[...n,t],!0;if(o.has(e))return!1;o.add(e);let s=this.processedGraphRowBySha[e];if(!s)return!1;let l=[...n,e];for(let e of s.parents||[])if(i(e,t,l))return!0;for(let o of this.childrenBySha[e]||[])if(i(o,t,l))return!0;return!1};if(i(e,t,[])&&this.hasOnlyTwoEndpoints(r,e,t))return r}findNearestTopologicallyReachableCommit(e,t){let o=this.processedGraphRowBySha[e]?.rowIndex,r=this.processedGraphRowBySha[t]?.rowIndex;if(void 0!==o&&void 0!==r)if(o>r)for(let t=r+1;t<this.orderedGraphRows.length;t++){let o=this.orderedGraphRows[t].sha,r=this.getDirectTopologicalPathBetween(e,o);if((r?.length??0)>1||r?.length===1&&r[0]===e)return o}else for(let t=r-1;t>=0;t--){let o=this.orderedGraphRows[t].sha,r=this.getDirectTopologicalPathBetween(e,o);if((r?.length??0)>1||r?.length===1&&r[0]===e)return o}}hasOnlyTwoEndpoints(e,t,o){if(e.length<=2)return!0;let r=new Set(e),i=0;for(let n of e){let e=n===t||n===o,s=this.processedGraphRowBySha[n];if(!s)continue;let l=s.parents||[],a=this.childrenBySha[n]||[],h=l.filter(e=>r.has(e)).length,c=a.filter(e=>r.has(e)).length;if((0===h||0===c)&&(i++,!e))return!1}return 2===i}onClickRef=(e,t,o,r)=>{this.onZoneRowClick(e,to,o),this.props.onClickGraphRef&&this.props.onClickGraphRef(e,t,this.processedGraphRowBySha[o],r),this.currentSha=o,this.loadSelectedGraphRow(this.currentSha),this.lastNavSha=null};onClickCommit=(e,t,o)=>{if(this.onZoneRowClick(e,t,o),this.props.onClickGraphRow){let r=this.processedGraphRowBySha[o];this.props.onClickGraphRow(e,t,r)}this.currentSha=o,this.loadSelectedGraphRow(this.currentSha),this.lastNavSha=null};onDoubleClickCommit=(e,t,o)=>{if(this.props.onDoubleClickGraphRow){let r=this.processedGraphRowBySha[o];this.props.onDoubleClickGraphRow(e,t,r)}};onWindowKeyUp=e=>{switch(e.key){case of.metaKey:this.isMacOSPlatform()&&this.dimRowsOfSelectedCommit(!1);break;case of.controlKey:this.isMacOSPlatform()||this.dimRowsOfSelectedCommit(!1)}};onWindowBlur=e=>{let{hoveredRefGroup:t,hoveredRefZoneSha:o}=this.state;t&&o&&this.onRefNodeUnhovered(e,t,o),this.onRefZoneUnhovered(),this.dimRowsOfSelectedCommit(!1)};onWindowKeyDown=e=>{switch(e.key){case of.metaKey:this.isMacOSPlatform()&&this.dimRowsOfSelectedCommit(!0);break;case of.controlKey:this.isMacOSPlatform()||this.dimRowsOfSelectedCommit(!0);break;default:this.state.dimRowsOfSelectedCommit&&this.dimRowsOfSelectedCommit(!1)}};onKeyUp=e=>{this.lastNavSha&&this.isNavigationKey(e.key)&&this.currentSha!==this.lastNavSha&&(this.loadSelectedGraphRow(this.currentSha),this.lastNavSha=null)};onKeyDown=e=>{if(null===this.lastNavSha&&this.isNavigationKey(e.key)&&(this.lastNavSha=this.currentSha),this.isMacOSPlatform()&&e.metaKey&&!e.ctrlKey&&!e.altKey)switch(e.key){case of.arrowUpKey:this.selectFirst(e.shiftKey);return;case of.arrowDownKey:this.selectLast(e.shiftKey);return}switch(e.key){case of.arrowUpKey:this.selectPrevious(e.shiftKey);break;case of.arrowDownKey:this.selectNext(e.shiftKey);break;case of.homeKey:this.selectFirst(e.shiftKey);break;case of.endKey:this.selectLast(e.shiftKey);break;case of.pageUpKey:this.selectPageUp(e.shiftKey);break;case of.pageDownKey:this.selectPageDown(e.shiftKey);break;case"H":case"h":this.selectHead(e.shiftKey)}};isNavigationKey(e){return[of.arrowUpKey,of.arrowDownKey,of.homeKey,of.endKey,of.pageUpKey,of.pageDownKey].some(t=>t===e)}loadSelectedGraphRow(e){let t=this.processedGraphRowBySha[e];t&&this.props.onLoadSelectedGraphRow&&this.props.onLoadSelectedGraphRow(t)}onRefNodeHovered=(e,t,o)=>{(!this.props.showGhostRefsOnRowHover||tq(this.selectedShas,o)||this.processedGraphRowBySha[o]?.hasRefs)&&(this.props.onGraphRefNodeHovered&&this.props.onGraphRefNodeHovered(e,t,this.processedGraphRowBySha[o]),this.setState({hoveredRefGroup:[...t]}))};onRefNodeUnhovered=(e,t,o)=>{this.isRefContextMenuShown||(this.props.onGraphRefNodeUnhovered&&this.props.onGraphRefNodeUnhovered(e,t,this.processedGraphRowBySha[o]),this.setState({hoveredRefGroup:void 0}))};onRefShorthandChange=e=>{let{createRefFormData:t}=this.state;this.setState({createRefFormData:{...t,shorthand:e}})};onRefZoneHovered=e=>{this.setState({hoveredRefZoneSha:e})};onRefZoneUnhovered=()=>{this.isRefContextMenuShown||this.setState({hoveredRefZoneSha:void 0})};onShowMoreCommits=()=>{this.props.onShowMoreCommits&&this.shouldFireShowMoreCommits&&(this.props.onShowMoreCommits(),this.shouldFireShowMoreCommits=!1,setTimeout(()=>{this.shouldFireShowMoreCommits=!0},250))};onScrollForZone=(e,t,o,r,i)=>{this.setScroll(e,t),this.props.onScrollForZone&&this.props.onScrollForZone(e,t),this.loadMoreCommitsIfNecessary(r,i)};hasUnfoundHighlightedCommits(){if(this.props.hasMoreSearchResults)return!0;for(let e in this.highlightedShas)if(e!==th&&null==this.processedGraphRowBySha[e])return!0;return!1}loadMoreCommitsIfNecessary(e,t){if(!this.props.onShowMoreCommits||!t||!e||e<0||!this.scrollTop||this.scrollTop<0||!this.orderedGraphRows?.length)return;let o=this.scrollTop+e,r=this.orderedGraphRows.length*em,i=this.isCommitListFiltered(),n=i?.8*r:r-ev;this.lastLazyLoadHeight>0&&o>=this.lastLazyLoadHeight&&this.lastLazyLoadHeight<n&&(this.lastLazyLoadHeight=0),o>n&&o>this.lastLazyLoadHeight&&(this.lastLazyLoadHeight=Math.min(o,r-1),(!i||this.hasUnfoundHighlightedCommits())&&this.onShowMoreCommits())}shouldAutoLoadToFillViewport(){return!!this.isCommitListFiltered()&&!!this.props.onShowMoreCommits&&!!this.state.hasMoreCommits&&!this.state.isLoadingRows&&!!this.orderedGraphRows?.length&&!!this.graphHeight&&!(this.graphHeight<=0)&&!!this.hasUnfoundHighlightedCommits()&&this.orderedGraphRows.length*em<=1.2*(this.graphHeight-ef)}autoLoadToFillViewport(){if(this.shouldAutoLoadToFillViewport()){if(!this.shouldFireShowMoreCommits){this._autoLoadTimer&&clearTimeout(this._autoLoadTimer),this._autoLoadTimer=setTimeout(()=>{this._autoLoadTimer=void 0,this.autoLoadToFillViewport()},300);return}this._autoLoadTimer&&clearTimeout(this._autoLoadTimer),this._autoLoadTimer=setTimeout(()=>{this.shouldAutoLoadToFillViewport()&&this.shouldFireShowMoreCommits&&this.onShowMoreCommits(),this._autoLoadTimer=void 0},100)}}onScrollToRowCausedUpdateForFirstColumn=(e,t)=>{let o={...t};if(e===tr&&t.scrollTop){let t=this.getHorizontalScrollHeight(e,this.state.cssVariablesWithDefaults);o.scrollTop-=t+ey}this.setScroll(e,o),this.props.onScrollToRowCausedUpdateForFirstColumn?.(e,o)};onCommitContextMenu=(e,t,o)=>{if(this.props.onRowContextMenu){let r=this.processedGraphRowBySha[o];this.props.onRowContextMenu(e,t,r)}};onRefContextMenu=(e,t,o)=>{if(this.props.onRefContextMenu){this.isRefContextMenuShown=!0,this.onRefZoneHovered(o);let r=this.processedGraphRowBySha[o];this.props.onRefContextMenu(e,t,r),setTimeout(()=>{this.isRefContextMenuShown=!1},250)}};isSelectedByShaEqual(e,t){if(null==e&&null==t)return!0;if(null==e||null==t)return!1;let o=Object.keys(e),r=Object.keys(t);if(o.length!==r.length)return!1;for(let r of o)if(!(r in t)||e[r]!==t[r])return!1;return!0}_pendingRowsUpdate;_selectionVersion=0;getCommits(e){let t=[];for(let o of e){let e=this.processedGraphRowBySha[o];null!=e&&t.push(e)}return t}selectCommits(e,t,o){let r=[];if(t){for(let t of e)this.selectedShas.has(t)?this.selectedShas.delete(t):null!=this.processedGraphRowBySha[t]&&this.selectedShas.add(t);for(let e of this.selectedShas){let t=this.processedGraphRowBySha[e];null!=t&&r.push(t)}}else if(1===e.length){let[t]=e,o=this.processedGraphRowBySha[t];null!=o?(this.selectedShas.clear(),this.selectedShas.add(t),r.push(o)):this.selectedShas.clear()}else{let t=[];for(let o of e){let e=this.processedGraphRowBySha[o];null!=e&&this.selectedShas.has(o)&&(t.push(o),r.push(e))}for(let e of(this.selectedShas.clear(),t))this.selectedShas.add(e)}return this._selectionVersion++,this.selectionFocusSha=e.length&&this.selectedShas.has(e[e.length-1])?e[e.length-1]:function(e){let t;for(t of e);return t}(this.selectedShas),this.selectionFocusSha&&this.selectSha(this.selectionFocusSha,o),this.props.onSelectGraphRows?.(r),this.updateMarkerRowIndices(["selection"]),null!=this._pendingRowsUpdate&&cancelAnimationFrame(this._pendingRowsUpdate),this._pendingRowsUpdate=requestAnimationFrame(()=>{this._pendingRowsUpdate=void 0,this.setState({processedRows:[...this.orderedGraphRows]})}),r}getCommitZoneContentWidthBetweenGutters(){return this.getCurrentWidthByZone(tr)-this.getLeftGutterWidth()-this.getRightGutterWidth()}getExcludeRemotesByName(){let e={};return Object.values(this.excludeRefsById).forEach(t=>{t.type===ec.REMOTE&&t.owner&&"*"===t.name&&(e[t.owner]=!0)}),e}getIncludeOnlyRemotesByName(){let e={};return Object.values(this.includeOnlyRefsById).forEach(t=>{t.type===ec.REMOTE&&t.owner&&"*"===t.name&&(e[t.owner]=!0)}),e}clearScrollToIndex=tx(()=>{this.isMounted&&this.setState({scrollToIndex:void 0})});getTopAndBottomVisibleRowIndex(){let{graphHeight:e,orderedGraphRows:t,scrollTop:o}=this,r=e||0;if(!r||!t?.length)return{top:-1,bottom:-1};let i=(r-ef)/em,n=o/em;return{top:Math.max(Math.floor(n),0),bottom:Math.min(Math.ceil(n+(i-1)),t.length-1)}}getOffsetSha(e,t,o,r){this._scrollToAlignmentOverride=void 0;let i=this.props.scrollRowPadding||0;if(!i||"none"===t||!this.graphHeight||!this.orderedGraphRows.length)return e;let n=this.processedGraphRowBySha[e]?.rowIndex??-1;if(-1===n)return e;let{top:s,bottom:l}=this.getTopAndBottomVisibleRowIndex();if(-1===s||-1===l||n>=s&&n<=l&&!r)return e;let a=Math.floor(Math.floor((this.graphHeight-ef)/em)/2);if(a<1)return e;let h=Math.min(i,a);return void 0===o||t!==o?e:"up"===t&&n<=s+h?(this._scrollToAlignmentOverride="start",this.orderedGraphRows[Math.max(n-h,0)].sha||e):"down"===t&&n>=l-h?(this._scrollToAlignmentOverride="end",this.orderedGraphRows[Math.min(n+h,this.orderedGraphRows.length-1)].sha||e):e}_pendingScrollUpdate;_lastSelectedRowIndex;_lastScrollDirection="none";_scrollToAlignmentOverride;selectSha(e,t=!1){let o=this.processedGraphRowBySha[e]?.column||0,r=this.getScrollLeft(),i=this.getCommitZoneContentWidthBetweenGutters(),n=this.getCurrentWidthByZone(tr),s=this.getCommitZoneContentWidth(),l=o*this.graphZoneModeConstants.COMMIT_COLUMN_WIDTH,a=r-this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH/3<=l,h=Math.max(0,s-n),c=a&&l<=r+i?r:q(l-i/2,0,h),d=this.processedGraphRowBySha[e]?.rowIndex,u=void 0!==d&&void 0!==this._lastSelectedRowIndex?d>this._lastSelectedRowIndex?"down":d<this._lastSelectedRowIndex?"up":"none":"none",p=t?this.getOffsetSha(e,u,this._lastScrollDirection,t):e;this.setScrollToSha(p,c),this._lastScrollDirection=u,void 0!==d&&(this._lastSelectedRowIndex=d),t&&this.props.hasMoreCommits&&void 0!==d&&this.orderedGraphRows.length-d<=ev/em&&this.loadMoreCommitsIfNecessary(this.graphHeight,this.props.hasMoreCommits),null!=this._pendingScrollUpdate&&cancelAnimationFrame(this._pendingScrollUpdate),this._pendingScrollUpdate=requestAnimationFrame(()=>{this._pendingScrollUpdate=void 0,this.setState({scrollToAlignment:this.getScrollToAlignment(),scrollToIndex:this.getScrollToIndex()},this.clearScrollToIndex)})}updateWidthByZone(e,t,o){let r=this.getOrderedActiveGraphZones(),i=this.graphZonesByType[t],n=tF(i,r,e);if(i.currentWidth=n,t===tr){let e=Math.max(0,this.getCommitZoneContentWidth()-i.currentWidth);this.getScrollLeft()>e&&this.setScrollLeft(e)}o&&(i.preferredWidth=n)}updateCommitZoneContentWidthFromChange(){let e=this.graphZonesByType[tr];if(!e.isHidden){let t=this.getOrderedActiveGraphZones(),o=this.getCommitZoneContentWidth();e.contentWidth=o,e.maximumWidth=o,e.currentWidth>o&&(e.currentWidth=tF(e,t,o)),this.setState({graphZones:t})}}getCurrentWidthByZone(e,t=!0){let o=t?this.getVerticalScrollWidth(tr,this.props.cssVariables,!0):0,r=this.graphZonesByType[e];return r&&!r.isHidden?r.currentWidth-o:0}getCommitZoneContentWidth(){return(this.maxColumns||1)*this.graphZoneModeConstants.COMMIT_COLUMN_WIDTH+2*this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH+2*this.graphZoneModeConstants.COMMIT_ZONE_PADDING_RIGHT}getCommitZoneWidth(e=!0){let t=e?this.getVerticalScrollWidth(tr,this.props.cssVariables,!0):0;if(this.graphZonesByType[tr])return this.graphZonesByType[tr].currentWidth-t;let{columnsSettings:o}=this.props;return o?.[tr]?o[tr].width-t:tg[tr].minimumWidth-t}getSingleColumnModeFactor(){let e=this.maxColumns,t=this.getCurrentWidthByZone(tr);return 1===e?0:q(1-(t-2*this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH-this.graphZoneModeConstants.COMMIT_ZONE_PADDING_RIGHT)/this.graphZoneModeConstants.COMMIT_COLUMN_WIDTH,0,1)}setClientHeight(e){this.clientHeight=e}getClientHeight(){return this.clientHeight}setScroll(e,t){this.setClientHeight(t.clientHeight),null!=t.scrollTop&&this.setScrollTop(t.scrollTop),e===tr&&null!=t.scrollLeft&&this.setScrollLeft(t.scrollLeft)}getNonAdjustedScrollLeft(){return this.scrollLeft}setScrollLeft(e){this.scrollLeft!==e&&(this.scrollLeft=e,this.setState({scrollLeft:e}))}getScrollLeft(){let e=this.getNonAdjustedScrollLeft();return this.getCommitZoneContentWidth()!==this.getCommitZoneWidth()?e:0}setScrollTop(e){this.scrollTop!==e&&(this.scrollTop=e,this.setState({scrollTop:e}),this.onGraphVisibleRowsUpdatedThrottled())}getScrollTop(){return this.scrollTop}getScrollToSha(){return this.scrollToSha}setScrollToSha(e,t){this.scrollToSha=e,this.setScrollLeft(t),this.onGraphVisibleRowsUpdated()}getScrollToIndex(){let e=this.getScrollToSha();if(e){let t=this.processedGraphRowBySha[e]?.rowIndex;return void 0===t?this.orderedGraphRows.findIndex(t=>t.sha===e):t}return -1}getScrollToAlignment(){if(void 0!==this._scrollToAlignmentOverride)return this._scrollToAlignmentOverride;let e=this.getClientHeight(),t=this.getScrollTop(),o=this.getScrollToIndex();if(o<0)return e7;let r=em+2,i=o*em;return i>=t-r&&i<t+e+r?e7:e9}getMinNodeOffset(){let e=this.getScrollLeft(),t=this.getSingleColumnModeFactor();return(1-t)*(e+2*this.graphZoneModeConstants.COMMIT_ZONE_PADDING_LEFT)+t*(e+this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH)}getHorizontalScrollHeight(e,t,o){return this.graphZonesByType[e]?tL(e,this.getOrderedActiveGraphZones(),this.orderedGraphRows,t,o):0}getVerticalScrollWidth(e,t,o){return this.graphZonesByType[e]?tP(e,this.getOrderedActiveGraphZones(),this.props.hasMoreCommits,this.props.isLoadingRows,this.graphHeight,this.orderedGraphRows,this.props.enabledScrollMarkerTypes?.length>0,t,o):0}getMaxNodeOffset(){let e=this.getCurrentWidthByZone(tr),t=this.getScrollLeft(),o=this.getSingleColumnModeFactor();return(1-o)*(e+t+(this.graphZoneModeConstants.COMMIT_ZONE_PADDING_RIGHT-this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH))+o*(t+this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH)}getAbsoluteNodeLeftByColumn(){let e={};for(let t=0;t<=this.maxColumns;t+=1)e[t]=this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH+this.graphZoneModeConstants.COMMIT_COLUMN_WIDTH*t;return e}getNodeOffsetByColumn(){let e=this.getMinNodeOffset(),t=this.getMaxNodeOffset(),o=this.getAbsoluteNodeLeftByColumn(),r={};return Object.keys(o).forEach(i=>{let n=o[i];r[i]=q(n,e,t)}),r}getMaxNodeLeft(){return this.getScrollLeft()+(this.getCurrentWidthByZone(tr)-this.graphZoneModeConstants.COMMIT_COLUMN_WIDTH-this.graphZoneModeConstants.COMMIT_ZONE_PADDING_RIGHT)}getMinNodeLeft(){let e=this.getScrollLeft(),t=this.getSingleColumnModeFactor();return e+this.graphZoneModeConstants.COMMIT_ZONE_PADDING_LEFT+t*this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH}getRightGutterSlideOutFactor(){let e=this.getCurrentWidthByZone(tr),t=this.getCommitZoneContentWidth(),o=this.getSingleColumnModeFactor();return q((e-(t-(this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH+this.graphZoneModeConstants.COMMIT_ZONE_PADDING_RIGHT)))/this.graphZoneModeConstants.COMMIT_COLUMN_WIDTH,0,1)+o/2}getNodeOpacityByColumn(){let e=this.getMinNodeLeft(),t=this.getMaxNodeLeft(),o=this.getAbsoluteNodeLeftByColumn(),r=this.getRightGutterSlideOutFactor(),i=this.getSingleColumnModeFactor(),n={};return Object.keys(o).forEach(s=>{let l=o[s],a=Math.min(l-(e-i*this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH),t+this.graphZoneModeConstants.COMMIT_COLUMN_WIDTH-(l+this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH*(1-r)));n[s]=eS+(1-eS)*Math.max(a/(this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH/2),i)}),n}getLeftGutterWidth(){let e=this.getSingleColumnModeFactor();return this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH+e*(this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH/2)}getRightGutterWidth(){return(1-this.getRightGutterSlideOutFactor())*this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH}getBoxShadowAlphaForGutter(e,t){return .4*(1-Math.max(e,t))}getLeftGutterBoxShadowAlpha(e){let t=this.getScrollLeft(),o=this.getSingleColumnModeFactor();return e*this.getBoxShadowAlphaForGutter(o,q(1-t/this.graphZoneModeConstants.COMMIT_COLUMN_WIDTH,0,1))}getRightGutterBoxShadowAlpha(e){let t=this.getSingleColumnModeFactor(),o=this.getRightGutterSlideOutFactor();return e*this.getBoxShadowAlphaForGutter(t,o)}updateMarkerRowIndices(e,t){this.isMounted&&this.setState(({markerRowIndices:o})=>{if(e.forEach(e=>o[e]=[]),e.includes("selection"))for(let e of this.selectedShas){let t=this.processedGraphRowBySha[e]?.rowIndex;void 0!==t&&o.selection.push(t)}let r=t?.searchMode??this.props.searchMode;if(e.includes("highlights")&&"filter"!==r)for(let e of Object.keys(t?.highlightedShas||this.state?.highlightedShas||this.props.highlightedShas||{})){let t=this.processedGraphRowBySha[e]?.rowIndex;void 0!==t&&o.highlights.push(t)}if(e.includes("pullRequests")){let e=t?.refMetadataById||this.state?.refMetadataById||this.props.refMetadataById||{};for(let t of Object.keys(e))if(e[t]?.[tw]?.length){let e=this.shaByRefId[t];if(null==e)continue;let r=this.processedGraphRowBySha[e]?.rowIndex;void 0!==r&&o.pullRequests.push(r)}}})}getMarkerColors(){if(this._markerColorsCache)return this._markerColorsCache;let e=getComputedStyle(this.graphComponentRef?.current||document.querySelector(".gk-graph")||document.documentElement),t={};for(let o of Object.values(tp)){let r=e.getPropertyValue(o.colorCssKey).trim();r&&(t[o.type]=r)}return this._markerColorsCache=t,t}initializeGraphZones(e,t,o){this.graphZonesByType={};let r=[],i=0;t.forEach((t,o)=>{let n=e?e[t]:void 0,s=tg[t],l=n?.width?n.width:s.minimumWidth,a={...s,type:t,currentWidth:l,preferredWidth:l,isHidden:n?.isHidden||!1,mode:n?.mode,order:s.isCustomizable&&n?.order!==void 0?n?.order:o};n?.isHidden||(i+=a.currentWidth),t===tr&&(a.contentWidth=this.getCommitZoneContentWidth(),a.minimumWidth=this.graphZoneModeConstants.COMMIT_ZONE_VIEWPORT_WIDTH_MIN,a.showIconWidth=this.graphZoneModeConstants.COMMIT_ZONE_SHOW_ICON_WIDTH,this.maxColumns>0&&(a.maximumWidth=a.contentWidth)),this.graphZonesByType[t]=a,a?.isHidden||r.push(a)});let n=r[r.length-1];if(n){let e=tG(this.props.cssVariables,!0),t=n.minimumWidth+e;(null==n.maximumWidth||n.maximumWidth>=t)&&(n.minimumWidth=t,null!=n.showIconWidth&&(n.showIconWidth+=e),r[r.length-1]=n)}for(r.forEach(e=>{let t=tF(e,r,e.currentWidth);t!==e.currentWidth&&(i-=e.currentWidth,e.currentWidth=t,i+=t)});i>o;){let e=tk(r);if(!e)break;let t=e.currentWidth,n=i-o,s=Math.max(e.minimumWidth,t-n),l=t-s;this.graphZonesByType[e.type].currentWidth=s,i-=l}if(i<o){let e=t[t.length-1],i=o-tN(r,e);this.graphZonesByType[e].currentWidth=i}return r}maybeSortGraphZoneOrderingFromSettings(e){this.graphZoneOrdering.every(t=>e?.[t]?.order!==void 0)&&this.graphZoneOrdering.sort((t,o)=>e[t].order<e[o].order?-1:+(e[t].order>e[o].order))}updateZonesFromSettings(e){let t=!1;this.graphZoneOrdering.forEach((o,r)=>{let i=this.graphZonesByType[o],n=e?.[i.type];n&&(n.isHidden!==i.isHidden&&(t=!0,i.type!==ta||n.isHidden||this.updateRowStatsConstraints()),i.isHidden=n.isHidden,i.order=i.isCustomizable&&n?.order!==void 0?n?.order:r,i.mode=n.mode,i.preferredWidth=n.width??i.preferredWidth,i.currentWidth=i.preferredWidth)}),t&&this.graphZoneOrdering.forEach(e=>{let t=this.graphZonesByType[e];t.currentWidth=t.minimumWidth})}getEdgeColumnMaxes(e){let t=0;return Object.keys(this.processedGraphRowBySha[e]?.edges||{}).forEach(e=>{t=Math.max(t,parseInt(e,10))}),t}getEndingAndPassThroughEdgesByColumnFromPrevRow(e,t){let o,r,i,n,s={};return Object.keys(t).forEach(l=>{r=(o=t[l]).passThrough,i=o.starting,(n=r&&!t7(r.type)?r:i&&!t7(i.type)?i:r||i||void 0)&&(n.parentSha===e.sha?s[l]={ending:n}:s[l]={passThrough:n})}),s}getFinalEdgeStateForGraphAndRow(e,t){let o=this.getEndingAndPassThroughEdgesByColumnFromPrevRow(e,t),r=this.getStartingEdgesByColumn(e);return Object.keys(r).forEach(e=>{o[e]||(o[e]={ending:void 0,passThrough:void 0,starting:void 0}),o[e].starting=r[e]}),o}loadEdgesBySha(){this.maxColumns=0,this.isCommitListFiltered()||this.orderedGraphRows.forEach((e,t)=>{let o=this.orderedGraphRows[t-1],r=o&&this.processedGraphRowBySha[o.sha]?.edges?this.processedGraphRowBySha[o.sha].edges:{};this.processedGraphRowBySha[e.sha].edges=this.getFinalEdgeStateForGraphAndRow(e,r);let i=this.getEdgeColumnMaxes(e.sha);this.processedGraphRowBySha[e.sha].edgeColumnMaxes=i,i>this.maxColumns&&(this.maxColumns=i)})}processRows(e){this.loadRowsbySha(e||[]),this.loadEdgesBySha()}getStartingEdgesByColumn(e){let t={},o=e.parents;if(o.length>0){let r=e.type,i=this.processedGraphRowBySha[e.sha]?.column;void 0!==i&&(t[i]={parentSha:o[0],type:r});for(let e=1;e<o.length;e+=1){let i=o[e],n=this.processedGraphRowBySha[i]?.column;void 0!==n&&(t[n]={parentSha:i,type:r})}}return t}formatCommitDateTimeCallback=(t,o)=>this.props.formatCommitDateTime?this.props.formatCommitDateTime(t,o):function(t,o,r,i=!0){o=o??void 0;let n=`${(void 0)??""}:${o}`,s=oi.get(n);if(null==s){let t=function(e){if(null==e)return{localeMatcher:"best fit",dateStyle:"full",timeStyle:"short"};let t=or.exec(e);if(t?.groups!=null){let{dateStyle:e,timeStyle:o}=t.groups;return{localeMatcher:"best fit",dateStyle:e||"full",timeStyle:o||void 0}}let o={localeMatcher:"best fit"};for(let{groups:t}of e.matchAll(oo))if(null!=t)for(let e in t){let r=t[e];if(null!=r)switch(e){case"year":o.year=4===r.length?"numeric":"2-digit";break;case"month":switch(r.length){case 4:o.month="long";break;case 3:o.month="short";break;case 2:o.month="2-digit";break;case 1:o.month="numeric"}break;case"day":"DD"===r?o.day="2-digit":o.day="numeric";break;case"weekday":switch(r.length){case 4:o.weekday="long";break;case 3:o.weekday="short";break;case 2:o.weekday="narrow"}break;case"hour":o.hour=2===r.length?"2-digit":"numeric",o.hour12="hh"===r||"h"===r;break;case"minute":o.minute=2===r.length?"2-digit":"numeric";break;case"second":o.second=2===r.length?"2-digit":"numeric";break;case"fractionalSecond":o.fractionalSecondDigits=3;break;case"dayPeriod":o.dayPeriod="narrow",o.hour12=!0,o.hourCycle="h12";break;case"timeZoneName":o.timeZoneName=2===r.length?"long":"short"}}return o}(o);s=new Intl.DateTimeFormat(e,t),i&&oi.set(n,s)}if(null==o||or.test(o))return s.format(t);let l=s.formatToParts(t);return o.replace(oo,(o,r,n,s,a,h,c,d,u,p,f,m,g,v,y)=>{if(null!=r)return r.substring(1,r.length-1);for(let o in y){let r=y[o];if(null==r)continue;let n=l.find(e=>e.type===o);if("Do"===r&&n?.type==="day")return function(e){let t=e%100;return`${e}${on[(t-20)%10]??on[t]??on[0]}`}(Number(n.value));if("a"===r&&n?.type==="dayPeriod"){let o=(function(t){let o=`${(void 0)??""}:time:${t}`,r=oi.get(o);null==r&&(r=new Intl.DateTimeFormat(e,{localeMatcher:"best fit",timeStyle:t}),i&&oi.set(o,r));return r})("short").formatToParts(t).find(e=>"dayPeriod"===e.type);return` ${(o??n)?.value??""}`}return n?.value??""}return""})}(t,ek);formatCommitMessageCallback=e=>this.props.formatCommitMessage?.(e)??{summary:e};formatRefShorthandCallback=(e,t,o,r)=>this.props.formatRefShorthand?this.props.formatRefShorthand(e,t,o,r):e.replace(/\s/g,"");isRefShorthandValidCallback=(e,t,o,r)=>!this.props.isRefShorthandValid||this.props.isRefShorthandValid(e,t,o,r);translateCallback=(e,...t)=>this.props.translate?this.props.translate(e,...t):om[e]?function(e,t){if(0===t.length)return e;let o=e;return t.forEach((e,t)=>{let r=RegExp(`\\{${t}\\}`,"g");o=o.replace(r,e)}),o}(om[e],t):e;getIconCallback=e=>{let t=this.props.getExternalIcon?.(e);return t||P.createElement("span",null)};onMissingAvatar=(e,t)=>{this.props.onEmailsMissingAvatarUrls&&!this.requestedMissingAvatars[e]&&(this.pendingMissingAvatars[e]=t,this.missingAvatarsTimer&&(clearTimeout(this.missingAvatarsTimer),this.missingAvatarsTimer=void 0),this.missingAvatarsTimer=setTimeout(()=>{if(!this.isMounted)return;let e={...this.pendingMissingAvatars};this.pendingMissingAvatars={};let t=Object.keys(e);if(t.length){for(let e of t)this.requestedMissingAvatars[e]=!0;this.props.onEmailsMissingAvatarUrls?.(e)}},100))};onMissingRefMetadata=(e,t)=>{if(!this.props.onRefsMissingMetadata||this.requestedMissingRefsMetadata[e])return;let o=this.pendingMissingRefsMetadata[e]||[],r=t.filter(e=>!o.includes(e));this.pendingMissingRefsMetadata[e]=[...o,...r],this.missingRefsMetadataTimer&&(clearTimeout(this.missingRefsMetadataTimer),this.missingRefsMetadataTimer=void 0),this.missingRefsMetadataTimer=setTimeout(()=>{if(!this.isMounted)return;let e={...this.pendingMissingRefsMetadata};this.pendingMissingRefsMetadata={};let t=Object.keys(e);if(t.length){for(let e of t)this.requestedMissingRefsMetadata[e]=!0;this.props.onRefsMissingMetadata?.(e)}},100)};selectNext(e){let t;if(e&&"normal"===this.searchMode&&this.selectionFocusSha){let e=this.processedGraphRowBySha[this.selectionFocusSha];e?.parents?.length&&(t=e.parents[0])}else{let e=Math.min((this.selectionFocusSha?this.processedGraphRowBySha[this.selectionFocusSha]?.rowIndex??-1:-1)+1,this.orderedGraphRows.length-1);t=this.orderedGraphRows[e]?.sha}this.currentSha=t||null,t&&(this.selectCommits([t],!1,!0),this.selectionAnchorSha=t)}selectPrevious(e){let t;if(e&&"normal"===this.searchMode&&this.selectionFocusSha){let e=this.childrenBySha[this.selectionFocusSha];if(e?.length){for(let o=0;o<e.length;o+=1)if(o===e.length-1)t=e[o];else if(this.processedGraphRowBySha[e[o]]?.type!==er){t=e[o];break}}}else{let e=Math.max(-1,(this.selectionFocusSha?this.processedGraphRowBySha[this.selectionFocusSha]?.rowIndex??-1:-1)-1);t=this.orderedGraphRows[e]?.sha,e<0&&(t=this.orderedGraphRows[0]?.sha)}this.currentSha=t||null,t&&(this.selectCommits([t],!1,!0),this.selectionAnchorSha=t)}selectHead(e){let t=null;e&&this.headUpstreamSha?t=this.headUpstreamSha:this.headSha&&(t=this.headSha),this.currentSha=t||null,t&&(this.selectCommits([t],!1,!0),this.selectionAnchorSha=t)}selectFirst(e){if(!this.orderedGraphRows.length)return;let t=this.orderedGraphRows[0]?.sha;this.currentSha=t||null,t&&(this.selectCommits([t],!1,!0),e||(this.selectionAnchorSha=t))}selectLast(e){if(!this.orderedGraphRows.length)return;let t=this.orderedGraphRows.length-1,o=this.orderedGraphRows[t]?.sha;this.currentSha=o||null,o&&(this.selectCommits([o],!1,!0),e||(this.selectionAnchorSha=o))}selectPageUp(e){if(!this.orderedGraphRows.length)return;let t=Math.max(1,Math.floor(this.getClientHeight()/em)-1),o=Math.max(0,(this.selectionFocusSha?this.processedGraphRowBySha[this.selectionFocusSha]?.rowIndex??-1:-1)-t),r=this.orderedGraphRows[o]?.sha;this.currentSha=r||null,r&&(this.selectCommits([r],!1,!0),e||(this.selectionAnchorSha=r))}selectPageDown(e){if(!this.orderedGraphRows.length)return;let t=Math.max(1,Math.floor(this.getClientHeight()/em)-1),o=this.selectionFocusSha?this.processedGraphRowBySha[this.selectionFocusSha]?.rowIndex??-1:-1,r=Math.min(this.orderedGraphRows.length-1,o+t),i=this.orderedGraphRows[r]?.sha;this.currentSha=i||null,i&&(this.selectCommits([i],!1,!0),e||(this.selectionAnchorSha=i))}getAvailableColumnAndUseIt(){let e=0;for(;this.columnsUsed[e];)e+=1;return this.columnsUsed[e]=!0,e}getColumns(e){let t,o;this.hasMergeNodeChildBySha[e.sha]&&delete this.hasMergeNodeChildBySha[e.sha];let r=e.parents||[],i=this.columnsToFreeWhenFound[e.sha];if(void 0!==i)for(let e=0;e<i.length;e+=1)delete this.columnsUsed[i[e]];let n=0,s=this.reserverInfoBySha[e.sha];s?.column!==void 0?(n=s.column,delete this.reserverInfoBySha[e.sha]):n=this.getAvailableColumnAndUseIt();for(let i=0;i<r.length;i+=1)if(t=r[i],e.type===et&&(this.hasMergeNodeChildBySha[t]=!0),o=this.reserverInfoBySha[t],0===i&&o?.column!==void 0&&o?.column!==n){let r=this.columnsToFreeWhenFound[t]||[],i=o?.type===er&&e.type!==er&&s?.newestDate>o?.newestDate;(o?.column>n||i)&&!this.hasMergeNodeChildBySha[t]?(this.reserverInfoBySha[t]={type:e.type,newestDate:s?.newestDate,column:n},r.push(o.column)):r.push(n),this.columnsToFreeWhenFound[t]=r}else o?.column===void 0&&(this.reserverInfoBySha[t]={type:e.type,newestDate:s?.column===n?s?.newestDate:e.date,column:0===i?n:this.getAvailableColumnAndUseIt()});return n}getFilteredHeadsForGraphRow(e,t){return e.heads.filter(e=>e.isCurrentHead||(t?void 0!==this.includeOnlyRefsById[tz(ec.HEAD,e)]:!this.excludeByType.heads&&void 0===this.excludeRefsById[tz(ec.HEAD,e)]))}getFilteredRemotesForGraphRow(e,t){return e.remotes.filter(e=>t?void 0!==this.includeOnlyRefsById[tz(ec.REMOTE,e)]||!e.owner||void 0!==this.includeOnlyRemotesByName[e.owner]:(!this.excludeByType.remotes||e.owner&&this.downstreamsByUpstream[`${e.owner}/${e.name}`]?.length>0)&&void 0===this.excludeRefsById[tz(ec.REMOTE,e)]&&(!e.owner||void 0===this.excludeRemotesByName[e.owner]))}getFilteredTagsForGraphRow(e,t,o){let r=t&&J(this.includeOnlyRefsById,e=>e.type===ec.TAG),i=t&&(this.getFilteredHeadsForGraphRow(e,t).length>0||this.getFilteredRemotesForGraphRow(e,t).length>0);return e.tags.filter(e=>r?void 0!==this.includeOnlyRefsById[tz(ec.TAG,e)]:!this.excludeByType.tags&&void 0===this.excludeRefsById[tz(ec.TAG,e)]&&(!t||i||o))}loadRowsbySha(e){this.orderedGraphRows=[],this.processedGraphRowBySha={};let t=this.isCommitListFiltered();this.childrenBySha={},this.shaByRefId={},this.reserverInfoBySha={},this.columnsToFreeWhenFound={},this.columnsUsed={};let o=new Map,r={},i=[],n=[];this.branchUpstreamRowIndices=[];let s=[],l=[],a=[],h=[],c={};if(tY(this.workDirStats)&&e.length>0&&!tK(e[0].type)){let t,o=(t=e.find(tV),t?.sha||void 0),r={sha:ei,parents:o?[o]:[],author:"",email:"",date:new Date().getTime(),message:this.translateCallback("Graph-WorkInProgress"),type:ei,heads:[],remotes:[],tags:[]};this.workDirStats.context&&(r.contexts={row:this.workDirStats.context}),e.unshift(r)}else!tY(this.workDirStats)&&e.length>0&&tK(e[0].type)&&e.shift();let d=X(this.includeOnlyRefsById);e.forEach((e,u)=>{let p,f=this.childrenBySha[e.sha]?.length>0,m=e.heads?.length>0?this.getFilteredHeadsForGraphRow(e,d):[],g=e.remotes?.length>0?this.getFilteredRemotesForGraphRow(e,d):[],v=e.tags?.length>0?this.getFilteredTagsForGraphRow(e,d,c[e.sha]||f):[],y=e.parents?.length>0?e.parents.filter(e=>!r[e]):[],S=m.length>0||g.length>0||v.length>0,w=m.length>0||g.length>0;if(e.type!==Q&&e.type!==et||c[e.sha]){if(e.type===er&&this.excludeByType.stashes&&(r[e.sha]=!0),!r[e.sha]&&y.length>0){let e;for(e of y)c[e]=!0}}else e.type!==Q&&e.type!==et||c[e.sha]||S||f||(r[e.sha]=!0);let C=r[e.sha],b=C?0:this.getColumns(e);t&&(p=b,b=0);let R=new tT(this,{...e,heads:m,remotes:g,tags:v,parents:y},b,void 0,void 0,void 0,void 0,p);if(!C){let r,c=o.get(e.sha);c?.length&&(c.sort((e,t)=>{if(e.parentIndexScore<t.parentIndexScore)return -1;if(e.parentIndexScore>t.parentIndexScore)return 1;if(e.parentIndexScore===t.parentIndexScore){if(e.rowEntered<t.rowEntered)return -1;if(e.rowEntered>t.rowEntered)return 1}return 0}),r=c[0],R.childRefs={heads:[...r?.heads||[]],remotes:[...r?.remotes||[]],tags:[...r?.tags||[]]},o.delete(e.sha));for(let t=0;t<y.length;t+=1){let i=y[t];this.childrenBySha[i]||(this.childrenBySha[i]=[]),this.childrenBySha[i].push(e.sha);let n=o.get(i);(w||r)&&void 0===n&&(n=[],o.set(i,n)),w?n?.unshift({sha:e.sha,parentIndexScore:t,rowEntered:u,heads:m,remotes:g,tags:v}):r&&n?.unshift({...r,parentIndexScore:t,rowEntered:u})}if(!t||this.highlightedShas[e.sha]){let t=this.orderedGraphRows.length;if(R.rowIndex=t,this.orderedGraphRows.push(R),m.length&&(s.push(t),m.some(e=>e.isCurrentHead)&&(this.headSha=R.sha,i.push(t))),g.length)for(let e of(l.push(t),g))e.current&&(n.push(t),this.headUpstreamSha=R.sha),this.downstreamsByUpstream[`${e.owner}/${e.name}`]?.length&&this.branchUpstreamRowIndices.push(t);v.length&&a.push(t),e.type===er&&h.push(t)}if(m.length)for(let e of m)this.shaByRefId[tz(ec.HEAD,e)]=R.sha;if(g.length)for(let e of g)this.shaByRefId[tz(ec.REMOTE,e)]=R.sha;if(v.length)for(let e of v)this.shaByRefId[tz(ec.TAG,e)]=R.sha}this.processedGraphRowBySha[e.sha]=R}),this.isMounted?this.setState(e=>({markerRowIndices:{...e.markerRowIndices,head:i,upstream:n,localBranches:s,remoteBranches:l,tags:a,stashes:h}})):this.state={...this.state,markerRowIndices:{...this.state?.markerRowIndices,head:i,upstream:n,localBranches:s,remoteBranches:l,tags:a,stashes:h}},this.clearTimelinesInterval(),this.updateTimelines(),this.timelinesInterval=setInterval(this.onTimelinesRefreshInterval,9e5),this.onGraphVisibleRowsUpdated()}updateRowStatsConstraints(){this.rowStatsConstraints=function(e){let{length:t}=e;if(0===t)return{min:0,max:0};if(1===t)return{min:0,max:e[0]};e.sort((e,t)=>e-t);let o=e[0],r=e[Math.floor(.25*t)],i=e[Math.floor(.5*t)],n=e[Math.floor(.75*t)],s=e[t-1],l=n-r;return{min:Math.max(o,i-1.5*l),max:Math.min(s,i+1.5*l)}}(null!=this.rowsStats?Object.values(this.rowsStats).map(e=>e.additions+e.deletions):[])}updateTimelines(){let e=function(){let e,t=new Date,o=t.getTime(),r=[];for(e=1;e<tv.hour;e+=1){let t=36e5*e,{label:i,value:n}=tO(t);r.push({date:o-t,label:i,timeUnit:"hour",value:n})}for(e=1;e<tv.day;e+=1){let t=864e5*e,{label:i,value:n}=tO(t);r.push({date:o-t,label:i,timeUnit:"day",value:n})}for(e=1;e<=tv.week;e+=1){let t=6048e5*e,{label:i,value:n}=tO(t);r.push({date:o-t,label:i,timeUnit:"week",value:n})}for(e=1;e<tv.month;e+=1){let i=new Date;i.setMonth(t.getMonth()-e),i.setHours(0,0,0,0);let{label:n,value:s}=tO(o-i.getTime());r.push({date:i.getTime(),label:n,timeUnit:"month",value:s})}for(e=1;e<=tv.year;e+=1){let o,i=new Date;switch(i.setFullYear(t.getFullYear()-e),i.setHours(0,0,0,0),e){case 1:o="Timeline-1YearAgo";break;case tv.year:o="Timeline-NPlusYearsAgo";break;default:o="Timeline-NYearsAgo"}r.push({date:i.getTime(),label:o,timeUnit:"year",value:e})}return r}();var t=this.orderedGraphRows;let o=0;for(let r of t){for(;o+1<e.length&&r.date<=e[o+1].date;)o++;let t=e[o];o<e.length&&r.date<=t.date&&(r.timeLineEntry=t,o++)}}clearTimelines(){for(let e of Object.values(this.processedGraphRowBySha))e.timeLineEntry=void 0}clearTimelinesInterval(){this.timelinesInterval&&(clearInterval(this.timelinesInterval),this.timelinesInterval=void 0)}onTimelinesRefreshInterval=()=>{this.isMounted&&(this.clearTimelines(),this.updateTimelines(),this.setState({processedRows:[...this.orderedGraphRows]}))};cleanupSelections(){for(let e of this.selectedShas)this.processedGraphRowBySha[e]||(this.selectedShas.delete(e),this.selectionFocusSha===e&&(this.selectionFocusSha=void 0));this.selectionAnchorSha&&!this.processedGraphRowBySha[this.selectionAnchorSha]&&(this.selectionAnchorSha=void 0)}getColumnColorByColumn(e){let t=this.getNumGraphColumns(e),o=this.maxColumns>t?this.maxColumns:t,r={};for(let n=0;n<=o;n+=1)if(n<t){var i;let t=e[ea(n)];r[n]="rgba"===(i=t4(t)).type?`rgba(${i.r}, ${i.g}, ${i.b}, ${Number(i.a.toFixed(2))})`:`hsla(${i.h}, ${(100*i.s).toFixed(2)}%, ${(100*i.l).toFixed(2)}%, ${Number(i.a.toFixed(2))})`}else{let e=r[n%t];r[n]=e}return r}getNumGraphColumns(e){let t=Number.parseInt(e[es],tf);return Number.isNaN(t)?tf:t}expandLastZoneMinWidthForScrollbar(e){let t=e[e.length-1]?.type;if(!t)return;let o=tG(this.props.cssVariables,!0),r=tg[t].minimumWidth+o,i=this.graphZonesByType[t];if(!i||null!=i.maximumWidth&&r>i.maximumWidth)return;i.minimumWidth=r;let n=tg[t].showIconWidth;null!=n&&(i.showIconWidth=n+o),i.currentWidth<i.minimumWidth&&(i.currentWidth=i.minimumWidth),i.preferredWidth<i.minimumWidth&&(i.preferredWidth=i.minimumWidth)}ensureZoneWidthsMatchGraphWidth(e,t){let o=tN(e);o>t&&this.shrinkZoneWidthsToFitWidth(e,t),o<t&&this.expandZoneWidthsToFitWidth(e,t)}shrinkZoneWidthsToFitWidth(e,t,o){let r=tN(e);for(;r>t;){let i=tk(e,o);if(!i)break;let n=tN(e,i.type);if(n+i.currentWidth>t){let o=tF(i,e,t-n);this.updateWidthByZone(o,i.type)}r=tN(e)}}getOrderedActiveGraphZones(){return this.graphZoneOrdering.sort((e,t)=>this.graphZonesByType[e].order-this.graphZonesByType[t].order).filter(e=>!this.graphZonesByType[e].isHidden).map(e=>this.graphZonesByType[e])}expandZoneWidthsToFitWidth(e,t,o){let r=tN(e);for(;r<t;){let i=function(e,t=0){if(e.length){for(let o=t;o<e.length;o+=1){let t=e[o],r=t.maximumWidth?Math.min(t.maximumWidth,t.preferredWidth||1/0):t.preferredWidth;if(r&&t.currentWidth<r)return t}return e[e.length-1]}}(e,o);if(!i)break;let n=tN(e,i.type),s=i.maximumWidth?Math.min(i.maximumWidth,i.preferredWidth||1/0):i.preferredWidth||0;if(n+i.currentWidth<t){let o=t-n;!tA(i.type,e)&&o>s&&(o=s),o=tF(i,e,o),this.updateWidthByZone(o,i.type)}r=tN(e)}}onGraphHeaderRowMouseDown=e=>{1===e.button&&e.preventDefault()};onToggleRefNodesShown=(e,t,o,r)=>{t.forEach(e=>{o&&this.excludeRefsById[e.id]?delete this.excludeRefsById[e.id]:o||(this.excludeRefsById[e.id]=e)}),this.excludeRemotesByName=this.getExcludeRemotesByName(),this.props.onToggleRefsVisibilityClick?.(e,t,o,r?this.processedGraphRowBySha[r]:void 0),this.processRows(this.props.graphRows),this.setState({processedRows:[...this.orderedGraphRows]})};cleanEdgeCaches(){ox={},oT={},o_={},oR={},os={}}onZoneEnter=(e,t,o,r)=>{t!==to&&(o&&r&&this.onRefNodeUnhovered(e,o,r),this.onRefZoneUnhovered())};adjustResizedGraphZone(e,t,o,r){if(o?.width){let i=t.currentWidth;this.updateWidthByZone(o.width,t.type,r);let n=tZ(t.type,e),s=this.graphZonesByType[t.type];i>s.currentWidth&&this.expandZoneWidthsToFitWidth(e,this.graphWidth,n+1),i<s.currentWidth&&this.shrinkZoneWidthsToFitWidth(e,this.graphWidth,n-1)}}dimRowsOfSelectedCommit(e){this.setState({dimRowsOfSelectedCommit:e})}onGraphContainerBlurred=(e,t,o)=>{setTimeout(()=>{this.isMounted&&(t&&o&&this.onRefNodeUnhovered(e,t,o),this.onRefZoneUnhovered())},250)};onGraphContainerMouseEnter=e=>{this.props.onGraphMouseEnter?.(e)};onGraphContainerMouseLeave=e=>{this.props.onGraphMouseLeave?.(e)};_headerHoverRestoreTimer;onGraphHeaderMouseDown=()=>{let{currentlyHoveredCommitSha:e}=this.state;if(null!=e){if(this.props.onGraphRowUnhovered){let t=this.processedGraphRowBySha[e];null!=t&&this.props.onGraphRowUnhovered({nativeEvent:{relatedTarget:null},relatedTarget:null},tr,t)}this.setState({currentlyHoveredCommitSha:void 0})}};onGraphHeaderMouseUp=e=>{this.hoverRowForHeaderEvent(e.clientX,e.clientY,e.target)};onGraphHeaderWheel=e=>{let{currentlyHoveredCommitSha:t}=this.state;if(null!=t){if(this.props.onGraphRowUnhovered){let e=this.processedGraphRowBySha[t];null!=e&&this.props.onGraphRowUnhovered({nativeEvent:{relatedTarget:null},relatedTarget:null},tr,e)}this.setState({currentlyHoveredCommitSha:void 0})}let o=this.orderedGraphRows?.length??0;if(!o)return;let{hasMoreCommits:r,scrollLeft:i,scrollTop:n}=this.state,s=this.graphWidth||this.state.width||0,l=(this.graphHeight||this.state.height||0)-ef;if(s<=0||l<=0)return;let a=o*em,h=Math.max(0,a-l),c=n+e.deltaY;if((c=q(c,0,h))===n)return;let d={clientHeight:l,clientWidth:s,scrollHeight:a,scrollLeft:i,scrollTop:c,scrollWidth:s},u=this.getOrderedActiveGraphZones(),p=u.length>0?u[u.length-1].type:tr;this.onScrollForZone(p,d,s,l,r);let f=e.target;if(f){this._headerHoverRestoreTimer&&clearTimeout(this._headerHoverRestoreTimer);let t=e.clientX,o=e.clientY;this._headerHoverRestoreTimer=setTimeout(()=>{this._headerHoverRestoreTimer=void 0,this.hoverRowForHeaderEvent(t,o,f)},200)}e.preventDefault()};onGraphHeaderMouseMove=e=>{0===e.buttons&&this.hoverRowForHeaderEvent(e.clientX,e.clientY,e.target)};hoverRowForHeaderEvent(e,t,o){if(!(o instanceof HTMLElement))return;let r=o.closest(".resizable-handle.horizontal");if(null==r||r.closest(`#${to}-header`))return;let i=this.graphContainerRef?.current;if(null==i)return;let n=this.orderedGraphRows?.length??0;if(!n)return;let s=i.getBoundingClientRect(),l=t-s.top;if(l<0)return;let a=this.state.scrollTop??0,{currentlyHoveredCommitSha:h}=this.state,c=Math.floor((l+a)/em);if(c<0||c>=n)return;let d=this.orderedGraphRows[c];if(!d)return;let u=s.top+c*em-a,p={getBoundingClientRect:()=>({top:u,left:e,right:e+60,bottom:u+em,x:e,y:u,width:60,height:em})};this.onCurrentlyHoveredGraphCommit({clientX:e,currentTarget:p,nativeEvent:{clientX:e,currentTarget:p,target:p}},tr,d.sha,h)}onGraphResized=tx((e,t)=>{if(!this.isMounted)return;let o=Math.floor(t),r=Math.floor(e),i=o!==this.graphHeight,n=r!==this.graphWidth,s={};if(i&&(this.graphHeight=o,s.height=o),n){this.graphWidth=r;let e=this.getOrderedActiveGraphZones();this.ensureZoneWidthsMatchGraphWidth(e,this.graphWidth),s.width=this.graphWidth,s.graphZones=e}(i||n)&&(this.setState(s),i&&this.onGraphVisibleRowsUpdatedThrottled(),this.props.onGraphResized&&this.props.onGraphResized(this.graphWidth,this.graphHeight))});onGraphVisibleRowsUpdated(){if(!this.isMounted||!this.props.onGraphVisibleRowsChanged||!this.orderedGraphRows?.length)return;let{top:e,bottom:t}=this.getTopAndBottomVisibleRowIndex();-1===e||-1===t||e>=this.orderedGraphRows.length||t>=this.orderedGraphRows.length||e===this.lastTopVisibleRowIndex&&t===this.lastBottomVisibleRowIndex||(this.lastTopVisibleRowIndex=e,this.lastBottomVisibleRowIndex=t,this.props.onGraphVisibleRowsChanged&&this.props.onGraphVisibleRowsChanged(this.orderedGraphRows[e],this.orderedGraphRows[t]))}getCurrentPlatform(){return this.props.platform||"darwin"}isMacOSPlatform(){return"darwin"===this.getCurrentPlatform()}isCommitListFiltered(){return"filter"===this.searchMode&&function(e,t=1){let o=0;for(let r in e)if(Object.hasOwn(e,r)&&e[r]&&++o>=t)return!0;return o>=t}(this.highlightedShas)}getGraphColumnSettingFromZoneType(e){return{width:e.preferredWidth||0,isHidden:e.isHidden,mode:e.mode,order:e.order}}decorateWithHelmet=(e,t,o)=>{let r=function(e){let t=e||el,o="";for(let e of(o+=`.gk-graph {
|
|
17
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}());this._loadMoreRowsMemoizer({callback:function(){i._loadUnloadedRanges(c)},indices:{squashedUnloadedRanges:d}})}},{key:"_registerChild",value:function(e){this._registeredChild=e}}]),t}(P.PureComponent);oW(rp,"defaultProps",{minimumBatchSize:10,rowCount:0,threshold:15}),rp.propTypes={};var rf=(I=M=function(e){function t(){oE(this,t);for(var e,o,r=arguments.length,i=Array(r),n=0;n<r;n++)i[n]=arguments[n];return oW(oD(o=ok(this,(e=oG(t)).call.apply(e,[this].concat(i)))),"Grid",void 0),oW(oD(o),"_cellRenderer",function(e){var t=e.parent,r=e.rowIndex,i=e.style,n=e.isScrolling,s=e.isVisible,l=e.key,a=o.props.rowRenderer,h=Object.getOwnPropertyDescriptor(i,"width");return h&&h.writable&&(i.width="100%"),a({index:r,style:i,isScrolling:n,isVisible:s,key:l,parent:t})}),oW(oD(o),"_setRef",function(e){o.Grid=e}),oW(oD(o),"_onScroll",function(e){var t=e.clientHeight,r=e.scrollHeight,i=e.scrollTop;(0,o.props.onScroll)({clientHeight:t,scrollHeight:r,scrollTop:i})}),oW(oD(o),"_onScrollToRowCausedUpdate",function(e){var t=e.clientHeight,r=e.scrollHeight,i=e.scrollTop;(0,o.props.onScrollToRowCausedUpdate)({clientHeight:t,scrollHeight:r,scrollTop:i})}),oW(oD(o),"_onSectionRendered",function(e){var t=e.rowOverscanStartIndex,r=e.rowOverscanStopIndex,i=e.rowStartIndex,n=e.rowStopIndex;(0,o.props.onRowsRendered)({overscanStartIndex:t,overscanStopIndex:r,startIndex:i,stopIndex:n})}),o}return oA(t,e),oz(t,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(e){var t=e.alignment,o=e.index;return this.Grid?this.Grid.getOffsetForCell({alignment:t,rowIndex:o,columnIndex:0}).scrollTop:0}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,o=e.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:o,columnIndex:t})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,o=e.rowIndex;this.Grid&&this.Grid.recomputeGridSize({rowIndex:void 0===o?0:o,columnIndex:void 0===t?0:t})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e,columnIndex:0})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"render",value:function(){var e=this.props,t=e.className,o=e.noRowsRenderer,r=e.scrollToIndex,i=e.width,n=oU("ReactVirtualized__List",t);return P.createElement(o4,oB({},this.props,{autoContainerWidth:!0,cellRenderer:this._cellRenderer,className:n,columnWidth:i,columnCount:1,noContentRenderer:o,onScroll:this._onScroll,onScrollToTargetCausedUpdate:this._onScrollToRowCausedUpdate,onSectionRendered:this._onSectionRendered,ref:this._setRef,scrollToRow:r}))}}]),t}(P.PureComponent),oW(M,"propTypes",null),I);oW(rf,"defaultProps",{autoHeight:!1,estimatedRowSize:30,onScroll:function(){},onScrollToRowCausedUpdate:function(){},noRowsRenderer:function(){return null},onRowsRendered:function(){},overscanIndicesGetter:o7,overscanRowCount:10,scrollToAlignment:"auto",scrollToIndex:-1,style:{}});let rm=function(e,t,o,r,i){return"function"==typeof o?function(e,t,o,r,i){for(var n=o+1;t<=o;){var s=t+o>>>1;i(e[s],r)>=0?(n=s,o=s-1):t=s+1}return n}(e,void 0===r?0:0|r,void 0===i?e.length-1:0|i,t,o):function(e,t,o,r){for(var i=o+1;t<=o;){var n=t+o>>>1;e[n]>=r?(i=n,o=n-1):t=n+1}return i}(e,void 0===o?0:0|o,void 0===r?e.length-1:0|r,t)};function rg(e,t,o,r,i){this.mid=e,this.left=t,this.right=o,this.leftPoints=r,this.rightPoints=i,this.count=(t?t.count:0)+(o?o.count:0)+r.length}var rv=rg.prototype;function ry(e,t){e.mid=t.mid,e.left=t.left,e.right=t.right,e.leftPoints=t.leftPoints,e.rightPoints=t.rightPoints,e.count=t.count}function rS(e,t){var o=rM(t);e.mid=o.mid,e.left=o.left,e.right=o.right,e.leftPoints=o.leftPoints,e.rightPoints=o.rightPoints,e.count=o.count}function rw(e,t){var o=e.intervals([]);o.push(t),rS(e,o)}function rC(e,t){var o=e.intervals([]),r=o.indexOf(t);return r<0?0:(o.splice(r,1),rS(e,o),1)}function rR(e,t,o){for(var r=0;r<e.length&&e[r][0]<=t;++r){var i=o(e[r]);if(i)return i}}function rb(e,t,o){for(var r=e.length-1;r>=0&&e[r][1]>=t;--r){var i=o(e[r]);if(i)return i}}function r_(e,t){for(var o=0;o<e.length;++o){var r=t(e[o]);if(r)return r}}function rT(e,t){return e-t}function rx(e,t){var o=e[0]-t[0];return o||e[1]-t[1]}function rE(e,t){var o=e[1]-t[1];return o||e[0]-t[0]}function rM(e){if(0===e.length)return null;for(var t=[],o=0;o<e.length;++o)t.push(e[o][0],e[o][1]);t.sort(rT);for(var r=t[t.length>>1],i=[],n=[],s=[],o=0;o<e.length;++o){var l=e[o];l[1]<r?i.push(l):r<l[0]?n.push(l):s.push(l)}var a=s.slice();return s.sort(rx),a.sort(rE),new rg(r,rM(i),rM(n),s,a)}function rI(e){this.root=e}rv.intervals=function(e){return e.push.apply(e,this.leftPoints),this.left&&this.left.intervals(e),this.right&&this.right.intervals(e),e},rv.insert=function(e){var t=this.count-this.leftPoints.length;if(this.count+=1,e[1]<this.mid)this.left?4*(this.left.count+1)>3*(t+1)?rw(this,e):this.left.insert(e):this.left=rM([e]);else if(e[0]>this.mid)this.right?4*(this.right.count+1)>3*(t+1)?rw(this,e):this.right.insert(e):this.right=rM([e]);else{var o=rm(this.leftPoints,e,rx),r=rm(this.rightPoints,e,rE);this.leftPoints.splice(o,0,e),this.rightPoints.splice(r,0,e)}},rv.remove=function(e){var t=this.count-this.leftPoints;if(e[1]<this.mid){if(!this.left)return 0;if(4*(this.right?this.right.count:0)>3*(t-1))return rC(this,e);var o=this.left.remove(e);return 2===o?(this.left=null,this.count-=1,1):(1===o&&(this.count-=1),o)}if(e[0]>this.mid){if(!this.right)return 0;if(4*(this.left?this.left.count:0)>3*(t-1))return rC(this,e);var o=this.right.remove(e);return 2===o?(this.right=null,this.count-=1,1):(1===o&&(this.count-=1),o)}if(1===this.count)if(this.leftPoints[0]===e)return 2;else return 0;if(1===this.leftPoints.length&&this.leftPoints[0]===e){if(this.left&&this.right){for(var r=this,i=this.left;i.right;)r=i,i=i.right;if(r===this)i.right=this.right;else{var n=this.left,o=this.right;r.count-=i.count,r.right=i.left,i.left=n,i.right=o}ry(this,i),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?ry(this,this.left):ry(this,this.right);return 1}for(var n=rm(this.leftPoints,e,rx);n<this.leftPoints.length&&this.leftPoints[n][0]===e[0];++n)if(this.leftPoints[n]===e){this.count-=1,this.leftPoints.splice(n,1);for(var o=rm(this.rightPoints,e,rE);o<this.rightPoints.length;++o)if(this.rightPoints[o][1]!==e[1])break;else if(this.rightPoints[o]===e)return this.rightPoints.splice(o,1),1}return 0},rv.queryPoint=function(e,t){if(e<this.mid){if(this.left){var o=this.left.queryPoint(e,t);if(o)return o}return rR(this.leftPoints,e,t)}if(!(e>this.mid))return r_(this.leftPoints,t);if(this.right){var o=this.right.queryPoint(e,t);if(o)return o}return rb(this.rightPoints,e,t)},rv.queryInterval=function(e,t,o){if(e<this.mid&&this.left){var r=this.left.queryInterval(e,t,o);if(r)return r}if(t>this.mid&&this.right){var r=this.right.queryInterval(e,t,o);if(r)return r}return t<this.mid?rR(this.leftPoints,t,o):e>this.mid?rb(this.rightPoints,e,o):r_(this.leftPoints,o)};var rO=rI.prototype;rO.insert=function(e){this.root?this.root.insert(e):this.root=new rg(e[0],null,null,[e],[e])},rO.remove=function(e){if(this.root){var t=this.root.remove(e);return 2===t&&(this.root=null),0!==t}return!1},rO.queryPoint=function(e,t){if(this.root)return this.root.queryPoint(e,t)},rO.queryInterval=function(e,t,o){if(e<=t&&this.root)return this.root.queryInterval(e,t,o)},Object.defineProperty(rO,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(rO,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}});var rz=function(){function e(){oE(this,e),oW(this,"_columnSizeMap",{}),oW(this,"_intervalTree",new rI(null)),oW(this,"_leftMap",{})}return oz(e,[{key:"estimateTotalHeight",value:function(e,t,o){var r=e-this.count;return this.tallestColumnSize+Math.ceil(r/t)*o}},{key:"range",value:function(e,t,o){var r=this;this._intervalTree.queryInterval(e,e+t,function(e){var t=function(e){if(Array.isArray(e))return e}(e)||function(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var r,i,n,s,l=[],a=!0,h=!1;try{n=(o=o.call(e)).next,!1;for(;!(a=(r=n.call(o)).done)&&(l.push(r.value),3!==l.length);a=!0);}catch(e){h=!0,i=e}finally{try{if(!a&&null!=o.return&&(s=o.return(),Object(s)!==s))return}finally{if(h)throw i}}return l}}(e,3)||ru(e,3)||function(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
18
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}(),i=t[0],n=(t[1],t[2]);return o(n,r._leftMap[n],i)})}},{key:"setPosition",value:function(e,t,o,r){this._intervalTree.insert([o,o+r,e]),this._leftMap[e]=t;var i=this._columnSizeMap,n=i[t];void 0===n?i[t]=o+r:i[t]=Math.max(n,o+r)}},{key:"count",get:function(){return this._intervalTree.count}},{key:"shortestColumnSize",get:function(){var e=this._columnSizeMap,t=0;for(var o in e){var r=e[o];t=0===t?r:Math.min(t,r)}return t}},{key:"tallestColumnSize",get:function(){var e=this._columnSizeMap,t=0;for(var o in e)t=Math.max(t,e[o]);return t}}]),e}();function rD(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}var rk=(z=O=function(e){function t(){oE(this,t);for(var e,o,r=arguments.length,i=Array(r),n=0;n<r;n++)i[n]=arguments[n];return oW(oD(o=ok(this,(e=oG(t)).call.apply(e,[this].concat(i)))),"state",{isScrolling:!1,scrollTop:0}),oW(oD(o),"_debounceResetIsScrollingId",void 0),oW(oD(o),"_invalidateOnUpdateStartIndex",null),oW(oD(o),"_invalidateOnUpdateStopIndex",null),oW(oD(o),"_positionCache",new rz),oW(oD(o),"_startIndex",null),oW(oD(o),"_startIndexMemoized",null),oW(oD(o),"_stopIndex",null),oW(oD(o),"_stopIndexMemoized",null),oW(oD(o),"_debounceResetIsScrollingCallback",function(){o.setState({isScrolling:!1})}),oW(oD(o),"_setScrollingContainerRef",function(e){o._scrollingContainer=e}),oW(oD(o),"_onScroll",function(e){var t=o.props.height,r=e.currentTarget.scrollTop,i=Math.min(Math.max(0,o._getEstimatedTotalHeight()-t),r);r===i&&(o._debounceResetIsScrolling(),o.state.scrollTop!==i&&o.setState({isScrolling:!0,scrollTop:i}))}),o}return oA(t,e),oz(t,[{key:"clearCellPositions",value:function(){this._positionCache=new rz,this.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.rowIndex;null===this._invalidateOnUpdateStartIndex?(this._invalidateOnUpdateStartIndex=t,this._invalidateOnUpdateStopIndex=t):(this._invalidateOnUpdateStartIndex=Math.min(this._invalidateOnUpdateStartIndex,t),this._invalidateOnUpdateStopIndex=Math.max(this._invalidateOnUpdateStopIndex,t))}},{key:"recomputeCellPositions",value:function(){var e=this._positionCache.count-1;this._positionCache=new rz,this._populatePositionCache(0,e),this.forceUpdate()}},{key:"componentDidMount",value:function(){this._checkInvalidateOnUpdate(),this._invokeOnScrollCallback(),this._invokeOnCellsRenderedCallback()}},{key:"componentDidUpdate",value:function(e,t){this._checkInvalidateOnUpdate(),this._invokeOnScrollCallback(),this._invokeOnCellsRenderedCallback(),this.props.scrollTop!==e.scrollTop&&this._debounceResetIsScrolling()}},{key:"componentWillUnmount",value:function(){this._debounceResetIsScrollingId&&o1(this._debounceResetIsScrollingId)}},{key:"render",value:function(){var e,t=this,o=this.props,r=o.autoHeight,i=o.cellCount,n=o.cellMeasurerCache,s=o.cellRenderer,l=o.className,a=o.height,h=o.id,c=o.keyMapper,d=o.overscanByPixels,u=o.role,p=o.style,f=o.tabIndex,m=o.width,g=o.rowDirection,v=this.state,y=v.isScrolling,S=v.scrollTop,w=[],C=this._getEstimatedTotalHeight(),R=this._positionCache.shortestColumnSize,b=this._positionCache.count,_=0;if(this._positionCache.range(Math.max(0,S-d),a+2*d,function(o,r,i){var l;void 0===e?(_=o,e=o):(_=Math.min(_,o),e=Math.max(e,o)),w.push(s({index:o,isScrolling:y,key:c(o),parent:t,style:(oW(l={height:n.getHeight(o)},"ltr"===g?"left":"right",r),oW(l,"position","absolute"),oW(l,"top",i),oW(l,"width",n.getWidth(o)),l)}))}),R<S+a+d&&b<i)for(var T=Math.min(i-b,Math.ceil((S+a+d-R)/n.defaultHeight*m/n.defaultWidth)),x=b;x<b+T;x++)e=x,w.push(s({index:x,isScrolling:y,key:c(x),parent:this,style:{width:n.getWidth(x)}}));return this._startIndex=_,this._stopIndex=e,P.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:oU("ReactVirtualized__Masonry",l),id:h,onScroll:this._onScroll,role:u,style:function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?rD(o,!0).forEach(function(t){oW(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):rD(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}({boxSizing:"border-box",direction:"ltr",height:r?"auto":a,overflowX:"hidden",overflowY:C<a?"hidden":"auto",position:"relative",width:m,WebkitOverflowScrolling:"touch",willChange:"transform"},p),tabIndex:f},P.createElement("div",{className:"ReactVirtualized__Masonry__innerScrollContainer",style:{width:"100%",height:C,maxWidth:"100%",maxHeight:C,overflow:"hidden",pointerEvents:y?"none":"",position:"relative"}},w))}},{key:"_checkInvalidateOnUpdate",value:function(){if("number"==typeof this._invalidateOnUpdateStartIndex){var e=this._invalidateOnUpdateStartIndex,t=this._invalidateOnUpdateStopIndex;this._invalidateOnUpdateStartIndex=null,this._invalidateOnUpdateStopIndex=null,this._populatePositionCache(e,t),this.forceUpdate()}}},{key:"_debounceResetIsScrolling",value:function(){var e=this.props.scrollingResetTimeInterval;this._debounceResetIsScrollingId&&o1(this._debounceResetIsScrollingId),this._debounceResetIsScrollingId=o2(this._debounceResetIsScrollingCallback,e)}},{key:"_getEstimatedTotalHeight",value:function(){var e=this.props,t=e.cellCount,o=e.cellMeasurerCache,r=Math.max(1,Math.floor(e.width/o.defaultWidth));return this._positionCache.estimateTotalHeight(t,r,o.defaultHeight)}},{key:"_invokeOnScrollCallback",value:function(){var e=this.props,t=e.height,o=e.onScroll,r=this.state.scrollTop;this._onScrollMemoized!==r&&(o({clientHeight:t,scrollHeight:this._getEstimatedTotalHeight(),scrollTop:r}),this._onScrollMemoized=r)}},{key:"_invokeOnCellsRenderedCallback",value:function(){(this._startIndexMemoized!==this._startIndex||this._stopIndexMemoized!==this._stopIndex)&&((0,this.props.onCellsRendered)({startIndex:this._startIndex,stopIndex:this._stopIndex}),this._startIndexMemoized=this._startIndex,this._stopIndexMemoized=this._stopIndex)}},{key:"_populatePositionCache",value:function(e,t){for(var o=this.props,r=o.cellMeasurerCache,i=o.cellPositioner,n=e;n<=t;n++){var s=i(n),l=s.left,a=s.top;this._positionCache.setPosition(n,l,a,r.getHeight(n))}}}],[{key:"getDerivedStateFromProps",value:function(e,t){return void 0!==e.scrollTop&&t.scrollTop!==e.scrollTop?{isScrolling:!0,scrollTop:e.scrollTop}:null}}]),t}(P.PureComponent),oW(O,"propTypes",null),z);function rG(){}oW(rk,"defaultProps",{autoHeight:!1,keyMapper:function(e){return e},onCellsRendered:rG,onScroll:rG,overscanByPixels:20,role:"grid",scrollingResetTimeInterval:150,style:{},tabIndex:0,rowDirection:"ltr"}),oF(rk);var rN=function(){function e(){var t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};oE(this,e),oW(this,"_cellMeasurerCache",void 0),oW(this,"_columnIndexOffset",void 0),oW(this,"_rowIndexOffset",void 0),oW(this,"columnWidth",function(e){var o=e.index;t._cellMeasurerCache.columnWidth({index:o+t._columnIndexOffset})}),oW(this,"rowHeight",function(e){var o=e.index;t._cellMeasurerCache.rowHeight({index:o+t._rowIndexOffset})});var r=o.cellMeasurerCache,i=o.columnIndexOffset,n=o.rowIndexOffset;this._cellMeasurerCache=r,this._columnIndexOffset=void 0===i?0:i,this._rowIndexOffset=void 0===n?0:n}return oz(e,[{key:"clear",value:function(e,t){this._cellMeasurerCache.clear(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"clearAll",value:function(){this._cellMeasurerCache.clearAll()}},{key:"hasFixedHeight",value:function(){return this._cellMeasurerCache.hasFixedHeight()}},{key:"hasFixedWidth",value:function(){return this._cellMeasurerCache.hasFixedWidth()}},{key:"getHeight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.getHeight(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"getWidth",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.getWidth(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"has",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.has(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"set",value:function(e,t,o,r){this._cellMeasurerCache.set(e+this._rowIndexOffset,t+this._columnIndexOffset,o,r)}},{key:"defaultHeight",get:function(){return this._cellMeasurerCache.defaultHeight}},{key:"defaultWidth",get:function(){return this._cellMeasurerCache.defaultWidth}}]),e}();function rA(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}function rW(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?rA(o,!0).forEach(function(t){oW(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):rA(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}var rH=function(e){function t(e,o){oE(this,t),oW(oD(r=ok(this,oG(t).call(this,e,o))),"state",{scrollLeft:0,scrollTop:0,scrollbarSize:0,showHorizontalScrollbar:!1,showVerticalScrollbar:!1}),oW(oD(r),"_deferredInvalidateColumnIndex",null),oW(oD(r),"_deferredInvalidateRowIndex",null),oW(oD(r),"_bottomLeftGridRef",function(e){r._bottomLeftGrid=e}),oW(oD(r),"_bottomRightGridRef",function(e){r._bottomRightGrid=e}),oW(oD(r),"_cellRendererBottomLeftGrid",function(e){var t=e.rowIndex,o=oV(e,["rowIndex"]),i=r.props,n=i.cellRenderer,s=i.fixedRowCount;return t===i.rowCount-s?P.createElement("div",{key:o.key,style:rW({},o.style,{height:20})}):n(rW({},o,{parent:oD(r),rowIndex:t+s}))}),oW(oD(r),"_cellRendererBottomRightGrid",function(e){var t=e.columnIndex,o=e.rowIndex,i=oV(e,["columnIndex","rowIndex"]),n=r.props,s=n.cellRenderer,l=n.fixedColumnCount,a=n.fixedRowCount;return s(rW({},i,{columnIndex:t+l,parent:oD(r),rowIndex:o+a}))}),oW(oD(r),"_cellRendererTopRightGrid",function(e){var t=e.columnIndex,o=oV(e,["columnIndex"]),i=r.props,n=i.cellRenderer,s=i.columnCount,l=i.fixedColumnCount;return t===s-l?P.createElement("div",{key:o.key,style:rW({},o.style,{width:20})}):n(rW({},o,{columnIndex:t+l,parent:oD(r)}))}),oW(oD(r),"_columnWidthRightGrid",function(e){var t=e.index,o=r.props,i=o.columnCount,n=o.fixedColumnCount,s=o.columnWidth,l=r.state,a=l.scrollbarSize;return l.showHorizontalScrollbar&&t===i-n?a:"function"==typeof s?s({index:t+n}):s}),oW(oD(r),"_onScroll",function(e){var t=e.scrollLeft,o=e.scrollTop;r.setState({scrollLeft:t,scrollTop:o});var i=r.props.onScroll;i&&i(e)}),oW(oD(r),"_onScrollbarPresenceChange",function(e){var t=e.horizontal,o=e.size,i=e.vertical,n=r.state,s=n.showHorizontalScrollbar,l=n.showVerticalScrollbar;if(t!==s||i!==l){r.setState({scrollbarSize:o,showHorizontalScrollbar:t,showVerticalScrollbar:i});var a=r.props.onScrollbarPresenceChange;"function"==typeof a&&a({horizontal:t,size:o,vertical:i})}}),oW(oD(r),"_onScrollLeft",function(e){var t=e.scrollLeft;r._onScroll({scrollLeft:t,scrollTop:r.state.scrollTop})}),oW(oD(r),"_onScrollTop",function(e){var t=e.scrollTop;r._onScroll({scrollTop:t,scrollLeft:r.state.scrollLeft})}),oW(oD(r),"_rowHeightBottomGrid",function(e){var t=e.index,o=r.props,i=o.fixedRowCount,n=o.rowCount,s=o.rowHeight,l=r.state,a=l.scrollbarSize;return l.showVerticalScrollbar&&t===n-i?a:"function"==typeof s?s({index:t+i}):s}),oW(oD(r),"_topLeftGridRef",function(e){r._topLeftGrid=e}),oW(oD(r),"_topRightGridRef",function(e){r._topRightGrid=e});var r,i=e.deferredMeasurementCache,n=e.fixedColumnCount,s=e.fixedRowCount;return r._maybeCalculateCachedStyles(!0),i&&(r._deferredMeasurementCacheBottomLeftGrid=s>0?new rN({cellMeasurerCache:i,columnIndexOffset:0,rowIndexOffset:s}):i,r._deferredMeasurementCacheBottomRightGrid=n>0||s>0?new rN({cellMeasurerCache:i,columnIndexOffset:n,rowIndexOffset:s}):i,r._deferredMeasurementCacheTopRightGrid=n>0?new rN({cellMeasurerCache:i,columnIndexOffset:n,rowIndexOffset:0}):i),r}return oA(t,e),oz(t,[{key:"forceUpdateGrids",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.forceUpdate(),this._bottomRightGrid&&this._bottomRightGrid.forceUpdate(),this._topLeftGrid&&this._topLeftGrid.forceUpdate(),this._topRightGrid&&this._topRightGrid.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,o=void 0===t?0:t,r=e.rowIndex,i=void 0===r?0:r;this._deferredInvalidateColumnIndex="number"==typeof this._deferredInvalidateColumnIndex?Math.min(this._deferredInvalidateColumnIndex,o):o,this._deferredInvalidateRowIndex="number"==typeof this._deferredInvalidateRowIndex?Math.min(this._deferredInvalidateRowIndex,i):i}},{key:"measureAllCells",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.measureAllCells(),this._bottomRightGrid&&this._bottomRightGrid.measureAllCells(),this._topLeftGrid&&this._topLeftGrid.measureAllCells(),this._topRightGrid&&this._topRightGrid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,o=void 0===t?0:t,r=e.rowIndex,i=void 0===r?0:r,n=this.props,s=n.fixedColumnCount,l=n.fixedRowCount,a=Math.max(0,o-s),h=Math.max(0,i-l);this._bottomLeftGrid&&this._bottomLeftGrid.recomputeGridSize({columnIndex:o,rowIndex:h}),this._bottomRightGrid&&this._bottomRightGrid.recomputeGridSize({columnIndex:a,rowIndex:h}),this._topLeftGrid&&this._topLeftGrid.recomputeGridSize({columnIndex:o,rowIndex:i}),this._topRightGrid&&this._topRightGrid.recomputeGridSize({columnIndex:a,rowIndex:i}),this._leftGridWidth=null,this._topGridHeight=null,this._maybeCalculateCachedStyles(!0)}},{key:"componentDidMount",value:function(){var e=this.props,t=e.scrollLeft,o=e.scrollTop;if(t>0||o>0){var r={};t>0&&(r.scrollLeft=t),o>0&&(r.scrollTop=o),this.setState(r)}this._handleInvalidatedGridSize()}},{key:"componentDidUpdate",value:function(){this._handleInvalidatedGridSize()}},{key:"render",value:function(){var e=this.props,t=e.onScroll,o=e.onSectionRendered,r=(e.onScrollbarPresenceChange,e.scrollLeft,e.scrollToColumn),i=(e.scrollTop,e.scrollToRow),n=oV(e,["onScroll","onSectionRendered","onScrollbarPresenceChange","scrollLeft","scrollToColumn","scrollTop","scrollToRow"]);if(this._prepareForRender(),0===this.props.width||0===this.props.height)return null;var s=this.state,l=s.scrollLeft,a=s.scrollTop;return P.createElement("div",{style:this._containerOuterStyle},P.createElement("div",{style:this._containerTopStyle},this._renderTopLeftGrid(n),this._renderTopRightGrid(rW({},n,{onScroll:t,scrollLeft:l}))),P.createElement("div",{style:this._containerBottomStyle},this._renderBottomLeftGrid(rW({},n,{onScroll:t,scrollTop:a})),this._renderBottomRightGrid(rW({},n,{onScroll:t,onSectionRendered:o,scrollLeft:l,scrollToColumn:r,scrollToRow:i,scrollTop:a}))))}},{key:"_getBottomGridHeight",value:function(e){return e.height-this._getTopGridHeight(e)}},{key:"_getLeftGridWidth",value:function(e){var t=e.fixedColumnCount,o=e.columnWidth;if(null==this._leftGridWidth)if("function"==typeof o){for(var r=0,i=0;i<t;i++)r+=o({index:i});this._leftGridWidth=r}else this._leftGridWidth=o*t;return this._leftGridWidth}},{key:"_getRightGridWidth",value:function(e){return e.width-this._getLeftGridWidth(e)}},{key:"_getTopGridHeight",value:function(e){var t=e.fixedRowCount,o=e.rowHeight;if(null==this._topGridHeight)if("function"==typeof o){for(var r=0,i=0;i<t;i++)r+=o({index:i});this._topGridHeight=r}else this._topGridHeight=o*t;return this._topGridHeight}},{key:"_handleInvalidatedGridSize",value:function(){if("number"==typeof this._deferredInvalidateColumnIndex){var e=this._deferredInvalidateColumnIndex,t=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:e,rowIndex:t}),this.forceUpdate()}}},{key:"_maybeCalculateCachedStyles",value:function(e){var t=this.props,o=t.columnWidth,r=t.enableFixedColumnScroll,i=t.enableFixedRowScroll,n=t.height,s=t.fixedColumnCount,l=t.fixedRowCount,a=t.rowHeight,h=t.style,c=t.styleBottomLeftGrid,d=t.styleBottomRightGrid,u=t.styleTopLeftGrid,p=t.styleTopRightGrid,f=t.width,m=e||n!==this._lastRenderedHeight||f!==this._lastRenderedWidth,g=e||o!==this._lastRenderedColumnWidth||s!==this._lastRenderedFixedColumnCount,v=e||l!==this._lastRenderedFixedRowCount||a!==this._lastRenderedRowHeight;(e||m||h!==this._lastRenderedStyle)&&(this._containerOuterStyle=rW({height:n,overflow:"visible",width:f},h)),(e||m||v)&&(this._containerTopStyle={height:this._getTopGridHeight(this.props),position:"relative",width:f},this._containerBottomStyle={height:n-this._getTopGridHeight(this.props),overflow:"visible",position:"relative",width:f}),(e||c!==this._lastRenderedStyleBottomLeftGrid)&&(this._bottomLeftGridStyle=rW({left:0,overflowX:"hidden",overflowY:r?"auto":"hidden",position:"absolute"},c)),(e||g||d!==this._lastRenderedStyleBottomRightGrid)&&(this._bottomRightGridStyle=rW({left:this._getLeftGridWidth(this.props),position:"absolute"},d)),(e||u!==this._lastRenderedStyleTopLeftGrid)&&(this._topLeftGridStyle=rW({left:0,overflowX:"hidden",overflowY:"hidden",position:"absolute",top:0},u)),(e||g||p!==this._lastRenderedStyleTopRightGrid)&&(this._topRightGridStyle=rW({left:this._getLeftGridWidth(this.props),overflowX:i?"auto":"hidden",overflowY:"hidden",position:"absolute",top:0},p)),this._lastRenderedColumnWidth=o,this._lastRenderedFixedColumnCount=s,this._lastRenderedFixedRowCount=l,this._lastRenderedHeight=n,this._lastRenderedRowHeight=a,this._lastRenderedStyle=h,this._lastRenderedStyleBottomLeftGrid=c,this._lastRenderedStyleBottomRightGrid=d,this._lastRenderedStyleTopLeftGrid=u,this._lastRenderedStyleTopRightGrid=p,this._lastRenderedWidth=f}},{key:"_prepareForRender",value:function(){(this._lastRenderedColumnWidth!==this.props.columnWidth||this._lastRenderedFixedColumnCount!==this.props.fixedColumnCount)&&(this._leftGridWidth=null),(this._lastRenderedFixedRowCount!==this.props.fixedRowCount||this._lastRenderedRowHeight!==this.props.rowHeight)&&(this._topGridHeight=null),this._maybeCalculateCachedStyles(),this._lastRenderedColumnWidth=this.props.columnWidth,this._lastRenderedFixedColumnCount=this.props.fixedColumnCount,this._lastRenderedFixedRowCount=this.props.fixedRowCount,this._lastRenderedRowHeight=this.props.rowHeight}},{key:"_renderBottomLeftGrid",value:function(e){var t=e.enableFixedColumnScroll,o=e.fixedColumnCount,r=e.fixedRowCount,i=e.rowCount,n=e.hideBottomLeftGridScrollbar,s=this.state.showVerticalScrollbar;if(!o)return null;var l=this._getBottomGridHeight(e),a=this._getLeftGridWidth(e),h=this.state.showVerticalScrollbar?this.state.scrollbarSize:0,c=P.createElement(o4,oB({},e,{cellRenderer:this._cellRendererBottomLeftGrid,className:this.props.classNameBottomLeftGrid,columnCount:o,deferredMeasurementCache:this._deferredMeasurementCacheBottomLeftGrid,height:l,onScroll:t?this._onScrollTop:void 0,ref:this._bottomLeftGridRef,rowCount:Math.max(0,i-r)+ +!!s,rowHeight:this._rowHeightBottomGrid,style:this._bottomLeftGridStyle,tabIndex:null,width:n?a+h:a}));return n?P.createElement("div",{className:"BottomLeftGrid_ScrollWrapper",style:rW({},this._bottomLeftGridStyle,{height:l,width:a,overflowY:"hidden"})},c):c}},{key:"_renderBottomRightGrid",value:function(e){var t=e.columnCount,o=e.fixedColumnCount,r=e.fixedRowCount,i=e.rowCount,n=e.scrollToColumn,s=e.scrollToRow;return P.createElement(o4,oB({},e,{cellRenderer:this._cellRendererBottomRightGrid,className:this.props.classNameBottomRightGrid,columnCount:Math.max(0,t-o),columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheBottomRightGrid,height:this._getBottomGridHeight(e),onScroll:this._onScroll,onScrollbarPresenceChange:this._onScrollbarPresenceChange,ref:this._bottomRightGridRef,rowCount:Math.max(0,i-r),rowHeight:this._rowHeightBottomGrid,scrollToColumn:n-o,scrollToRow:s-r,style:this._bottomRightGridStyle,width:this._getRightGridWidth(e)}))}},{key:"_renderTopLeftGrid",value:function(e){var t=e.fixedColumnCount,o=e.fixedRowCount;return t&&o?P.createElement(o4,oB({},e,{className:this.props.classNameTopLeftGrid,columnCount:t,height:this._getTopGridHeight(e),ref:this._topLeftGridRef,rowCount:o,style:this._topLeftGridStyle,tabIndex:null,width:this._getLeftGridWidth(e)})):null}},{key:"_renderTopRightGrid",value:function(e){var t=e.columnCount,o=e.enableFixedRowScroll,r=e.fixedColumnCount,i=e.fixedRowCount,n=e.scrollLeft,s=e.hideTopRightGridScrollbar,l=this.state,a=l.showHorizontalScrollbar,h=l.scrollbarSize;if(!i)return null;var c=this._getTopGridHeight(e),d=this._getRightGridWidth(e),u=c,p=this._topRightGridStyle;s&&(u=c+(a?h:0),p=rW({},this._topRightGridStyle,{left:0}));var f=P.createElement(o4,oB({},e,{cellRenderer:this._cellRendererTopRightGrid,className:this.props.classNameTopRightGrid,columnCount:Math.max(0,t-r)+ +!!a,columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheTopRightGrid,height:u,onScroll:o?this._onScrollLeft:void 0,ref:this._topRightGridRef,rowCount:i,scrollLeft:n,style:p,tabIndex:null,width:d}));return s?P.createElement("div",{className:"TopRightGrid_ScrollWrapper",style:rW({},this._topRightGridStyle,{height:c,width:d,overflowX:"hidden"})},f):f}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.scrollLeft!==t.scrollLeft||e.scrollTop!==t.scrollTop?{scrollLeft:null!=e.scrollLeft&&e.scrollLeft>=0?e.scrollLeft:t.scrollLeft,scrollTop:null!=e.scrollTop&&e.scrollTop>=0?e.scrollTop:t.scrollTop}:null}}]),t}(P.PureComponent);function rL(e){var t=e.className,o=e.columns,r=e.style;return P.createElement("div",{className:t,role:"row",style:r},o)}oW(rH,"defaultProps",{classNameBottomLeftGrid:"",classNameBottomRightGrid:"",classNameTopLeftGrid:"",classNameTopRightGrid:"",enableFixedColumnScroll:!1,enableFixedRowScroll:!1,fixedColumnCount:0,fixedRowCount:0,scrollToColumn:-1,scrollToRow:-1,style:{},styleBottomLeftGrid:{},styleBottomRightGrid:{},styleTopLeftGrid:{},styleTopRightGrid:{},hideTopRightGridScrollbar:!1,hideBottomLeftGridScrollbar:!1}),rH.propTypes={},oF(rH),function(e){function t(e,o){var r;return oE(this,t),(r=ok(this,oG(t).call(this,e,o))).state={clientHeight:0,clientWidth:0,scrollHeight:0,scrollLeft:0,scrollTop:0,scrollWidth:0},r._onScroll=r._onScroll.bind(oD(r)),r}return oA(t,e),oz(t,[{key:"render",value:function(){var e=this.props.children,t=this.state,o=t.clientHeight,r=t.clientWidth,i=t.scrollHeight,n=t.scrollLeft,s=t.scrollTop,l=t.scrollWidth;return e({clientHeight:o,clientWidth:r,onScroll:this._onScroll,scrollHeight:i,scrollLeft:n,scrollTop:s,scrollWidth:l})}},{key:"_onScroll",value:function(e){var t=e.clientHeight,o=e.clientWidth,r=e.scrollHeight,i=e.scrollLeft,n=e.scrollTop,s=e.scrollWidth;this.setState({clientHeight:t,clientWidth:o,scrollHeight:r,scrollLeft:i,scrollTop:n,scrollWidth:s})}}]),t}(P.PureComponent).propTypes={},rL.propTypes=null;let rP="DESC";function rF(e){var t=e.sortDirection,o=oU("ReactVirtualized__Table__sortableHeaderIcon",{"ReactVirtualized__Table__sortableHeaderIcon--ASC":"ASC"===t,"ReactVirtualized__Table__sortableHeaderIcon--DESC":t===rP});return P.createElement("svg",{className:o,width:18,height:18,viewBox:"0 0 24 24"},"ASC"===t?P.createElement("path",{d:"M7 14l5-5 5 5z"}):P.createElement("path",{d:"M7 10l5 5 5-5z"}),P.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))}function rB(e){var t=e.dataKey,o=e.label,r=e.sortBy,i=e.sortDirection,n=[P.createElement("span",{className:"ReactVirtualized__Table__headerTruncatedText",key:"label",title:"string"==typeof o?o:null},o)];return r===t&&n.push(P.createElement(rF,{key:"SortIndicator",sortDirection:i})),n}function rU(e){var t=e.className,o=e.columns,r=e.index,i=e.key,n=e.onRowClick,s=e.onRowDoubleClick,l=e.onRowMouseOut,a=e.onRowMouseOver,h=e.onRowRightClick,c=e.rowData,d=e.style,u={"aria-rowindex":r+1};return(n||s||l||a||h)&&(u["aria-label"]="row",u.tabIndex=0,n&&(u.onClick=function(e){return n({event:e,index:r,rowData:c})}),s&&(u.onDoubleClick=function(e){return s({event:e,index:r,rowData:c})}),l&&(u.onMouseOut=function(e){return l({event:e,index:r,rowData:c})}),a&&(u.onMouseOver=function(e){return a({event:e,index:r,rowData:c})}),h&&(u.onContextMenu=function(e){return h({event:e,index:r,rowData:c})})),P.createElement("div",oB({},u,{className:t,key:i,role:"row",style:d}),o)}rF.propTypes={},rB.propTypes=null,rU.propTypes=null;var rZ=function(e){function t(){return oE(this,t),ok(this,oG(t).apply(this,arguments))}return oA(t,e),t}(P.Component);function rj(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}function rV(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?rj(o,!0).forEach(function(t){oW(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):rj(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}oW(rZ,"defaultProps",{cellDataGetter:function(e){var t=e.dataKey,o=e.rowData;return"function"==typeof o.get?o.get(t):o[t]},cellRenderer:function(e){var t=e.cellData;return null==t?"":String(t)},defaultSortDirection:"ASC",flexGrow:0,flexShrink:1,headerRenderer:rB,style:{}}),rZ.propTypes={};var r$=function(e){function t(e){var o;return oE(this,t),(o=ok(this,oG(t).call(this,e))).state={scrollbarWidth:0},o._createColumn=o._createColumn.bind(oD(o)),o._createRow=o._createRow.bind(oD(o)),o._onScroll=o._onScroll.bind(oD(o)),o._onSectionRendered=o._onSectionRendered.bind(oD(o)),o._setRef=o._setRef.bind(oD(o)),o}return oA(t,e),oz(t,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(e){var t=e.alignment,o=e.index;return this.Grid?this.Grid.getOffsetForCell({alignment:t,rowIndex:o}).scrollTop:0}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,o=e.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:o,columnIndex:t})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,o=e.rowIndex;this.Grid&&this.Grid.recomputeGridSize({rowIndex:void 0===o?0:o,columnIndex:void 0===t?0:t})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"getScrollbarWidth",value:function(){if(this.Grid){var e=r(this.Grid),t=e.clientWidth||0;return(e.offsetWidth||0)-t}return 0}},{key:"componentDidMount",value:function(){this._setScrollbarWidth()}},{key:"componentDidUpdate",value:function(){this._setScrollbarWidth()}},{key:"render",value:function(){var e=this,t=this.props,o=t.children,r=t.className,i=t.disableHeader,n=t.gridClassName,s=t.gridStyle,l=t.headerHeight,a=t.headerRowRenderer,h=t.height,c=t.id,d=t.noRowsRenderer,u=t.rowClassName,p=t.rowStyle,f=t.scrollToIndex,m=t.style,g=t.width,v=this.state.scrollbarWidth,y="function"==typeof u?u({index:-1}):u,S="function"==typeof p?p({index:-1}):p;return this._cachedColumnStyles=[],P.Children.toArray(o).forEach(function(t,o){var r=e._getFlexStyleForColumn(t,t.props.style);e._cachedColumnStyles[o]=rV({overflow:"hidden"},r)}),P.createElement("div",{"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-colcount":P.Children.toArray(o).length,"aria-rowcount":this.props.rowCount,className:oU("ReactVirtualized__Table",r),id:c,role:"grid",style:m},!i&&a({className:oU("ReactVirtualized__Table__headerRow",y),columns:this._getHeaderColumns(),style:rV({height:l,overflow:"hidden",paddingRight:v,width:g},S)}),P.createElement(o4,oB({},this.props,{"aria-readonly":null,autoContainerWidth:!0,className:oU("ReactVirtualized__Table__Grid",n),cellRenderer:this._createRow,columnWidth:g,columnCount:1,height:i?h:h-l,id:void 0,noContentRenderer:d,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,role:"rowgroup",scrollbarWidth:v,scrollToRow:f,style:rV({},s,{overflowX:"hidden"})})))}},{key:"_createColumn",value:function(e){var t=e.column,o=e.columnIndex,r=e.isScrolling,i=e.parent,n=e.rowData,s=e.rowIndex,l=this.props.onColumnClick,a=t.props,h=a.cellDataGetter,c=a.cellRenderer,d=a.className,u=a.columnData,p=a.dataKey,f=a.id,m=c({cellData:h({columnData:u,dataKey:p,rowData:n}),columnData:u,columnIndex:o,dataKey:p,isScrolling:r,parent:i,rowData:n,rowIndex:s}),g=this._cachedColumnStyles[o],v="string"==typeof m?m:null;return P.createElement("div",{"aria-colindex":o+1,"aria-describedby":f,className:oU("ReactVirtualized__Table__rowColumn",d),key:"Row"+s+"-Col"+o,onClick:function(e){l&&l({columnData:u,dataKey:p,event:e})},role:"gridcell",style:g,title:v},m)}},{key:"_createHeader",value:function(e){var t,o,r,i,n,s=e.column,l=e.index,a=this.props,h=a.headerClassName,c=a.headerStyle,d=a.onHeaderClick,u=a.sort,p=a.sortBy,f=a.sortDirection,m=s.props,g=m.columnData,v=m.dataKey,y=m.defaultSortDirection,S=m.disableSort,w=m.headerRenderer,C=m.id,R=m.label,b=!S&&u,_=oU("ReactVirtualized__Table__headerColumn",h,s.props.headerClassName,{ReactVirtualized__Table__sortableHeaderColumn:b}),T=this._getFlexStyleForColumn(s,rV({},c,{},s.props.headerStyle)),x=w({columnData:g,dataKey:v,disableSort:S,label:R,sortBy:p,sortDirection:f});if(b||d){var E=p!==v?y:f===rP?"ASC":rP,M=function(e){b&&u({defaultSortDirection:y,event:e,sortBy:v,sortDirection:E}),d&&d({columnData:g,dataKey:v,event:e})};n=s.props["aria-label"]||R||v,i="none",r=0,t=M,o=function(e){("Enter"===e.key||" "===e.key)&&M(e)}}return p===v&&(i="ASC"===f?"ascending":"descending"),P.createElement("div",{"aria-label":n,"aria-sort":i,className:_,id:C,key:"Header-Col"+l,onClick:t,onKeyDown:o,role:"columnheader",style:T,tabIndex:r},x)}},{key:"_createRow",value:function(e){var t=this,o=e.rowIndex,r=e.isScrolling,i=e.key,n=e.parent,s=e.style,l=this.props,a=l.children,h=l.onRowClick,c=l.onRowDoubleClick,d=l.onRowRightClick,u=l.onRowMouseOver,p=l.onRowMouseOut,f=l.rowClassName,m=l.rowGetter,g=l.rowRenderer,v=l.rowStyle,y=this.state.scrollbarWidth,S="function"==typeof f?f({index:o}):f,w="function"==typeof v?v({index:o}):v,C=m({index:o}),R=P.Children.toArray(a).map(function(e,i){return t._createColumn({column:e,columnIndex:i,isScrolling:r,parent:n,rowData:C,rowIndex:o,scrollbarWidth:y})}),b=oU("ReactVirtualized__Table__row",S),_=rV({},s,{height:this._getRowHeight(o),overflow:"hidden",paddingRight:y},w);return g({className:b,columns:R,index:o,isScrolling:r,key:i,onRowClick:h,onRowDoubleClick:c,onRowRightClick:d,onRowMouseOver:u,onRowMouseOut:p,rowData:C,style:_})}},{key:"_getFlexStyleForColumn",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o="".concat(e.props.flexGrow," ").concat(e.props.flexShrink," ").concat(e.props.width,"px"),r=rV({},t,{flex:o,msFlex:o,WebkitFlex:o});return e.props.maxWidth&&(r.maxWidth=e.props.maxWidth),e.props.minWidth&&(r.minWidth=e.props.minWidth),r}},{key:"_getHeaderColumns",value:function(){var e=this,t=this.props,o=t.children;return(t.disableHeader?[]:P.Children.toArray(o)).map(function(t,o){return e._createHeader({column:t,index:o})})}},{key:"_getRowHeight",value:function(e){var t=this.props.rowHeight;return"function"==typeof t?t({index:e}):t}},{key:"_onScroll",value:function(e){var t=e.clientHeight,o=e.scrollHeight,r=e.scrollTop;(0,this.props.onScroll)({clientHeight:t,scrollHeight:o,scrollTop:r})}},{key:"_onSectionRendered",value:function(e){var t=e.rowOverscanStartIndex,o=e.rowOverscanStopIndex,r=e.rowStartIndex,i=e.rowStopIndex;(0,this.props.onRowsRendered)({overscanStartIndex:t,overscanStopIndex:o,startIndex:r,stopIndex:i})}},{key:"_setRef",value:function(e){this.Grid=e}},{key:"_setScrollbarWidth",value:function(){var e=this.getScrollbarWidth();this.setState({scrollbarWidth:e})}}]),t}(P.PureComponent);oW(r$,"defaultProps",{disableHeader:!1,estimatedRowSize:30,headerHeight:0,headerStyle:{},noRowsRenderer:function(){return null},onRowsRendered:function(){return null},onScroll:function(){return null},overscanIndicesGetter:o7,overscanRowCount:10,rowRenderer:rU,headerRowRenderer:rL,rowStyle:{},scrollToAlignment:"auto",scrollToIndex:-1,style:{}}),r$.propTypes={};var rK=[],rY=null,rq=null;function rX(){rq&&(rq=null,document.body&&null!=rY&&(document.body.style.pointerEvents=rY),rY=null)}function rJ(){rX(),rK.forEach(function(e){return e.__resetIsScrolling()})}function rQ(e){var t;e.currentTarget===window&&null==rY&&document.body&&(rY=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),rq&&o1(rq),t=0,rK.forEach(function(e){t=Math.max(t,e.props.scrollingResetTimeInterval)}),rq=o2(rJ,t),rK.forEach(function(t){t.props.scrollElement===e.currentTarget&&t.__handleWindowScrollEvent()})}function r0(e,t){rK.some(function(e){return e.props.scrollElement===t})||t.addEventListener("scroll",rQ),rK.push(e)}function r1(e,t){!(rK=rK.filter(function(t){return t!==e})).length&&(t.removeEventListener("scroll",rQ),rq&&(o1(rq),rX()))}var r2=function(e){return e===window},r5=function(e){return e.getBoundingClientRect()};function r3(e,t){if(!e)return{height:t.serverHeight,width:t.serverWidth};if(!r2(e))return r5(e);var o=window,r=o.innerHeight,i=o.innerWidth;return{height:"number"==typeof r?r:0,width:"number"==typeof i?i:0}}function r6(e){return r2(e)&&document.documentElement?{top:"scrollY"in window?window.scrollY:document.documentElement.scrollTop,left:"scrollX"in window?window.scrollX:document.documentElement.scrollLeft}:{top:e.scrollTop,left:e.scrollLeft}}function r4(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}var r7=function(){return"undefined"!=typeof window?window:void 0},r9=(k=D=function(e){function t(){oE(this,t);for(var e,o,r=arguments.length,i=Array(r),n=0;n<r;n++)i[n]=arguments[n];return oW(oD(o=ok(this,(e=oG(t)).call.apply(e,[this].concat(i)))),"_window",r7()),oW(oD(o),"_isMounted",!1),oW(oD(o),"_positionFromTop",0),oW(oD(o),"_positionFromLeft",0),oW(oD(o),"_detectElementResize",void 0),oW(oD(o),"_child",void 0),oW(oD(o),"state",function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?r4(o,!0).forEach(function(t){oW(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):r4(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}({},r3(o.props.scrollElement,o.props),{isScrolling:!1,scrollLeft:0,scrollTop:0})),oW(oD(o),"_registerChild",function(e){e&&Element,o._child=e,o.updatePosition()}),oW(oD(o),"_onChildScroll",function(e){var t=e.scrollTop;if(o.state.scrollTop!==t){var r=o.props.scrollElement;r&&("function"==typeof r.scrollTo?r.scrollTo(0,t+o._positionFromTop):r.scrollTop=t+o._positionFromTop)}}),oW(oD(o),"_registerResizeListener",function(e){e===window?window.addEventListener("resize",o._onResize,!1):o._detectElementResize.addResizeListener(e,o._onResize)}),oW(oD(o),"_unregisterResizeListener",function(e){e===window?window.removeEventListener("resize",o._onResize,!1):e&&o._detectElementResize.removeResizeListener(e,o._onResize)}),oW(oD(o),"_onResize",function(){o.updatePosition()}),oW(oD(o),"__handleWindowScrollEvent",function(){if(o._isMounted){var e=o.props.onScroll,t=o.props.scrollElement;if(t){var r=r6(t),i=Math.max(0,r.left-o._positionFromLeft),n=Math.max(0,r.top-o._positionFromTop);o.setState({isScrolling:!0,scrollLeft:i,scrollTop:n}),e({scrollLeft:i,scrollTop:n})}}}),oW(oD(o),"__resetIsScrolling",function(){o.setState({isScrolling:!1})}),o}return oA(t,e),oz(t,[{key:"updatePosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.scrollElement,t=this.props.onResize,o=this.state,i=o.height,n=o.width,s=this._child||r(this);if(s instanceof Element&&e){var l=function(e,t){if(r2(t)&&document.documentElement){var o=document.documentElement,r=r5(e),i=r5(o);return{top:r.top-i.top,left:r.left-i.left}}var n=r6(t),s=r5(e),l=r5(t);return{top:s.top+n.top-l.top,left:s.left+n.left-l.left}}(s,e);this._positionFromTop=l.top,this._positionFromLeft=l.left}var a=r3(e,this.props);(i!==a.height||n!==a.width)&&(this.setState({height:a.height,width:a.width}),t({height:a.height,width:a.width}))}},{key:"componentDidMount",value:function(){var e=this.props.scrollElement;this._detectElementResize=re(),this.updatePosition(e),e&&(r0(this,e),this._registerResizeListener(e)),this._isMounted=!0}},{key:"componentDidUpdate",value:function(e,t){var o=this.props.scrollElement,r=e.scrollElement;r!==o&&null!=r&&null!=o&&(this.updatePosition(o),r1(this,r),r0(this,o),this._unregisterResizeListener(r),this._registerResizeListener(o))}},{key:"componentWillUnmount",value:function(){var e=this.props.scrollElement;e&&(r1(this,e),this._unregisterResizeListener(e)),this._isMounted=!1}},{key:"render",value:function(){var e=this.props.children,t=this.state,o=t.isScrolling,r=t.scrollTop,i=t.scrollLeft,n=t.height,s=t.width;return e({onChildScroll:this._onChildScroll,registerChild:this._registerChild,height:n,isScrolling:o,scrollLeft:i,scrollTop:r,width:s})}}]),t}(P.PureComponent),oW(D,"propTypes",null),k);oW(r9,"defaultProps",{onResize:function(){},onScroll:function(){},scrollingResetTimeInterval:150,scrollElement:r7(),serverHeight:0,serverWidth:0});var r8=A(656),ie=function(){return(ie=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var i in t=arguments[o])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},it={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},io={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},ir={width:"20px",height:"20px",position:"absolute",zIndex:1},ii={top:ie(ie({},it),{top:"-5px"}),right:ie(ie({},io),{left:void 0,right:"-5px"}),bottom:ie(ie({},it),{top:void 0,bottom:"-5px"}),left:ie(ie({},io),{left:"-5px"}),topRight:ie(ie({},ir),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:ie(ie({},ir),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:ie(ie({},ir),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:ie(ie({},ir),{left:"-10px",top:"-10px",cursor:"nw-resize"})},is=(0,P.memo)(function(e){var t=e.onResizeStart,o=e.direction,r=e.children,i=e.replaceStyles,n=e.className,s=(0,P.useCallback)(function(e){t(e,o)},[t,o]),l=(0,P.useCallback)(function(e){t(e,o)},[t,o]),a=(0,P.useMemo)(function(){return ie(ie({position:"absolute",userSelect:"none"},ii[o]),null!=i?i:{})},[i,o]);return(0,r8.jsx)("div",{className:n||void 0,style:a,onMouseDown:s,onTouchStart:l,children:r})}),il=(u=function(e,t){return(u=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),ia=function(){return(ia=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var i in t=arguments[o])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},ih={width:"auto",height:"auto"},ic=function(e,t,o){return Math.max(Math.min(e,o),t)},id=function(e,t,o){var r=Math.round(e/t);return r*t+o*(r-1)},iu=function(e,t){return RegExp(e,"i").test(t)},ip=function(e){return!!(e.touches&&e.touches.length)},im=function(e,t,o){void 0===o&&(o=0);var r=t.reduce(function(o,r,i){return Math.abs(r-e)<Math.abs(t[o]-e)?i:o},0),i=Math.abs(t[r]-e);return 0===o||i<o?t[r]:e},ig=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:"".concat(e,"px")},iv=function(e,t,o,r){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%")){var i=Number(e.replace("%",""))/100;return t*i}if(e.endsWith("vw")){var i=Number(e.replace("vw",""))/100;return o*i}if(e.endsWith("vh")){var i=Number(e.replace("vh",""))/100;return r*i}}return e},iy=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],iS="__resizable_base__",iw=function(e){function t(t){var o,r,i,n,s=e.call(this,t)||this;return s.ratio=1,s.resizable=null,s.parentLeft=0,s.parentTop=0,s.resizableLeft=0,s.resizableRight=0,s.resizableTop=0,s.resizableBottom=0,s.targetLeft=0,s.targetTop=0,s.delta={width:0,height:0},s.appendBase=function(){if(!s.resizable||!s.window)return null;var e=s.parentNode;if(!e)return null;var t=s.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(iS):t.className+=iS,e.appendChild(t),t},s.removeBase=function(e){var t=s.parentNode;t&&t.removeChild(e)},s.state={isResizing:!1,width:null!=(r=null==(o=s.propsSize)?void 0:o.width)?r:"auto",height:null!=(n=null==(i=s.propsSize)?void 0:i.height)?n:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},s.onResizeStart=s.onResizeStart.bind(s),s.onMouseMove=s.onMouseMove.bind(s),s.onMouseUp=s.onMouseUp.bind(s),s}return il(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||ih},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var o=this.resizable.offsetWidth,r=this.resizable.offsetHeight,i=this.resizable.style.position;"relative"!==i&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:o,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:r,this.resizable.style.position=i}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,o=function(t){var o;if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&(null==(o=e.propsSize[t])?void 0:o.toString().endsWith("%"))){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var r=e.getParentSize(),i=Number(e.state[t].toString().replace("px",""))/r[t]*100;return"".concat(i,"%")}return ig(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?ig(t.width):o("width"),height:t&&void 0!==t.height&&!this.state.isResizing?ig(t.height):o("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,o=this.parentNode.style.flexWrap;"wrap"!==o&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var r={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=o),this.removeBase(e),r},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var o=this.propsSize&&this.propsSize[t];return"auto"===this.state[t]&&this.state.original[t]===e&&(void 0===o||"auto"===o)?"auto":e},t.prototype.calculateNewMaxFromBoundary=function(e,t){var o,r,i=this.props.boundsByDirection,n=this.state.direction,s=i&&iu("left",n),l=i&&iu("top",n);if("parent"===this.props.bounds){var a=this.parentNode;a&&(o=s?this.resizableRight-this.parentLeft:a.offsetWidth+(this.parentLeft-this.resizableLeft),r=l?this.resizableBottom-this.parentTop:a.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(o=s?this.resizableRight:this.window.innerWidth-this.resizableLeft,r=l?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(o=s?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),r=l?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return o&&Number.isFinite(o)&&(e=e&&e<o?e:o),r&&Number.isFinite(r)&&(t=t&&t<r?t:r),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var o,r=this.props.scale||1,i=Array.isArray(o=this.props.resizeRatio||1)?o:[o,o],n=i[0],s=i[1],l=this.state,a=l.direction,h=l.original,c=this.props,d=c.lockAspectRatio,u=c.lockAspectRatioExtraHeight,p=c.lockAspectRatioExtraWidth,f=h.width,m=h.height,g=u||0,v=p||0;return iu("right",a)&&(f=h.width+(e-h.x)*n/r,d&&(m=(f-v)/this.ratio+g)),iu("left",a)&&(f=h.width-(e-h.x)*n/r,d&&(m=(f-v)/this.ratio+g)),iu("bottom",a)&&(m=h.height+(t-h.y)*s/r,d&&(f=(m-g)*this.ratio+v)),iu("top",a)&&(m=h.height-(t-h.y)*s/r,d&&(f=(m-g)*this.ratio+v)),{newWidth:f,newHeight:m}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,o,r){var i=this.props,n=i.lockAspectRatio,s=i.lockAspectRatioExtraHeight,l=i.lockAspectRatioExtraWidth,a=void 0===r.width?10:r.width,h=void 0===o.width||o.width<0?e:o.width,c=void 0===r.height?10:r.height,d=void 0===o.height||o.height<0?t:o.height,u=s||0,p=l||0;if(n){var f=(c-u)*this.ratio+p,m=(d-u)*this.ratio+p,g=(a-p)/this.ratio+u,v=(h-p)/this.ratio+u,y=Math.max(c,g),S=Math.min(d,v);e=ic(e,Math.max(a,f),Math.min(h,m)),t=ic(t,y,S)}else e=ic(e,a,h),t=ic(t,c,d);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){var e=1/(this.props.scale||1);if("parent"===this.props.bounds){var t=this.parentNode;if(t){var o=t.getBoundingClientRect();this.parentLeft=o.left*e,this.parentTop=o.top*e}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var r=this.props.bounds.getBoundingClientRect();this.targetLeft=r.left*e,this.targetTop=r.top*e}if(this.resizable){var i=this.resizable.getBoundingClientRect(),n=i.left,s=i.top,l=i.right,a=i.bottom;this.resizableLeft=n*e,this.resizableRight=l*e,this.resizableTop=s*e,this.resizableBottom=a*e}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var o,r,i=0,n=0;if(e.nativeEvent&&((o=e.nativeEvent).clientX||0===o.clientX)&&(o.clientY||0===o.clientY)?(i=e.nativeEvent.clientX,n=e.nativeEvent.clientY):e.nativeEvent&&ip(e.nativeEvent)&&(i=e.nativeEvent.touches[0].clientX,n=e.nativeEvent.touches[0].clientY),!this.props.onResizeStart||!this.resizable||!1!==this.props.onResizeStart(e,t,this.resizable)){this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var s=this.window.getComputedStyle(this.resizable);if("auto"!==s.flexBasis){var l=this.parentNode;if(l){var a=this.window.getComputedStyle(l).flexDirection;this.flexDir=a.startsWith("row")?"row":"column",r=s.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var h={original:{x:i,y:n,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:ia(ia({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:r};this.setState(h)}}},t.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&ip(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var o,r,n,s,l,a,h=this.props,c=h.maxWidth,d=h.maxHeight,u=h.minWidth,p=h.minHeight,f=ip(e)?e.touches[0].clientX:e.clientX,m=ip(e)?e.touches[0].clientY:e.clientY,g=this.state,v=g.direction,y=g.original,S=g.width,w=g.height,C=this.getParentSize(),R=(o=this.window.innerWidth,r=this.window.innerHeight,n=c,s=d,l=u,a=p,n=iv(n,C.width,o,r),s=iv(s,C.height,o,r),l=iv(l,C.width,o,r),a=iv(a,C.height,o,r),{maxWidth:void 0===n?void 0:Number(n),maxHeight:void 0===s?void 0:Number(s),minWidth:void 0===l?void 0:Number(l),minHeight:void 0===a?void 0:Number(a)});c=R.maxWidth,d=R.maxHeight,u=R.minWidth,p=R.minHeight;var b=this.calculateNewSizeFromDirection(f,m),_=b.newHeight,T=b.newWidth,x=this.calculateNewMaxFromBoundary(c,d);this.props.snap&&this.props.snap.x&&(T=im(T,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(_=im(_,this.props.snap.y,this.props.snapGap));var E=this.calculateNewSizeFromAspectRatio(T,_,{width:x.maxWidth,height:x.maxHeight},{width:u,height:p});if(T=E.newWidth,_=E.newHeight,this.props.grid){var M=id(T,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),I=id(_,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),O=this.props.snapGap||0,z=0===O||Math.abs(M-T)<=O?M:T,D=0===O||Math.abs(I-_)<=O?I:_;T=z,_=D}var k={width:T-y.width,height:_-y.height};if(this.delta=k,S&&"string"==typeof S){if(S.endsWith("%")){var G=T/C.width*100;T="".concat(G,"%")}else if(S.endsWith("vw")){var N=T/this.window.innerWidth*100;T="".concat(N,"vw")}else if(S.endsWith("vh")){var A=T/this.window.innerHeight*100;T="".concat(A,"vh")}}if(w&&"string"==typeof w){if(w.endsWith("%")){var G=_/C.height*100;_="".concat(G,"%")}else if(w.endsWith("vw")){var N=_/this.window.innerWidth*100;_="".concat(N,"vw")}else if(w.endsWith("vh")){var A=_/this.window.innerHeight*100;_="".concat(A,"vh")}}var W={width:this.createSizeForCssProperty(T,"width"),height:this.createSizeForCssProperty(_,"height")};"row"===this.flexDir?W.flexBasis=W.width:"column"===this.flexDir&&(W.flexBasis=W.height);var H=this.state.width!==W.width,L=this.state.height!==W.height,P=this.state.flexBasis!==W.flexBasis,F=H||L||P;F&&i(function(){t.setState(W)}),this.props.onResize&&F&&this.props.onResize(e,v,this.resizable,k)}},t.prototype.onMouseUp=function(e){var t,o,r=this.state,i=r.isResizing,n=r.direction;r.original,i&&this.resizable&&(this.props.onResizeStop&&this.props.onResizeStop(e,n,this.resizable,this.delta),this.props.size&&this.setState({width:null!=(t=this.props.size.width)?t:"auto",height:null!=(o=this.props.size.height)?o:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:ia(ia({},this.state.backgroundStyle),{cursor:"auto"})}))},t.prototype.updateSize=function(e){var t,o;this.setState({width:null!=(t=e.width)?t:"auto",height:null!=(o=e.height)?o:"auto"})},t.prototype.renderResizer=function(){var e=this,t=this.props,o=t.enable,r=t.handleStyles,i=t.handleClasses,n=t.handleWrapperStyle,s=t.handleWrapperClass,l=t.handleComponent;if(!o)return null;var a=Object.keys(o).map(function(t){return!1!==o[t]?(0,r8.jsx)(is,{direction:t,onResizeStart:e.onResizeStart,replaceStyles:r&&r[t],className:i&&i[t],children:l&&l[t]?l[t]:null},t):null});return(0,r8.jsx)("div",{className:s,style:n,children:a})},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce(function(t,o){return -1!==iy.indexOf(o)||(t[o]=e.props[o]),t},{}),o=ia(ia(ia({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(o.flexBasis=this.state.flexBasis);var r=this.props.as||"div";return(0,r8.jsxs)(r,ia({style:o,className:this.props.className},t,{ref:function(t){t&&(e.resizable=t)},children:[this.state.isResizing&&(0,r8.jsx)("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(P.PureComponent);let iC={top:!1,right:!1,bottom:!1,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},iR={min:0,max:1/0},ib=({height:e,heightConstraints:t,width:o,widthConstraints:r})=>({height:q(e,t.min,t.max),width:q(o,r.min,r.max)}),i_=({enable:e,height:t,heightConstraints:o,resizeEdge:r,width:i=0,widthConstraints:n})=>({...ib({height:t,widthConstraints:n,heightConstraints:o,width:i}),enable:void 0===e||e,horizontal:"left"===r||"right"===r,initialHeight:t,initialWidth:i,resizing:!1,vertical:"top"===r||"bottom"===r});class iT extends P.PureComponent{static defaultProps={className:"",enable:!0,heightConstraints:iR,resizeContentClassName:"",resizeHandleClassName:"",style:{},wrapperStyle:{},translate:()=>"",wrapChildrenInDivContainer:!0,widthConstraints:iR};constructor(e){super(e),this.state=i_(e)}static getDerivedStateFromProps(e,t){return t.resizing?t:i_(e)}componentDidUpdate(e){let{onResizeFromPropChange:t}=this.props,{height:o,resizing:r,width:i}=this.state,{onResizeFromPropChange:n}=e;if(r)return;let{height:s,width:l}=this.state,a=n||t;a&&(s!==o||l!==i)&&a({height:s,width:l,originalHeight:o,originalWidth:i})}_onResize=(e,t,o,{height:r,width:i})=>{let{onResize:n}=this.props,{height:s,horizontal:l,vertical:a,width:h}=this.state,{height:c,width:d}=(({deltaWidth:e,deltaHeight:t},{heightConstraints:o,widthConstraints:r},{initialHeight:i,initialWidth:n})=>ib({height:i+t,heightConstraints:o,width:n+e,widthConstraints:r}))({deltaWidth:i,deltaHeight:r},this.props,this.state),u=l&&d!==h,p=a&&c!==s;(u||p)&&(this.setState({height:p?c:s,width:u?d:h}),n&&n({height:p?c:void 0,width:u?d:void 0}))};_onResizeStart=e=>{e.preventDefault(),e.stopPropagation();let{onResizeStart:t}=this.props,{height:o,horizontal:r,vertical:i,width:n}=this.state;this.setState({resizing:!0}),t&&t({height:i?o:void 0,width:r?n:void 0})};_onResizeEnd=()=>{let{onResizeEnd:e}=this.props,{height:t,horizontal:o,vertical:r,width:i,initialWidth:n,initialHeight:s}=this.state;this.setState({initialWidth:i,initialHeight:t,resizing:!1}),(n!==i||s!==t)&&e&&e({width:o?i:void 0,height:r?t:void 0})};render(){let{children:e,className:t,handleStyles:o,id:r,resizeContentClassName:i,resizeEdge:n,resizeHandleClassName:s,style:l,translate:a,heightConstraints:h,wrapChildrenInDivContainer:c,widthConstraints:d}=this.props,{enable:u,height:p,horizontal:f,resizing:m,vertical:g,width:v}=this.state,{display:y,...S}=l,{min:w,max:C}=d,{min:R,max:b}=h,_={...this.props.wrapperStyle};f&&(_.width=v,_.minWidth=v),g&&(_.height=p,_.minHeight=p);let T=L()("resizable",t,{resizing:m}),x=L()("contents",i,`resize-edge-${n}`,{horizontal:f,vertical:g}),E=L()(n,s,"resizable-handle",{horizontal:f,vertical:g}),M=P.createElement("span",{title:a("ResizePanel")});return P.createElement("div",{"data-testid":`resizable-${r||""}`,style:{..._,display:y}},P.createElement(iw,{className:T,"data-testid":`resizable-core-${r||""}`,enable:{...iC,[n]:u},handleClasses:{[n]:E},handleComponent:{[n]:M},handleStyles:o,maxHeight:g?b:void 0,maxWidth:f?C:void 0,minHeight:g?R:void 0,minWidth:f?w:void 0,onResize:this._onResize,onResizeStart:this._onResizeStart,onResizeStop:this._onResizeEnd,size:{height:g?p:"100%",width:f?v:"100%"},style:S},c?P.createElement("div",{className:x,style:{userSelect:"none"}},e):e))}}var ix=A(898);let iE=L()("absolute","top-0","right-0","bottom-0","left-0","time-line"),iM=L()(iE,"z2");var iI=function({z2:e}){return P.createElement("div",{className:e?iM:iE,style:{height:2}})};function iO({message:e}){return P.default.createElement("span",{className:"time-line-message-container"},P.default.createElement("span",{className:"time-line-message"},e))}let iz=L()("graph-row-wrapper","grow-3","height-100","graph-zone-column","min-width-0","pb3","pointer","pt3","relative"),iD=L()("graph-row","height-100-percent","flex");function ik(e){let t,o,r,i=(0,ix.c)(18),{processedRows:n,scrollTop:s,translate:l}=e;if(i[0]!==n){t=[];for(let e=0;e<n.length;e++){let o=n[e];o.timeLineEntry&&t.push({row:o,index:e,position:e*em})}i[0]=n,i[1]=t}else t=i[1];let a=t;e:{let e,t,r,n;if(!a.length){o=null;break e}if(i[2]!==s||i[3]!==a){for(let o of a)if(o.position<=s)e=o.row;else{t=o;break}i[2]=s,i[3]=a,i[4]=e,i[5]=t}else e=i[4],t=i[5];if(t&&t.position-s<=em/2&&(e=t.row),!e){o=null;break e}i[6]!==e.timeLineEntry?(r=e.timeLineEntry??{},i[6]=e.timeLineEntry,i[7]=r):r=i[7];let{label:h,value:c}=r,d=void 0===h?"":h,u=void 0===c?0:c;i[8]!==d||i[9]!==l||i[10]!==u?(n=l(d,u),i[8]=d,i[9]=l,i[10]=u,i[11]=n):n=i[11],o=n}let h=o;if(null==h||s<em)return null;if(i[12]!==h){let e,t,o,n;i[14]===Symbol.for("react.memo_cache_sentinel")?(e={className:"sticky-timeline-container"},i[14]=e):e=i[14],i[15]===Symbol.for("react.memo_cache_sentinel")?(t={className:iz},o=P.default.createElement(iI,null),i[15]=t,i[16]=o):(t=i[15],o=i[16]),i[17]===Symbol.for("react.memo_cache_sentinel")?(n={className:iD},i[17]=n):n=i[17],r=P.default.createElement("div",e,P.default.createElement("div",t,o,P.default.createElement("div",n,P.default.createElement(iO,{message:h})))),i[12]=h,i[13]=r}else r=i[13];return r}class iG extends P.PureComponent{canvas;componentDidMount(){this.updateCanvas()}componentDidUpdate(e){(e.branchUpstreamRowIndices!==this.props.branchUpstreamRowIndices||e.markerRowIndices!==this.props.markerRowIndices||e.totalRows!==this.props.totalRows||e.viewportHeight!==this.props.viewportHeight||e.viewportWidth!==this.props.viewportWidth||e.markerColors!==this.props.markerColors||e.enabledScrollMarkerTypes!==this.props.enabledScrollMarkerTypes||e.scrollWidth!==this.props.scrollWidth)&&this.updateCanvas()}updateCanvas(e){let{branchUpstreamRowIndices:t,enabledScrollMarkerTypes:o,viewportHeight:r,markerRowIndices:i,markerColors:n,scrollWidth:s,totalRows:l}=e||this.props,a=this.canvas.getContext("2d");a.canvas.width=s,a.canvas.height=r;let h=s/ep;for(let[e,s]of(a.clearRect(0,0,a.canvas.width,a.canvas.height),Object.entries(tp))){if(!o.includes(e)&&!("remoteBranches"===e&&o.includes("localBranches")))continue;let c="remoteBranches"!==e||o.includes("remoteBranches")?i[e]||[]:t,d=n[e],u=s.lanes;d&&c.length&&(a.fillStyle=d,c.forEach(t=>{let{height:o,offset:i}=function(e,t,o){let r=t*em,{shape:i}=tp[e],n=tu[i];if(!n)return{height:0,offset:0};let{baseHeight:s,minHeight:l,maxHeight:a}=n,h=o/r*s;void 0!==l&&h<l&&(h=l),void 0!==a&&h>a&&(h=a);let c=o/r*em,d=h>=c?0:(c-h)/2;return{height:h,offset:d}}(e,l,r);u.length&&a.fillRect(u[0]*h,function(e,t,o){let r=o*em;return e*em/r*t}(t,r,l)+i-.5*o,h*u.length,o)}))}}render(){return P.createElement("canvas",{className:"graph-scroll-markers",ref:e=>{this.canvas=e}})}}var iN=function({children:e,className:t,height:r,heightAdjustment:i,graphZoneType:n,scrollTop:s,style:l}){let a=tg[n].listId,h=document.getElementById(a),c=h?.scrollHeight||0,d=r-28;void 0!==s&&(d=Number(l.top)-s,h&&c-r-s<0&&(d=r-i-28));let u={top:d,zIndex:2},p=P.createElement("span",{className:"absolute",style:u},e);return P.createElement("div",{className:t,style:l},h?o.createPortal(p,document.getElementById("graph-container")):p)};function iA({inline:e,getExternalIcon:t,message:o,size:r=100,useSimpleSpinner:i}){let n=L()("loading-spinner",{"inline-block":e,ml2:e,"shrink-0":e}),s=L()("spinner","mr1",{"inline-block":e}),l={height:r,width:r},a=L()("message",{"inline-block":e,mx2:e}),h=i?P.createElement("span",{className:s,style:l},t("loading")):P.createElement("div",{className:s,style:l},P.createElement("img",{className:"ring outer",src:"../../../images/spinner-outer-ring.svg",style:l}),P.createElement("img",{className:"ring inner",src:"../../../images/spinner-inner-ring.svg",style:l}),P.createElement("img",{className:"bg-img",src:"../../../images/spinner-kraken.svg",style:l}));return P.createElement("div",{className:n},h,o&&P.createElement("div",{className:a},o))}class iW extends P.Component{render(){let{currentCommits:e,customFooterRow:t,graphZoneType:o,hasMoreCommits:r,height:i,horizontalScrollHeight:n,getExternalIcon:s,isLoadingRows:l,scrollTop:a,style:h,translate:c}=this.props,d=P.createElement(iA,{className:"loading-spinner",getExternalIcon:s,size:20,useSimpleSpinner:!0}),u=P.createElement("div",{className:"flex items-center"},P.createElement("span",{style:{paddingRight:"5px"}},d)),p=0!==(e>0?e:0)||r?t:P.createElement(P.Fragment,null,c("Graph-NoCommits")),f=P.createElement("div",{className:"graph-adjust-commit-count p1"},l?u:p);return P.createElement(iN,{graphZoneType:o,height:i,heightAdjustment:n,scrollTop:a,style:h},f)}}function iH({branchUpstreamRowIndices:e,rowCount:t,cellRenderersByIds:o,columnIndex:r,customFooterRow:i,enabledScrollMarkerTypes:n,enableResizer:s,getExternalIcon:l,getKeyForCell:a,graphHeight:h,graphWidth:c,graphZoneType:d,graphZones:u,hasMoreCommits:p,horizontalScrollHeight:f,isFilteredSearch:m,isLoadingRows:g,markerColors:v,markerRowIndices:y,onResize:S,onResizeEnd:w,onResizeFromPropChange:C,onScroll:R,onScrollToRowCausedUpdate:b,onZoneEnter:_,processedRows:T,scrollLeft:x,scrollToAlignment:E,scrollToIndex:M,scrollTop:I,smartCellRangeRenderer:O,stickyTimeline:z,translate:D,verticalScrollWidth:k}){let G=(0,P.useRef)(null),N=tB(d,u);if(!N)return null;let A=tA(d,u),W=p||g||0===t,H=tW(t,p,g),F=tH(N,t),B=em*tW(t,p,g),U=k>0,Z=!m&&n.length>0,j=L()("graph-panel","react-virtualized-list","pad-for-horizontal-scrollbar",d===to?"z3":null,{"pad-for-vertical-scrollbar":U}),V=d===tr?{...!A&&{position:"static"},...A&&{width:N.currentWidth>F?N.currentWidth:F,maxWidth:"none"}}:void 0,$=(e,t)=>{if(e<=t)return!1;let o=(()=>{let e=G.current;if(e?.isConnected)return e;let t=document.getElementById(N.listId);return G.current=t,t})();return null!=o&&tE(o)},K=(e,n,s,u,m,v,y,S)=>P.createElement(o4,{autoContainerWidth:!0,cellRangeRenderer:O,cellRenderer:n=>((e,n)=>{let s;if(n.rowIndex>t-1)return W&&0===r?P.createElement(iW,{currentCommits:t-1,customFooterRow:i,getExternalIcon:l,graphZoneType:d,hasMoreCommits:p,height:h,horizontalScrollHeight:f,isLoadingRows:g,key:a(n.rowIndex),scrollTop:I,style:n.style,translate:D}):void 0;let c={...n,style:{...n.style}};tt===e&&(c.style.top=Number(n.style.top)-I);let u=o[e];return u?(s=u(c),P.createElement("span",{"data-column-name":e,"data-row-idx":n.rowIndex,key:`gk-row-${n.key}`,style:{top:n.style.top}},s)):void 0})(e,n),className:s,columnCount:1,columnWidth:S,containerStyle:u,height:y,id:n,key:n,onScrollToTargetCausedUpdate:b?e=>b(d,e,c,h,p):void 0,overscanRowCount:0,rowCount:H,rowHeight:em,scrollLeft:x,scrollToAlignment:E,scrollTop:I,scrollToRow:M,style:m,tabIndex:null,width:v}),Y=K(N.type,N.listId,j,V,{position:"absolute"},N.currentWidth,h,F),q=A?P.createElement("div",{className:"timeline-column-container",onWheelCapture:e=>{let t;$(t=(t=I+e.deltaY)>=0?t:0,I)||R(d,{clientHeight:B,clientWidth:F,scrollHeight:f,scrollLeft:0,scrollTop:t,scrollWidth:k},c,h,p)}},z&&T&&P.createElement(ik,{processedRows:T,scrollTop:I,translate:D}),K(tt,"timeline-column","graph-panel react-virtualized-list timeline-column",{overflow:"visible",zIndex:3,maxHeight:B},{position:"absolute",right:0,zIndex:3,maxHeight:h},1,h,1)):void 0,X=Y&&P.createElement(P.Fragment,null,q,Z&&A?P.createElement(iG,{branchUpstreamRowIndices:e,enabledScrollMarkerTypes:n,markerColors:v,markerRowIndices:y,scrollWidth:k,totalRows:H,viewportHeight:h<B?h:B,viewportWidth:N.currentWidth}):null,P.createElement(t0,{contentHeight:B,contentWidth:F,displayHorizontalScrollbar:N.type===tr,displayVerticalScrollbar:A,forceOnVerticalWheel:!A,forceVerticalScrollbar:A&&Z,height:h,onScroll:e=>{!$(e.scrollTop,I)&&R(d,e,c,h,p)},scrollLeft:x,scrollTop:I,width:N.currentWidth},Y)),J=P.createElement("div",{onMouseEnter:_},X);return A?J:P.createElement(iT,{enable:s,height:h,id:`${d}Column`,key:`${d}Column`,onResize:S?e=>S(N,e):void 0,onResizeEnd:w?e=>w(N,e):void 0,onResizeFromPropChange:C?e=>C(N,e):void 0,resizeContentClassName:"z1",resizeEdge:"right",resizeHandleClassName:"z1",width:N.currentWidth,widthConstraints:tj(d,u,c)},J)}var iL=A(175),iP=A.n(iL);let iF="dnd-container";class iB extends P.PureComponent{dndDrake;childReactElementsById={};constructor(e){super(e),this.loadChildrenReactElements(this.props.children)}componentDidMount(){this.dndDrake&&this.dndDrake.on("drop",this.onDrop)}componentDidUpdate(e){this.props.children!==e.children&&this.loadChildrenReactElements(e.children)}componentWillUnmount(){this.dndDrake&&this.dndDrake.destroy()}onDrop=(e,t,o,r)=>{if(this.props.onDrop&&e.id){let t=this.sanitizeId(e.id),o=r?.id?this.sanitizeId(r.id):null,i=this.childReactElementsById[t],n=o?this.childReactElementsById[o]:null;i&&this.props.onDrop(i,n)}};isContainerCallback=e=>e?.classList.contains(iF)??!1;movesCallback=e=>!!e?.id&&this.isDraggable(e.id);acceptsCallback=(e,t,o,r)=>!!e?.id&&this.isDroppable(e.id,r?.id);invalidCallBack=()=>!1;dndDecorator=e=>{if(e){let t={isContainer:this.isContainerCallback,mirrorContainer:this.props.mirrorContainer,moves:this.movesCallback,accepts:this.acceptsCallback,invalid:this.invalidCallBack,direction:this.props.direction||"horizontal",copy:!1,copySortSource:!1,revertOnSpill:!1,removeOnSpill:!1,ignoreInputTextSelection:!0};this.dndDrake=iP()([e],t)}};loadChildrenReactElements(e){this.childReactElementsById={},e&&(e instanceof Array?e.forEach(e=>{P.isValidElement(e)&&this.addChildReactElement(e)}):P.isValidElement(e)&&this.addChildReactElement(e))}addChildReactElement(e){let t=e.props.id;t&&(this.childReactElementsById[this.sanitizeId(t)]=e)}sanitizeId(e){return e.trim().toLowerCase().replace(/-/g,"").replace(/_/g,"")}isDraggable(e){if(this.props.isDraggable){let t=this.sanitizeId(e),o=this.childReactElementsById[t];return!!o&&this.props.isDraggable(o)}return!1}isDroppable(e,t){if(this.props.isDroppable){let o=this.sanitizeId(e),r=t?this.sanitizeId(t):null,i=this.childReactElementsById[o],n=r?this.childReactElementsById[r]:null;if(i)return this.props.isDroppable(i,n)}return!1}render(){let{children:e,className:t}=this.props,o=L()(iF,t);return P.createElement("div",{className:o,ref:this.dndDecorator},e)}}function iU(){return(0,P.useState)(null)}let iZ=e=>e&&"function"!=typeof e?t=>{e.current=t}:e,ij=function(e,t){return(0,P.useMemo)(()=>{let o,r;return o=iZ(e),r=iZ(t),e=>{o&&o(e),r&&r(e)}},[e,t])};var iV=Object.prototype.hasOwnProperty;function i$(e,t,o){for(o of e.keys())if(iK(o,t))return o}function iK(e,t){var o,r,i;if(e===t)return!0;if(e&&t&&(o=e.constructor)===t.constructor){if(o===Date)return e.getTime()===t.getTime();if(o===RegExp)return e.toString()===t.toString();if(o===Array){if((r=e.length)===t.length)for(;r--&&iK(e[r],t[r]););return -1===r}if(o===Set){if(e.size!==t.size)return!1;for(r of e)if((i=r)&&"object"==typeof i&&!(i=i$(t,i))||!t.has(i))return!1;return!0}if(o===Map){if(e.size!==t.size)return!1;for(r of e)if((i=r[0])&&"object"==typeof i&&!(i=i$(t,i))||!iK(r[1],t.get(i)))return!1;return!0}if(o===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(o===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return -1===r}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return -1===r}if(!o||"object"==typeof e){for(o in r=0,e)if(iV.call(e,o)&&++r&&!iV.call(t,o)||!(o in t)||!iK(e[o],t[o]))return!1;return Object.keys(t).length===r}}return e!=e&&t!=t}let iY=function(e){let t,o,r=(t=(0,P.useRef)(!0),o=(0,P.useRef)(()=>t.current),(0,P.useEffect)(()=>(t.current=!0,()=>{t.current=!1}),[]),o.current);return[e[0],(0,P.useCallback)(t=>{if(r())return e[1](t)},[r,e[1]])]};function iq(e){return e.split("-")[0]}function iX(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function iJ(e){var t=iX(e).Element;return e instanceof t||e instanceof Element}function iQ(e){var t=iX(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function i0(e){if("undefined"==typeof ShadowRoot)return!1;var t=iX(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var i1=Math.max,i2=Math.min,i5=Math.round;function i3(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function i6(){return!/^((?!chrome|android).)*safari/i.test(i3())}function i4(e,t,o){void 0===t&&(t=!1),void 0===o&&(o=!1);var r=e.getBoundingClientRect(),i=1,n=1;t&&iQ(e)&&(i=e.offsetWidth>0&&i5(r.width)/e.offsetWidth||1,n=e.offsetHeight>0&&i5(r.height)/e.offsetHeight||1);var s=(iJ(e)?iX(e):window).visualViewport,l=!i6()&&o,a=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/n,c=r.width/i,d=r.height/n;return{width:c,height:d,top:h,right:a+c,bottom:h+d,left:a,x:a,y:h}}function i7(e){var t=i4(e),o=e.offsetWidth,r=e.offsetHeight;return 1>=Math.abs(t.width-o)&&(o=t.width),1>=Math.abs(t.height-r)&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:o,height:r}}function i9(e,t){var o=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(o&&i0(o)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function i8(e){return e?(e.nodeName||"").toLowerCase():null}function ne(e){return iX(e).getComputedStyle(e)}function nt(e){return((iJ(e)?e.ownerDocument:e.document)||window.document).documentElement}function no(e){return"html"===i8(e)?e:e.assignedSlot||e.parentNode||(i0(e)?e.host:null)||nt(e)}function nr(e){return iQ(e)&&"fixed"!==ne(e).position?e.offsetParent:null}function ni(e){for(var t=iX(e),o=nr(e);o&&["table","td","th"].indexOf(i8(o))>=0&&"static"===ne(o).position;)o=nr(o);return o&&("html"===i8(o)||"body"===i8(o)&&"static"===ne(o).position)?t:o||function(e){var t=/firefox/i.test(i3());if(/Trident/i.test(i3())&&iQ(e)&&"fixed"===ne(e).position)return null;var o=no(e);for(i0(o)&&(o=o.host);iQ(o)&&0>["html","body"].indexOf(i8(o));){var r=ne(o);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return o;o=o.parentNode}return null}(e)||t}function nn(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ns(e,t,o){return i1(e,i2(t,o))}function nl(){return{top:0,right:0,bottom:0,left:0}}function na(e){return Object.assign({},nl(),e)}function nh(e,t){return t.reduce(function(t,o){return t[o]=e,t},{})}var nc="bottom",nd="right",nu="left",np="auto",nf=["top",nc,nd,nu],nm="start",ng="viewport",nv="popper",ny=nf.reduce(function(e,t){return e.concat([t+"-"+nm,t+"-end"])},[]),nS=[].concat(nf,[np]).reduce(function(e,t){return e.concat([t,t+"-"+nm,t+"-end"])},[]),nw=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function nC(e){return e.split("-")[1]}var nR={top:"auto",right:"auto",bottom:"auto",left:"auto"};function nb(e){var t,o,r,i,n,s,l,a=e.popper,h=e.popperRect,c=e.placement,d=e.variation,u=e.offsets,p=e.position,f=e.gpuAcceleration,m=e.adaptive,g=e.roundOffsets,v=e.isFixed,y=u.x,S=void 0===y?0:y,w=u.y,C=void 0===w?0:w,R="function"==typeof g?g({x:S,y:C}):{x:S,y:C};S=R.x,C=R.y;var b=u.hasOwnProperty("x"),_=u.hasOwnProperty("y"),T=nu,x="top",E=window;if(m){var M=ni(a),I="clientHeight",O="clientWidth";M===iX(a)&&"static"!==ne(M=nt(a)).position&&"absolute"===p&&(I="scrollHeight",O="scrollWidth"),("top"===c||(c===nu||c===nd)&&"end"===d)&&(x=nc,C-=(v&&M===E&&E.visualViewport?E.visualViewport.height:M[I])-h.height,C*=f?1:-1),(c===nu||("top"===c||c===nc)&&"end"===d)&&(T=nd,S-=(v&&M===E&&E.visualViewport?E.visualViewport.width:M[O])-h.width,S*=f?1:-1)}var z=Object.assign({position:p},m&&nR),D=!0===g?(t={x:S,y:C},o=iX(a),r=t.x,i=t.y,{x:i5(r*(n=o.devicePixelRatio||1))/n||0,y:i5(i*n)/n||0}):{x:S,y:C};return(S=D.x,C=D.y,f)?Object.assign({},z,((l={})[x]=_?"0":"",l[T]=b?"0":"",l.transform=1>=(E.devicePixelRatio||1)?"translate("+S+"px, "+C+"px)":"translate3d("+S+"px, "+C+"px, 0)",l)):Object.assign({},z,((s={})[x]=_?C+"px":"",s[T]=b?S+"px":"",s.transform="",s))}var n_={passive:!0},nT={left:"right",right:"left",bottom:"top",top:"bottom"};function nx(e){return e.replace(/left|right|bottom|top/g,function(e){return nT[e]})}var nE={start:"end",end:"start"};function nM(e){return e.replace(/start|end/g,function(e){return nE[e]})}function nI(e){var t=iX(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function nO(e){return i4(nt(e)).left+nI(e).scrollLeft}function nz(e){var t=ne(e),o=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(o+i+r)}function nD(e,t){void 0===t&&(t=[]);var o,r=function e(t){return["html","body","#document"].indexOf(i8(t))>=0?t.ownerDocument.body:iQ(t)&&nz(t)?t:e(no(t))}(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),n=iX(r),s=i?[n].concat(n.visualViewport||[],nz(r)?r:[]):r,l=t.concat(s);return i?l:l.concat(nD(no(s)))}function nk(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function nG(e,t,o){var r,i,n,s,l,a,h,c,d,u;return t===ng?nk(function(e,t){var o=iX(e),r=nt(e),i=o.visualViewport,n=r.clientWidth,s=r.clientHeight,l=0,a=0;if(i){n=i.width,s=i.height;var h=i6();(h||!h&&"fixed"===t)&&(l=i.offsetLeft,a=i.offsetTop)}return{width:n,height:s,x:l+nO(e),y:a}}(e,o)):iJ(t)?((r=i4(t,!1,"fixed"===o)).top=r.top+t.clientTop,r.left=r.left+t.clientLeft,r.bottom=r.top+t.clientHeight,r.right=r.left+t.clientWidth,r.width=t.clientWidth,r.height=t.clientHeight,r.x=r.left,r.y=r.top,r):nk((i=nt(e),s=nt(i),l=nI(i),a=null==(n=i.ownerDocument)?void 0:n.body,h=i1(s.scrollWidth,s.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),c=i1(s.scrollHeight,s.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),d=-l.scrollLeft+nO(i),u=-l.scrollTop,"rtl"===ne(a||s).direction&&(d+=i1(s.clientWidth,a?a.clientWidth:0)-h),{width:h,height:c,x:d,y:u}))}function nN(e){var t,o=e.reference,r=e.element,i=e.placement,n=i?iq(i):null,s=i?nC(i):null,l=o.x+o.width/2-r.width/2,a=o.y+o.height/2-r.height/2;switch(n){case"top":t={x:l,y:o.y-r.height};break;case nc:t={x:l,y:o.y+o.height};break;case nd:t={x:o.x+o.width,y:a};break;case nu:t={x:o.x-r.width,y:a};break;default:t={x:o.x,y:o.y}}var h=n?nn(n):null;if(null!=h){var c="y"===h?"height":"width";switch(s){case nm:t[h]=t[h]-(o[c]/2-r[c]/2);break;case"end":t[h]=t[h]+(o[c]/2-r[c]/2)}}return t}function nA(e,t){void 0===t&&(t={});var o,r,i,n,s,l,a,h,c=t,d=c.placement,u=void 0===d?e.placement:d,p=c.strategy,f=void 0===p?e.strategy:p,m=c.boundary,g=c.rootBoundary,v=c.elementContext,y=void 0===v?nv:v,S=c.altBoundary,w=c.padding,C=void 0===w?0:w,R=na("number"!=typeof C?C:nh(C,nf)),b=e.rects.popper,_=e.elements[void 0!==S&&S?y===nv?"reference":nv:y],T=(o=iJ(_)?_:_.contextElement||nt(e.elements.popper),r=void 0===m?"clippingParents":m,i=void 0===g?ng:g,a=(l=[].concat("clippingParents"===r?(n=nD(no(o)),!iJ(s=["absolute","fixed"].indexOf(ne(o).position)>=0&&iQ(o)?ni(o):o)?[]:n.filter(function(e){return iJ(e)&&i9(e,s)&&"body"!==i8(e)})):[].concat(r),[i]))[0],(h=l.reduce(function(e,t){var r=nG(o,t,f);return e.top=i1(r.top,e.top),e.right=i2(r.right,e.right),e.bottom=i2(r.bottom,e.bottom),e.left=i1(r.left,e.left),e},nG(o,a,f))).width=h.right-h.left,h.height=h.bottom-h.top,h.x=h.left,h.y=h.top,h),x=i4(e.elements.reference),E=nN({reference:x,element:b,strategy:"absolute",placement:u}),M=nk(Object.assign({},b,E)),I=y===nv?M:x,O={top:T.top-I.top+R.top,bottom:I.bottom-T.bottom+R.bottom,left:T.left-I.left+R.left,right:I.right-T.right+R.right},z=e.modifiersData.offset;if(y===nv&&z){var D=z[u];Object.keys(O).forEach(function(e){var t=[nd,nc].indexOf(e)>=0?1:-1,o=["top",nc].indexOf(e)>=0?"y":"x";O[e]+=D[o]*t})}return O}function nW(e,t,o){return void 0===o&&(o={x:0,y:0}),{top:e.top-t.height-o.y,right:e.right-t.width+o.x,bottom:e.bottom-t.height+o.y,left:e.left-t.width-o.x}}function nH(e){return["top",nd,nc,nu].some(function(t){return e[t]>=0})}var nL={placement:"bottom",modifiers:[],strategy:"absolute"};function nP(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}let nF=(m=void 0===(f=(p={defaultModifiers:[{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,o=e.name,r=t.rects.reference,i=t.rects.popper,n=t.modifiersData.preventOverflow,s=nA(t,{elementContext:"reference"}),l=nA(t,{altBoundary:!0}),a=nW(s,r),h=nW(l,i,n),c=nH(a),d=nH(h);t.modifiersData[o]={referenceClippingOffsets:a,popperEscapeOffsets:h,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,o=e.name;t.modifiersData[o]=nN({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,o=e.options,r=o.gpuAcceleration,i=o.adaptive,n=o.roundOffsets,s=void 0===n||n,l={placement:iq(t.placement),variation:nC(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:void 0===r||r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,nb(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:void 0===i||i,roundOffsets:s})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,nb(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,o=e.instance,r=e.options,i=r.scroll,n=void 0===i||i,s=r.resize,l=void 0===s||s,a=iX(t.elements.popper),h=[].concat(t.scrollParents.reference,t.scrollParents.popper);return n&&h.forEach(function(e){e.addEventListener("scroll",o.update,n_)}),l&&a.addEventListener("resize",o.update,n_),function(){n&&h.forEach(function(e){e.removeEventListener("scroll",o.update,n_)}),l&&a.removeEventListener("resize",o.update,n_)}},data:{}},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,o=e.options,r=e.name,i=o.offset,n=void 0===i?[0,0]:i,s=nS.reduce(function(e,o){var r,i,s,l,a,h;return e[o]=(r=t.rects,s=[nu,"top"].indexOf(i=iq(o))>=0?-1:1,a=(l="function"==typeof n?n(Object.assign({},r,{placement:o})):n)[0],h=l[1],a=a||0,h=(h||0)*s,[nu,nd].indexOf(i)>=0?{x:h,y:a}:{x:a,y:h}),e},{}),l=s[t.placement],a=l.x,h=l.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=a,t.modifiersData.popperOffsets.y+=h),t.modifiersData[r]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,o=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=o.mainAxis,n=void 0===i||i,s=o.altAxis,l=void 0===s||s,a=o.fallbackPlacements,h=o.padding,c=o.boundary,d=o.rootBoundary,u=o.altBoundary,p=o.flipVariations,f=void 0===p||p,m=o.allowedAutoPlacements,g=t.options.placement,v=iq(g)===g,y=a||(v||!f?[nx(g)]:function(e){if(iq(e)===np)return[];var t=nx(e);return[nM(e),t,nM(t)]}(g)),S=[g].concat(y).reduce(function(e,o){var r,i,n,s,l,a,u,p,g,v,y,S;return e.concat(iq(o)===np?(i=(r={placement:o,boundary:c,rootBoundary:d,padding:h,flipVariations:f,allowedAutoPlacements:m}).placement,n=r.boundary,s=r.rootBoundary,l=r.padding,a=r.flipVariations,p=void 0===(u=r.allowedAutoPlacements)?nS:u,0===(y=(v=(g=nC(i))?a?ny:ny.filter(function(e){return nC(e)===g}):nf).filter(function(e){return p.indexOf(e)>=0})).length&&(y=v),Object.keys(S=y.reduce(function(e,o){return e[o]=nA(t,{placement:o,boundary:n,rootBoundary:s,padding:l})[iq(o)],e},{})).sort(function(e,t){return S[e]-S[t]})):o)},[]),w=t.rects.reference,C=t.rects.popper,R=new Map,b=!0,_=S[0],T=0;T<S.length;T++){var x=S[T],E=iq(x),M=nC(x)===nm,I=["top",nc].indexOf(E)>=0,O=I?"width":"height",z=nA(t,{placement:x,boundary:c,rootBoundary:d,altBoundary:u,padding:h}),D=I?M?nd:nu:M?nc:"top";w[O]>C[O]&&(D=nx(D));var k=nx(D),G=[];if(n&&G.push(z[E]<=0),l&&G.push(z[D]<=0,z[k]<=0),G.every(function(e){return e})){_=x,b=!1;break}R.set(x,G)}if(b)for(var N=f?3:1,A=function(e){var t=S.find(function(t){var o=R.get(t);if(o)return o.slice(0,e).every(function(e){return e})});if(t)return _=t,"break"},W=N;W>0&&"break"!==A(W);W--);t.placement!==_&&(t.modifiersData[r]._skip=!0,t.placement=_,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,o=e.options,r=e.name,i=o.mainAxis,n=o.altAxis,s=o.boundary,l=o.rootBoundary,a=o.altBoundary,h=o.padding,c=o.tether,d=void 0===c||c,u=o.tetherOffset,p=void 0===u?0:u,f=nA(t,{boundary:s,rootBoundary:l,padding:h,altBoundary:a}),m=iq(t.placement),g=nC(t.placement),v=!g,y=nn(m),S="x"===y?"y":"x",w=t.modifiersData.popperOffsets,C=t.rects.reference,R=t.rects.popper,b="function"==typeof p?p(Object.assign({},t.rects,{placement:t.placement})):p,_="number"==typeof b?{mainAxis:b,altAxis:b}:Object.assign({mainAxis:0,altAxis:0},b),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,x={x:0,y:0};if(w){if(void 0===i||i){var E,M="y"===y?"top":nu,I="y"===y?nc:nd,O="y"===y?"height":"width",z=w[y],D=z+f[M],k=z-f[I],G=d?-R[O]/2:0,N=g===nm?C[O]:R[O],A=g===nm?-R[O]:-C[O],W=t.elements.arrow,H=d&&W?i7(W):{width:0,height:0},L=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:nl(),P=L[M],F=L[I],B=ns(0,C[O],H[O]),U=v?C[O]/2-G-B-P-_.mainAxis:N-B-P-_.mainAxis,Z=v?-C[O]/2+G+B+F+_.mainAxis:A+B+F+_.mainAxis,j=t.elements.arrow&&ni(t.elements.arrow),V=j?"y"===y?j.clientTop||0:j.clientLeft||0:0,$=null!=(E=null==T?void 0:T[y])?E:0,K=ns(d?i2(D,z+U-$-V):D,z,d?i1(k,z+Z-$):k);w[y]=K,x[y]=K-z}if(void 0!==n&&n){var Y,q,X="x"===y?"top":nu,J="x"===y?nc:nd,Q=w[S],ee="y"===S?"height":"width",et=Q+f[X],eo=Q-f[J],er=-1!==["top",nu].indexOf(m),ei=null!=(q=null==T?void 0:T[S])?q:0,en=er?et:Q-C[ee]-R[ee]-ei+_.altAxis,es=er?Q+C[ee]+R[ee]-ei-_.altAxis:eo,el=d&&er?(Y=ns(en,Q,es))>es?es:Y:ns(d?en:et,Q,d?es:eo);w[S]=el,x[S]=el-Q}t.modifiersData[r]=x}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,o=e.state,r=e.name,i=e.options,n=o.elements.arrow,s=o.modifiersData.popperOffsets,l=iq(o.placement),a=nn(l),h=[nu,nd].indexOf(l)>=0?"height":"width";if(n&&s){var c,d=(c=i.padding,na("number"!=typeof(c="function"==typeof c?c(Object.assign({},o.rects,{placement:o.placement})):c)?c:nh(c,nf))),u=i7(n),p="y"===a?"top":nu,f="y"===a?nc:nd,m=o.rects.reference[h]+o.rects.reference[a]-s[a]-o.rects.popper[h],g=s[a]-o.rects.reference[a],v=ni(n),y=v?"y"===a?v.clientHeight||0:v.clientWidth||0:0,S=d[p],w=y-u[h]-d[f],C=y/2-u[h]/2+(m/2-g/2),R=ns(S,C,w);o.modifiersData[r]=((t={})[a]=R,t.centerOffset=R-C,t)}},effect:function(e){var t=e.state,o=e.options.element,r=void 0===o?"[data-popper-arrow]":o;null==r||("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&i9(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]}]}).defaultModifiers)?[]:f,v=void 0===(g=p.defaultOptions)?nL:g,function(e,t,o){void 0===o&&(o=v);var r,i,n={placement:"bottom",orderedModifiers:[],options:Object.assign({},nL,v),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},s=[],l=!1,a={state:n,setOptions:function(o){var r,i,l,c,d,u,p="function"==typeof o?o(n.options):o;h(),n.options=Object.assign({},v,n.options,p),n.scrollParents={reference:iJ(e)?nD(e):e.contextElement?nD(e.contextElement):[],popper:nD(t)};var f=(i=Object.keys(r=[].concat(m,n.options.modifiers).reduce(function(e,t){var o=e[t.name];return e[t.name]=o?Object.assign({},o,t,{options:Object.assign({},o.options,t.options),data:Object.assign({},o.data,t.data)}):t,e},{})).map(function(e){return r[e]}),l=new Map,c=new Set,d=[],i.forEach(function(e){l.set(e.name,e)}),i.forEach(function(e){c.has(e.name)||function e(t){c.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!c.has(t)){var o=l.get(t);o&&e(o)}}),d.push(t)}(e)}),u=d,nw.reduce(function(e,t){return e.concat(u.filter(function(e){return e.phase===t}))},[]));return n.orderedModifiers=f.filter(function(e){return e.enabled}),n.orderedModifiers.forEach(function(e){var t=e.name,o=e.options,r=e.effect;if("function"==typeof r){var i=r({state:n,name:t,instance:a,options:void 0===o?{}:o});s.push(i||function(){})}}),a.update()},forceUpdate:function(){if(!l){var e=n.elements,t=e.reference,o=e.popper;if(nP(t,o)){n.rects={reference:(r=ni(o),i="fixed"===n.options.strategy,s=iQ(r),u=iQ(r)&&(c=i5((h=r.getBoundingClientRect()).width)/r.offsetWidth||1,d=i5(h.height)/r.offsetHeight||1,1!==c||1!==d),p=nt(r),f=i4(t,u,i),m={scrollLeft:0,scrollTop:0},g={x:0,y:0},(s||!s&&!i)&&(("body"!==i8(r)||nz(p))&&(m=function(e){return e!==iX(e)&&iQ(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:nI(e)}(r)),iQ(r)?(g=i4(r,!0),g.x+=r.clientLeft,g.y+=r.clientTop):p&&(g.x=nO(p))),{x:f.left+m.scrollLeft-g.x,y:f.top+m.scrollTop-g.y,width:f.width,height:f.height}),popper:i7(o)},n.reset=!1,n.placement=n.options.placement,n.orderedModifiers.forEach(function(e){return n.modifiersData[e.name]=Object.assign({},e.data)});for(var r,i,s,h,c,d,u,p,f,m,g,v=0;v<n.orderedModifiers.length;v++){if(!0===n.reset){n.reset=!1,v=-1;continue}var y=n.orderedModifiers[v],S=y.fn,w=y.options,C=void 0===w?{}:w,R=y.name;"function"==typeof S&&(n=S({state:n,options:C,name:R,instance:a})||n)}}}},update:(r=function(){return new Promise(function(e){a.forceUpdate(),e(n)})},function(){return i||(i=new Promise(function(e){Promise.resolve().then(function(){i=void 0,e(r())})})),i}),destroy:function(){h(),l=!0}};if(!nP(e,t))return a;function h(){s.forEach(function(e){return e()}),s=[]}return a.setOptions(o).then(function(e){!l&&o.onFirstUpdate&&o.onFirstUpdate(e)}),a}),nB=["enabled","placement","strategy","modifiers"],nU={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>void 0},nZ={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:({state:e})=>()=>{let{reference:t,popper:o}=e.elements;if("removeAttribute"in t){let e=(t.getAttribute("aria-describedby")||"").split(",").filter(e=>e.trim()!==o.id);e.length?t.setAttribute("aria-describedby",e.join(",")):t.removeAttribute("aria-describedby")}},fn:({state:e})=>{var t;let{popper:o,reference:r}=e.elements,i=null==(t=o.getAttribute("role"))?void 0:t.toLowerCase();if(o.id&&"tooltip"===i&&"setAttribute"in r){let e=r.getAttribute("aria-describedby");if(e&&-1!==e.split(",").indexOf(o.id))return;r.setAttribute("aria-describedby",e?`${e},${o.id}`:o.id)}}},nj=[],nV=function(e,t,o={}){let{enabled:r=!0,placement:i="bottom",strategy:n="absolute",modifiers:s=nj}=o,l=function(e,t){if(null==e)return{};var o={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;o[r]=e[r]}return o}(o,nB),a=(0,P.useRef)(s),h=(0,P.useRef)(),c=(0,P.useCallback)(()=>{var e;null==(e=h.current)||e.update()},[]),d=(0,P.useCallback)(()=>{var e;null==(e=h.current)||e.forceUpdate()},[]),[u,p]=iY((0,P.useState)({placement:i,update:c,forceUpdate:d,attributes:{},styles:{popper:{},arrow:{}}})),f=(0,P.useMemo)(()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:e})=>{let t={},o={};Object.keys(e.elements).forEach(r=>{t[r]=e.styles[r],o[r]=e.attributes[r]}),p({state:e,styles:t,attributes:o,update:c,forceUpdate:d,placement:e.placement})}}),[c,d,p]),m=(0,P.useMemo)(()=>(iK(a.current,s)||(a.current=s),a.current),[s]);return(0,P.useEffect)(()=>{h.current&&r&&h.current.setOptions({placement:i,strategy:n,modifiers:[...m,f,nU]})},[n,i,f,r,m]),(0,P.useEffect)(()=>{if(r&&null!=e&&null!=t)return h.current=nF(e,t,Object.assign({},l,{placement:i,strategy:n,modifiers:[...m,nZ,f]})),()=>{null!=h.current&&(h.current.destroy(),h.current=void 0,p(e=>Object.assign({},e,{attributes:{},styles:{popper:{}}})))}},[r,e,t]),u};var n$=!1,nK=!1;try{var nY={get passive(){return n$=!0},get once(){return nK=n$=!0}};oX&&(window.addEventListener("test",nY,nY),window.removeEventListener("test",nY,!0))}catch{}let nq=function(e,t,o,r){if(r&&"boolean"!=typeof r&&!nK){var i=r.once,n=r.capture,s=o;!nK&&i&&(s=o.__once||function e(r){this.removeEventListener(t,e,n),o.call(this,r)},o.__once=s),e.addEventListener(t,s,n$?r:n)}e.addEventListener(t,o,r)},nX=function(e,t,o,r){var i=r&&"boolean"!=typeof r?r.capture:r;e.removeEventListener(t,o,i),o.__once&&e.removeEventListener(t,o.__once,i)},nJ=function(e,t,o,r){return nq(e,t,o,r),function(){nX(e,t,o,r)}};function nQ(e){return e&&e.ownerDocument||document}let n0=function(e){let t=(0,P.useRef)(e);return(0,P.useEffect)(()=>{t.current=e},[e]),t};function n1(e){let t=n0(e);return(0,P.useCallback)(function(...e){return t.current&&t.current(...e)},[t])}function n2(e,t){return e.contains?e.contains(t):e.compareDocumentPosition?e===t||!!(16&e.compareDocumentPosition(t)):void 0}var n5=A(730),n3=A.n(n5);let n6=()=>{},n4=e=>e&&("current"in e?e.current:e),n7={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"},n9=function(e,t=n6,{disabled:o,clickTrigger:r="click"}={}){let i=(0,P.useRef)(!1),n=(0,P.useRef)(!1),s=(0,P.useCallback)(t=>{let o=n4(e);n3()(!!o,"ClickOutside captured a close event but does not have a ref to compare it to. useClickOutside(), should be passed a ref that resolves to a DOM node"),i.current=!o||!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)||0!==t.button||!!n2(o,t.target)||n.current,n.current=!1},[e]),l=n1(t=>{let o=n4(e);o&&n2(o,t.target)?n.current=!0:n.current=!1}),a=n1(e=>{i.current||t(e)});(0,P.useEffect)(()=>{var t,i;if(o||null==e)return;let n=nQ(n4(e)),h=n.defaultView||window,c=null!=(t=h.event)?t:null==(i=h.parent)?void 0:i.event,d=null;n7[r]&&(d=nJ(n,n7[r],l,!0));let u=nJ(n,r,s,!0),p=nJ(n,r,e=>{if(e===c){c=void 0;return}a(e)}),f=[];return"ontouchstart"in n.documentElement&&(f=[].slice.call(n.body.children).map(e=>nJ(e,"mousemove",n6))),()=>{null==d||d(),u(),p(),f.forEach(e=>e())}},[e,o,r,s,l,a])};function n8(e){let t;if(!e||"function"==typeof e)return null;let{major:o}={major:+(t=P.version.split("."))[0],minor:+t[1],patch:+t[2]};return o>=19?e.props.ref:e.ref}let se=()=>{},st=function(e,t,{disabled:o,clickTrigger:r}={}){let i=t||se;n9(e,i,{disabled:o,clickTrigger:r});let n=n1(e=>{("Escape"===e.code||27===e.keyCode)&&i(e)});(0,P.useEffect)(()=>{if(o||null==e)return;let t=nQ(n4(e)),r=(t.defaultView||window).event,i=nJ(t,"keyup",e=>{if(e===r){r=void 0;return}n(e)});return()=>{i()}},[e,o,n])},so=(0,P.createContext)(oX?window:void 0);so.Provider;let sr=(e,t)=>oX?null==e?(t||nQ()).body:("function"==typeof e&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect))?e:null:null;function si(e,t){let o=(0,P.useContext)(so),[r,i]=(0,P.useState)(()=>sr(e,null==o?void 0:o.document));if(!r){let t=sr(e);t&&i(t)}return(0,P.useEffect)(()=>{t&&r&&t(r)},[t,r]),(0,P.useEffect)(()=>{let t=sr(e);t!==r&&i(t)},[e,r]),r}let sn=void 0!==A.g&&A.g.navigator&&"ReactNative"===A.g.navigator.product,ss="undefined"!=typeof document||sn?P.useLayoutEffect:P.useEffect,sl=function({children:e,in:t,onExited:o,mountOnEnter:r,unmountOnExit:i}){let n=(0,P.useRef)(null),s=(0,P.useRef)(t),l=n1(o);(0,P.useEffect)(()=>{t?s.current=!0:l(n.current)},[t,l]);let a=ij(n,n8(e)),h=(0,P.cloneElement)(e,{ref:a});return t?h:i||!s.current&&r?null:h},sa=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"],sh=["component"],sc=P.forwardRef((e,t)=>{let{component:o}=e,r=function(e){let{onEnter:t,onEntering:o,onEntered:r,onExit:i,onExiting:n,onExited:s,addEndListener:l,children:a}=e,h=function(e,t){if(null==e)return{};var o={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;o[r]=e[r]}return o}(e,sa),c=(0,P.useRef)(null),d=ij(c,n8(a)),u=e=>t=>{e&&c.current&&e(c.current,t)},p=(0,P.useCallback)(u(t),[t]),f=(0,P.useCallback)(u(o),[o]),m=(0,P.useCallback)(u(r),[r]),g=(0,P.useCallback)(u(i),[i]),v=(0,P.useCallback)(u(n),[n]),y=(0,P.useCallback)(u(s),[s]),S=(0,P.useCallback)(u(l),[l]);return Object.assign({},h,{nodeRef:c},t&&{onEnter:p},o&&{onEntering:f},r&&{onEntered:m},i&&{onExit:g},n&&{onExiting:v},s&&{onExited:y},l&&{addEndListener:S},{children:"function"==typeof a?(e,t)=>a(e,Object.assign({},t,{ref:d})):(0,P.cloneElement)(a,{ref:d})})}(function(e,t){if(null==e)return{};var o={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;o[r]=e[r]}return o}(e,sh));return(0,r8.jsx)(o,Object.assign({ref:t},r))});function sd({children:e,in:t,onExited:o,onEntered:r,transition:i}){let[n,s]=(0,P.useState)(!t);t&&n&&s(!1);let l=ij(function({in:e,onTransition:t}){let o=(0,P.useRef)(null),r=(0,P.useRef)(!0),i=n1(t);return ss(()=>{if(!o.current)return;let t=!1;return i({in:e,element:o.current,initial:r.current,isStale:()=>t}),()=>{t=!0}},[e,i]),ss(()=>(r.current=!1,()=>{r.current=!0}),[]),o}({in:!!t,onTransition:e=>{Promise.resolve(i(e)).then(()=>{e.isStale()||(e.in?null==r||r(e.element,e.initial):(s(!0),null==o||o(e.element)))},t=>{throw e.in||s(!0),t})}}),n8(e));return n&&!t?null:(0,P.cloneElement)(e,{ref:l})}let su=P.forwardRef((e,t)=>{var r;let{flip:i,offset:n,placement:s,containerPadding:l,popperConfig:a={},transition:h,runTransition:c}=e,[d,u]=iU(),[p,f]=iU(),m=ij(u,t),g=si(e.container),v=si(e.target),[y,S]=(0,P.useState)(!e.show),w=nV(v,d,function({enabled:e,enableEvents:t,placement:o,flip:r,offset:i,fixed:n,containerPadding:s,arrowElement:l,popperConfig:a={}}){var h,c,d,u,p,f;let m,g=(f=a.modifiers,m={},Array.isArray(f)?(null==f||f.forEach(e=>{m[e.name]=e}),m):f||m);return Object.assign({},a,{placement:o,enabled:e,strategy:n?"fixed":a.strategy,modifiers:function(e={}){return Array.isArray(e)?e:Object.keys(e).map(t=>(e[t].name=t,e[t]))}(Object.assign({},g,{eventListeners:{enabled:t,options:null==(h=g.eventListeners)?void 0:h.options},preventOverflow:Object.assign({},g.preventOverflow,{options:s?Object.assign({padding:s},null==(c=g.preventOverflow)?void 0:c.options):null==(d=g.preventOverflow)?void 0:d.options}),offset:{options:Object.assign({offset:i},null==(u=g.offset)?void 0:u.options)},arrow:Object.assign({},g.arrow,{enabled:!!l,options:Object.assign({},null==(p=g.arrow)?void 0:p.options,{element:l})}),flip:Object.assign({enabled:!!r},g.flip)}))})}({placement:s,enableEvents:!!e.show,containerPadding:l||5,flip:i,offset:n,arrowElement:p,popperConfig:a}));e.show&&y&&S(!1);let C=e.show||!y;if(st(d,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!C)return null;let{onExit:R,onExiting:b,onEnter:_,onEntering:T,onEntered:x}=e,E=e.children(Object.assign({},w.attributes.popper,{style:w.styles.popper,ref:m}),{popper:w,placement:s,show:!!e.show,arrowProps:Object.assign({},w.attributes.arrow,{style:w.styles.arrow,ref:f})});return r={in:!!e.show,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:E,onExit:R,onExiting:b,onExited:(...t)=>{S(!0),e.onExited&&e.onExited(...t)},onEnter:_,onEntering:T,onEntered:x},E=h?(0,r8.jsx)(sc,Object.assign({},r,{component:h})):c?(0,r8.jsx)(sd,Object.assign({},r,{transition:c})):(0,r8.jsx)(sl,Object.assign({},r)),g?o.createPortal(E,g):null});su.displayName="Overlay";let sp=function(e){let t=(0,P.useRef)(e);return(0,P.useEffect)(()=>{t.current=e},[e]),t},sf=void 0!==A.g&&A.g.navigator&&"ReactNative"===A.g.navigator.product,sm="undefined"!=typeof document||sf?P.useLayoutEffect:P.useEffect,sg=e=>e&&"function"!=typeof e?t=>{e.current=t}:e,sv=function(e,t){return(0,P.useMemo)(()=>{let o,r;return o=sg(e),r=sg(t),e=>{o&&o(e),r&&r(e)}},[e,t])};function sy(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}let sS=P.createContext({prefixes:{},breakpoints:["xxl","xl","lg","md","sm","xs"],minBreakpoint:"xs"}),{Consumer:sw,Provider:sC}=sS;function sR(e,t){let{prefixes:o}=(0,P.useContext)(sS);return e||o[t]||t}function sb(){let{dir:e}=(0,P.useContext)(sS);return"rtl"===e}let s_=P.forwardRef(({className:e,bsPrefix:t,as:o="div",...r},i)=>(t=sR(t,"popover-header"),(0,r8.jsx)(o,{ref:i,className:L()(e,t),...r})));s_.displayName="PopoverHeader";let sT=P.forwardRef(({className:e,bsPrefix:t,as:o="div",...r},i)=>(t=sR(t,"popover-body"),(0,r8.jsx)(o,{ref:i,className:L()(e,t),...r})));function sx(e,t){let o=e;return"left"===e?o=t?"end":"start":"right"===e&&(o=t?"start":"end"),o}function sE(e="absolute"){return{position:e,top:"0",left:"0",opacity:"0",pointerEvents:"none"}}sT.displayName="PopoverBody",P.Component;let sM=P.forwardRef(({bsPrefix:e,placement:t="right",className:o,style:r,children:i,body:n,arrowProps:s,hasDoneInitialMeasure:l,popper:a,show:h,...c},d)=>{let u=sR(e,"popover"),p=sb(),[f]=(null==t?void 0:t.split("-"))||[],m=sx(f,p),g=r;return h&&!l&&(g={...r,...sE(null==a?void 0:a.strategy)}),(0,r8.jsxs)("div",{ref:d,role:"tooltip",style:g,"x-placement":f,className:L()(o,u,f&&`bs-popover-${m}`),...c,children:[(0,r8.jsx)("div",{className:"popover-arrow",...s}),n?(0,r8.jsx)(sT,{children:i}):i]})});sM.displayName="Popover";let sI=Object.assign(sM,{Header:s_,Body:sT,POPPER_OFFSET:[0,8]}),sO=P.forwardRef(({bsPrefix:e,placement:t="right",className:o,style:r,children:i,arrowProps:n,hasDoneInitialMeasure:s,popper:l,show:a,...h},c)=>{e=sR(e,"tooltip");let d=sb(),[u]=(null==t?void 0:t.split("-"))||[],p=sx(u,d),f=r;return a&&!s&&(f={...r,...sE(null==l?void 0:l.strategy)}),(0,r8.jsxs)("div",{ref:c,style:f,role:"tooltip","x-placement":u,className:L()(o,e,`bs-tooltip-${p}`),...h,children:[(0,r8.jsx)("div",{className:"tooltip-arrow",...n}),(0,r8.jsx)("div",{className:`${e}-inner`,children:i})]})});sO.displayName="Tooltip";let sz=Object.assign(sO,{TOOLTIP_OFFSET:[0,6]}),sD=P.default.createContext(null);var sk="unmounted",sG="exited",sN="entering",sA="entered",sW="exiting",sH=function(e){function t(t,o){var r,i=e.call(this,t,o)||this,n=o&&!o.isMounting?t.enter:t.appear;return i.appearStatus=null,t.in?n?(r=sG,i.appearStatus=sN):r=sA:r=t.unmountOnExit||t.mountOnEnter?sk:sG,i.state={status:r},i.nextCallback=null,i}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,oN(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===sk?{status:sG}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(e){var t=null;if(e!==this.props){var o=this.state.status;this.props.in?o!==sN&&o!==sA&&(t=sN):(o===sN||o===sA)&&(t=sW)}this.updateStatus(!1,t)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var e,t,o,r=this.props.timeout;return e=t=o=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,o=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:o}},r.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===sN){if(this.props.unmountOnExit||this.props.mountOnEnter){var r=this.props.nodeRef?this.props.nodeRef.current:o.findDOMNode(this);r&&r.scrollTop}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===sG&&this.setState({status:sk})},r.performEnter=function(e){var t=this,r=this.props.enter,i=this.context?this.context.isMounting:e,n=this.props.nodeRef?[i]:[o.findDOMNode(this),i],s=n[0],l=n[1],a=this.getTimeouts(),h=i?a.appear:a.enter;(e||r)&&1?(this.props.onEnter(s,l),this.safeSetState({status:sN},function(){t.props.onEntering(s,l),t.onTransitionEnd(h,function(){t.safeSetState({status:sA},function(){t.props.onEntered(s,l)})})})):this.safeSetState({status:sA},function(){t.props.onEntered(s)})},r.performExit=function(){var e=this,t=this.props.exit,r=this.getTimeouts(),i=this.props.nodeRef?void 0:o.findDOMNode(this);t?(this.props.onExit(i),this.safeSetState({status:sW},function(){e.props.onExiting(i),e.onTransitionEnd(r.exit,function(){e.safeSetState({status:sG},function(){e.props.onExited(i)})})})):this.safeSetState({status:sG},function(){e.props.onExited(i)})},r.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},r.setNextCallback=function(e){var t=this,o=!0;return this.nextCallback=function(r){o&&(o=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},r.onTransitionEnd=function(e,t){this.setNextCallback(t);var r=this.props.nodeRef?this.props.nodeRef.current:o.findDOMNode(this),i=null==e&&!this.props.addEndListener;if(!r||i)return void setTimeout(this.nextCallback,0);if(this.props.addEndListener){var n=this.props.nodeRef?[this.nextCallback]:[r,this.nextCallback],s=n[0],l=n[1];this.props.addEndListener(s,l)}null!=e&&setTimeout(this.nextCallback,e)},r.render=function(){var e=this.state.status;if(e===sk)return null;var t=this.props,o=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,oj(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return P.default.createElement(sD.Provider,{value:null},"function"==typeof o?o(e,r):P.default.cloneElement(P.default.Children.only(o),r))},t}(P.default.Component);function sL(){}sH.contextType=sD,sH.propTypes={},sH.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:sL,onEntering:sL,onEntered:sL,onExit:sL,onExiting:sL,onExited:sL},sH.UNMOUNTED=sk,sH.EXITED=sG,sH.ENTERING=sN,sH.ENTERED=sA,sH.EXITING=sW;var sP=/([A-Z])/g,sF=/^ms-/;function sB(e){return e.replace(sP,"-$1").toLowerCase().replace(sF,"-ms-")}var sU=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;let sZ=function(e,t){var o,r,i="",n="";if("string"==typeof t){return e.style.getPropertyValue(sB(t))||((r=nQ(o=e))&&r.defaultView||window).getComputedStyle(o,void 0).getPropertyValue(sB(t))}Object.keys(t).forEach(function(o){var r=t[o];r||0===r?o&&sU.test(o)?n+=o+"("+r+") ":i+=sB(o)+": "+r+";":e.style.removeProperty(sB(o))}),n&&(i+="transform: "+n+";"),e.style.cssText+=";"+i};function sj(e,t){let o=sZ(e,t)||"",r=-1===o.indexOf("ms")?1e3:1;return parseFloat(o)*r}function sV(e,t){let o=sj(e,"transitionDuration"),r=sj(e,"transitionDelay"),i=function(e,t,o,r){null==o&&(n=-1===(i=sZ(e,"transitionDuration")||"").indexOf("ms")?1e3:1,o=parseFloat(i)*n||0);var i,n,s,l,a,h=(s=!1,l=setTimeout(function(){s||function(e,t,o,r){if(void 0===o&&(o=!1),void 0===r&&(r=!0),e){var i=document.createEvent("HTMLEvents");i.initEvent(t,o,r),e.dispatchEvent(i)}}(e,"transitionend",!0)},o+5),a=nJ(e,"transitionend",function(){s=!0},{once:!0}),function(){clearTimeout(l),a()}),c=nJ(e,"transitionend",t);return function(){h(),c()}}(e,o=>{o.target===e&&(i(),t(o))},o+r)}function s$(e){return e&&"setState"in e?o.findDOMNode(e):null!=e?e:null}let sK=P.default.forwardRef(({onEnter:e,onEntering:t,onEntered:o,onExit:r,onExiting:i,onExited:n,addEndListener:s,children:l,childRef:a,...h},c)=>{let d=(0,P.useRef)(null),u=sv(d,a),p=e=>{u(s$(e))},f=e=>t=>{e&&d.current&&e(d.current,t)},m=(0,P.useCallback)(f(e),[e]),g=(0,P.useCallback)(f(t),[t]),v=(0,P.useCallback)(f(o),[o]),y=(0,P.useCallback)(f(r),[r]),S=(0,P.useCallback)(f(i),[i]),w=(0,P.useCallback)(f(n),[n]),C=(0,P.useCallback)(f(s),[s]);return(0,r8.jsx)(sH,{ref:c,...h,onEnter:m,onEntered:v,onEntering:g,onExit:y,onExited:w,onExiting:S,addEndListener:C,nodeRef:d,children:"function"==typeof l?(e,t)=>l(e,{...t,ref:p}):P.default.cloneElement(l,{ref:p})})});sK.displayName="TransitionWrapper";let sY={[sN]:"show",[sA]:"show"},sq=P.forwardRef(({className:e,children:t,transitionClasses:o={},onEnter:r,...i},n)=>{let s={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...i},l=(0,P.useCallback)((e,t)=>{e.offsetHeight,null==r||r(e,t)},[r]);return(0,r8.jsx)(sK,{ref:n,addEndListener:sV,...s,onEnter:l,childRef:n8(t),children:(r,i)=>P.cloneElement(t,{...i,className:L()("fade",e,t.props.className,sY[r],o[r])})})});sq.displayName="Fade";let sX=sq,sJ=P.forwardRef(({children:e,transition:t=sX,popperConfig:o={},rootClose:r=!1,placement:i="top",show:n=!1,...s},l)=>{var a;let h,c,d,u,p,f=(0,P.useRef)({}),[m,g]=(0,P.useState)(null),[v,y]=(a=s.offset,h=(0,P.useRef)(null),c=sR(void 0,"popover"),d=sR(void 0,"tooltip"),u=(0,P.useMemo)(()=>({name:"offset",options:{offset:()=>{if(a)return a;if(h.current){if(sy(h.current,c))return sI.POPPER_OFFSET;if(sy(h.current,d))return sz.TOOLTIP_OFFSET}return[0,0]}}}),[a,c,d]),[h,[u]]),S=sv(l,v),w=!0===t?sX:t||void 0,C=(p=sp(e=>{g(e),null==o||null==o.onFirstUpdate||o.onFirstUpdate(e)}),(0,P.useCallback)(function(...e){return p.current&&p.current(...e)},[p]));return sm(()=>{m&&s.target&&(null==f.current.scheduleUpdate||f.current.scheduleUpdate())},[m,s.target]),(0,P.useEffect)(()=>{n||g(null)},[n]),(0,r8.jsx)(su,{...s,ref:S,popperConfig:{...o,modifiers:y.concat(o.modifiers||[]),onFirstUpdate:C},transition:w,rootClose:r,placement:i,show:n,children:(r,{arrowProps:i,popper:n,show:s})=>{var l;!function(e,t){let{ref:o}=e,{ref:r}=t;e.ref=o.__wrapped||(o.__wrapped=e=>o(s$(e))),t.ref=r.__wrapped||(r.__wrapped=e=>r(s$(e)))}(r,i);let a=null==n?void 0:n.placement,h=Object.assign(f.current,{state:null==n?void 0:n.state,scheduleUpdate:null==n?void 0:n.update,placement:a,outOfBoundaries:(null==n||null==(l=n.state)||null==(l=l.modifiersData.hide)?void 0:l.isReferenceHidden)||!1,strategy:o.strategy}),c=!!m;return"function"==typeof e?e({...r,placement:a,show:s,...!t&&s&&{className:"show"},popper:h,arrowProps:i,hasDoneInitialMeasure:c}):P.cloneElement(e,{...r,placement:a,arrowProps:i,popper:h,hasDoneInitialMeasure:c,className:L()(e.props.className,!t&&s&&"show"),style:{...e.props.style,...r.style}})}})});sJ.displayName="Overlay";var sQ=A(736),s0=A.n(sQ);let s1=0x80000000-1;function s2(e,t,o){let[r]=t,i=r.currentTarget,n=r.relatedTarget||r.nativeEvent[o];n&&n===i||n2(i,n)||e(...t)}A(597),s0().oneOf(["click","hover","focus"]);let s5=({trigger:e=["hover","focus"],overlay:t,children:o,popperConfig:r={},show:i,defaultShow:n=!1,onToggle:s,delay:l,placement:a,flip:h=a&&-1!==a.indexOf("auto"),...c})=>{var d,u,p,f,m,g,v;let y,S,w,C,R,b,_=(0,P.useRef)(null),T=sv(_,n8(o)),x=(R=(y=(0,P.useRef)(!0),S=(0,P.useRef)(()=>y.current),(0,P.useEffect)(()=>(y.current=!0,()=>{y.current=!1}),[]),S.current),b=(0,P.useRef)(),v=()=>clearTimeout(b.current),(w=(0,P.useRef)(v)).current=v,C=w,(0,P.useEffect)(()=>()=>C.current(),[]),(0,P.useMemo)(()=>{let e=()=>clearTimeout(b.current);return{set:function(t,o=0){R()&&(e(),o<=s1?b.current=setTimeout(t,o):function e(t,o,r){let i=r-Date.now();t.current=i<=s1?setTimeout(o,i):setTimeout(()=>e(t,o,r),s1)}(b,t,Date.now()+o))},clear:e,handleRef:b}},[])),E=(0,P.useRef)(""),[M,I]=(d=(0,P.useRef)(void 0!==i),p=(u=(0,P.useState)(n))[0],f=u[1],m=void 0!==i,g=d.current,d.current=m,!m&&g&&p!==n&&f(n),[m?i:p,(0,P.useCallback)(function(e){for(var t=arguments.length,o=Array(t>1?t-1:0),r=1;r<t;r++)o[r-1]=arguments[r];s&&s.apply(void 0,[e].concat(o)),f(e)},[s])]),O=l&&"object"==typeof l?l:{show:l,hide:l},{onFocus:z,onBlur:D,onClick:k}="function"!=typeof o?P.Children.only(o).props:{},G=(0,P.useCallback)(()=>{(x.clear(),E.current="show",O.show)?x.set(()=>{"show"===E.current&&I(!0)},O.show):I(!0)},[O.show,I,x]),N=(0,P.useCallback)(()=>{(x.clear(),E.current="hide",O.hide)?x.set(()=>{"hide"===E.current&&I(!1)},O.hide):I(!1)},[O.hide,I,x]),A=(0,P.useCallback)((...e)=>{G(),null==z||z(...e)},[G,z]),W=(0,P.useCallback)((...e)=>{N(),null==D||D(...e)},[N,D]),H=(0,P.useCallback)((...e)=>{I(!M),null==k||k(...e)},[k,I,M]),L=(0,P.useCallback)((...e)=>{s2(G,e,"fromElement")},[G]),F=(0,P.useCallback)((...e)=>{s2(N,e,"toElement")},[N]),B=null==e?[]:[].concat(e),U={ref:e=>{T(s$(e))}};return -1!==B.indexOf("click")&&(U.onClick=H),-1!==B.indexOf("focus")&&(U.onFocus=A,U.onBlur=W),-1!==B.indexOf("hover")&&(U.onMouseOver=L,U.onMouseOut=F),(0,r8.jsxs)(r8.Fragment,{children:["function"==typeof o?o(U):(0,P.cloneElement)(o,U),(0,r8.jsx)(sJ,{...c,show:M,onHide:N,flip:h,placement:a,popperConfig:r,target:_.current,children:t})]})},s3={},s6=document.createElement("canvas");s6.id="gk-graph-avatar-canvas";class s4 extends P.Component{image;constructor(e){super(e),this.image=new Image,this.image.crossOrigin="anonymous",this.image.onload=()=>this.refreshImage(),this.state={dataURL:void 0}}static getDerivedStateFromProps(e,t){return{dataURL:!e.url&&t.dataURL?void 0:t.dataURL}}componentDidMount(){let{url:e}=this.props;e&&this.startImgLoading(e)}componentDidUpdate(e){let{url:t}=this.props;t&&e.url!==t&&this.startImgLoading(t)}componentWillUnmount(){this.image=void 0}refreshImage(){let e;if(this.image){if(this.image.complete){let t=this.image.height,o=this.image.width,r=s6.getContext("2d");r.canvas.width=o,r.canvas.height=t,r.drawImage(this.image,0,0,o,t),e=s6.toDataURL(),s3[this.image.src]=e}this.setState({dataURL:e})}}startImgLoading(e){if(!this.image)return;let t=s3[e];t?this.setState({dataURL:t}):this.image.src=e}render(){let{avatarClassName:e,avatarStyle:t,children:o,className:r,context:i,enableTransparentBackground:n,style:s,height:l,hint:a,size:h,width:c}=this.props,{dataURL:d}=this.state,u=!d,p=u?s:{...s,...t,background:`url(${d}) 0% 0% / ${h}px no-repeat ${n?"":"var(--app__bg0, #1c1e23)"}`,height:l||h,width:c||h},f=L()(r,u?"":e,!u&&{avatar:!0}),m=u?P.createElement(P.Fragment,null,o):void 0;return P.createElement("div",{className:f,"data-test-class":d?"avatar":"local-avatar","data-vscode-context":tM(i),style:p,title:a},m)}}function s7({icon:e,tooltipClassName:t="",tooltipId:o,tooltipText:r}){return r&&o?P.createElement(s5,{delay:400,overlay:P.createElement(sz,{className:L()("gk-graph","bs-tooltip",t),id:o},r),placement:"top",trigger:["hover","focus"]},e||P.createElement("span",null)):P.createElement(P.Fragment,null," ",e||P.createElement("span",null)," ")}function s9({id:e,toolTipText:t,getExternalIcon:o,issueTrackerType:r}){return P.createElement(s7,{icon:o(`issue-${r}`),tooltipClassName:"wide pull-left",tooltipId:`issue-tooltip-${e}`,tooltipText:t?t.trim():""})}function s8({hostingServiceType:e,icon:t,id:o,toolTipText:r}){return P.createElement(s7,{icon:t,tooltipClassName:"wide pull-left",tooltipId:`pr-tooltip-${e}-${o}`,tooltipText:r?r.trim():""})}function le({icon:e,type:t,upstream:o,tooltipText:r}){return P.createElement(s7,{icon:e,tooltipClassName:"wide pull-left",tooltipId:`upstream-indicator-tooltip-${t}-${o}`,tooltipText:r})}function lt({avatarClassName:e,avatarUrl:t,context:o,icon:r,tooltipText:i}){return P.createElement(s7,{icon:P.createElement("span",{className:"ref-avatar"},P.createElement(s4,{avatarClassName:e,context:o,enableTransparentBackground:!0,size:14,url:t},r)),tooltipId:`remote-icon-${i||"tooltipText"}`,tooltipText:i})}function lo(e){switch(e){case"github":return"GitHub";case"githubEnterprise":return"GitHub Enterprise";case"gitlab":return"GitLab";case"gitlabSelfHosted":return"GitLab Self-Hosted";case"azureDevops":return"Azure DevOps";case"bitbucket":return"Bitbucket";case"bitbucketServer":return"Bitbucket Server";default:return e}}var lr=function({className:e,name:t}){return P.createElement("span",{className:L()("ref-name","truncate",e),style:{height:eL}},t)};function li(e,t,o,r=0){let i,n,s,{annotated:l,refType:a,message:h,name:c}=t;switch(a){case ec.REMOTE:{n=t.hostingServiceType?`${ec.REMOTE}-${t.hostingServiceType}`:ec.REMOTE,i=t.avatarUrl;let e=`${c} (${o("Ref-Remote")})`;s=t.owner?`${t.owner} -> ${e}`:e;break}case ec.TAG:n=ec.TAG,s=`${l&&h?h:c} (${o("Ref-Tag")})`;break;case ec.HEAD:default:{let e=null!=t.worktreeId;n=e?ec.WORKTREE:ec.HEAD,s=`${c} (${o(e?"Ref-Worktree":"Ref-Local")})`}}let d=t.context||void 0,u=P.createElement("span",{"data-vscode-context":tM(d)},e(n));return P.createElement(lt,{avatarUrl:i||"",context:d,icon:u,key:`ref-icon-${r}-${a}-${c}`,tooltipText:s})}class ln extends P.PureComponent{getContextForRefGroupIfExists(e,t,o){let r,i=!1,n=!1,s=!1;for(let l of e){if(l.refType===ec.HEAD)return o?l.contextGroup||t:l.context;l.refType===ec.REMOTE&&("origin"===l.owner?(i=!0,r=o?l.contextGroup||t:l.context):i||"upstream"!==l.owner?i||n||(s=!0,r=o?l.contextGroup||t:l.context):(n=!0,r=o?l.contextGroup||t:l.context)),i||n||s||(r=o?l.contextGroup||t:l.context)}return r}getDecoratedRefIcon(e,t,o,r,i){return P.createElement("div",{className:i,"data-vscode-context":tM(r),key:e,onClick:e=>this.onClickMetadata(e,o),onDoubleClick:e=>this.onDoubleClickMetadata(e,o)},t)}getPullRequestIconsAndTooltipsForRef(e,t,o){let r,{fallbackRefMetadata:i,getExternalIcon:n,onMissingRefMetadata:s,translate:l}=this.props;if(!(r=t.refType===ec.HEAD?t.upstream?e?.[t.upstream.id]?.[tw]:null:tI(t,e,s,tw,i))||0===r.length)return null;let a=[];for(let e of r){let{context:r,hostingServiceType:i,id:s,title:h}=e;if(o.has(s))continue;o.add(s);let c={refId:t.id,type:tw,data:e},d=`pr-icon-${t.refType}-${t.name}-${s}`,u=this.getDecoratedRefIcon(d,n("pull-request"),c,r,L()("ref-pull-request"));a.push(P.createElement(s8,{hostingServiceType:i,icon:u,id:s,key:d,toolTipText:h&&""!==h.trim()?l("PullRequestIcon-Tooltip",s,h,lo(i)):""}))}return a}getUpstreamIndicatorIconsAndTooltipsForRef(e,t){let{fallbackRefMetadata:o,getExternalIcon:r,onMissingRefMetadata:i,translate:n}=this.props,s=tI(t,e,i,tC,o);if(!s||0===s.ahead&&0===s.behind)return null;let l={refId:t.id,type:tC,data:s},a=s.ahead>0,h=s.behind>0,c=s.context;if(a||h){let e,o,i=a?`${s.ahead>99?"99+":s.ahead}`:"",d=h?`${s.behind>99?"99+":s.behind}`:"",u=`${s.owner}/${s.name}`;h&&a?(e=n("UpstreamIndicatorIcon-BehindAndAheadTooltip",d,i,u),o="ahead-behind"):h?(e=n("UpstreamIndicatorIcon-BehindTooltip",d,u),o="behind"):a&&(e=n("UpstreamIndicatorIcon-AheadTooltip",i,u),o="ahead");let p=P.createElement(P.Fragment,null,h?P.createElement(P.Fragment,null,P.createElement("span",{className:"ref-upstream-behind"},d),r("upstream-behind")):null,a?P.createElement(P.Fragment,null,P.createElement("span",{className:"ref-upstream-ahead"},i),r("upstream-ahead")):null);return P.createElement(le,{icon:this.getDecoratedRefIcon(`ref-upstream-${t.id}`,p,l,c,"ref-upstream"),tooltipText:e,type:o,upstream:u})}return null}getIssueIconsAndTooltipsForRef(e,t,o){let{fallbackRefMetadata:r,getExternalIcon:i,onMissingRefMetadata:n,translate:s}=this.props,l=tI(t,e,n,tR,r);if(!l||0===l.length)return null;let a=[];for(let e of l){if(o.has(e.id))continue;let r={refId:t.id,type:tR,data:e};o.add(e.id);let n=P.createElement(s9,{getExternalIcon:i,id:e.id,issueTrackerType:e.issueTrackerType,key:`issue-icon-${e.id}`,toolTipText:e.title&&""!==e.title.trim()?s("IssueIcon-Tooltip",e.displayId,e.title):""}),l=e.context||void 0;a.push(this.getDecoratedRefIcon(`ref-issue-${e.id}`,n,r,l,L()("ref-issue")))}return a}onContextMenu=e=>{let{onContextMenu:t,refGroup:o,sha:r}=this.props;t(e,o,r)};onClick=e=>{let{onClick:t,refGroup:o,sha:r}=this.props;t(e,o,r)};onClickMetadata=(e,t)=>{e.stopPropagation();let{onClick:o,refGroup:r,sha:i}=this.props;o(e,r,i,t)};onDoubleClick=e=>{let{onDoubleClick:t,refGroup:o,sha:r}=this.props;t(e,o,r)};onDoubleClickMetadata=(e,t)=>{e.stopPropagation();let{onDoubleClick:o,refGroup:r,sha:i}=this.props;o(e,r,i,t)};render(){let{enableShowHideRefsOptions:e,hasActive:t,hasRefs:o,isActive:r,isGhostRef:i,getExternalIcon:n,groupIsHovered:s,isInUnsupportedRebase:l,onRefBeginDrag:a,onRefDragEnter:h,onRefDragLeave:c,onRefDrop:d,onRefCanDrag:u,onRefCanDrop:p,onRefEndDrag:f,isRefGroupIncluded:m,refGroup:g,refGroupContext:v,refIconsPosition:y,refMetadata:S,onHovered:w,onHideRefClick:C,sha:R,showRemoteNamesOnRefs:b,enabledRefMetadataTypes:_,translate:T,type:x,useColumnHeaderIcons:E}=this.props,M=e&&!t&&s&&!m,I=y===ed.LEFT,O=y===ed.RIGHT,z=L()("ref-node-wrapper","flex"),D=L()("ref-node","flex","items-center","p1",{"has-active":t,"dim-ref":!o&&s,"is-active":r}),k="";g.length>0&&(k=b&&g[0].fullName||g[0].name);let G=L()({"display-none":E&&!s&&O,mr1:O}),N=P.createElement(lr,{className:G,name:k}),A=[],W=[],H=[],F=null,B=new Set,U=new Set;g.forEach((e,t)=>{if(A.push(li(n,e,T,t)),_.includes(tR)&&(e.refType===ec.HEAD||e.refType===ec.REMOTE)){let t=this.getIssueIconsAndTooltipsForRef(S,e,U);t&&H.push(...t)}if(_.includes(tw)&&e.refType===ec.REMOTE){let t=this.getPullRequestIconsAndTooltipsForRef(S,e,B);t&&W.push(...t)}_.includes(tC)&&e.refType===ec.HEAD&&(F=this.getUpstreamIndicatorIconsAndTooltipsForRef(S,e))});let Z=P.createElement("span",{className:L()("flex","items-center","ref-icons",{"is-active":r,"is-left-position":I})},[...A,...W,...H]),j=r?P.createElement(s7,{icon:P.createElement("span",{className:L()("ref-icon-current")},n("check")),tooltipId:"ref-icon-current",tooltipText:T("Ref-Current")}):null,V=this.getContextForRefGroupIfExists(g,v),$=this.getContextForRefGroupIfExists(g,v,!0),K=M?P.createElement("span",{className:"flex ml-auto"},P.createElement(s7,{icon:P.createElement("span",{className:L()("mr1","button"),onClick:e=>C(e,g,R)},n("hide")),tooltipId:`ref-node-toggle-visibility-btn-${k}`,tooltipText:T("Hide")})):null;return P.createElement(Y,{canDrag:e=>u(e),canDrop:(e,t,o)=>p(e,t,o),className:z,"data-vscode-context":tM($),dndData:{commitType:x,isGhostRef:i,isInUnsupportedRebase:l,refGroup:g,sha:R},dndId:`DndRefNode_${g[0].id}`,onBeginDrag:(e,t)=>a(e,t),onDragEnter:(e,t,o)=>h(e,t,o),onDragLeave:(e,t,o)=>c(e,t,o),onDrop:(e,t,o)=>d(e,t,o),onEndDrag:(e,t,o)=>f(e,t,o),style:{minWidth:0,marginLeft:3,height:eg}},P.createElement("span",{className:D,"data-test-class":"ref-node-span","data-vscode-context":tM(V),onContextMenu:l?void 0:this.onContextMenu,onDoubleClick:l?void 0:this.onDoubleClick,onMouseDown:this.onClick,onMouseEnter:e=>w(e,g,R),style:{minWidth:"100%"}},j,I&&Z,N,O&&Z,F,K))}}class ls extends P.Component{headIconsRef=P.createRef();containerRef=P.createRef();popoverMenuTargetRef=P.createRef();constructor(e){super(e),this.state={showPopoverMenu:!1}}onHiddenRefsClick=e=>{let{showPopoverMenu:t}=this.state;e.stopPropagation(),this.setState({showPopoverMenu:!t})};onShowRefNodes=(e,t,o)=>{this.props.onToggleRefNodesShown(e,t,o),X(this.props.excludeRefsById)||this.setState({showPopoverMenu:!0})};compareGraphRefOpts(e,t){let o=e.name.localeCompare(t.name);return 0===o&&e.type===ec.REMOTE?-1:o}render(){let{columnSetting:e,enableResizer:t,enableShowHideRefsOptions:o,getExternalIcon:r,graphWidth:i,graphZones:n,graphZoneType:s,excludeRefsById:l,includeOnlyRefsById:a,isDraggable:h,onFilterColumnClick:c,onHover:d,onResize:u,onResizeEnd:p,onResizeFromPropChange:f,onResizeStart:m,onUnhover:g,onSettingsClick:v,rowsStatsLoading:y,settingsContext:S,showRemoteNamesOnRefs:w,translate:C}=this.props,{showPopoverMenu:R}=this.state,b=tB(s,n);if(!b)return null;let _=tA(s,n),T=b.currentWidth-te,x=`${s}-header`,E=tU(b),M=e?.isFilterable||!1,I=E&&(M||o),O=L()("columns-btn",{"small-btn":I}),z=null,D=null;if(s===to){let e=Object.entries(l),t=Object.values(a),i=t.length>0,n=i&&t.some(e=>e.type===ec.TAG),s=e.filter(e=>e[1].type===ec.TAG&&(!i||!n)||!a[e[0]]);s.length>0&&(D=s.sort((e,t)=>this.compareGraphRefOpts(e[1],t[1])).map((e,t)=>{let o=e[0],i=e[1];l[o].id=o;let n={name:i.name,refType:i.type,owner:i.owner,avatarUrl:i.avatarUrl},s=(w||"*"===n.name)&&n.refType===ec.REMOTE?`${n.owner}/${n.name}`:n.name;return P.createElement("li",{id:o,key:o,onClick:e=>this.onShowRefNodes(e,[l[o]],!0)},li(r,n,C,t),P.createElement("span",{className:"ml1 text-ellipsis"},s))}),z=o?P.createElement("div",{className:L()(O,"right","text-normal","button",R?"active":null),ref:this.popoverMenuTargetRef},P.createElement(s7,{icon:P.createElement("span",{onClick:this.onHiddenRefsClick},r("hide")),tooltipId:"header-ref-node-hidden-refs-btn",tooltipText:C("GraphHeader-HiddenRefs-btn")})):null)}let k=M?P.createElement("div",{className:L()(O,"columns-filter","right","fs-1",{filtering:e?.isFilterActive||!1})},P.createElement(s7,{icon:P.createElement("span",{className:"columns-filter-icon text-disabled hover-icon",id:`${s}-header-filter`,onClick:e=>c(e,s),style:{height:eQ,marginBottom:e0}},r("filter")),tooltipId:"header-columns-filter",tooltipText:C("GraphHeader-Filter")})):null,G=!E&&s===ta&&y?P.createElement("span",{className:L()(O,"spinner")},r("loading")):null,N=P.createElement(sJ,{container:this.containerRef.current,onHide:R?()=>{this.setState({showPopoverMenu:!1})}:void 0,placement:"bottom",rootClose:R,show:R,target:this.popoverMenuTargetRef.current},e=>P.createElement(sI,{className:L()({"is-last-header":_}),id:"opts-popover",...e},P.createElement("ul",null,D))),A=_&&v?P.createElement("div",{className:L()("columns-btn","columns-settings","right","fs-1"),"data-vscode-context":tM(S)},P.createElement(s7,{icon:P.createElement("span",{className:"columns-settings-icon text-disabled hover-icon",onClick:e=>v(e,i)},r("settings")),tooltipId:"header-columns-settings",tooltipText:C("GraphHeader-EditColumns")})):null,W=this.headIconsRef?.current?.clientWidth??0,H=P.createElement("div",{className:"header-columns-icons",ref:this.headIconsRef},A,G,k,z),F=E?P.createElement(P.Fragment,null,P.createElement("div",{className:L()(O,"justify-start",{ml1:!I}),style:{width:T-W},title:C(b.headerLabelUntranslated)},r(function(e){switch(e){case tr:return"graph";case to:return"branch";case ti:return"message";case tn:return"author";case ts:return"datetime";case tl:return"commit";case ta:return"changes";default:return}}(s))),H):P.createElement(P.Fragment,null,P.createElement("div",{className:"text-disabled text-ellipsis",style:{height:eQ,overflow:"hidden",width:T-W}},P.createElement("span",{className:"fs-1 ml1 font-monospace"},C(b.headerLabelUntranslated))),H),B=P.createElement("div",{onMouseEnter:d,onMouseLeave:g},N,F),U=L()("panel-bg0","graph-header",{"is-draggable":h,"is-last-header":_});return P.createElement("div",{className:U,id:x,key:x,ref:this.containerRef,style:{zIndex:2,transform:"translate3d(0, 0, 0)",..._?{minWidth:T}:{display:"flex",minWidth:b.currentWidth,width:b.currentWidth}}},_?B:P.createElement(iT,{className:U,enable:t,handleStyles:{right:{right:0}},height:eQ,id:`${s}HeaderColumn`,onResize:u?e=>u(b,e):void 0,onResizeEnd:p?e=>p(b,e):void 0,onResizeFromPropChange:f?e=>f(b,e):void 0,onResizeStart:m?e=>m(b,e):void 0,resizeContentClassName:"z1",resizeEdge:"right",resizeHandleClassName:"z2 border-right",style:{display:"flex"},translate:C,width:b.currentWidth,widthConstraints:tj(s,n,i)},B))}}class ll extends P.PureComponent{canDrag=!1;isDraggable=e=>this.canDrag&&e.props.isDraggable;isDroppable=(e,t)=>e.props.graphZoneType!==t?.props?.graphZoneType&&(!t||t.props.isDroppable);onDrop=(e,t)=>{this.props.onColumnReOrdered&&this.props.onColumnReOrdered(e.props.graphZoneType,t?t.props.graphZoneType:null)};onZoneHover=()=>{this.canDrag=!0};onZoneUnHover=()=>{this.canDrag=!1};render(){let{columnsSettings:e,dragAppendToContainer:t,enableResizer:o,enableShowHideRefsOptions:r,getExternalIcon:i,excludeRefsById:n,headerContext:s,includeOnlyRefsById:l,onFilterColumnClick:a,onPopupGraphHeaderContextMenu:h,onGraphZoneResize:c,onGraphZoneResizeEnd:d,onGraphZoneResizeFromPropChange:u,onSettingsClick:p,onToggleRefNodesShown:f,graphZones:m,repoPath:g,rowsStatsLoading:v,showRemoteNamesOnRefs:y,translate:S,width:w,height:C,settingsContext:R}=this.props,b=P.createElement("div",{className:"panel-bg0",style:{height:eQ,marginBottom:e0,marginLeft:-e8,minWidth:e8+te}});return P.createElement("div",{className:"graph-header flex","data-vscode-context":tM(s),onContextMenu:h?e=>h(e,w):void 0,onMouseDownCapture:this.props.onMouseDownCapture,onMouseMoveCapture:this.props.onMouseMoveCapture,onMouseUpCapture:this.props.onMouseUpCapture,onWheelCapture:this.props.onWheel,style:{height:eQ,marginBottom:e0}},b,P.createElement(iB,{className:"flex",direction:"horizontal",isDraggable:this.isDraggable,isDroppable:this.isDroppable,mirrorContainer:t,onDrop:this.onDrop},m.map(t=>P.createElement(ls,{columnSetting:e[t.type],enableResizer:o,enableShowHideRefsOptions:r,excludeRefsById:n,getExternalIcon:i,graphHeight:C,graphWidth:w,graphZones:m,graphZoneType:t.type,id:`${t.type}Header`,includeOnlyRefsById:l,isDraggable:t.isCustomizable,isDroppable:t.isCustomizable,key:`${t.type}Header`,onFilterColumnClick:a,onHover:this.onZoneHover,onResize:c,onResizeEnd:d,onResizeFromPropChange:u,onSettingsClick:p,onToggleRefNodesShown:f,onUnhover:this.onZoneUnHover,repoPath:g,rowsStatsLoading:v,settingsContext:R,showRemoteNamesOnRefs:y,translate:S}))))}}class la extends CustomEvent{static type="invalidate";constructor(e,t){super(la.type,{detail:{shas:t?new Set(t):void 0,type:e}})}}var lh=function({sha:e,content:t,isHovered:o,isSelected:r}){if(null==t)return null;let i="row-adornment-overlay";r?i+=" is-selected":o&&(i+=" is-hovered");let n={"position-anchor":`--row-${e}`};return P.createElement("div",{className:i,"data-sha":e,style:n},t)};class lc extends P.Component{adornments=new Map;pendingResolves=new Map;provideAbortController;resolveIdCounter=0;state={cacheVersion:0};componentDidMount(){this.setupProvider()}componentDidUpdate(e){if(e.provider!==this.props.provider&&(this.teardownProvider(e.provider),this.setupProvider()),this.adornments.size){let e=this.props.getVisibleRows();this.evictDistantAdornments(e)}}componentWillUnmount(){this.teardownProvider(this.props.provider)}setupProvider(){this.props.provider.invalidate?.addEventListener(la.type,this.onInvalidate)}teardownProvider(e){this.provideAbortController?.abort(),this.provideAbortController=void 0,this.pendingResolves.clear(),this.adornments.clear(),e.invalidate?.removeEventListener(la.type,this.onInvalidate)}onInvalidate=e=>{let{shas:t,type:o}=e.detail;if("all"===o)if(t)for(let e of t)this.adornments.delete(e);else this.adornments.clear();else if(t)for(let e of t){let t=this.adornments.get(e);t&&(t.content=void 0)}else for(let e of this.adornments.values())e.content=void 0;this.setState(e=>({cacheVersion:e.cacheVersion+1}))};provideForVisibleRows(e){let{provider:t}=this.props,o=e.filter(e=>!this.adornments.has(e.sha));if(!o.length)return;this.provideAbortController?.abort(),this.provideAbortController=new AbortController;let r=this.provideAbortController.signal,i=t.provideAdornments(o,r);i instanceof Promise?i.then(e=>{r.aborted||(this.applyProvideResults(e),this.setState(e=>({cacheVersion:e.cacheVersion+1})))}).catch(()=>{}):this.applyProvideResults(i)}applyProvideResults(e){for(let[t,o]of Object.entries(e))this.adornments.set(t,{visibility:o.visibility??!0,dynamic:o.dynamic??!1,context:o.context,content:void 0})}evictDistantAdornments(e,t=100){let{allRows:o}=this.props;if(0===e.length||0===this.adornments.size)return;let r=e.map(e=>e.rowIndex??-1).filter(e=>e>=0);if(0===r.length)return;let i=Math.min(...r),n=Math.max(...r),s=new Set,l=Math.max(0,i-t),a=Math.min(o.length-1,n+t);for(let e=l;e<=a;e++){let t=o[e];t&&s.add(t.sha)}for(let e of this.adornments.keys())s.has(e)||(this.adornments.delete(e),this.pendingResolves.delete(e))}shouldShowAdornment(e,t){if(!0===e)return!0;for(let o of e)if("hover"===o&&t.isHovered||"focus"===o&&t.isFocused||"selected"===o&&t.isSelected)return!0;return!1}getOrResolveContent(e){let{provider:t}=this.props,o=this.adornments.get(e.sha);if(!o)return;if(void 0!==o.content&&!o.dynamic)return o.content;let r=t.resolveAdornment(e,o.context);if(r instanceof Promise){let t=++this.resolveIdCounter;this.pendingResolves.set(e.sha,t),r.then(r=>{this.pendingResolves.get(e.sha)===t&&(this.pendingResolves.delete(e.sha),o.dynamic||(o.content=r),this.setState(e=>({cacheVersion:e.cacheVersion+1})))}).catch(()=>{this.pendingResolves.delete(e.sha)});return}return o.dynamic||(o.content=r),r}render(){let{getVisibleRows:e,selectedShas:t,hoveredSha:o,focusedSha:r}=this.props,i=e();this.provideForVisibleRows(i);let n=[];for(let e of i){let i=this.adornments.get(e.sha);if(!i)continue;let s={isHovered:o===e.sha,isFocused:r===e.sha,isSelected:t.has(e.sha)};if(!this.shouldShowAdornment(i.visibility,s))continue;let l=this.getOrResolveContent(e);null!=l&&n.push(P.createElement(lh,{content:l,isHovered:s.isHovered,isSelected:s.isSelected,key:e.sha,sha:e.sha}))}if(!n.length)return null;let{hasVerticalScrollbar:s}=this.props;return P.createElement("div",{className:s?"row-adornment-overlay-container has-scrollbar":"row-adornment-overlay-container"},n)}}function ld(e){let{constraints:{max:t,min:o},stats:{files:r,additions:i,deletions:n},getExternalIcon:s,isLastColumn:l,isRowSelected:a,verticalScrollWidth:h,zoneWidth:c}=e,d=i+n,u=Math.max(o,Math.min(t,d)),p=l?h+eX:eX;d<=u&&(p+=eX);let f=Math.max(eq,u/t*(c-52-p));return P.createElement("div",{className:L()("changes-zone",a?"selected":null)},P.createElement("span",{className:"changes-files",style:{width:52}},P.createElement("span",{className:"mr1"},s("files")),P.createElement("span",{className:"mr1"},r>999?"999+":r)),P.createElement("span",{className:"changes-bar",style:{width:f}},i?P.createElement("div",{className:"changes-sub-bar added",style:{width:i/d*f}}):null,n?P.createElement("div",{className:"changes-sub-bar deleted",style:{width:n/d*f}}):null))}let lu=P.createElement("div",{className:"color-strip height-100",style:{width:2}}),lp={},lf={};class lm extends P.PureComponent{render(){let e,t,{clearCurrentlyHoveredGraphCommit:o,children:r,column:i,columnForColoring:n,context:s,currentlyHoveredCommitSha:l,dimRowsOfSelectedCommit:a,getExternalIcon:h,graphZoneType:c,hasAvatars:d,highlightRowsOnRefHover:u,isDimmedMergeCommitRow:p,isHighlighted:f,isHovering:m,isLastColumn:g,isInUnsupportedRebase:v,isMissingHoveredRefGroup:y,isSelected:S,numGraphColumns:w,onContextMenu:C,onClickCommit:R,onDoubleClickCommit:b,rowContext:_,sha:T,showColorStrip:x,showConflictIcon:E,showTimeline:M,setAsCurrentlyHoveredGraphCommit:I,style:O,title:z,type:D,verticalScrollWidth:k,zoneWidth:G}=this.props,N=((t=lp[e=D+m.toString()])||(t=L()("graph-row-wrapper","grow-3","height-100","graph-zone-column","min-width-0","pb3","pointer","pt3","relative",D,{"is-hovering":m}),lp[e]=t),t),A=function(e,t,o,r,i,n=!1,s=!1,l=!1,a=!1){let h=`${e}${t}${r}${o}${n}${s}${l}${a}${i}`,c=lf[h];return c||(c=L()(`column-${t%i+1}`,"graph-row","height-100-percent","flex",e,{"is-selected":r},{"is-highlighted":o},{"dimmed-row":a&&!o||n&&(s||l)}),lf[h]=c),c}(D,n??i,f,S,w,y,u,a,p),W=M?P.createElement(iI,null):null,H=g?{"anchor-name":`--row-${T}`}:void 0;return P.createElement("div",{className:N,"data-vscode-context":tM(_),onContextMenu:v?void 0:e=>C(e,c,T),onDoubleClick:e=>b(e,c,T),onMouseDown:e=>R(e,c,T),onMouseEnter:e=>I(e,c,T,l),onMouseLeave:e=>o(e,c,T,l),style:{...O,...H}},W,P.createElement("div",{className:A,"data-vscode-context":tM(s)},x?lu:null,E?P.createElement("span",{className:L()("ml2")},h("warning")):null,P.createElement("span",{className:L()("graph-zone","width-100","flex-1"),style:{lineHeight:`${eg}px`,...g&&{width:G-k},...d&&{marginLeft:5}},title:z},r)))}}function lg(e){let t=(e||"").trim().toUpperCase();if(0===t.length)return"?";let o=t.split(" ");return 1===o.length?o[0][0]:o.length>1?o[0][0]+o[o.length-1][0]:"?"}function lv(e,t){return e&&t?`${e} <${t}>`:e||t||""}class ly extends P.Component{constructor(e){super(e),this.state={tooltipText:""}}getDefaultAvatar=(e,t,o)=>{var r;let{authorInitials:i,column:n,context:s,cssVariables:l,style:a,fontSize:h,minWidth:c,size:d,title:u=""}=this.props,p=void 0!==n&&l[ea(n)]||eu,f=("hsla"===(r=t4(p.trim())).type&&(r=t3(r)),(299*r.r+587*r.g+114*r.b)/1e3<128)?"#FFFFFF":"#000000",m={alignItems:"center",backgroundColor:p,backgroundSize:d,color:f,display:"flex",fontSize:`${h}px`,fontWeight:"bold",height:e,justifyContent:"center",minWidth:c,top:o,width:t,...a};return P.createElement("div",{className:this.getAvatarClassName(),"data-vscode-context":tM(s),style:m,title:u},i?i.toUpperCase():"")};ensureTooltipText=()=>{let{tooltip:e}=this.props;this.setState({tooltipText:"function"==typeof e?e():e})};getAvatarClassName(){return L()("avatar","gravatar","rad2",this.props.className)}render(){let{tooltipText:e}=this.state,{avatarUrl:t,context:o,style:r,height:i,minWidth:n,size:s,title:l="",tooltip:a,top:h,useAuthorInitialsForAvatars:c,width:d}=this.props,u=i||s,p=d||s,f=h||eb/2-u/2,m={top:f,minWidth:n,...r},g=this.getDefaultAvatar(u,p,f),v=c?g:P.createElement("span",null,P.createElement(s4,{avatarClassName:this.getAvatarClassName(),avatarStyle:m,context:o,height:u,hint:l,size:s,url:t,width:p},this.getDefaultAvatar(u,p,f)));return a?P.createElement(s5,{delay:250,onEnter:this.ensureTooltipText,overlay:P.createElement(sz,{className:"gk-graph",id:"graph-gravatar-tooltip"},e),placement:"top",trigger:["hover","focus"]},v):v}}let lS={type:s0().string,tooltip:s0().bool,as:s0().elementType},lw=P.forwardRef(({as:e="div",className:t,type:o="valid",tooltip:r=!1,...i},n)=>(0,r8.jsx)(e,{...i,ref:n,className:L()(t,`${o}-${r?"tooltip":"feedback"}`)}));lw.displayName="Feedback",lw.propTypes=lS;let lC=P.createContext({}),lR=P.forwardRef(({bsPrefix:e,type:t,size:o,htmlSize:r,id:i,className:n,isValid:s=!1,isInvalid:l=!1,plaintext:a,readOnly:h,as:c="input",...d},u)=>{let{controlId:p}=(0,P.useContext)(lC);return e=sR(e,"form-control"),(0,r8.jsx)(c,{...d,type:t,size:r,ref:u,readOnly:h,id:i||p,className:L()(n,a?`${e}-plaintext`:e,o&&`${e}-${o}`,"color"===t&&`${e}-color`,s&&"is-valid",l&&"is-invalid")})});lR.displayName="FormControl";let lb=Object.assign(lR,{Feedback:lw}),l_={ADDED:"added",DELETED:"deleted",MODIFIED:"modified",RENAMED:"renamed"};class lT extends P.Component{render(){let{fileDiffType:e,getExternalIcon:t,translate:o,noMargin:r}=this.props;if(!e)return null;let i=(e=>{switch(e){case l_.ADDED:return"added";case l_.MODIFIED:return"modified";case l_.DELETED:return"deleted";case l_.RENAMED:return"renamed";default:return null}})(e),n=(e=>{switch(e){case l_.ADDED:return"color-green";case l_.MODIFIED:return"color-orange";case l_.DELETED:return"color-red";case l_.RENAMED:return"color-blue";default:return null}})(e),s=(e=>{switch(e){case l_.ADDED:return"CommitDiffSection-FileAdded";case l_.MODIFIED:return"CommitDiffSection-FileModified";case l_.DELETED:return"CommitDiffSection-FileDeleted";case l_.RENAMED:return"CommitDiffSection-FileRenamed";default:return null}})(e),l=L()("fs-1",n,{mr1:!r});return P.createElement("span",{className:l,title:o(s)},i&&t(i))}}var lx=function({workDirStats:e,getExternalIcon:t,translate:o}){let{added:r,deleted:i,modified:n}=e,{g:s}=W;return r||i||n?P.createElement("span",{className:"wip-stats-pill"},r>0&&P.createElement("span",{className:"wip-stats-pill__item wip-stats-pill__item--added"},P.createElement(lT,{fileDiffType:s.ADDED,getExternalIcon:t,noMargin:!0,style:{},translate:o}),P.createElement("span",{className:"wip-stats-pill__count"},r)),n>0&&P.createElement("span",{className:"wip-stats-pill__item wip-stats-pill__item--modified"},P.createElement(lT,{fileDiffType:s.MODIFIED,getExternalIcon:t,noMargin:!0,style:{},translate:o}),P.createElement("span",{className:"wip-stats-pill__count"},n)),i>0&&P.createElement("span",{className:"wip-stats-pill__item wip-stats-pill__item--deleted"},P.createElement(lT,{fileDiffType:s.DELETED,getExternalIcon:t,noMargin:!0,style:{},translate:o}),P.createElement("span",{className:"wip-stats-pill__count"},i))):null};class lE extends P.Component{textWidthRef=P.createRef();wrapperRef=P.createRef();static defaultProps={style:{},value:""};componentDidMount(){this.wrapperRef?.current&&(this.wrapperRef.current.style.width="0px")}componentDidUpdate(){this.textWidthRef?.current&&this.wrapperRef?.current&&(this.wrapperRef.current.style.width=`${Number(this.textWidthRef.current.offsetWidth)+35}px`)}componentWillUnmount(){this.props.onBlur&&this.props.onBlur()}onWipKeyDown(e){e.stopPropagation()}render(){let{clearCurrentlyHoveredGraphCommit:e,currentlyHoveredCommitSha:t,getExternalIcon:o,graphZoneType:r,isCommitting:i,isHovering:n,isSelected:s,onBlur:l,onClickCommit:a,onContextMenu:h,onFocus:c,onMessageChange:d,setAsCurrentlyHoveredGraphCommit:u,sha:p,style:f,translate:m,value:g,workDirStats:v}=this.props,y=L()("graph-zone-column","pt3","pb3","pointer","height-100-percent","grow-3","graph-row-wrapper",ei,{"is-hovering":n}),S=L()("column-1","graph-row","flex",{"is-selected":s}),w=P.createElement(lx,{getExternalIcon:o,translate:m,workDirStats:v}),C=P.createElement("div",{className:"work-dir-input",ref:this.wrapperRef},P.createElement(lb,{"data-test-class":"work-dir-input-field",disabled:i,onBlur:e=>l(e),onChange:e=>d(e.target.value),onContextMenu:e=>h(e,r,p),onFocus:e=>c(e),onKeyDown:e=>this.onWipKeyDown(e),placeholder:m("WorkDirMessageInput-WIPPlaceholder"),type:"text",value:g}),P.createElement("div",{className:"text-width","data-test-class":"work-dir-input-message",ref:this.textWidthRef},g));return P.createElement("div",{className:y,onMouseEnter:e=>u(e,r,p,t),onMouseLeave:o=>e(o,r,p,t),style:f},P.createElement("div",{className:S,"data-test-class":"work-dir-message-row-div",onMouseDown:e=>a(e,r,p),style:{position:"relative",width:"100%"}},C,w))}}function lM({hasRefs:e,isActiveSha:t,left:o,type:r,width:i}){let n=L()("ref-line","z4",{"is-active":t});return e&&[Q,et,ee].includes(r)?P.createElement("hr",{className:n,style:{left:o,width:i}}):null}function lI({graphZoneModeConstants:{RADIUS_DIFF_MERGE_NODE_COMMIT_NODE:e},hasRefs:t,isActiveSha:o,nodeOffset:r,type:i}){return P.createElement(lM,{hasRefs:t,isActiveSha:o,left:0,type:i,width:r+(i===et?e:0)})}function lO({className:e,marginLeft:t}){return P.createElement("div",{className:L()("app-bg0","absolute","left-0","right-0","bottom-0","top-0","pt3","pb3",e),style:{marginLeft:t}},P.createElement("div",{className:"commit-bg-color height-100-percent width-100-percent"}))}function lz({column:e,graphZoneModeConstants:{COMMIT_COLUMN_WIDTH:t,COMMIT_NODE_DIAMETER:o,COMMIT_ZONE_GUTTER_WIDTH:r}}){return P.createElement(lO,{className:"z1",marginLeft:r+t*e+o/2})}function lD(){return P.createElement(lO,{marginLeft:0})}let lk=(e,t,o,r,i,n,s=!1)=>{let l={height:n.COMMIT_MERGE_NODE_DIAMETER,left:o+n.COMMIT_MERGE_NODE_LEFT_OFFSET,marginTop:n.COMMIT_MERGE_NODE_TOP_OFFSET,opacity:r,width:n.COMMIT_MERGE_NODE_DIAMETER},a=L()("node",i,"z6"),h=P.createElement(sz,{className:"gk-graph",id:"graph-merge-node-tooltip"},lv(t,e)),c=P.createElement("div",{className:a,"data-test-class":"tree-row-commit-node",style:l});return s?c:P.createElement(s5,{delay:250,overlay:h,placement:"top",trigger:["hover","focus"]},c)};class lG extends P.PureComponent{render(){let{authorEmail:e,authorName:t,getExternalIcon:o,graphZoneModeConstants:r,left:i,opacity:n,suppressNonRefRowTooltips:s,translate:l,type:a}=this.props;return(t||e)&&a===Q?r.IS_COMPACT?lk(e,t,i,n,et,r,s):(({authorEmail:e,authorInitials:t,authorName:o,avatarUrl:r,column:i,context:n,cssVariables:s,graphZoneModeConstants:l,left:a,message:h,opacity:c,suppressNonRefRowTooltips:d,type:u,useAuthorInitialsForAvatars:p})=>P.createElement(ly,{authorInitials:t,avatarUrl:r,className:L()("node",u,"z6"),column:i,context:n,cssVariables:s,fontSize:10,height:l.COMMIT_NODE_DIAMETER,size:l.COMMIT_ZONE_AVATAR_DIAMETER,style:{left:a,opacity:c},tooltip:d?void 0:()=>{let t=o&&""!==o.trim()&&"Unknown"!==o?lv(o,e):e,r=ot(t8(h||"")),i="";if(0===r.length)i=t;else{r.unshift({email:e,name:o});for(let e=0;e<r.length;e+=1){let t=r[e];i+=lv(t.name,t.email),e<r.length-1&&(i+=", ")}}return i},top:l.COMMIT_NODE_TOP_OFFSET,useAuthorInitialsForAvatars:p,width:l.COMMIT_NODE_DIAMETER}))(this.props):a===et||a===ee||a===eo?lk(e,t,i,n,a,r,s):((e,t,o,r,i,n,s,l=!1,a,h=!1)=>{let c,d={height:a.COMMIT_NODE_DIAMETER,left:r,marginTop:a.COMMIT_NODE_TOP_OFFSET,opacity:i,width:a.COMMIT_NODE_DIAMETER};l&&(d.borderWidth=1);let u=L()("gk-graph","node",s,"z6",{compact:l});c=s===er?n("Stash"):s===ei?n("Graph-WorkInProgress"):lv(o,t);let p=P.createElement("div",{className:u,"data-test-class":"tree-row-commit-node",style:d},s!==er||l?null:P.createElement("span",null,e("stash"))),f=P.createElement(sz,{className:"gk-graph",id:"graph-other-node-tooltip"},c);return h?p:P.createElement(s5,{delay:250,overlay:f,placement:"top",trigger:["hover","focus"]},p)})(o,e,t,i,n,l,a,r.IS_COMPACT,r,s)}}class lN extends P.Component{render(){let{columnColorByColumn:e,edgeColumnMax:t,edges:o,nodeColumn:r,graphZoneModeConstants:{COMMIT_COLUMN_WIDTH:i,COMMIT_ZONE_GUTTER_WIDTH:n,COMMIT_ZONE_LINE_WIDTH:s,IS_COMPACT:l}}=this.props,a=function(e,t,o,r,i,n,s,l){let a=function(e,t,o,r){let i="";for(let n=0;n<=t;n++){let{passThrough:t,starting:s,ending:l}=e[n]??{};i=`${i}_${ou(n,o,s?.type,r)}_${ou(n,o,l?.type,r)}_${op(n,t?.type,r)}`}return i}(e,t,o,l),h=ox[a];if(h)return h;let c="";for(let a=0;a<=t;a+=1){let t=e[a];if(!t)continue;let{passThrough:h,starting:d,ending:u}=t;c+=d?function(e,t,o,r,i,n,s,l){var a,h;let c,d,u,p,f,m=ou(e,t,o,l),g=oT[m];return g?g:(g=t===e?(a=r[e],(c=od(o,a,s,l)).x1=ol(t,i,n,l),c.x2=ol(t,i,n,l),c.y1=eR/2,c.y2=eR,oc(c)):(h=r[e],d=od(o,h,s,l),u=t<e?-eT:eT,(p={...d}).x1=ol(e,i,n,l),p.x2=ol(e,i,n,l),p.y1=eR-ew,p.y2=eR,(f={...d}).x1=ol(e,i,n,l)+u,f.x2=ol(t,i,n,l),f.y1=eR/2,f.y2=eR/2,`<g>${oR(h,t<e?180:270,270*(t<e),o,ol(e,i,n,l)+u,eR-ew,s,l)}${oc(p)}${oc(f)}</g>`),oT[m]=g,g)}(a,o,d.type,r,i,n,s,l):"",c+=h?function(e,t,o,r,i,n,s){let l=op(e,t,s),a=o_[l];if(a)return a;let h=ol(e,r,i,s),c=od(t,o[e],n,s);return c.x1=h,c.x2=h,c.y1=0,c.y2=eR,a=oc(c),o_[l]=a,a}(a,h.type,r,i,n,s,l):"",c+=u?function(e,t,o,r,i,n,s,l){var a,h;let c,d,u,p,f,m=ou(e,t,o,l),g=ob[m];return g?g:(g=t===e?(a=r[e],(c=od(o,a,s,l)).x1=ol(t,i,n,l),c.x2=ol(t,i,n,l),c.y1=0,c.y2=eR/2,oc(c)):(h=r[e],d=od(o,h,s,l),u=t<e?-eT:eT,(p={...d}).x1=ol(e,i,n,l),p.x2=ol(e,i,n,l),p.y1=0,p.y2=eC,(f={...d}).x1=ol(e,i,n,l)+u,f.x2=ol(t,i,n,l),f.y1=eR/2,f.y2=eR/2,`<g>${oc(p)}${oR(h,t>e?0:90,t>e?90:180,o,ol(e,i,n,l)+u,eC,s,l)}${oc(f)}</g>`),ob[m]=g,g)}(a,o,u.type,r,i,n,s,l):""}return h=`url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><g>${c}</g></svg>')`,ox[a]=h,h}(o,t,r,e,i,n,s,l);return P.createElement("div",{className:"absolute top-0 right-0 bottom-0 left-0 z2",style:{background:a}})}}function lA({boxShadowAlpha:e,boxShadowLeft:t,children:o,className:r="",left:i,width:n}){return P.createElement("div",{className:L()("absolute","top-0","bottom-0","z3",r),style:{boxShadow:`${t}px 5px 10px rgba(0, 0, 0, ${e})`,left:i,width:n}},o)}function lW({boxShadowAlpha:e,hasTimeline:t,scrollLeft:o,width:r}){return P.createElement(lA,{boxShadowAlpha:e,boxShadowLeft:5,className:"app-bg0 left-0",left:o,width:r},t?P.createElement(iI,{z2:!0}):null)}function lH({boxShadowAlpha:e,commitZoneWidth:t,hasTimeline:o,scrollLeft:r,width:i}){return P.createElement(lA,{boxShadowAlpha:e,boxShadowLeft:-5,left:r+t-i,width:i},o?P.createElement(iI,{z2:!0}):null,P.createElement(lD,null))}class lL extends P.PureComponent{render(){let{authorEmail:e,authorName:t,avatarContext:o,avatarUrl:r,clearCurrentlyHoveredGraphCommit:i,column:n,columnColorByColumn:s,columnForColoring:l,commitZoneWidth:a,cssVariables:h,currentlyHoveredCommitSha:c,edgeColumnMax:d,edges:u,hasRefs:p,hasTimeline:f,getExternalIcon:m,graphZoneModeConstants:g,isActiveSha:v,isInUnsupportedRebase:y,isLastColumn:S,isSelected:w,leftGutterBoxShadowAlpha:C,leftGutterWidth:R,message:b,nodeOffset:_,nodeOpacity:T,numGraphColumns:x,onContextMenu:E,onClickCommit:M,onDoubleClickCommit:I,rightGutterBoxShadowAlpha:O,rightGutterWidth:z,rowContext:D,scrollLeft:k,setAsCurrentlyHoveredGraphCommit:G,sha:N,shouldShowRefLine:A,suppressNonRefRowTooltips:W,style:H,translate:F,type:B,useAuthorInitialsForAvatars:U,zoneContext:Z}=this.props,j=(l??n)%x+1,V=L()("relative","commit-zone","height-100-percent","pt3",B,`column-${j}`,{"is-selected":w,"has-active":v}),$=f?P.createElement(iI,{z2:!0}):null,K=P.createElement("div",{className:V,"data-vscode-context":tM(Z),onContextMenu:y?void 0:e=>E(e,tr,N),onDoubleClick:e=>I(e,tr,N),onMouseDown:e=>M(e,tr,N),onMouseEnter:e=>G(e,tr,N,c),onMouseLeave:e=>i(e,tr,N,c),style:{...H,...S&&{width:"100%"}}},$,P.createElement(lW,{boxShadowAlpha:C,hasTimeline:f,scrollLeft:k,width:R}),A?P.createElement(lI,{graphZoneModeConstants:g,hasRefs:p,isActiveSha:v,nodeOffset:_,type:B}):null,P.createElement(lG,{authorEmail:e,authorInitials:lg(t),authorName:t,avatarUrl:r,column:n,context:o,cssVariables:h,getExternalIcon:m,graphZoneModeConstants:g,left:_,message:b,opacity:T,suppressNonRefRowTooltips:W,translate:F,type:B,useAuthorInitialsForAvatars:U}),P.createElement(lz,{column:n,graphZoneModeConstants:g}),P.createElement(lN,{columnColorByColumn:s,edgeColumnMax:d,edges:u,graphZoneModeConstants:g,nodeColumn:n}),P.createElement(lH,{boxShadowAlpha:O,commitZoneWidth:a,hasTimeline:f,scrollLeft:k,width:z}));return D?P.createElement("div",{"data-vscode-context":tM(D)},K):K}}var lP=function(e,t){let{avatarUrlByEmail:o,onMissingAvatar:r,clearCurrentlyHoveredGraphCommit:i,columnColorByColumn:n,cssVariables:s,currentlyHoveredCommitSha:l,processedRows:a,getExternalIcon:h,graphZoneModeConstants:c,isInUnsupportedRebase:d,leftGutterBoxShadowAlpha:u,leftGutterWidth:p,onCommitContextMenu:f,onClickCommit:m,onDoubleClickCommit:g,nodeOffsetByColumn:v,nodeOpacityByColumn:y,numGraphColumns:S,rightGutterBoxShadowAlpha:w,rightGutterWidth:C,setAsCurrentlyHoveredGraphCommit:R,scrollLeft:b,shouldShowRefLine:_,suppressNonRefRowTooltips:T,translate:x,useAuthorInitialsForAvatars:E}=e,M=new tJ(e);return({rowIndex:e,style:I})=>{let O,z=t(e),D=a[e],k=M.getZoneWidth(tr),{email:G,author:N,contexts:A,message:W,sha:H,type:L}=D,F=D.column,B=A?.graph||void 0,U=A?.avatar||void 0,Z=A?.row||void 0;!E&&((O=o[G])||r(G,H));let j=M.isLastColumn(tr);return P.createElement(lL,{authorEmail:G,authorName:N,avatarContext:U,avatarUrl:O,clearCurrentlyHoveredGraphCommit:i,column:F,columnColorByColumn:n,columnForColoring:D.columnForColoring,commitZoneWidth:k,cssVariables:s,currentlyHoveredCommitSha:l,edgeColumnMax:D.edgeColumnMaxes,edges:D.edges,getExternalIcon:h,graphZoneModeConstants:c,hasRefs:D.hasRefs||!1,hasTimeline:M.hasTimeline(e),isActiveSha:M.rowContainsCurrentHeadRef(D),isInUnsupportedRebase:d,isLastColumn:j,isSelected:M.isSelected(e),key:z,leftGutterBoxShadowAlpha:u,leftGutterWidth:p,message:W,nodeOffset:v[F],nodeOpacity:y[F],numGraphColumns:S,onClickCommit:m,onContextMenu:f,onDoubleClickCommit:g,rightGutterBoxShadowAlpha:w,rightGutterWidth:C,rowContext:Z,scrollLeft:b,setAsCurrentlyHoveredGraphCommit:R,sha:H,shouldShowRefLine:_,style:I,suppressNonRefRowTooltips:T,translate:x,type:L,useAuthorInitialsForAvatars:E,zoneContext:B})}};let lF=P.forwardRef(({controlId:e,as:t="div",...o},r)=>{let i=(0,P.useMemo)(()=>({controlId:e}),[e]);return(0,r8.jsx)(lC.Provider,{value:i,children:(0,r8.jsx)(t,{...o,ref:r})})});lF.displayName="FormGroup";class lB extends P.PureComponent{handleClickOutside(){let{sha:e,shorthand:t,type:o,data:r}=this.props.createRefFormData;this.props.onCancel(t,e,o,r)}constructor(e){super(e);let{createRefFormData:t,formatRefShorthand:o}=this.props,{sha:r,shorthand:i,type:n,data:s}=t;this.state={currentShorthand:o(i,r,n,s),initShorthand:i}}static getDerivedStateFromProps(e,t){let{createRefFormData:o,formatRefShorthand:r}=e,{currentShorthand:i,initShorthand:n}=t,{sha:s,shorthand:l,type:a,data:h}=o,c=l!==n;return c&&r(l,s,a,h)!==i?{currentShorthand:r(l,s,a,h),initShorthand:l}:c?{currentShorthand:i,initShorthand:l}:null}onInputChange(e){let t=e||"";if(e){let{sha:e,type:o,data:r}=this.props.createRefFormData;t=this.props.formatRefShorthand(t,e,o,r)}this.setState({currentShorthand:t}),this.props.onRefShorthandChange?.(t)}render(){let{createRefFormData:e,isRefShorthandValid:t,onCancel:o,onContextMenu:r,onRefCreate:i,refZoneWidth:n,style:s,translate:l}=this.props,{currentShorthand:a}=this.state,{data:h,sha:c,type:d}=e,u=l(d===ec.TAG?"RefZone-EnterTagName":"RefZone-EnterBranchName");return P.createElement("div",{className:"create-ref","data-testid":"create-ref",style:{...s,minWidth:n,width:n}},P.createElement(lF,null,P.createElement(lb,{autoFocus:!0,"data-testid":"create-ref-form-control",isInvalid:a.length>0&&!t(a,c,d,h),onChange:e=>this.onInputChange(e.target?.value),onContextMenu:e=>r(e,a,c,d,h),onKeyDown:e=>{(e.stopPropagation(),"Escape"===e.key)?o(a,c,d,h):c&&"Enter"===e.key&&i(a,c,d,h)},placeholder:u,type:"text",value:a})))}}var lU=function({hasActive:e,overflowCount:t}){return P.createElement("span",{className:L()("overflow-count ml1",{"is-active":e}),"data-test-class":"overflow-count"},"+",t)},lZ=function({style:e,children:t,column:o,numGraphColumns:r,onMouseEnter:i,onMouseLeave:n,ref:s,...l}){return P.createElement("div",{...l,className:L()("gk-graph","ref-zone","ref-popover",`column-${o%r+1}`),ref:s},P.createElement("ul",{onMouseEnter:i,onMouseLeave:n,style:{...e,listStyle:"none",padding:0,zIndex:6}},t))},lj=function({enabledRefMetadataTypes:e,column:t,columnForColoring:o,context:r,enableShowHideRefsOptions:i,targetRef:n,hasActive:s,hasRefs:l,getExternalIcon:a,includeOnlyRefsById:h,includeOnlyRemotesByName:c,isGhostRef:d,isHovered:u,isInUnsupportedRebase:p,numGraphColumns:f,onMissingRefMetadata:m,refGroupContexts:g,refGroupsByName:v,refIconsPosition:y,refMetadata:S,fallbackRefMetadata:w,refNodeHovered:C,sha:R,showRemoteNamesOnRefs:b,showContextMenuForGroupedRef:_,onClickRef:T,onDoubleClickRef:x,onToggleRefNodesShown:E,onRefBeginDrag:M,onRefCanDrag:I,onRefCanDrop:O,onRefDragEnter:z,onRefDragLeave:D,onRefDrop:k,onRefEndDrag:G,translate:N,type:A,useColumnHeaderIcons:W}){let H=`ref-overlay-container-${(0,P.useId)()}`,F=(0,P.useCallback)((e,t,o)=>{E(e,t.map(e=>({id:tD(e),name:e.name,type:e.refType,owner:e.owner,avatarUrl:e.avatarUrl})),!1,o)},[E]),B=(0,P.useMemo)(()=>v&&v.length>eK?v.slice(0,eK):v,[v]),U=B.length>0?B[0]:null,Z=(0,P.useMemo)(()=>u?B:U?[U]:[],[U,u,B]),j=(0,P.useMemo)(()=>{let e=eV+(U?.length||0)*ej+(s?ej:0);return u?{height:100,position:"relative"}:{minWidth:e}},[U,s,u]),V=(0,P.useMemo)(()=>J(h,e=>e.type===ec.TAG),[h]),$=(0,P.useMemo)(()=>({enabledRefMetadataTypes:e,enableShowHideRefsOptions:i,getExternalIcon:a,groupIsHovered:u,hasActive:s,hasRefs:l,isGhostRef:d,isInUnsupportedRebase:p,onClick:T,onContextMenu:_,onDoubleClick:x,onHideRefClick:F,onHovered:C,onMissingRefMetadata:m,onRefBeginDrag:M,onRefCanDrag:I,onRefCanDrop:O,onRefDragEnter:z,onRefDragLeave:D,onRefDrop:k,onRefEndDrag:G,refIconsPosition:y,refMetadata:S,fallbackRefMetadata:w,sha:R,showRemoteNamesOnRefs:b,translate:N,type:A,useColumnHeaderIcons:W}),[i,e,w,a,s,l,d,u,p,T,x,F,m,M,I,O,z,D,k,G,y,S,C,R,_,b,N,A,W]),K=(0,P.useMemo)(()=>Z.map(e=>{let t=e[0],o=g?.[t.name]||void 0,r=e.some(e=>{let t=tD(e);switch(e.refType){case ec.TAG:return V&&!!h[t];case ec.REMOTE:return!!h[t]||e.owner&&c[e.owner];default:return!!h[t]}});return{...$,isActive:t.isCurrentHead,isRefGroupIncluded:r,key:`ref-node-${t.fullName||t.name}`,refGroup:e,refGroupContext:o}}),[$,V,h,c,g,Z]);return P.default.createElement("span",{"data-vscode-context":tM(r),style:j},P.default.createElement("div",{className:L()("ref-nodes-inline",{hidden:u})},K.map(e=>P.default.createElement(ln,{...e,key:e.key}))),P.default.createElement(sJ,{key:H,placement:"right-start",show:u,target:()=>n.current},P.default.createElement(lZ,{column:o??t,numGraphColumns:f},K.map(e=>P.default.createElement("li",{key:e.key},P.default.createElement(ln,{...e,key:void 0}))))))};let lV={};class l$ extends P.default.PureComponent{popoverTargetRef=(0,P.createRef)();static defaultProps={style:{}};componentDidUpdate(e){!this.props.hasRefs&&this.props.isSingleSelected&&!e.isSingleSelected&&this.props.hoveredRefZoneSha===this.props.sha&&(this.props.refZoneUnhovered(),this.props.hoveredRefGroup&&this.props.refNodeUnhovered(void 0,this.props.hoveredRefGroup,this.props.sha))}onCustomToggleRefNodesShown=(e,t,o,r)=>{this.props.onToggleRefNodesShown(e,t,o,r),this.props.refZoneUnhovered()};render(){var e;let t,o,{enabledRefMetadataTypes:r,column:i,columnForColoring:n,context:s,enableShowHideRefsOptions:l,showGhostRefsOnRowHover:a,hasActive:h,hasRefs:c,hasTimeline:d,hoveredRefGroup:u,hoveredRefZoneSha:p,getExternalIcon:f,includeOnlyRefsById:m,includeOnlyRemotesByName:g,isInUnsupportedRebase:v,numGraphColumns:y,onClickRef:S,onDoubleClickRef:w,onMissingRefMetadata:C,onRefBeginDrag:R,onRefCanDrag:b,onRefCanDrop:_,onRefDragEnter:T,onRefDragLeave:x,onRefDrop:E,onRefEndDrag:M,refGroupContexts:I,refGroupsByName:O,refIconsPosition:z,refMetadata:D,fallbackRefMetadata:k,refNodeHovered:G,refNodeUnhovered:N,refZoneHovered:A,refZoneUnhovered:W,sha:H,shouldShowRefLine:F,showColorStrip:B,showContextMenuForGroupedRef:U,showRemoteNamesOnRefs:Z,style:j,translate:V,type:$,useColumnHeaderIcons:K,width:Y,clearCurrentlyHoveredGraphCommit:q,currentlyHoveredCommitSha:X}=this.props,J=p===H,Q={minWidth:Y,width:Y},ee={...j,...Q},et=d?P.default.createElement(iI,null):null,eo=O.length,er=e=>{A(H),eo?G(e,O[0],H):u&&N(e,u,H)},ei=e=>{W(),u&&N(e,u,H),q(e,to,H,X)},en=tx((e,t)=>{ei(e),R(e,t)}),es=eo>0&&!c&&a,el=(e=n??i,(o=lV[t=`${$}${e}${J}${h}${y}${es}`])||(o=L()(`column-${e%y+1}`,"flex","pb3","pt3","ref-zone","relative",$,{"dim-ref":es,"has-active":h,z6:J,z1:!J}),lV[t]=o),o),ea=P.default.createElement("div",{className:"color-strip height-100",style:{width:2}});if(!eo)return P.default.createElement("div",{className:el,onMouseEnter:er,onMouseLeave:ei,onWheel:ei,style:ee},B?ea:null,et);let eh=eo-1,ec=eh>0&&!J?P.default.createElement(lU,{hasActive:h,overflowCount:eh}):null;return P.default.createElement("div",{className:el,onMouseEnter:er,onMouseLeave:ei,onWheel:ei,style:ee},P.default.createElement("div",{ref:this.popoverTargetRef}),B?ea:null,et,P.default.createElement("div",{className:"flex",style:{minWidth:0,overflow:"hidden",width:Y-eB}},P.default.createElement(lj,{column:i,columnForColoring:n,context:s,enabledRefMetadataTypes:r,enableShowHideRefsOptions:l,fallbackRefMetadata:k,getExternalIcon:f,hasActive:h,hasRefs:c,includeOnlyRefsById:m,includeOnlyRemotesByName:g,isGhostRef:es,isHovered:J,isInUnsupportedRebase:v,numGraphColumns:y,onClickRef:S,onDoubleClickRef:w,onMissingRefMetadata:C,onRefBeginDrag:en,onRefCanDrag:b,onRefCanDrop:_,onRefDragEnter:(e,t,o)=>{J||o?.sha!==H||er(e),T(e,t,o)},onRefDragLeave:x,onRefDrop:E,onRefEndDrag:M,onToggleRefNodesShown:this.onCustomToggleRefNodesShown,refGroupContexts:I,refGroupsByName:O,refIconsPosition:z,refMetadata:D,refNodeHovered:G,sha:H,showContextMenuForGroupedRef:U,showRemoteNamesOnRefs:Z,targetRef:this.popoverTargetRef,translate:V,type:$,useColumnHeaderIcons:K}),ec),c&&F?P.default.createElement("div",{className:"absolute left-0 flex z1",style:Q},P.default.createElement(lM,{hasRefs:!0,isActiveSha:h,left:eF,type:$,width:"100%"})):null)}}class lK extends P.Component{static getDerivedStateFromProps(e,t){let o={},r=!1;return e.themeOpacityFactor!==t.themeOpacityFactor&&(o.themeOpacityFactor=e.themeOpacityFactor||e1.dark,r=!0),e.dimMergeCommits!==t.dimMergeCommits&&(o.dimMergeCommits=e.dimMergeCommits||!1,r=!0),e.highlightRowsOnRefHover!==t.highlightRowsOnRefHover&&(o.highlightRowsOnRefHover=e.highlightRowsOnRefHover||!1,r=!0),e.showGhostRefsOnRowHover!==t.showGhostRefsOnRowHover&&(o.showGhostRefsOnRowHover=e.showGhostRefsOnRowHover||!1,r=!0),e.showRemoteNamesOnRefs!==t.showRemoteNamesOnRefs&&(o.showRemoteNamesOnRefs=e.showRemoteNamesOnRefs||!1,r=!0),e.enabledRefMetadataTypes!==t.enabledRefMetadataTypes&&(o.enabledRefMetadataTypes=e.enabledRefMetadataTypes||[],r=!0),e.enabledScrollMarkerTypes!==t.enabledScrollMarkerTypes&&(o.enabledScrollMarkerTypes=e.enabledScrollMarkerTypes||[],r=!0),e.graphCommitDescDisplayMode!==t.graphCommitDescDisplayMode&&(o.graphCommitDescDisplayMode=e.graphCommitDescDisplayMode||tS.ALWAYS,r=!0),e.useAuthorInitialsForAvatars!==t.useAuthorInitialsForAvatars&&(o.useAuthorInitialsForAvatars=e.useAuthorInitialsForAvatars||!1,r=!0),e.shaLength!==t.shaLength&&(o.shaLength=e.shaLength,r=!0),e.hasMoreCommits!==t.hasMoreCommits&&(o.hasMoreCommits=e.hasMoreCommits||!1,r=!0),e.isLoadingRows!==t.isLoadingRows&&(o.isLoadingRows=e.isLoadingRows||!1,r=!0),e.rowsStatsLoading!==t.rowsStatsLoading&&(o.rowsStatsLoading=e.rowsStatsLoading||!1,r=!0),e.avatarUrlByEmail!==t.avatarUrlByEmail&&(o.avatarUrlByEmail=e.avatarUrlByEmail||{},r=!0),e.refMetadataById!==t.refMetadataById&&(o.refMetadataById=e.refMetadataById,r=!0),e.contexts!==t.contexts&&(o.contexts=e.contexts,r=!0),e.pendingCommitMessageSummary!==t.pendingCommitMessageSummary&&(o.pendingCommitMessageSummary=e.pendingCommitMessageSummary||"",r=!0),e.enableShowHideRefsOptions!==t.enableShowHideRefsOptions&&(o.enableShowHideRefsOptions=e.enableShowHideRefsOptions||!1,r=!0),e.createRefFormData!==t.createRefFormData&&(o.createRefFormData=e.createRefFormData,r=!0),e.highlightedShas!==t.highlightedShas&&(o.highlightedShas=e.highlightedShas,r=!0),e.workDirStats!==t.workDirStats&&(o.workDirStats=e.workDirStats||ty,r=!0),e.rowsStats!==t.rowsStats&&(o.rowsStats=e.rowsStats,r=!0),r?o:null}graphComponentRef=P.createRef();graphContainerRef=P.createRef();resizeObserver;lastNavSha=null;currentSha=null;isRefContextMenuShown=!1;isMounted=!1;selectedShas=new Set;selectionAnchorSha;selectionFocusSha;processedGraphRowBySha={};shaByRefId={};childrenBySha={};scrollToSha;headSha;headUpstreamSha;lastLazyLoadHeight=0;lastTopVisibleRowIndex=-1;lastBottomVisibleRowIndex=-1;maxColumns=0;orderedGraphRows=[];rowStatsConstraints={min:0,max:0};shouldFireShowMoreCommits=!0;columnsToFreeWhenFound={};hasMergeNodeChildBySha={};_autoLoadTimer;reserverInfoBySha={};columnsUsed={};rowsStats;workDirStats=ty;_markerColorsCache=null;excludeByType={};excludeRefsById={};includeOnlyRefsById={};excludeRemotesByName={};includeOnlyRemotesByName={};highlightedShas={};searchMode="normal";scrollLeft=0;scrollTop=0;graphHeight=585;graphWidth=804;graphZoneModeConstants=tV();graphZonesByType={};graphZoneOrdering=[to,tr,ti,tn,ta,ts,tl];clientHeight=0;missingAvatarsTimer;pendingMissingAvatars={};requestedMissingAvatars={};missingRefsMetadataTimer;pendingMissingRefsMetadata={};requestedMissingRefsMetadata={};previousRefMetadataById=null;branchUpstreamRowIndices=[];downstreamsByUpstream={};timelinesInterval;constructor(e){for(let[t,o]of(super(e),this.resizeObserver=new ResizeObserver(e=>e.forEach(e=>this.onGraphResized(e.contentRect.width,e.contentRect.height))),Object.entries(e.isSelectedBySha||{})))o&&(this.selectedShas.add(t),this.selectionAnchorSha=t,this.selectionFocusSha=t);this.excludeByType=this.props.excludeByType||{},this.excludeRefsById=this.props.excludeRefsById||{},this.excludeRemotesByName=this.getExcludeRemotesByName(),this.includeOnlyRemotesByName=this.getIncludeOnlyRemotesByName(),this.includeOnlyRefsById=this.props.includeOnlyRefsById||{},this.downstreamsByUpstream=this.props.downstreamsByUpstream||{},this.highlightedShas=this.props.highlightedShas||{},this.searchMode=this.props.searchMode||"normal",this.rowsStats=this.props.rowsStats||this.rowsStats,this.workDirStats=this.props.workDirStats||this.workDirStats,this.processRows(this.props.graphRows),this.cleanupSelections(),this.updateMarkerRowIndices(["selection","highlights"]);let t=eh(this.props.cssVariables);this.graphZoneModeConstants=tV(this.props.columnsSettings?.[tr]?.mode),this.maybeSortGraphZoneOrderingFromSettings(this.props.columnsSettings),this.state={avatarUrlByEmail:this.props.avatarUrlByEmail||{},contexts:this.props.contexts,createRefFormData:this.props.createRefFormData,cssVariablesWithDefaults:t,columnColorByColumn:this.getColumnColorByColumn(t),currentlyHoveredCommitSha:void 0,dimMergeCommits:this.props.dimMergeCommits||!1,dimRowsOfSelectedCommit:!1,enableShowHideRefsOptions:this.props.enableShowHideRefsOptions||!1,highlightRowsOnRefHover:this.props.highlightRowsOnRefHover||!1,showGhostRefsOnRowHover:this.props.showGhostRefsOnRowHover||!1,showRemoteNamesOnRefs:this.props.showRemoteNamesOnRefs||!1,enabledRefMetadataTypes:this.props.enabledRefMetadataTypes||[],enabledScrollMarkerTypes:this.props.enabledScrollMarkerTypes||[],graphCommitDescDisplayMode:this.props.graphCommitDescDisplayMode||tS.ALWAYS,graphZones:this.initializeGraphZones(this.props.columnsSettings,this.graphZoneOrdering,580),hasMoreCommits:this.props.hasMoreCommits||!1,height:this.graphHeight,highlightedShas:this.props.highlightedShas,hoveredRefGroup:void 0,hoveredRefZoneSha:void 0,isLoadingRows:this.props.isLoadingRows||!1,numGraphColumns:this.getNumGraphColumns(t),markerRowIndices:{},pendingCommitMessageSummary:this.props.pendingCommitMessageSummary||"",processedRows:[...this.orderedGraphRows],refIconsPosition:this.getRefIconsPositionOrDefault(this.props.refIconsPosition),refMetadataById:this.props.refMetadataById,rowsStats:this.rowsStats,rowsStatsLoading:this.props.rowsStatsLoading||!1,useAuthorInitialsForAvatars:this.props.useAuthorInitialsForAvatars||!1,scrollLeft:this.getScrollLeft(),scrollToAlignment:this.getScrollToAlignment(),scrollToIndex:this.getScrollToIndex(),scrollTop:this.getScrollTop(),shaLength:this.props.shaLength,themeOpacityFactor:this.props.themeOpacityFactor||e1.dark,width:this.graphWidth,workDirStats:this.workDirStats}}componentDidMount(){this.isMounted=!0,this.resizeObserver.observe(this.graphComponentRef.current),window.addEventListener("keydown",this.onWindowKeyDown),window.addEventListener("keyup",this.onWindowKeyUp),window.addEventListener("blur",this.onWindowBlur),window.addEventListener("mousedown",this.onWindowMouseDown),this.selectedShas.size&&this.selectCommitsCore([...this.selectedShas],{ensureVisible:!0})}componentDidUpdate(e,t){let o=!1,r=!1,i={},n=!1;e.searchMode!==this.props.searchMode&&(this.searchMode=this.props.searchMode||"normal",r=!0,i.highlights=!0),e.highlightedShas!==this.props.highlightedShas&&(this.highlightedShas=this.props.highlightedShas||{},"filter"===this.searchMode&&(r=!0),i.highlights=!0),e.excludeByType!==this.props.excludeByType&&(this.excludeByType=this.props.excludeByType||{},this.props.graphRows?.length&&(r=!0)),e.excludeRefsById!==this.props.excludeRefsById&&(this.excludeRefsById=this.props.excludeRefsById||{},this.excludeRemotesByName=this.getExcludeRemotesByName(),this.props.graphRows?.length&&(r=!0)),e.includeOnlyRefsById!==this.props.includeOnlyRefsById&&(this.includeOnlyRefsById=this.props.includeOnlyRefsById||{},this.includeOnlyRemotesByName=this.getIncludeOnlyRemotesByName(),this.props.graphRows?.length&&(r=!0)),e.downstreamsByUpstream!==this.props.downstreamsByUpstream&&(this.downstreamsByUpstream=this.props.downstreamsByUpstream||{},this.props.graphRows?.length&&(r=!0)),e.searchMode!==this.props.searchMode&&(n=!0);let s=!this.areSelectedByShaEqual(e.isSelectedBySha,this.props.isSelectedBySha),l=null!=this.props.isSelectedBySha&&X(this.props.isSelectedBySha),a=this.orderedGraphRows.length>0;if(this.processedGraphRowBySha&&a&&(s||0===this.selectedShas.size&&l)){let e=this.props.isSelectedBySha?Object.keys(this.props.isSelectedBySha):[];this.selectCommitsCore(e,{ensureVisible:!0}),s&&e.length>0?this.selectionAnchorSha=e[e.length-1]:s&&0===e.length&&(this.selectionAnchorSha=void 0)}if(e.isContainerWindowFocused!==this.props.isContainerWindowFocused&&this.dimRowsOfSelectedCommit(!1),e.graphRows!==this.props.graphRows||e.cssVariables!==this.props.cssVariables||r){this.cleanEdgeCaches(),this._markerColorsCache=null;let t=eh(this.props.cssVariables);n=!0,this.setState({columnColorByColumn:this.getColumnColorByColumn(t),cssVariablesWithDefaults:t,numGraphColumns:this.getNumGraphColumns(t)}),o=!0,(this.props.graphRows?.length<e.graphRows?.length||r)&&(this.lastLazyLoadHeight=0)}if(e.workDirStats!==this.props.workDirStats&&(this.workDirStats=this.props.workDirStats||ty,(!tY(e.workDirStats)&&tY(this.props.workDirStats)||tY(e.workDirStats)&&!tY(this.props.workDirStats))&&(n=!0)),e.avatarUrlByEmail!==this.props.avatarUrlByEmail&&(this.requestedMissingAvatars={}),e.refIconsPosition!==this.props.refIconsPosition){let e=this.getRefIconsPositionOrDefault(this.props.refIconsPosition);this.state.refIconsPosition!==e&&this.setState({refIconsPosition:e})}if(e.refMetadataById!==this.props.refMetadataById&&(e.refMetadataById&&X(e.refMetadataById)&&(this.previousRefMetadataById=e.refMetadataById),this.requestedMissingRefsMetadata={},i.pullRequests=!0),e.rowsStats!==this.props.rowsStats&&(this.rowsStats=this.props.rowsStats,this.updateRowStatsConstraints()),e.columnsSettings!==this.props.columnsSettings){if(this.props.columnsSettings?.[tr]?.mode!==e.columnsSettings?.[tr]?.mode){this.cleanEdgeCaches(),this.graphZoneModeConstants=tV(this.props.columnsSettings?.[tr]?.mode),this.updateCommitZoneContentWidthFromChange();let e=this.graphZonesByType[tr];e.currentWidth=e.contentWidth,e.preferredWidth=e.contentWidth,e.minimumWidth=this.graphZoneModeConstants.COMMIT_ZONE_VIEWPORT_WIDTH_MIN,e.showIconWidth=this.graphZoneModeConstants.COMMIT_ZONE_SHOW_ICON_WIDTH,this.loadEdgesBySha(),o=!0}this.props.columnsSettings&&(this.updateZonesFromSettings(this.props.columnsSettings),o=!0)}if(e.createRefFormData!==this.props.createRefFormData&&this.props.createRefFormData?.sha&&(this.selectCommitsCore([this.props.createRefFormData?.sha],{ensureVisible:!0}),this.selectionAnchorSha=this.props.createRefFormData.sha),(e.hasMoreCommits!==this.props.hasMoreCommits||e.onShowMoreCommits!==this.props.onShowMoreCommits)&&this.loadMoreCommitsIfNecessary(this.graphHeight,this.state.hasMoreCommits),n){let e=Array.from(this.selectedShas),t=this.selectionFocusSha;this.processRows(this.props.graphRows);let o=eh(this.props.cssVariables);if(e.length>0){this.cleanupSelections();let o=[];for(let t of e){let e=this.processedGraphRowBySha[t];e?.hidden===!1&&(o.push(e),this.selectedShas.add(t))}if(o.length){if(t){let e=this.processedGraphRowBySha[t];e?.hidden===!1?this.selectionFocusSha=t:(this.selectionFocusSha=o[o.length-1].sha,this._selectionVersion++)}if(this.selectionAnchorSha&&this.selectionAnchorSha!==this.selectionFocusSha){let e=this.processedGraphRowBySha[this.selectionAnchorSha];(null==e||e.hidden)&&(this.selectionAnchorSha=this.selectionFocusSha)}let e=this.selectionFocusSha?this.processedGraphRowBySha[this.selectionFocusSha]:void 0,r={isContiguous:this.areRowsContiguous(o),isTopological:!1};this.props.onSelectGraphRows?.(o,e,r),this.updateMarkerRowIndices(["selection"])}else this.selectedShas.clear(),this.selectionFocusSha=void 0,this.selectionAnchorSha=void 0,this._selectionVersion++,this.props.onSelectGraphRows?.([],void 0,{isContiguous:!0,isTopological:!1}),this.updateMarkerRowIndices(["selection"])}else if(l){let e=this.props.isSelectedBySha?Object.keys(this.props.isSelectedBySha):[];this.selectCommitsCore(e,{ensureVisible:!0}),e.length>0&&(this.selectionAnchorSha=e[e.length-1])}this.setState({processedRows:[...this.orderedGraphRows],columnColorByColumn:this.getColumnColorByColumn(o)})}if(o){this.updateCommitZoneContentWidthFromChange();let e=this.getOrderedActiveGraphZones();this.expandLastZoneMinWidthForScrollbar(e),this.ensureZoneWidthsMatchGraphWidth(e,this.graphWidth),this.setState({graphZones:e})}let h=Object.keys(i);h.length&&this.updateMarkerRowIndices(h);let c=this.props.graphRows?.length!==e.graphRows?.length,d=this.state.hasMoreCommits!==t.hasMoreCommits,u=this.state.height!==t.height;(c||d||u||o)&&this.autoLoadToFillViewport(),c&&this.loadMoreCommitsIfNecessary(this.graphHeight,this.state.hasMoreCommits)}componentWillUnmount(){this.isMounted=!1,this.clearTimelinesInterval(),null!=this._pendingScrollUpdate&&(cancelAnimationFrame(this._pendingScrollUpdate),this._pendingScrollUpdate=void 0),null!=this._pendingRowsUpdate&&(cancelAnimationFrame(this._pendingRowsUpdate),this._pendingRowsUpdate=void 0),this._autoLoadTimer&&(clearTimeout(this._autoLoadTimer),this._autoLoadTimer=void 0),this._headerHoverRestoreTimer&&(clearTimeout(this._headerHoverRestoreTimer),this._headerHoverRestoreTimer=void 0),this.missingAvatarsTimer&&(clearTimeout(this.missingAvatarsTimer),this.missingAvatarsTimer=void 0),this.missingRefsMetadataTimer&&(clearTimeout(this.missingRefsMetadataTimer),this.missingRefsMetadataTimer=void 0),window.removeEventListener("keydown",this.onWindowKeyDown),window.removeEventListener("keyup",this.onWindowKeyUp),window.removeEventListener("blur",this.onWindowBlur),window.removeEventListener("mousedown",this.onWindowMouseDown),this.resizeObserver.disconnect()}focus(){this.graphContainerRef?.current?.focus({preventScroll:!0})}getRefIconsPositionOrDefault(e){return e||ed.LEFT}onGraphVisibleRowsUpdatedThrottled=((e,t,o)=>{let r,i,n,s=!1,l=t;return(...a)=>{void 0!==o&&(i=new Date().getTime(),l=!r||i-r>l+o?o:t),n&&(clearTimeout(n),n=null),s?n=setTimeout(()=>{e(...a)},l):(e(...a),r=new Date().getTime(),s=!0,setTimeout(()=>{s=!1},l))}})(()=>this.onGraphVisibleRowsUpdated(),250,20);onBlurWipNodeInput=e=>{this.props.onBlurWipNodeInput?.(e)};onDoubleClickRef=(e,t,o,r)=>{this.props.onDoubleClickGraphRef?.(e,t,this.processedGraphRowBySha[o],r)};onFocusWipNodeInput=e=>{this.props.onFocusWipNodeInput?.(e)};onFilterColumnClick=(e,t)=>{this.props.onFilterColumnClick?.(e,t)};onCurrentlyHoveredGraphCommit=(e,t,o,r)=>{r!==o&&(this.props.onGraphRowHovered?.(e,t,this.processedGraphRowBySha[o]),this.setState({currentlyHoveredCommitSha:o}))};onClearCurrentlyHoveredGraphCommit=(e,t,o,r)=>{if(!r)return;let i=e.relatedTarget;if(i instanceof HTMLElement){let e=i.closest(".resizable-handle.horizontal");if(null!=e&&!e.closest(`#${to}-header`))return}if((i=e.currentTarget)instanceof HTMLElement){let t=i.getBoundingClientRect();if(e.clientY>=t.top&&e.clientY<=t.bottom)return}this.props.onGraphRowUnhovered?.(e,t,this.processedGraphRowBySha[o]),this.setState({currentlyHoveredCommitSha:void 0})};onGraphColumnReOrdered=(e,t)=>{let o=this.graphZoneOrdering.indexOf(e),r=t?this.graphZoneOrdering.indexOf(t):this.graphZoneOrdering.length-1;t&&o<r&&(r-=1),this.graphZoneOrdering.splice(o,1),this.graphZoneOrdering.splice(r,0,e);let i={};this.graphZoneOrdering.forEach((e,t)=>{this.graphZonesByType[e].order=t,i[e]=this.getGraphColumnSettingFromZoneType(this.graphZonesByType[e])}),this.setState({graphZones:this.initializeGraphZones(i,this.graphZoneOrdering,this.graphWidth)}),this.props.onGraphColumnsReOrdered&&this.props.onGraphColumnsReOrdered(i)};onGraphZoneResize=tx((e,t)=>{if(t?.width){let o=this.getOrderedActiveGraphZones();this.adjustResizedGraphZone(o,e,t,!1),this.setState({graphZones:o})}});onGraphZoneResizeEnd=tx((e,t)=>{if(t?.width){let o=this.getOrderedActiveGraphZones();this.adjustResizedGraphZone(o,e,t,!0),this.setState({graphZones:o})}this.props.onColumnResized&&this.props.onColumnResized(e.type,this.getGraphColumnSettingFromZoneType(this.graphZonesByType[e.type]))});onPopupGraphHeaderContextMenu=(e,t)=>{this.props.onPopupGraphHeaderContextMenu&&this.props.onPopupGraphHeaderContextMenu(e,t)};onSettingsClick=(e,t)=>{this.props.onSettingsClick&&(e.stopPropagation(),this.props.onSettingsClick(e,t))};onMessageChange=e=>{this.setState({pendingCommitMessageSummary:e}),this.props.onMessageChange&&this.props.onMessageChange(e)};onRefBeginDrag=(e,t)=>{this.props.onRefBeginDrag&&this.props.onRefBeginDrag(e,t)};onRefCanDrag=e=>!!this.props.onRefCanDrag&&this.props.onRefCanDrag(e);onRefCanDrop=(e,t,o)=>!!this.props.onRefCanDrop&&this.props.onRefCanDrop(e,t,o);onRefCreate=(e,t,o,r)=>{this.props.onRefCreate&&this.props.onRefCreate(e,t,o,r)};onRefCreateCancel=(e,t,o,r)=>{this.props.onRefCreateCancel&&this.props.onRefCreateCancel(e,t,o,r)};onRefCreateContextMenu=(e,t,o,r,i)=>{this.props.onRefCreateContextMenu&&this.props.onRefCreateContextMenu(e,t,o,r,i)};onRefDragEnter=(e,t,o)=>{this.props.onRefDragEnter&&this.props.onRefDragEnter(e,t,o)};onRefDragLeave=(e,t,o)=>{this.props.onRefDragLeave&&this.props.onRefDragLeave(e,t,o)};onRefDrop=(e,t,o)=>{this.props.onRefDrop&&this.props.onRefDrop(e,t,o)};onRefEndDrag=(e,t,o)=>{this.props.onRefEndDrag&&this.props.onRefEndDrag(e,t,o)};performRangeSelection(e,t,o){if(this.selectionAnchorSha??=this.selectionFocusSha,!this.selectionAnchorSha)return this.selectionAnchorSha=e,this.selectCommitsCore([e],{ensureVisible:!0,isKeyboardNav:o}),!0;let r=this.isFilteredSearch()?"simple":t,i=this.getShiftSelectRange(e,r);if(i?.length){let t="topological"===r;return this.selectCommitsCore(i,{ensureVisible:!0,focusSha:e,isTopological:t,isContiguous:!!t||void 0,isKeyboardNav:o}),!0}return!1}onZoneRowClick(e,t,o){if(0!==e.button)return;let{enableMultiSelection:r,shiftSelectMode:i}=this.props,n=this.isMacOSPlatform(),s=r&&(!n&&e.ctrlKey||n&&e.metaKey),l=r&&e.shiftKey;s?this.handleToggleSelection(o,i):l&&this.performRangeSelection(o,i,!1)||(this.selectionFocusSha=o,this.selectionAnchorSha=o,this.selectCommitsCore([o],{isKeyboardNav:!1}))}handleToggleSelection(e,t){if("topological"===t&&!this.isFilteredSearch()&&this.selectedShas.size>0&&!this.selectedShas.has(e)&&!this.canExtendTopologicalSelection(e)){this.selectionFocusSha=e,this.selectionAnchorSha=e,this.selectCommitsCore([e],{isKeyboardNav:!1});return}this.selectionAnchorSha=e;let o="topological"===t&&!this.isFilteredSearch();this.selectCommitsCore([e],{toggle:!0,isTopological:o,isKeyboardNav:!1})}getShiftSelectRange(e,t){let o;if(!this.selectionAnchorSha)return[e];let r=this.processedGraphRowBySha[this.selectionAnchorSha],i=this.processedGraphRowBySha[e];if(!r||!i)return[e];if("simple"===t){let e=r.rowIndex,t=i.rowIndex;o=[];let n=Math.min(e,t),s=Math.max(e,t);for(let e=n;e<=s;e++)this.orderedGraphRows[e]&&o.push(this.orderedGraphRows[e].sha)}else o=this.getTopologicalPathBetween(this.selectionAnchorSha,e);return o&&o.length>1&&o.sort((e,t)=>(this.processedGraphRowBySha[e]?.rowIndex??0)-(this.processedGraphRowBySha[t]?.rowIndex??0)),o}canExtendTopologicalSelection(e){let t,o;if(0===this.selectedShas.size)return!0;let r=1/0,i=-1;for(let e of this.selectedShas){let n=this.processedGraphRowBySha[e];n&&(n.rowIndex<r&&(r=n.rowIndex,t=e),n.rowIndex>i&&(i=n.rowIndex,o=e))}if(!t||!o)return!0;let n=this.processedGraphRowBySha[e];if(!n)return!1;let s=n.rowIndex;if(s<r){let o=this.getDirectTopologicalPathBetween(e,t);return null!=o&&o.length>1}if(s>i){let t=this.getDirectTopologicalPathBetween(o,e);return null!=t&&t.length>1}let l=this.getDirectTopologicalPathBetween(t,e),a=this.getDirectTopologicalPathBetween(e,o);return null!=l&&l.length>1&&null!=a&&a.length>1}getTopologicalPathBetween(e,t){if(e===t)return[e];let o=this.getDirectTopologicalPathBetween(e,t);if(o&&o.length>1)return o;let r=this.findNearestTopologicallyReachableCommit(e,t);if(r)return this.getDirectTopologicalPathBetween(e,r)}getDirectTopologicalPathBetween(e,t){if(e===t)return[e];let o=new Set,r=new Map,i=[e],n=0;for(o.add(e);n<i.length;){let s=i[n++];if(s===t){let o=[],i=t;for(;void 0!==i;)o.push(i),i=r.get(i);if(o.reverse(),this.hasOnlyTwoEndpoints(o,e,t))return o;break}let l=this.processedGraphRowBySha[s];if(l){for(let e of l.parents||[])o.has(e)||(o.add(e),r.set(e,s),i.push(e));for(let e of this.childrenBySha[s]||[])o.has(e)||(o.add(e),r.set(e,s),i.push(e))}}}findNearestTopologicallyReachableCommit(e,t){let o=this.processedGraphRowBySha[e]?.rowIndex,r=this.processedGraphRowBySha[t]?.rowIndex;if(void 0===o||void 0===r)return;let i=o>r,n=Math.min(o,r),s=Math.max(o,r),l=new Set,a=[e],h=0,c=new Set([e]);for(;h<a.length;){let e=a[h++];l.add(e);let t=this.processedGraphRowBySha[e];if(t){for(let o of i?this.childrenBySha[e]||[]:t.parents||[])if(!c.has(o)){let e=this.processedGraphRowBySha[o];e&&e.rowIndex>=n&&e.rowIndex<=s&&(c.add(o),a.push(o))}}}if(i)for(let e=r+1;e<o;e++){let t=this.orderedGraphRows[e]?.sha;if(t&&l.has(t))return t}else for(let e=r-1;e>o;e--){let t=this.orderedGraphRows[e]?.sha;if(t&&l.has(t))return t}}hasOnlyTwoEndpoints(e,t,o){if(e.length<=2)return!0;let r=new Set(e),i=0;for(let n of e){let e=n===t||n===o,s=this.processedGraphRowBySha[n];if(!s)continue;let l=s.parents||[],a=this.childrenBySha[n]||[],h=l.filter(e=>r.has(e)).length,c=a.filter(e=>r.has(e)).length;if((0===h||0===c)&&(i++,!e))return!1}return 2===i}areRowsContiguous(e){if(e.length<=1)return!0;let t=new Set(e.map(e=>e.sha)),o=new Set,r=[e[0].sha],i=0;for(o.add(e[0].sha);i<r.length;){let e=r[i++],n=this.processedGraphRowBySha[e];if(!n)continue;for(let e of n.parents??[])t.has(e)&&!o.has(e)&&(o.add(e),r.push(e));let s=this.childrenBySha[e];if(s)for(let e of s)t.has(e)&&!o.has(e)&&(o.add(e),r.push(e))}return o.size===e.length}onClickRef=(e,t,o,r)=>{this.onZoneRowClick(e,to,o),this.props.onClickGraphRef&&this.props.onClickGraphRef(e,t,this.processedGraphRowBySha[o],r),this.currentSha=o,this.loadSelectedGraphRow(this.currentSha),this.lastNavSha=null};onClickCommit=(e,t,o)=>{if(this.onZoneRowClick(e,t,o),this.props.onClickGraphRow){let r=this.processedGraphRowBySha[o];this.props.onClickGraphRow(e,t,r)}this.currentSha=o,this.loadSelectedGraphRow(this.currentSha),this.lastNavSha=null};onDoubleClickCommit=(e,t,o)=>{if(this.props.onDoubleClickGraphRow){let r=this.processedGraphRowBySha[o];this.props.onDoubleClickGraphRow(e,t,r)}};onWindowBlur=e=>{let{hoveredRefGroup:t,hoveredRefZoneSha:o}=this.state;t&&o&&this.onRefNodeUnhovered(e,t,o),this.onRefZoneUnhovered(),this.dimRowsOfSelectedCommit(!1)};onWindowKeyUp=()=>{this.dimRowsOfSelectedCommit(!1)};onWindowKeyDown=e=>{let t=this.isMacOSPlatform();this.dimRowsOfSelectedCommit(!t&&e.key===of.controlKey||t&&e.key===of.metaKey)};onWindowMouseDown=()=>{this.dimRowsOfSelectedCommit(!1)};isKeyboardNavigating=!1;onKeyUp=e=>{this.isKeyboardNavigating=!1,this.lastNavSha&&this.isNavigationKey(e.key)&&this.currentSha!==this.lastNavSha&&(this.loadSelectedGraphRow(this.currentSha),this.lastNavSha=null)};onKeyDown=e=>{this.isKeyboardNavigating=!0,null===this.lastNavSha&&this.isNavigationKey(e.key)&&(this.lastNavSha=this.currentSha);let t=this.isMacOSPlatform()?e.metaKey:e.ctrlKey,{shiftSelectMode:o}=this.props,r=this.isFilteredSearch()?"simple":o;switch(e.key){case of.arrowUpKey:e.altKey?this.selectPreviousBranchingPoint():this.selectPrevious(e.shiftKey,t,r);break;case of.arrowDownKey:e.altKey?this.selectNextBranchingPoint():this.selectNext(e.shiftKey,t,r);break;case of.arrowRightKey:this.selectPrevious(e.shiftKey,!1,r);break;case of.arrowLeftKey:this.selectNext(e.shiftKey,!1,r);break;case of.homeKey:this.selectFirst(e.shiftKey,r);break;case of.endKey:this.selectLast(e.shiftKey,r);break;case of.pageUpKey:e.altKey?this.selectPreviousRef():this.selectPageUp(e.shiftKey,r);break;case of.pageDownKey:e.altKey?this.selectNextRef():this.selectPageDown(e.shiftKey,r);break;case"H":case"h":this.selectHead(e.shiftKey)}};isNavigationKey(e){return[of.arrowUpKey,of.arrowDownKey,of.arrowLeftKey,of.arrowRightKey,of.homeKey,of.endKey,of.pageUpKey,of.pageDownKey].some(t=>t===e)}loadSelectedGraphRow(e){let t=this.processedGraphRowBySha[e];t&&this.props.onLoadSelectedGraphRow&&this.props.onLoadSelectedGraphRow(t)}onRefNodeHovered=(e,t,o)=>{(!this.props.showGhostRefsOnRowHover||tq(this.selectedShas,o)||this.processedGraphRowBySha[o]?.hasRefs)&&(this.props.onGraphRefNodeHovered&&this.props.onGraphRefNodeHovered(e,t,this.processedGraphRowBySha[o]),this.setState({hoveredRefGroup:[...t]}))};onRefNodeUnhovered=(e,t,o)=>{this.isRefContextMenuShown||(this.props.onGraphRefNodeUnhovered&&this.props.onGraphRefNodeUnhovered(e,t,this.processedGraphRowBySha[o]),this.setState({hoveredRefGroup:void 0}))};onRefShorthandChange=e=>{let{createRefFormData:t}=this.state;this.setState({createRefFormData:{...t,shorthand:e}})};onRefZoneHovered=e=>{this.setState({hoveredRefZoneSha:e})};onRefZoneUnhovered=()=>{this.isRefContextMenuShown||this.setState({hoveredRefZoneSha:void 0})};onShowMoreCommits=()=>{this.props.onShowMoreCommits&&this.shouldFireShowMoreCommits&&(this.props.onShowMoreCommits(),this.shouldFireShowMoreCommits=!1,setTimeout(()=>{this.shouldFireShowMoreCommits=!0},250))};onScrollForZone=(e,t,o,r,i)=>{this.setScroll(e,t),this.props.onScrollForZone&&this.props.onScrollForZone(e,t),this.loadMoreCommitsIfNecessary(r,i)};hasUnfoundHighlightedCommits(){if(this.props.hasMoreSearchResults)return!0;for(let e in this.highlightedShas)if(e!==th&&null==this.processedGraphRowBySha[e])return!0;return!1}loadMoreCommitsIfNecessary(e,t){if(!this.props.onShowMoreCommits||!t||!e||e<0||!this.scrollTop||this.scrollTop<0||!this.orderedGraphRows?.length)return;let o=this.scrollTop+e,r=this.orderedGraphRows.length*em,i=this.isFilteredSearch(),n=i?.8*r:r-ev;this.lastLazyLoadHeight>0&&o>=this.lastLazyLoadHeight&&this.lastLazyLoadHeight<n&&(this.lastLazyLoadHeight=0),o>n&&o>this.lastLazyLoadHeight&&(this.lastLazyLoadHeight=Math.min(o,r-1),(!i||this.hasUnfoundHighlightedCommits())&&this.onShowMoreCommits())}shouldAutoLoadToFillViewport(){return!!this.isFilteredSearch()&&!!this.props.onShowMoreCommits&&!!this.state.hasMoreCommits&&!this.state.isLoadingRows&&!!this.orderedGraphRows?.length&&!!this.graphHeight&&!(this.graphHeight<=0)&&!!this.hasUnfoundHighlightedCommits()&&this.orderedGraphRows.length*em<=1.2*(this.graphHeight-ef)}autoLoadToFillViewport(){if(this.shouldAutoLoadToFillViewport()){if(!this.shouldFireShowMoreCommits){this._autoLoadTimer&&clearTimeout(this._autoLoadTimer),this._autoLoadTimer=setTimeout(()=>{this._autoLoadTimer=void 0,this.autoLoadToFillViewport()},300);return}this._autoLoadTimer&&clearTimeout(this._autoLoadTimer),this._autoLoadTimer=setTimeout(()=>{this.shouldAutoLoadToFillViewport()&&this.shouldFireShowMoreCommits&&this.onShowMoreCommits(),this._autoLoadTimer=void 0},100)}}onScrollToRowCausedUpdateForFirstColumn=(e,t)=>{let o={...t};if(e===tr&&t.scrollTop){let t=this.getHorizontalScrollHeight(e,this.state.cssVariablesWithDefaults);o.scrollTop-=t+ey}this.setScroll(e,o),this.props.onScrollToRowCausedUpdateForFirstColumn?.(e,o)};onCommitContextMenu=(e,t,o)=>{if(this.props.onRowContextMenu){let r=this.processedGraphRowBySha[o];this.props.onRowContextMenu(e,t,r)}};onRefContextMenu=(e,t,o)=>{if(this.props.onRefContextMenu){this.isRefContextMenuShown=!0,this.onRefZoneHovered(o);let r=this.processedGraphRowBySha[o];this.props.onRefContextMenu(e,t,r),setTimeout(()=>{this.isRefContextMenuShown=!1},250)}};areSelectedByShaEqual(e,t){if(null==e&&null==t)return!0;if(null==e||null==t)return!1;let o=Object.keys(e),r=Object.keys(t);if(o.length!==r.length)return!1;for(let r of o)if(!(r in t)||e[r]!==t[r])return!1;return!0}_pendingRowsUpdate;_selectionVersion=0;_cachedSmartCellRangeRenderer=null;_cachedScrollLeftForRenderer=-1;_cachedForceCache;getOrCreateSmartCellRangeRenderer(e,t){if(null==this._cachedSmartCellRangeRenderer||this._cachedScrollLeftForRenderer!==e||this._cachedForceCache!==t){let o=e=>{let t=this.state.processedRows[e];if(!t)return"SHOW_MORE_COMMITS";let o=t.sha;return this.selectedShas.has(o)?`${o}_${this._selectionVersion}`:o};this._cachedSmartCellRangeRenderer=({cellCache:r,cellRenderer:i,columnSizeAndPositionManager:n,columnStartIndex:s,columnStopIndex:l,deferredMeasurementCache:a,horizontalOffsetAdjustment:h,isScrolling:c,parent:d,rowSizeAndPositionManager:u,rowStartIndex:p,rowStopIndex:f,styleCache:m,verticalOffsetAdjustment:g,visibleColumnIndices:v,visibleRowIndices:y})=>{let S=[],w=r.__prevScrollLeft!==e;w&&(r.__prevScrollLeft=e);let C=n.areOffsetsAdjusted()||u.areOffsetsAdjusted(),R=!c&&!C;for(let e=p;e<=f;e+=1){let p=u.getSizeAndPositionOfCell(e);for(let u=s;u<=l;u+=1){let s,l,f=n.getSizeAndPositionOfCell(u),C=u>=v.start&&u<=v.stop&&e>=y.start&&e<=y.stop,b=`${e}-${u}`;R&&m[b]?s=m[b]:a&&!a.has(e,u)?s={height:"auto",left:0,position:"absolute",top:0,width:"auto"}:(s={height:p.size,left:f.offset+h,position:"absolute",top:p.offset+g,width:f.size},m[b]=s);let _={columnIndex:u,isScrolling:c,isVisible:C,key:b,parent:d,rowIndex:e,style:s};if(!c&&!t||h||g||w)l=i(_);else{let t=o(e,u);r[b]?.realKeyForCell!==t&&(r[b]={realKeyForCell:t,cell:i(_)}),l=r[b].cell}null!=l&&S.push(l)}}return S},this._cachedScrollLeftForRenderer=e,this._cachedForceCache=t}return this._cachedSmartCellRangeRenderer}getCommits(e){let t=[];for(let o of e){let e=this.processedGraphRowBySha[o];null!=e&&t.push(e)}return t}selectCommits(e,t){return this.selectCommitsCore(e,{toggle:t?.toggle,ensureVisible:t?.ensureVisible})}selectCommitsCore(e,t){let{toggle:o=!1,ensureVisible:r=!1,isKeyboardNav:i=this.isKeyboardNavigating,isTopological:n,isContiguous:s,focusSha:l}=t??{},a=[];if(o){for(let t of e)this.selectedShas.has(t)?this.selectedShas.delete(t):null!=this.processedGraphRowBySha[t]&&this.selectedShas.add(t);for(let e of this.selectedShas){let t=this.processedGraphRowBySha[e];null!=t&&a.push(t)}}else if(1===e.length){let[t]=e,o=this.processedGraphRowBySha[t];null!=o?(this.selectedShas.clear(),this.selectedShas.add(t),a.push(o)):this.selectedShas.clear()}else for(let t of(this.selectedShas.clear(),e)){let e=this.processedGraphRowBySha[t];null!=e&&(this.selectedShas.add(t),a.push(e))}a.length>1&&a.sort((e,t)=>(e.rowIndex??0)-(t.rowIndex??0)),this._selectionVersion++,l&&this.selectedShas.has(l)?this.selectionFocusSha=l:this.selectionFocusSha=e.length&&this.selectedShas.has(e[e.length-1])?e[e.length-1]:function(e){let t;for(t of e);return t}(this.selectedShas),this.selectionFocusSha&&(r||i)&&this.selectSha(this.selectionFocusSha,i);let h=this.selectionFocusSha?this.processedGraphRowBySha[this.selectionFocusSha]:void 0;return this.props.onSelectGraphRows?.(a,h,{isContiguous:s??(a.length<=1||this.areRowsContiguous(a)),isTopological:n??a.length<=1}),null!=this._pendingRowsUpdate&&cancelAnimationFrame(this._pendingRowsUpdate),this._pendingRowsUpdate=requestAnimationFrame(()=>{this._pendingRowsUpdate=void 0;let e={...this.state.markerRowIndices};for(let t of(e.selection=[],this.selectedShas)){let o=this.processedGraphRowBySha[t]?.rowIndex;null!=o&&e.selection.push(o)}if(i){let t=this.getScrollToIndex(),o=this.getScrollToAlignment(),r=this.predictScrollTop(t,o);null!=r&&(this.scrollTop=r),this.setState({markerRowIndices:e,scrollToAlignment:o,scrollToIndex:t,...null!=r&&{scrollTop:r}},this.clearScrollToIndex)}else this.setState({markerRowIndices:e})}),a}predictScrollTop(e,t){let o;if(e<0)return;let r=e*em,i=this.getClientHeight(),n=this.scrollTop;if("start"===t)o=r;else if("end"===t)o=r-i+em;else if("center"===t)o=r-i/2+em/2;else{let e=r+em;r<n?o=r:e>n+i&&(o=e-i)}return null!=o&&(o=Math.max(0,Math.min(o,Math.max(0,(this.orderedGraphRows?.length??0)*em-i)))),o}getCommitZoneContentWidthBetweenGutters(){return this.getCurrentWidthByZone(tr)-this.getLeftGutterWidth()-this.getRightGutterWidth()}getExcludeRemotesByName(){let e={};return Object.values(this.excludeRefsById).forEach(t=>{t.type===ec.REMOTE&&t.owner&&"*"===t.name&&(e[t.owner]=!0)}),e}getIncludeOnlyRemotesByName(){let e={};return Object.values(this.includeOnlyRefsById).forEach(t=>{t.type===ec.REMOTE&&t.owner&&"*"===t.name&&(e[t.owner]=!0)}),e}clearScrollToIndex=tx(()=>{this.isMounted&&this.setState({scrollToIndex:void 0})});getVisibleRows=()=>{let{top:e,bottom:t}=this.getTopAndBottomVisibleRowIndex();return e>=0&&t>=0?this.state.processedRows.slice(e,t+1):[]};getTopAndBottomVisibleRowIndex(){let{graphHeight:e,orderedGraphRows:t,scrollTop:o}=this,r=e||0;if(!r||!t?.length)return{top:-1,bottom:-1};let i=(r-ef)/em,n=o/em;return{top:Math.max(Math.floor(n),0),bottom:Math.min(Math.ceil(n+(i-1)),t.length-1)}}getOffsetSha(e,t,o,r){this._scrollToAlignmentOverride=void 0;let i=this.props.scrollRowPadding||0;if(!i||"none"===t||!this.graphHeight||!this.orderedGraphRows.length)return e;let n=this.processedGraphRowBySha[e]?.rowIndex??-1;if(-1===n)return e;let{top:s,bottom:l}=this.getTopAndBottomVisibleRowIndex();if(-1===s||-1===l||n>=s&&n<=l&&!r)return e;let a=Math.floor(Math.floor((this.graphHeight-ef)/em)/2);if(a<1)return e;let h=Math.min(i,a);return void 0===o||t!==o?e:"up"===t&&n<=s+h?(this._scrollToAlignmentOverride="start",this.orderedGraphRows[Math.max(n-h,0)].sha||e):"down"===t&&n>=l-h?(this._scrollToAlignmentOverride="end",this.orderedGraphRows[Math.min(n+h,this.orderedGraphRows.length-1)].sha||e):e}_pendingScrollUpdate;_lastSelectedRowIndex;_lastScrollDirection="none";_scrollToAlignmentOverride;selectSha(e,t=!1){let o=this.processedGraphRowBySha[e]?.column||0,r=this.getScrollLeft(),i=this.getCommitZoneContentWidthBetweenGutters(),n=this.getCurrentWidthByZone(tr),s=this.getCommitZoneContentWidth(),l=o*this.graphZoneModeConstants.COMMIT_COLUMN_WIDTH,a=r-this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH/3<=l,h=Math.max(0,s-n),c=a&&l<=r+i?r:q(l-i/2,0,h),d=this.processedGraphRowBySha[e]?.rowIndex,u=void 0!==d&&void 0!==this._lastSelectedRowIndex?d>this._lastSelectedRowIndex?"down":d<this._lastSelectedRowIndex?"up":"none":"none",p=t?this.getOffsetSha(e,u,this._lastScrollDirection,t):e;this.setScrollToSha(p,c),t?(this._lastScrollDirection=u,void 0!==d&&(this._lastSelectedRowIndex=d)):(this._lastScrollDirection="none",this._lastSelectedRowIndex=void 0,this._scrollToAlignmentOverride=void 0),t&&this.props.hasMoreCommits&&void 0!==d&&this.orderedGraphRows.length-d<=ev/em&&this.loadMoreCommitsIfNecessary(this.graphHeight,this.props.hasMoreCommits),t||(null!=this._pendingScrollUpdate&&cancelAnimationFrame(this._pendingScrollUpdate),this._pendingScrollUpdate=requestAnimationFrame(()=>{this._pendingScrollUpdate=void 0,this.setState({scrollToAlignment:this.getScrollToAlignment(),scrollToIndex:this.getScrollToIndex()},this.clearScrollToIndex)}))}updateWidthByZone(e,t,o){let r=this.getOrderedActiveGraphZones(),i=this.graphZonesByType[t],n=tF(i,r,e);if(i.currentWidth=n,t===tr){let e=Math.max(0,this.getCommitZoneContentWidth()-i.currentWidth);this.getScrollLeft()>e&&this.setScrollLeft(e)}o&&(i.preferredWidth=n)}updateCommitZoneContentWidthFromChange(){let e=this.graphZonesByType[tr];if(!e.isHidden){let t=this.getOrderedActiveGraphZones(),o=this.getCommitZoneContentWidth();e.contentWidth=o,e.maximumWidth=o,e.currentWidth>o&&(e.currentWidth=tF(e,t,o)),this.setState({graphZones:t})}}getCurrentWidthByZone(e,t=!0){let o=t?this.getVerticalScrollWidth(tr,this.props.cssVariables,!0):0,r=this.graphZonesByType[e];return r&&!r.isHidden?r.currentWidth-o:0}getCommitZoneContentWidth(){return(this.maxColumns||1)*this.graphZoneModeConstants.COMMIT_COLUMN_WIDTH+2*this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH+2*this.graphZoneModeConstants.COMMIT_ZONE_PADDING_RIGHT}getCommitZoneWidth(e=!0){let t=e?this.getVerticalScrollWidth(tr,this.props.cssVariables,!0):0;if(this.graphZonesByType[tr])return this.graphZonesByType[tr].currentWidth-t;let{columnsSettings:o}=this.props;return o?.[tr]?o[tr].width-t:tg[tr].minimumWidth-t}getSingleColumnModeFactor(){let e=this.maxColumns,t=this.getCurrentWidthByZone(tr);return 1===e?0:q(1-(t-2*this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH-this.graphZoneModeConstants.COMMIT_ZONE_PADDING_RIGHT)/this.graphZoneModeConstants.COMMIT_COLUMN_WIDTH,0,1)}setClientHeight(e){this.clientHeight=e}getClientHeight(){return this.clientHeight}setScroll(e,t){this.setClientHeight(t.clientHeight),null!=t.scrollTop&&this.setScrollTop(t.scrollTop),e===tr&&null!=t.scrollLeft&&this.setScrollLeft(t.scrollLeft)}getNonAdjustedScrollLeft(){return this.scrollLeft}setScrollLeft(e){this.scrollLeft!==e&&(this.scrollLeft=e,this.setState({scrollLeft:e}))}getScrollLeft(){let e=this.getNonAdjustedScrollLeft();return this.getCommitZoneContentWidth()!==this.getCommitZoneWidth()?e:0}setScrollTop(e){this.scrollTop!==e&&(this.scrollTop=e,this.setState({scrollTop:e}),this.onGraphVisibleRowsUpdatedThrottled())}getScrollTop(){return this.scrollTop}getScrollToSha(){return this.scrollToSha}setScrollToSha(e,t){this.scrollToSha=e,this.setScrollLeft(t),this.onGraphVisibleRowsUpdated()}getScrollToIndex(){let e=this.getScrollToSha();if(e){let t=this.processedGraphRowBySha[e]?.rowIndex;return void 0===t?this.orderedGraphRows.findIndex(t=>t.sha===e):t}return -1}getScrollToAlignment(){if(void 0!==this._scrollToAlignmentOverride)return this._scrollToAlignmentOverride;let e=this.getClientHeight(),t=this.getScrollTop(),o=this.getScrollToIndex();if("none"!==this._lastScrollDirection&&o>=0){let r=o*em,i=r+em;if(!(r>=t&&i<=t+e))return"down"===this._lastScrollDirection?"end":"start"}if(o<0)return e7;let r=em+2,i=o*em;return i>=t-r&&i<t+e+r?e7:e9}getMinNodeOffset(){let e=this.getScrollLeft(),t=this.getSingleColumnModeFactor();return(1-t)*(e+2*this.graphZoneModeConstants.COMMIT_ZONE_PADDING_LEFT)+t*(e+this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH)}getHorizontalScrollHeight(e,t,o){return this.graphZonesByType[e]?tL(e,this.getOrderedActiveGraphZones(),this.orderedGraphRows,t,o):0}getVerticalScrollWidth(e,t,o){return this.graphZonesByType[e]?tP(e,this.getOrderedActiveGraphZones(),this.props.hasMoreCommits,this.props.isLoadingRows,this.graphHeight,this.orderedGraphRows,this.props.enabledScrollMarkerTypes?.length>0,t,o):0}getMaxNodeOffset(){let e=this.getCurrentWidthByZone(tr),t=this.getScrollLeft(),o=this.getSingleColumnModeFactor();return(1-o)*(e+t+(this.graphZoneModeConstants.COMMIT_ZONE_PADDING_RIGHT-this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH))+o*(t+this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH)}getAbsoluteNodeLeftByColumn(){let e={};for(let t=0;t<=this.maxColumns;t+=1)e[t]=this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH+this.graphZoneModeConstants.COMMIT_COLUMN_WIDTH*t;return e}getNodeOffsetByColumn(){let e=this.getMinNodeOffset(),t=this.getMaxNodeOffset(),o=this.getAbsoluteNodeLeftByColumn(),r={};return Object.keys(o).forEach(i=>{let n=o[i];r[i]=q(n,e,t)}),r}getMaxNodeLeft(){return this.getScrollLeft()+(this.getCurrentWidthByZone(tr)-this.graphZoneModeConstants.COMMIT_COLUMN_WIDTH-this.graphZoneModeConstants.COMMIT_ZONE_PADDING_RIGHT)}getMinNodeLeft(){let e=this.getScrollLeft(),t=this.getSingleColumnModeFactor();return e+this.graphZoneModeConstants.COMMIT_ZONE_PADDING_LEFT+t*this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH}getRightGutterSlideOutFactor(){let e=this.getCurrentWidthByZone(tr),t=this.getCommitZoneContentWidth(),o=this.getSingleColumnModeFactor();return q((e-(t-(this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH+this.graphZoneModeConstants.COMMIT_ZONE_PADDING_RIGHT)))/this.graphZoneModeConstants.COMMIT_COLUMN_WIDTH,0,1)+o/2}getNodeOpacityByColumn(){let e=this.getMinNodeLeft(),t=this.getMaxNodeLeft(),o=this.getAbsoluteNodeLeftByColumn(),r=this.getRightGutterSlideOutFactor(),i=this.getSingleColumnModeFactor(),n={};return Object.keys(o).forEach(s=>{let l=o[s],a=Math.min(l-(e-i*this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH),t+this.graphZoneModeConstants.COMMIT_COLUMN_WIDTH-(l+this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH*(1-r)));n[s]=eS+(1-eS)*Math.max(a/(this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH/2),i)}),n}getLeftGutterWidth(){let e=this.getSingleColumnModeFactor();return this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH+e*(this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH/2)}getRightGutterWidth(){return(1-this.getRightGutterSlideOutFactor())*this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH}getBoxShadowAlphaForGutter(e,t){return .4*(1-Math.max(e,t))}getLeftGutterBoxShadowAlpha(e){let t=this.getScrollLeft(),o=this.getSingleColumnModeFactor();return e*this.getBoxShadowAlphaForGutter(o,q(1-t/this.graphZoneModeConstants.COMMIT_COLUMN_WIDTH,0,1))}getRightGutterBoxShadowAlpha(e){let t=this.getSingleColumnModeFactor(),o=this.getRightGutterSlideOutFactor();return e*this.getBoxShadowAlphaForGutter(t,o)}updateMarkerRowIndices(e,t){this.isMounted&&this.setState(({markerRowIndices:o})=>{if(e.forEach(e=>o[e]=[]),e.includes("selection"))for(let e of this.selectedShas){let t=this.processedGraphRowBySha[e]?.rowIndex;void 0!==t&&o.selection.push(t)}let r=t?.searchMode??this.props.searchMode;if(e.includes("highlights")&&"filter"!==r)for(let e of Object.keys(t?.highlightedShas||this.state?.highlightedShas||this.props.highlightedShas||{})){let t=this.processedGraphRowBySha[e]?.rowIndex;void 0!==t&&o.highlights.push(t)}if(e.includes("pullRequests")){let e=t?.refMetadataById||this.state?.refMetadataById||this.props.refMetadataById||{};for(let t of Object.keys(e))if(e[t]?.[tw]?.length){let e=this.shaByRefId[t];if(null==e)continue;let r=this.processedGraphRowBySha[e]?.rowIndex;void 0!==r&&o.pullRequests.push(r)}}})}getMarkerColors(){if(this._markerColorsCache)return this._markerColorsCache;let e=getComputedStyle(this.graphComponentRef?.current||document.querySelector(".gk-graph")||document.documentElement),t={};for(let o of Object.values(tp)){let r=e.getPropertyValue(o.colorCssKey).trim();r&&(t[o.type]=r)}return this._markerColorsCache=t,t}initializeGraphZones(e,t,o){this.graphZonesByType={};let r=[],i=0;t.forEach((t,o)=>{let n=e?e[t]:void 0,s=tg[t],l=n?.width?n.width:s.minimumWidth,a={...s,type:t,currentWidth:l,preferredWidth:l,isHidden:n?.isHidden||!1,mode:n?.mode,order:s.isCustomizable&&n?.order!==void 0?n?.order:o};n?.isHidden||(i+=a.currentWidth),t===tr&&(a.contentWidth=this.getCommitZoneContentWidth(),a.minimumWidth=this.graphZoneModeConstants.COMMIT_ZONE_VIEWPORT_WIDTH_MIN,a.showIconWidth=this.graphZoneModeConstants.COMMIT_ZONE_SHOW_ICON_WIDTH,this.maxColumns>0&&(a.maximumWidth=a.contentWidth)),this.graphZonesByType[t]=a,a?.isHidden||r.push(a)});let n=r[r.length-1];if(n){let e=tG(this.props.cssVariables,!0),t=n.minimumWidth+e;(null==n.maximumWidth||n.maximumWidth>=t)&&(n.minimumWidth=t,null!=n.showIconWidth&&(n.showIconWidth+=e),r[r.length-1]=n)}for(r.forEach(e=>{let t=tF(e,r,e.currentWidth);t!==e.currentWidth&&(i-=e.currentWidth,e.currentWidth=t,i+=t)});i>o;){let e=tk(r);if(!e)break;let t=e.currentWidth,n=i-o,s=Math.max(e.minimumWidth,t-n),l=t-s;this.graphZonesByType[e.type].currentWidth=s,i-=l}if(i<o){let e=t[t.length-1],i=o-tN(r,e);this.graphZonesByType[e].currentWidth=i}return r}maybeSortGraphZoneOrderingFromSettings(e){this.graphZoneOrdering.every(t=>e?.[t]?.order!==void 0)&&this.graphZoneOrdering.sort((t,o)=>e[t].order<e[o].order?-1:+(e[t].order>e[o].order))}updateZonesFromSettings(e){let t=!1;this.graphZoneOrdering.forEach((o,r)=>{let i=this.graphZonesByType[o],n=e?.[i.type];n&&(n.isHidden!==i.isHidden&&(t=!0,i.type!==ta||n.isHidden||this.updateRowStatsConstraints()),i.isHidden=n.isHidden,i.order=i.isCustomizable&&n?.order!==void 0?n?.order:r,i.mode=n.mode,i.preferredWidth=n.width??i.preferredWidth,i.currentWidth=i.preferredWidth)}),t&&this.graphZoneOrdering.forEach(e=>{let t=this.graphZonesByType[e];t.currentWidth=t.minimumWidth})}getEdgeColumnMaxes(e){let t=0;return Object.keys(this.processedGraphRowBySha[e]?.edges||{}).forEach(e=>{t=Math.max(t,parseInt(e,10))}),t}getEndingAndPassThroughEdgesByColumnFromPrevRow(e,t){let o,r,i,n,s={};return Object.keys(t).forEach(l=>{r=(o=t[l]).passThrough,i=o.starting,(n=r&&!t7(r.type)?r:i&&!t7(i.type)?i:r||i||void 0)&&(n.parentSha===e.sha?s[l]={ending:n}:s[l]={passThrough:n})}),s}getFinalEdgeStateForGraphAndRow(e,t){let o=this.getEndingAndPassThroughEdgesByColumnFromPrevRow(e,t),r=this.getStartingEdgesByColumn(e);return Object.keys(r).forEach(e=>{o[e]||(o[e]={ending:void 0,passThrough:void 0,starting:void 0}),o[e].starting=r[e]}),o}loadEdgesBySha(){this.maxColumns=0,this.isFilteredSearch()||this.orderedGraphRows.forEach((e,t)=>{let o=this.orderedGraphRows[t-1],r=o&&this.processedGraphRowBySha[o.sha]?.edges?this.processedGraphRowBySha[o.sha].edges:{};this.processedGraphRowBySha[e.sha].edges=this.getFinalEdgeStateForGraphAndRow(e,r);let i=this.getEdgeColumnMaxes(e.sha);this.processedGraphRowBySha[e.sha].edgeColumnMaxes=i,i>this.maxColumns&&(this.maxColumns=i)})}processRows(e){this.loadRowsbySha(e||[]),this.loadEdgesBySha()}getStartingEdgesByColumn(e){let t={},o=e.parents;if(o.length>0){let r=e.type,i=this.processedGraphRowBySha[e.sha]?.column;void 0!==i&&(t[i]={parentSha:o[0],type:r});for(let e=1;e<o.length;e+=1){let i=o[e],n=this.processedGraphRowBySha[i]?.column;void 0!==n&&(t[n]={parentSha:i,type:r})}}return t}formatCommitDateTimeCallback=(t,o)=>this.props.formatCommitDateTime?this.props.formatCommitDateTime(t,o):function(t,o,r,i=!0){o=o??void 0;let n=`${(void 0)??""}:${o}`,s=oi.get(n);if(null==s){let t=function(e){if(null==e)return{localeMatcher:"best fit",dateStyle:"full",timeStyle:"short"};let t=or.exec(e);if(t?.groups!=null){let{dateStyle:e,timeStyle:o}=t.groups;return{localeMatcher:"best fit",dateStyle:e||"full",timeStyle:o||void 0}}let o={localeMatcher:"best fit"};for(let{groups:t}of e.matchAll(oo))if(null!=t)for(let e in t){let r=t[e];if(null!=r)switch(e){case"year":o.year=4===r.length?"numeric":"2-digit";break;case"month":switch(r.length){case 4:o.month="long";break;case 3:o.month="short";break;case 2:o.month="2-digit";break;case 1:o.month="numeric"}break;case"day":"DD"===r?o.day="2-digit":o.day="numeric";break;case"weekday":switch(r.length){case 4:o.weekday="long";break;case 3:o.weekday="short";break;case 2:o.weekday="narrow"}break;case"hour":o.hour=2===r.length?"2-digit":"numeric",o.hour12="hh"===r||"h"===r;break;case"minute":o.minute=2===r.length?"2-digit":"numeric";break;case"second":o.second=2===r.length?"2-digit":"numeric";break;case"fractionalSecond":o.fractionalSecondDigits=3;break;case"dayPeriod":o.dayPeriod="narrow",o.hour12=!0,o.hourCycle="h12";break;case"timeZoneName":o.timeZoneName=2===r.length?"long":"short"}}return o}(o);s=new Intl.DateTimeFormat(e,t),i&&oi.set(n,s)}if(null==o||or.test(o))return s.format(t);let l=s.formatToParts(t);return o.replace(oo,(o,r,n,s,a,h,c,d,u,p,f,m,g,v,y)=>{if(null!=r)return r.substring(1,r.length-1);for(let o in y){let r=y[o];if(null==r)continue;let n=l.find(e=>e.type===o);if("Do"===r&&n?.type==="day")return function(e){let t=e%100;return`${e}${on[(t-20)%10]??on[t]??on[0]}`}(Number(n.value));if("a"===r&&n?.type==="dayPeriod"){let o=(function(t){let o=`${(void 0)??""}:time:${t}`,r=oi.get(o);null==r&&(r=new Intl.DateTimeFormat(e,{localeMatcher:"best fit",timeStyle:t}),i&&oi.set(o,r));return r})("short").formatToParts(t).find(e=>"dayPeriod"===e.type);return` ${(o??n)?.value??""}`}return n?.value??""}return""})}(t,ek);formatCommitMessageCallback=e=>this.props.formatCommitMessage?.(e)??{summary:e};formatRefShorthandCallback=(e,t,o,r)=>this.props.formatRefShorthand?this.props.formatRefShorthand(e,t,o,r):e.replace(/\s/g,"");isRefShorthandValidCallback=(e,t,o,r)=>!this.props.isRefShorthandValid||this.props.isRefShorthandValid(e,t,o,r);translateCallback=(e,...t)=>this.props.translate?this.props.translate(e,...t):om[e]?function(e,t){if(0===t.length)return e;let o=e;return t.forEach((e,t)=>{let r=RegExp(`\\{${t}\\}`,"g");o=o.replace(r,e)}),o}(om[e],t):e;getIconCallback=e=>{let t=this.props.getExternalIcon?.(e);return t||P.createElement("span",null)};onMissingAvatar=(e,t)=>{this.props.onEmailsMissingAvatarUrls&&!this.requestedMissingAvatars[e]&&(this.pendingMissingAvatars[e]=t,this.missingAvatarsTimer&&(clearTimeout(this.missingAvatarsTimer),this.missingAvatarsTimer=void 0),this.missingAvatarsTimer=setTimeout(()=>{if(!this.isMounted)return;let e={...this.pendingMissingAvatars};this.pendingMissingAvatars={};let t=Object.keys(e);if(t.length){for(let e of t)this.requestedMissingAvatars[e]=!0;this.props.onEmailsMissingAvatarUrls?.(e)}},100))};onMissingRefMetadata=(e,t)=>{if(!this.props.onRefsMissingMetadata||this.requestedMissingRefsMetadata[e])return;let o=this.pendingMissingRefsMetadata[e]||[],r=t.filter(e=>!o.includes(e));this.pendingMissingRefsMetadata[e]=[...o,...r],this.missingRefsMetadataTimer&&(clearTimeout(this.missingRefsMetadataTimer),this.missingRefsMetadataTimer=void 0),this.missingRefsMetadataTimer=setTimeout(()=>{if(!this.isMounted)return;let e={...this.pendingMissingRefsMetadata};this.pendingMissingRefsMetadata={};let t=Object.keys(e);if(t.length){for(let e of t)this.requestedMissingRefsMetadata[e]=!0;this.props.onRefsMissingMetadata?.(e)}},100)};selectNext(e,t,o){this.selectInDirection("down",e,t,o)}selectPrevious(e,t,o){this.selectInDirection("up",e,t,o)}selectInDirection(e,t,o,r){let i=o&&!this.isFilteredSearch(),n=t?r??"simple":void 0,s=this.getNextShaInDirection(e,t,i,n);s&&(this.currentSha=s,t&&n?this.performRangeSelection(s,n,!0):t||(this.selectCommitsCore([s],{ensureVisible:!0,isTopological:i}),this.selectionAnchorSha=s))}getNextShaInDirection(e,t,o,r){if(t&&"topological"===r&&this.selectionFocusSha){let t=this.selectionAnchorSha??this.selectionFocusSha;return this.findNextReachableFromAnchor(e,this.selectionFocusSha,t,o)}if(o&&!t&&this.selectionFocusSha)return"down"===e?this.getNextTopologicalSha(this.selectionFocusSha):this.getPreviousTopologicalSha(this.selectionFocusSha);let i=this.selectionFocusSha?this.processedGraphRowBySha[this.selectionFocusSha]?.rowIndex??-1:-1,n="down"===e?Math.min(i+1,this.orderedGraphRows.length-1):Math.max(0,i-1);return this.orderedGraphRows[n]?.sha}getNextTopologicalSha(e){return this.getSameColumnParent(e)}getPreviousTopologicalSha(e){return this.getSameColumnChild(e)}findNextReachableFromAnchor(e,t,o,r){let i,n=this.processedGraphRowBySha[t];if(!n)return;let s=n.rowIndex,l="down"===e;if(r){let r="down"===e?this.getNextTopologicalSha(t):this.getPreviousTopologicalSha(t);if(r&&this.isReachableFrom(o,r))return r}let a=l?s+1:s-1;if(a>=0&&a<this.orderedGraphRows.length){let e=this.orderedGraphRows[a]?.sha;if(e&&this.isReachableFrom(o,e))return e}let h=this.processedGraphRowBySha[o];if(!h)return;let c=h.rowIndex,d=s===c?l:s>c,u=new Set,p=[o],f=0,m=l?1/0:-1/0;for(;f<p.length&&f<1e3;){let e=p[f++];if(u.has(e))continue;u.add(e);let t=this.processedGraphRowBySha[e];if(!t)continue;(l?t.rowIndex>s&&t.rowIndex<m:t.rowIndex<s&&t.rowIndex>m)&&(i=e,m=t.rowIndex);let o=d?t.parents:this.childrenBySha[e];if(o)for(let e of o)u.has(e)||p.push(e)}return i}isReachableFrom(e,t){if(e===t)return!0;let o=this.processedGraphRowBySha[e],r=this.processedGraphRowBySha[t];if(!o||!r)return!1;let i=r.rowIndex>o.rowIndex,n=new Set,s=[e],l=0;for(;l<s.length&&l<500;){let e=s[l++];if(e===t)return!0;if(n.has(e))continue;n.add(e);let o=i?this.processedGraphRowBySha[e]?.parents:this.childrenBySha[e];if(o)for(let e of o)n.has(e)||s.push(e)}return!1}getSameColumnChild(e){let t=this.childrenBySha[e];if(!t?.length)return;let o=this.processedGraphRowBySha[e],r=o?.column;if(void 0!==r)for(let e of t){let t=this.processedGraphRowBySha[e];if(t&&!t.hidden&&t.column===r)return e}for(let o of t){let t=this.processedGraphRowBySha[o];if(t&&!t.hidden&&t.parents?.[0]===e)return o}}selectPreviousBranchingPoint(){if(!this.selectionFocusSha||this.isFilteredSearch())return;let e=this.selectionFocusSha,t=this.orderedGraphRows.length;for(let o=0;o<t;o++){let t=this.getSameColumnChild(e);if(!t||(e=t,this.isBranchingPoint(e)))break}e!==this.selectionFocusSha&&(this.currentSha=e,this.selectCommitsCore([e],{ensureVisible:!0}),this.selectionAnchorSha=e)}isBranchingPoint(e){let t=this.childrenBySha[e];if(!t?.length)return!1;let o=this.processedGraphRowBySha[e]?.column;if(void 0===o)return!1;for(let e of t){let t=this.processedGraphRowBySha[e];if(t&&!t.hidden&&t.column!==o)return!0}return!1}getSameColumnParent(e){let t=this.processedGraphRowBySha[e];if(!t?.parents?.length)return;let o=t.column;if(void 0!==o){for(let e of t.parents){let t=this.processedGraphRowBySha[e];if(t&&!t.hidden&&t.column===o)return e}for(let e of t.parents){let t=this.processedGraphRowBySha[e];if(t&&!t.hidden)return e}}}selectNextBranchingPoint(){if(!this.selectionFocusSha||this.isFilteredSearch())return;let e=this.selectionFocusSha,t=this.orderedGraphRows.length;for(let o=0;o<t;o++){let t=this.getSameColumnParent(e);if(!t||(e=t,this.isBranchingPoint(e)))break}e!==this.selectionFocusSha&&(this.currentSha=e,this.selectCommitsCore([e],{ensureVisible:!0}),this.selectionAnchorSha=e)}selectNextRef(){let e=this.selectionFocusSha?this.processedGraphRowBySha[this.selectionFocusSha]?.rowIndex??-1:-1;for(let t=e+1;t<this.orderedGraphRows.length;t++){let e=this.orderedGraphRows[t];if(e?.hasRefs){this.currentSha=e.sha,this.selectCommitsCore([e.sha],{ensureVisible:!0}),this.selectionAnchorSha=e.sha;return}}}selectPreviousRef(){let e=this.selectionFocusSha?this.processedGraphRowBySha[this.selectionFocusSha]?.rowIndex??-1:this.orderedGraphRows.length;for(let t=e-1;t>=0;t--){let e=this.orderedGraphRows[t];if(e?.hasRefs){this.currentSha=e.sha,this.selectCommitsCore([e.sha],{ensureVisible:!0}),this.selectionAnchorSha=e.sha;return}}}selectHead(e){let t=null;e&&this.headUpstreamSha?t=this.headUpstreamSha:this.headSha&&(t=this.headSha),this.currentSha=t||null,t&&(this.selectCommitsCore([t],{ensureVisible:!0}),this.selectionAnchorSha=t)}selectFirst(e,t){if(!this.orderedGraphRows.length)return;let o=this.orderedGraphRows[0]?.sha;if(o)if(this.currentSha=o,e){this.selectionAnchorSha??=this.selectionFocusSha??o;let e=t??"simple",r=this.getShiftSelectRange(o,e);if(r?.length){let t="topological"===e;this.selectCommitsCore(r,{ensureVisible:!0,focusSha:o,isKeyboardNav:!0,isTopological:t,isContiguous:!!t||void 0})}}else this.selectCommitsCore([o],{ensureVisible:!0}),this.selectionAnchorSha=o}selectLast(e,t){if(!this.orderedGraphRows.length)return;let o=this.orderedGraphRows.length-1,r=this.orderedGraphRows[o]?.sha;if(r)if(this.currentSha=r,e){this.selectionAnchorSha??=this.selectionFocusSha??r;let e=t??"simple",o=this.getShiftSelectRange(r,e);if(o?.length){let t="topological"===e;this.selectCommitsCore(o,{ensureVisible:!0,focusSha:r,isKeyboardNav:!0,isTopological:t,isContiguous:!!t||void 0})}}else this.selectCommitsCore([r],{ensureVisible:!0}),this.selectionAnchorSha=r}selectPageUp(e,t){if(!this.orderedGraphRows.length)return;let o=Math.max(1,Math.floor(this.getClientHeight()/em)-1),r=Math.max(0,(this.selectionFocusSha?this.processedGraphRowBySha[this.selectionFocusSha]?.rowIndex??-1:-1)-o),i=this.orderedGraphRows[r]?.sha;if(i)if(this.currentSha=i,e){this.selectionAnchorSha??=this.selectionFocusSha??i;let e=t??"simple",o=this.getShiftSelectRange(i,e);if(o?.length){let t="topological"===e;this.selectCommitsCore(o,{ensureVisible:!0,focusSha:i,isKeyboardNav:!0,isTopological:t,isContiguous:!!t||void 0})}}else this.selectCommitsCore([i],{ensureVisible:!0}),this.selectionAnchorSha=i}selectPageDown(e,t){if(!this.orderedGraphRows.length)return;let o=Math.max(1,Math.floor(this.getClientHeight()/em)-1),r=this.selectionFocusSha?this.processedGraphRowBySha[this.selectionFocusSha]?.rowIndex??-1:-1,i=Math.min(this.orderedGraphRows.length-1,r+o),n=this.orderedGraphRows[i]?.sha;if(n)if(this.currentSha=n,e){this.selectionAnchorSha??=this.selectionFocusSha??n;let e=t??"simple",o=this.getShiftSelectRange(n,e);if(o?.length){let t="topological"===e;this.selectCommitsCore(o,{ensureVisible:!0,focusSha:n,isKeyboardNav:!0,isTopological:t,isContiguous:!!t||void 0})}}else this.selectCommitsCore([n],{ensureVisible:!0}),this.selectionAnchorSha=n}getAvailableColumnAndUseIt(){let e=0;for(;this.columnsUsed[e];)e+=1;return this.columnsUsed[e]=!0,e}getColumns(e){let t,o;this.hasMergeNodeChildBySha[e.sha]&&delete this.hasMergeNodeChildBySha[e.sha];let r=e.parents||[],i=this.columnsToFreeWhenFound[e.sha];if(void 0!==i)for(let e=0;e<i.length;e+=1)delete this.columnsUsed[i[e]];let n=0,s=this.reserverInfoBySha[e.sha];s?.column!==void 0?(n=s.column,delete this.reserverInfoBySha[e.sha]):n=this.getAvailableColumnAndUseIt();for(let i=0;i<r.length;i+=1)if(t=r[i],e.type===et&&(this.hasMergeNodeChildBySha[t]=!0),o=this.reserverInfoBySha[t],0===i&&o?.column!==void 0&&o?.column!==n){let r=this.columnsToFreeWhenFound[t]||[],i=o?.type===er&&e.type!==er&&s?.newestDate>o?.newestDate;(o?.column>n||i)&&!this.hasMergeNodeChildBySha[t]?(this.reserverInfoBySha[t]={type:e.type,newestDate:s?.newestDate,column:n},r.push(o.column)):r.push(n),this.columnsToFreeWhenFound[t]=r}else o?.column===void 0&&(this.reserverInfoBySha[t]={type:e.type,newestDate:s?.column===n?s?.newestDate:e.date,column:0===i?n:this.getAvailableColumnAndUseIt()});return n}getFilteredHeadsForGraphRow(e,t){return e.heads.filter(e=>e.isCurrentHead||(t?void 0!==this.includeOnlyRefsById[tz(ec.HEAD,e)]:!this.excludeByType.heads&&void 0===this.excludeRefsById[tz(ec.HEAD,e)]))}getFilteredRemotesForGraphRow(e,t){return e.remotes.filter(e=>t?void 0!==this.includeOnlyRefsById[tz(ec.REMOTE,e)]||!e.owner||void 0!==this.includeOnlyRemotesByName[e.owner]:(!this.excludeByType.remotes||e.owner&&this.downstreamsByUpstream[`${e.owner}/${e.name}`]?.length>0)&&void 0===this.excludeRefsById[tz(ec.REMOTE,e)]&&(!e.owner||void 0===this.excludeRemotesByName[e.owner]))}getFilteredTagsForGraphRow(e,t,o){let r=t&&J(this.includeOnlyRefsById,e=>e.type===ec.TAG),i=t&&(this.getFilteredHeadsForGraphRow(e,t).length>0||this.getFilteredRemotesForGraphRow(e,t).length>0);return e.tags.filter(e=>r?void 0!==this.includeOnlyRefsById[tz(ec.TAG,e)]:!this.excludeByType.tags&&void 0===this.excludeRefsById[tz(ec.TAG,e)]&&(!t||i||o))}loadRowsbySha(e){this.orderedGraphRows=[],this.processedGraphRowBySha={};let t=this.isFilteredSearch();this.childrenBySha={},this.shaByRefId={},this.reserverInfoBySha={},this.columnsToFreeWhenFound={},this.columnsUsed={};let o=new Map,r={},i=[],n=[];this.branchUpstreamRowIndices=[];let s=[],l=[],a=[],h=[],c={};if(tY(this.workDirStats)&&e.length>0&&!tK(e[0].type)){let t,o=(t=e.find(t$),t?.sha||void 0),r={sha:ei,parents:o?[o]:[],author:"",email:"",date:new Date().getTime(),message:this.translateCallback("Graph-WorkInProgress"),type:ei,heads:[],remotes:[],tags:[]};this.workDirStats.context&&(r.contexts={row:this.workDirStats.context}),e.unshift(r)}else!tY(this.workDirStats)&&e.length>0&&tK(e[0].type)&&e.shift();let d=X(this.includeOnlyRefsById);e.forEach((e,u)=>{let p,f=this.childrenBySha[e.sha]?.length>0,m=e.heads?.length>0?this.getFilteredHeadsForGraphRow(e,d):[],g=e.remotes?.length>0?this.getFilteredRemotesForGraphRow(e,d):[],v=e.tags?.length>0?this.getFilteredTagsForGraphRow(e,d,c[e.sha]||f):[],y=e.parents?.length>0?e.parents.filter(e=>!r[e]):[],S=m.length>0||g.length>0||v.length>0,w=m.length>0||g.length>0;if(e.type!==Q&&e.type!==et||c[e.sha]){if(e.type===er&&this.excludeByType.stashes&&(r[e.sha]=!0),!r[e.sha]&&y.length>0){let e;for(e of y)c[e]=!0}}else e.type!==Q&&e.type!==et||c[e.sha]||S||f||(r[e.sha]=!0);let C=r[e.sha],R=C?0:this.getColumns(e);t&&(p=R,R=0);let b=new tT(this,{...e,heads:m,remotes:g,tags:v,parents:y},R,void 0,void 0,void 0,void 0,p);if(!C){let r,c=o.get(e.sha);c?.length&&(c.sort((e,t)=>{if(e.parentIndexScore<t.parentIndexScore)return -1;if(e.parentIndexScore>t.parentIndexScore)return 1;if(e.parentIndexScore===t.parentIndexScore){if(e.rowEntered<t.rowEntered)return -1;if(e.rowEntered>t.rowEntered)return 1}return 0}),r=c[0],b.childRefs={heads:[...r?.heads||[]],remotes:[...r?.remotes||[]],tags:[...r?.tags||[]]},o.delete(e.sha));for(let t=0;t<y.length;t+=1){let i=y[t];this.childrenBySha[i]||(this.childrenBySha[i]=[]),this.childrenBySha[i].push(e.sha);let n=o.get(i);(w||r)&&void 0===n&&(n=[],o.set(i,n)),w?n?.unshift({sha:e.sha,parentIndexScore:t,rowEntered:u,heads:m,remotes:g,tags:v}):r&&n?.unshift({...r,parentIndexScore:t,rowEntered:u})}if(!t||this.highlightedShas[e.sha]){let t=this.orderedGraphRows.length;if(b.rowIndex=t,this.orderedGraphRows.push(b),m.length&&(s.push(t),m.some(e=>e.isCurrentHead)&&(this.headSha=b.sha,i.push(t))),g.length)for(let e of(l.push(t),g))e.current&&(n.push(t),this.headUpstreamSha=b.sha),this.downstreamsByUpstream[`${e.owner}/${e.name}`]?.length&&this.branchUpstreamRowIndices.push(t);v.length&&a.push(t),e.type===er&&h.push(t)}if(m.length)for(let e of m)this.shaByRefId[tz(ec.HEAD,e)]=b.sha;if(g.length)for(let e of g)this.shaByRefId[tz(ec.REMOTE,e)]=b.sha;if(v.length)for(let e of v)this.shaByRefId[tz(ec.TAG,e)]=b.sha}this.processedGraphRowBySha[e.sha]=b}),this.isMounted?this.setState(e=>({markerRowIndices:{...e.markerRowIndices,head:i,upstream:n,localBranches:s,remoteBranches:l,tags:a,stashes:h}})):this.state={...this.state,markerRowIndices:{...this.state?.markerRowIndices,head:i,upstream:n,localBranches:s,remoteBranches:l,tags:a,stashes:h}},this.clearTimelinesInterval(),this.updateTimelines(),this.timelinesInterval=setInterval(this.onTimelinesRefreshInterval,9e5),this.onGraphVisibleRowsUpdated()}updateRowStatsConstraints(){this.rowStatsConstraints=function(e){let{length:t}=e;if(0===t)return{min:0,max:0};if(1===t)return{min:0,max:e[0]};e.sort((e,t)=>e-t);let o=e[0],r=e[Math.floor(.25*t)],i=e[Math.floor(.5*t)],n=e[Math.floor(.75*t)],s=e[t-1],l=n-r;return{min:Math.max(o,i-1.5*l),max:Math.min(s,i+1.5*l)}}(null!=this.rowsStats?Object.values(this.rowsStats).map(e=>e.additions+e.deletions):[])}updateTimelines(){let e=function(){let e,t=new Date,o=t.getTime(),r=[];for(e=1;e<tv.hour;e+=1){let t=36e5*e,{label:i,value:n}=tO(t);r.push({date:o-t,label:i,timeUnit:"hour",value:n})}for(e=1;e<tv.day;e+=1){let t=864e5*e,{label:i,value:n}=tO(t);r.push({date:o-t,label:i,timeUnit:"day",value:n})}for(e=1;e<=tv.week;e+=1){let t=6048e5*e,{label:i,value:n}=tO(t);r.push({date:o-t,label:i,timeUnit:"week",value:n})}for(e=1;e<tv.month;e+=1){let i=new Date;i.setMonth(t.getMonth()-e),i.setHours(0,0,0,0);let{label:n,value:s}=tO(o-i.getTime());r.push({date:i.getTime(),label:n,timeUnit:"month",value:s})}for(e=1;e<=tv.year;e+=1){let o,i=new Date;switch(i.setFullYear(t.getFullYear()-e),i.setHours(0,0,0,0),e){case 1:o="Timeline-1YearAgo";break;case tv.year:o="Timeline-NPlusYearsAgo";break;default:o="Timeline-NYearsAgo"}r.push({date:i.getTime(),label:o,timeUnit:"year",value:e})}return r}();var t=this.orderedGraphRows;let o=0;for(let r of t){for(;o+1<e.length&&r.date<=e[o+1].date;)o++;let t=e[o];o<e.length&&r.date<=t.date&&(r.timeLineEntry=t,o++)}}clearTimelines(){for(let e of Object.values(this.processedGraphRowBySha))e.timeLineEntry=void 0}clearTimelinesInterval(){this.timelinesInterval&&(clearInterval(this.timelinesInterval),this.timelinesInterval=void 0)}onTimelinesRefreshInterval=()=>{this.isMounted&&(this.clearTimelines(),this.updateTimelines(),this.setState({processedRows:[...this.orderedGraphRows]}))};cleanupSelections(){for(let e of this.selectedShas)this.processedGraphRowBySha[e]||(this.selectedShas.delete(e),this.selectionFocusSha===e&&(this.selectionFocusSha=void 0));this.selectionAnchorSha&&!this.processedGraphRowBySha[this.selectionAnchorSha]&&(this.selectionAnchorSha=void 0)}getColumnColorByColumn(e){let t=this.getNumGraphColumns(e),o=this.maxColumns>t?this.maxColumns:t,r={};for(let n=0;n<=o;n+=1)if(n<t){var i;let t=e[ea(n)];r[n]="rgba"===(i=t4(t)).type?`rgba(${i.r}, ${i.g}, ${i.b}, ${Number(i.a.toFixed(2))})`:`hsla(${i.h}, ${(100*i.s).toFixed(2)}%, ${(100*i.l).toFixed(2)}%, ${Number(i.a.toFixed(2))})`}else{let e=r[n%t];r[n]=e}return r}getNumGraphColumns(e){let t=Number.parseInt(e[es],tf);return Number.isNaN(t)?tf:t}expandLastZoneMinWidthForScrollbar(e){let t=e[e.length-1]?.type;if(!t)return;let o=tG(this.props.cssVariables,!0),r=tg[t].minimumWidth+o,i=this.graphZonesByType[t];if(!i||null!=i.maximumWidth&&r>i.maximumWidth)return;i.minimumWidth=r;let n=tg[t].showIconWidth;null!=n&&(i.showIconWidth=n+o),i.currentWidth<i.minimumWidth&&(i.currentWidth=i.minimumWidth),i.preferredWidth<i.minimumWidth&&(i.preferredWidth=i.minimumWidth)}ensureZoneWidthsMatchGraphWidth(e,t){let o=tN(e);o>t&&this.shrinkZoneWidthsToFitWidth(e,t),o<t&&this.expandZoneWidthsToFitWidth(e,t)}shrinkZoneWidthsToFitWidth(e,t,o){let r=tN(e);for(;r>t;){let i=tk(e,o);if(!i)break;let n=tN(e,i.type);if(n+i.currentWidth>t){let o=tF(i,e,t-n);this.updateWidthByZone(o,i.type)}r=tN(e)}}getOrderedActiveGraphZones(){return this.graphZoneOrdering.sort((e,t)=>this.graphZonesByType[e].order-this.graphZonesByType[t].order).filter(e=>!this.graphZonesByType[e].isHidden).map(e=>this.graphZonesByType[e])}expandZoneWidthsToFitWidth(e,t,o){let r=tN(e);for(;r<t;){let i=function(e,t=0){if(e.length){for(let o=t;o<e.length;o+=1){let t=e[o],r=t.maximumWidth?Math.min(t.maximumWidth,t.preferredWidth||1/0):t.preferredWidth;if(r&&t.currentWidth<r)return t}return e[e.length-1]}}(e,o);if(!i)break;let n=tN(e,i.type),s=i.maximumWidth?Math.min(i.maximumWidth,i.preferredWidth||1/0):i.preferredWidth||0;if(n+i.currentWidth<t){let o=t-n;!tA(i.type,e)&&o>s&&(o=s),o=tF(i,e,o),this.updateWidthByZone(o,i.type)}r=tN(e)}}onGraphHeaderRowMouseDown=e=>{1===e.button&&e.preventDefault()};onToggleRefNodesShown=(e,t,o,r)=>{t.forEach(e=>{o&&this.excludeRefsById[e.id]?delete this.excludeRefsById[e.id]:o||(this.excludeRefsById[e.id]=e)}),this.excludeRemotesByName=this.getExcludeRemotesByName(),this.props.onToggleRefsVisibilityClick?.(e,t,o,r?this.processedGraphRowBySha[r]:void 0),this.processRows(this.props.graphRows),this.setState({processedRows:[...this.orderedGraphRows]})};cleanEdgeCaches(){ox={},oT={},o_={},ob={},os={}}onZoneEnter=(e,t,o,r)=>{t!==to&&(o&&r&&this.onRefNodeUnhovered(e,o,r),this.onRefZoneUnhovered())};adjustResizedGraphZone(e,t,o,r){if(o?.width){let i=t.currentWidth;this.updateWidthByZone(o.width,t.type,r);let n=tZ(t.type,e),s=this.graphZonesByType[t.type];i>s.currentWidth&&this.expandZoneWidthsToFitWidth(e,this.graphWidth,n+1),i<s.currentWidth&&this.shrinkZoneWidthsToFitWidth(e,this.graphWidth,n-1)}}dimRowsOfSelectedCommit(e){this.state.dimRowsOfSelectedCommit!==e&&this.setState({dimRowsOfSelectedCommit:e})}onGraphContainerBlurred=(e,t,o)=>{setTimeout(()=>{this.isMounted&&(t&&o&&this.onRefNodeUnhovered(e,t,o),this.onRefZoneUnhovered())},250)};onGraphContainerMouseEnter=e=>{this.props.onGraphMouseEnter?.(e)};onGraphContainerMouseLeave=e=>{this.props.onGraphMouseLeave?.(e)};_headerHoverRestoreTimer;onGraphHeaderMouseDown=()=>{let{currentlyHoveredCommitSha:e}=this.state;if(null!=e){if(this.props.onGraphRowUnhovered){let t=this.processedGraphRowBySha[e];null!=t&&this.props.onGraphRowUnhovered({nativeEvent:{relatedTarget:null},relatedTarget:null},tr,t)}this.setState({currentlyHoveredCommitSha:void 0})}};onGraphHeaderMouseUp=e=>{this.hoverRowForHeaderEvent(e.clientX,e.clientY,e.target)};onGraphHeaderWheel=e=>{let{currentlyHoveredCommitSha:t}=this.state;if(null!=t){if(this.props.onGraphRowUnhovered){let e=this.processedGraphRowBySha[t];null!=e&&this.props.onGraphRowUnhovered({nativeEvent:{relatedTarget:null},relatedTarget:null},tr,e)}this.setState({currentlyHoveredCommitSha:void 0})}let o=this.orderedGraphRows?.length??0;if(!o)return;let{hasMoreCommits:r,scrollLeft:i,scrollTop:n}=this.state,s=this.graphWidth||this.state.width||0,l=(this.graphHeight||this.state.height||0)-ef;if(s<=0||l<=0)return;let a=o*em,h=Math.max(0,a-l),c=n+e.deltaY;if((c=q(c,0,h))===n)return;let d={clientHeight:l,clientWidth:s,scrollHeight:a,scrollLeft:i,scrollTop:c,scrollWidth:s},u=this.getOrderedActiveGraphZones(),p=u.length>0?u[u.length-1].type:tr;this.onScrollForZone(p,d,s,l,r);let f=e.target;if(f){this._headerHoverRestoreTimer&&clearTimeout(this._headerHoverRestoreTimer);let t=e.clientX,o=e.clientY;this._headerHoverRestoreTimer=setTimeout(()=>{this._headerHoverRestoreTimer=void 0,this.hoverRowForHeaderEvent(t,o,f)},200)}e.preventDefault()};onGraphHeaderMouseMove=e=>{0===e.buttons&&this.hoverRowForHeaderEvent(e.clientX,e.clientY,e.target)};hoverRowForHeaderEvent(e,t,o){if(!(o instanceof HTMLElement))return;let r=o.closest(".resizable-handle.horizontal");if(null==r||r.closest(`#${to}-header`))return;let i=this.graphContainerRef?.current;if(null==i)return;let n=this.orderedGraphRows?.length??0;if(!n)return;let s=i.getBoundingClientRect(),l=t-s.top;if(l<0)return;let a=this.state.scrollTop??0,{currentlyHoveredCommitSha:h}=this.state,c=Math.floor((l+a)/em);if(c<0||c>=n)return;let d=this.orderedGraphRows[c];if(!d)return;let u=s.top+c*em-a,p={getBoundingClientRect:()=>({top:u,left:e,right:e+60,bottom:u+em,x:e,y:u,width:60,height:em})};this.onCurrentlyHoveredGraphCommit({clientX:e,currentTarget:p,nativeEvent:{clientX:e,currentTarget:p,target:p}},tr,d.sha,h)}onGraphResized=tx((e,t)=>{if(!this.isMounted)return;let o=Math.floor(t),r=Math.floor(e);if(0===r||0===o)return;let i=o!==this.graphHeight,n=r!==this.graphWidth,s={};if(i&&(this.graphHeight=o,s.height=o),n){this.graphWidth=r;let e=this.getOrderedActiveGraphZones();this.ensureZoneWidthsMatchGraphWidth(e,this.graphWidth),s.width=this.graphWidth,s.graphZones=e}(i||n)&&(this.setState(s),i&&this.onGraphVisibleRowsUpdatedThrottled(),this.props.onGraphResized&&this.props.onGraphResized(this.graphWidth,this.graphHeight))});onGraphVisibleRowsUpdated(){if(!this.isMounted||!this.props.onGraphVisibleRowsChanged||!this.orderedGraphRows?.length)return;let{top:e,bottom:t}=this.getTopAndBottomVisibleRowIndex();-1===e||-1===t||e>=this.orderedGraphRows.length||t>=this.orderedGraphRows.length||e===this.lastTopVisibleRowIndex&&t===this.lastBottomVisibleRowIndex||(this.lastTopVisibleRowIndex=e,this.lastBottomVisibleRowIndex=t,this.props.onGraphVisibleRowsChanged&&this.props.onGraphVisibleRowsChanged(this.orderedGraphRows[e],this.orderedGraphRows[t]))}getCurrentPlatform(){return this.props.platform||"darwin"}isMacOSPlatform(){return"darwin"===this.getCurrentPlatform()}isFilteredSearch(){return"filter"===this.searchMode&&function(e,t=1){let o=0;for(let r in e)if(Object.hasOwn(e,r)&&e[r]&&++o>=t)return!0;return o>=t}(this.highlightedShas)}getGraphColumnSettingFromZoneType(e){return{width:e.preferredWidth||0,isHidden:e.isHidden,mode:e.mode,order:e.order}}decorateWithHelmet=(e,t,o)=>{let r=function(e){let t=e||el,o="";for(let e of(o+=`.gk-graph {
|
|
19
19
|
`,Object.keys(t)))o+=`${e}: ${t[e]};
|
|
20
20
|
`;return o+`}
|
|
21
|
-
`}(t);return P.createElement(P.Fragment,null,P.createElement("style",{nonce:o},r),P.createElement("div",{className:"gk-graph"},e))};render(){let e,{columnsSettings:t,customFooterRow:o,isInUnsupportedRebase:r,isCommitting:i,repoPath:n,nonce:s,suppressNonRefRowTooltips:l,wipMessageEditable:a}=this.props,{avatarUrlByEmail:h,columnColorByColumn:c,contexts:d,createRefFormData:u,cssVariablesWithDefaults:p,currentlyHoveredCommitSha:f,dimMergeCommits:m,dimRowsOfSelectedCommit:g,enableShowHideRefsOptions:v,highlightRowsOnRefHover:y,showGhostRefsOnRowHover:S,showRemoteNamesOnRefs:w,enabledRefMetadataTypes:C,enabledScrollMarkerTypes:b,graphCommitDescDisplayMode:R,graphZones:_,hasMoreCommits:T,height:x,highlightedShas:E,hoveredRefGroup:M,hoveredRefZoneSha:I,themeOpacityFactor:O,isLoadingRows:z,rowsStatsLoading:D,numGraphColumns:k,pendingCommitMessageSummary:G,processedRows:N,refIconsPosition:A,refMetadataById:W,useAuthorInitialsForAvatars:H,scrollToAlignment:F,scrollToIndex:B,scrollTop:U,scrollLeft:Z,shaLength:j,width:$,workDirStats:V}=this.state,K=L()("flex","graph-container"),Y=e=>e===N.length?"SHOW_MORE_COMMITS":N[e].sha,q=(e=e=>{let t=N[e];if(!t)return"SHOW_MORE_COMMITS";let o=t.sha;return this.selectedShas.has(o)?`${o}_${this._selectionVersion}`:o},({cellCache:t,cellRenderer:o,columnSizeAndPositionManager:r,columnStartIndex:i,columnStopIndex:n,deferredMeasurementCache:s,horizontalOffsetAdjustment:l,isScrolling:a,parent:h,rowSizeAndPositionManager:c,rowStartIndex:d,rowStopIndex:u,styleCache:p,verticalOffsetAdjustment:f,visibleColumnIndices:m,visibleRowIndices:g})=>{let v=[],y=t.__prevScrollLeft!==Z;y&&(t.__prevScrollLeft=Z);let S=r.areOffsetsAdjusted()||c.areOffsetsAdjusted(),w=!a&&!S;for(let S=d;S<=u;S+=1){let d=c.getSizeAndPositionOfCell(S);for(let c=i;c<=n;c+=1){let i,n,u=r.getSizeAndPositionOfCell(c),C=c>=m.start&&c<=m.stop&&S>=g.start&&S<=g.stop,b=`${S}-${c}`;w&&p[b]?i=p[b]:s&&!s.has(S,c)?i={height:"auto",left:0,position:"absolute",top:0,width:"auto"}:(i={height:d.size,left:u.offset+l,position:"absolute",top:d.offset+f,width:u.size},p[b]=i);let R={columnIndex:c,isScrolling:a,isVisible:C,key:b,parent:h,rowIndex:S,style:i};if(!a||l||f||y)n=o(R);else{let r=e(S,c);t[b]?.realKeyForCell!==r&&(t[b]={realKeyForCell:r,cell:o(R)}),n=t[b].cell}null!=n&&v.push(n)}}return v}),J=this.getLeftGutterWidth(),er=this.getRightGutterWidth(),es=this.getRightGutterBoxShadowAlpha(O),el=this.getLeftGutterBoxShadowAlpha(O),ea=this.getNodeOffsetByColumn(),eh=this.getNodeOpacityByColumn(),ec=tZ(to,_),ed=tZ(tr,_),eu=!M,ep={alwaysShowTimelines:this.isCommitListFiltered(),avatarUrlByEmail:h,createRefFormData:u,dimMergeCommits:m,dimRowsOfSelectedCommit:g,enableShowHideRefsOptions:v,highlightRowsOnRefHover:y,showGhostRefsOnRowHover:S,showRemoteNamesOnRefs:w,enabledRefMetadataTypes:C,enabledScrollMarkerTypes:b,isInUnsupportedRebase:r,isCommitting:i||!1,pendingCommitMessageSummary:G,workDirStats:V,repoPath:n,columnColorByColumn:c,currentlyHoveredCommitSha:f,cssVariables:p,graphCommitDescDisplayMode:R,graphZoneModeConstants:this.graphZoneModeConstants,graphZones:_,hasMoreCommits:T,height:x,highlightedShas:E,hoveredRefGroup:M,hoveredRefZoneSha:I,includeOnlyRefsById:this.includeOnlyRefsById,includeOnlyRemotesByName:this.includeOnlyRemotesByName,isLoadingRows:z,selectedShas:this.selectedShas,leftGutterBoxShadowAlpha:el,leftGutterWidth:J,nodeOffsetByColumn:ea,nodeOpacityByColumn:eh,nonce:s,numGraphColumns:k,processedRows:N,processedGraphRowBySha:this.processedGraphRowBySha,refIconsPosition:A,refMetadataById:W,rightGutterBoxShadowAlpha:es,rightGutterWidth:er,rowStatsConstraints:this.rowStatsConstraints,rowsStats:this.rowsStats,suppressNonRefRowTooltips:l,useAuthorInitialsForAvatars:H,scrollToAlignment:F,scrollLeft:Z,scrollTop:U,shaLength:j,shouldShowRefLine:-1!==ec&&-1!==ed&&ed-ec==1,width:$,wipMessageEditable:a||!1,onMissingAvatar:this.onMissingAvatar,onMissingRefMetadata:this.onMissingRefMetadata,clearCurrentlyHoveredGraphCommit:this.onClearCurrentlyHoveredGraphCommit,setAsCurrentlyHoveredGraphCommit:this.onCurrentlyHoveredGraphCommit,onClickRef:this.onClickRef,onClickCommit:this.onClickCommit,onDoubleClickCommit:this.onDoubleClickCommit,onBlurWipNodeInput:this.onBlurWipNodeInput,onFocusWipNodeInput:this.onFocusWipNodeInput,onDoubleClickRef:this.onDoubleClickRef,onMessageChange:this.onMessageChange,onRefBeginDrag:this.onRefBeginDrag,onRefCanDrag:this.onRefCanDrag,onRefCanDrop:this.onRefCanDrop,onRefCreate:this.onRefCreate,onRefCreateCancel:this.onRefCreateCancel,onRefCreateContextMenu:this.onRefCreateContextMenu,onRefDragEnter:this.onRefDragEnter,onRefDragLeave:this.onRefDragLeave,onRefDrop:this.onRefDrop,onRefEndDrag:this.onRefEndDrag,onRefNodeHovered:this.onRefNodeHovered,onRefNodeUnhovered:this.onRefNodeUnhovered,onRefShorthandChange:this.onRefShorthandChange,onRefZoneHovered:this.onRefZoneHovered,onRefZoneUnhovered:this.onRefZoneUnhovered,onToggleRefNodesShown:this.onToggleRefNodesShown,onCommitContextMenu:this.onCommitContextMenu,onShowContextMenuForGroupedRef:this.onRefContextMenu,getExternalIcon:this.getIconCallback,formatCommitDateTime:this.formatCommitDateTimeCallback,formatRefShorthand:this.formatRefShorthandCallback,isRefShorthandValid:this.isRefShorthandValidCallback,translate:this.translateCallback},em={[to]:((e,t)=>{let{createRefFormData:o,formatRefShorthand:r,enableShowHideRefsOptions:i,enabledRefMetadataTypes:n,isRefShorthandValid:s,showGhostRefsOnRowHover:l,showRemoteNamesOnRefs:a,onDoubleClickRef:h,processedRows:c,includeOnlyRefsById:d,includeOnlyRemotesByName:u,isInUnsupportedRebase:p,getExternalIcon:f,hoveredRefGroup:m,hoveredRefZoneSha:g,numGraphColumns:v,onClickRef:y,onMissingRefMetadata:S,onShowContextMenuForGroupedRef:w,onRefBeginDrag:C,onRefCanDrag:b,onRefCanDrop:R,onRefCreate:_,onRefCreateCancel:T,onRefCreateContextMenu:x,onRefDragEnter:E,onRefDragLeave:M,onRefDrop:I,onRefEndDrag:O,onRefNodeHovered:z,onRefNodeUnhovered:D,onRefShorthandChange:k,onRefZoneHovered:G,onRefZoneUnhovered:N,onToggleRefNodesShown:A,refIconsPosition:W,refMetadataById:H,shouldShowRefLine:L,translate:F,clearCurrentlyHoveredGraphCommit:B,currentlyHoveredCommitSha:U}=e,Z=new tJ(e);return({rowIndex:e,style:j})=>{let $=t(e),V=c[e],K=Z.getZoneWidth(to),Y=Z.isHovering(e),{sha:q,type:X,hasRefs:J,contexts:Q}=V,ee=Q?.ref||void 0,et=Q?.refGroups||void 0,eo=Z.isSingleSelected(e),er=(l||J)&&(J||Y||eo)?Z.getGraphRefGroupsByNameForRow(e):[],ei=Z.isColumnFollowingGraphColumn(to),en=Z.shouldUseColumnHeaderIcons(to);return o?.sha===q?P.createElement(lL,{createRefFormData:o,formatRefShorthand:r,isRefShorthandValid:s,key:$,onCancel:T,onContextMenu:x,onRefCreate:_,onRefShorthandChange:k,refZoneWidth:K,style:j,translate:F}):P.createElement(lZ,{clearCurrentlyHoveredGraphCommit:B,column:V.column,columnForColoring:V.columnForColoring,context:ee,currentlyHoveredCommitSha:U,enabledRefMetadataTypes:n,enableShowHideRefsOptions:i,getExternalIcon:f,hasActive:Z.rowContainsCurrentHeadRef(V),hasRefs:J||!1,hasTimeline:Z.hasTimeline(e),hoveredRefGroup:m,hoveredRefZoneSha:g,includeOnlyRefsById:d,includeOnlyRemotesByName:u,isInUnsupportedRebase:p,isSingleSelected:eo,key:$,numGraphColumns:v,onClickRef:y,onDoubleClickRef:h,onMissingRefMetadata:S,onRefBeginDrag:C,onRefCanDrag:b,onRefCanDrop:R,onRefDragEnter:E,onRefDragLeave:M,onRefDrop:I,onRefEndDrag:O,onToggleRefNodesShown:A,refGroupContexts:et,refGroupsByName:er,refIconsPosition:W,refMetadata:H,refNodeHovered:z,refNodeUnhovered:D,refZoneHovered:G,refZoneUnhovered:N,sha:q,shouldShowRefLine:L,showColorStrip:ei,showContextMenuForGroupedRef:w,showGhostRefsOnRowHover:l,showRemoteNamesOnRefs:a,style:j,translate:F,type:X,useColumnHeaderIcons:en,width:K})}})(ep,Y),[tr]:lW(ep,Y),[ti]:((e,t)=>{let{dimMergeCommits:o,dimRowsOfSelectedCommit:r,processedRows:i,translate:n,getExternalIcon:s,graphCommitDescDisplayMode:l,highlightRowsOnRefHover:a,isInUnsupportedRebase:h,numGraphColumns:c,isCommitting:d,pendingCommitMessageSummary:u,workDirStats:p,onBlurWipNodeInput:f,onFocusWipNodeInput:m,onMessageChange:g,clearCurrentlyHoveredGraphCommit:v,currentlyHoveredCommitSha:y,onCommitContextMenu:S,onClickCommit:w,onDoubleClickCommit:C,setAsCurrentlyHoveredGraphCommit:b,suppressNonRefRowTooltips:R,wipMessageEditable:_}=e,T=new tJ(e);return({rowIndex:e,style:x})=>{let E=t(e),M=i[e],{displaySummary:I,displayBody:O,sha:z,type:D,contexts:k,message:G}=M,N=k?.message||void 0,A=k?.row||void 0,W=T.isColumnFollowingGraphColumn(ti),H=T.isLastColumn(ti),L=T.getZoneWidth(ti),F=T.getVerticalScrollWidth(ti),B=T.isHovering(e),U=D===ei&&X(p),Z=U&&!_&&p?P.createElement(lR,{getExternalIcon:s,translate:n,workDirStats:p}):null,j=l===tS.ALWAYS||l===tS.ON_HOVER&&B,$=D!==ei||_?P.createElement(P.Fragment,null,P.createElement("span",{className:"message-zone--summary"},I),j&&O?P.createElement("span",{className:"message-zone--body"},O):null):P.createElement("span",{style:{display:"flex",alignItems:"center",position:"relative",width:"100%"}},P.createElement("span",{style:{flex:"1",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"}},j?I:null),Z);return U&&_?P.createElement(l_,{clearCurrentlyHoveredGraphCommit:v,currentlyHoveredCommitSha:y,getExternalIcon:s,graphZoneType:ti,isCommitting:d,isHovering:T.isHovering(e),isSelected:T.isSelected(e),key:E,onBlur:f,onClickCommit:w,onContextMenu:S,onFocus:m,onMessageChange:g,setAsCurrentlyHoveredGraphCommit:b,sha:z,style:x,translate:n,value:u,workDirStats:p}):P.createElement(lu,{clearCurrentlyHoveredGraphCommit:v,column:M.column,columnForColoring:M.columnForColoring,context:N,currentlyHoveredCommitSha:y,dimRowsOfSelectedCommit:r,getExternalIcon:s,graphZoneType:ti,highlightRowsOnRefHover:a,isDimmedMergeCommitRow:D===et&&o,isHighlighted:T.isHighlighted(e),isHovering:B,isInUnsupportedRebase:h,isLastColumn:H,isMissingHoveredRefGroup:T.isMissingHoveredRefGroup(e),isSelected:T.isSelected(e),key:E,numGraphColumns:c,onClickCommit:w,onContextMenu:S,onDoubleClickCommit:C,rowContext:A,setAsCurrentlyHoveredGraphCommit:b,sha:z,showColorStrip:W,showConflictIcon:D===ee||D===eo,showTimeline:T.hasTimeline(e),style:x,title:R?void 0:G,type:D,verticalScrollWidth:F,zoneWidth:L},$)}})(ep,Y),[tn]:((e,t)=>{let{avatarUrlByEmail:o,clearCurrentlyHoveredGraphCommit:r,cssVariables:i,currentlyHoveredCommitSha:n,dimMergeCommits:s,dimRowsOfSelectedCommit:l,getExternalIcon:a,highlightRowsOnRefHover:h,processedRows:c,isInUnsupportedRebase:d,onCommitContextMenu:u,onClickCommit:p,onDoubleClickCommit:f,numGraphColumns:m,setAsCurrentlyHoveredGraphCommit:g,suppressNonRefRowTooltips:v,useAuthorInitialsForAvatars:y}=e,S=new tJ(e);return({rowIndex:e,style:w})=>{let C=t(e),b=c[e],{author:R,email:_,message:T,sha:x,type:E,contexts:M}=b,I=S.getActiveGraphZone(tn),O=E!==ei?R:void 0,z=E!==ei?lf(R,_):void 0,D=M?.author||void 0,k=M?.row||void 0,G=S.isColumnFollowingGraphColumn(tn),N=S.isLastColumn(tn),A=S.getZoneWidth(tn),W=(A<=I.minimumWidth||I?.mode===tc.Rich)&&E!==ei;if(W){let e=y?void 0:o[_];O=P.createElement(lm,{authorInitials:lp(R),avatarUrl:e,className:L()("node",Q,"z6"),column:b.column,context:M?.avatar||void 0,cssVariables:i,fontSize:10,height:eI,size:eO,tooltip:v?void 0:()=>{let e=R&&""!==R.trim()&&"Unknown"!==R?lf(R,_):_,t=ot(t8(T||"")),o="";if(0===t.length)o=e;else{t.unshift({email:_,name:R});for(let e=0;e<t.length;e+=1){let r=t[e];o+=lf(r.name,r.email),e<t.length-1&&(o+=", ")}}return o},useAuthorInitialsForAvatars:y,width:eI})}return P.createElement(lu,{clearCurrentlyHoveredGraphCommit:r,column:b.column,columnForColoring:b.columnForColoring,context:D,currentlyHoveredCommitSha:n,dimRowsOfSelectedCommit:l,getExternalIcon:a,graphZoneType:tn,hasAvatars:W,highlightRowsOnRefHover:h,isDimmedMergeCommitRow:E===et&&s,isHighlighted:S.isHighlighted(e),isHovering:S.isHovering(e),isInUnsupportedRebase:d,isLastColumn:N,isMissingHoveredRefGroup:S.isMissingHoveredRefGroup(e),isSelected:S.isSelected(e),key:C,numGraphColumns:m,onClickCommit:p,onContextMenu:u,onDoubleClickCommit:f,rowContext:k,setAsCurrentlyHoveredGraphCommit:g,sha:x,showColorStrip:G,showTimeline:S.hasTimeline(e),style:w,title:v?void 0:z,type:E,verticalScrollWidth:S.getVerticalScrollWidth(tn),zoneWidth:A},O)}})(ep,Y),[ts]:((e,t)=>{let{processedRows:o,getExternalIcon:r,highlightRowsOnRefHover:i,isInUnsupportedRebase:n,numGraphColumns:s,formatCommitDateTime:l,clearCurrentlyHoveredGraphCommit:a,dimMergeCommits:h,dimRowsOfSelectedCommit:c,currentlyHoveredCommitSha:d,onCommitContextMenu:u,onClickCommit:p,onDoubleClickCommit:f,setAsCurrentlyHoveredGraphCommit:m,suppressNonRefRowTooltips:g}=e,v=new tJ(e);return({rowIndex:e,style:y})=>{let S=t(e),w=o[e],{date:C,sha:b,type:R,contexts:_}=w,T=C&&R!==ei?l(C,en.RowEntry):void 0,x=C&&R!==ei?l(C,en.Tooltip):void 0,E=_?.date||void 0,M=_?.row||void 0,I=v.isColumnFollowingGraphColumn(ts),O=v.isLastColumn(ts),z=v.getZoneWidth(ts),D=v.getVerticalScrollWidth(ts);return P.createElement(lu,{clearCurrentlyHoveredGraphCommit:a,column:w.column,columnForColoring:w.columnForColoring,context:E,currentlyHoveredCommitSha:d,dimRowsOfSelectedCommit:c,getExternalIcon:r,graphZoneType:ts,highlightRowsOnRefHover:i,isDimmedMergeCommitRow:R===et&&h,isHighlighted:v.isHighlighted(e),isHovering:v.isHovering(e),isInUnsupportedRebase:n,isLastColumn:O,isMissingHoveredRefGroup:v.isMissingHoveredRefGroup(e),isSelected:v.isSelected(e),key:S,numGraphColumns:s,onClickCommit:p,onContextMenu:u,onDoubleClickCommit:f,rowContext:M,setAsCurrentlyHoveredGraphCommit:m,sha:b,showColorStrip:I,showTimeline:!1,style:y,title:g?void 0:x,type:R,verticalScrollWidth:D,zoneWidth:z},T)}})(ep,Y),[tl]:((e,t)=>{let{processedRows:o,getExternalIcon:r,highlightRowsOnRefHover:i,isInUnsupportedRebase:n,numGraphColumns:s,clearCurrentlyHoveredGraphCommit:l,currentlyHoveredCommitSha:a,dimMergeCommits:h,dimRowsOfSelectedCommit:c,onCommitContextMenu:d,onClickCommit:u,onDoubleClickCommit:p,setAsCurrentlyHoveredGraphCommit:f,shaLength:m,suppressNonRefRowTooltips:g}=e,v=new tJ(e);return({rowIndex:e,style:y})=>{let S=t(e),w=o[e],{sha:C,type:b,contexts:R}=w,_=((e,t=tm)=>e?e.substring(0,t):"")(C,m),T=R?.sha||void 0,x=R?.row||void 0,E=v.isColumnFollowingGraphColumn(tl),M=v.isLastColumn(tl),I=v.getZoneWidth(tl),O=v.getVerticalScrollWidth(tl);return P.createElement(lu,{clearCurrentlyHoveredGraphCommit:l,column:w.column,columnForColoring:w.columnForColoring,context:T,currentlyHoveredCommitSha:a,dimRowsOfSelectedCommit:c,getExternalIcon:r,graphZoneType:tl,highlightRowsOnRefHover:i,isDimmedMergeCommitRow:b===et&&h,isHighlighted:v.isHighlighted(e),isHovering:v.isHovering(e),isInUnsupportedRebase:n,isLastColumn:M,isMissingHoveredRefGroup:v.isMissingHoveredRefGroup(e),isSelected:v.isSelected(e),key:S,numGraphColumns:s,onClickCommit:u,onContextMenu:d,onDoubleClickCommit:p,rowContext:x,setAsCurrentlyHoveredGraphCommit:f,sha:C,showColorStrip:E,showTimeline:v.hasTimeline(e),style:y,type:b,verticalScrollWidth:O,zoneWidth:I},b!==ei?P.createElement("span",{className:"font-monospace pointer",title:g?void 0:_},_):null)}})(ep,Y),[ta]:((e,t)=>{let{processedRows:o,rowStatsConstraints:r,getExternalIcon:i,highlightRowsOnRefHover:n,isInUnsupportedRebase:s,numGraphColumns:l,clearCurrentlyHoveredGraphCommit:a,currentlyHoveredCommitSha:h,dimMergeCommits:c,dimRowsOfSelectedCommit:d,onCommitContextMenu:u,onClickCommit:p,onDoubleClickCommit:f,rowsStats:m,setAsCurrentlyHoveredGraphCommit:g,suppressNonRefRowTooltips:v}=e,y=new tJ(e);return({rowIndex:e,style:S})=>{let w=t(e),C=o[e],{sha:b,type:R,contexts:_}=C,T=_?.stats||void 0,x=_?.row||void 0,E=m?.[b],M=[E?.files?`${E.files} files changed`:"",E?.additions?`${E.additions} lines added`:"",E?.deletions?`${E.deletions} lines deleted`:""].filter(Boolean).join(", ");M=R!==ei?M:"";let I=y.isColumnFollowingGraphColumn(ta),O=y.isLastColumn(ta),z=y.getZoneWidth(ta),D=y.getVerticalScrollWidth(ta);return P.createElement(lu,{clearCurrentlyHoveredGraphCommit:a,column:C.column,columnForColoring:C.columnForColoring,context:T,currentlyHoveredCommitSha:h,dimRowsOfSelectedCommit:d,getExternalIcon:i,graphZoneType:ta,highlightRowsOnRefHover:n,isDimmedMergeCommitRow:R===et&&c,isHighlighted:y.isHighlighted(e),isHovering:y.isHovering(e),isInUnsupportedRebase:s,isLastColumn:O,isMissingHoveredRefGroup:y.isMissingHoveredRefGroup(e),isSelected:y.isSelected(e),key:w,numGraphColumns:l,onClickCommit:p,onContextMenu:u,onDoubleClickCommit:f,rowContext:x,setAsCurrentlyHoveredGraphCommit:g,sha:b,showColorStrip:I,showTimeline:y.hasTimeline(e),style:S,title:v?void 0:M,type:R,verticalScrollWidth:D,zoneWidth:z},E&&R!==ei?P.createElement(la,{constraints:r,getExternalIcon:i,isLastColumn:O,isRowSelected:y.isSelected(e),stats:E,verticalScrollWidth:D,zoneWidth:z}):null)}})(ep,Y),[tt]:((e,t)=>{let{translate:o,processedRows:r}=e,i=L()("graph-row-wrapper","grow-3","height-100","graph-zone-column","min-width-0","pb3","pointer","pt3","relative"),n=new tJ(e);return({rowIndex:e,style:s})=>{let l=t(e),a=L()("graph-row","height-100-percent","flex"),h=n.hasTimeline(e),c=r[e],d=c.contexts?.row||void 0,u=c.timeLineEntry?.label||"",p=c.timeLineEntry?.value||0,f=h?P.createElement(iI,null):null,m=h?P.createElement(iO,{message:o(u,p)}):null;return P.createElement("div",{className:i,"data-vscode-context":tM(d),key:l,style:s},f,P.createElement("div",{className:a,"data-vscode-context":tM(d)},m))}})(ep,Y)},eg=_.map((e,t)=>{let r=0===t;return P.createElement(iH,{branchUpstreamRowIndices:this.branchUpstreamRowIndices,cellRenderersByIds:em,columnIndex:t,customFooterRow:o,enabledScrollMarkerTypes:b,enableResizer:eu,getExternalIcon:this.getIconCallback,getKeyForCell:Y,graphHeight:x-ef,graphWidth:$,graphZones:_,graphZoneType:e.type,hasMoreCommits:T,horizontalScrollHeight:this.getHorizontalScrollHeight(e.type,p),isCommitListFiltered:this.isCommitListFiltered(),isLoadingRows:z,key:`${e.type}ColumnContainer`,markerColors:this.getMarkerColors(),markerRowIndices:this.state.markerRowIndices,onResize:this.onGraphZoneResize,onResizeEnd:this.onGraphZoneResizeEnd,onScroll:this.onScrollForZone,onScrollToRowCausedUpdate:r?this.onScrollToRowCausedUpdateForFirstColumn:void 0,onZoneEnter:t=>this.onZoneEnter(t,e.type,M,I),processedRows:N,rowCount:N.length,scrollLeft:Z,scrollToAlignment:r?F:void 0,scrollToIndex:r?B:void 0,scrollTop:U,smartCellRangeRenderer:q,stickyTimeline:this.props.stickyTimeline,translate:this.translateCallback,verticalScrollWidth:this.getVerticalScrollWidth(e.type,p)})}),ev=this.graphComponentRef?.current&&P.createElement(ll,{columnsSettings:t,dragAppendToContainer:this.graphComponentRef?.current,enableResizer:eu,enableShowHideRefsOptions:v,excludeRefsById:this.excludeRefsById,getExternalIcon:this.getIconCallback,graphZones:_,headerContext:d?.header,height:x,includeOnlyRefsById:this.includeOnlyRefsById,onColumnReOrdered:this.onGraphColumnReOrdered,onFilterColumnClick:this.onFilterColumnClick,onGraphZoneResize:this.onGraphZoneResize,onGraphZoneResizeEnd:this.onGraphZoneResizeEnd,onMouseDownCapture:this.onGraphHeaderMouseDown,onMouseMoveCapture:this.onGraphHeaderMouseMove,onMouseUpCapture:this.onGraphHeaderMouseUp,onPopupGraphHeaderContextMenu:this.onPopupGraphHeaderContextMenu,onSettingsClick:this.onSettingsClick,onToggleRefNodesShown:this.onToggleRefNodesShown,onWheel:this.onGraphHeaderWheel,repoPath:n,rowsStatsLoading:D,settingsContext:d?.settings,showRemoteNamesOnRefs:w,translate:this.translateCallback,width:$}),ey=P.createElement("div",{className:"graph-component","data-vscode-context":tM(d?.graph),onBlur:e=>this.onGraphContainerBlurred(e,M,I),onMouseEnter:this.onGraphContainerMouseEnter,onMouseLeave:this.onGraphContainerMouseLeave,ref:this.graphComponentRef,style:{height:"100%",width:"100%",position:"absolute"},tabIndex:-1},ev,P.createElement("div",{className:X(E)?L()(K,"graph-highlighted"):K,id:"graph-container",onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,onMouseDown:this.onGraphHeaderRowMouseDown,ref:this.graphContainerRef,style:{height:x,width:$},tabIndex:-1},eg));return this.decorateWithHelmet(ey,p,s)}}A(414),A(182),A(242),A(212),A(20),A(458);var l$=lj;export{eq as CHANGES_BAR_MIN_WIDTH,eX as CHANGES_BAR_RIGHT_MARGIN,eY as CHANGES_ZONE_MIN_WIDTH,eJ as CHANGES_ZONE_SHOW_ICON_WIDTH,eO as COMMIT_AUTHOR_ZONE_AVATAR_INNER_DIAMETER,eI as COMMIT_AUTHOR_ZONE_AVATAR_OUTER_DIAMETER,eM as COMMIT_AUTHOR_ZONE_MIN_WIDTH,ez as COMMIT_AUTHOR_ZONE_SHOW_ICON_WIDTH,eD as COMMIT_DATE_TIME_ZONE_MIN_WIDTH,eG as COMMIT_DATE_TIME_ZONE_SHOW_ICON_WIDTH,eW as COMMIT_MESSAGE_ZONE_MIN_WIDTH,eH as COMMIT_MESSAGE_ZONE_SHOW_ICON_WIDTH,eS as COMMIT_NODE_MIN_ALPHA,eN as COMMIT_SHA_ZONE_MIN_WIDTH,eA as COMMIT_SHA_ZONE_SHOW_ICON_WIDTH,ex as COMMIT_ZONE_DEFAULT_VIEWPORT_WIDTH_MIN,e_ as COMMIT_ZONE_EDGE_ARC_PADDING,eT as COMMIT_ZONE_EDGE_ARC_RADIUS,ew as COMMIT_ZONE_MARGIN_BOTTOM,eC as COMMIT_ZONE_MARGIN_TOP,eb as COMMIT_ZONE_ROW_HEIGHT,eR as COMMIT_ZONE_ROW_INNER_HEIGHT,eE as COMMIT_ZONE_SHOW_ICON_WIDTH,en as CommitDateTimeSources,eu as DEFAULT_AVATAR_BACKGROUND_COLOR,tm as DEFAULT_COMMIT_SHA_LENGTH,el as DEFAULT_CSS_VARIABLES,om as DEFAULT_TRANSLATIONS,ty as DEFAULT_WORKDIR_STATS,Y as DndComponent,ef as GRAPH_HEADER_ROW_HEIGHT,em as GRAPH_ROW_HEIGHT,eg as GRAPH_ROW_INNER_HEIGHT,ev as GRAPH_ROW_LAZY_LOAD_COMMITS_OFFSET,ey as GRAPH_ROW_PADDING,ep as GRAPH_SCROLL_MARKER_LANES,tc as GraphColumnMode,td as GraphMarkerShape,eQ as HEADER_ROW_HEIGHT,e0 as HEADER_ROW_MARGIN_BOTTOM,e2 as INLINE_SUMMARY_MARGIN_LEFT,e8 as LeftPanelToGraphMarginGap,es as NUM_COLUMNS_SUPPORTED_PROP_NAME,of as NamedKeys,e1 as OPACITY_FACTOR_BY_THEME,eZ as REF_NODE_ICON_MARGIN,ej as REF_NODE_ICON_SPACING,eU as REF_NODE_ICON_WIDTH,e$ as REF_NODE_OUTER_SPACING,eF as REF_ZONE_MARGIN_LEFT,eB as REF_ZONE_MARGIN_RIGHT,eK as REF_ZONE_MAX_REFS_TO_RENDER,eP as REF_ZONE_MIN_WIDTH,eV as REF_ZONE_SHOW_ICON_WIDTH,eL as REF_ZONE_TEXT_HEIGHT,te as ResizableHandleCorrection,e7 as SCROLL_TO_ALIGNMENT_AUTO,e9 as SCROLL_TO_ALIGNMENT_CENTER,t0 as ScrollbarContainer,ek as TIMESTAMP_FORMAT_DATE_TIME,e5 as TINY_FILES_READOUT_FONT_SIZE,e3 as TINY_FILES_READOUT_RIGHT_MARGIN,e6 as TINY_ICON_RIGHT_MARGIN,e4 as TINY_ICON_SIZE,tR as allMetadataTypes,ta as changesZone,tn as commitAuthorZone,ts as commitDateTimeZone,ti as commitMessageZone,Q as commitNodeType,tl as commitShaZone,tr as commitZone,l$ as default,th as emptySetMarker,lo as getHostingServiceName,tS as graphCommitDescDisplayModes,tp as graphMarkerMetadata,tu as graphMarkerShapeMetadata,tg as graphZoneMetaData,tb as issueMetadataType,tv as lookbackLimitByPeriod,ee as mergeConflictNodeType,et as mergeNodeType,tf as numGraphColumnsDefault,tw as pullRequestMetadataType,ed as refIconsPositions,ec as refTypes,to as refZone,er as stashNodeType,tt as timelineMsgRowRenderId,lC as types,eo as unsupportedRebaseWarningNodeType,tC as upstreamMetadataType,ei as workDirType};
|
|
21
|
+
`}(t);return P.createElement(P.Fragment,null,P.createElement("style",{nonce:o},r),P.createElement("div",{className:"gk-graph"},e))};render(){let{columnsSettings:e,customFooterRow:t,isInUnsupportedRebase:o,isCommitting:r,repoPath:i,nonce:n,rowAdornmentProvider:s,suppressNonRefRowTooltips:l,wipMessageEditable:a}=this.props,{avatarUrlByEmail:h,columnColorByColumn:c,contexts:d,createRefFormData:u,cssVariablesWithDefaults:p,currentlyHoveredCommitSha:f,dimMergeCommits:m,dimRowsOfSelectedCommit:g,enableShowHideRefsOptions:v,highlightRowsOnRefHover:y,showGhostRefsOnRowHover:S,showRemoteNamesOnRefs:w,enabledRefMetadataTypes:C,enabledScrollMarkerTypes:R,graphCommitDescDisplayMode:b,graphZones:_,hasMoreCommits:T,height:x,highlightedShas:E,hoveredRefGroup:M,hoveredRefZoneSha:I,themeOpacityFactor:O,isLoadingRows:z,rowsStatsLoading:D,numGraphColumns:k,pendingCommitMessageSummary:G,processedRows:N,refIconsPosition:A,refMetadataById:W,useAuthorInitialsForAvatars:H,scrollToAlignment:F,scrollToIndex:B,scrollTop:U,scrollLeft:Z,shaLength:j,width:V,workDirStats:$}=this.state,K=L()("flex","graph-container"),Y=e=>e===N.length?"SHOW_MORE_COMMITS":N[e].sha,q=this.getOrCreateSmartCellRangeRenderer(Z,this.isKeyboardNavigating),J=this.getLeftGutterWidth(),er=this.getRightGutterWidth(),es=this.getRightGutterBoxShadowAlpha(O),el=this.getLeftGutterBoxShadowAlpha(O),ea=this.getNodeOffsetByColumn(),eh=this.getNodeOpacityByColumn(),ec=tZ(to,_),ed=tZ(tr,_),eu=!M,ep={alwaysShowTimelines:this.isFilteredSearch(),avatarUrlByEmail:h,createRefFormData:u,dimMergeCommits:m,dimRowsOfSelectedCommit:g,enableShowHideRefsOptions:v,highlightRowsOnRefHover:y,showGhostRefsOnRowHover:S,showRemoteNamesOnRefs:w,enabledRefMetadataTypes:C,enabledScrollMarkerTypes:R,isInUnsupportedRebase:o,isCommitting:r||!1,pendingCommitMessageSummary:G,workDirStats:$,repoPath:i,columnColorByColumn:c,currentlyHoveredCommitSha:f,cssVariables:p,graphCommitDescDisplayMode:b,graphZoneModeConstants:this.graphZoneModeConstants,graphZones:_,hasMoreCommits:T,height:x,highlightedShas:E,hoveredRefGroup:M,hoveredRefZoneSha:I,includeOnlyRefsById:this.includeOnlyRefsById,includeOnlyRemotesByName:this.includeOnlyRemotesByName,isLoadingRows:z,selectedShas:this.selectedShas,leftGutterBoxShadowAlpha:el,leftGutterWidth:J,nodeOffsetByColumn:ea,nodeOpacityByColumn:eh,nonce:n,numGraphColumns:k,processedRows:N,processedGraphRowBySha:this.processedGraphRowBySha,refIconsPosition:A,refMetadataById:W,fallbackRefMetadataById:this.previousRefMetadataById,rightGutterBoxShadowAlpha:es,rightGutterWidth:er,rowStatsConstraints:this.rowStatsConstraints,rowsStats:this.rowsStats,suppressNonRefRowTooltips:l,useAuthorInitialsForAvatars:H,scrollToAlignment:F,scrollLeft:Z,scrollTop:U,shaLength:j,shouldShowRefLine:-1!==ec&&-1!==ed&&ed-ec==1,width:V,wipMessageEditable:a||!1,onMissingAvatar:this.onMissingAvatar,onMissingRefMetadata:this.onMissingRefMetadata,clearCurrentlyHoveredGraphCommit:this.onClearCurrentlyHoveredGraphCommit,setAsCurrentlyHoveredGraphCommit:this.onCurrentlyHoveredGraphCommit,onClickRef:this.onClickRef,onClickCommit:this.onClickCommit,onDoubleClickCommit:this.onDoubleClickCommit,onBlurWipNodeInput:this.onBlurWipNodeInput,onFocusWipNodeInput:this.onFocusWipNodeInput,onDoubleClickRef:this.onDoubleClickRef,onMessageChange:this.onMessageChange,onRefBeginDrag:this.onRefBeginDrag,onRefCanDrag:this.onRefCanDrag,onRefCanDrop:this.onRefCanDrop,onRefCreate:this.onRefCreate,onRefCreateCancel:this.onRefCreateCancel,onRefCreateContextMenu:this.onRefCreateContextMenu,onRefDragEnter:this.onRefDragEnter,onRefDragLeave:this.onRefDragLeave,onRefDrop:this.onRefDrop,onRefEndDrag:this.onRefEndDrag,onRefNodeHovered:this.onRefNodeHovered,onRefNodeUnhovered:this.onRefNodeUnhovered,onRefShorthandChange:this.onRefShorthandChange,onRefZoneHovered:this.onRefZoneHovered,onRefZoneUnhovered:this.onRefZoneUnhovered,onToggleRefNodesShown:this.onToggleRefNodesShown,onCommitContextMenu:this.onCommitContextMenu,onShowContextMenuForGroupedRef:this.onRefContextMenu,getExternalIcon:this.getIconCallback,formatCommitDateTime:this.formatCommitDateTimeCallback,formatRefShorthand:this.formatRefShorthandCallback,isRefShorthandValid:this.isRefShorthandValidCallback,translate:this.translateCallback},em={[to]:((e,t)=>{let{createRefFormData:o,formatRefShorthand:r,enableShowHideRefsOptions:i,enabledRefMetadataTypes:n,isRefShorthandValid:s,showGhostRefsOnRowHover:l,showRemoteNamesOnRefs:a,onDoubleClickRef:h,processedRows:c,includeOnlyRefsById:d,includeOnlyRemotesByName:u,isInUnsupportedRebase:p,getExternalIcon:f,hoveredRefGroup:m,hoveredRefZoneSha:g,numGraphColumns:v,onClickRef:y,onMissingRefMetadata:S,onShowContextMenuForGroupedRef:w,onRefBeginDrag:C,onRefCanDrag:R,onRefCanDrop:b,onRefCreate:_,onRefCreateCancel:T,onRefCreateContextMenu:x,onRefDragEnter:E,onRefDragLeave:M,onRefDrop:I,onRefEndDrag:O,onRefNodeHovered:z,onRefNodeUnhovered:D,onRefShorthandChange:k,onRefZoneHovered:G,onRefZoneUnhovered:N,onToggleRefNodesShown:A,refIconsPosition:W,refMetadataById:H,fallbackRefMetadataById:L,shouldShowRefLine:F,translate:B,clearCurrentlyHoveredGraphCommit:U,currentlyHoveredCommitSha:Z}=e,j=new tJ(e);return({rowIndex:e,style:V})=>{let $=t(e),K=c[e],Y=j.getZoneWidth(to),q=j.isHovering(e),{sha:X,type:J,hasRefs:Q,contexts:ee}=K,et=ee?.ref||void 0,eo=ee?.refGroups||void 0,er=j.isSingleSelected(e),ei=(l||Q)&&(Q||q||er)?j.getGraphRefGroupsByNameForRow(e):[],en=j.isColumnFollowingGraphColumn(to),es=j.shouldUseColumnHeaderIcons(to);return o?.sha===X?P.createElement(lB,{createRefFormData:o,formatRefShorthand:r,isRefShorthandValid:s,key:$,onCancel:T,onContextMenu:x,onRefCreate:_,onRefShorthandChange:k,refZoneWidth:Y,style:V,translate:B}):P.createElement(l$,{clearCurrentlyHoveredGraphCommit:U,column:K.column,columnForColoring:K.columnForColoring,context:et,currentlyHoveredCommitSha:Z,enabledRefMetadataTypes:n,enableShowHideRefsOptions:i,fallbackRefMetadata:L,getExternalIcon:f,hasActive:j.rowContainsCurrentHeadRef(K),hasRefs:Q||!1,hasTimeline:j.hasTimeline(e),hoveredRefGroup:m,hoveredRefZoneSha:g,includeOnlyRefsById:d,includeOnlyRemotesByName:u,isInUnsupportedRebase:p,isSingleSelected:er,key:$,numGraphColumns:v,onClickRef:y,onDoubleClickRef:h,onMissingRefMetadata:S,onRefBeginDrag:C,onRefCanDrag:R,onRefCanDrop:b,onRefDragEnter:E,onRefDragLeave:M,onRefDrop:I,onRefEndDrag:O,onToggleRefNodesShown:A,refGroupContexts:eo,refGroupsByName:ei,refIconsPosition:W,refMetadata:H,refNodeHovered:z,refNodeUnhovered:D,refZoneHovered:G,refZoneUnhovered:N,sha:X,shouldShowRefLine:F,showColorStrip:en,showContextMenuForGroupedRef:w,showGhostRefsOnRowHover:l,showRemoteNamesOnRefs:a,style:V,translate:B,type:J,useColumnHeaderIcons:es,width:Y})}})(ep,Y),[tr]:lP(ep,Y),[ti]:((e,t)=>{let{dimMergeCommits:o,dimRowsOfSelectedCommit:r,processedRows:i,translate:n,getExternalIcon:s,graphCommitDescDisplayMode:l,highlightRowsOnRefHover:a,isInUnsupportedRebase:h,numGraphColumns:c,isCommitting:d,pendingCommitMessageSummary:u,workDirStats:p,onBlurWipNodeInput:f,onFocusWipNodeInput:m,onMessageChange:g,clearCurrentlyHoveredGraphCommit:v,currentlyHoveredCommitSha:y,onCommitContextMenu:S,onClickCommit:w,onDoubleClickCommit:C,setAsCurrentlyHoveredGraphCommit:R,suppressNonRefRowTooltips:b,wipMessageEditable:_}=e,T=new tJ(e);return({rowIndex:e,style:x})=>{let E=t(e),M=i[e],{displaySummary:I,displayBody:O,sha:z,type:D,contexts:k,message:G}=M,N=k?.message||void 0,A=k?.row||void 0,W=T.isColumnFollowingGraphColumn(ti),H=T.isLastColumn(ti),L=T.getZoneWidth(ti),F=T.getVerticalScrollWidth(ti),B=T.isHovering(e),U=D===ei&&X(p),Z=U&&!_&&p?P.createElement(lx,{getExternalIcon:s,translate:n,workDirStats:p}):null,j=l===tS.ALWAYS||l===tS.ON_HOVER&&B,V=D!==ei||_?P.createElement(P.Fragment,null,P.createElement("span",{className:"message-zone--summary"},I),j&&O?P.createElement("span",{className:"message-zone--body"},O):null):P.createElement("span",{style:{display:"flex",alignItems:"center",position:"relative",width:"100%"}},P.createElement("span",{style:{flex:"1",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"}},j?I:null),Z);return U&&_?P.createElement(lE,{clearCurrentlyHoveredGraphCommit:v,currentlyHoveredCommitSha:y,getExternalIcon:s,graphZoneType:ti,isCommitting:d,isHovering:T.isHovering(e),isSelected:T.isSelected(e),key:E,onBlur:f,onClickCommit:w,onContextMenu:S,onFocus:m,onMessageChange:g,setAsCurrentlyHoveredGraphCommit:R,sha:z,style:x,translate:n,value:u,workDirStats:p}):P.createElement(lm,{clearCurrentlyHoveredGraphCommit:v,column:M.column,columnForColoring:M.columnForColoring,context:N,currentlyHoveredCommitSha:y,dimRowsOfSelectedCommit:r,getExternalIcon:s,graphZoneType:ti,highlightRowsOnRefHover:a,isDimmedMergeCommitRow:D===et&&o,isHighlighted:T.isHighlighted(e),isHovering:B,isInUnsupportedRebase:h,isLastColumn:H,isMissingHoveredRefGroup:T.isMissingHoveredRefGroup(e),isSelected:T.isSelected(e),key:E,numGraphColumns:c,onClickCommit:w,onContextMenu:S,onDoubleClickCommit:C,rowContext:A,setAsCurrentlyHoveredGraphCommit:R,sha:z,showColorStrip:W,showConflictIcon:D===ee||D===eo,showTimeline:T.hasTimeline(e),style:x,title:b?void 0:G,type:D,verticalScrollWidth:F,zoneWidth:L},V)}})(ep,Y),[tn]:((e,t)=>{let{avatarUrlByEmail:o,clearCurrentlyHoveredGraphCommit:r,cssVariables:i,currentlyHoveredCommitSha:n,dimMergeCommits:s,dimRowsOfSelectedCommit:l,getExternalIcon:a,highlightRowsOnRefHover:h,processedRows:c,isInUnsupportedRebase:d,onCommitContextMenu:u,onClickCommit:p,onDoubleClickCommit:f,numGraphColumns:m,setAsCurrentlyHoveredGraphCommit:g,suppressNonRefRowTooltips:v,useAuthorInitialsForAvatars:y}=e,S=new tJ(e);return({rowIndex:e,style:w})=>{let C=t(e),R=c[e],{author:b,email:_,message:T,sha:x,type:E,contexts:M}=R,I=S.getActiveGraphZone(tn),O=E!==ei?b:void 0,z=E!==ei?lv(b,_):void 0,D=M?.author||void 0,k=M?.row||void 0,G=S.isColumnFollowingGraphColumn(tn),N=S.isLastColumn(tn),A=S.getZoneWidth(tn),W=(A<=I.minimumWidth||I?.mode===tc.Rich)&&E!==ei;if(W){let e=y?void 0:o[_];O=P.createElement(ly,{authorInitials:lg(b),avatarUrl:e,className:L()("node",Q,"z6"),column:R.column,context:M?.avatar||void 0,cssVariables:i,fontSize:10,height:eI,size:eO,tooltip:v?void 0:()=>{let e=b&&""!==b.trim()&&"Unknown"!==b?lv(b,_):_,t=ot(t8(T||"")),o="";if(0===t.length)o=e;else{t.unshift({email:_,name:b});for(let e=0;e<t.length;e+=1){let r=t[e];o+=lv(r.name,r.email),e<t.length-1&&(o+=", ")}}return o},useAuthorInitialsForAvatars:y,width:eI})}return P.createElement(lm,{clearCurrentlyHoveredGraphCommit:r,column:R.column,columnForColoring:R.columnForColoring,context:D,currentlyHoveredCommitSha:n,dimRowsOfSelectedCommit:l,getExternalIcon:a,graphZoneType:tn,hasAvatars:W,highlightRowsOnRefHover:h,isDimmedMergeCommitRow:E===et&&s,isHighlighted:S.isHighlighted(e),isHovering:S.isHovering(e),isInUnsupportedRebase:d,isLastColumn:N,isMissingHoveredRefGroup:S.isMissingHoveredRefGroup(e),isSelected:S.isSelected(e),key:C,numGraphColumns:m,onClickCommit:p,onContextMenu:u,onDoubleClickCommit:f,rowContext:k,setAsCurrentlyHoveredGraphCommit:g,sha:x,showColorStrip:G,showTimeline:S.hasTimeline(e),style:w,title:v?void 0:z,type:E,verticalScrollWidth:S.getVerticalScrollWidth(tn),zoneWidth:A},O)}})(ep,Y),[ts]:((e,t)=>{let{processedRows:o,getExternalIcon:r,highlightRowsOnRefHover:i,isInUnsupportedRebase:n,numGraphColumns:s,formatCommitDateTime:l,clearCurrentlyHoveredGraphCommit:a,dimMergeCommits:h,dimRowsOfSelectedCommit:c,currentlyHoveredCommitSha:d,onCommitContextMenu:u,onClickCommit:p,onDoubleClickCommit:f,setAsCurrentlyHoveredGraphCommit:m,suppressNonRefRowTooltips:g}=e,v=new tJ(e);return({rowIndex:e,style:y})=>{let S=t(e),w=o[e],{date:C,sha:R,type:b,contexts:_}=w,T=C&&b!==ei?l(C,en.RowEntry):void 0,x=C&&b!==ei?l(C,en.Tooltip):void 0,E=_?.date||void 0,M=_?.row||void 0,I=v.isColumnFollowingGraphColumn(ts),O=v.isLastColumn(ts),z=v.getZoneWidth(ts),D=v.getVerticalScrollWidth(ts);return P.createElement(lm,{clearCurrentlyHoveredGraphCommit:a,column:w.column,columnForColoring:w.columnForColoring,context:E,currentlyHoveredCommitSha:d,dimRowsOfSelectedCommit:c,getExternalIcon:r,graphZoneType:ts,highlightRowsOnRefHover:i,isDimmedMergeCommitRow:b===et&&h,isHighlighted:v.isHighlighted(e),isHovering:v.isHovering(e),isInUnsupportedRebase:n,isLastColumn:O,isMissingHoveredRefGroup:v.isMissingHoveredRefGroup(e),isSelected:v.isSelected(e),key:S,numGraphColumns:s,onClickCommit:p,onContextMenu:u,onDoubleClickCommit:f,rowContext:M,setAsCurrentlyHoveredGraphCommit:m,sha:R,showColorStrip:I,showTimeline:!1,style:y,title:g?void 0:x,type:b,verticalScrollWidth:D,zoneWidth:z},T)}})(ep,Y),[tl]:((e,t)=>{let{processedRows:o,getExternalIcon:r,highlightRowsOnRefHover:i,isInUnsupportedRebase:n,numGraphColumns:s,clearCurrentlyHoveredGraphCommit:l,currentlyHoveredCommitSha:a,dimMergeCommits:h,dimRowsOfSelectedCommit:c,onCommitContextMenu:d,onClickCommit:u,onDoubleClickCommit:p,setAsCurrentlyHoveredGraphCommit:f,shaLength:m,suppressNonRefRowTooltips:g}=e,v=new tJ(e);return({rowIndex:e,style:y})=>{let S=t(e),w=o[e],{sha:C,type:R,contexts:b}=w,_=((e,t=tm)=>e?e.substring(0,t):"")(C,m),T=b?.sha||void 0,x=b?.row||void 0,E=v.isColumnFollowingGraphColumn(tl),M=v.isLastColumn(tl),I=v.getZoneWidth(tl),O=v.getVerticalScrollWidth(tl);return P.createElement(lm,{clearCurrentlyHoveredGraphCommit:l,column:w.column,columnForColoring:w.columnForColoring,context:T,currentlyHoveredCommitSha:a,dimRowsOfSelectedCommit:c,getExternalIcon:r,graphZoneType:tl,highlightRowsOnRefHover:i,isDimmedMergeCommitRow:R===et&&h,isHighlighted:v.isHighlighted(e),isHovering:v.isHovering(e),isInUnsupportedRebase:n,isLastColumn:M,isMissingHoveredRefGroup:v.isMissingHoveredRefGroup(e),isSelected:v.isSelected(e),key:S,numGraphColumns:s,onClickCommit:u,onContextMenu:d,onDoubleClickCommit:p,rowContext:x,setAsCurrentlyHoveredGraphCommit:f,sha:C,showColorStrip:E,showTimeline:v.hasTimeline(e),style:y,type:R,verticalScrollWidth:O,zoneWidth:I},R!==ei?P.createElement("span",{className:"font-monospace pointer",title:g?void 0:_},_):null)}})(ep,Y),[ta]:((e,t)=>{let{processedRows:o,rowStatsConstraints:r,getExternalIcon:i,highlightRowsOnRefHover:n,isInUnsupportedRebase:s,numGraphColumns:l,clearCurrentlyHoveredGraphCommit:a,currentlyHoveredCommitSha:h,dimMergeCommits:c,dimRowsOfSelectedCommit:d,onCommitContextMenu:u,onClickCommit:p,onDoubleClickCommit:f,rowsStats:m,setAsCurrentlyHoveredGraphCommit:g,suppressNonRefRowTooltips:v}=e,y=new tJ(e);return({rowIndex:e,style:S})=>{let w=t(e),C=o[e],{sha:R,type:b,contexts:_}=C,T=_?.stats||void 0,x=_?.row||void 0,E=m?.[R],M=[E?.files?`${E.files} files changed`:"",E?.additions?`${E.additions} lines added`:"",E?.deletions?`${E.deletions} lines deleted`:""].filter(Boolean).join(", ");M=b!==ei?M:"";let I=y.isColumnFollowingGraphColumn(ta),O=y.isLastColumn(ta),z=y.getZoneWidth(ta),D=y.getVerticalScrollWidth(ta);return P.createElement(lm,{clearCurrentlyHoveredGraphCommit:a,column:C.column,columnForColoring:C.columnForColoring,context:T,currentlyHoveredCommitSha:h,dimRowsOfSelectedCommit:d,getExternalIcon:i,graphZoneType:ta,highlightRowsOnRefHover:n,isDimmedMergeCommitRow:b===et&&c,isHighlighted:y.isHighlighted(e),isHovering:y.isHovering(e),isInUnsupportedRebase:s,isLastColumn:O,isMissingHoveredRefGroup:y.isMissingHoveredRefGroup(e),isSelected:y.isSelected(e),key:w,numGraphColumns:l,onClickCommit:p,onContextMenu:u,onDoubleClickCommit:f,rowContext:x,setAsCurrentlyHoveredGraphCommit:g,sha:R,showColorStrip:I,showTimeline:y.hasTimeline(e),style:S,title:v?void 0:M,type:b,verticalScrollWidth:D,zoneWidth:z},E&&b!==ei?P.createElement(ld,{constraints:r,getExternalIcon:i,isLastColumn:O,isRowSelected:y.isSelected(e),stats:E,verticalScrollWidth:D,zoneWidth:z}):null)}})(ep,Y),[tt]:((e,t)=>{let{translate:o,processedRows:r}=e,i=L()("graph-row-wrapper","grow-3","height-100","graph-zone-column","min-width-0","pb3","pointer","pt3","relative"),n=new tJ(e);return({rowIndex:e,style:s})=>{let l=t(e),a=L()("graph-row","height-100-percent","flex"),h=n.hasTimeline(e),c=r[e],d=c.contexts?.row||void 0,u=c.timeLineEntry?.label||"",p=c.timeLineEntry?.value||0,f=h?P.createElement(iI,null):null,m=h?P.createElement(iO,{message:o(u,p)}):null;return P.createElement("div",{className:i,"data-vscode-context":tM(d),key:l,style:s},f,P.createElement("div",{className:a,"data-vscode-context":tM(d)},m))}})(ep,Y)},eg=_.map((e,o)=>{let r=0===o;return P.createElement(iH,{branchUpstreamRowIndices:this.branchUpstreamRowIndices,cellRenderersByIds:em,columnIndex:o,customFooterRow:t,enabledScrollMarkerTypes:R,enableResizer:eu,getExternalIcon:this.getIconCallback,getKeyForCell:Y,graphHeight:x-ef,graphWidth:V,graphZones:_,graphZoneType:e.type,hasMoreCommits:T,horizontalScrollHeight:this.getHorizontalScrollHeight(e.type,p),isFilteredSearch:this.isFilteredSearch(),isLoadingRows:z,key:`${e.type}ColumnContainer`,markerColors:this.getMarkerColors(),markerRowIndices:this.state.markerRowIndices,onResize:this.onGraphZoneResize,onResizeEnd:this.onGraphZoneResizeEnd,onScroll:this.onScrollForZone,onScrollToRowCausedUpdate:r?this.onScrollToRowCausedUpdateForFirstColumn:void 0,onZoneEnter:t=>this.onZoneEnter(t,e.type,M,I),processedRows:N,rowCount:N.length,scrollLeft:Z,scrollToAlignment:r?F:void 0,scrollToIndex:r?B:void 0,scrollTop:U,smartCellRangeRenderer:q,stickyTimeline:this.props.stickyTimeline,translate:this.translateCallback,verticalScrollWidth:this.getVerticalScrollWidth(e.type,p)})}),ev=this.graphComponentRef?.current&&P.createElement(ll,{columnsSettings:e,dragAppendToContainer:this.graphComponentRef?.current,enableResizer:eu,enableShowHideRefsOptions:v,excludeRefsById:this.excludeRefsById,getExternalIcon:this.getIconCallback,graphZones:_,headerContext:d?.header,height:x,includeOnlyRefsById:this.includeOnlyRefsById,onColumnReOrdered:this.onGraphColumnReOrdered,onFilterColumnClick:this.onFilterColumnClick,onGraphZoneResize:this.onGraphZoneResize,onGraphZoneResizeEnd:this.onGraphZoneResizeEnd,onMouseDownCapture:this.onGraphHeaderMouseDown,onMouseMoveCapture:this.onGraphHeaderMouseMove,onMouseUpCapture:this.onGraphHeaderMouseUp,onPopupGraphHeaderContextMenu:this.onPopupGraphHeaderContextMenu,onSettingsClick:this.onSettingsClick,onToggleRefNodesShown:this.onToggleRefNodesShown,onWheel:this.onGraphHeaderWheel,repoPath:i,rowsStatsLoading:D,settingsContext:d?.settings,showRemoteNamesOnRefs:w,translate:this.translateCallback,width:V}),ey=P.createElement("div",{className:"graph-component","data-vscode-context":tM(d?.graph),onBlur:e=>this.onGraphContainerBlurred(e,M,I),onMouseEnter:this.onGraphContainerMouseEnter,onMouseLeave:this.onGraphContainerMouseLeave,ref:this.graphComponentRef,style:{height:"100%",width:"100%",position:"absolute"},tabIndex:-1},ev,P.createElement("div",{className:X(E)?L()(K,"graph-highlighted"):K,id:"graph-container",onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,onMouseDown:this.onGraphHeaderRowMouseDown,ref:this.graphContainerRef,style:{height:x,width:V},tabIndex:-1},eg,s&&P.createElement(lc,{allRows:N,getVisibleRows:this.getVisibleRows,hasVerticalScrollbar:_.length>0&&this.getVerticalScrollWidth(_[_.length-1].type,p)>0,hoveredSha:f,provider:s,selectedShas:this.selectedShas})));return this.decorateWithHelmet(ey,p,n)}}A(42),A(322),A(606),A(472),A(512),A(142);var lY=lK;export{eq as CHANGES_BAR_MIN_WIDTH,eX as CHANGES_BAR_RIGHT_MARGIN,eY as CHANGES_ZONE_MIN_WIDTH,eJ as CHANGES_ZONE_SHOW_ICON_WIDTH,eO as COMMIT_AUTHOR_ZONE_AVATAR_INNER_DIAMETER,eI as COMMIT_AUTHOR_ZONE_AVATAR_OUTER_DIAMETER,eM as COMMIT_AUTHOR_ZONE_MIN_WIDTH,ez as COMMIT_AUTHOR_ZONE_SHOW_ICON_WIDTH,eD as COMMIT_DATE_TIME_ZONE_MIN_WIDTH,eG as COMMIT_DATE_TIME_ZONE_SHOW_ICON_WIDTH,eW as COMMIT_MESSAGE_ZONE_MIN_WIDTH,eH as COMMIT_MESSAGE_ZONE_SHOW_ICON_WIDTH,eS as COMMIT_NODE_MIN_ALPHA,eN as COMMIT_SHA_ZONE_MIN_WIDTH,eA as COMMIT_SHA_ZONE_SHOW_ICON_WIDTH,ex as COMMIT_ZONE_DEFAULT_VIEWPORT_WIDTH_MIN,e_ as COMMIT_ZONE_EDGE_ARC_PADDING,eT as COMMIT_ZONE_EDGE_ARC_RADIUS,ew as COMMIT_ZONE_MARGIN_BOTTOM,eC as COMMIT_ZONE_MARGIN_TOP,eR as COMMIT_ZONE_ROW_HEIGHT,eb as COMMIT_ZONE_ROW_INNER_HEIGHT,eE as COMMIT_ZONE_SHOW_ICON_WIDTH,en as CommitDateTimeSources,eu as DEFAULT_AVATAR_BACKGROUND_COLOR,tm as DEFAULT_COMMIT_SHA_LENGTH,el as DEFAULT_CSS_VARIABLES,om as DEFAULT_TRANSLATIONS,ty as DEFAULT_WORKDIR_STATS,Y as DndComponent,ef as GRAPH_HEADER_ROW_HEIGHT,em as GRAPH_ROW_HEIGHT,eg as GRAPH_ROW_INNER_HEIGHT,ev as GRAPH_ROW_LAZY_LOAD_COMMITS_OFFSET,ey as GRAPH_ROW_PADDING,ep as GRAPH_SCROLL_MARKER_LANES,tc as GraphColumnMode,td as GraphMarkerShape,eQ as HEADER_ROW_HEIGHT,e0 as HEADER_ROW_MARGIN_BOTTOM,e2 as INLINE_SUMMARY_MARGIN_LEFT,e8 as LeftPanelToGraphMarginGap,es as NUM_COLUMNS_SUPPORTED_PROP_NAME,of as NamedKeys,e1 as OPACITY_FACTOR_BY_THEME,eZ as REF_NODE_ICON_MARGIN,ej as REF_NODE_ICON_SPACING,eU as REF_NODE_ICON_WIDTH,eV as REF_NODE_OUTER_SPACING,eF as REF_ZONE_MARGIN_LEFT,eB as REF_ZONE_MARGIN_RIGHT,eK as REF_ZONE_MAX_REFS_TO_RENDER,eP as REF_ZONE_MIN_WIDTH,e$ as REF_ZONE_SHOW_ICON_WIDTH,eL as REF_ZONE_TEXT_HEIGHT,te as ResizableHandleCorrection,la as RowAdornmentInvalidateEvent,e7 as SCROLL_TO_ALIGNMENT_AUTO,e9 as SCROLL_TO_ALIGNMENT_CENTER,t0 as ScrollbarContainer,ek as TIMESTAMP_FORMAT_DATE_TIME,e5 as TINY_FILES_READOUT_FONT_SIZE,e3 as TINY_FILES_READOUT_RIGHT_MARGIN,e6 as TINY_ICON_RIGHT_MARGIN,e4 as TINY_ICON_SIZE,tb as allMetadataTypes,ta as changesZone,tn as commitAuthorZone,ts as commitDateTimeZone,ti as commitMessageZone,Q as commitNodeType,tl as commitShaZone,tr as commitZone,lY as default,th as emptySetMarker,lo as getHostingServiceName,tS as graphCommitDescDisplayModes,tp as graphMarkerMetadata,tu as graphMarkerShapeMetadata,tg as graphZoneMetaData,tR as issueMetadataType,tv as lookbackLimitByPeriod,ee as mergeConflictNodeType,et as mergeNodeType,tf as numGraphColumnsDefault,tw as pullRequestMetadataType,ed as refIconsPositions,ec as refTypes,to as refZone,er as stashNodeType,tt as timelineMsgRowRenderId,l_ as types,eo as unsupportedRebaseWarningNodeType,tC as upstreamMetadataType,ei as workDirType};
|