"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
var _chunkGST2HPBEcjs = require('./chunk-GST2HPBE.cjs');var _chunk5KRCPBZRcjs = require('./chunk-5KRCPBZR.cjs');var _chunk3CNSKST2cjs = require('./chunk-3CNSKST2.cjs');var _chunk5NXYDZPPcjs = require('./chunk-5NXYDZPP.cjs');var _react = require('react');var _clsx = require('clsx'); var _clsx2 = _interopRequireDefault(_clsx);var G=_chunk3CNSKST2cjs.a.call(void 0, "EulTable",["alignLeft","alignRight","alignCenter","root","tableBody","tableCell","tableCellHead","tableHeader","tableRow","clickable","sortLabel","noPadding","sortActive","sortedAsc","sortedDesc","sticky","stickyLeft","stickyRight","firstStickyRight","lastStickyLeft"]),i=t=>_chunk5KRCPBZRcjs.e.call(void 0, "EulTable",{root:["root",_optionalChain([t, 'optionalAccess', _2 => _2.noPadding])&&"noPadding"],sortLabel:["sortLabel",_optionalChain([t, 'optionalAccess', _3 => _3.active])&&"sortActive",_optionalChain([t, 'optionalAccess', _4 => _4.direction])&&`sorted${_chunk3CNSKST2cjs.d.call(void 0, t.direction)}`],tableBody:["tableBody"],tableCell:[_optionalChain([t, 'optionalAccess', _5 => _5.clickable])&&"clickable",_optionalChain([t, 'optionalAccess', _6 => _6.align])&&`align${_chunk3CNSKST2cjs.d.call(void 0, t.align)}`,_optionalChain([t, 'optionalAccess', _7 => _7.sticky])&&"sticky",_optionalChain([t, 'optionalAccess', _8 => _8.sticky])&&typeof t.right>"u"&&"stickyLeft",_optionalChain([t, 'optionalAccess', _9 => _9.sticky])&&typeof t.right<"u"&&typeof t.left>"u"&&"stickyRight"],tableCellBody:["tableCell"],tableCellHead:["tableCellHead"],tableHeader:["tableHeader"],tableRow:["tableRow",_optionalChain([t, 'optionalAccess', _10 => _10.clickable])&&"clickable"]}),o= exports.a =G;var _react3 = require('@emotion/react');var W=_chunk3CNSKST2cjs.m.call(void 0, "div")(({theme:t})=>_react3.css`
    display: none;
    width: 0;
    height: 0;
    color: ${t.palette.background[700]};
    border-right: 4px solid transparent;
    border-bottom: 5px solid currentColor;
    border-left: 4px solid transparent;

    .${o.sortLabel}.${o.sortActive} &,
    .${o.sortLabel}:hover & {
      display: block;
    }

    .${o.sortLabel}.${o.sortActive} & {
      color: ${t.palette.background[900]};
    }

    .${o.alignRight} & {
      order: -1;
    }

    .${o.sortedDesc}.${o.sortActive} & {
      border-top: 5px solid currentColor;
      border-bottom: 0;
    }
  `),D=_chunk3CNSKST2cjs.m.call(void 0, "button")(({theme:t})=>_react3.css`
    position: relative;
    display: flex;
    flex: 1;
    gap: ${t.spacing(3)};
    align-items: center;
    justify-content: inherit;
    width: 100%;
    color: inherit;
    background-color: transparent;
    border: none;
    cursor: pointer;
  `);var _jsxruntime = require('react/jsx-runtime');var v=_react.forwardRef.call(void 0, ({active:t,children:r,className:l,direction:e,...a},s)=>{let b=i({active:t,direction:e});return _jsxruntime.jsxs.call(void 0, D,{...a,className:_clsx2.default.call(void 0, l,b.sortLabel),ref:s,children:[r,_jsxruntime.jsx.call(void 0, W,{})]})});v.displayName="SortLabel";v.defaultProps={active:!1,direction:"asc"};var L=v;var j=`${_chunkGST2HPBEcjs.a.MissingProvider}: <TableSlot.Provider>`,ee=_react.createContext.call(void 0, {get variant(){throw new Error(j)}}),g=ee;var c=t=>t.palette.background[500],I=_chunk3CNSKST2cjs.m.call(void 0, "div",{shouldForwardProp:t=>!["width","colSpan","left","right"].includes(String(t))})(({colSpan:t,left:r,right:l,theme:e,width:a})=>_react3.css`
    position: relative;
    display: flex;
    flex: 1;
    flex-basis: ${a&&`${a}px`};
    flex-grow: ${t};
    gap: ${e.spacing(3)};
    align-items: center;
    max-width: ${a&&`${a}px`};
    padding: ${e.spacing(4)};
    color: ${e.palette.background[1e3]};

    .${o.noPadding} & {
      padding: ${e.spacing(3,0)};
    }

    &.${o.alignRight} {
      justify-content: flex-end;
    }

    &.${o.alignCenter} {
      justify-content: center;
    }

    &.${o.clickable} {
      cursor: pointer;
    }

    &.${o.sticky} {
      position: sticky;
      z-index: 1;
    }

    &.${o.stickyRight} {
      right: ${l||0}px;
    }

    &.${o.stickyLeft} {
      left: ${r||0}px;
    }

    &.${o.lastStickyLeft} {
      box-shadow: inset -1px 0 0 0 ${e.palette.background[600]};
    }

    &.${o.firstStickyRight} {
      box-shadow: inset 1px 0 0 0 ${e.palette.background[600]};
    }

    &.${o.tableCell} {
      font-size: ${e.typography.body1.fontSize};
      line-height: ${e.typography.body1.lineHeight};
      background: ${e.palette.background[500]};

      &:before {
        position: absolute;
        top: 0;
        left: 0;
        z-index: 0;
        width: 100%;
        height: 100%;
        background: ${_chunk5NXYDZPPcjs.v.call(void 0, e.palette.common.white,.02)};
        opacity: 0;
        transition: ${e.transitions.create("opacity")};
        content: "";
      }

      &:first-of-type {
        padding-left: ${e.spacing(8)};
        border-left: 1px solid ${c(e)};
      }

      &:last-of-type {
        padding-right: ${e.spacing(8)};
        border-right: 1px solid ${c(e)};
      }

      [role="row"].${o.clickable}:hover & {
        &:before {
          opacity: 1;
        }
      }

      [role="row"]:last-of-type & {
        border-bottom: 1px solid ${c(e)};

        &:first-of-type,
        &:first-of-type:before {
          border-bottom-left-radius: ${e.spacing(2)};
        }

        &:last-of-type,
        &:last-of-type:before {
          border-bottom-right-radius: ${e.spacing(2)};
        }
      }
    }

    &.${o.tableCellHead} {
      padding: ${e.spacing(3,4)};
      color: ${e.palette.background[900]};
      font-weight: ${e.typography.fontWeightRegular};
      font-size: ${e.typography.body2.fontSize};
      line-height: ${e.typography.body2.lineHeight};
      background: ${e.palette.background[400]};
      border: 1px solid ${c(e)};
      border-width: 1px 0 0;

      &:before {
        position: absolute;
        top: 50%;
        right: 1px;
        width: 1px;
        height: ${e.spacing(4)};
        background-color: ${e.palette.background[500]};
        transform: translateY(-50%);
        content: "";
      }

      &:last-of-type:before,
      &.${o.lastStickyLeft}:before, &.${o.firstStickyRight}:before {
        opacity: 0;
      }

      &:first-of-type {
        padding-left: ${e.spacing(8)};

        &,
        &:before {
          border-left: 1px solid ${c(e)};
          border-top-left-radius: ${e.spacing(2)};
        }
      }

      &:last-of-type {
        padding-right: ${e.spacing(8)};

        &,
        &:before {
          border-right: 1px solid ${c(e)};
          border-top-right-radius: ${e.spacing(2)};
        }
      }
    }
  `);var w=_react.forwardRef.call(void 0, ({align:t,children:r,className:l,colSpan:e,left:a,onClick:s,right:b,sticky:C,width:y,...d},n)=>{let f=_chunk5KRCPBZRcjs.d.call(void 0, d),{variant:m}=_react.useContext.call(void 0, g),S=i({align:t,clickable:!!s,left:a,right:b,sticky:C});return a&&b&&console.warn("TableCell: left and right props are mutually exclusive. Please use only one."),_jsxruntime.jsx.call(void 0, I,{...f,className:_clsx2.default.call(void 0, l,S.tableCell,m==="body"?S.tableCellBody:S.tableCellHead),colSpan:e,left:a,onClick:s,ref:n,right:b,role:m==="body"?"cell":"columnheader",width:y,children:r})});w.displayName="TableCell";w.defaultProps={align:"left"};var h=w;var _reactslot = require('@radix-ui/react-slot');var F=_react.forwardRef.call(void 0, ({asChild:t,children:r,className:l,onClick:e,...a},s)=>{let b=i({clickable:!!e||!!t}),C=t?_reactslot.Slot:"div",y=_react.useMemo.call(void 0, ()=>_react.Children.toArray(r).reduce((n,f,m)=>(_react.isValidElement.call(void 0, f)&&f.props.sticky&&(typeof f.props.right>"u"?n.lastLeftIndex=m:n.firstRightIndex===-1&&(n.firstRightIndex=m)),n),{firstRightIndex:-1,lastLeftIndex:-1}),[r]);return _jsxruntime.jsx.call(void 0, C,{...a,className:_clsx2.default.call(void 0, l,b.tableRow),onClick:e,ref:s,role:"row",children:_react.Children.map(r,(d,n)=>_react.isValidElement.call(void 0, d)?_react.cloneElement.call(void 0, d,{className:_clsx2.default.call(void 0, d.props.className,{[o.firstStickyRight]:n===y.firstRightIndex,[o.lastStickyLeft]:n===y.lastLeftIndex})}):d)})});F.displayName="TableRow";var R=F;var V=_chunk3CNSKST2cjs.m.call(void 0, "div")({display:"flex",flexDirection:"column",[`&.${o.tableBody}`]:{gap:1}});var H=_react.forwardRef.call(void 0, ({children:t,className:r,variant:l,...e},a)=>{let s=i();return _jsxruntime.jsx.call(void 0, g.Provider,{value:{variant:l},children:_jsxruntime.jsx.call(void 0, V,{...e,className:_clsx2.default.call(void 0, r,l==="body"?s.tableBody:s.tableHeader),ref:a,role:"rowgroup",children:t})})});H.displayName="TableSlot";var x=_react.forwardRef.call(void 0, ({children:t,className:r,...l},e)=>_jsxruntime.jsx.call(void 0, H,{...l,className:r,ref:e,variant:"body",children:t}));x.displayName="TableBody";var $=_react.forwardRef.call(void 0, ({children:t,className:r,...l},e)=>_jsxruntime.jsx.call(void 0, H,{...l,className:r,ref:e,variant:"header",children:t}));$.displayName="TableHeader";var Y=_chunk3CNSKST2cjs.m.call(void 0, "div")(()=>_react3.css`
    width: 100%;

    & .${o.tableRow} {
      position: relative;
      display: flex;
      align-items: stretch;
      text-decoration: none;

      &.${o.clickable} {
        cursor: pointer;
      }
    }
  `);var q=_react.forwardRef.call(void 0, ({children:t,className:r,...l},e)=>{let a=_chunk5KRCPBZRcjs.d.call(void 0, l),s=i({noPadding:l.noPadding});return _jsxruntime.jsx.call(void 0, Y,{...a,className:_clsx2.default.call(void 0, s.root,r),ref:e,role:"table",children:t})});q.displayName="Table";var Te=Object.assign(q,{Body:x,Cell:h,Header:$,Row:R,SortLabel:L}),xe= exports.b =Te;exports.a = o; exports.b = xe;
