1import{f as b,K as n,M as B,r as O,N as x,O as E,h as v,j as s,Q as A,k as N,R as L}from"./index.RuhrnD1v.js";import{g as H,a as $,f as z}from"./pandasStylerUtils.G7GPfspw.js";import"./moment.C7qA8nIE.js";import"./numbro.B9_PXfzp.js";import"./_baseIndexOf.BTknn6Gb.js";const F=b("div",{target:"evac33h0"})(({theme:e})=>({fontSize:e.fontSizes.md,fontFamily:e.genericFonts.bodyFont,lineHeight:e.lineHeights.small,captionSide:"bottom",height:"100%",width:"100%",maxWidth:"100%",overflow:"clip",display:"block"})),D=b("div",{target:"evac33h1"})(({theme:e})=>({fontFamily:e.genericFonts.bodyFont,fontSize:e.fontSizes.sm,paddingTop:e.spacing.sm,paddingBottom:0,color:e.colors.fadedText60,textAlign:"left",wordWrap:"break-word",display:"inline-block"})),_=b("div",{target:"evac33h2"})(({theme:e,borderMode:t,hasScrollableHeight:o})=>({border:t===n.BorderMode.ALL?`${e.sizes.borderWidth} solid ${e.colors.dataframeBorderColor}`:"none",borderRadius:e.radii.default,overflow:"auto",width:"100%",maxWidth:"100%",height:o?"100%":void 0,position:"relative",display:"block"})),I=b("table",{target:"evac33h3"})(({theme:e,useContentWidth:t,hasScrollableWidth:o})=>({color:e.colors.bodyText,borderSpacing:0,display:"inline-table",verticalAlign:"top",minWidth:t||o?void 0:"100%"})),M=(e,t=n.BorderMode.ALL,o=!1)=>({borderBottom:t!==n.BorderMode.NONE?`${e.sizes.borderWidth} solid ${e.colors.dataframeBorderColor}`:"none","tbody tr:last-child &":{borderBottom:t===n.BorderMode.ALL||t===n.BorderMode.HORIZONTAL?"none":void 0},borderRight:t===n.BorderMode.ALL?`${e.sizes.borderWidth} solid ${e.colors.dataframeBorderColor}`:"none","&:last-child":{borderRight:t===n.BorderMode.ALL?"none":void 0,paddingRight:t===n.BorderMode.NONE?"0":e.spacing.xs},verticalAlign:"middle",padding:`${e.spacing.twoXS} ${e.spacing.xs}`,"&:not(:first-of-type)":{paddingLeft:t===n.BorderMode.NONE||t===n.BorderMode.HORIZONTAL?e.spacing.lg:e.spacing.xs},"&:first-of-type":{paddingLeft:t===n.BorderMode.NONE?"0":e.spacing.xs},fontWeight:e.fontWeights.normal,...o?{whiteSpace:"nowrap",maxWidth:e.sizes.tableColumnMaxWidth,overflow:"hidden",textOverflow:"ellipsis"}:{whiteSpace:"nowrap",[`${B}`]:{display:"inline-block",width:"fit-content",maxWidth:e.sizes.tableColumnMaxWidth,whiteSpace:"normal",overflowWrap:"normal",wordBreak:"normal",overflowY:"hidden",verticalAlign:"top",margin:0},[`${B}:has(pre)`]:{display:"block",width:"100%",maxWidth:"none"},[`${B} p`]:{whiteSpace:"normal",overflowWrap:"normal",wordBreak:"normal",margin:0}}}),W=b("td",{target:"evac33h4"})(({theme:e,borderMode:t,truncateContent:o})=>M(e,t,o)),Z={corner:3,header:2,index:1},k=b("th",{target:"evac33h5"})(({theme:e,borderMode:t,stickyType:o,stickyTopOffset:r,stickyLeftOffset:c,truncateContent:d})=>{const f={...M(e,t,d),textAlign:"inherit",color:e.colors.fadedText60,"&:first-of-type":{paddingLeft:t===n.BorderMode.NONE?"0":e.spacing.sm},"&:not(:first-of-type)":{paddingLeft:t===n.BorderMode.NONE||t===n.BorderMode.HORIZONTAL?e.spacing.lg:e.spacing.sm}};if(o){const i={position:"sticky",backgroundColor:e.colors.bgColor};return(o==="header"||o==="corner")&&(i.top=r??0),(o==="index"||o==="corner")&&(i.left
1=c??0),i.zIndex=Z[o],{...f,...i}}return f}),j=b(W,{target:"evac33h6"})(({theme:e})=>({color:e.colors.gray70,fontStyle:"italic",fontSize:e.fontSizes.md,textAlign:"center"})),K="2rem";function X(e,t){return e*t}function Y(e,t){if(e&&t)return"corner";if(e)return"header";if(t)return"index"}function P(e){const t=e.data,{cssId:o,cssStyles:r,caption:c}=t.styler??{},{numHeaderRows:d,numDataRows:f,numColumns:i,numIndexColumns:p}=t.dimensions,u=x(f),g=e.element.borderMode,l=!!e.heightConfig?.pixelHeight,a=!!e.widthConfig?.pixelWidth,y=!!e.widthConfig?.useContent,S=l,m=a&&p===1,h=a,T=O.useMemo(()=>x(d).map(C=>X(C,E(K))),[d]),w=[0];return v(F,{className:"stTable","data-testid":"stTable",children:[r&&s("style",{children:r}),s(_,{borderMode:g,hasScrollableHeight:l,tabIndex:l||a?0:void 0,role:l||a?"region":void 0,"aria-label":l||a?"Scrollable table":void 0,children:v(I,{id:o,"data-testid":"stTableStyledTable",useContentWidth:y,hasScrollableWidth:a,children:[d>0&&Q(t,g,S,m,p,T,w,h),s("tbody",{children:u.length===0?s("tr",{children:s(j,{"data-testid":"stTableStyledEmptyTableCell",colSpan:i||1,borderMode:g,truncateContent:h,children:"empty"})}):u.map(C=>q(t,C,i,g,m,p,w,h))})]})}),c&&s(D,{children:c})]})}function Q(e,t,o,r,c,d,f,i){const p=t===n.BorderMode.NONE||t===n.BorderMode.HORIZONTAL;return s("thead",{children:H(e).map((u,g)=>s("tr",{children:u.map((l,a)=>{let y="inherit";if(p&&e.dimensions.numDataRows>0){const{contentType:R}=e.getCell(0,a);y=A(R)?"right":"left"}const S=a<c,m=o,h=r&&S,T=m?d[g]:void 0,w=h?f[a]:void 0,C=Y(m,h);return s(k,{className:l.cssClass,scope:"col",borderMode:t,stickyType:C,stickyTopOffset:T,stickyLeftOffset:w,truncateContent:i,style:{textAlign:y},children:s(N,{source:l.name||"Â ",allowHTML:!1})},a)})},g))})}function q(e,t,o,r,c,d,f,i){return s("tr",{children:x(o).map(p=>G(e,t,p,r,c,d,f,i))},t)}function G(e,t,o,r,c,d,f,i){const{type:p,content:u,contentType:g}=e.getCell(t,o),l=$(e,t,o);let a=l?.displayContent||z(u,g),y=!1;const S={textAlign:A(g)?"right":"left"};switch(a?.endsWith('<span class="pd-t"></span>')&&(a=a.replace(/<span class="pd-t"><\/span>$/,""),y=!0),p){case L.INDEX:{const m=o<d,h=c&&m?"index":void 0,T=h==="index"?f[o]:void 0;return v(k,{scope:"row",id:l?.cssId,className:l?.cssClass,borderMode:r,stickyType:h,stickyLeftOffset:T,truncateContent:i,children:[y&&s("span",{className:"pd-t"}),s(N,{source:a||"Â ",allowHTML:!1})]},o)}case L.DATA:return v(W,{id:l?.cssId,className:l?.cssClass,style:S,borderMode:r,truncateContent:i,children:[y&&s("span",{className:"pd-t"}),s(N,{source:a||"Â ",allowHTML:!1})]},o);default:throw new Error(`Cannot parse type "${p}".`)}}const oe=O.memo(P);export{oe as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.