@perses-dev/tracing-gantt-chart-plugin 0.6.0 → 0.6.1

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.
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkTracingGanttChart=self.webpackChunkTracingGanttChart||[]).push([["76"],{1896:function(e,t,n){n.r(t),n.d(t,{TracingGanttChart:()=>eh});var r=n(4246),i=n(8264),s=n(6372),o=n(4538),a=n(4776),l=n(5283),d=n(2709),u=n(9581),c=n(3915);let x=new c.Z({hue:{min:20,max:360}}),p=new c.Z({hue:{min:0,max:20}}),h={},m="2rem",f=e=>{var t;return(null===(t=e.status)||void 0===t?void 0:t.code)===u.np};function v(e,t,n,r){return function(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return"categorical"===n?function(e,t,n,r){let i=t?r:n;if(0===i.length)return console.warn("getConsistentCategoricalColor() called with empty color palette, fallback to #000"),"#000";let s=0;for(let t=0;t<e.length;t++)s=e.charCodeAt(t)+((s<<5)-s);return i[Math.abs(s)%i.length]??"#000"}(r,i,t.echartsTheme.color,[e.palette.error.light,e.palette.error.main,e.palette.error.dark]):function(e,t){let n=`${e}_____${t}`,r=h[n];return r||(r=function(e,t){let[n,r,i]=t?p.hsl(e):x.hsl(e),s=`${(100*r).toFixed(0)}%`,o=`${(100*i).toFixed(0)}%`;return`hsla(${n.toFixed(2)},${s},${o},0.9)`}(e,t),h[n]=r),r}(r,i)}(e,t,n,r.resource.serviceName??"",f(r))}function g(e){return e<1?`${Math.round(1e3*e)}μs`:e<1e3?`${+e.toFixed(2)}ms`:`${+(e/1e3).toFixed(2)}s`}function j(e){let{trace:t,viewport:n}=e,i=n.endTimeUnixMs-n.startTimeUnixMs,s=n.startTimeUnixMs-t.startTimeUnixMs;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b,{style:{left:"0%",borderWidth:0},children:g(s+0*i)}),(0,r.jsx)(b,{style:{left:"25%"},children:g(s+.25*i)}),(0,r.jsx)(b,{style:{left:"50%"},children:g(s+.5*i)}),(0,r.jsx)(b,{style:{left:"75%"},children:g(s+.75*i)}),(0,r.jsx)(b,{style:{left:"100%"},children:(0,r.jsx)("span",{style:{position:"absolute",right:".75rem"},children:g(s+ +i)})})]})}function M(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b,{style:{left:"25%"}}),(0,r.jsx)(b,{style:{left:"50%"}}),(0,r.jsx)(b,{style:{left:"75%"}})]})}let b=(0,d.ZP)(s.Z)(e=>{let{theme:t}=e;return{position:"absolute",height:"100%",borderLeft:`1px solid ${t.palette.divider}`,padding:".25rem"}});var T=n(5276),w=n(7469);function y(e){var t,n;let{options:l,trace:d,viewport:u,setViewport:c}=e,x=(0,a.Z)(),p=(0,i.useChartsTheme)(),{width:h,ref:m}=(0,T.Z)(),f=(0,o.useRef)(null),[g,j]=(0,o.useState)({type:"none"}),b=d.endTimeUnixMs-d.startTimeUnixMs,y=(u.startTimeUnixMs-d.startTimeUnixMs)/b,k=(d.endTimeUnixMs-u.endTimeUnixMs)/b,C=(0,o.useCallback)(e=>{var t,n;return v(x,p,null===(n=l.visual)||void 0===n?void 0:null===(t=n.palette)||void 0===t?void 0:t.mode,e)},[x,p,null===(n=l.visual)||void 0===n?void 0:null===(t=n.palette)||void 0===t?void 0:t.mode]);(0,o.useEffect)(()=>{if(!f.current||!h)return;let e=f.current.getContext("2d");e&&function(e,t,n,r,i){let s=r.rootSpans.map(function e(t){let n=1;for(let r of t.childSpans)n+=e(r);return n}).reduce((e,t)=>e+t,0),o=Math.round(Math.min(Math.max(60/s,1),7)),a=r.endTimeUnixMs-r.startTimeUnixMs,l=60/s,d=0,u=n=>{let s=n.endTimeUnixMs-n.startTimeUnixMs,c=(n.startTimeUnixMs-r.startTimeUnixMs)/a;for(let r of(e.fillStyle=i(n),e.beginPath(),e.rect(Math.round(c*t),Math.round(d),Math.max(2,Math.round(s/a*t)),o),e.fill(),d+=l,n.childSpans))u(r)};for(let e of r.rootSpans)u(e)}(e,h,60,d,C)},[h,60,d,C]);let S=e=>{if(!f.current||!h)return 0;let t=e.clientX-f.current.getBoundingClientRect().left;return d.startTimeUnixMs+t/h*b},$=(0,w.z)(e=>{switch(e.preventDefault(),g.type){case"none":return;case"resize":{let t,n;let r=g.fixedPoint,i=S(e);r<i?(t=r,n=i):(t=i,n=r),c({startTimeUnixMs:Math.max(t,d.startTimeUnixMs),endTimeUnixMs:Math.min(n,d.endTimeUnixMs)});return}case"drag":{let{start:t,end:n}=g,r=S(e);r-t<d.startTimeUnixMs&&(r=d.startTimeUnixMs+t),r+n>d.endTimeUnixMs&&(r=d.endTimeUnixMs-n),c({startTimeUnixMs:r-t,endTimeUnixMs:r+n});return}}}),I=(0,w.z)(e=>{e.preventDefault(),j({type:"none"}),u.startTimeUnixMs===u.endTimeUnixMs&&c({startTimeUnixMs:d.startTimeUnixMs,endTimeUnixMs:d.endTimeUnixMs})});return(0,o.useEffect)(()=>{function e(){window.removeEventListener("mousemove",$),window.removeEventListener("mouseup",I),document.body.style.cursor="inherit"}return"none"===g.type?e():(window.addEventListener("mousemove",$),window.addEventListener("mouseup",I),document.body.style.cursor="resize"===g.type?"col-resize":"move"),e},[g,$,I]),(0,r.jsxs)(s.Z,{ref:m,sx:{position:"relative",height:60},onMouseDown:e=>{if(e.preventDefault(),!(e.target instanceof HTMLElement))return;let t=u.startTimeUnixMs===d.startTimeUnixMs&&u.endTimeUnixMs===d.endTimeUnixMs,n=e.target.dataset.elem,r=S(e);"resizerLeft"===n?j({type:"resize",fixedPoint:u.endTimeUnixMs}):"resizerRight"===n?j({type:"resize",fixedPoint:u.startTimeUnixMs}):"cutoffBox"===n||t?(j({type:"resize",fixedPoint:r}),c({startTimeUnixMs:r,endTimeUnixMs:r})):j({type:"drag",start:r-u.startTimeUnixMs,end:u.endTimeUnixMs-r})},children:[(0,r.jsx)("canvas",{ref:f,width:h,height:60,style:{position:"absolute"}}),(0,r.jsx)(M,{}),(0,r.jsx)(U,{"data-elem":"cutoffBox",style:{left:0,width:`${100*y}%`}}),(0,r.jsx)(Z,{"data-elem":"resizerLeft",style:{left:`${100*y}%`}}),(0,r.jsx)(Z,{"data-elem":"resizerRight",style:{right:`${100*k}%`}}),(0,r.jsx)(U,{"data-elem":"cutoffBox",style:{right:0,width:`${100*k}%`}})]})}let U=(0,d.ZP)(s.Z)({position:"absolute",height:"100%",backgroundColor:"rgba(225, 225, 225, .5)"}),Z=(0,d.ZP)(s.Z)(e=>{let{theme:t}=e;return{position:"absolute",height:"100%",backgroundColor:t.palette.divider,width:"2px",cursor:"col-resize","&:before":{position:"absolute",width:"8px",left:"-3px",top:0,bottom:0,content:'" "',zIndex:1}}});function k(e){let{options:t,trace:n,viewport:i,setViewport:o}=e,l=(0,a.Z)();return(0,r.jsxs)(s.Z,{sx:{border:`1px solid ${l.palette.divider}`,borderRadius:`${l.shape.borderRadius}px`},children:[(0,r.jsx)(s.Z,{sx:{position:"relative",height:m,borderBottom:`1px solid ${l.palette.divider}`},children:(0,r.jsx)(j,{trace:n,viewport:{startTimeUnixMs:n.startTimeUnixMs,endTimeUnixMs:n.endTimeUnixMs}})}),(0,r.jsx)(y,{options:t,trace:n,viewport:i,setViewport:o})]})}var C=n(5094),S=n(2054),$=n(1781),I=n(9408),z=n(9119),E=n(763),P=n(1852),L=n(886),R=n(2259),B=n(2577),V=n(7430);function F(e){let{attributeLinks:t,attributes:n}=e,i=(0,o.useMemo)(()=>Object.fromEntries(n.map(e=>[e.key,e.value])),[n]);return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(P.Z,{children:n.sort((e,t)=>e.key.localeCompare(t.key)).map((e,n)=>{var s;return(0,r.jsx)(D,{attribute:e,linkTo:null==t?void 0:null===(s=t[e.key])||void 0===s?void 0:s.call(t,i)},n)})})})}function D(e){let{attribute:t,linkTo:n}=e,i=n?(0,r.jsx)(L.Z,{component:V.Link,to:n,children:G(t.value)}):G(t.value);return(0,r.jsx)(R.ZP,{disablePadding:!0,children:(0,r.jsx)(B.Z,{primary:t.key,secondary:i,primaryTypographyProps:{variant:"h5"},secondaryTypographyProps:{variant:"body1",sx:{wordBreak:"break-word"}}})})}function G(e){return"stringValue"in e?e.stringValue.length>0?e.stringValue:"<empty string>":"intValue"in e?e.intValue:"boolValue"in e?e.boolValue.toString():"arrayValue"in e?e.arrayValue.values.map(G).join(", "):"unknown"}var N=n(1357),O=n(6656),A=n(5474),W=n(2449);function _(e){let{trace:t,span:n}=e;return(0,r.jsx)(r.Fragment,{children:n.events.sort((e,t)=>e.timeUnixMs-t.timeUnixMs).map((e,n)=>(0,r.jsx)(X,{trace:t,event:e},n))})}function X(e){let{trace:t,event:n}=e,i=n.timeUnixMs-t.startTimeUnixMs;return(0,r.jsxs)(N.Z,{disableGutters:!0,children:[(0,r.jsx)(O.Z,{expandIcon:(0,r.jsx)(W.default,{}),children:(0,r.jsx)(S.Z,{children:g(i)})}),(0,r.jsxs)(A.Z,{children:[(0,r.jsx)(S.Z,{variant:"subtitle1",children:n.name}),(0,r.jsx)(F,{attributes:n.attributes})]})]})}function H(e){let{attributeLinks:t,trace:n,span:i,onCloseBtnClick:a}=e,[l,d]=(0,o.useState)("attributes");return"events"===l&&0===i.events.length&&d("attributes"),(0,r.jsxs)(s.Z,{children:[(0,r.jsx)(C.Z,{sx:{float:"right"},onClick:a,children:(0,r.jsx)(E.default,{})}),(0,r.jsx)(S.Z,{sx:{wordBreak:"break-word"},children:i.resource.serviceName}),(0,r.jsx)(S.Z,{variant:"h2",sx:{wordBreak:"break-word"},children:i.name}),(0,r.jsx)(s.Z,{sx:{borderBottom:1,borderColor:"divider"},children:(0,r.jsxs)($.Z,{value:l,onChange:(e,t)=>d(t),children:[(0,r.jsx)(I.Z,{sx:{p:0},value:"attributes",label:"Attributes"}),i.events.length>0&&(0,r.jsx)(I.Z,{value:"events",label:"Events"})]})}),"attributes"===l&&(0,r.jsxs)(r.Fragment,{children:[i.attributes.length>0&&(0,r.jsx)(F,{attributeLinks:t,attributes:i.attributes}),i.attributes.length>0&&(0,r.jsx)(z.Z,{}),(0,r.jsx)(F,{attributeLinks:t,attributes:i.resource.attributes})]}),"events"===l&&(0,r.jsx)(_,{trace:n,span:i})]})}var Q=n(3675);let Y=(0,o.createContext)(void 0);function q(e){let{children:t}=e,[n,i]=(0,o.useState)([]),[s,a]=(0,o.useState)([]),[l,d]=(0,o.useState)(void 0);return(0,r.jsx)(Y.Provider,{value:{collapsedSpans:n,setCollapsedSpans:i,visibleSpans:s,setVisibleSpans:a,hoveredParent:l,setHoveredParent:d},children:t})}function J(){let e=(0,o.useContext)(Y);if(void 0===e)throw Error("No GanttTableContext found. Did you forget a Provider?");return e}var K=n(4944),ee=n(4974);function et(e){let{span:t}=e,{collapsedSpans:n,setCollapsedSpans:i,visibleSpans:s,hoveredParent:l,setHoveredParent:d}=J(),u=(0,a.Z)(),c=(0,o.useCallback)(e=>{e.stopPropagation(),n.includes(t.spanId)?i(n.filter(e=>e!==t.spanId)):i([...n,t.spanId])},[t,n,i]),x=(0,o.useCallback)(()=>{d(t.spanId)},[t,d]),p=[t],h=t.parentSpan;for(;h;)p.unshift(h),h=h.parentSpan;return(0,r.jsx)(r.Fragment,{children:p.map((e,t)=>(0,r.jsx)(en,{style:{width:t===p.length-1||0===s.length||s.includes(e.spanId)?24:8,borderLeft:`${l===(e.parentSpanId??"")?3:1}px solid ${u.palette.divider}`},onMouseEnter:()=>d(e.parentSpanId??""),onMouseLeave:()=>d(void 0),children:t===p.length-1&&e.childSpans.length>0&&(n.includes(e.spanId)?(0,r.jsx)(ee.default,{titleAccess:"expand",onClick:c,onMouseEnter:x}):(0,r.jsx)(W.default,{titleAccess:"collapse",onClick:c,onMouseEnter:x}))},e.spanId))})}let en=(0,d.ZP)("div")({display:"flex",height:"100%",alignItems:"center",justifyContent:"flex-end",flexShrink:0,transition:"width 1s"});function er(e){let{span:t,nameColumnWidth:n}=e;return(0,r.jsxs)(l.Z,{direction:"row",sx:{alignItems:"center"},style:{width:`${100*n}%`},children:[(0,r.jsx)(et,{span:t}),f(t)&&(0,r.jsx)(K.default,{titleAccess:"error",color:"error",sx:{marginRight:"5px"}}),(0,r.jsxs)(s.Z,{sx:{whiteSpace:"nowrap",overflow:"hidden"},children:[(0,r.jsxs)("strong",{children:[t.resource.serviceName,":"]})," ",t.name]})]})}function ei(e){var t,n;let{options:o,span:l,viewport:d}=e,u=(0,a.Z)(),c=(0,i.useChartsTheme)(),x=l.endTimeUnixMs-l.startTimeUnixMs,p=d.endTimeUnixMs-d.startTimeUnixMs,h=x/p,m=(l.startTimeUnixMs-d.startTimeUnixMs)/p;return(0,r.jsxs)(s.Z,{sx:{position:"relative",height:"100%",flexGrow:1,overflow:"hidden"},children:[(0,r.jsx)(M,{}),(0,r.jsx)(s.Z,{"data-testid":"span-duration-bar",sx:{position:"absolute",top:0,bottom:0,margin:"auto",minWidth:"2px",height:"8px",borderRadius:u.shape.borderRadius},style:{left:`${100*m}%`,width:`${100*h}%`,backgroundColor:v(u,c,null===(n=o.visual)||void 0===n?void 0:null===(t=n.palette)||void 0===t?void 0:t.mode,l)}}),(0,r.jsx)(s.Z,{sx:{position:"absolute",top:"50%",transform:"translateY(-50%)",padding:"0 8px",color:u.palette.grey[700],fontSize:".7rem"},style:m+h<.95?{left:`${(m+h)*100}%`}:{left:`${100*m}%`,transform:"translateY(-50%) translateX(-100%)"},children:g(x)})]})}let es=(0,o.memo)(function(e){let{options:t,span:n,viewport:i,selected:s,nameColumnWidth:o,divider:l,onClick:d}=e,u=(0,a.Z)();return(0,r.jsxs)(eo,{sx:{backgroundColor:s?u.palette.action.selected:"inherit"},direction:"row",onClick:()=>{var e;(null===(e=document.getSelection())||void 0===e?void 0:e.type)!=="Range"&&d(n)},children:[(0,r.jsx)(er,{span:n,nameColumnWidth:o}),l,(0,r.jsx)(ei,{options:t,span:n,viewport:i})]})}),eo=(0,d.ZP)(l.Z)(e=>{let{theme:t}=e;return{height:m,"&:hover":{backgroundColor:t.palette.action.hover,borderTop:`1px solid ${t.palette.divider}`,borderBottom:`1px solid ${t.palette.divider}`}}});function ea(e){let{trace:t,viewport:n,nameColumnWidth:i,divider:o}=e,d=(0,a.Z)();return(0,r.jsxs)(l.Z,{direction:"row",alignItems:"center",sx:{height:m,fontSize:"0.9rem",borderBottom:`1px solid ${d.palette.divider}`},children:[(0,r.jsx)(s.Z,{style:{width:`${100*i}%`},children:(0,r.jsx)("span",{style:{padding:".25rem"},children:"Service & Operation"})}),o,(0,r.jsx)(s.Z,{sx:{position:"relative",height:"100%",flexGrow:1},children:(0,r.jsx)(j,{trace:t,viewport:n})})]})}function el(e){let{parentRef:t,spacing:n=0,onMove:i}=e,[s,a]=(0,o.useState)(!1),l=(0,w.z)(e=>{if(!t.current)return;let r=(e.clientX-t.current.getBoundingClientRect().left+n)/t.current.getBoundingClientRect().width;.05<=r&&r<=.95&&i(r)}),d=(0,w.z)(()=>{a(!1)});return(0,o.useEffect)(()=>{function e(){window.removeEventListener("mousemove",l),window.removeEventListener("mouseup",d),document.body.style.cursor="inherit"}return s?(window.addEventListener("mousemove",l),window.addEventListener("mouseup",d),document.body.style.cursor="col-resize"):e(),e},[s,l,d]),(0,r.jsx)(ed,{onMouseDown:e=>{e.preventDefault(),a(!0)},onClick:e=>e.stopPropagation()})}let ed=(0,d.ZP)(s.Z)(e=>{let{theme:t}=e;return{position:"relative",width:"1px",height:"100%",backgroundColor:t.palette.divider,cursor:"col-resize","&:before":{position:"absolute",width:"7px",left:"-3px",top:0,bottom:0,content:'" "',zIndex:1}}});function eu(e){let{options:t,trace:n,viewport:i,selectedSpan:l,onSpanClick:d}=e,{collapsedSpans:u,setVisibleSpans:c}=J(),[x,p]=(0,o.useState)(.25),h=(0,o.useRef)(null),m=(0,a.Z)(),f=(0,o.useMemo)(()=>{let e=[];for(let t of n.rootSpans)!function e(t,n,r){if(t.push(n),!r.includes(n.spanId))for(let i of n.childSpans)e(t,i,r)}(e,t,u);return e},[n.rootSpans,u]),v=(0,r.jsx)(el,{parentRef:h,onMove:p});return(0,r.jsxs)(s.Z,{ref:h,sx:{display:"flex",flexDirection:"column",flexGrow:1,border:`1px solid ${m.palette.divider}`,borderRadius:`${m.shape.borderRadius}px`},children:[(0,r.jsx)(ea,{trace:n,viewport:i,nameColumnWidth:x,divider:v}),(0,r.jsx)(Q.OO,{data:f,itemContent:(e,n)=>(0,r.jsx)(es,{options:t,span:n,viewport:i,selected:n===l,nameColumnWidth:x,divider:v,onClick:d}),rangeChanged:function(e){let{startIndex:t,endIndex:n}=e,r=[];for(let e=t;e<=n;e++)r.push(f[e].spanId);c(r)}})]})}var ec=n(3098);function ex(e){return{timeUnixMs:1e-6*parseInt(e.timeUnixNano),name:e.name,attributes:e.attributes??[]}}function ep(e){let{options:t,attributeLinks:n,trace:i}=e,d=(0,a.Z)(),u=(0,o.useMemo)(()=>{try{return function(e){let t=new Map,n=[],r=0,i=0;for(let n of e.resourceSpans){let e=function(e){let t="unknown";for(let n of(null==e?void 0:e.attributes)??[])if("service.name"===n.key&&"stringValue"in n.value){t=n.value.stringValue;break}return{serviceName:t,attributes:(null==e?void 0:e.attributes)??[]}}(n.resource);for(let o of n.scopeSpans){let n=o.scope??{};for(let a of o.spans){var s;let o={resource:e,scope:n,childSpans:[],traceId:(s=a).traceId,spanId:s.spanId,parentSpanId:s.parentSpanId,name:s.name,kind:s.kind,startTimeUnixMs:1e-6*parseInt(s.startTimeUnixNano),endTimeUnixMs:1e-6*parseInt(s.endTimeUnixNano),attributes:s.attributes??[],events:(s.events??[]).map(ex),status:s.status??{}};t.set(a.spanId,o),(0===r||o.startTimeUnixMs<r)&&(r=o.startTimeUnixMs),(0===i||o.endTimeUnixMs>i)&&(i=o.endTimeUnixMs)}}}for(let[,e]of t){if(!e.parentSpanId){n.push(e);continue}let r=t.get(e.parentSpanId);if(!r){console.trace(`span ${e.spanId} has parent ${e.parentSpanId} which has not been received yet`),n.push(e);continue}e.parentSpan=r;let i=(0,ec.sortedIndexBy)(r.childSpans,e,e=>e.startTimeUnixMs);r.childSpans.splice(i,0,e)}return{trace:e,rootSpans:n,startTimeUnixMs:r,endTimeUnixMs:i}}(i)}catch(e){throw Error(`Error: unable to parse trace: ${e}`)}},[i]),[c,x]=(0,o.useState)({startTimeUnixMs:u.startTimeUnixMs,endTimeUnixMs:u.endTimeUnixMs}),[p,h]=(0,o.useState)(void 0),m=(0,o.useRef)(null),[f,v]=(0,o.useState)(.82);return(0,r.jsxs)(l.Z,{ref:m,direction:"row",sx:{height:"100%",minHeight:"240px",gap:2},children:[(0,r.jsxs)(l.Z,{sx:{flexGrow:1,gap:2},children:[(0,r.jsx)(k,{options:t,trace:u,viewport:c,setViewport:x}),(0,r.jsx)(q,{children:(0,r.jsx)(eu,{options:t,trace:u,viewport:c,selectedSpan:p,onSpanClick:h})})]}),p&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(el,{parentRef:m,spacing:parseInt(d.spacing(2)),onMove:v}),(0,r.jsx)(s.Z,{sx:{width:`${(1-f)*100}%`,overflow:"auto"},children:(0,r.jsx)(H,{attributeLinks:n,trace:u,span:p,onCloseBtnClick:()=>h(void 0)})})]})]})}let eh={PanelComponent:function(e){var t;let{spec:n,queryResults:o,attributeLinks:a}=e,l=(0,i.useChartsTheme)().container.padding.default;if(o.length>1)return(0,r.jsx)(i.TextOverlay,{message:"This panel does not support more than one query."});let d=null===(t=o[0])||void 0===t?void 0:t.data.trace;return d?(0,r.jsx)(s.Z,{sx:{height:"100%",padding:`${l}px`},children:(0,r.jsx)(ep,{options:n,attributeLinks:a,trace:d})}):(0,r.jsx)(i.NoDataOverlay,{resource:"trace"})},supportedQueryTypes:["TraceQuery"],createInitialOptions:function(){return{}}}}}]);
@@ -0,0 +1 @@
1
+ (()=>{var e={5311:function(e,r,t){Promise.all([t.e("677"),t.e("179"),t.e("620")]).then(t.bind(t,9161))}},r={};function t(n){var o=r[n];if(void 0!==o)return o.exports;var a=r[n]={id:n,loaded:!1,exports:{}};return e[n].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}t.m=e,t.c=r,t.federation||(t.federation={chunkMatcher:function(e){return!/^(1(57|61|79)|494|677|759|946)$/.test(e)}}),t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.d=(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.f={},t.e=e=>Promise.all(Object.keys(t.f).reduce((r,n)=>(t.f[n](e,r),r),[])),t.u=e=>"__mf/js/async/"+e+"."+({156:"5a401ecb",173:"6314a363",377:"59c252c4",620:"1d1ce390",644:"1dfea83f",651:"3ea371e5",694:"4580ad20",740:"babbb403",75:"d81e6bbf",770:"5431adef",783:"3c2c57f6",960:"478a8f11",964:"a98cab40",981:"bc5132f8"})[e]+".js",t.miniCssF=e=>"__mf/css/async/"+e+".6c6463ea.css",t.h=()=>"e530d6475305d57f",(()=>{t.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})()})(),t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),(()=>{var e={},r="TracingGanttChart:";t.l=function(n,o,a,i){if(e[n]){e[n].push(o);return}if(void 0!==a)for(var s,l,c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var u=c[d];if(u.getAttribute("src")==n||u.getAttribute("data-webpack")==r+a){s=u;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,t.nc&&s.setAttribute("nonce",t.nc),s.setAttribute("data-webpack",r+a),s.src=n),e[n]=[o];var f=function(r,t){s.onerror=s.onload=null,clearTimeout(h);var o=e[n];if(delete e[n],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach(function(e){return e(t)}),r)return r(t)},h=setTimeout(f.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=f.bind(null,s.onerror),s.onload=f.bind(null,s.onload),l&&document.head.appendChild(s)}})(),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),t.nc=void 0,(()=>{var e=[];t.O=(r,n,o,a)=>{if(n){a=a||0;for(var i=e.length;i>0&&e[i-1][2]>a;i--)e[i]=e[i-1];e[i]=[n,o,a];return}for(var s=1/0,i=0;i<e.length;i++){for(var[n,o,a]=e[i],l=!0,c=0;c<n.length;c++)(!1&a||s>=a)&&Object.keys(t.O).every(e=>t.O[e](n[c]))?n.splice(c--,1):(l=!1,a<s&&(s=a));if(l){e.splice(i--,1);var d=o();void 0!==d&&(r=d)}}return r}})(),t.p="/plugins/TracingGanttChart/",t.rv=()=>"1.2.8",t.j="909",t.S={},t.initializeSharingData={scopeToSharingDataMapping:{default:[{name:"@emotion/react",version:"11.14.0",factory:()=>Promise.all([t.e("960"),t.e("677"),t.e("651")]).then(()=>()=>t(6434)),eager:0,singleton:1,requiredVersion:"^11.11.3"},{name:"@emotion/styled",version:"11.14.0",factory:()=>Promise.all([t.e("677"),t.e("157"),t.e("770")]).then(()=>()=>t(1958)),eager:0,singleton:1},{name:"@perses-dev/components",version:"0.51.0-rc.0",factory:()=>Promise.all([t.e("156"),t.e("644"),t.e("783"),t.e("677"),t.e("179"),t.e("157"),t.e("161"),t.e("946"),t.e("759")]).then(()=>()=>t(933)),eager:0,singleton:1},{name:"date-fns",version:"4.1.0",factory:()=>Promise.all([t.e("156"),t.e("75")]).then(()=>()=>t(9657)),eager:0,singleton:1},{name:"lodash",version:"4.17.21",factory:()=>t.e("981").then(()=>()=>t(8784)),eager:0,singleton:1},{name:"react-dom",version:"18.3.1",factory:()=>Promise.all([t.e("173"),t.e("677")]).then(()=>()=>t(2652)),eager:0,singleton:1,requiredVersion:"18.2.0"},{name:"react-router-dom",version:"6.30.0",factory:()=>Promise.all([t.e("377"),t.e("677"),t.e("179")]).then(()=>()=>t(5895)),eager:0,singleton:1},{name:"react",version:"18.3.1",factory:()=>t.e("964").then(()=>()=>t(7378)),eager:0,singleton:1,requiredVersion:"18.2.0"}]},uniqueName:"TracingGanttChart"},t.I=t.I||function(){throw Error("should have __webpack_require__.I")},t.consumesLoadingData={chunkMapping:{161:["4665","461"],494:["7871"],946:["5913"],179:["6085"],157:["2116"],677:["4538"]},moduleIdToConsumeDataMapping:{461:{shareScope:"default",shareKey:"date-fns",import:"date-fns",requiredVersion:"^4.1.0",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>t.e("75").then(()=>()=>t(9657))},5913:{shareScope:"default",shareKey:"@emotion/styled",import:"@emotion/styled",requiredVersion:"^11.3.0",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>t.e("694").then(()=>()=>t(1958))},4538:{shareScope:"default",shareKey:"react",import:"react",requiredVersion:"18.2.0",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>t.e("964").then(()=>()=>t(7378))},4665:{shareScope:"default",shareKey:"date-fns-tz",import:"date-fns-tz",requiredVersion:"^3.2.0",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([t.e("740"),t.e("494")]).then(()=>()=>t(8872))},7871:{shareScope:"default",shareKey:"date-fns",import:"date-fns",requiredVersion:"^3.0.0 || ^4.0.0",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>t.e("75").then(()=>()=>t(9657))},6085:{shareScope:"default",shareKey:"react-dom",import:"react-dom",requiredVersion:"18.2.0",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>t.e("173").then(()=>()=>t(2652))},2116:{shareScope:"default",shareKey:"@emotion/react",import:"@emotion/react",requiredVersion:"^11.11.3",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>t.e("960").then(()=>()=>t(6434))}},initialConsumes:[]},t.f.consumes=t.f.consumes||function(){throw Error("should have __webpack_require__.f.consumes")},(()=>{if("undefined"!=typeof document){var e=function(e,r,n,o,a){var i=document.createElement("link");return i.rel="stylesheet",i.type="text/css",t.nc&&(i.nonce=t.nc),i.onerror=i.onload=function(t){if(i.onerror=i.onload=null,"load"===t.type)o();else{var n=t&&("load"===t.type?"missing":t.type),s=t&&t.target&&t.target.href||r,l=Error("Loading CSS chunk "+e+" failed.\\n("+s+")");l.code="CSS_CHUNK_LOAD_FAILED",l.type=n,l.request=s,i.parentNode&&i.parentNode.removeChild(i),a(l)}},i.href=r,n?n.parentNode.insertBefore(i,n.nextSibling):document.head.appendChild(i),i},r=function(e,r){for(var t=document.getElementsByTagName("link"),n=0;n<t.length;n++){var o=t[n],a=o.getAttribute("data-href")||o.getAttribute("href");if("stylesheet"===o.rel&&(a===e||a===r))return o}for(var i=document.getElementsByTagName("style"),n=0;n<i.length;n++){var o=i[n],a=o.getAttribute("data-href");if(a===e||a===r)return o}},n={909:0};t.f.miniCss=function(o,a){if(n[o])a.push(n[o]);else if(0!==n[o]&&({759:1})[o])a.push(n[o]=new Promise(function(n,a){var i=t.miniCssF(o),s=t.p+i;if(r(i,s))return n();e(o,s,null,n,a)}).then(function(){n[o]=0},function(e){throw delete n[o],e}))}}})(),(()=>{var e={909:0};t.f.j=function(r,n){var o=t.o(e,r)?e[r]:void 0;if(0!==o){if(o)n.push(o[2]);else if(/^(1(57|61|79)|494|677|759|946)$/.test(r))e[r]=0;else{var a=new Promise((t,n)=>o=e[r]=[t,n]);n.push(o[2]=a);var i=t.p+t.u(r),s=Error();t.l(i,function(n){if(t.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var a=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;s.message="Loading chunk "+r+" failed.\n("+a+": "+i+")",s.name="ChunkLoadError",s.type=a,s.request=i,o[1](s)}},"chunk-"+r,r)}}},t.O.j=r=>0===e[r];var r=(r,n)=>{var o,a,[i,s,l]=n,c=0;if(i.some(r=>0!==e[r])){for(o in s)t.o(s,o)&&(t.m[o]=s[o]);if(l)var d=l(t)}for(r&&r(n);c<i.length;c++)a=i[c],t.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return t.O(d)},n=self.webpackChunkTracingGanttChart=self.webpackChunkTracingGanttChart||[];n.forEach(r.bind(null,0)),n.push=r.bind(null,n.push.bind(n))})(),t.ruid="bundler=rspack@1.2.8",t.O(void 0,["788"],function(){return t(2429)});var n=t.O(void 0,["788"],function(){return t(5311)});n=t.O(n)})();
package/mf-manifest.json CHANGED
@@ -5,11 +5,11 @@
5
5
  "name": "TracingGanttChart",
6
6
  "type": "app",
7
7
  "buildInfo": {
8
- "buildVersion": "0.6.0",
8
+ "buildVersion": "0.6.1",
9
9
  "buildName": "@perses-dev/tracing-gantt-chart-plugin"
10
10
  },
11
11
  "remoteEntry": {
12
- "name": "__mf/js/TracingGanttChart.1a922a19.js",
12
+ "name": "__mf/js/TracingGanttChart.7010d1d5.js",
13
13
  "path": "",
14
14
  "type": "global"
15
15
  },
@@ -72,9 +72,9 @@
72
72
  {
73
73
  "id": "TracingGanttChart:@perses-dev/components",
74
74
  "name": "@perses-dev/components",
75
- "version": "0.0.0-snapshot-histogram-types-78c5104",
75
+ "version": "0.51.0-rc.0",
76
76
  "singleton": true,
77
- "requiredVersion": "^0.0.0-snapshot-histogram-types-78c5104",
77
+ "requiredVersion": "^0.51.0-rc.0",
78
78
  "assets": {
79
79
  "js": {
80
80
  "async": [
@@ -86,7 +86,7 @@
86
86
  "__mf/js/async/75.d81e6bbf.js"
87
87
  ],
88
88
  "sync": [
89
- "__mf/js/async/844.556cc34d.js"
89
+ "__mf/js/async/644.1dfea83f.js"
90
90
  ]
91
91
  },
92
92
  "css": {
@@ -154,6 +154,28 @@
154
154
  }
155
155
  }
156
156
  },
157
+ {
158
+ "id": "TracingGanttChart:react-router-dom",
159
+ "name": "react-router-dom",
160
+ "version": "6.30.0",
161
+ "singleton": true,
162
+ "requiredVersion": "^6.30.0",
163
+ "assets": {
164
+ "js": {
165
+ "async": [
166
+ "__mf/js/async/964.a98cab40.js",
167
+ "__mf/js/async/173.6314a363.js"
168
+ ],
169
+ "sync": [
170
+ "__mf/js/async/377.59c252c4.js"
171
+ ]
172
+ },
173
+ "css": {
174
+ "async": [],
175
+ "sync": []
176
+ }
177
+ }
178
+ },
157
179
  {
158
180
  "id": "TracingGanttChart:react",
159
181
  "name": "react",
@@ -203,10 +225,9 @@
203
225
  "assets": {
204
226
  "js": {
205
227
  "sync": [
206
- "__mf/js/async/lib-router.36c0d526.js",
207
228
  "__mf/js/async/783.3c2c57f6.js",
208
- "__mf/js/async/928.096f73eb.js",
209
- "__mf/js/async/__federation_expose_TracingGanttChart.5ab86c44.js"
229
+ "__mf/js/async/511.b81ea373.js",
230
+ "__mf/js/async/__federation_expose_TracingGanttChart.c32313ba.js"
210
231
  ],
211
232
  "async": [
212
233
  "__mf/js/async/964.a98cab40.js",
@@ -214,9 +235,10 @@
214
235
  "__mf/js/async/960.478a8f11.js",
215
236
  "__mf/js/async/694.4580ad20.js",
216
237
  "__mf/js/async/156.5a401ecb.js",
217
- "__mf/js/async/844.556cc34d.js",
238
+ "__mf/js/async/644.1dfea83f.js",
218
239
  "__mf/js/async/740.babbb403.js",
219
240
  "__mf/js/async/75.d81e6bbf.js",
241
+ "__mf/js/async/377.59c252c4.js",
220
242
  "__mf/js/async/981.bc5132f8.js"
221
243
  ]
222
244
  },
package/mf-stats.json CHANGED
@@ -5,11 +5,11 @@
5
5
  "name": "TracingGanttChart",
6
6
  "type": "app",
7
7
  "buildInfo": {
8
- "buildVersion": "0.6.0",
8
+ "buildVersion": "0.6.1",
9
9
  "buildName": "@perses-dev/tracing-gantt-chart-plugin"
10
10
  },
11
11
  "remoteEntry": {
12
- "name": "__mf/js/TracingGanttChart.1a922a19.js",
12
+ "name": "__mf/js/TracingGanttChart.7010d1d5.js",
13
13
  "path": "",
14
14
  "type": "global"
15
15
  },
@@ -77,10 +77,10 @@
77
77
  },
78
78
  {
79
79
  "singleton": true,
80
- "requiredVersion": "^0.0.0-snapshot-histogram-types-78c5104",
80
+ "requiredVersion": "^0.51.0-rc.0",
81
81
  "shareScope": "default",
82
82
  "name": "@perses-dev/components",
83
- "version": "0.0.0-snapshot-histogram-types-78c5104",
83
+ "version": "0.51.0-rc.0",
84
84
  "eager": false,
85
85
  "id": "TracingGanttChart:@perses-dev/components",
86
86
  "assets": {
@@ -94,7 +94,7 @@
94
94
  "__mf/js/async/75.d81e6bbf.js"
95
95
  ],
96
96
  "sync": [
97
- "__mf/js/async/844.556cc34d.js"
97
+ "__mf/js/async/644.1dfea83f.js"
98
98
  ]
99
99
  },
100
100
  "css": {
@@ -176,6 +176,33 @@
176
176
  },
177
177
  "usedIn": []
178
178
  },
179
+ {
180
+ "singleton": true,
181
+ "requiredVersion": "^6.30.0",
182
+ "shareScope": "default",
183
+ "name": "react-router-dom",
184
+ "version": "6.30.0",
185
+ "eager": false,
186
+ "id": "TracingGanttChart:react-router-dom",
187
+ "assets": {
188
+ "js": {
189
+ "async": [
190
+ "__mf/js/async/964.a98cab40.js",
191
+ "__mf/js/async/173.6314a363.js"
192
+ ],
193
+ "sync": [
194
+ "__mf/js/async/377.59c252c4.js"
195
+ ]
196
+ },
197
+ "css": {
198
+ "async": [],
199
+ "sync": []
200
+ }
201
+ },
202
+ "usedIn": [
203
+ "./TracingGanttChart"
204
+ ]
205
+ },
179
206
  {
180
207
  "singleton": true,
181
208
  "requiredVersion": "18.2.0",
@@ -234,16 +261,16 @@
234
261
  "requires": [
235
262
  "react",
236
263
  "@perses-dev/components",
237
- "lodash"
264
+ "lodash",
265
+ "react-router-dom"
238
266
  ],
239
267
  "file": "src/TracingGanttChart.ts",
240
268
  "assets": {
241
269
  "js": {
242
270
  "sync": [
243
- "__mf/js/async/lib-router.36c0d526.js",
244
271
  "__mf/js/async/783.3c2c57f6.js",
245
- "__mf/js/async/928.096f73eb.js",
246
- "__mf/js/async/__federation_expose_TracingGanttChart.5ab86c44.js"
272
+ "__mf/js/async/511.b81ea373.js",
273
+ "__mf/js/async/__federation_expose_TracingGanttChart.c32313ba.js"
247
274
  ],
248
275
  "async": [
249
276
  "__mf/js/async/964.a98cab40.js",
@@ -251,9 +278,10 @@
251
278
  "__mf/js/async/960.478a8f11.js",
252
279
  "__mf/js/async/694.4580ad20.js",
253
280
  "__mf/js/async/156.5a401ecb.js",
254
- "__mf/js/async/844.556cc34d.js",
281
+ "__mf/js/async/644.1dfea83f.js",
255
282
  "__mf/js/async/740.babbb403.js",
256
283
  "__mf/js/async/75.d81e6bbf.js",
284
+ "__mf/js/async/377.59c252c4.js",
257
285
  "__mf/js/async/981.bc5132f8.js"
258
286
  ]
259
287
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@perses-dev/tracing-gantt-chart-plugin",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "scripts": {
5
5
  "dev": "rsbuild dev",
6
6
  "build": "npm run build-mf && concurrently \"npm:build:*\"",
@@ -16,24 +16,22 @@
16
16
  "module": "lib/index.js",
17
17
  "types": "lib/index.d.ts",
18
18
  "dependencies": {
19
- "@perses-dev/components": "0.0.0-snapshot-histogram-types-78c5104",
20
- "@perses-dev/core": "0.0.0-snapshot-histogram-types-78c5104",
21
- "@perses-dev/plugin-system": "0.0.0-snapshot-histogram-types-78c5104",
22
19
  "color-hash": "^2.0.2"
23
20
  },
24
21
  "peerDependencies": {
25
22
  "@emotion/react": "^11.7.1",
26
23
  "@emotion/styled": "^11.6.0",
27
24
  "@hookform/resolvers": "^3.2.0",
28
- "@perses-dev/components": "^0.51.0-beta.1",
29
- "@perses-dev/core": "^0.51.0-beta.1",
30
- "@perses-dev/plugin-system": "^0.51.0-beta.1",
25
+ "@perses-dev/components": "^0.51.0-rc.0",
26
+ "@perses-dev/core": "^0.51.0-rc.0",
27
+ "@perses-dev/plugin-system": "^0.51.0-rc.0",
31
28
  "date-fns": "^4.1.0",
32
29
  "date-fns-tz": "^3.2.0",
33
30
  "echarts": "5.5.0",
34
31
  "lodash": "^4.17.21",
35
32
  "react": "^17.0.2 || ^18.0.0",
36
33
  "react-dom": "^17.0.2 || ^18.0.0",
34
+ "react-router-dom": "^5 || ^6 || ^7",
37
35
  "use-resize-observer": "^9.0.0"
38
36
  },
39
37
  "files": [
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkTracingGanttChart=self.webpackChunkTracingGanttChart||[]).push([["76"],{1896:function(e,t,n){n.r(t),n.d(t,{TracingGanttChart:()=>eh});var r=n(4246),i=n(692),s=n(6372),o=n(4538),a=n(4776),l=n(5283),d=n(2709),u=n(7904),c=n(3915);let x=new c.Z({hue:{min:20,max:360}}),p=new c.Z({hue:{min:0,max:20}}),h={},m="2rem",f=e=>{var t;return(null===(t=e.status)||void 0===t?void 0:t.code)===u.np};function v(e,t,n,r){return function(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return"categorical"===n?function(e,t,n,r){let i=t?r:n;if(0===i.length)return console.warn("getConsistentCategoricalColor() called with empty color palette, fallback to #000"),"#000";let s=0;for(let t=0;t<e.length;t++)s=e.charCodeAt(t)+((s<<5)-s);return i[Math.abs(s)%i.length]??"#000"}(r,i,t.echartsTheme.color,[e.palette.error.light,e.palette.error.main,e.palette.error.dark]):function(e,t){let n=`${e}_____${t}`,r=h[n];return r||(r=function(e,t){let[n,r,i]=t?p.hsl(e):x.hsl(e),s=`${(100*r).toFixed(0)}%`,o=`${(100*i).toFixed(0)}%`;return`hsla(${n.toFixed(2)},${s},${o},0.9)`}(e,t),h[n]=r),r}(r,i)}(e,t,n,r.resource.serviceName??"",f(r))}function g(e){return e<1?`${Math.round(1e3*e)}μs`:e<1e3?`${+e.toFixed(2)}ms`:`${+(e/1e3).toFixed(2)}s`}function j(e){let{trace:t,viewport:n}=e,i=n.endTimeUnixMs-n.startTimeUnixMs,s=n.startTimeUnixMs-t.startTimeUnixMs;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b,{style:{left:"0%",borderWidth:0},children:g(s+0*i)}),(0,r.jsx)(b,{style:{left:"25%"},children:g(s+.25*i)}),(0,r.jsx)(b,{style:{left:"50%"},children:g(s+.5*i)}),(0,r.jsx)(b,{style:{left:"75%"},children:g(s+.75*i)}),(0,r.jsx)(b,{style:{left:"100%"},children:(0,r.jsx)("span",{style:{position:"absolute",right:".75rem"},children:g(s+ +i)})})]})}function M(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b,{style:{left:"25%"}}),(0,r.jsx)(b,{style:{left:"50%"}}),(0,r.jsx)(b,{style:{left:"75%"}})]})}let b=(0,d.ZP)(s.Z)(e=>{let{theme:t}=e;return{position:"absolute",height:"100%",borderLeft:`1px solid ${t.palette.divider}`,padding:".25rem"}});var T=n(5276),w=n(9780);function U(e){var t,n;let{options:l,trace:d,viewport:u,setViewport:c}=e,x=(0,a.Z)(),p=(0,i.useChartsTheme)(),{width:h,ref:m}=(0,T.Z)(),f=(0,o.useRef)(null),[g,j]=(0,o.useState)({type:"none"}),b=d.endTimeUnixMs-d.startTimeUnixMs,U=(u.startTimeUnixMs-d.startTimeUnixMs)/b,C=(d.endTimeUnixMs-u.endTimeUnixMs)/b,k=(0,o.useCallback)(e=>{var t,n;return v(x,p,null===(n=l.visual)||void 0===n?void 0:null===(t=n.palette)||void 0===t?void 0:t.mode,e)},[x,p,null===(n=l.visual)||void 0===n?void 0:null===(t=n.palette)||void 0===t?void 0:t.mode]);(0,o.useEffect)(()=>{if(!f.current||!h)return;let e=f.current.getContext("2d");e&&function(e,t,n,r,i){let s=r.rootSpans.map(function e(t){let n=1;for(let r of t.childSpans)n+=e(r);return n}).reduce((e,t)=>e+t,0),o=Math.round(Math.min(Math.max(60/s,1),7)),a=r.endTimeUnixMs-r.startTimeUnixMs,l=60/s,d=0,u=n=>{let s=n.endTimeUnixMs-n.startTimeUnixMs,c=(n.startTimeUnixMs-r.startTimeUnixMs)/a;for(let r of(e.fillStyle=i(n),e.beginPath(),e.rect(Math.round(c*t),Math.round(d),Math.max(2,Math.round(s/a*t)),o),e.fill(),d+=l,n.childSpans))u(r)};for(let e of r.rootSpans)u(e)}(e,h,60,d,k)},[h,60,d,k]);let S=e=>{if(!f.current||!h)return 0;let t=e.clientX-f.current.getBoundingClientRect().left;return d.startTimeUnixMs+t/h*b},$=(0,w.z)(e=>{switch(e.preventDefault(),g.type){case"none":return;case"resize":{let t,n;let r=g.fixedPoint,i=S(e);r<i?(t=r,n=i):(t=i,n=r),c({startTimeUnixMs:Math.max(t,d.startTimeUnixMs),endTimeUnixMs:Math.min(n,d.endTimeUnixMs)});return}case"drag":{let{start:t,end:n}=g,r=S(e);r-t<d.startTimeUnixMs&&(r=d.startTimeUnixMs+t),r+n>d.endTimeUnixMs&&(r=d.endTimeUnixMs-n),c({startTimeUnixMs:r-t,endTimeUnixMs:r+n});return}}}),I=(0,w.z)(e=>{e.preventDefault(),j({type:"none"}),u.startTimeUnixMs===u.endTimeUnixMs&&c({startTimeUnixMs:d.startTimeUnixMs,endTimeUnixMs:d.endTimeUnixMs})});return(0,o.useEffect)(()=>{function e(){window.removeEventListener("mousemove",$),window.removeEventListener("mouseup",I),document.body.style.cursor="inherit"}return"none"===g.type?e():(window.addEventListener("mousemove",$),window.addEventListener("mouseup",I),document.body.style.cursor="resize"===g.type?"col-resize":"move"),e},[g,$,I]),(0,r.jsxs)(s.Z,{ref:m,sx:{position:"relative",height:60},onMouseDown:e=>{if(e.preventDefault(),!(e.target instanceof HTMLElement))return;let t=u.startTimeUnixMs===d.startTimeUnixMs&&u.endTimeUnixMs===d.endTimeUnixMs,n=e.target.dataset.elem,r=S(e);"resizerLeft"===n?j({type:"resize",fixedPoint:u.endTimeUnixMs}):"resizerRight"===n?j({type:"resize",fixedPoint:u.startTimeUnixMs}):"cutoffBox"===n||t?(j({type:"resize",fixedPoint:r}),c({startTimeUnixMs:r,endTimeUnixMs:r})):j({type:"drag",start:r-u.startTimeUnixMs,end:u.endTimeUnixMs-r})},children:[(0,r.jsx)("canvas",{ref:f,width:h,height:60,style:{position:"absolute"}}),(0,r.jsx)(M,{}),(0,r.jsx)(y,{"data-elem":"cutoffBox",style:{left:0,width:`${100*U}%`}}),(0,r.jsx)(Z,{"data-elem":"resizerLeft",style:{left:`${100*U}%`}}),(0,r.jsx)(Z,{"data-elem":"resizerRight",style:{right:`${100*C}%`}}),(0,r.jsx)(y,{"data-elem":"cutoffBox",style:{right:0,width:`${100*C}%`}})]})}let y=(0,d.ZP)(s.Z)({position:"absolute",height:"100%",backgroundColor:"rgba(225, 225, 225, .5)"}),Z=(0,d.ZP)(s.Z)(e=>{let{theme:t}=e;return{position:"absolute",height:"100%",backgroundColor:t.palette.divider,width:"2px",cursor:"col-resize","&:before":{position:"absolute",width:"8px",left:"-3px",top:0,bottom:0,content:'" "',zIndex:1}}});function C(e){let{options:t,trace:n,viewport:i,setViewport:o}=e,l=(0,a.Z)();return(0,r.jsxs)(s.Z,{sx:{border:`1px solid ${l.palette.divider}`,borderRadius:`${l.shape.borderRadius}px`},children:[(0,r.jsx)(s.Z,{sx:{position:"relative",height:m,borderBottom:`1px solid ${l.palette.divider}`},children:(0,r.jsx)(j,{trace:n,viewport:{startTimeUnixMs:n.startTimeUnixMs,endTimeUnixMs:n.endTimeUnixMs}})}),(0,r.jsx)(U,{options:t,trace:n,viewport:i,setViewport:o})]})}var k=n(5094),S=n(2054),$=n(1781),I=n(9408),z=n(9119),E=n(763),P=n(1852),L=n(886),R=n(2259),B=n(2577),V=n(5895);function F(e){let{attributeLinks:t,attributes:n}=e,i=(0,o.useMemo)(()=>Object.fromEntries(n.map(e=>[e.key,e.value])),[n]);return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(P.Z,{children:n.sort((e,t)=>e.key.localeCompare(t.key)).map((e,n)=>{var s;return(0,r.jsx)(D,{attribute:e,linkTo:null==t?void 0:null===(s=t[e.key])||void 0===s?void 0:s.call(t,i)},n)})})})}function D(e){let{attribute:t,linkTo:n}=e,i=n?(0,r.jsx)(L.Z,{component:V.rU,to:n,children:G(t.value)}):G(t.value);return(0,r.jsx)(R.ZP,{disablePadding:!0,children:(0,r.jsx)(B.Z,{primary:t.key,secondary:i,primaryTypographyProps:{variant:"h5"},secondaryTypographyProps:{variant:"body1",sx:{wordBreak:"break-word"}}})})}function G(e){return"stringValue"in e?e.stringValue.length>0?e.stringValue:"<empty string>":"intValue"in e?e.intValue:"boolValue"in e?e.boolValue.toString():"arrayValue"in e?e.arrayValue.values.map(G).join(", "):"unknown"}var N=n(1357),O=n(6656),A=n(5474),W=n(2449);function _(e){let{trace:t,span:n}=e;return(0,r.jsx)(r.Fragment,{children:n.events.sort((e,t)=>e.timeUnixMs-t.timeUnixMs).map((e,n)=>(0,r.jsx)(X,{trace:t,event:e},n))})}function X(e){let{trace:t,event:n}=e,i=n.timeUnixMs-t.startTimeUnixMs;return(0,r.jsxs)(N.Z,{disableGutters:!0,children:[(0,r.jsx)(O.Z,{expandIcon:(0,r.jsx)(W.default,{}),children:(0,r.jsx)(S.Z,{children:g(i)})}),(0,r.jsxs)(A.Z,{children:[(0,r.jsx)(S.Z,{variant:"subtitle1",children:n.name}),(0,r.jsx)(F,{attributes:n.attributes})]})]})}function H(e){let{attributeLinks:t,trace:n,span:i,onCloseBtnClick:a}=e,[l,d]=(0,o.useState)("attributes");return"events"===l&&0===i.events.length&&d("attributes"),(0,r.jsxs)(s.Z,{children:[(0,r.jsx)(k.Z,{sx:{float:"right"},onClick:a,children:(0,r.jsx)(E.default,{})}),(0,r.jsx)(S.Z,{sx:{wordBreak:"break-word"},children:i.resource.serviceName}),(0,r.jsx)(S.Z,{variant:"h2",sx:{wordBreak:"break-word"},children:i.name}),(0,r.jsx)(s.Z,{sx:{borderBottom:1,borderColor:"divider"},children:(0,r.jsxs)($.Z,{value:l,onChange:(e,t)=>d(t),children:[(0,r.jsx)(I.Z,{sx:{p:0},value:"attributes",label:"Attributes"}),i.events.length>0&&(0,r.jsx)(I.Z,{value:"events",label:"Events"})]})}),"attributes"===l&&(0,r.jsxs)(r.Fragment,{children:[i.attributes.length>0&&(0,r.jsx)(F,{attributeLinks:t,attributes:i.attributes}),i.attributes.length>0&&(0,r.jsx)(z.Z,{}),(0,r.jsx)(F,{attributeLinks:t,attributes:i.resource.attributes})]}),"events"===l&&(0,r.jsx)(_,{trace:n,span:i})]})}var Q=n(3675);let Y=(0,o.createContext)(void 0);function q(e){let{children:t}=e,[n,i]=(0,o.useState)([]),[s,a]=(0,o.useState)([]),[l,d]=(0,o.useState)(void 0);return(0,r.jsx)(Y.Provider,{value:{collapsedSpans:n,setCollapsedSpans:i,visibleSpans:s,setVisibleSpans:a,hoveredParent:l,setHoveredParent:d},children:t})}function J(){let e=(0,o.useContext)(Y);if(void 0===e)throw Error("No GanttTableContext found. Did you forget a Provider?");return e}var K=n(4944),ee=n(4974);function et(e){let{span:t}=e,{collapsedSpans:n,setCollapsedSpans:i,visibleSpans:s,hoveredParent:l,setHoveredParent:d}=J(),u=(0,a.Z)(),c=(0,o.useCallback)(e=>{e.stopPropagation(),n.includes(t.spanId)?i(n.filter(e=>e!==t.spanId)):i([...n,t.spanId])},[t,n,i]),x=(0,o.useCallback)(()=>{d(t.spanId)},[t,d]),p=[t],h=t.parentSpan;for(;h;)p.unshift(h),h=h.parentSpan;return(0,r.jsx)(r.Fragment,{children:p.map((e,t)=>(0,r.jsx)(en,{style:{width:t===p.length-1||0===s.length||s.includes(e.spanId)?24:8,borderLeft:`${l===(e.parentSpanId??"")?3:1}px solid ${u.palette.divider}`},onMouseEnter:()=>d(e.parentSpanId??""),onMouseLeave:()=>d(void 0),children:t===p.length-1&&e.childSpans.length>0&&(n.includes(e.spanId)?(0,r.jsx)(ee.default,{titleAccess:"expand",onClick:c,onMouseEnter:x}):(0,r.jsx)(W.default,{titleAccess:"collapse",onClick:c,onMouseEnter:x}))},e.spanId))})}let en=(0,d.ZP)("div")({display:"flex",height:"100%",alignItems:"center",justifyContent:"flex-end",flexShrink:0,transition:"width 1s"});function er(e){let{span:t,nameColumnWidth:n}=e;return(0,r.jsxs)(l.Z,{direction:"row",sx:{alignItems:"center"},style:{width:`${100*n}%`},children:[(0,r.jsx)(et,{span:t}),f(t)&&(0,r.jsx)(K.default,{titleAccess:"error",color:"error",sx:{marginRight:"5px"}}),(0,r.jsxs)(s.Z,{sx:{whiteSpace:"nowrap",overflow:"hidden"},children:[(0,r.jsxs)("strong",{children:[t.resource.serviceName,":"]})," ",t.name]})]})}function ei(e){var t,n;let{options:o,span:l,viewport:d}=e,u=(0,a.Z)(),c=(0,i.useChartsTheme)(),x=l.endTimeUnixMs-l.startTimeUnixMs,p=d.endTimeUnixMs-d.startTimeUnixMs,h=x/p,m=(l.startTimeUnixMs-d.startTimeUnixMs)/p;return(0,r.jsxs)(s.Z,{sx:{position:"relative",height:"100%",flexGrow:1,overflow:"hidden"},children:[(0,r.jsx)(M,{}),(0,r.jsx)(s.Z,{"data-testid":"span-duration-bar",sx:{position:"absolute",top:0,bottom:0,margin:"auto",minWidth:"2px",height:"8px",borderRadius:u.shape.borderRadius},style:{left:`${100*m}%`,width:`${100*h}%`,backgroundColor:v(u,c,null===(n=o.visual)||void 0===n?void 0:null===(t=n.palette)||void 0===t?void 0:t.mode,l)}}),(0,r.jsx)(s.Z,{sx:{position:"absolute",top:"50%",transform:"translateY(-50%)",padding:"0 8px",color:u.palette.grey[700],fontSize:".7rem"},style:m+h<.95?{left:`${(m+h)*100}%`}:{left:`${100*m}%`,transform:"translateY(-50%) translateX(-100%)"},children:g(x)})]})}let es=(0,o.memo)(function(e){let{options:t,span:n,viewport:i,selected:s,nameColumnWidth:o,divider:l,onClick:d}=e,u=(0,a.Z)();return(0,r.jsxs)(eo,{sx:{backgroundColor:s?u.palette.action.selected:"inherit"},direction:"row",onClick:()=>{var e;(null===(e=document.getSelection())||void 0===e?void 0:e.type)!=="Range"&&d(n)},children:[(0,r.jsx)(er,{span:n,nameColumnWidth:o}),l,(0,r.jsx)(ei,{options:t,span:n,viewport:i})]})}),eo=(0,d.ZP)(l.Z)(e=>{let{theme:t}=e;return{height:m,"&:hover":{backgroundColor:t.palette.action.hover,borderTop:`1px solid ${t.palette.divider}`,borderBottom:`1px solid ${t.palette.divider}`}}});function ea(e){let{trace:t,viewport:n,nameColumnWidth:i,divider:o}=e,d=(0,a.Z)();return(0,r.jsxs)(l.Z,{direction:"row",alignItems:"center",sx:{height:m,fontSize:"0.9rem",borderBottom:`1px solid ${d.palette.divider}`},children:[(0,r.jsx)(s.Z,{style:{width:`${100*i}%`},children:(0,r.jsx)("span",{style:{padding:".25rem"},children:"Service & Operation"})}),o,(0,r.jsx)(s.Z,{sx:{position:"relative",height:"100%",flexGrow:1},children:(0,r.jsx)(j,{trace:t,viewport:n})})]})}function el(e){let{parentRef:t,spacing:n=0,onMove:i}=e,[s,a]=(0,o.useState)(!1),l=(0,w.z)(e=>{if(!t.current)return;let r=(e.clientX-t.current.getBoundingClientRect().left+n)/t.current.getBoundingClientRect().width;.05<=r&&r<=.95&&i(r)}),d=(0,w.z)(()=>{a(!1)});return(0,o.useEffect)(()=>{function e(){window.removeEventListener("mousemove",l),window.removeEventListener("mouseup",d),document.body.style.cursor="inherit"}return s?(window.addEventListener("mousemove",l),window.addEventListener("mouseup",d),document.body.style.cursor="col-resize"):e(),e},[s,l,d]),(0,r.jsx)(ed,{onMouseDown:e=>{e.preventDefault(),a(!0)},onClick:e=>e.stopPropagation()})}let ed=(0,d.ZP)(s.Z)(e=>{let{theme:t}=e;return{position:"relative",width:"1px",height:"100%",backgroundColor:t.palette.divider,cursor:"col-resize","&:before":{position:"absolute",width:"7px",left:"-3px",top:0,bottom:0,content:'" "',zIndex:1}}});function eu(e){let{options:t,trace:n,viewport:i,selectedSpan:l,onSpanClick:d}=e,{collapsedSpans:u,setVisibleSpans:c}=J(),[x,p]=(0,o.useState)(.25),h=(0,o.useRef)(null),m=(0,a.Z)(),f=(0,o.useMemo)(()=>{let e=[];for(let t of n.rootSpans)!function e(t,n,r){if(t.push(n),!r.includes(n.spanId))for(let i of n.childSpans)e(t,i,r)}(e,t,u);return e},[n.rootSpans,u]),v=(0,r.jsx)(el,{parentRef:h,onMove:p});return(0,r.jsxs)(s.Z,{ref:h,sx:{display:"flex",flexDirection:"column",flexGrow:1,border:`1px solid ${m.palette.divider}`,borderRadius:`${m.shape.borderRadius}px`},children:[(0,r.jsx)(ea,{trace:n,viewport:i,nameColumnWidth:x,divider:v}),(0,r.jsx)(Q.OO,{data:f,itemContent:(e,n)=>(0,r.jsx)(es,{options:t,span:n,viewport:i,selected:n===l,nameColumnWidth:x,divider:v,onClick:d}),rangeChanged:function(e){let{startIndex:t,endIndex:n}=e,r=[];for(let e=t;e<=n;e++)r.push(f[e].spanId);c(r)}})]})}var ec=n(3098);function ex(e){return{timeUnixMs:1e-6*parseInt(e.timeUnixNano),name:e.name,attributes:e.attributes??[]}}function ep(e){let{options:t,attributeLinks:n,trace:i}=e,d=(0,a.Z)(),u=(0,o.useMemo)(()=>{try{return function(e){let t=new Map,n=[],r=0,i=0;for(let n of e.resourceSpans){let e=function(e){let t="unknown";for(let n of(null==e?void 0:e.attributes)??[])if("service.name"===n.key&&"stringValue"in n.value){t=n.value.stringValue;break}return{serviceName:t,attributes:(null==e?void 0:e.attributes)??[]}}(n.resource);for(let o of n.scopeSpans){let n=o.scope??{};for(let a of o.spans){var s;let o={resource:e,scope:n,childSpans:[],traceId:(s=a).traceId,spanId:s.spanId,parentSpanId:s.parentSpanId,name:s.name,kind:s.kind,startTimeUnixMs:1e-6*parseInt(s.startTimeUnixNano),endTimeUnixMs:1e-6*parseInt(s.endTimeUnixNano),attributes:s.attributes??[],events:(s.events??[]).map(ex),status:s.status??{}};t.set(a.spanId,o),(0===r||o.startTimeUnixMs<r)&&(r=o.startTimeUnixMs),(0===i||o.endTimeUnixMs>i)&&(i=o.endTimeUnixMs)}}}for(let[,e]of t){if(!e.parentSpanId){n.push(e);continue}let r=t.get(e.parentSpanId);if(!r){console.trace(`span ${e.spanId} has parent ${e.parentSpanId} which has not been received yet`),n.push(e);continue}e.parentSpan=r;let i=(0,ec.sortedIndexBy)(r.childSpans,e,e=>e.startTimeUnixMs);r.childSpans.splice(i,0,e)}return{trace:e,rootSpans:n,startTimeUnixMs:r,endTimeUnixMs:i}}(i)}catch(e){throw Error(`Error: unable to parse trace: ${e}`)}},[i]),[c,x]=(0,o.useState)({startTimeUnixMs:u.startTimeUnixMs,endTimeUnixMs:u.endTimeUnixMs}),[p,h]=(0,o.useState)(void 0),m=(0,o.useRef)(null),[f,v]=(0,o.useState)(.82);return(0,r.jsxs)(l.Z,{ref:m,direction:"row",sx:{height:"100%",minHeight:"240px",gap:2},children:[(0,r.jsxs)(l.Z,{sx:{flexGrow:1,gap:2},children:[(0,r.jsx)(C,{options:t,trace:u,viewport:c,setViewport:x}),(0,r.jsx)(q,{children:(0,r.jsx)(eu,{options:t,trace:u,viewport:c,selectedSpan:p,onSpanClick:h})})]}),p&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(el,{parentRef:m,spacing:parseInt(d.spacing(2)),onMove:v}),(0,r.jsx)(s.Z,{sx:{width:`${(1-f)*100}%`,overflow:"auto"},children:(0,r.jsx)(H,{attributeLinks:n,trace:u,span:p,onCloseBtnClick:()=>h(void 0)})})]})]})}let eh={PanelComponent:function(e){var t;let{spec:n,queryResults:o,attributeLinks:a}=e,l=(0,i.useChartsTheme)().container.padding.default;if(o.length>1)return(0,r.jsx)(i.TextOverlay,{message:"This panel does not support more than one query."});let d=null===(t=o[0])||void 0===t?void 0:t.data.trace;return d?(0,r.jsx)(s.Z,{sx:{height:"100%",padding:`${l}px`},children:(0,r.jsx)(ep,{options:n,attributeLinks:a,trace:d})}):(0,r.jsx)(i.NoDataOverlay,{resource:"trace"})},supportedQueryTypes:["TraceQuery"],createInitialOptions:function(){return{}}}}}]);
@@ -1,2 +0,0 @@
1
- /*! For license information please see lib-router.36c0d526.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkTracingGanttChart=self.webpackChunkTracingGanttChart||[]).push([["118"],{5895:function(e,t,n){n.d(t,{rU:()=>K});var r,a,o,s,i,u,l,c,h,f,p,d=n(4538),v=n(6085);function m(){return(m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function g(e,t){if(!1===e||null==e)throw Error(t)}function b(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function y(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function C(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field [")+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function w(e,t){let n=e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0);return t?n.map((e,t)=>t===n.length-1?e.pathname:e.pathnameBase):n.map(e=>e.pathnameBase)}function U(e,t,n,r){let a,o;void 0===r&&(r=!1),"string"==typeof e?a=y(e):(g(!(a=m({},e)).pathname||!a.pathname.includes("?"),C("?","pathname","search",a)),g(!a.pathname||!a.pathname.includes("#"),C("#","pathname","hash",a)),g(!a.search||!a.search.includes("#"),C("#","search","hash",a)));let s=""===e||""===a.pathname,i=s?"/":a.pathname;if(null==i)o=n;else{let e=t.length-1;if(!r&&i.startsWith("..")){let t=i.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}o=e>=0?t[e]:"/"}let u=function(e,t){var n;let r;void 0===t&&(t="/");let{pathname:a,search:o="",hash:s=""}="string"==typeof e?y(e):e;return{pathname:a?a.startsWith("/")?a:(n=a,r=t.replace(/\/+$/,"").split("/"),n.split("/").forEach(e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)}),r.length>1?r.join("/"):"/"):t,search:S(o),hash:O(s)}}(a,o),l=i&&"/"!==i&&i.endsWith("/"),c=(s||"."===i)&&n.endsWith("/");return!u.pathname.endsWith("/")&&(l||c)&&(u.pathname+="/"),u}(r=c||(c={})).Pop="POP",r.Push="PUSH",r.Replace="REPLACE",(a=h||(h={})).data="data",a.deferred="deferred",a.redirect="redirect",a.error="error";let R=e=>e.join("/").replace(/\/\/+/g,"/"),S=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",O=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";function x(){return(x=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}Symbol("deferred");let k=d.createContext(null),P=d.createContext(null),j=d.createContext(null),N=d.createContext({outlet:null,matches:[],isDataRoute:!1});function L(){return null!=d.useContext(j)}function W(){return L()||g(!1),d.useContext(j).location}function D(e){d.useContext(P).static||d.useLayoutEffect(e)}function E(e,t){let{relative:n}=void 0===t?{}:t,{future:r}=d.useContext(P),{matches:a}=d.useContext(N),{pathname:o}=W(),s=JSON.stringify(w(a,r.v7_relativeSplatPath));return d.useMemo(()=>U(e,JSON.parse(s),o,"path"===n),[e,s,o,n])}d.Component;var F=((o=F||{}).UseBlocker="useBlocker",o.UseRevalidator="useRevalidator",o.UseNavigateStable="useNavigate",o),A=((s=A||{}).UseBlocker="useBlocker",s.UseLoaderData="useLoaderData",s.UseActionData="useActionData",s.UseRouteError="useRouteError",s.UseNavigation="useNavigation",s.UseRouteLoaderData="useRouteLoaderData",s.UseMatches="useMatches",s.UseRevalidator="useRevalidator",s.UseNavigateStable="useNavigate",s.UseRouteId="useRouteId",s);d.startTransition;var T=((i=T||{})[i.pending=0]="pending",i[i.success=1]="success",i[i.error=2]="error",i);function B(){return(B=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}new Promise(()=>{}),d.Component;let J=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"];try{window.__reactRouterVersion="6"}catch(e){}d.startTransition,v.flushSync,d.useId;let _="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,I=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,K=d.forwardRef(function(e,t){let n,{onClick:r,relative:a,reloadDocument:o,replace:s,state:i,target:u,to:l,preventScrollReset:c,viewTransition:h}=e,f=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,J),{basename:p}=d.useContext(P),v=!1;if("string"==typeof l&&I.test(l)&&(n=l,_))try{let e=new URL(window.location.href),t=new URL(l.startsWith("//")?e.protocol+l:l),n=function(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}(t.pathname,p);t.origin===e.origin&&null!=n?l=n+t.search+t.hash:v=!0}catch(e){}let m=function(e,t){let{relative:n}=void 0===t?{}:t;L()||g(!1);let{basename:r,navigator:a}=d.useContext(P),{hash:o,pathname:s,search:i}=E(e,{relative:n}),u=s;return"/"!==r&&(u="/"===s?r:R([r,s])),a.createHref({pathname:u,search:i,hash:o})}(l,{relative:a}),y=function(e,t){let{target:n,replace:r,state:a,preventScrollReset:o,relative:s,viewTransition:i}=void 0===t?{}:t,u=function(){let{isDataRoute:e}=d.useContext(N);return e?function(){var e,t;let n,r,a,o;let{router:s}=(F.UseNavigateStable,(n=d.useContext(k))||g(!1),n),i=(A.UseNavigateStable,(o=((r=d.useContext(N))||g(!1),a=r).matches[a.matches.length-1]).route.id||g(!1),o.route.id),u=d.useRef(!1);return D(()=>{u.current=!0}),d.useCallback(function(e,t){void 0===t&&(t={}),u.current&&("number"==typeof e?s.navigate(e):s.navigate(e,x({fromRouteId:i},t)))},[s,i])}():function(){L()||g(!1);let e=d.useContext(k),{basename:t,future:n,navigator:r}=d.useContext(P),{matches:a}=d.useContext(N),{pathname:o}=W(),s=JSON.stringify(w(a,n.v7_relativeSplatPath)),i=d.useRef(!1);return D(()=>{i.current=!0}),d.useCallback(function(n,a){if(void 0===a&&(a={}),!i.current)return;if("number"==typeof n){r.go(n);return}let u=U(n,JSON.parse(s),o,"path"===a.relative);null==e&&"/"!==t&&(u.pathname="/"===u.pathname?t:R([t,u.pathname])),(a.replace?r.replace:r.push)(u,a.state,a)},[t,r,s,o,e])}()}(),l=W(),c=E(e,{relative:s});return d.useCallback(t=>{0===t.button&&(!n||"_self"===n)&&!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&(t.preventDefault(),u(e,{replace:void 0!==r?r:b(l)===b(c),state:a,preventScrollReset:o,relative:s,viewTransition:i}))},[l,u,c,r,a,n,e,o,s,i])}(l,{replace:s,state:i,target:u,preventScrollReset:c,relative:a,viewTransition:h});return d.createElement("a",B({},f,{href:n||m,onClick:v||o?r:function(e){r&&r(e),e.defaultPrevented||y(e)},ref:t,target:u}))});(u=f||(f={})).UseScrollRestoration="useScrollRestoration",u.UseSubmit="useSubmit",u.UseSubmitFetcher="useSubmitFetcher",u.UseFetcher="useFetcher",u.useViewTransitionState="useViewTransitionState",(l=p||(p={})).UseFetcher="useFetcher",l.UseFetchers="useFetchers",l.UseScrollRestoration="useScrollRestoration"}}]);
@@ -1 +0,0 @@
1
- (()=>{var e={5311:function(e,r,t){Promise.all([t.e("677"),t.e("179"),t.e("620")]).then(t.bind(t,9161))}},r={};function t(n){var a=r[n];if(void 0!==a)return a.exports;var o=r[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}t.m=e,t.c=r,t.federation||(t.federation={chunkMatcher:function(e){return!/^(1(57|61|79)|494|677|759|946)$/.test(e)}}),t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.d=(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.f={},t.e=e=>Promise.all(Object.keys(t.f).reduce((r,n)=>(t.f[n](e,r),r),[])),t.u=e=>"__mf/js/async/"+e+"."+({156:"5a401ecb",173:"6314a363",620:"1d1ce390",651:"3ea371e5",694:"4580ad20",740:"babbb403",75:"d81e6bbf",770:"5431adef",783:"3c2c57f6",844:"556cc34d",960:"478a8f11",964:"a98cab40",981:"bc5132f8"})[e]+".js",t.miniCssF=e=>"__mf/css/async/"+e+".6c6463ea.css",t.h=()=>"19d10e67be81167c",(()=>{t.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})()})(),t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),(()=>{var e={},r="TracingGanttChart:";t.l=function(n,a,o,i){if(e[n]){e[n].push(a);return}if(void 0!==o)for(var s,l,c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var u=c[d];if(u.getAttribute("src")==n||u.getAttribute("data-webpack")==r+o){s=u;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,t.nc&&s.setAttribute("nonce",t.nc),s.setAttribute("data-webpack",r+o),s.src=n),e[n]=[a];var f=function(r,t){s.onerror=s.onload=null,clearTimeout(h);var a=e[n];if(delete e[n],s.parentNode&&s.parentNode.removeChild(s),a&&a.forEach(function(e){return e(t)}),r)return r(t)},h=setTimeout(f.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=f.bind(null,s.onerror),s.onload=f.bind(null,s.onload),l&&document.head.appendChild(s)}})(),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),t.nc=void 0,(()=>{var e=[];t.O=(r,n,a,o)=>{if(n){o=o||0;for(var i=e.length;i>0&&e[i-1][2]>o;i--)e[i]=e[i-1];e[i]=[n,a,o];return}for(var s=1/0,i=0;i<e.length;i++){for(var[n,a,o]=e[i],l=!0,c=0;c<n.length;c++)(!1&o||s>=o)&&Object.keys(t.O).every(e=>t.O[e](n[c]))?n.splice(c--,1):(l=!1,o<s&&(s=o));if(l){e.splice(i--,1);var d=a();void 0!==d&&(r=d)}}return r}})(),t.p="/plugins/TracingGanttChart/",t.rv=()=>"1.2.8",t.j="909",t.S={},t.initializeSharingData={scopeToSharingDataMapping:{default:[{name:"@emotion/react",version:"11.14.0",factory:()=>Promise.all([t.e("960"),t.e("677"),t.e("651")]).then(()=>()=>t(6434)),eager:0,singleton:1,requiredVersion:"^11.11.3"},{name:"@emotion/styled",version:"11.14.0",factory:()=>Promise.all([t.e("677"),t.e("157"),t.e("770")]).then(()=>()=>t(1958)),eager:0,singleton:1},{name:"@perses-dev/components",version:"0.0.0-snapshot-histogram-types-78c5104",factory:()=>Promise.all([t.e("156"),t.e("844"),t.e("783"),t.e("677"),t.e("179"),t.e("157"),t.e("161"),t.e("946"),t.e("759")]).then(()=>()=>t(9383)),eager:0,singleton:1},{name:"date-fns",version:"4.1.0",factory:()=>Promise.all([t.e("156"),t.e("75")]).then(()=>()=>t(9657)),eager:0,singleton:1},{name:"lodash",version:"4.17.21",factory:()=>t.e("981").then(()=>()=>t(8784)),eager:0,singleton:1},{name:"react-dom",version:"18.3.1",factory:()=>Promise.all([t.e("173"),t.e("677")]).then(()=>()=>t(2652)),eager:0,singleton:1,requiredVersion:"18.2.0"},{name:"react",version:"18.3.1",factory:()=>t.e("964").then(()=>()=>t(7378)),eager:0,singleton:1,requiredVersion:"18.2.0"}]},uniqueName:"TracingGanttChart"},t.I=t.I||function(){throw Error("should have __webpack_require__.I")},t.consumesLoadingData={chunkMapping:{161:["4665","461"],494:["7871"],946:["5913"],179:["6085"],157:["2116"],677:["4538"]},moduleIdToConsumeDataMapping:{461:{shareScope:"default",shareKey:"date-fns",import:"date-fns",requiredVersion:"^4.1.0",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>t.e("75").then(()=>()=>t(9657))},5913:{shareScope:"default",shareKey:"@emotion/styled",import:"@emotion/styled",requiredVersion:"^11.3.0",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>t.e("694").then(()=>()=>t(1958))},4538:{shareScope:"default",shareKey:"react",import:"react",requiredVersion:"18.2.0",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>t.e("964").then(()=>()=>t(7378))},4665:{shareScope:"default",shareKey:"date-fns-tz",import:"date-fns-tz",requiredVersion:"^3.2.0",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>Promise.all([t.e("740"),t.e("494")]).then(()=>()=>t(8872))},7871:{shareScope:"default",shareKey:"date-fns",import:"date-fns",requiredVersion:"^3.0.0 || ^4.0.0",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>t.e("75").then(()=>()=>t(9657))},6085:{shareScope:"default",shareKey:"react-dom",import:"react-dom",requiredVersion:"18.2.0",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>t.e("173").then(()=>()=>t(2652))},2116:{shareScope:"default",shareKey:"@emotion/react",import:"@emotion/react",requiredVersion:"^11.11.3",strictVersion:!1,singleton:!0,eager:!1,fallback:()=>t.e("960").then(()=>()=>t(6434))}},initialConsumes:[]},t.f.consumes=t.f.consumes||function(){throw Error("should have __webpack_require__.f.consumes")},(()=>{if("undefined"!=typeof document){var e=function(e,r,n,a,o){var i=document.createElement("link");return i.rel="stylesheet",i.type="text/css",t.nc&&(i.nonce=t.nc),i.onerror=i.onload=function(t){if(i.onerror=i.onload=null,"load"===t.type)a();else{var n=t&&("load"===t.type?"missing":t.type),s=t&&t.target&&t.target.href||r,l=Error("Loading CSS chunk "+e+" failed.\\n("+s+")");l.code="CSS_CHUNK_LOAD_FAILED",l.type=n,l.request=s,i.parentNode&&i.parentNode.removeChild(i),o(l)}},i.href=r,n?n.parentNode.insertBefore(i,n.nextSibling):document.head.appendChild(i),i},r=function(e,r){for(var t=document.getElementsByTagName("link"),n=0;n<t.length;n++){var a=t[n],o=a.getAttribute("data-href")||a.getAttribute("href");if("stylesheet"===a.rel&&(o===e||o===r))return a}for(var i=document.getElementsByTagName("style"),n=0;n<i.length;n++){var a=i[n],o=a.getAttribute("data-href");if(o===e||o===r)return a}},n={909:0};t.f.miniCss=function(a,o){if(n[a])o.push(n[a]);else if(0!==n[a]&&({759:1})[a])o.push(n[a]=new Promise(function(n,o){var i=t.miniCssF(a),s=t.p+i;if(r(i,s))return n();e(a,s,null,n,o)}).then(function(){n[a]=0},function(e){throw delete n[a],e}))}}})(),(()=>{var e={909:0};t.f.j=function(r,n){var a=t.o(e,r)?e[r]:void 0;if(0!==a){if(a)n.push(a[2]);else if(/^(1(57|61|79)|494|677|759|946)$/.test(r))e[r]=0;else{var o=new Promise((t,n)=>a=e[r]=[t,n]);n.push(a[2]=o);var i=t.p+t.u(r),s=Error();t.l(i,function(n){if(t.o(e,r)&&(0!==(a=e[r])&&(e[r]=void 0),a)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;s.message="Loading chunk "+r+" failed.\n("+o+": "+i+")",s.name="ChunkLoadError",s.type=o,s.request=i,a[1](s)}},"chunk-"+r,r)}}},t.O.j=r=>0===e[r];var r=(r,n)=>{var a,o,[i,s,l]=n,c=0;if(i.some(r=>0!==e[r])){for(a in s)t.o(s,a)&&(t.m[a]=s[a]);if(l)var d=l(t)}for(r&&r(n);c<i.length;c++)o=i[c],t.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return t.O(d)},n=self.webpackChunkTracingGanttChart=self.webpackChunkTracingGanttChart||[];n.forEach(r.bind(null,0)),n.push=r.bind(null,n.push.bind(n))})(),t.ruid="bundler=rspack@1.2.8",t.O(void 0,["788"],function(){return t(2429)});var n=t.O(void 0,["788"],function(){return t(5311)});n=t.O(n)})();