aha-components 1.8.1 → 1.8.2

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.
Files changed (92) hide show
  1. package/dist/Input.esm.js +1 -1
  2. package/dist/Input.esm.js.map +1 -1
  3. package/dist/Input.js +1 -1
  4. package/dist/Input.js.map +1 -1
  5. package/dist/Pagination.esm.js +1 -1
  6. package/dist/Pagination.esm.js.map +1 -1
  7. package/dist/Pagination.js +1 -1
  8. package/dist/Pagination.js.map +1 -1
  9. package/dist/Table.esm.js +1 -1
  10. package/dist/Table.esm.js.map +1 -1
  11. package/dist/Table.js +1 -1
  12. package/dist/Table.js.map +1 -1
  13. package/dist/Textarea.esm.js +1 -1
  14. package/dist/Textarea.esm.js.map +1 -1
  15. package/dist/Textarea.js +1 -1
  16. package/dist/Textarea.js.map +1 -1
  17. package/dist/components/Checkbox/Checkbox.stories 2.d.ts +12 -0
  18. package/dist/components/Checkbox/index 2.d.ts +12 -0
  19. package/dist/components/DatePicker/DatePicker.stories 2.d.ts +25 -0
  20. package/dist/components/DatePicker/index 2.d.ts +96 -0
  21. package/dist/components/Drawer/Drawer.stories 2.d.ts +9 -0
  22. package/dist/components/Drawer/index 2.d.ts +58 -0
  23. package/dist/components/Form/Form.stories 2.d.ts +15 -0
  24. package/dist/components/Form/FormContext 2.d.ts +41 -0
  25. package/dist/components/Form/FormItem 2.d.ts +58 -0
  26. package/dist/components/Form/index 2.d.ts +85 -0
  27. package/dist/components/Input/Input.stories 2.d.ts +16 -0
  28. package/dist/components/Input/Input.stories.d.ts +7 -4
  29. package/dist/components/Input/InputGroup.d.ts +25 -0
  30. package/dist/components/Input/InputTags.d.ts +17 -0
  31. package/dist/components/Input/index 2.d.ts +41 -0
  32. package/dist/components/Input/index.d.ts +7 -18
  33. package/dist/components/Loading/Loading.stories 2.d.ts +11 -0
  34. package/dist/components/Loading/index 2.d.ts +10 -0
  35. package/dist/components/MenuList/MenuList.stories 2.d.ts +17 -0
  36. package/dist/components/MenuList/MenuList.test 2.d.ts +1 -0
  37. package/dist/components/MenuList/index 2.d.ts +85 -0
  38. package/dist/components/Pagination/Pagination.stories 2.d.ts +16 -0
  39. package/dist/components/Pagination/index 2.d.ts +27 -0
  40. package/dist/components/Popover/Popover.stories 2.d.ts +11 -0
  41. package/dist/components/Popover/index 2.d.ts +31 -0
  42. package/dist/components/Progress/Progress.stories 2.d.ts +18 -0
  43. package/dist/components/Progress/Progress.test 2.d.ts +1 -0
  44. package/dist/components/Progress/index 2.d.ts +33 -0
  45. package/dist/components/Radio/Radio.stories 2.d.ts +10 -0
  46. package/dist/components/Radio/index 2.d.ts +13 -0
  47. package/dist/components/Select/Select.stories 2.d.ts +17 -0
  48. package/dist/components/Select/index 2.d.ts +74 -0
  49. package/dist/components/Switch/Switch.stories 2.d.ts +14 -0
  50. package/dist/components/Switch/index 2.d.ts +27 -0
  51. package/dist/components/Tab/Tab.stories 2.d.ts +19 -0
  52. package/dist/components/Tab/index 2.d.ts +26 -0
  53. package/dist/components/Table/Table.stories 2.d.ts +21 -0
  54. package/dist/components/Table/index 2.d.ts +167 -0
  55. package/dist/components/Textarea/Textarea.stories 2.d.ts +15 -0
  56. package/dist/components/Textarea/Textarea.stories.d.ts +3 -6
  57. package/dist/components/Textarea/TextareaTags.d.ts +8 -0
  58. package/dist/components/Textarea/index 2.d.ts +38 -0
  59. package/dist/components/Textarea/index.d.ts +6 -17
  60. package/dist/components/Tooltip/Tooltip.stories 2.d.ts +20 -0
  61. package/dist/components/Tooltip/index 2.d.ts +35 -0
  62. package/dist/icons/index 2.d.ts +33 -0
  63. package/dist/index.css +962 -1
  64. package/dist/index.d.ts +54 -36
  65. package/dist/index.esm.css +962 -1
  66. package/dist/index.esm.js +1 -1
  67. package/dist/index.esm.js.map +1 -1
  68. package/dist/index.js +1 -1
  69. package/dist/index.js.map +1 -1
  70. package/dist/stories/DesignTokens.stories 2.d.ts +5 -0
  71. package/dist/theme/Theme.stories 2.d.ts +10 -0
  72. package/dist/theme/ThemeContext 2.d.ts +11 -0
  73. package/dist/theme/utils 2.d.ts +10 -0
  74. package/dist/tokens.d.ts +2 -0
  75. package/package.json +1 -1
  76. package/dist/AlertComponent.esm.js +0 -2
  77. package/dist/AlertComponent.esm.js.map +0 -1
  78. package/dist/AlertComponent.js +0 -2
  79. package/dist/AlertComponent.js.map +0 -1
  80. package/dist/Card.esm.js +0 -2
  81. package/dist/Card.esm.js.map +0 -1
  82. package/dist/Card.js +0 -2
  83. package/dist/Card.js.map +0 -1
  84. package/dist/TestComponent.esm.js +0 -2
  85. package/dist/TestComponent.esm.js.map +0 -1
  86. package/dist/TestComponent.js +0 -2
  87. package/dist/TestComponent.js.map +0 -1
  88. package/dist/Toast.css +0 -1
  89. package/dist/Toast.esm.css +0 -1
  90. package/dist/components/AlertComponent/index.d.ts +0 -9
  91. package/dist/components/Card/index.d.ts +0 -10
  92. package/dist/components/TestComponent/index.d.ts +0 -7
package/dist/Table.esm.js CHANGED
@@ -1,2 +1,2 @@
1
- import{jsxs as e,jsx as n,Fragment as o}from"react/jsx-runtime";import t,{createContext as r,useContext as i,useState as a,forwardRef as l,useRef as d,useEffect as s,useCallback as c,useMemo as u}from"react";import{createPortal as p}from"react-dom";var f=function(){return f=Object.assign||function(e){for(var n,o=1,t=arguments.length;o<t;o++)for(var r in n=arguments[o])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},f.apply(this,arguments)};function h(e,n){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(o[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(t=Object.getOwnPropertySymbols(e);r<t.length;r++)n.indexOf(t[r])<0&&Object.prototype.propertyIsEnumerable.call(e,t[r])&&(o[t[r]]=e[t[r]])}return o}function v(e,n,o){if(o||2===arguments.length)for(var t,r=0,i=n.length;r<i;r++)!t&&r in n||(t||(t=Array.prototype.slice.call(n,0,r)),t[r]=n[r]);return e.concat(t||Array.prototype.slice.call(n))}"function"==typeof SuppressedError&&SuppressedError;var g={primaryColor:"#FB6011"},x=r(g),m=function(){var e=i(x);return e||g},y={sm:"sm",md:"md",lg:"lg",xl:"xl",small:"sm",mediumSmall:"sm",medium:"md",large:"xl"},b={primary:"primary",secondary:"secondary",tertiary:"tertiary","link-color":"link-color","link-gray":"link-gray","destructive-primary":"destructive-primary","destructive-secondary":"destructive-secondary","destructive-tertiary":"destructive-tertiary","destructive-link":"destructive-link",default:"secondary"},w={sm:{height:36,paddingX:12,paddingXLg:12,fontSize:14,lineHeight:20,iconSize:20,gap:4,iconOnlyPad:8},md:{height:40,paddingX:14,paddingXLg:14,fontSize:14,lineHeight:20,iconSize:20,gap:4,iconOnlyPad:10},lg:{height:44,paddingX:16,paddingXLg:16,fontSize:16,lineHeight:24,iconSize:20,gap:6,iconOnlyPad:12},xl:{height:48,paddingX:18,paddingXLg:18,fontSize:16,lineHeight:24,iconSize:20,gap:6,iconOnlyPad:14}},k=function(t){var r=t.size,i=t.color;return e(o,{children:[n("style",{children:"@keyframes aha-button-spin{from{transform:rotate(0)}to{transform:rotate(360deg)}}"}),e("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,style:{animation:"aha-button-spin 1s linear infinite",flexShrink:0},children:[n("circle",{cx:"12",cy:"12",r:"10",stroke:i,strokeWidth:"2",opacity:"0.25"}),n("path",{d:"M22 12a10 10 0 0 1-10 10",stroke:i,strokeWidth:"2",strokeLinecap:"round",fill:"none"})]})]})},C=function(o){var t=o.children,r=o.type,i=void 0===r?"secondary":r,l=o.size,d=void 0===l?"md":l,s=o.disabled,c=void 0!==s&&s,u=o.loading,p=void 0!==u&&u,v=o.iconOnly,g=o.focused,x=void 0!==g&&g,C=o.onClick,S=o.htmlType,z=void 0===S?"button":S,F=o.className,A=void 0===F?"":F,W=o.style,L=o.icon,I=o.iconPosition,B=void 0===I?"left":I,D=h(o,["children","type","size","disabled","loading","iconOnly","focused","onClick","htmlType","className","style","icon","iconPosition"]),E=m().primaryColor,j=a(!1),M=j[0],N=j[1],H=a(!1),R=H[0],T=H[1],O=b[i]||"secondary",P=w[y[d]||"md"],_=null!=v?v:!!L&&null==t,K="link-color"===O||"link-gray"===O||"destructive-link"===O,X=c||p,q=x,Y=E,V=function(){if(c)return"primary"===O||"secondary"===O||"destructive-primary"===O||"destructive-secondary"===O?{bg:"var(--color-bg-disabled, #f5f5f4)",color:"var(--color-fg-disabled, #a9a29d)",iconColor:"var(--color-fg-disabled, #a9a29d)",border:"1px solid var(--color-border-disabled_subtle, #e7e5e4)",boxShadow:"none"}:{bg:"transparent",color:"var(--color-fg-disabled, #a9a29d)",iconColor:"var(--color-fg-disabled, #a9a29d)",border:"none",boxShadow:"none"};var e=M||R;return"primary"===O?{bg:e?"var(--color-bg-brand-solid_hover, #ec470a)":Y||"var(--color-bg-brand-solid, #fb6011)",color:"var(--color-text-white, #ffffff)",iconColor:"var(--color-brand-300, #feb073)",border:"none",boxShadow:"var(--shadow-xs-skeuomorphic, 0 1px 2px 0 rgba(10,13,18,.05))"}:"secondary"===O?{bg:e?"var(--color-bg-primary_hover, #fafaf9)":"var(--color-bg-primary, #ffffff)",color:e?"var(--color-text-secondary_hover, #292524)":"var(--color-text-secondary, #44403c)",iconColor:e?"var(--color-fg-quaternary_hover, #79716b)":"var(--color-fg-quaternary, #a9a29d)",border:"none",boxShadow:"var(--shadow-xs-skeuomorphic)"}:"tertiary"===O?{bg:e?"var(--color-bg-primary_hover, #fafaf9)":"transparent",color:e?"var(--color-text-tertiary_hover, #44403c)":"var(--color-text-tertiary, #57534e)",iconColor:e?"var(--color-fg-quaternary_hover, #79716b)":"var(--color-fg-quaternary, #a9a29d)",border:"none",boxShadow:"none"}:"link-color"===O?{bg:"transparent",color:e?"var(--color-text-brand-secondary_hover, #c4330a)":"var(--color-text-brand-secondary, #ec470a)",iconColor:"var(--color-fg-brand-secondary_alt, #fb6011)",border:"none",boxShadow:"none",textDecoration:e?"underline":"none"}:"link-gray"===O?{bg:"transparent",color:e?"var(--color-text-tertiary_hover, #44403c)":"var(--color-text-tertiary, #57534e)",iconColor:"var(--color-fg-quaternary, #a9a29d)",border:"none",boxShadow:"none",textDecoration:e?"underline":"none"}:"destructive-primary"===O?{bg:e?"var(--color-error-600)":"var(--color-error-500)",color:"var(--color-text-white)",iconColor:e?"var(--color-error-200)":"var(--color-error-300)",border:"none",boxShadow:"var(--shadow-xs-skeuomorphic)"}:"destructive-secondary"===O?{bg:e?"var(--color-bg-error-primary)":"var(--color-bg-primary)",color:"var(--color-text-error-primary)",iconColor:"var(--color-fg-error-secondary)",border:"none",boxShadow:"inset 0 0 0 1px var(--color-border-error_subtle), inset 0 -2px 0 0 rgba(10,13,18,0.05), 0 1px 2px 0 rgba(10,13,18,0.05)"}:"destructive-tertiary"===O?{bg:e?"var(--color-bg-error-primary)":"transparent",color:"var(--color-text-error-primary)",iconColor:"var(--color-fg-error-secondary)",border:"none",boxShadow:"none"}:{bg:"transparent",color:e?"var(--color-text-error-primary_hover)":"var(--color-text-error-primary)",iconColor:"var(--color-fg-error-secondary)",border:"none",boxShadow:"none",textDecoration:e?"underline":"none"}}(),J=function(){if(q)return"destructive-primary"===O||"destructive-secondary"===O||"destructive-tertiary"===O||"destructive-link"===O?"destructive-primary"===O||"destructive-secondary"===O?"var(--focus-ring-error-shadow-xs-skeuomorphic)":"var(--focus-ring-error)":"primary"===O||"secondary"===O?"var(--focus-ring-shadow-xs-skeuomorphic, 0 0 0 2px #fff, 0 0 0 4px #fb6011)":"var(--focus-ring, 0 0 0 2px #fff, 0 0 0 4px #fb6011)"}(),Q=f({position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",gap:P.gap,fontFamily:'var(--font-family-body, "DM Sans", system-ui, sans-serif)',fontWeight:600,fontSize:P.fontSize,lineHeight:"".concat(P.lineHeight,"px"),cursor:X?"not-allowed":"pointer",outline:"none",transition:"background-color .15s ease, color .15s ease, box-shadow .15s ease",userSelect:"none",WebkitTapHighlightColor:"transparent",whiteSpace:"nowrap",backgroundColor:V.bg,color:V.color,border:V.border,boxShadow:null!=J?J:V.boxShadow,textDecoration:V.textDecoration},W);K?(Q.borderRadius="4px",Q.overflow="hidden",_?(Q.width=P.height,Q.height=P.height,Q.padding=0):(Q.height=P.height,Q.paddingLeft=P.paddingX,Q.paddingRight=P.paddingX)):(Q.borderRadius="var(--radius-md, 8px)",_?(Q.width=P.height,Q.height=P.height,Q.padding=0):(Q.height=P.height,Q.paddingLeft=P.paddingX,Q.paddingRight=P.paddingX));var U=function(){return p?n(k,{size:P.iconSize,color:V.iconColor}):L?n("span",{"aria-hidden":!0,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:P.iconSize,height:P.iconSize,color:V.iconColor,flexShrink:0},children:L}):null},G=p||L&&"left"===B,Z=!p&&L&&"right"===B;return e("button",f({type:z,className:["aha-button","aha-button--".concat(O),"aha-button--".concat(y[d]||"md"),_&&"aha-button--icon-only",X&&"aha-button--disabled",p&&"aha-button--loading",q&&"aha-button--focused",A].filter(Boolean).join(" "),disabled:X,onClick:function(e){X?e.preventDefault():null==C||C(e)},onMouseEnter:function(){return!X&&N(!0)},onMouseLeave:function(){N(!1),T(!1)},onMouseDown:function(){return!X&&T(!0)},onMouseUp:function(){return T(!1)},style:Q},D,{children:[G&&U(),!_&&t,Z&&U(),_&&!L&&!p&&t]}))};C.displayName="Button";var S=l(function(r,i){var a=r.size,l=void 0===a?"medium":a,c=r.disabled,u=void 0!==c&&c,p=r.error,v=void 0!==p&&p,g=r.readOnly,x=void 0!==g&&g,y=r.prefix,b=r.suffix,w=r.allowClear,k=void 0!==w&&w,C=r.onClear,S=r.className,z=void 0===S?"":S,F=r.style,A=r.type,W=void 0===A?"text":A,L=r.placeholder,I=r.value,B=r.defaultValue,D=r.onChange,E=r.onFocus,j=r.onBlur,M=r.onPressEnter,N=h(r,["size","disabled","error","readOnly","prefix","suffix","allowClear","onClear","className","style","type","placeholder","value","defaultValue","onChange","onFocus","onBlur","onPressEnter"]),H=m().primaryColor,R=void 0===H?"#FB6011":H,T=d(null),O=t.useState(B||I||""),P=O[0],_=O[1],K=t.useState(!1),X=K[0],q=K[1];s(function(){"function"==typeof i?i(T.current):i&&(i.current=T.current)},[i]);var Y=void 0!==I,V=Y?I:P,J=function(e){var n;e.stopPropagation(),Y||_("");null==D||D({target:{value:""},currentTarget:{value:""}}),null==C||C(),null===(n=T.current)||void 0===n||n.focus()},Q=k&&V&&!u,U={small:{height:"32px",paddingTop:"3px",paddingBottom:"3px"},mediumSmall:{height:"36px",paddingTop:"5px",paddingBottom:"5px"},medium:{height:"40px",paddingTop:"7px",paddingBottom:"7px"},large:{height:"48px",paddingTop:"11px",paddingBottom:"11px"}},G=b||Q?"40px":"12px",Z=f({width:"100%",boxSizing:"border-box",fontFamily:"DM Sans, sans-serif",borderRadius:"8px",border:"1px solid ".concat(v?"#F04438":X?R:"#D7D3D0"),backgroundColor:u||x?"#FAFAF9":"#FFFFFF",color:u?"#98A2B3":"#1C1917",fontSize:"16px",fontWeight:400,lineHeight:"24px",paddingLeft:y?"40px":"12px",paddingRight:G,paddingTop:U[l].paddingTop,paddingBottom:U[l].paddingBottom,transition:"all 0.2s",outline:"none",WebkitAppearance:"none",MozAppearance:"textfield",appearance:"none"},F);return e(o,{children:[n("style",{children:'\n .aha-input-wrapper input::placeholder {\n color: #D7D3D0;\n font-size: 16px;\n font-weight: 400;\n opacity: 1;\n }\n .aha-input-wrapper input::-webkit-input-placeholder {\n color: #D7D3D0;\n font-size: 16px;\n font-weight: 400;\n opacity: 1;\n }\n .aha-input-wrapper input::-moz-placeholder {\n color: #D7D3D0;\n font-size: 16px;\n font-weight: 400;\n opacity: 1;\n }\n .aha-input-wrapper input:-ms-input-placeholder {\n color: #D7D3D0;\n font-size: 16px;\n font-weight: 400;\n opacity: 1;\n }\n /* 移动端优化 */\n .aha-input-wrapper input {\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none;\n touch-action: manipulation;\n }\n /* 移除数字输入框的上下箭头 */\n .aha-input-wrapper input[type="number"]::-webkit-inner-spin-button,\n .aha-input-wrapper input[type="number"]::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n .aha-input-wrapper input[type="number"] {\n -moz-appearance: textfield;\n }\n '}),e("div",{className:"aha-input-wrapper ".concat(z),style:{position:"relative",display:"inline-flex",alignItems:"center",width:"100%"},children:[y&&n("span",{style:{position:"absolute",left:"12px",display:"flex",alignItems:"center",color:u?"#98A2B3":"#78716C",zIndex:1,pointerEvents:"none"},children:y}),n("input",f({ref:T,type:W,value:V,placeholder:L,disabled:u,readOnly:x,onChange:function(e){Y||_(e.target.value),null==D||D(e)},onFocus:function(e){q(!0),null==E||E(e)},onBlur:function(e){q(!1),null==j||j(e)},onKeyDown:function(e){var n;"Enter"===e.key&&M&&M(e),null===(n=N.onKeyDown)||void 0===n||n.call(N,e)},style:Z,autoComplete:N.autoComplete||"off",autoCorrect:N.autoCorrect||"off",autoCapitalize:N.autoCapitalize||"off",spellCheck:N.spellCheck||!1},N)),(b||Q)&&e("span",{style:{position:"absolute",right:"12px",display:"flex",alignItems:"center",gap:"4px",color:u?"#98A2B3":"#78716C",zIndex:1},children:[Q&&n(function(){return n("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:J,style:{cursor:"pointer",flexShrink:0,color:"#78716C"},children:n("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})},{}),b&&n("span",{style:{pointerEvents:"none"},children:b})]})]})]})});S.displayName="Input";var z=function(r){var i,l=r.value,h=r.defaultValue,g=r.options,x=void 0===g?[]:g,y=r.mode,b=r.disabled,w=void 0!==b&&b,k=r.error,C=void 0!==k&&k,S=r.placeholder,z=void 0===S?"Please select":S,F=r.size,A=void 0===F?"medium":F,W=r.showSearch,L=void 0!==W&&W,I=r.filterOption,B=void 0===I||I,D=r.allowClear,E=void 0!==D&&D,j=r.onChange,M=r.onSelect,N=r.onDeselect,H=r.onSearch,R=r.onFocus,T=r.onBlur,O=r.onDropdownVisibleChange,P=r.className,_=void 0===P?"":P,K=r.style,X=r.dropdownClassName,q=void 0===X?"":X,Y=r.dropdownStyle,V=r.defaultOpen,J=void 0!==V&&V,Q=r.open,U=r.maxTagCount,G=r.tagRender,Z=r.optionRender,$=m().primaryColor,ee=void 0===$?"#FB6011":$,ne=a(void 0!==h?h:y?[]:void 0),oe=ne[0],te=ne[1],re=a(J),ie=re[0],ae=re[1],le=a(""),de=le[0],se=le[1],ce=a(-1),ue=ce[0],pe=ce[1],fe=d(null),he=d(null),ve=d(null),ge=a(null),xe=ge[0],me=ge[1],ye=void 0!==l,be=void 0!==Q,we=ye?l:oe,ke=be?Q:ie,Ce="multiple"===y||"tags"===y,Se=c(function(){if(!we)return[];var e=Array.isArray(we)?we:[we];return x.filter(function(n){return e.includes(n.value)})},[we,x]),ze=c(function(){return L&&de?!1===B?x:"function"==typeof B?x.filter(function(e){return B(de,e)}):x.filter(function(e){var n=String(e.label||"").toLowerCase(),o=de.toLowerCase();return n.includes(o)}):x},[x,de,L,B]),Fe=u(function(){return ze()},[ze]);s(function(){if(ke&&fe.current){var e=function(){var e,n;if(fe.current){var o=fe.current.getBoundingClientRect(),t=null!==(n=null===(e=ve.current)||void 0===e?void 0:e.offsetHeight)&&void 0!==n?n:Math.min(256,Math.max(40,40*Fe.length)),r=window.innerHeight-o.bottom,i=o.top,a=r<t+4&&i>r,l=a?o.top+window.scrollY-t-4:o.bottom+window.scrollY+4;me({top:l,left:o.left+window.scrollX,width:o.width,placement:a?"top":"bottom"})}};return e(),requestAnimationFrame(e),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),function(){window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0)}}me(null)},[ke,Fe.length]),s(function(){var e=function(e){var n=e.target;fe.current&&!fe.current.contains(n)&&ve.current&&!ve.current.contains(n)&&(be||ae(!1),null==O||O(!1),se(""))};if(ke)return document.addEventListener("mousedown",e,!0),document.addEventListener("touchstart",e,!0),function(){document.removeEventListener("mousedown",e,!0),document.removeEventListener("touchstart",e,!0)}},[ke,be,O]),s(function(){if(ke){var e=function(e){var n;if("ArrowDown"===e.key)e.preventDefault(),pe(function(e){return e<Fe.length-1?e+1:e});else if("ArrowUp"===e.key)e.preventDefault(),pe(function(e){return e>0?e-1:0});else if("Enter"===e.key&&ue>=0){e.preventDefault();var o=Fe[ue];o&&!o.disabled&&Ae(o)}else"Escape"===e.key&&(e.preventDefault(),be||ae(!1),null==O||O(!1),null===(n=fe.current)||void 0===n||n.focus())};return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}}},[ke,Fe,ue,be,O]),s(function(){if(ue>=0&&ve.current){var e=ve.current.querySelectorAll(".aha-select-option")[ue];e&&e.scrollIntoView({block:"nearest",behavior:"smooth"})}},[ue]);var Ae=c(function(e){var n;if(!e.disabled)if(Ce){var o,t=Array.isArray(we)?we:[];t.includes(e.value)?(o=t.filter(function(n){return n!==e.value}),null==N||N(e.value,e)):(o=v(v([],t,!0),[e.value],!1),null==M||M(e.value,e)),ye||te(o);var r=x.filter(function(e){return o.includes(e.value)});null==j||j(o,r)}else ye||te(e.value),null==j||j(e.value,e),null==M||M(e.value,e),be||ae(!1),null==O||O(!1),se(""),null===(n=fe.current)||void 0===n||n.focus()},[Ce,we,ye,be,x,j,M,N,O]),We=c(function(e,n){if(e.stopPropagation(),Ce&&Array.isArray(we)){var o=we.filter(function(e){return e!==n}),t=x.find(function(e){return e.value===n});ye||te(o),null==j||j(o,Se()),null==N||N(n,t)}},[Ce,we,ye,x,j,N,Se]),Le=function(e){e.stopPropagation();var n=Ce?[]:void 0;ye||te(n),null==j||j(n,[]),se("")},Ie={small:{height:"32px",paddingTop:"3px",paddingBottom:"3px",fontSize:"16px",lineHeight:"24px"},mediumSmall:{height:"36px",paddingTop:"5px",paddingBottom:"5px",fontSize:"16px",lineHeight:"24px"},medium:{height:"40px",paddingTop:"7px",paddingBottom:"7px",fontSize:"16px",lineHeight:"24px"},large:{height:"48px",paddingTop:"11px",paddingBottom:"11px",fontSize:"16px",lineHeight:"24px"}},Be=u(function(){return Se()},[Se]),De=u(function(){return E&&we&&!w},[E,we,w]),Ee=u(function(){return Ce?Array.isArray(we)&&we.length>0:null!=we&&""!==we},[Ce,we]),je=u(function(){if(!Ce||!Array.isArray(we)||0===we.length)return null;var o="responsive"===U?Be.slice(0,2):U?Be.slice(0,U):Be,r=U&&Be.length>o.length?Be.length-o.length:0;return e("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:"4px",flex:1,minWidth:0},children:[o.map(function(o){var r={label:o.label,value:o.value,closable:!w,onClose:function(){return We({},o.value)}};return G?n(t.Fragment,{children:G(r)},o.value):e("span",{style:{display:"inline-flex",alignItems:"center",gap:"4px",padding:"2px 8px",backgroundColor:"#F5F5F4",borderRadius:"4px",fontSize:"12px",lineHeight:"18px",color:"#101828",fontFamily:"DM Sans, sans-serif",maxWidth:"100%"},children:[n("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o.label}),!w&&n("span",{onClick:function(e){return We(e,o.value)},style:{cursor:"pointer",display:"flex",alignItems:"center",color:"#78716C",marginLeft:"4px"},children:n("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n("path",{d:"M9 3L3 9M3 3L9 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]},o.value)}),r>0&&e("span",{style:{fontSize:"12px",lineHeight:"18px",color:"#78716C",fontFamily:"DM Sans, sans-serif"},children:["+",r]})]})},[Ce,we,Be,U,w,G]);return e(o,{children:[n("style",{children:"\n @keyframes dropdownFadeIn {\n from {\n opacity: 0;\n transform: translateY(-8px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n "}),e("div",{ref:fe,className:"aha-select ".concat(_),style:f({position:"relative",display:"inline-flex",alignItems:"center",width:"100%",minWidth:"120px",boxSizing:"border-box",fontFamily:"DM Sans, sans-serif",borderRadius:"8px",border:"1px solid ".concat(C?"#F04438":ke?ee:"#D7D3D0"),backgroundColor:w?"#FAFAF9":"#FFFFFF",cursor:w?"not-allowed":"pointer",transition:"all 0.2s",paddingLeft:"12px",paddingRight:"36px",paddingTop:Ie[A].paddingTop,paddingBottom:Ie[A].paddingBottom,fontSize:Ie[A].fontSize,lineHeight:Ie[A].lineHeight,fontWeight:400,WebkitTapHighlightColor:"transparent",WebkitTouchCallout:"none",touchAction:"manipulation",userSelect:"none"},K),onClick:function(){if(!w){var e=!ke;be||ae(e),null==O||O(e),e&&L?setTimeout(function(){var e;null===(e=he.current)||void 0===e||e.focus()},0):se("")}},onFocus:function(e){null==R||R(e)},onBlur:function(e){null==T||T(e)},onTouchStart:function(e){w||(e.currentTarget.style.opacity="0.8")},onTouchEnd:function(e){e.currentTarget.style.opacity="1"},tabIndex:w?-1:0,children:[n("div",{style:{display:"flex",alignItems:"center",flex:1,minWidth:0,gap:"8px"},children:Ce?je||n("span",z?{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:"#79716B",fontSize:"16px",lineHeight:"24px",fontWeight:400},children:z}:{style:{flex:1,minHeight:"24px"}}):L&&ke?n("input",{ref:he,type:"text",value:de,onChange:function(e){var n=e.target.value;se(n),null==H||H(n),pe(-1)},onClick:function(e){return e.stopPropagation()},onFocus:function(e){return e.stopPropagation()},style:{flex:1,border:"none",outline:"none",background:"transparent",fontSize:"16px",lineHeight:"24px",fontWeight:400,color:w?"#98A2B3":"#1C1917",fontFamily:"DM Sans, sans-serif",minWidth:0,WebkitAppearance:"none",appearance:"none"},placeholder:Ee?void 0:z,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1}):n("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:Ee?w?"#98A2B3":"#1C1917":"#79716B",fontSize:"16px",lineHeight:"24px",fontWeight:400,minHeight:"24px",display:"inline-block"},children:Ee?(null===(i=Be[0])||void 0===i?void 0:i.label)||we:z||" "})}),e("div",{style:{position:"absolute",right:"12px",display:"flex",alignItems:"center",gap:"4px"},children:[De&&n(function(){return n("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:Le,style:{cursor:"pointer",flexShrink:0,color:"#78716C"},children:n("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})},{}),n(function(e){var o=e.isOpen;return n("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{transform:o?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease-in-out",flexShrink:0},children:n("path",{d:"M4 6L8 10L12 6",stroke:"#78716C",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})},{isOpen:ke})]})]}),ke&&xe&&p(n("div",{ref:ve,className:"aha-select-dropdown ".concat(q),style:f({position:"absolute",top:"".concat(xe.top,"px"),left:"".concat(xe.left,"px"),width:"".concat(xe.width,"px"),zIndex:1050,backgroundColor:"#FFFFFF",borderRadius:"8px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",border:"1px solid #E7E5E4",maxHeight:"256px",overflow:"auto",opacity:0,transform:"top"===xe.placement?"translateY(8px)":"translateY(-8px)",animation:"dropdownFadeIn 0.2s ease-out forwards",transformOrigin:"top"===xe.placement?"bottom center":"top center",WebkitOverflowScrolling:"touch",overscrollBehavior:"contain"},Y),children:0===Fe.length?n("div",{style:{padding:"8px 16px",textAlign:"center",color:"#78716C",fontSize:"14px",fontFamily:"DM Sans, sans-serif"},children:"No data"}):Fe.map(function(o,t){var r=Ce?Array.isArray(we)&&we.includes(o.value):we===o.value,i=t===ue;return Z?n("div",{className:"aha-select-option ".concat(o.disabled?"":"hover:bg-[#FAFAF9]"," ").concat(r?"bg-[#FAFAF9]":""),onClick:function(){return!o.disabled&&Ae(o)},style:{cursor:o.disabled?"not-allowed":"pointer",transition:"background-color 0.2s"},children:Z(o,{selected:r,focused:i,disabled:o.disabled||!1})},o.value):e("div",{className:"aha-select-option ".concat(o.disabled?"":"hover:bg-[#FAFAF9]"," ").concat(r?"bg-[#FAFAF9]":""),onClick:function(){return Ae(o)},style:{padding:"8px 16px",cursor:o.disabled?"not-allowed":"pointer",color:o.disabled?"#98A2B3":"#101828",fontSize:"14px",lineHeight:"20px",fontFamily:"DM Sans, sans-serif",display:"flex",alignItems:"center",justifyContent:"space-between",transition:"background-color 0.2s"},children:[n("span",{children:o.label}),r&&n("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i?"hidden":"",children:n("path",{d:"M13.3333 4L6 11.3333L2.66667 8",stroke:ee,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]},o.value)})}),document.body)]})};z.displayName="Select";var F=function(e){var o=e.className,t=e.style;return n("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:o,style:t,children:n("path",{d:"M3.5 7.5L6 10L8.5 7.5M3.5 4.5L6 2L8.5 4.5",stroke:"#A9A29D",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})},A=function(o){var t=o.className,r=o.style;return e("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,style:r,children:[n("path",{d:"M3.5 4.5L6 2L8.5 4.5",stroke:"#A9A29D",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),n("path",{d:"M3.5 7.5L6 10L8.5 7.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})},W=function(o){var t=o.className,r=o.style;return e("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,style:r,children:[n("path",{d:"M8.5 7.5L6 10L3.5 7.5",stroke:"#A9A29D",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),n("path",{d:"M8.5 4.5L6 2L3.5 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})},L=function(e){var o=e.className,t=e.style;return n("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:o,style:t,children:n("path",{d:"M15.8334 10H4.16675M4.16675 10L10.0001 15.8334M4.16675 10L10.0001 4.16669",stroke:"currentColor",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})})},I=function(e){var o=e.className,t=e.style;return n("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:o,style:t,children:n("path",{d:"M4.16675 10H15.8334M15.8334 10L10.0001 4.16669M15.8334 10L10.0001 15.8334",stroke:"currentColor",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})})},B=function(t){var r=t.current,i=t.defaultCurrent,l=void 0===i?1:i,d=t.total,c=void 0===d?0:d,p=t.pageSize,h=t.defaultPageSize,v=void 0===h?10:h,g=t.showSizeChanger,x=void 0!==g&&g,y=t.pageSizeOptions,b=void 0===y?["10","20","50","100"]:y,w=t.showQuickJumper,k=void 0!==w&&w,F=t.showTotal,A=t.onChange,W=t.onShowSizeChange,B=t.simple,D=void 0!==B&&B,E=t.disabled,j=void 0!==E&&E,M=t.hideOnSinglePage,N=void 0!==M&&M,H=t.className,R=void 0===H?"":H,T=t.style,O=t.size,P=void 0===O?"default":O,_=t.responsive,K=void 0!==_&&_;t.showLessItems;var X=t.itemRender,q=m().primaryColor,Y=void 0===q?"#FB6011":q,V=a(l),J=V[0],Q=V[1],U=a(v),G=U[0],Z=U[1],$=a(""),ee=$[0],ne=$[1],oe=null!=r?r:J,te=null!=p?p:G,re=u(function(){return Math.ceil(c/te)},[c,te]);s(function(){void 0!==r&&Q(r)},[r]),s(function(){void 0!==p&&Z(p)},[p]);var ie=function(e){e<1||e>re||e===oe||j||(void 0===r&&Q(e),null==A||A(e,te))},ae=function(){var e=parseInt(ee,10);e>=1&&e<=re&&(ie(e),ne(""))};if(N&&re<=1)return null;if(D)return e("div",{className:"aha-pagination aha-pagination-simple ".concat(R),style:T,children:[n(C,{onClick:function(){return ie(oe-1)},disabled:j||1===oe,type:"default",size:"default"===P?"medium":"small",style:{marginRight:"8px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:n(L,{})}),e("span",{style:{margin:"0 8px",fontSize:"14px",lineHeight:"20px",color:"#475467",fontFamily:"DM Sans, sans-serif"},children:[oe," / ",re]}),n(C,{onClick:function(){return ie(oe+1)},disabled:j||oe===re,type:"default",size:"default"===P?"medium":"small",style:{marginLeft:"8px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:n(I,{})})]});var le=(oe-1)*te+1,de=Math.min(oe*te,c);return e("div",{className:"aha-pagination w-full ".concat(R),style:f({display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:K?"wrap":"nowrap",fontFamily:"DM Sans, sans-serif"},T),children:[F&&n("div",{className:"justify-start text-Text-text-secondary text-sm font-medium font-['DM_Sans'] leading-5",children:F(c,[le,de])}),e("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[c>0&&n(o,{children:X?X(oe-1,"prev",n(C,{onClick:function(){return ie(oe-1)},disabled:j||1===oe,type:"default",size:"default"===P?"medium":"small",style:{height:"small"===P?"32px":"36px",padding:"0 12px",gap:"4px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:n(L,{})})):n(C,{onClick:function(){return ie(oe-1)},disabled:j||1===oe,type:"default",size:"default"===P?"medium":"small",style:{height:"small"===P?"32px":"36px",padding:"0 12px",gap:"4px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:n(L,{})})}),n("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:function(){if(re<=7)return Array.from({length:re},function(e,n){return n+1});var e=[];if(oe<=4){for(var n=1;n<=5;n++)e.push(n);e.push("jump-next"),e.push(re)}else if(oe>=re-3){e.push(1),e.push("jump-prev");for(n=re-4;n<=re;n++)e.push(n)}else{e.push(1),e.push("jump-prev");for(n=oe-1;n<=oe+1;n++)e.push(n);e.push("jump-next"),e.push(re)}return e}().map(function(e){return function(e){if("number"==typeof e){var o=e===oe,t=n(C,{onClick:function(){return ie(e)},disabled:j,type:o?"primary":"default",size:"default"===P?"medium":"small",style:{minWidth:"small"===P?"32px":"36px",height:"small"===P?"32px":"36px",padding:"0 12px",margin:0,fontWeight:o?500:400,border:o?"1px solid ".concat(Y):void 0,boxShadow:"none",borderRadius:"8px"},children:e},e);return X?X(e,"page",t):t}if("jump-prev"===e)return t=n(C,{onClick:function(){return ie(Math.max(1,oe-5))},disabled:j,type:"default",size:"default"===P?"medium":"small",style:{minWidth:"small"===P?"32px":"36px",height:"small"===P?"32px":"36px",padding:"0 12px",margin:0,border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:"•••"},"jump-prev"),X?X(oe-5,"jump-prev",t):t;if("jump-next"===e)return t=n(C,{onClick:function(){return ie(Math.min(re,oe+5))},disabled:j,type:"default",size:"default"===P?"medium":"small",style:{minWidth:"small"===P?"32px":"36px",height:"small"===P?"32px":"36px",padding:"0 12px",margin:0,border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:"•••"},"jump-next"),X?X(oe+5,"jump-next",t):t;return null}(e)})}),c>0&&n(o,{children:X?X(oe+1,"next",n(C,{onClick:function(){return ie(oe+1)},disabled:j||oe===re,type:"default",size:"default"===P?"medium":"small",style:{height:"small"===P?"32px":"36px",padding:"0 12px",gap:"4px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:n(I,{})})):n(C,{onClick:function(){return ie(oe+1)},disabled:j||oe===re,type:"default",size:"default"===P?"medium":"small",style:{height:"small"===P?"32px":"36px",padding:"0 12px",gap:"4px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:n(I,{})})}),x&&n(z,{value:te,options:b.map(function(e){return{label:"".concat(e," / page"),value:Number(e)}}),onChange:function(e){return n=Number(e),o=Math.ceil(c/n),t=oe>o?o:oe,void 0===p&&Z(n),void 0===r&&Q(t),null==W||W(t,n),void(null==A||A(t,n));var n,o,t},disabled:j,size:"small"===P?"small":"medium",style:{minWidth:"small"===P?80:96}}),k&&e("div",{style:{display:"flex",alignItems:"center",gap:"8px",fontFamily:"DM Sans, sans-serif"},children:[n("span",{style:{fontSize:"14px",lineHeight:"20px",color:"#475467"},children:"Go to"}),n(S,{type:"number",min:1,value:ee,onChange:function(e){return ne(e.target.value)},onPressEnter:ae,disabled:j,size:"small"===P?"small":"medium",style:{width:56,minWidth:56}}),n("span",{style:{fontSize:"14px",lineHeight:"20px",color:"#475467"},children:"page"}),"object"==typeof k&&k.goButton?n(C,{onClick:ae,disabled:j,type:"default",size:"default"===P?"medium":"small",style:{border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:k.goButton}):n(C,{onClick:ae,disabled:j,type:"default",size:"default"===P?"medium":"small",style:{border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:"OK"})]})]})]})},D=function(o){var t=o.checked,r=void 0!==t&&t,i=o.indeterminate,l=void 0!==i&&i,d=o.disabled,s=void 0!==d&&d,c=o.onChange,u=o.className,p=void 0===u?"":u,h=o.style,v=o.children,g=o.size,x=void 0===g?"sm":g,m=o.hint,y=o.isFocused,b=a(!1),w=b[0],k=b[1],C=a(!1),S=C[0],z=C[1],F=r||l,A=null!=y?y:S,W=function(){s||(null==c||c({target:{checked:!r},currentTarget:{checked:!r}}))},L="sm"===x?"16px":"20px",I="sm"===x?"12px":"14px",B="sm"===x?"var(--radius-xs, 4px)":"var(--radius-sm, 6px)",D="sm"===x?"var(--font-size-text-sm, 14px)":"var(--font-size-text-md, 16px)",E="sm"===x?"var(--line-height-text-sm, 20px)":"var(--line-height-text-md, 24px)",j="sm"===x?"var(--spacing-md, 8px)":"var(--spacing-lg, 12px)",M=s&&F?"var(--color-fg-disabled_subtle, #d7d3d0)":"var(--color-fg-white, #ffffff)",N=v||m;return e("div",{className:"aha-checkbox ".concat(p),role:"checkbox","aria-checked":l?"mixed":r,"aria-disabled":s,tabIndex:s?-1:0,style:f({display:"inline-flex",alignItems:"flex-start",gap:j,cursor:s?"not-allowed":"pointer",outline:"none"},h),onClick:W,onKeyDown:function(e){" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),W())},onMouseEnter:function(){return!s&&k(!0)},onMouseLeave:function(){return k(!1)},onFocus:function(){return!s&&z(!0)},onBlur:function(){return z(!1)},children:[e("div",{style:{position:"relative",width:L,height:L,minWidth:L,minHeight:L,flexShrink:0,borderRadius:B,border:s?"1px solid var(--color-border-disabled, #d7d3d0)":F?w?"1px solid var(--color-bg-brand-solid_hover, #ec470a)":"1px solid var(--color-bg-brand-solid, #fb6011)":"1px solid var(--color-border-primary, #d7d3d0)",backgroundColor:s?"var(--color-bg-disabled_subtle, #fafaf9)":F?w?"var(--color-bg-brand-solid_hover, #ec470a)":"var(--color-bg-brand-solid, #fb6011)":w?"var(--color-bg-primary_hover, #fafaf9)":"var(--color-bg-primary, #ffffff)",display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color 0.15s, border-color 0.15s, box-shadow 0.15s",boxSizing:"border-box",boxShadow:A?"var(--focus-ring, 0px 0px 0px 2px #ffffff, 0px 0px 0px 4px #fb6011)":"none",marginTop:N?"2px":"0"},children:[n("svg",{"aria-hidden":"true",viewBox:"0 0 14 14",fill:"none",style:{position:"absolute",width:I,height:I,color:M,opacity:l?1:0,transition:"opacity 0.15s",pointerEvents:"none"},children:n("path",{d:"M2.91675 7H11.0834",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),n("svg",{"aria-hidden":"true",viewBox:"0 0 14 14",fill:"none",style:{position:"absolute",width:I,height:I,color:M,opacity:r&&!l?1:0,transition:"opacity 0.15s",pointerEvents:"none"},children:n("path",{d:"M11.6666 3.5L5.24992 9.91667L2.33325 7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]}),N&&e("div",{style:{display:"inline-flex",flexDirection:"column",gap:"md"===x?"var(--spacing-xxs, 2px)":"0"},children:[v&&n("span",{style:{fontSize:D,lineHeight:E,fontWeight:"var(--font-weight-medium, 500)",fontFamily:'var(--font-family-body, "DM Sans", sans-serif)',color:s?"var(--color-text-disabled, #79716b)":"var(--color-text-secondary, #44403c)",userSelect:"none"},children:v}),m&&n("span",{style:{fontSize:D,lineHeight:E,fontWeight:"var(--font-weight-regular, 400)",fontFamily:'var(--font-family-body, "DM Sans", sans-serif)',color:"var(--color-text-tertiary, #57534e)"},onClick:function(e){return e.stopPropagation()},children:m})]})]})};D.displayName="Checkbox";var E=function(t){var r=t.color;return e(o,{children:[n("style",{children:"\n @keyframes aha-table-loading-spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n }\n "}),e("svg",{width:32,height:32,viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,style:{animation:"aha-table-loading-spin 1s linear infinite"},children:[n("circle",{cx:"12",cy:"12",r:"10",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"32",strokeDashoffset:"24",opacity:.3}),n("circle",{cx:"12",cy:"12",r:"10",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"32",strokeDashoffset:"16"})]})]})},j=function(e){var o=e.loading,t=e.spinColor;if(!o)return null;var r=!0===o?n(E,{color:t}):o;return n("div",{role:"status","aria-live":"polite","aria-label":"Loading",className:"aha-table-loading-overlay",style:{position:"absolute",inset:0,zIndex:50,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(255, 255, 255, 0.55)",pointerEvents:"auto"},children:r})},M=function(e,n){return"string"==typeof n?null==e?void 0:e[n]:n.reduce(function(e,n){return null==e?void 0:e[n]},e)},N=function(e,n){var o,t;return"function"==typeof n?n(e):"string"==typeof n?null!==(o=M(e,n))&&void 0!==o?o:"":null!==(t=e.key)&&void 0!==t?t:""},H=function(e){var o=e.order,t=m().primaryColor;return"ascend"===o?n(W,{style:{color:t}}):"descend"===o?n(A,{style:{color:t}}):n(F,{})},R=function(o){var r,i,l,p,g=o.columns,x=void 0===g?[]:g,y=o.dataSource,b=void 0===y?[]:y,w=o.rowKey,k=void 0===w?"key":w,C=o.rowSelection,S=o.pagination,z=void 0!==S&&S,F=o.size,A=void 0===F?"middle":F,W=o.bordered,L=void 0!==W&&W,I=o.loading,E=void 0!==I&&I,R=o.locale,T=o.showHeader,O=void 0===T||T,P=o.title,_=o.footer,K=o.summary,X=o.scroll,q=o.tableLayout,Y=void 0===q?"auto":q,V=o.onChange,J=o.onSorterChange,Q=o.onPaginationChange,U=o.onRow,G=o.className,Z=void 0===G?"":G,$=o.innerClassName,ee=void 0===$?"":$,ne=o.style,oe=o.expandable,te=o.rowClassName,re=o.onHeaderRow;o.sticky;var ie=h(o,["columns","dataSource","rowKey","rowSelection","pagination","size","bordered","loading","locale","showHeader","title","footer","summary","scroll","tableLayout","onChange","onSorterChange","onPaginationChange","onRow","className","innerClassName","style","expandable","rowClassName","onHeaderRow","sticky"]),ae=m().primaryColor||"#FB6011",le=a((null==C?void 0:C.selectedRowKeys)||(null==C?void 0:C.defaultSelectedRowKeys)||[]),de=le[0],se=le[1];s(function(){void 0!==(null==C?void 0:C.selectedRowKeys)&&se(C.selectedRowKeys)},[null==C?void 0:C.selectedRowKeys]);var ce=a(new Map),ue=ce[0],pe=ce[1],fe=a((null==oe?void 0:oe.defaultExpandedRowKeys)||[]),he=fe[0],ve=fe[1],ge=a(z&&"object"==typeof z&&(z.current||z.defaultCurrent)||1),xe=ge[0],me=ge[1],ye=a(z&&"object"==typeof z&&(z.pageSize||z.defaultPageSize)||10),be=ye[0],we=ye[1];s(function(){z&&"object"==typeof z&&(void 0!==z.current&&me(z.current),void 0!==z.pageSize&&we(z.pageSize))},[z]);var ke=a(null),Ce=ke[0],Se=ke[1],ze=a(null),Fe=ze[0],Ae=ze[1],We=a(!1),Le=We[0],Ie=We[1],Be=d(null),De=d(null);s(function(){var e=function(){Ie(window.innerWidth<768)};return e(),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}},[]);var Ee=c(function(e,n){var o,t,r,i=null===(o=null==C?void 0:C.getCheckboxProps)||void 0===o?void 0:o.call(C,e);if(!(null==i?void 0:i.disabled)){var a,l=N(e,k);a="radio"===(null==C?void 0:C.type)?n?[l]:[]:n?v(v([],de,!0),[l],!1):de.filter(function(e){return e!==l}),se(a);var d=b.filter(function(e){return a.includes(N(e,k))});null===(t=null==C?void 0:C.onChange)||void 0===t||t.call(C,a,d),null===(r=null==C?void 0:C.onSelect)||void 0===r||r.call(C,e,n,d,new Event("select"))}},[de,k,C,b]),je=c(function(e,n){var o,t,r=n.filter(function(e){var n;return!(null===(n=null==C?void 0:C.getCheckboxProps)||void 0===n?void 0:n.call(C,e).disabled)}).map(function(e){return N(e,k)}),i=e?r:[];se(i);var a=b.filter(function(e){return i.includes(N(e,k))}),l=e?n.filter(function(e){var n;return!(null===(n=null==C?void 0:C.getCheckboxProps)||void 0===n?void 0:n.call(C,e).disabled)}):[];null===(o=null==C?void 0:C.onChange)||void 0===o||o.call(C,i,a),null===(t=null==C?void 0:C.onSelectAll)||void 0===t||t.call(C,e,a,l)},[k,C,b]),Me=c(function(e,n){var o=e.key||(Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex);if(o){var t=new Map(ue);null===n?t.delete(o):t.set(o,n),pe(t);var r=Array.from(t.entries()).map(function(n){var o=n[0],t=n[1];return{column:x.find(function(e){return(e.key||(Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex))===o})||e,order:t,field:o,columnKey:o}}),i={column:e,order:n,field:o,columnKey:o};e.onSorterChange&&e.onSorterChange(i),J&&J(1===r.length?r[0]:r),V&&V({current:xe,pageSize:be},{},1===r.length?r[0]:r,{currentDataSource:b,action:"sort"})}},[ue,V,J,xe,be,b,x]);c(function(e,n){var o,t,r,i=N(e,k);r=n?v(v([],he,!0),[i],!1):he.filter(function(e){return e!==i}),ve(r),null===(o=null==oe?void 0:oe.onExpand)||void 0===o||o.call(oe,n,e),null===(t=null==oe?void 0:oe.onExpandedRowsChange)||void 0===t||t.call(oe,r)},[he,k,oe]);var Ne,He=c(function(){var e=v([],b,!0);return ue.size>0&&e.sort(function(e,n){for(var o=function(o,t){var r=x.find(function(e){return(e.key||(Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex))===o});if(!r)return"continue";var i=0;if("function"==typeof r.sorter)i=r.sorter(e,n);else if(!0===r.sorter){var a=M(e,r.dataIndex||o),l=M(n,r.dataIndex||o);a<l?i=-1:a>l&&(i=1)}return 0!==i?{value:"ascend"===t?i:-i}:void 0},t=0,r=Array.from(ue.entries());t<r.length;t++){var i=r[t],a=o(i[0],i[1]);if("object"==typeof a)return a.value}return 0}),e},[b,ue,x]),Re=He(),Te=Boolean(z&&"object"==typeof z&&void 0!==z.total),Oe=u(function(){if(!1===z||!z)return Re;if(Te)return Re;var e=(xe-1)*be,n=e+be;return Re.slice(e,n)},[Re,xe,be,z,Te]),Pe=c(function(e,n){var o,t,r=null!=n?n:be;if(me(e),n&&we(n),Q&&Q(e,r),z&&"object"==typeof z&&(null===(o=z.onChange)||void 0===o||o.call(z,e,n),n&&(null===(t=z.onShowSizeChange)||void 0===t||t.call(z,e,n))),V){var i=Array.from(ue.entries()).map(function(e){var n=e[0],o=e[1];return{column:x.find(function(e){return(e.key||(Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex))===n}),order:o,field:n,columnKey:n}});V({current:e,pageSize:r},{},1===i.length?i[0]:i,{currentDataSource:Re,action:"paginate"})}},[z,Q,V,be,ue,x,Re]),_e=c(function(e,n,o){var t=M(n,e.dataIndex||"");return e.render?e.render(t,n,o):t},[]),Ke=c(function(e,n,o){if(n){var t=!0===n?"left":n,r=0;if("left"===t){if(C&&("left"===C.fixed||!0===C.fixed))r+="number"==typeof C.columnWidth?C.columnWidth:"string"==typeof C.columnWidth?parseInt(C.columnWidth):60;for(var i=0;i<e;i++){if("left"===(a=x[i]).fixed||!0===a.fixed)r+=a.width?"number"==typeof a.width?a.width:parseInt(a.width)||0:150}return r}if("right"===t){for(i=e+1;i<x.length;i++){var a;if("right"===(a=x[i]).fixed)r+=a.width?"number"==typeof a.width?a.width:parseInt(a.width)||0:150}if(C&&"right"===C.fixed)r+="number"==typeof C.columnWidth?C.columnWidth:"string"==typeof C.columnWidth?parseInt(C.columnWidth):60;return r}}},[x,C]),Xe=c(function(){if(!O)return null;var o,t,r,i,a=x.map(function(o,t){var r,i=o.key||(Array.isArray(o.dataIndex)?o.dataIndex.join("."):o.dataIndex)||t,a=ue.get(i)||null,l=Ke(t,o.fixed,!0),d=o.width?"number"==typeof o.width?"".concat(o.width,"px"):o.width:void 0;return n("th",f({className:"".concat(o.className||""," ").concat(o.align?"text-".concat(o.align):""),style:{width:d,minWidth:o.minWidth?"number"==typeof o.minWidth?"".concat(o.minWidth,"px"):o.minWidth:d||void 0,maxWidth:d,position:o.fixed?"sticky":"relative",left:"left"===o.fixed||!0===o.fixed?void 0!==l?"".concat(l,"px"):"0":void 0,right:"right"===o.fixed?void 0!==l?"".concat(l,"px"):"0":void 0,zIndex:o.fixed?"left"===o.fixed||!0===o.fixed?10:9:1,backgroundColor:(o.fixed,"#F9FAFB"),boxShadow:"left"===o.fixed||!0===o.fixed?"2px 0 4px rgba(0, 0, 0, 0.05)":"right"===o.fixed?"-2px 0 4px rgba(0, 0, 0, 0.05)":void 0,padding:"12px 16px",textAlign:o.align||"left",borderBottom:"1px solid #EAECF0",fontWeight:600,fontSize:"12px",lineHeight:"18px",color:"#475467",fontFamily:"DM Sans, sans-serif"}},(null===(r=o.onHeaderCell)||void 0===r?void 0:r.call(o,o))||{},{children:e("div",{style:{display:"flex",alignItems:"center",gap:"8px",justifyContent:"right"===o.align?"flex-end":"center"===o.align?"center":"flex-start"},children:[n("span",{style:{fontWeight:600,fontSize:"12px",lineHeight:"18px",color:"#475467"},children:"function"==typeof o.title?o.title({sortOrder:a,sortColumn:o}):o.title}),o.sorter&&n("button",{onClick:function(){Me(o,null===a?"ascend":"ascend"===a?"descend":null)},style:{border:"none",background:"none",cursor:"pointer",display:"flex",alignItems:"center",padding:"2px",color:a?"#475467":"#98A2B3"},children:n(H,{order:a||void 0})})]})}),i)});if(C){var l="number"==typeof C.columnWidth?"".concat(C.columnWidth,"px"):"string"==typeof C.columnWidth?C.columnWidth:"60px",d=n("th",{style:{width:l,position:C.fixed?"sticky":"relative",left:"left"===C.fixed||!0===C.fixed?"0px":void 0,right:"right"===C.fixed?"0px":void 0,zIndex:C.fixed?"left"===C.fixed||!0===C.fixed?12:11:1,backgroundColor:"#F9FAFB",padding:"12px 16px",borderBottom:"1px solid #EAECF0",fontWeight:600,fontSize:"12px",lineHeight:"18px",color:"#475467",fontFamily:"DM Sans, sans-serif",textAlign:"center"},children:e("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:[!C.hideSelectAll&&"radio"!==C.type&&(o=Oe.filter(function(e){var n;return!(null===(n=C.getCheckboxProps)||void 0===n?void 0:n.call(C,e).disabled)}),t=o.map(function(e){return N(e,k)}),r=o.length>0&&t.every(function(e){return de.includes(e)}),i=t.some(function(e){return de.includes(e)}),n(D,{checked:r,indeterminate:i&&!r,onChange:function(e){return je(e.target.checked,Oe)}})),C.columnTitle&&n("span",{style:{marginLeft:C.hideSelectAll?0:"8px"},children:C.columnTitle})]})},"selection");a.unshift(d)}var s=null==re?void 0:re(x,0);return n("thead",{ref:De,children:n("tr",f({},s||{},{children:a}))})},[x,O,ue,C,de,Oe,k,Me,je,R,re,Ke]),qe=c(function(e){Se(e)},[]),Ye=c(function(e,n){e.preventDefault(),Ae(n)},[]),Ve=c(function(e,n){if(e.preventDefault(),null===Ce||Ce===n)return Se(null),void Ae(null);var o=v([],Oe,!0),t=o[Ce];o.splice(Ce,1),o.splice(n,0,t),Se(null),Ae(null)},[Ce,Oe]),Je=c(function(){Se(null),Ae(null)},[]),Qe=c(function(){var e=null==R?void 0:R.emptyText,o="function"==typeof e?e():void 0!==e?e:"No data",t=x.length+(C?1:0);return n("tr",{className:"aha-table-placeholder",children:n("td",{colSpan:t,style:{padding:"48px 16px",textAlign:"center",color:"#98A2B3",fontSize:"14px",lineHeight:"20px",fontFamily:"DM Sans, sans-serif",borderBottom:"none",backgroundColor:"white"},children:o})})},[null==R?void 0:R.emptyText,x.length,C]),Ue=c(function(){return 0===Oe.length?Qe():Oe.map(function(o,r){var i,a=N(o,k),l=de.includes(a),d=he.includes(a),s=(null==U?void 0:U(o,r))||{},c=r===Oe.length-1;return e(t.Fragment,{children:[e("tr",f({className:"".concat("function"==typeof te?te(o,r):te||""," ").concat(Ce===r?"dragging":""," ").concat(Fe===r?"drag-over":""),draggable:!0,onDragStart:function(){return qe(r)},onDragOver:function(e){return Ye(e,r)},onDrop:function(e){return Ve(e,r)},onDragEnd:Je,style:f({cursor:"move",opacity:Ce===r?.5:1,backgroundColor:Fe===r?"#F9FAFB":"white",transition:"background-color 0.2s"},s.style),onMouseEnter:function(e){Ce!==r&&Fe!==r&&(e.currentTarget.style.backgroundColor="#F9FAFB")},onMouseLeave:function(e){Ce!==r&&Fe!==r&&(e.currentTarget.style.backgroundColor="white")}},s,{children:[C&&n("td",{style:{width:"number"==typeof C.columnWidth?"".concat(C.columnWidth,"px"):"string"==typeof C.columnWidth?C.columnWidth:"60px",position:C.fixed?"sticky":"relative",left:"left"===C.fixed||!0===C.fixed?"0px":void 0,right:"right"===C.fixed?"0px":void 0,zIndex:C.fixed?"left"===C.fixed||!0===C.fixed?12:11:1,backgroundColor:"white",padding:"16px",borderBottom:c?"none":"1px solid #EAECF0",textAlign:"center"},children:n("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:n(D,{checked:l,onChange:function(e){return Ee(o,e.target.checked)},disabled:null===(i=C.getCheckboxProps)||void 0===i?void 0:i.call(C,o).disabled})})}),x.map(function(e,t){var i,a=e.key||(Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex)||t,l=(null===(i=e.onCell)||void 0===i?void 0:i.call(e,o,r))||{},d=Ke(t,e.fixed,!1),s=e.width?"number"==typeof e.width?"".concat(e.width,"px"):e.width:void 0;return n("td",f({className:"".concat(e.className||""," ").concat(e.align?"text-".concat(e.align):""),style:f({width:s,minWidth:e.minWidth?"number"==typeof e.minWidth?"".concat(e.minWidth,"px"):e.minWidth:s||void 0,maxWidth:s,position:e.fixed?"sticky":"relative",left:"left"===e.fixed||!0===e.fixed?void 0!==d?"".concat(d,"px"):"0":void 0,right:"right"===e.fixed?void 0!==d?"".concat(d,"px"):"0":void 0,zIndex:e.fixed?"left"===e.fixed||!0===e.fixed?10:9:1,backgroundColor:"white",boxShadow:"left"===e.fixed||!0===e.fixed?"2px 0 4px rgba(0, 0, 0, 0.05)":"right"===e.fixed?"-2px 0 4px rgba(0, 0, 0, 0.05)":void 0,padding:"16px",borderBottom:c?"none":"1px solid #EAECF0",fontSize:"14px",lineHeight:"20px",color:"#101828",fontFamily:"DM Sans, sans-serif",textAlign:e.align||"left"},l.style),colSpan:e.colSpan,rowSpan:e.rowSpan},l,{children:_e(e,o,r)}),a)})]})),(null==oe?void 0:oe.expandedRowRender)&&d&&n("tr",{children:n("td",{colSpan:x.length+(C?1:0),children:oe.expandedRowRender(o,r,0,!0)})})]},a)})},[Oe,k,de,he,C,x,U,te,Ee,_e,oe,Ce,Fe,qe,Ye,Ve,Je,Ke,Qe]),Ge=function(){var e;if(!1===z||!z)return null;var o=null!==(e=z.total)&&void 0!==e?e:Re.length,t=z.position||"bottomRight";return n("div",{style:{marginTop:"16px",display:"flex",justifyContent:t.includes("Right")?"flex-end":t.includes("Left")?"flex-start":"center"},children:n(B,{current:xe,total:o,pageSize:be,showSizeChanger:z.showSizeChanger,pageSizeOptions:z.pageSizeOptions,showQuickJumper:z.showQuickJumper,showTotal:z.showTotal,onChange:Pe,onShowSizeChange:Pe,simple:z.simple,responsive:z.responsive,size:"small"===A?"small":"default"})})},Ze=u(function(){return x.some(function(e){return e.fixed})||C&&C.fixed},[x,C]),$e=u(function(){return x.every(function(e){return e.width})&&(!C||C.columnWidth)},[x,C]),en=u(function(){if(null==X?void 0:X.x){if("number"==typeof X.x)return X.x;if(!0===X.x)return x.reduce(function(e,n){return e+(n.width?"number"==typeof n.width?n.width:parseInt(String(n.width).replace("px",""))||0:150)},0)+(C?"number"==typeof C.columnWidth?C.columnWidth:parseInt(String(C.columnWidth||"60").replace("px",""))||60:0)}if(Ze)return x.reduce(function(e,n){return n.fixed&&n.width?e+("number"==typeof n.width?n.width:parseInt(String(n.width).replace("px",""))||0):e},0)+(C&&C.fixed&&C.columnWidth?"number"==typeof C.columnWidth?C.columnWidth:parseInt(String(C.columnWidth).replace("px",""))||60:0)},[x,null==X?void 0:X.x,C,Ze]),nn=u(function(){return"fixed"===Y||Ze||$e||x.some(function(e){return e.width})?"fixed":Y},[Y,Ze,$e,x]),on=f(f({width:"100%",minWidth:en?"".concat(en,"px"):"100%",borderCollapse:"separate",borderSpacing:0,tableLayout:nn,backgroundColor:"white"},L&&{borderRadius:"8px",border:"1px solid #EAECF0"}),{overflow:"hidden"}),tn=f({position:"relative",width:"100%",maxWidth:"100%",maxHeight:"number"==typeof(null==X?void 0:X.y)?"".concat(X.y,"px"):void 0,borderRadius:"8px"},ne);if(Le)return e("div",f({ref:Be,className:"aha-table aha-table-mobile-wrapper ".concat(Z),style:tn,"aria-busy":!!E||void 0},ie,{children:[P&&n("div",{style:{marginBottom:"16px"},children:P(Re)}),z&&"object"==typeof z&&(null===(r=z.position)||void 0===r?void 0:r.startsWith("top"))&&Ge(),(Ne="function"==typeof(null==R?void 0:R.emptyText)?R.emptyText():void 0!==(null==R?void 0:R.emptyText)?R.emptyText:"No data",0===Oe.length?n("div",{className:"aha-table-mobile aha-table-placeholder",style:{padding:"48px 16px",textAlign:"center",color:"#98A2B3",fontSize:"14px",lineHeight:"20px",fontFamily:"DM Sans, sans-serif"},children:Ne}):n("div",{className:"aha-table-mobile",children:Oe.map(function(o,t){var r,i=N(o,k),a=de.includes(i);return e("div",{className:"aha-table-mobile-row ".concat(a?"selected":""),style:{border:"1px solid #e8e8e8",borderRadius:"4px",padding:"12px",marginBottom:"12px",backgroundColor:a?"#e6f7ff":"white"},children:[C&&n("div",{style:{marginBottom:"8px"},children:n(D,{checked:a,onChange:function(e){return Ee(o,e.target.checked)},disabled:null===(r=C.getCheckboxProps)||void 0===r?void 0:r.call(C,o).disabled})}),x.map(function(r){var i=r.key||(Array.isArray(r.dataIndex)?r.dataIndex.join("."):r.dataIndex),a=M(o,r.dataIndex||""),l=r.render?r.render(a,o,t):a;return e("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"8px",paddingBottom:"8px",borderBottom:"1px solid #f0f0f0"},children:[e("span",{style:{fontWeight:"bold",color:"#666"},children:["function"==typeof r.title?r.title({}):r.title,":"]}),n("span",{style:{flex:1,textAlign:"right"},children:l})]},i)})]},i)})})),_&&n("div",{style:{marginTop:"16px"},children:_(Re)}),z&&("object"!=typeof z||!(null===(i=z.position)||void 0===i?void 0:i.startsWith("top")))&&Ge(),n(j,{loading:E,spinColor:ae})]}));var rn={position:"relative",overflowX:(null==X?void 0:X.x)||Ze?"auto":"visible",overflowY:(null==X?void 0:X.y)?"auto":"visible",width:"100%",maxWidth:!0===(null==X?void 0:X.x)?"100%":"number"==typeof(null==X?void 0:X.x)?"".concat(X.x,"px"):void 0,maxHeight:"number"==typeof(null==X?void 0:X.y)?"".concat(X.y,"px"):void 0,borderRadius:"8px"};return e("div",f({ref:Be,className:"aha-table ".concat(Z),style:tn,"aria-busy":!!E||void 0},ie,{children:[P&&n("div",{style:{marginBottom:"16px"},children:P(Re)}),z&&"object"==typeof z&&(null===(l=z.position)||void 0===l?void 0:l.startsWith("top"))&&Ge(),n("div",{style:rn,children:n("div",{style:{width:"100%",minWidth:en?"".concat(en,"px"):"100%",display:"block"},children:e("table",{style:on,className:ee,children:[Xe(),n("tbody",{children:Ue()}),K&&n("tfoot",{children:n("tr",{children:n("td",{colSpan:x.length+(C?1:0),children:K(Re)})})})]})})}),_&&n("div",{style:{marginTop:"16px"},children:_(Re)}),z&&("object"!=typeof z||!(null===(p=z.position)||void 0===p?void 0:p.startsWith("top")))&&Ge(),n(j,{loading:E,spinColor:ae})]}))};export{R as default};
1
+ import{jsxs as e,jsx as o,Fragment as n}from"react/jsx-runtime";import r,{createContext as t,useContext as i,useState as l,forwardRef as a,useRef as d,useEffect as s,useCallback as c,useMemo as u}from"react";import{createPortal as p}from"react-dom";var f=function(){return f=Object.assign||function(e){for(var o,n=1,r=arguments.length;n<r;n++)for(var t in o=arguments[n])Object.prototype.hasOwnProperty.call(o,t)&&(e[t]=o[t]);return e},f.apply(this,arguments)};function h(e,o){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&o.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var t=0;for(r=Object.getOwnPropertySymbols(e);t<r.length;t++)o.indexOf(r[t])<0&&Object.prototype.propertyIsEnumerable.call(e,r[t])&&(n[r[t]]=e[r[t]])}return n}function x(e,o,n){if(n||2===arguments.length)for(var r,t=0,i=o.length;t<i;t++)!r&&t in o||(r||(r=Array.prototype.slice.call(o,0,t)),r[t]=o[t]);return e.concat(r||Array.prototype.slice.call(o))}"function"==typeof SuppressedError&&SuppressedError;var v={primaryColor:"#FB6011"},g=t(v),m=function(){var e=i(g);return e||v},y={sm:"sm",md:"md",lg:"lg",xl:"xl",small:"sm",mediumSmall:"sm",medium:"md",large:"xl"},b={primary:"primary",secondary:"secondary",tertiary:"tertiary","link-color":"link-color","link-gray":"link-gray","destructive-primary":"destructive-primary","destructive-secondary":"destructive-secondary","destructive-tertiary":"destructive-tertiary","destructive-link":"destructive-link",default:"secondary"},w={sm:{height:36,paddingX:12,paddingXLg:12,fontSize:14,lineHeight:20,iconSize:20,gap:4,iconOnlyPad:8},md:{height:40,paddingX:14,paddingXLg:14,fontSize:14,lineHeight:20,iconSize:20,gap:4,iconOnlyPad:10},lg:{height:44,paddingX:16,paddingXLg:16,fontSize:16,lineHeight:24,iconSize:20,gap:6,iconOnlyPad:12},xl:{height:48,paddingX:18,paddingXLg:18,fontSize:16,lineHeight:24,iconSize:20,gap:6,iconOnlyPad:14}},k=function(r){var t=r.size,i=r.color;return e(n,{children:[o("style",{children:"@keyframes aha-button-spin{from{transform:rotate(0)}to{transform:rotate(360deg)}}"}),e("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,style:{animation:"aha-button-spin 1s linear infinite",flexShrink:0},children:[o("circle",{cx:"12",cy:"12",r:"10",stroke:i,strokeWidth:"2",opacity:"0.25"}),o("path",{d:"M22 12a10 10 0 0 1-10 10",stroke:i,strokeWidth:"2",strokeLinecap:"round",fill:"none"})]})]})},S=function(n){var r=n.children,t=n.type,i=void 0===t?"secondary":t,a=n.size,d=void 0===a?"md":a,s=n.disabled,c=void 0!==s&&s,u=n.loading,p=void 0!==u&&u,x=n.iconOnly,v=n.focused,g=void 0!==v&&v,S=n.onClick,C=n.htmlType,z=void 0===C?"button":C,F=n.className,W=void 0===F?"":F,L=n.style,A=n.icon,I=n.iconPosition,B=void 0===I?"left":I,E=h(n,["children","type","size","disabled","loading","iconOnly","focused","onClick","htmlType","className","style","icon","iconPosition"]),j=m().primaryColor,N=l(!1),D=N[0],M=N[1],H=l(!1),R=H[0],T=H[1],O=b[i]||"secondary",P=w[y[d]||"md"],_=null!=x?x:!!A&&null==r,K="link-color"===O||"link-gray"===O||"destructive-link"===O,X=c||p,q=g,Y=j,V=function(){if(c)return"primary"===O||"secondary"===O||"destructive-primary"===O||"destructive-secondary"===O?{bg:"var(--color-bg-disabled, #f5f5f4)",color:"var(--color-fg-disabled, #a9a29d)",iconColor:"var(--color-fg-disabled, #a9a29d)",border:"1px solid var(--color-border-disabled_subtle, #e7e5e4)",boxShadow:"none"}:{bg:"transparent",color:"var(--color-fg-disabled, #a9a29d)",iconColor:"var(--color-fg-disabled, #a9a29d)",border:"none",boxShadow:"none"};var e=D||R;return"primary"===O?{bg:e?"var(--color-bg-brand-solid_hover, #ec470a)":Y||"var(--color-bg-brand-solid, #fb6011)",color:"var(--color-text-white, #ffffff)",iconColor:"var(--color-brand-300, #feb073)",border:"none",boxShadow:"var(--shadow-xs-skeuomorphic, 0 1px 2px 0 rgba(10,13,18,.05))"}:"secondary"===O?{bg:e?"var(--color-bg-primary_hover, #fafaf9)":"var(--color-bg-primary, #ffffff)",color:e?"var(--color-text-secondary_hover, #292524)":"var(--color-text-secondary, #44403c)",iconColor:e?"var(--color-fg-quaternary_hover, #79716b)":"var(--color-fg-quaternary, #a9a29d)",border:"none",boxShadow:"var(--shadow-xs-skeuomorphic)"}:"tertiary"===O?{bg:e?"var(--color-bg-primary_hover, #fafaf9)":"transparent",color:e?"var(--color-text-tertiary_hover, #44403c)":"var(--color-text-tertiary, #57534e)",iconColor:e?"var(--color-fg-quaternary_hover, #79716b)":"var(--color-fg-quaternary, #a9a29d)",border:"none",boxShadow:"none"}:"link-color"===O?{bg:"transparent",color:e?"var(--color-text-brand-secondary_hover, #c4330a)":"var(--color-text-brand-secondary, #ec470a)",iconColor:"var(--color-fg-brand-secondary_alt, #fb6011)",border:"none",boxShadow:"none",textDecoration:e?"underline":"none"}:"link-gray"===O?{bg:"transparent",color:e?"var(--color-text-tertiary_hover, #44403c)":"var(--color-text-tertiary, #57534e)",iconColor:"var(--color-fg-quaternary, #a9a29d)",border:"none",boxShadow:"none",textDecoration:e?"underline":"none"}:"destructive-primary"===O?{bg:e?"var(--color-error-600)":"var(--color-error-500)",color:"var(--color-text-white)",iconColor:e?"var(--color-error-200)":"var(--color-error-300)",border:"none",boxShadow:"var(--shadow-xs-skeuomorphic)"}:"destructive-secondary"===O?{bg:e?"var(--color-bg-error-primary)":"var(--color-bg-primary)",color:"var(--color-text-error-primary)",iconColor:"var(--color-fg-error-secondary)",border:"none",boxShadow:"inset 0 0 0 1px var(--color-border-error_subtle), inset 0 -2px 0 0 rgba(10,13,18,0.05), 0 1px 2px 0 rgba(10,13,18,0.05)"}:"destructive-tertiary"===O?{bg:e?"var(--color-bg-error-primary)":"transparent",color:"var(--color-text-error-primary)",iconColor:"var(--color-fg-error-secondary)",border:"none",boxShadow:"none"}:{bg:"transparent",color:e?"var(--color-text-error-primary_hover)":"var(--color-text-error-primary)",iconColor:"var(--color-fg-error-secondary)",border:"none",boxShadow:"none",textDecoration:e?"underline":"none"}}(),J=function(){if(q)return"destructive-primary"===O||"destructive-secondary"===O||"destructive-tertiary"===O||"destructive-link"===O?"destructive-primary"===O||"destructive-secondary"===O?"var(--focus-ring-error-shadow-xs-skeuomorphic)":"var(--focus-ring-error)":"primary"===O||"secondary"===O?"var(--focus-ring-shadow-xs-skeuomorphic, 0 0 0 2px #fff, 0 0 0 4px #fb6011)":"var(--focus-ring, 0 0 0 2px #fff, 0 0 0 4px #fb6011)"}(),Q=f({position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",gap:P.gap,fontFamily:'var(--font-family-body, "DM Sans", system-ui, sans-serif)',fontWeight:600,fontSize:P.fontSize,lineHeight:"".concat(P.lineHeight,"px"),cursor:X?"not-allowed":"pointer",outline:"none",transition:"background-color .15s ease, color .15s ease, box-shadow .15s ease",userSelect:"none",WebkitTapHighlightColor:"transparent",whiteSpace:"nowrap",backgroundColor:V.bg,color:V.color,border:V.border,boxShadow:null!=J?J:V.boxShadow,textDecoration:V.textDecoration},L);K?(Q.borderRadius="4px",Q.overflow="hidden",_?(Q.width=P.height,Q.height=P.height,Q.padding=0):(Q.height=P.height,Q.paddingLeft=P.paddingX,Q.paddingRight=P.paddingX)):(Q.borderRadius="var(--radius-md, 8px)",_?(Q.width=P.height,Q.height=P.height,Q.padding=0):(Q.height=P.height,Q.paddingLeft=P.paddingX,Q.paddingRight=P.paddingX));var G=function(){return p?o(k,{size:P.iconSize,color:V.iconColor}):A?o("span",{"aria-hidden":!0,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:P.iconSize,height:P.iconSize,color:V.iconColor,flexShrink:0},children:A}):null},U=p||A&&"left"===B,Z=!p&&A&&"right"===B;return e("button",f({type:z,className:["aha-button","aha-button--".concat(O),"aha-button--".concat(y[d]||"md"),_&&"aha-button--icon-only",X&&"aha-button--disabled",p&&"aha-button--loading",q&&"aha-button--focused",W].filter(Boolean).join(" "),disabled:X,onClick:function(e){X?e.preventDefault():null==S||S(e)},onMouseEnter:function(){return!X&&M(!0)},onMouseLeave:function(){M(!1),T(!1)},onMouseDown:function(){return!X&&T(!0)},onMouseUp:function(){return T(!1)},style:Q},E,{children:[U&&G(),!_&&r,Z&&G(),_&&!A&&!p&&r]}))};S.displayName="Button";var C="var(--shadow-xs)",z={small:{pt:"5px",pb:"5px"},mediumSmall:{pt:"7px",pb:"7px"},medium:{pt:"9px",pb:"9px"},large:{pt:"11px",pb:"11px"}};a(function(n,r){var t=n.size,i=void 0===t?"mediumSmall":t,a=n.error,c=void 0!==a&&a,u=n.disabled,p=void 0!==u&&u,x=n.readOnly,v=void 0!==x&&x,g=n.prefix,m=n.suffix,y=n.leadingText,b=n.trailingText,w=n.leadingAddon,k=n.trailingAddon,S=n.className,F=void 0===S?"":S,W=n.style,L=n.onFocus,A=n.onBlur,I=n.onKeyDown,B=n.onPressEnter,E=n.value,j=n.defaultValue,N=n.onChange,D=n.placeholder,M=n.type,H=void 0===M?"text":M,R=n.label,T=n.required,O=n.hintText,P=h(n,["size","error","disabled","readOnly","prefix","suffix","leadingText","trailingText","leadingAddon","trailingAddon","className","style","onFocus","onBlur","onKeyDown","onPressEnter","value","defaultValue","onChange","placeholder","type","label","required","hintText"]),_=d(null),K=l(!1),X=K[0],q=K[1],Y=l(null!=j?j:""),V=Y[0],J=Y[1];s(function(){"function"==typeof r?r(_.current):r&&(r.current=_.current)},[r]);var Q=void 0!==E,G=Q?E:V,U=p?{border:"1px solid var(--color-border-disabled)",boxShadow:C,outline:"none"}:c&&X?{border:"1px solid var(--color-border-error)",boxShadow:C,outline:"2px solid var(--color-border-error)",outlineOffset:"-2px"}:c?{border:"1px solid var(--color-border-error_subtle)",boxShadow:C,outline:"none"}:X?{border:"1px solid var(--color-border-brand)",boxShadow:C,outline:"2px solid var(--color-border-brand)",outlineOffset:"-2px"}:{border:"1px solid var(--color-border-primary)",boxShadow:C,outline:"none"},Z=U.border,$=U.boxShadow,ee=U.outline,oe=U.outlineOffset,ne=z[i],re=ne.pt,te=ne.pb,ie=p?"var(--color-border-disabled)":"var(--color-border-primary)",le=!!g,ae=!!m,de={position:"absolute",top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",color:p?"var(--color-fg-disabled)":"var(--color-fg-quaternary)",zIndex:1,pointerEvents:"none"},se={display:"flex",alignItems:"center",paddingTop:re,paddingBottom:te,paddingLeft:"14px",paddingRight:"12px",color:"var(--color-text-tertiary)",fontFamily:"var(--font-family-body)",fontSize:"var(--font-size-text-md)",lineHeight:"var(--line-height-text-md)",whiteSpace:"nowrap",flexShrink:0,backgroundColor:p?"var(--color-bg-disabled_subtle)":"transparent"},ce=e("div",{className:"aha-input-group ".concat(F),style:f({display:"flex",alignItems:"stretch",width:"100%",border:Z,boxShadow:$,outline:ee,outlineOffset:oe,borderRadius:"var(--radius-md)",backgroundColor:p||v?"var(--color-bg-disabled_subtle)":"var(--color-bg-primary)",overflow:"hidden",boxSizing:"border-box",transition:"border-color 0.15s ease, box-shadow 0.15s ease"},W),children:[void 0!==y&&o("div",{style:f(f({},se),{borderRight:"1px solid ".concat(ie)}),children:y}),void 0!==w&&o("div",{style:{display:"flex",alignItems:"stretch",flexShrink:0,borderRight:"1px solid ".concat(ie)},children:w}),e("div",{style:{flex:1,position:"relative",display:"flex",alignItems:"stretch",minWidth:0},children:[le&&o("span",{style:f(f({},de),{left:"14px"}),children:g}),o("input",f({ref:_,type:H,value:G,placeholder:D,disabled:p,readOnly:v,onChange:function(e){Q||J(e.target.value),null==N||N(e)},onFocus:function(e){q(!0),null==L||L(e)},onBlur:function(e){q(!1),null==A||A(e)},onKeyDown:function(e){"Enter"===e.key&&B&&B(e),null==I||I(e)},style:{flex:1,border:"none",outline:"none",width:"100%",boxSizing:"border-box",fontFamily:"var(--font-family-body)",fontSize:"var(--font-size-text-md)",fontWeight:400,lineHeight:"var(--line-height-text-md)",backgroundColor:"transparent",color:p?"var(--color-text-disabled)":"var(--color-text-primary)",paddingTop:re,paddingBottom:te,paddingLeft:le?"40px":"14px",paddingRight:ae?"40px":"14px"},autoComplete:P.autoComplete||"off"},P)),ae&&o("span",{style:f(f({},de),{right:"14px"}),children:m})]}),void 0!==b&&o("div",{style:f(f({},se),{paddingLeft:"12px",paddingRight:"14px",borderLeft:"1px solid ".concat(ie)}),children:b}),void 0!==k&&o("div",{style:{display:"flex",alignItems:"stretch",flexShrink:0,borderLeft:"1px solid ".concat(ie)},children:k})]});if(!R&&!O)return ce;var ue={margin:0,fontFamily:"var(--font-family-body)",fontSize:"var(--font-size-text-sm)",fontWeight:400,lineHeight:"20px",color:c?"var(--color-error-600)":"var(--color-text-tertiary)"};return e("div",{style:{display:"flex",flexDirection:"column",gap:"6px",width:"100%"},children:[R&&e("label",{style:{fontFamily:"var(--font-family-body)",fontSize:"var(--font-size-text-sm)",fontWeight:500,lineHeight:"20px",color:"var(--color-text-secondary)"},children:[R,T&&o("span",{style:{color:"var(--color-error-600)",marginLeft:"2px"},children:"*"})]}),ce,O&&o("p",{style:ue,children:O})]})}).displayName="InputGroup";var F={small:{height:"36px",paddingTop:"5px",paddingBottom:"5px"},mediumSmall:{height:"40px",paddingTop:"7px",paddingBottom:"7px"},medium:{height:"44px",paddingTop:"9px",paddingBottom:"9px"},large:{height:"48px",paddingTop:"11px",paddingBottom:"11px"}},W="var(--shadow-xs)",L=function(e){var n=e.onClick;return o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:n,style:{cursor:"pointer",flexShrink:0},children:o("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})},A=a(function(t,i){var l=t.size,a=void 0===l?"mediumSmall":l,c=t.disabled,u=void 0!==c&&c,p=t.error,x=void 0!==p&&p,v=t.readOnly,g=void 0!==v&&v,m=t.prefix,y=t.suffix,b=t.allowClear,w=void 0!==b&&b,k=t.onClear,S=t.className,C=void 0===S?"":S,z=t.style,A=t.type,I=void 0===A?"text":A,B=t.placeholder,E=t.value,j=t.defaultValue,N=t.onChange,D=t.onFocus,M=t.onBlur,H=t.onPressEnter,R=t.label,T=t.required,O=t.hintText,P=h(t,["size","disabled","error","readOnly","prefix","suffix","allowClear","onClear","className","style","type","placeholder","value","defaultValue","onChange","onFocus","onBlur","onPressEnter","label","required","hintText"]),_=d(null),K=r.useState(j||E||""),X=K[0],q=K[1],Y=r.useState(!1),V=Y[0],J=Y[1];s(function(){"function"==typeof i?i(_.current):i&&(i.current=_.current)},[i]);var Q=void 0!==E,G=Q?E:X,U=w&&G&&!u,Z=u?{border:"1px solid var(--color-border-disabled)",boxShadow:W,outline:"none"}:x&&V?{border:"1px solid var(--color-border-error)",boxShadow:W,outline:"2px solid var(--color-border-error)",outlineOffset:"-2px"}:x?{border:"1px solid var(--color-border-error_subtle)",boxShadow:W,outline:"none"}:V?{border:"1px solid var(--color-border-brand)",boxShadow:W,outline:"2px solid var(--color-border-brand)",outlineOffset:"-2px"}:{border:"1px solid var(--color-border-primary)",boxShadow:W,outline:"none"},$=Z.border,ee=Z.boxShadow,oe=Z.outline,ne=Z.outlineOffset,re=F[a],te=re.height,ie=re.paddingTop,le=re.paddingBottom,ae=f({width:"100%",height:te,boxSizing:"border-box",fontFamily:"var(--font-family-body)",fontSize:"var(--font-size-text-md)",fontWeight:400,lineHeight:"var(--line-height-text-md)",borderRadius:"var(--radius-md)",border:$,boxShadow:ee,backgroundColor:u||g?"var(--color-bg-disabled_subtle)":"var(--color-bg-primary)",color:u?"var(--color-text-disabled)":"var(--color-text-primary)",paddingTop:ie,paddingBottom:le,paddingLeft:m?"40px":"14px",paddingRight:y||U?"40px":"14px",transition:"border-color 0.15s ease, box-shadow 0.15s ease, outline-color 0.15s ease",outline:oe,outlineOffset:ne,WebkitAppearance:"none",MozAppearance:"textfield",appearance:"none"},z),de={position:"absolute",top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",color:u?"var(--color-fg-disabled)":"var(--color-fg-quaternary)",zIndex:1},se=e(n,{children:[o("style",{children:'\n .aha-input-wrapper input::placeholder {\n color: var(--color-text-placeholder);\n font-size: var(--font-size-text-md);\n font-weight: 400;\n opacity: 1;\n }\n .aha-input-wrapper input::-webkit-input-placeholder { color: var(--color-text-placeholder); }\n .aha-input-wrapper input::-moz-placeholder { color: var(--color-text-placeholder); }\n .aha-input-wrapper input:-ms-input-placeholder { color: var(--color-text-placeholder); }\n .aha-input-wrapper input {\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none;\n touch-action: manipulation;\n }\n .aha-input-wrapper input[type="number"]::-webkit-inner-spin-button,\n .aha-input-wrapper input[type="number"]::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n .aha-input-wrapper input[type="number"] { -moz-appearance: textfield; }\n '}),e("div",{className:"aha-input-wrapper ".concat(C),style:{position:"relative",display:"block",width:"100%"},children:[m&&o("span",{style:f(f({},de),{left:"14px",pointerEvents:"none"}),children:m}),o("input",f({ref:_,type:I,value:G,placeholder:B,disabled:u,readOnly:g,onChange:function(e){Q||q(e.target.value),null==N||N(e)},onFocus:function(e){J(!0),null==D||D(e)},onBlur:function(e){J(!1),null==M||M(e)},onKeyDown:function(e){var o;"Enter"===e.key&&H&&H(e),null===(o=P.onKeyDown)||void 0===o||o.call(P,e)},style:ae,autoComplete:P.autoComplete||"off",autoCorrect:P.autoCorrect||"off",autoCapitalize:P.autoCapitalize||"off",spellCheck:P.spellCheck||!1},P)),(y||U)&&e("span",{style:f(f({},de),{right:"14px",gap:"var(--spacing-xs)"}),children:[U&&o(L,{onClick:function(e){var o;e.stopPropagation(),Q||q("");null==N||N({target:{value:""},currentTarget:{value:""}}),null==k||k(),null===(o=_.current)||void 0===o||o.focus()}}),y]})]})]});return R||O?e("div",{style:{display:"flex",flexDirection:"column",gap:"6px",width:"100%"},children:[R&&e("label",{style:{fontFamily:"var(--font-family-body)",fontSize:"var(--font-size-text-sm)",fontWeight:500,lineHeight:"20px",color:"var(--color-text-secondary)"},children:[R,T&&o("span",{style:{color:"var(--color-error-600)",marginLeft:"2px"},children:"*"})]}),se,O&&o("p",{style:{margin:0,fontFamily:"var(--font-family-body)",fontSize:"var(--font-size-text-sm)",fontWeight:400,lineHeight:"20px",color:x?"var(--color-error-600)":"var(--color-text-tertiary)"},children:O})]}):se});A.displayName="Input";var I=function(t){var i,a=t.value,h=t.defaultValue,v=t.options,g=void 0===v?[]:v,y=t.mode,b=t.disabled,w=void 0!==b&&b,k=t.error,S=void 0!==k&&k,C=t.placeholder,z=void 0===C?"Please select":C,F=t.size,W=void 0===F?"medium":F,L=t.showSearch,A=void 0!==L&&L,I=t.filterOption,B=void 0===I||I,E=t.allowClear,j=void 0!==E&&E,N=t.onChange,D=t.onSelect,M=t.onDeselect,H=t.onSearch,R=t.onFocus,T=t.onBlur,O=t.onDropdownVisibleChange,P=t.className,_=void 0===P?"":P,K=t.style,X=t.dropdownClassName,q=void 0===X?"":X,Y=t.dropdownStyle,V=t.defaultOpen,J=void 0!==V&&V,Q=t.open,G=t.maxTagCount,U=t.tagRender,Z=t.optionRender,$=m().primaryColor,ee=void 0===$?"#FB6011":$,oe=l(void 0!==h?h:y?[]:void 0),ne=oe[0],re=oe[1],te=l(J),ie=te[0],le=te[1],ae=l(""),de=ae[0],se=ae[1],ce=l(-1),ue=ce[0],pe=ce[1],fe=d(null),he=d(null),xe=d(null),ve=l(null),ge=ve[0],me=ve[1],ye=void 0!==a,be=void 0!==Q,we=ye?a:ne,ke=be?Q:ie,Se="multiple"===y||"tags"===y,Ce=c(function(){if(!we)return[];var e=Array.isArray(we)?we:[we];return g.filter(function(o){return e.includes(o.value)})},[we,g]),ze=c(function(){return A&&de?!1===B?g:"function"==typeof B?g.filter(function(e){return B(de,e)}):g.filter(function(e){var o=String(e.label||"").toLowerCase(),n=de.toLowerCase();return o.includes(n)}):g},[g,de,A,B]),Fe=u(function(){return ze()},[ze]);s(function(){if(ke&&fe.current){var e=function(){var e,o;if(fe.current){var n=fe.current.getBoundingClientRect(),r=null!==(o=null===(e=xe.current)||void 0===e?void 0:e.offsetHeight)&&void 0!==o?o:Math.min(256,Math.max(40,40*Fe.length)),t=window.innerHeight-n.bottom,i=n.top,l=t<r+4&&i>t,a=l?n.top+window.scrollY-r-4:n.bottom+window.scrollY+4;me({top:a,left:n.left+window.scrollX,width:n.width,placement:l?"top":"bottom"})}};return e(),requestAnimationFrame(e),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),function(){window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0)}}me(null)},[ke,Fe.length]),s(function(){var e=function(e){var o=e.target;fe.current&&!fe.current.contains(o)&&xe.current&&!xe.current.contains(o)&&(be||le(!1),null==O||O(!1),se(""))};if(ke)return document.addEventListener("mousedown",e,!0),document.addEventListener("touchstart",e,!0),function(){document.removeEventListener("mousedown",e,!0),document.removeEventListener("touchstart",e,!0)}},[ke,be,O]),s(function(){if(ke){var e=function(e){var o;if("ArrowDown"===e.key)e.preventDefault(),pe(function(e){return e<Fe.length-1?e+1:e});else if("ArrowUp"===e.key)e.preventDefault(),pe(function(e){return e>0?e-1:0});else if("Enter"===e.key&&ue>=0){e.preventDefault();var n=Fe[ue];n&&!n.disabled&&We(n)}else"Escape"===e.key&&(e.preventDefault(),be||le(!1),null==O||O(!1),null===(o=fe.current)||void 0===o||o.focus())};return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}}},[ke,Fe,ue,be,O]),s(function(){if(ue>=0&&xe.current){var e=xe.current.querySelectorAll(".aha-select-option")[ue];e&&e.scrollIntoView({block:"nearest",behavior:"smooth"})}},[ue]);var We=c(function(e){var o;if(!e.disabled)if(Se){var n,r=Array.isArray(we)?we:[];r.includes(e.value)?(n=r.filter(function(o){return o!==e.value}),null==M||M(e.value,e)):(n=x(x([],r,!0),[e.value],!1),null==D||D(e.value,e)),ye||re(n);var t=g.filter(function(e){return n.includes(e.value)});null==N||N(n,t)}else ye||re(e.value),null==N||N(e.value,e),null==D||D(e.value,e),be||le(!1),null==O||O(!1),se(""),null===(o=fe.current)||void 0===o||o.focus()},[Se,we,ye,be,g,N,D,M,O]),Le=c(function(e,o){if(e.stopPropagation(),Se&&Array.isArray(we)){var n=we.filter(function(e){return e!==o}),r=g.find(function(e){return e.value===o});ye||re(n),null==N||N(n,Ce()),null==M||M(o,r)}},[Se,we,ye,g,N,M,Ce]),Ae=function(e){e.stopPropagation();var o=Se?[]:void 0;ye||re(o),null==N||N(o,[]),se("")},Ie={small:{height:"32px",paddingTop:"3px",paddingBottom:"3px",fontSize:"16px",lineHeight:"24px"},mediumSmall:{height:"36px",paddingTop:"5px",paddingBottom:"5px",fontSize:"16px",lineHeight:"24px"},medium:{height:"40px",paddingTop:"7px",paddingBottom:"7px",fontSize:"16px",lineHeight:"24px"},large:{height:"48px",paddingTop:"11px",paddingBottom:"11px",fontSize:"16px",lineHeight:"24px"}},Be=u(function(){return Ce()},[Ce]),Ee=u(function(){return j&&we&&!w},[j,we,w]),je=u(function(){return Se?Array.isArray(we)&&we.length>0:null!=we&&""!==we},[Se,we]),Ne=u(function(){if(!Se||!Array.isArray(we)||0===we.length)return null;var n="responsive"===G?Be.slice(0,2):G?Be.slice(0,G):Be,t=G&&Be.length>n.length?Be.length-n.length:0;return e("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:"4px",flex:1,minWidth:0},children:[n.map(function(n){var t={label:n.label,value:n.value,closable:!w,onClose:function(){return Le({},n.value)}};return U?o(r.Fragment,{children:U(t)},n.value):e("span",{style:{display:"inline-flex",alignItems:"center",gap:"4px",padding:"2px 8px",backgroundColor:"#F5F5F4",borderRadius:"4px",fontSize:"12px",lineHeight:"18px",color:"#101828",fontFamily:"DM Sans, sans-serif",maxWidth:"100%"},children:[o("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n.label}),!w&&o("span",{onClick:function(e){return Le(e,n.value)},style:{cursor:"pointer",display:"flex",alignItems:"center",color:"#78716C",marginLeft:"4px"},children:o("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o("path",{d:"M9 3L3 9M3 3L9 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]},n.value)}),t>0&&e("span",{style:{fontSize:"12px",lineHeight:"18px",color:"#78716C",fontFamily:"DM Sans, sans-serif"},children:["+",t]})]})},[Se,we,Be,G,w,U]);return e(n,{children:[o("style",{children:"\n @keyframes dropdownFadeIn {\n from {\n opacity: 0;\n transform: translateY(-8px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n "}),e("div",{ref:fe,className:"aha-select ".concat(_),style:f({position:"relative",display:"inline-flex",alignItems:"center",width:"100%",minWidth:"120px",boxSizing:"border-box",fontFamily:"DM Sans, sans-serif",borderRadius:"8px",border:"1px solid ".concat(S?"#F04438":ke?ee:"#D7D3D0"),backgroundColor:w?"#FAFAF9":"#FFFFFF",cursor:w?"not-allowed":"pointer",transition:"all 0.2s",paddingLeft:"12px",paddingRight:"36px",paddingTop:Ie[W].paddingTop,paddingBottom:Ie[W].paddingBottom,fontSize:Ie[W].fontSize,lineHeight:Ie[W].lineHeight,fontWeight:400,WebkitTapHighlightColor:"transparent",WebkitTouchCallout:"none",touchAction:"manipulation",userSelect:"none"},K),onClick:function(){if(!w){var e=!ke;be||le(e),null==O||O(e),e&&A?setTimeout(function(){var e;null===(e=he.current)||void 0===e||e.focus()},0):se("")}},onFocus:function(e){null==R||R(e)},onBlur:function(e){null==T||T(e)},onTouchStart:function(e){w||(e.currentTarget.style.opacity="0.8")},onTouchEnd:function(e){e.currentTarget.style.opacity="1"},tabIndex:w?-1:0,children:[o("div",{style:{display:"flex",alignItems:"center",flex:1,minWidth:0,gap:"8px"},children:Se?Ne||o("span",z?{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:"#79716B",fontSize:"16px",lineHeight:"24px",fontWeight:400},children:z}:{style:{flex:1,minHeight:"24px"}}):A&&ke?o("input",{ref:he,type:"text",value:de,onChange:function(e){var o=e.target.value;se(o),null==H||H(o),pe(-1)},onClick:function(e){return e.stopPropagation()},onFocus:function(e){return e.stopPropagation()},style:{flex:1,border:"none",outline:"none",background:"transparent",fontSize:"16px",lineHeight:"24px",fontWeight:400,color:w?"#98A2B3":"#1C1917",fontFamily:"DM Sans, sans-serif",minWidth:0,WebkitAppearance:"none",appearance:"none"},placeholder:je?void 0:z,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1}):o("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:je?w?"#98A2B3":"#1C1917":"#79716B",fontSize:"16px",lineHeight:"24px",fontWeight:400,minHeight:"24px",display:"inline-block"},children:je?(null===(i=Be[0])||void 0===i?void 0:i.label)||we:z||" "})}),e("div",{style:{position:"absolute",right:"12px",display:"flex",alignItems:"center",gap:"4px"},children:[Ee&&o(function(){return o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:Ae,style:{cursor:"pointer",flexShrink:0,color:"#78716C"},children:o("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})},{}),o(function(e){var n=e.isOpen;return o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{transform:n?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease-in-out",flexShrink:0},children:o("path",{d:"M4 6L8 10L12 6",stroke:"#78716C",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})},{isOpen:ke})]})]}),ke&&ge&&p(o("div",{ref:xe,className:"aha-select-dropdown ".concat(q),style:f({position:"absolute",top:"".concat(ge.top,"px"),left:"".concat(ge.left,"px"),width:"".concat(ge.width,"px"),zIndex:1050,backgroundColor:"#FFFFFF",borderRadius:"8px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",border:"1px solid #E7E5E4",maxHeight:"256px",overflow:"auto",opacity:0,transform:"top"===ge.placement?"translateY(8px)":"translateY(-8px)",animation:"dropdownFadeIn 0.2s ease-out forwards",transformOrigin:"top"===ge.placement?"bottom center":"top center",WebkitOverflowScrolling:"touch",overscrollBehavior:"contain"},Y),children:0===Fe.length?o("div",{style:{padding:"8px 16px",textAlign:"center",color:"#78716C",fontSize:"14px",fontFamily:"DM Sans, sans-serif"},children:"No data"}):Fe.map(function(n,r){var t=Se?Array.isArray(we)&&we.includes(n.value):we===n.value,i=r===ue;return Z?o("div",{className:"aha-select-option ".concat(n.disabled?"":"hover:bg-[#FAFAF9]"," ").concat(t?"bg-[#FAFAF9]":""),onClick:function(){return!n.disabled&&We(n)},style:{cursor:n.disabled?"not-allowed":"pointer",transition:"background-color 0.2s"},children:Z(n,{selected:t,focused:i,disabled:n.disabled||!1})},n.value):e("div",{className:"aha-select-option ".concat(n.disabled?"":"hover:bg-[#FAFAF9]"," ").concat(t?"bg-[#FAFAF9]":""),onClick:function(){return We(n)},style:{padding:"8px 16px",cursor:n.disabled?"not-allowed":"pointer",color:n.disabled?"#98A2B3":"#101828",fontSize:"14px",lineHeight:"20px",fontFamily:"DM Sans, sans-serif",display:"flex",alignItems:"center",justifyContent:"space-between",transition:"background-color 0.2s"},children:[o("span",{children:n.label}),t&&o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i?"hidden":"",children:o("path",{d:"M13.3333 4L6 11.3333L2.66667 8",stroke:ee,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]},n.value)})}),document.body)]})};I.displayName="Select";var B=function(e){var n=e.className,r=e.style;return o("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,style:r,children:o("path",{d:"M3.5 7.5L6 10L8.5 7.5M3.5 4.5L6 2L8.5 4.5",stroke:"#A9A29D",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})},E=function(n){var r=n.className,t=n.style;return e("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:r,style:t,children:[o("path",{d:"M3.5 4.5L6 2L8.5 4.5",stroke:"#A9A29D",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o("path",{d:"M3.5 7.5L6 10L8.5 7.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})},j=function(n){var r=n.className,t=n.style;return e("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:r,style:t,children:[o("path",{d:"M8.5 7.5L6 10L3.5 7.5",stroke:"#A9A29D",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o("path",{d:"M8.5 4.5L6 2L3.5 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})},N=function(e){var n=e.className,r=e.style;return o("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,style:r,children:o("path",{d:"M15.8334 10H4.16675M4.16675 10L10.0001 15.8334M4.16675 10L10.0001 4.16669",stroke:"currentColor",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})})},D=function(e){var n=e.className,r=e.style;return o("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,style:r,children:o("path",{d:"M4.16675 10H15.8334M15.8334 10L10.0001 4.16669M15.8334 10L10.0001 15.8334",stroke:"currentColor",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})})},M=function(r){var t=r.current,i=r.defaultCurrent,a=void 0===i?1:i,d=r.total,c=void 0===d?0:d,p=r.pageSize,h=r.defaultPageSize,x=void 0===h?10:h,v=r.showSizeChanger,g=void 0!==v&&v,y=r.pageSizeOptions,b=void 0===y?["10","20","50","100"]:y,w=r.showQuickJumper,k=void 0!==w&&w,C=r.showTotal,z=r.onChange,F=r.onShowSizeChange,W=r.simple,L=void 0!==W&&W,B=r.disabled,E=void 0!==B&&B,j=r.hideOnSinglePage,M=void 0!==j&&j,H=r.className,R=void 0===H?"":H,T=r.style,O=r.size,P=void 0===O?"default":O,_=r.responsive,K=void 0!==_&&_;r.showLessItems;var X=r.itemRender,q=m().primaryColor,Y=void 0===q?"#FB6011":q,V=l(a),J=V[0],Q=V[1],G=l(x),U=G[0],Z=G[1],$=l(""),ee=$[0],oe=$[1],ne=null!=t?t:J,re=null!=p?p:U,te=u(function(){return Math.ceil(c/re)},[c,re]);s(function(){void 0!==t&&Q(t)},[t]),s(function(){void 0!==p&&Z(p)},[p]);var ie=function(e){e<1||e>te||e===ne||E||(void 0===t&&Q(e),null==z||z(e,re))},le=function(){var e=parseInt(ee,10);e>=1&&e<=te&&(ie(e),oe(""))};if(M&&te<=1)return null;if(L)return e("div",{className:"aha-pagination aha-pagination-simple ".concat(R),style:T,children:[o(S,{onClick:function(){return ie(ne-1)},disabled:E||1===ne,type:"default",size:"default"===P?"medium":"small",style:{marginRight:"8px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:o(N,{})}),e("span",{style:{margin:"0 8px",fontSize:"14px",lineHeight:"20px",color:"#475467",fontFamily:"DM Sans, sans-serif"},children:[ne," / ",te]}),o(S,{onClick:function(){return ie(ne+1)},disabled:E||ne===te,type:"default",size:"default"===P?"medium":"small",style:{marginLeft:"8px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:o(D,{})})]});var ae=(ne-1)*re+1,de=Math.min(ne*re,c);return e("div",{className:"aha-pagination w-full ".concat(R),style:f({display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:K?"wrap":"nowrap",fontFamily:"DM Sans, sans-serif"},T),children:[C&&o("div",{className:"justify-start text-Text-text-secondary text-sm font-medium font-['DM_Sans'] leading-5",children:C(c,[ae,de])}),e("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[c>0&&o(n,{children:X?X(ne-1,"prev",o(S,{onClick:function(){return ie(ne-1)},disabled:E||1===ne,type:"default",size:"default"===P?"medium":"small",style:{height:"small"===P?"32px":"36px",padding:"0 12px",gap:"4px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:o(N,{})})):o(S,{onClick:function(){return ie(ne-1)},disabled:E||1===ne,type:"default",size:"default"===P?"medium":"small",style:{height:"small"===P?"32px":"36px",padding:"0 12px",gap:"4px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:o(N,{})})}),o("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:function(){if(te<=7)return Array.from({length:te},function(e,o){return o+1});var e=[];if(ne<=4){for(var o=1;o<=5;o++)e.push(o);e.push("jump-next"),e.push(te)}else if(ne>=te-3){e.push(1),e.push("jump-prev");for(o=te-4;o<=te;o++)e.push(o)}else{e.push(1),e.push("jump-prev");for(o=ne-1;o<=ne+1;o++)e.push(o);e.push("jump-next"),e.push(te)}return e}().map(function(e){return function(e){if("number"==typeof e){var n=e===ne,r=o(S,{onClick:function(){return ie(e)},disabled:E,type:n?"primary":"default",size:"default"===P?"medium":"small",style:{minWidth:"small"===P?"32px":"36px",height:"small"===P?"32px":"36px",padding:"0 12px",margin:0,fontWeight:n?500:400,border:n?"1px solid ".concat(Y):void 0,boxShadow:"none",borderRadius:"8px"},children:e},e);return X?X(e,"page",r):r}if("jump-prev"===e)return r=o(S,{onClick:function(){return ie(Math.max(1,ne-5))},disabled:E,type:"default",size:"default"===P?"medium":"small",style:{minWidth:"small"===P?"32px":"36px",height:"small"===P?"32px":"36px",padding:"0 12px",margin:0,border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:"•••"},"jump-prev"),X?X(ne-5,"jump-prev",r):r;if("jump-next"===e)return r=o(S,{onClick:function(){return ie(Math.min(te,ne+5))},disabled:E,type:"default",size:"default"===P?"medium":"small",style:{minWidth:"small"===P?"32px":"36px",height:"small"===P?"32px":"36px",padding:"0 12px",margin:0,border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:"•••"},"jump-next"),X?X(ne+5,"jump-next",r):r;return null}(e)})}),c>0&&o(n,{children:X?X(ne+1,"next",o(S,{onClick:function(){return ie(ne+1)},disabled:E||ne===te,type:"default",size:"default"===P?"medium":"small",style:{height:"small"===P?"32px":"36px",padding:"0 12px",gap:"4px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:o(D,{})})):o(S,{onClick:function(){return ie(ne+1)},disabled:E||ne===te,type:"default",size:"default"===P?"medium":"small",style:{height:"small"===P?"32px":"36px",padding:"0 12px",gap:"4px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:o(D,{})})}),g&&o(I,{value:re,options:b.map(function(e){return{label:"".concat(e," / page"),value:Number(e)}}),onChange:function(e){return o=Number(e),n=Math.ceil(c/o),r=ne>n?n:ne,void 0===p&&Z(o),void 0===t&&Q(r),null==F||F(r,o),void(null==z||z(r,o));var o,n,r},disabled:E,size:"small"===P?"small":"medium",style:{minWidth:"small"===P?80:96}}),k&&e("div",{style:{display:"flex",alignItems:"center",gap:"8px",fontFamily:"DM Sans, sans-serif"},children:[o("span",{style:{fontSize:"14px",lineHeight:"20px",color:"#475467"},children:"Go to"}),o(A,{type:"number",min:1,value:ee,onChange:function(e){return oe(e.target.value)},onPressEnter:le,disabled:E,size:"small"===P?"small":"medium",style:{width:56,minWidth:56}}),o("span",{style:{fontSize:"14px",lineHeight:"20px",color:"#475467"},children:"page"}),"object"==typeof k&&k.goButton?o(S,{onClick:le,disabled:E,type:"default",size:"default"===P?"medium":"small",style:{border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:k.goButton}):o(S,{onClick:le,disabled:E,type:"default",size:"default"===P?"medium":"small",style:{border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:"OK"})]})]})]})},H=function(n){var r=n.checked,t=void 0!==r&&r,i=n.indeterminate,a=void 0!==i&&i,d=n.disabled,s=void 0!==d&&d,c=n.onChange,u=n.className,p=void 0===u?"":u,h=n.style,x=n.children,v=n.size,g=void 0===v?"sm":v,m=n.hint,y=n.isFocused,b=l(!1),w=b[0],k=b[1],S=l(!1),C=S[0],z=S[1],F=t||a,W=null!=y?y:C,L=function(){s||(null==c||c({target:{checked:!t},currentTarget:{checked:!t}}))},A="sm"===g?"16px":"20px",I="sm"===g?"12px":"14px",B="sm"===g?"var(--radius-xs, 4px)":"var(--radius-sm, 6px)",E="sm"===g?"var(--font-size-text-sm, 14px)":"var(--font-size-text-md, 16px)",j="sm"===g?"var(--line-height-text-sm, 20px)":"var(--line-height-text-md, 24px)",N="sm"===g?"var(--spacing-md, 8px)":"var(--spacing-lg, 12px)",D=s&&F?"var(--color-fg-disabled_subtle, #d7d3d0)":"var(--color-fg-white, #ffffff)",M=x||m;return e("div",{className:"aha-checkbox ".concat(p),role:"checkbox","aria-checked":a?"mixed":t,"aria-disabled":s,tabIndex:s?-1:0,style:f({display:"inline-flex",alignItems:"flex-start",gap:N,cursor:s?"not-allowed":"pointer",outline:"none"},h),onClick:L,onKeyDown:function(e){" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),L())},onMouseEnter:function(){return!s&&k(!0)},onMouseLeave:function(){return k(!1)},onFocus:function(){return!s&&z(!0)},onBlur:function(){return z(!1)},children:[e("div",{style:{position:"relative",width:A,height:A,minWidth:A,minHeight:A,flexShrink:0,borderRadius:B,border:s?"1px solid var(--color-border-disabled, #d7d3d0)":F?w?"1px solid var(--color-bg-brand-solid_hover, #ec470a)":"1px solid var(--color-bg-brand-solid, #fb6011)":"1px solid var(--color-border-primary, #d7d3d0)",backgroundColor:s?"var(--color-bg-disabled_subtle, #fafaf9)":F?w?"var(--color-bg-brand-solid_hover, #ec470a)":"var(--color-bg-brand-solid, #fb6011)":w?"var(--color-bg-primary_hover, #fafaf9)":"var(--color-bg-primary, #ffffff)",display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color 0.15s, border-color 0.15s, box-shadow 0.15s",boxSizing:"border-box",boxShadow:W?"var(--focus-ring, 0px 0px 0px 2px #ffffff, 0px 0px 0px 4px #fb6011)":"none",marginTop:M?"2px":"0"},children:[o("svg",{"aria-hidden":"true",viewBox:"0 0 14 14",fill:"none",style:{position:"absolute",width:I,height:I,color:D,opacity:a?1:0,transition:"opacity 0.15s",pointerEvents:"none"},children:o("path",{d:"M2.91675 7H11.0834",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),o("svg",{"aria-hidden":"true",viewBox:"0 0 14 14",fill:"none",style:{position:"absolute",width:I,height:I,color:D,opacity:t&&!a?1:0,transition:"opacity 0.15s",pointerEvents:"none"},children:o("path",{d:"M11.6666 3.5L5.24992 9.91667L2.33325 7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]}),M&&e("div",{style:{display:"inline-flex",flexDirection:"column",gap:"md"===g?"var(--spacing-xxs, 2px)":"0"},children:[x&&o("span",{style:{fontSize:E,lineHeight:j,fontWeight:"var(--font-weight-medium, 500)",fontFamily:'var(--font-family-body, "DM Sans", sans-serif)',color:s?"var(--color-text-disabled, #79716b)":"var(--color-text-secondary, #44403c)",userSelect:"none"},children:x}),m&&o("span",{style:{fontSize:E,lineHeight:j,fontWeight:"var(--font-weight-regular, 400)",fontFamily:'var(--font-family-body, "DM Sans", sans-serif)',color:"var(--color-text-tertiary, #57534e)"},onClick:function(e){return e.stopPropagation()},children:m})]})]})};H.displayName="Checkbox";var R=function(r){var t=r.color;return e(n,{children:[o("style",{children:"\n @keyframes aha-table-loading-spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n }\n "}),e("svg",{width:32,height:32,viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,style:{animation:"aha-table-loading-spin 1s linear infinite"},children:[o("circle",{cx:"12",cy:"12",r:"10",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"32",strokeDashoffset:"24",opacity:.3}),o("circle",{cx:"12",cy:"12",r:"10",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"32",strokeDashoffset:"16"})]})]})},T=function(e){var n=e.loading,r=e.spinColor;if(!n)return null;var t=!0===n?o(R,{color:r}):n;return o("div",{role:"status","aria-live":"polite","aria-label":"Loading",className:"aha-table-loading-overlay",style:{position:"absolute",inset:0,zIndex:50,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(255, 255, 255, 0.55)",pointerEvents:"auto"},children:t})},O=function(e,o){return"string"==typeof o?null==e?void 0:e[o]:o.reduce(function(e,o){return null==e?void 0:e[o]},e)},P=function(e,o){var n,r;return"function"==typeof o?o(e):"string"==typeof o?null!==(n=O(e,o))&&void 0!==n?n:"":null!==(r=e.key)&&void 0!==r?r:""},_=function(e){var n=e.order,r=m().primaryColor;return"ascend"===n?o(j,{style:{color:r}}):"descend"===n?o(E,{style:{color:r}}):o(B,{})},K=function(n){var t,i,a,p,v=n.columns,g=void 0===v?[]:v,y=n.dataSource,b=void 0===y?[]:y,w=n.rowKey,k=void 0===w?"key":w,S=n.rowSelection,C=n.pagination,z=void 0!==C&&C,F=n.size,W=void 0===F?"middle":F,L=n.bordered,A=void 0!==L&&L,I=n.loading,B=void 0!==I&&I,E=n.locale,j=n.showHeader,N=void 0===j||j,D=n.title,R=n.footer,K=n.summary,X=n.scroll,q=n.tableLayout,Y=void 0===q?"auto":q,V=n.onChange,J=n.onSorterChange,Q=n.onPaginationChange,G=n.onRow,U=n.className,Z=void 0===U?"":U,$=n.innerClassName,ee=void 0===$?"":$,oe=n.style,ne=n.expandable,re=n.rowClassName,te=n.onHeaderRow;n.sticky;var ie=h(n,["columns","dataSource","rowKey","rowSelection","pagination","size","bordered","loading","locale","showHeader","title","footer","summary","scroll","tableLayout","onChange","onSorterChange","onPaginationChange","onRow","className","innerClassName","style","expandable","rowClassName","onHeaderRow","sticky"]),le=m().primaryColor||"#FB6011",ae=l((null==S?void 0:S.selectedRowKeys)||(null==S?void 0:S.defaultSelectedRowKeys)||[]),de=ae[0],se=ae[1];s(function(){void 0!==(null==S?void 0:S.selectedRowKeys)&&se(S.selectedRowKeys)},[null==S?void 0:S.selectedRowKeys]);var ce=l(new Map),ue=ce[0],pe=ce[1],fe=l((null==ne?void 0:ne.defaultExpandedRowKeys)||[]),he=fe[0],xe=fe[1],ve=l(z&&"object"==typeof z&&(z.current||z.defaultCurrent)||1),ge=ve[0],me=ve[1],ye=l(z&&"object"==typeof z&&(z.pageSize||z.defaultPageSize)||10),be=ye[0],we=ye[1];s(function(){z&&"object"==typeof z&&(void 0!==z.current&&me(z.current),void 0!==z.pageSize&&we(z.pageSize))},[z]);var ke=l(null),Se=ke[0],Ce=ke[1],ze=l(null),Fe=ze[0],We=ze[1],Le=l(!1),Ae=Le[0],Ie=Le[1],Be=d(null),Ee=d(null);s(function(){var e=function(){Ie(window.innerWidth<768)};return e(),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}},[]);var je=c(function(e,o){var n,r,t,i=null===(n=null==S?void 0:S.getCheckboxProps)||void 0===n?void 0:n.call(S,e);if(!(null==i?void 0:i.disabled)){var l,a=P(e,k);l="radio"===(null==S?void 0:S.type)?o?[a]:[]:o?x(x([],de,!0),[a],!1):de.filter(function(e){return e!==a}),se(l);var d=b.filter(function(e){return l.includes(P(e,k))});null===(r=null==S?void 0:S.onChange)||void 0===r||r.call(S,l,d),null===(t=null==S?void 0:S.onSelect)||void 0===t||t.call(S,e,o,d,new Event("select"))}},[de,k,S,b]),Ne=c(function(e,o){var n,r,t=o.filter(function(e){var o;return!(null===(o=null==S?void 0:S.getCheckboxProps)||void 0===o?void 0:o.call(S,e).disabled)}).map(function(e){return P(e,k)}),i=e?t:[];se(i);var l=b.filter(function(e){return i.includes(P(e,k))}),a=e?o.filter(function(e){var o;return!(null===(o=null==S?void 0:S.getCheckboxProps)||void 0===o?void 0:o.call(S,e).disabled)}):[];null===(n=null==S?void 0:S.onChange)||void 0===n||n.call(S,i,l),null===(r=null==S?void 0:S.onSelectAll)||void 0===r||r.call(S,e,l,a)},[k,S,b]),De=c(function(e,o){var n=e.key||(Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex);if(n){var r=new Map(ue);null===o?r.delete(n):r.set(n,o),pe(r);var t=Array.from(r.entries()).map(function(o){var n=o[0],r=o[1];return{column:g.find(function(e){return(e.key||(Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex))===n})||e,order:r,field:n,columnKey:n}}),i={column:e,order:o,field:n,columnKey:n};e.onSorterChange&&e.onSorterChange(i),J&&J(1===t.length?t[0]:t),V&&V({current:ge,pageSize:be},{},1===t.length?t[0]:t,{currentDataSource:b,action:"sort"})}},[ue,V,J,ge,be,b,g]);c(function(e,o){var n,r,t,i=P(e,k);t=o?x(x([],he,!0),[i],!1):he.filter(function(e){return e!==i}),xe(t),null===(n=null==ne?void 0:ne.onExpand)||void 0===n||n.call(ne,o,e),null===(r=null==ne?void 0:ne.onExpandedRowsChange)||void 0===r||r.call(ne,t)},[he,k,ne]);var Me,He=c(function(){var e=x([],b,!0);return ue.size>0&&e.sort(function(e,o){for(var n=function(n,r){var t=g.find(function(e){return(e.key||(Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex))===n});if(!t)return"continue";var i=0;if("function"==typeof t.sorter)i=t.sorter(e,o);else if(!0===t.sorter){var l=O(e,t.dataIndex||n),a=O(o,t.dataIndex||n);l<a?i=-1:l>a&&(i=1)}return 0!==i?{value:"ascend"===r?i:-i}:void 0},r=0,t=Array.from(ue.entries());r<t.length;r++){var i=t[r],l=n(i[0],i[1]);if("object"==typeof l)return l.value}return 0}),e},[b,ue,g]),Re=He(),Te=Boolean(z&&"object"==typeof z&&void 0!==z.total),Oe=u(function(){if(!1===z||!z)return Re;if(Te)return Re;var e=(ge-1)*be,o=e+be;return Re.slice(e,o)},[Re,ge,be,z,Te]),Pe=c(function(e,o){var n,r,t=null!=o?o:be;if(me(e),o&&we(o),Q&&Q(e,t),z&&"object"==typeof z&&(null===(n=z.onChange)||void 0===n||n.call(z,e,o),o&&(null===(r=z.onShowSizeChange)||void 0===r||r.call(z,e,o))),V){var i=Array.from(ue.entries()).map(function(e){var o=e[0],n=e[1];return{column:g.find(function(e){return(e.key||(Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex))===o}),order:n,field:o,columnKey:o}});V({current:e,pageSize:t},{},1===i.length?i[0]:i,{currentDataSource:Re,action:"paginate"})}},[z,Q,V,be,ue,g,Re]),_e=c(function(e,o,n){var r=O(o,e.dataIndex||"");return e.render?e.render(r,o,n):r},[]),Ke=c(function(e,o,n){if(o){var r=!0===o?"left":o,t=0;if("left"===r){if(S&&("left"===S.fixed||!0===S.fixed))t+="number"==typeof S.columnWidth?S.columnWidth:"string"==typeof S.columnWidth?parseInt(S.columnWidth):60;for(var i=0;i<e;i++){if("left"===(l=g[i]).fixed||!0===l.fixed)t+=l.width?"number"==typeof l.width?l.width:parseInt(l.width)||0:150}return t}if("right"===r){for(i=e+1;i<g.length;i++){var l;if("right"===(l=g[i]).fixed)t+=l.width?"number"==typeof l.width?l.width:parseInt(l.width)||0:150}if(S&&"right"===S.fixed)t+="number"==typeof S.columnWidth?S.columnWidth:"string"==typeof S.columnWidth?parseInt(S.columnWidth):60;return t}}},[g,S]),Xe=c(function(){if(!N)return null;var n,r,t,i,l=g.map(function(n,r){var t,i=n.key||(Array.isArray(n.dataIndex)?n.dataIndex.join("."):n.dataIndex)||r,l=ue.get(i)||null,a=Ke(r,n.fixed,!0),d=n.width?"number"==typeof n.width?"".concat(n.width,"px"):n.width:void 0;return o("th",f({className:"".concat(n.className||""," ").concat(n.align?"text-".concat(n.align):""),style:{width:d,minWidth:n.minWidth?"number"==typeof n.minWidth?"".concat(n.minWidth,"px"):n.minWidth:d||void 0,maxWidth:d,position:n.fixed?"sticky":"relative",left:"left"===n.fixed||!0===n.fixed?void 0!==a?"".concat(a,"px"):"0":void 0,right:"right"===n.fixed?void 0!==a?"".concat(a,"px"):"0":void 0,zIndex:n.fixed?"left"===n.fixed||!0===n.fixed?10:9:1,backgroundColor:(n.fixed,"#F9FAFB"),boxShadow:"left"===n.fixed||!0===n.fixed?"2px 0 4px rgba(0, 0, 0, 0.05)":"right"===n.fixed?"-2px 0 4px rgba(0, 0, 0, 0.05)":void 0,padding:"12px 16px",textAlign:n.align||"left",borderBottom:"1px solid #EAECF0",fontWeight:600,fontSize:"12px",lineHeight:"18px",color:"#475467",fontFamily:"DM Sans, sans-serif"}},(null===(t=n.onHeaderCell)||void 0===t?void 0:t.call(n,n))||{},{children:e("div",{style:{display:"flex",alignItems:"center",gap:"8px",justifyContent:"right"===n.align?"flex-end":"center"===n.align?"center":"flex-start"},children:[o("span",{style:{fontWeight:600,fontSize:"12px",lineHeight:"18px",color:"#475467"},children:"function"==typeof n.title?n.title({sortOrder:l,sortColumn:n}):n.title}),n.sorter&&o("button",{onClick:function(){De(n,null===l?"ascend":"ascend"===l?"descend":null)},style:{border:"none",background:"none",cursor:"pointer",display:"flex",alignItems:"center",padding:"2px",color:l?"#475467":"#98A2B3"},children:o(_,{order:l||void 0})})]})}),i)});if(S){var a="number"==typeof S.columnWidth?"".concat(S.columnWidth,"px"):"string"==typeof S.columnWidth?S.columnWidth:"60px",d=o("th",{style:{width:a,position:S.fixed?"sticky":"relative",left:"left"===S.fixed||!0===S.fixed?"0px":void 0,right:"right"===S.fixed?"0px":void 0,zIndex:S.fixed?"left"===S.fixed||!0===S.fixed?12:11:1,backgroundColor:"#F9FAFB",padding:"12px 16px",borderBottom:"1px solid #EAECF0",fontWeight:600,fontSize:"12px",lineHeight:"18px",color:"#475467",fontFamily:"DM Sans, sans-serif",textAlign:"center"},children:e("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:[!S.hideSelectAll&&"radio"!==S.type&&(n=Oe.filter(function(e){var o;return!(null===(o=S.getCheckboxProps)||void 0===o?void 0:o.call(S,e).disabled)}),r=n.map(function(e){return P(e,k)}),t=n.length>0&&r.every(function(e){return de.includes(e)}),i=r.some(function(e){return de.includes(e)}),o(H,{checked:t,indeterminate:i&&!t,onChange:function(e){return Ne(e.target.checked,Oe)}})),S.columnTitle&&o("span",{style:{marginLeft:S.hideSelectAll?0:"8px"},children:S.columnTitle})]})},"selection");l.unshift(d)}var s=null==te?void 0:te(g,0);return o("thead",{ref:Ee,children:o("tr",f({},s||{},{children:l}))})},[g,N,ue,S,de,Oe,k,De,Ne,E,te,Ke]),qe=c(function(e){Ce(e)},[]),Ye=c(function(e,o){e.preventDefault(),We(o)},[]),Ve=c(function(e,o){if(e.preventDefault(),null===Se||Se===o)return Ce(null),void We(null);var n=x([],Oe,!0),r=n[Se];n.splice(Se,1),n.splice(o,0,r),Ce(null),We(null)},[Se,Oe]),Je=c(function(){Ce(null),We(null)},[]),Qe=c(function(){var e=null==E?void 0:E.emptyText,n="function"==typeof e?e():void 0!==e?e:"No data",r=g.length+(S?1:0);return o("tr",{className:"aha-table-placeholder",children:o("td",{colSpan:r,style:{padding:"48px 16px",textAlign:"center",color:"#98A2B3",fontSize:"14px",lineHeight:"20px",fontFamily:"DM Sans, sans-serif",borderBottom:"none",backgroundColor:"white"},children:n})})},[null==E?void 0:E.emptyText,g.length,S]),Ge=c(function(){return 0===Oe.length?Qe():Oe.map(function(n,t){var i,l=P(n,k),a=de.includes(l),d=he.includes(l),s=(null==G?void 0:G(n,t))||{},c=t===Oe.length-1;return e(r.Fragment,{children:[e("tr",f({className:"".concat("function"==typeof re?re(n,t):re||""," ").concat(Se===t?"dragging":""," ").concat(Fe===t?"drag-over":""),draggable:!0,onDragStart:function(){return qe(t)},onDragOver:function(e){return Ye(e,t)},onDrop:function(e){return Ve(e,t)},onDragEnd:Je,style:f({cursor:"move",opacity:Se===t?.5:1,backgroundColor:Fe===t?"#F9FAFB":"white",transition:"background-color 0.2s"},s.style),onMouseEnter:function(e){Se!==t&&Fe!==t&&(e.currentTarget.style.backgroundColor="#F9FAFB")},onMouseLeave:function(e){Se!==t&&Fe!==t&&(e.currentTarget.style.backgroundColor="white")}},s,{children:[S&&o("td",{style:{width:"number"==typeof S.columnWidth?"".concat(S.columnWidth,"px"):"string"==typeof S.columnWidth?S.columnWidth:"60px",position:S.fixed?"sticky":"relative",left:"left"===S.fixed||!0===S.fixed?"0px":void 0,right:"right"===S.fixed?"0px":void 0,zIndex:S.fixed?"left"===S.fixed||!0===S.fixed?12:11:1,backgroundColor:"white",padding:"16px",borderBottom:c?"none":"1px solid #EAECF0",textAlign:"center"},children:o("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:o(H,{checked:a,onChange:function(e){return je(n,e.target.checked)},disabled:null===(i=S.getCheckboxProps)||void 0===i?void 0:i.call(S,n).disabled})})}),g.map(function(e,r){var i,l=e.key||(Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex)||r,a=(null===(i=e.onCell)||void 0===i?void 0:i.call(e,n,t))||{},d=Ke(r,e.fixed,!1),s=e.width?"number"==typeof e.width?"".concat(e.width,"px"):e.width:void 0;return o("td",f({className:"".concat(e.className||""," ").concat(e.align?"text-".concat(e.align):""),style:f({width:s,minWidth:e.minWidth?"number"==typeof e.minWidth?"".concat(e.minWidth,"px"):e.minWidth:s||void 0,maxWidth:s,position:e.fixed?"sticky":"relative",left:"left"===e.fixed||!0===e.fixed?void 0!==d?"".concat(d,"px"):"0":void 0,right:"right"===e.fixed?void 0!==d?"".concat(d,"px"):"0":void 0,zIndex:e.fixed?"left"===e.fixed||!0===e.fixed?10:9:1,backgroundColor:"white",boxShadow:"left"===e.fixed||!0===e.fixed?"2px 0 4px rgba(0, 0, 0, 0.05)":"right"===e.fixed?"-2px 0 4px rgba(0, 0, 0, 0.05)":void 0,padding:"16px",borderBottom:c?"none":"1px solid #EAECF0",fontSize:"14px",lineHeight:"20px",color:"#101828",fontFamily:"DM Sans, sans-serif",textAlign:e.align||"left"},a.style),colSpan:e.colSpan,rowSpan:e.rowSpan},a,{children:_e(e,n,t)}),l)})]})),(null==ne?void 0:ne.expandedRowRender)&&d&&o("tr",{children:o("td",{colSpan:g.length+(S?1:0),children:ne.expandedRowRender(n,t,0,!0)})})]},l)})},[Oe,k,de,he,S,g,G,re,je,_e,ne,Se,Fe,qe,Ye,Ve,Je,Ke,Qe]),Ue=function(){var e;if(!1===z||!z)return null;var n=null!==(e=z.total)&&void 0!==e?e:Re.length,r=z.position||"bottomRight";return o("div",{style:{marginTop:"16px",display:"flex",justifyContent:r.includes("Right")?"flex-end":r.includes("Left")?"flex-start":"center"},children:o(M,{current:ge,total:n,pageSize:be,showSizeChanger:z.showSizeChanger,pageSizeOptions:z.pageSizeOptions,showQuickJumper:z.showQuickJumper,showTotal:z.showTotal,onChange:Pe,onShowSizeChange:Pe,simple:z.simple,responsive:z.responsive,size:"small"===W?"small":"default"})})},Ze=u(function(){return g.some(function(e){return e.fixed})||S&&S.fixed},[g,S]),$e=u(function(){return g.every(function(e){return e.width})&&(!S||S.columnWidth)},[g,S]),eo=u(function(){if(null==X?void 0:X.x){if("number"==typeof X.x)return X.x;if(!0===X.x)return g.reduce(function(e,o){return e+(o.width?"number"==typeof o.width?o.width:parseInt(String(o.width).replace("px",""))||0:150)},0)+(S?"number"==typeof S.columnWidth?S.columnWidth:parseInt(String(S.columnWidth||"60").replace("px",""))||60:0)}if(Ze)return g.reduce(function(e,o){return o.fixed&&o.width?e+("number"==typeof o.width?o.width:parseInt(String(o.width).replace("px",""))||0):e},0)+(S&&S.fixed&&S.columnWidth?"number"==typeof S.columnWidth?S.columnWidth:parseInt(String(S.columnWidth).replace("px",""))||60:0)},[g,null==X?void 0:X.x,S,Ze]),oo=u(function(){return"fixed"===Y||Ze||$e||g.some(function(e){return e.width})?"fixed":Y},[Y,Ze,$e,g]),no=f(f({width:"100%",minWidth:eo?"".concat(eo,"px"):"100%",borderCollapse:"separate",borderSpacing:0,tableLayout:oo,backgroundColor:"white"},A&&{borderRadius:"8px",border:"1px solid #EAECF0"}),{overflow:"hidden"}),ro=f({position:"relative",width:"100%",maxWidth:"100%",maxHeight:"number"==typeof(null==X?void 0:X.y)?"".concat(X.y,"px"):void 0,borderRadius:"8px"},oe);if(Ae)return e("div",f({ref:Be,className:"aha-table aha-table-mobile-wrapper ".concat(Z),style:ro,"aria-busy":!!B||void 0},ie,{children:[D&&o("div",{style:{marginBottom:"16px"},children:D(Re)}),z&&"object"==typeof z&&(null===(t=z.position)||void 0===t?void 0:t.startsWith("top"))&&Ue(),(Me="function"==typeof(null==E?void 0:E.emptyText)?E.emptyText():void 0!==(null==E?void 0:E.emptyText)?E.emptyText:"No data",0===Oe.length?o("div",{className:"aha-table-mobile aha-table-placeholder",style:{padding:"48px 16px",textAlign:"center",color:"#98A2B3",fontSize:"14px",lineHeight:"20px",fontFamily:"DM Sans, sans-serif"},children:Me}):o("div",{className:"aha-table-mobile",children:Oe.map(function(n,r){var t,i=P(n,k),l=de.includes(i);return e("div",{className:"aha-table-mobile-row ".concat(l?"selected":""),style:{border:"1px solid #e8e8e8",borderRadius:"4px",padding:"12px",marginBottom:"12px",backgroundColor:l?"#e6f7ff":"white"},children:[S&&o("div",{style:{marginBottom:"8px"},children:o(H,{checked:l,onChange:function(e){return je(n,e.target.checked)},disabled:null===(t=S.getCheckboxProps)||void 0===t?void 0:t.call(S,n).disabled})}),g.map(function(t){var i=t.key||(Array.isArray(t.dataIndex)?t.dataIndex.join("."):t.dataIndex),l=O(n,t.dataIndex||""),a=t.render?t.render(l,n,r):l;return e("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"8px",paddingBottom:"8px",borderBottom:"1px solid #f0f0f0"},children:[e("span",{style:{fontWeight:"bold",color:"#666"},children:["function"==typeof t.title?t.title({}):t.title,":"]}),o("span",{style:{flex:1,textAlign:"right"},children:a})]},i)})]},i)})})),R&&o("div",{style:{marginTop:"16px"},children:R(Re)}),z&&("object"!=typeof z||!(null===(i=z.position)||void 0===i?void 0:i.startsWith("top")))&&Ue(),o(T,{loading:B,spinColor:le})]}));var to={position:"relative",overflowX:(null==X?void 0:X.x)||Ze?"auto":"visible",overflowY:(null==X?void 0:X.y)?"auto":"visible",width:"100%",maxWidth:!0===(null==X?void 0:X.x)?"100%":"number"==typeof(null==X?void 0:X.x)?"".concat(X.x,"px"):void 0,maxHeight:"number"==typeof(null==X?void 0:X.y)?"".concat(X.y,"px"):void 0,borderRadius:"8px"};return e("div",f({ref:Be,className:"aha-table ".concat(Z),style:ro,"aria-busy":!!B||void 0},ie,{children:[D&&o("div",{style:{marginBottom:"16px"},children:D(Re)}),z&&"object"==typeof z&&(null===(a=z.position)||void 0===a?void 0:a.startsWith("top"))&&Ue(),o("div",{style:to,children:o("div",{style:{width:"100%",minWidth:eo?"".concat(eo,"px"):"100%",display:"block"},children:e("table",{style:no,className:ee,children:[Xe(),o("tbody",{children:Ge()}),K&&o("tfoot",{children:o("tr",{children:o("td",{colSpan:g.length+(S?1:0),children:K(Re)})})})]})})}),R&&o("div",{style:{marginTop:"16px"},children:R(Re)}),z&&("object"!=typeof z||!(null===(p=z.position)||void 0===p?void 0:p.startsWith("top")))&&Ue(),o(T,{loading:B,spinColor:le})]}))};export{K as default};
2
2
  //# sourceMappingURL=Table.esm.js.map