@ehfuse/mui-virtual-data-table 1.1.23 → 1.1.24

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.
@@ -5,7 +5,7 @@
5
5
  * 회전 호(상단 색)를 한 클래스에 담는다. 앱 초기 스피너 및 대시보드 레이아웃 스피너와 동일한 모양.
6
6
  */
7
7
  export interface CssSpinnerProps {
8
- /** 스피너 지름(px). 기본 44 */
8
+ /** 스피너 지름(px). 기본 54 */
9
9
  size?: number;
10
10
  }
11
11
  export declare function CssSpinner({ size }: CssSpinnerProps): import("react/jsx-runtime").JSX.Element;
package/dist/index.esm.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import{forwardRef as Xe,useCallback as Ce,useMemo as rt,useRef as ee,useEffect as me,memo as Nt,useState as nt}from"react";import{Box as ge,Table as Ot,TableBody as $t,TableCell as Re,TableContainer as Ft,TableHead as Pt,TableFooter as At,TableRow as Ve,TableSortLabel as ot,Paper as Bt,Typography as Vt}from"@mui/material";import{TableVirtuoso as Wt}from"react-virtuoso";import{jsx as tt}from"react/jsx-runtime";import{useRef as lt,useState as mt,useEffect as gt}from"react";import{Box as bt,CircularProgress as xt}from"@mui/material";var Ae=function(){return Ae=Object.assign||function(p){for(var f,T=1,L=arguments.length;T<L;T++){f=arguments[T];for(var D in f)Object.prototype.hasOwnProperty.call(f,D)&&(p[D]=f[D])}return p},Ae.apply(this,arguments)};function at(l){var p=l.visible,f=l.onComplete,T=l.fadeoutDuration,L=T===void 0?200:T,D=l.exitDelay,C=D===void 0?0:D,k=l.size,R=k===void 0?40:k,z=l.className,X=l.style,V=l.sx,K=l.indicator,E=l.background,j=E===void 0?{show:!0,color:"255, 255, 255",opacity:.9}:E,ce=lt(void 0),a=lt(null),_=mt(p),ue=_[0],de=_[1],P=j.show,Y=P===void 0?!0:P,S=j.color,I=S===void 0?"255, 255, 255":S,ne=j.opacity,oe=ne===void 0?.9:ne;if(gt(function(){var ie=ce.current;if(ie===!0&&p===!1&&a.current){var le=a.current;le.style.opacity="0",setTimeout(function(){de(!1),f?.()},L+C)}else p===!0&&(de(!0),a.current&&(a.current.style.opacity="1"));ce.current=p},[p,f,L,C]),!ue)return null;var Se=function(){return typeof K=="string"?tt("img",{src:K,alt:"Loading",style:{width:R,height:R}}):K||tt(xt,{size:R})},pe=function(){return Y?I.startsWith("rgba")?{backgroundColor:I}:/^\d+,\s*\d+,\s*\d+$/.test(I)?{backgroundColor:"rgba(".concat(I,", ").concat(oe,")")}:oe!==1?{backgroundColor:I,"&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:I,opacity:oe,zIndex:-1}}:{backgroundColor:I}:{backgroundColor:"transparent"}};return tt(bt,{ref:a,className:z,style:Ae({},X),sx:Ae(Ae({position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,opacity:p?1:0,transition:"opacity ".concat(L,"ms ease-out")},pe()),V),children:Se()})}import{Fragment as vt,jsx as st,jsxs as wt}from"react/jsx-runtime";var yt=`
2
2
  .vdt-css-spinner{box-sizing:border-box;border-radius:50%;border:4px solid rgba(28,64,125,0.14);border-top-color:#1c407d;animation:vdt-css-spinner-spin .75s linear infinite}
3
3
  @keyframes vdt-css-spinner-spin{to{transform:rotate(360deg)}}
4
- `;function ct({size:l=44}){return wt(vt,{children:[st("style",{children:yt}),st("span",{className:"vdt-css-spinner",role:"progressbar","aria-label":"loading",style:{display:"inline-block",width:l,height:l}})]})}import{useRef as Q,useEffect as se,useState as q,useCallback as $,useMemo as Be,forwardRef as Mt,useImperativeHandle as Ct,useLayoutEffect as St}from"react";import{jsx as De,jsxs as dt}from"react/jsx-runtime";var Tt=["editor","textarea","input","select","textfield","form-control","contenteditable","MuiInputBase-input","MuiSelect-select","MuiOutlinedInput-input","MuiFilledInput-input","MuiInput-input","MuiFormControl-root","MuiTextField-root","MuiSelect-root","MuiOutlinedInput-root","MuiFilledInput-root","MuiInput-root","MuiAutocomplete-input","MuiDatePicker-input","MuiSlider-thumb","MuiSlider-rail","MuiSlider-track","MuiSlider-mark","MuiSlider-markLabel","MuiSlider-root","MuiSlider-colorPrimary","MuiSlider-sizeMedium","MuiIconButton-root","MuiButton-root","MuiButtonBase-root","MuiTouchRipple-root","MuiCheckbox-root","MuiRadio-root","MuiSwitch-root","PrivateSwitchBase-root","ant-input","ant-input-affix-wrapper","ant-input-group-addon","ant-input-number","ant-input-number-handler","ant-select","ant-select-selector","ant-select-selection-search","ant-select-dropdown","ant-cascader","ant-cascader-input","ant-picker","ant-picker-input","ant-time-picker","ant-calendar-picker","ant-slider","ant-slider-track","ant-slider-handle","ant-switch","ant-checkbox","ant-checkbox-wrapper","ant-radio","ant-radio-wrapper","ant-rate","ant-upload","ant-upload-drag","ant-form-item","ant-form-item-control","ant-btn","ant-dropdown","ant-dropdown-trigger","ant-menu","ant-menu-item","ant-tooltip","ant-popover","ant-modal","ant-drawer","ant-tree-select","ant-auto-complete","ant-mentions","ant-transfer","ui-input","ui-textarea","ui-select","ui-select-trigger","ui-select-content","ui-select-item","ui-button","ui-checkbox","ui-radio-group","ui-switch","ui-slider","ui-range-slider","ui-calendar","ui-date-picker","ui-combobox","ui-command","ui-command-input","ui-popover","ui-dialog","ui-sheet","ui-dropdown-menu","ui-context-menu","ui-menubar","ui-navigation-menu","ui-form","ui-form-control","ui-form-item","ui-form-field","ui-label","radix-ui","radix-select","radix-dropdown","radix-dialog","radix-popover","radix-accordion","radix-tabs","radix-slider","radix-switch","radix-checkbox","radix-radio","ql-editor","ql-container","ql-toolbar","ql-picker","ql-picker-label","ql-picker-options","ql-formats","ql-snow","ql-bubble","quill","quilleditor","monaco-editor","monaco-editor-background","view-lines","decorationsOverviewRuler","monaco-scrollable-element","CodeMirror","CodeMirror-code","CodeMirror-lines","CodeMirror-scroll","CodeMirror-sizer","cm-editor","cm-focused","cm-content","tox-editor-container","tox-editor-header","tox-edit-area","tox-tinymce","mce-content-body","ck-editor","ck-content","ck-toolbar","ck-editor__editable","ck-widget","slate-editor","slate-content","DraftEditor-root","DraftEditor-editorContainer","public-DraftEditor-content","ehfuse-editor","ehfuse-editor-wrapper","ehfuse-editor-content","ehfuse-toolbar","ehfuse-toolbar-group","ehfuse-cursor","text-editor","rich-text-editor","wysiwyg","ace_editor","ace_content"],ut=(l,p)=>{let f=l.tagName.toLowerCase(),T=["text","password","email","number","search","tel","url","checkbox","radio"];if(f==="input"){let L=l.type;return T.includes(L)}if(["textarea","select","button"].includes(f)||["svg","path","circle","rect","line","polygon","polyline"].includes(f)||l.getAttribute("contenteditable")==="true")return!0;if(p?.excludeSelectors){for(let L of p.excludeSelectors)if(l.matches(L))return!0}return kt(l,p)},kt=(l,p)=>{let f=[...Tt,...p?.excludeClasses||[]],T=l,L=0,D=5;for(;T&&L<=D;){if(f.some(C=>T.classList.contains(C)))return!0;if(T.classList.contains("MuiDialogContent-root"))break;T=T.parentElement,L++}return!1},Lt={},Dt={},Rt={},Et={},It={},Ht=Mt(({className:l="",style:p={},containerStyle:f={},contentStyle:T={},children:L,onScroll:D,thumb:C=Lt,track:k=Dt,arrows:R=Rt,dragScroll:z=Et,autoHide:X=It,showScrollbar:V=!0,detectInnerScroll:K=!1},E)=>{let j=Q({});se(()=>{j.current={children:L,onScroll:D,showScrollbar:V,thumb:C,track:k,arrows:R,dragScroll:z,autoHide:X}});let ce=Q(null),a=Q(null),_=Q(null),ue=Q(null),de=Q(null),P=Q(null),[Y,S]=q(!1),[I,ne]=q(!1),[oe,Se]=q(!1),[pe,ie]=q({y:0,scrollTop:0}),[le,Ue]=q(0),[Ze,We]=q(0),[Ie,qe]=q(!1),[be,He]=q(!1),[Ne,w]=q({x:0,y:0,scrollTop:0,scrollLeft:0}),[m,ze]=q(null),[xe,fe]=q(null),[it,je]=q(!1),ye=Q(null),[_e,Oe]=q(!1),ve=Q(null),Te=Q(null),U=Q(null),H=Be(()=>{let t=C.color??"#606060";return{width:C.width??8,minHeight:C.minHeight??50,radius:C.radius??(C.width??8)/2,color:t,opacity:C.opacity??.6,hoverColor:C.hoverColor??t,hoverOpacity:C.hoverOpacity??1}},[C]),y=Be(()=>({width:k.width??16,color:k.color??"rgba(128, 128, 128, 0.1)",visible:k.visible??!0,alignment:k.alignment??"center",radius:k.radius??H.radius??4,margin:k.margin??4}),[k,H.radius]),A=Be(()=>{let t=R.color??"#808080";return{visible:R.visible??!1,step:R.step??50,color:t,opacity:R.opacity??.6,hoverColor:R.hoverColor??t,hoverOpacity:R.hoverOpacity??1}},[R]),we=Be(()=>({enabled:z.enabled??!0,excludeClasses:z.excludeClasses??[],excludeSelectors:z.excludeSelectors??[]}),[z]),h=Be(()=>({enabled:X.enabled??!0,delay:X.delay??1500,delayOnWheel:X.delayOnWheel??700}),[X]),M=H.width,ke=y.width,$e=H.minHeight,W=A.visible,Le=A.step,te=$(()=>{if(!a.current)return;let t=document.activeElement;t&&a.current.contains(t)&&t!==a.current||a.current.focus()},[]);Ct(E,()=>({getScrollContainer:()=>a.current,scrollTo:t=>{a.current&&a.current.scrollTo(t)},get scrollTop(){return a.current?.scrollTop||0},get scrollHeight(){return a.current?.scrollHeight||0},get clientHeight(){return a.current?.clientHeight||0}}),[]);let v=$(()=>{if(P.current){let o=P.current;if(document.contains(o)&&o.scrollHeight>o.clientHeight+2)return o;P.current=null}if(!a.current)return null;if(_.current&&_.current.scrollHeight>a.current.clientHeight+2)return P.current=a.current,a.current;if(!K)return null;let t=a.current.querySelectorAll('[data-virtuoso-scroller], [style*="overflow"], .virtuoso-scroller, [style*="overflow: auto"], [style*="overflow:auto"]');for(let o of t){let i=o;if(i!==a.current&&i.classList.contains("overlay-scrollbar-container"))continue;let s=i.parentElement,b=!1;for(;s&&s!==a.current;){if(s.classList.contains("overlay-scrollbar-container")&&s!==a.current){b=!0;break}s=s.parentElement}if(!b&&i.scrollHeight>i.clientHeight+2)return P.current=i,i}return null},[]),he=$(()=>v()!==null,[v]),F=$(()=>{ve.current&&(clearTimeout(ve.current),ve.current=null)},[]),Je=$(()=>{Te.current&&(clearTimeout(Te.current),Te.current=null)},[]),Ye=$(()=>{U.current&&(clearTimeout(U.current),U.current=null)},[]),n=$(t=>{h.enabled&&(F(),ve.current=setTimeout(()=>{S(!1),ve.current=null},t))},[F,h.enabled]),e=$(()=>{let t=v();if(!t){S(!1),qe(!1),F();return}if(qe(!0),!ue.current)return;h.enabled||(S(!0),F());let o=t.clientHeight,i=t.scrollHeight,s=t.scrollTop,b=0;if(ce.current){let Ge=window.getComputedStyle(ce.current),et=parseFloat(Ge.paddingTop)||0,ht=parseFloat(Ge.paddingBottom)||0;b=et+ht}let x=W?M*2+y.margin*4:y.margin*2,N=o-x+b,O=o/i,ae=Math.max(N*O,$e),Pe=i-o,J=N-ae,Qe=Pe>0?s/Pe*J:0;Ue(ae),We(Qe)},[v,F,W,M,$e,h.enabled]),d=$(t=>{t.preventDefault(),t.stopPropagation();let o=v();o&&(ne(!0),ie({y:t.clientY,scrollTop:o.scrollTop}),F(),S(!0),te())},[v,F,te]),g=$(t=>{if(!I)return;let o=v();if(!o)return;let i=o.clientHeight,s=o.scrollHeight-i,b=t.clientY-pe.y,x=i-le,N=b/x*s,O=Math.max(0,Math.min(s,pe.scrollTop+N));o.scrollTop=O,e()},[I,pe,le,e,v]),u=$(()=>{ne(!1),he()&&n(h.delay)},[he,n,h.delay]),r=$(t=>{if(!ue.current)return;let o=ue.current.getBoundingClientRect(),i=t.clientY-o.top,s=v();if(!s)return;let b=s.clientHeight,x=s.scrollHeight,N=i/b*(x-b);s.scrollTop=Math.max(0,Math.min(x-b,N)),e(),S(!0),n(h.delay),te()},[e,n,h.delay,v,te]),B=$(t=>{if(t.preventDefault(),t.stopPropagation(),!a.current)return;let o=Math.max(0,a.current.scrollTop-Le);a.current.scrollTop=o,e(),S(!0),n(h.delay),te()},[e,n,Le,h.delay,te]),Z=$(t=>{if(t.preventDefault(),t.stopPropagation(),!a.current||!_.current)return;let o=a.current,i=_.current.scrollHeight-o.clientHeight,s=Math.min(i,o.scrollTop+Le);o.scrollTop=s,e(),S(!0),n(h.delay),te()},[e,n,Le,h.delay,te]),Fe=$(t=>{if(!we.enabled)return;let o=t.target;if(ut(o,we)||t.button!==0)return;let i=v();i&&(i.scrollHeight<=i.clientHeight||(t.preventDefault(),He(!0),w({x:t.clientX,y:t.clientY,scrollTop:i.scrollTop,scrollLeft:i.scrollLeft||0}),F()))},[we,ut,v,F]),G=$(t=>{if(!be)return;let o=v();if(!o)return;let i=Ne.x-t.clientX,s=Ne.y-t.clientY;if(Math.abs(s)<3&&Math.abs(i)<3)return;S(!0);let b=Math.max(0,Math.min(o.scrollHeight-o.clientHeight,Ne.scrollTop+s));o.scrollTop=b,e()},[be,Ne,v,e]),Me=$(()=>{He(!1),he()&&n(h.delay)},[he,n,h.delay]);se(()=>{let t=x=>{e(),F(),S(!0);let N=_e?h.delayOnWheel:h.delay;n(N),D&&D(x)},o=()=>{Oe(!0),ye.current&&clearTimeout(ye.current),ye.current=setTimeout(()=>{Oe(!1)},300),F(),Ye(),U.current=setTimeout(()=>{S(!0),U.current=null},50)},i=[],s=v();s&&i.push(s);let b=a.current;return b&&!s&&(i.push(b),b.querySelectorAll('[data-virtuoso-scroller], [style*="overflow"], .virtuoso-scroller, [style*="overflow: auto"], [style*="overflow:auto"]').forEach(x=>{let N=x;if(N!==b&&N.classList.contains("overlay-scrollbar-container"))return;let O=N.parentElement;for(;O&&O!==b;){if(O.classList.contains("overlay-scrollbar-container")&&O!==b)return;O=O.parentElement}i.push(N)})),i.forEach(x=>{x.addEventListener("scroll",t,{passive:!0}),x.addEventListener("wheel",o,{passive:!0})}),()=>{i.forEach(x=>{x.removeEventListener("scroll",t),x.removeEventListener("wheel",o)}),ye.current&&clearTimeout(ye.current),U.current&&clearTimeout(U.current)}},[v,e,D,F,n,h,_e]),se(()=>{let t=i=>{let s=v();if(!s)return;let{key:b}=i,{scrollTop:x,scrollHeight:N,clientHeight:O}=s,ae=N-O,Pe=50,J=null;switch(b){case"ArrowUp":i.preventDefault(),J=Math.max(0,x-Pe);break;case"ArrowDown":i.preventDefault(),J=Math.min(ae,x+Pe);break;case"PageUp":i.preventDefault(),J=Math.max(0,x-O);break;case"PageDown":i.preventDefault(),J=Math.min(ae,x+O);break;case"Home":i.preventDefault(),J=0;break;case"End":i.preventDefault(),J=ae;break;default:return}if(J!==null){let Qe=J/ae,Ge=W?M*2+y.margin*4:y.margin*2,et=(O-Ge-le)*Qe;We(et),s.scrollTop=J,F(),S(!0),n(h.delay)}},o=a.current;if(o)return o.addEventListener("keydown",t),()=>{o.removeEventListener("keydown",t)}},[v,W,M,y.margin,le,F,n,h.delay]),se(()=>{if(be)return document.addEventListener("mousemove",G),document.addEventListener("mouseup",Me),()=>{document.removeEventListener("mousemove",G),document.removeEventListener("mouseup",Me)}},[be,G,Me]),se(()=>{if(I)return document.addEventListener("mousemove",g),document.addEventListener("mouseup",u),()=>{document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",u)}},[I,g,u]),se(()=>{e();let t=setTimeout(()=>{e()},100);return()=>clearTimeout(t)},[e]),St(()=>{je(!0),e(),!h.enabled&&he()&&S(!0)},[he,e,h.enabled]),se(()=>{let t=new ResizeObserver(()=>{e()}),o=[];return a.current&&o.push(a.current),_.current&&o.push(_.current),P.current&&document.contains(P.current)&&o.push(P.current),o.forEach(i=>{t.observe(i)}),()=>t.disconnect()},[e]),se(()=>{if(!a.current)return;let t=new MutationObserver(()=>{P.current=null,e()});return t.observe(a.current,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style"]}),()=>t.disconnect()},[e]);let re=Math.max(ke,M);return se(()=>{let t="overlay-scrollbar-webkit-hide",o=document.getElementById(t);o&&o.remove();let i=document.createElement("style");return i.id=t,i.textContent=`
4
+ `;function ct({size:l=54}){return wt(vt,{children:[st("style",{children:yt}),st("span",{className:"vdt-css-spinner",role:"progressbar","aria-label":"loading",style:{display:"inline-block",width:l,height:l}})]})}import{useRef as Q,useEffect as se,useState as q,useCallback as $,useMemo as Be,forwardRef as Mt,useImperativeHandle as Ct,useLayoutEffect as St}from"react";import{jsx as De,jsxs as dt}from"react/jsx-runtime";var Tt=["editor","textarea","input","select","textfield","form-control","contenteditable","MuiInputBase-input","MuiSelect-select","MuiOutlinedInput-input","MuiFilledInput-input","MuiInput-input","MuiFormControl-root","MuiTextField-root","MuiSelect-root","MuiOutlinedInput-root","MuiFilledInput-root","MuiInput-root","MuiAutocomplete-input","MuiDatePicker-input","MuiSlider-thumb","MuiSlider-rail","MuiSlider-track","MuiSlider-mark","MuiSlider-markLabel","MuiSlider-root","MuiSlider-colorPrimary","MuiSlider-sizeMedium","MuiIconButton-root","MuiButton-root","MuiButtonBase-root","MuiTouchRipple-root","MuiCheckbox-root","MuiRadio-root","MuiSwitch-root","PrivateSwitchBase-root","ant-input","ant-input-affix-wrapper","ant-input-group-addon","ant-input-number","ant-input-number-handler","ant-select","ant-select-selector","ant-select-selection-search","ant-select-dropdown","ant-cascader","ant-cascader-input","ant-picker","ant-picker-input","ant-time-picker","ant-calendar-picker","ant-slider","ant-slider-track","ant-slider-handle","ant-switch","ant-checkbox","ant-checkbox-wrapper","ant-radio","ant-radio-wrapper","ant-rate","ant-upload","ant-upload-drag","ant-form-item","ant-form-item-control","ant-btn","ant-dropdown","ant-dropdown-trigger","ant-menu","ant-menu-item","ant-tooltip","ant-popover","ant-modal","ant-drawer","ant-tree-select","ant-auto-complete","ant-mentions","ant-transfer","ui-input","ui-textarea","ui-select","ui-select-trigger","ui-select-content","ui-select-item","ui-button","ui-checkbox","ui-radio-group","ui-switch","ui-slider","ui-range-slider","ui-calendar","ui-date-picker","ui-combobox","ui-command","ui-command-input","ui-popover","ui-dialog","ui-sheet","ui-dropdown-menu","ui-context-menu","ui-menubar","ui-navigation-menu","ui-form","ui-form-control","ui-form-item","ui-form-field","ui-label","radix-ui","radix-select","radix-dropdown","radix-dialog","radix-popover","radix-accordion","radix-tabs","radix-slider","radix-switch","radix-checkbox","radix-radio","ql-editor","ql-container","ql-toolbar","ql-picker","ql-picker-label","ql-picker-options","ql-formats","ql-snow","ql-bubble","quill","quilleditor","monaco-editor","monaco-editor-background","view-lines","decorationsOverviewRuler","monaco-scrollable-element","CodeMirror","CodeMirror-code","CodeMirror-lines","CodeMirror-scroll","CodeMirror-sizer","cm-editor","cm-focused","cm-content","tox-editor-container","tox-editor-header","tox-edit-area","tox-tinymce","mce-content-body","ck-editor","ck-content","ck-toolbar","ck-editor__editable","ck-widget","slate-editor","slate-content","DraftEditor-root","DraftEditor-editorContainer","public-DraftEditor-content","ehfuse-editor","ehfuse-editor-wrapper","ehfuse-editor-content","ehfuse-toolbar","ehfuse-toolbar-group","ehfuse-cursor","text-editor","rich-text-editor","wysiwyg","ace_editor","ace_content"],ut=(l,p)=>{let f=l.tagName.toLowerCase(),T=["text","password","email","number","search","tel","url","checkbox","radio"];if(f==="input"){let L=l.type;return T.includes(L)}if(["textarea","select","button"].includes(f)||["svg","path","circle","rect","line","polygon","polyline"].includes(f)||l.getAttribute("contenteditable")==="true")return!0;if(p?.excludeSelectors){for(let L of p.excludeSelectors)if(l.matches(L))return!0}return kt(l,p)},kt=(l,p)=>{let f=[...Tt,...p?.excludeClasses||[]],T=l,L=0,D=5;for(;T&&L<=D;){if(f.some(C=>T.classList.contains(C)))return!0;if(T.classList.contains("MuiDialogContent-root"))break;T=T.parentElement,L++}return!1},Lt={},Dt={},Rt={},Et={},It={},Ht=Mt(({className:l="",style:p={},containerStyle:f={},contentStyle:T={},children:L,onScroll:D,thumb:C=Lt,track:k=Dt,arrows:R=Rt,dragScroll:z=Et,autoHide:X=It,showScrollbar:V=!0,detectInnerScroll:K=!1},E)=>{let j=Q({});se(()=>{j.current={children:L,onScroll:D,showScrollbar:V,thumb:C,track:k,arrows:R,dragScroll:z,autoHide:X}});let ce=Q(null),a=Q(null),_=Q(null),ue=Q(null),de=Q(null),P=Q(null),[Y,S]=q(!1),[I,ne]=q(!1),[oe,Se]=q(!1),[pe,ie]=q({y:0,scrollTop:0}),[le,Ue]=q(0),[Ze,We]=q(0),[Ie,qe]=q(!1),[be,He]=q(!1),[Ne,w]=q({x:0,y:0,scrollTop:0,scrollLeft:0}),[m,ze]=q(null),[xe,fe]=q(null),[it,je]=q(!1),ye=Q(null),[_e,Oe]=q(!1),ve=Q(null),Te=Q(null),U=Q(null),H=Be(()=>{let t=C.color??"#606060";return{width:C.width??8,minHeight:C.minHeight??50,radius:C.radius??(C.width??8)/2,color:t,opacity:C.opacity??.6,hoverColor:C.hoverColor??t,hoverOpacity:C.hoverOpacity??1}},[C]),y=Be(()=>({width:k.width??16,color:k.color??"rgba(128, 128, 128, 0.1)",visible:k.visible??!0,alignment:k.alignment??"center",radius:k.radius??H.radius??4,margin:k.margin??4}),[k,H.radius]),A=Be(()=>{let t=R.color??"#808080";return{visible:R.visible??!1,step:R.step??50,color:t,opacity:R.opacity??.6,hoverColor:R.hoverColor??t,hoverOpacity:R.hoverOpacity??1}},[R]),we=Be(()=>({enabled:z.enabled??!0,excludeClasses:z.excludeClasses??[],excludeSelectors:z.excludeSelectors??[]}),[z]),h=Be(()=>({enabled:X.enabled??!0,delay:X.delay??1500,delayOnWheel:X.delayOnWheel??700}),[X]),M=H.width,ke=y.width,$e=H.minHeight,W=A.visible,Le=A.step,te=$(()=>{if(!a.current)return;let t=document.activeElement;t&&a.current.contains(t)&&t!==a.current||a.current.focus()},[]);Ct(E,()=>({getScrollContainer:()=>a.current,scrollTo:t=>{a.current&&a.current.scrollTo(t)},get scrollTop(){return a.current?.scrollTop||0},get scrollHeight(){return a.current?.scrollHeight||0},get clientHeight(){return a.current?.clientHeight||0}}),[]);let v=$(()=>{if(P.current){let o=P.current;if(document.contains(o)&&o.scrollHeight>o.clientHeight+2)return o;P.current=null}if(!a.current)return null;if(_.current&&_.current.scrollHeight>a.current.clientHeight+2)return P.current=a.current,a.current;if(!K)return null;let t=a.current.querySelectorAll('[data-virtuoso-scroller], [style*="overflow"], .virtuoso-scroller, [style*="overflow: auto"], [style*="overflow:auto"]');for(let o of t){let i=o;if(i!==a.current&&i.classList.contains("overlay-scrollbar-container"))continue;let s=i.parentElement,b=!1;for(;s&&s!==a.current;){if(s.classList.contains("overlay-scrollbar-container")&&s!==a.current){b=!0;break}s=s.parentElement}if(!b&&i.scrollHeight>i.clientHeight+2)return P.current=i,i}return null},[]),he=$(()=>v()!==null,[v]),F=$(()=>{ve.current&&(clearTimeout(ve.current),ve.current=null)},[]),Je=$(()=>{Te.current&&(clearTimeout(Te.current),Te.current=null)},[]),Ye=$(()=>{U.current&&(clearTimeout(U.current),U.current=null)},[]),n=$(t=>{h.enabled&&(F(),ve.current=setTimeout(()=>{S(!1),ve.current=null},t))},[F,h.enabled]),e=$(()=>{let t=v();if(!t){S(!1),qe(!1),F();return}if(qe(!0),!ue.current)return;h.enabled||(S(!0),F());let o=t.clientHeight,i=t.scrollHeight,s=t.scrollTop,b=0;if(ce.current){let Ge=window.getComputedStyle(ce.current),et=parseFloat(Ge.paddingTop)||0,ht=parseFloat(Ge.paddingBottom)||0;b=et+ht}let x=W?M*2+y.margin*4:y.margin*2,N=o-x+b,O=o/i,ae=Math.max(N*O,$e),Pe=i-o,J=N-ae,Qe=Pe>0?s/Pe*J:0;Ue(ae),We(Qe)},[v,F,W,M,$e,h.enabled]),d=$(t=>{t.preventDefault(),t.stopPropagation();let o=v();o&&(ne(!0),ie({y:t.clientY,scrollTop:o.scrollTop}),F(),S(!0),te())},[v,F,te]),g=$(t=>{if(!I)return;let o=v();if(!o)return;let i=o.clientHeight,s=o.scrollHeight-i,b=t.clientY-pe.y,x=i-le,N=b/x*s,O=Math.max(0,Math.min(s,pe.scrollTop+N));o.scrollTop=O,e()},[I,pe,le,e,v]),u=$(()=>{ne(!1),he()&&n(h.delay)},[he,n,h.delay]),r=$(t=>{if(!ue.current)return;let o=ue.current.getBoundingClientRect(),i=t.clientY-o.top,s=v();if(!s)return;let b=s.clientHeight,x=s.scrollHeight,N=i/b*(x-b);s.scrollTop=Math.max(0,Math.min(x-b,N)),e(),S(!0),n(h.delay),te()},[e,n,h.delay,v,te]),B=$(t=>{if(t.preventDefault(),t.stopPropagation(),!a.current)return;let o=Math.max(0,a.current.scrollTop-Le);a.current.scrollTop=o,e(),S(!0),n(h.delay),te()},[e,n,Le,h.delay,te]),Z=$(t=>{if(t.preventDefault(),t.stopPropagation(),!a.current||!_.current)return;let o=a.current,i=_.current.scrollHeight-o.clientHeight,s=Math.min(i,o.scrollTop+Le);o.scrollTop=s,e(),S(!0),n(h.delay),te()},[e,n,Le,h.delay,te]),Fe=$(t=>{if(!we.enabled)return;let o=t.target;if(ut(o,we)||t.button!==0)return;let i=v();i&&(i.scrollHeight<=i.clientHeight||(t.preventDefault(),He(!0),w({x:t.clientX,y:t.clientY,scrollTop:i.scrollTop,scrollLeft:i.scrollLeft||0}),F()))},[we,ut,v,F]),G=$(t=>{if(!be)return;let o=v();if(!o)return;let i=Ne.x-t.clientX,s=Ne.y-t.clientY;if(Math.abs(s)<3&&Math.abs(i)<3)return;S(!0);let b=Math.max(0,Math.min(o.scrollHeight-o.clientHeight,Ne.scrollTop+s));o.scrollTop=b,e()},[be,Ne,v,e]),Me=$(()=>{He(!1),he()&&n(h.delay)},[he,n,h.delay]);se(()=>{let t=x=>{e(),F(),S(!0);let N=_e?h.delayOnWheel:h.delay;n(N),D&&D(x)},o=()=>{Oe(!0),ye.current&&clearTimeout(ye.current),ye.current=setTimeout(()=>{Oe(!1)},300),F(),Ye(),U.current=setTimeout(()=>{S(!0),U.current=null},50)},i=[],s=v();s&&i.push(s);let b=a.current;return b&&!s&&(i.push(b),b.querySelectorAll('[data-virtuoso-scroller], [style*="overflow"], .virtuoso-scroller, [style*="overflow: auto"], [style*="overflow:auto"]').forEach(x=>{let N=x;if(N!==b&&N.classList.contains("overlay-scrollbar-container"))return;let O=N.parentElement;for(;O&&O!==b;){if(O.classList.contains("overlay-scrollbar-container")&&O!==b)return;O=O.parentElement}i.push(N)})),i.forEach(x=>{x.addEventListener("scroll",t,{passive:!0}),x.addEventListener("wheel",o,{passive:!0})}),()=>{i.forEach(x=>{x.removeEventListener("scroll",t),x.removeEventListener("wheel",o)}),ye.current&&clearTimeout(ye.current),U.current&&clearTimeout(U.current)}},[v,e,D,F,n,h,_e]),se(()=>{let t=i=>{let s=v();if(!s)return;let{key:b}=i,{scrollTop:x,scrollHeight:N,clientHeight:O}=s,ae=N-O,Pe=50,J=null;switch(b){case"ArrowUp":i.preventDefault(),J=Math.max(0,x-Pe);break;case"ArrowDown":i.preventDefault(),J=Math.min(ae,x+Pe);break;case"PageUp":i.preventDefault(),J=Math.max(0,x-O);break;case"PageDown":i.preventDefault(),J=Math.min(ae,x+O);break;case"Home":i.preventDefault(),J=0;break;case"End":i.preventDefault(),J=ae;break;default:return}if(J!==null){let Qe=J/ae,Ge=W?M*2+y.margin*4:y.margin*2,et=(O-Ge-le)*Qe;We(et),s.scrollTop=J,F(),S(!0),n(h.delay)}},o=a.current;if(o)return o.addEventListener("keydown",t),()=>{o.removeEventListener("keydown",t)}},[v,W,M,y.margin,le,F,n,h.delay]),se(()=>{if(be)return document.addEventListener("mousemove",G),document.addEventListener("mouseup",Me),()=>{document.removeEventListener("mousemove",G),document.removeEventListener("mouseup",Me)}},[be,G,Me]),se(()=>{if(I)return document.addEventListener("mousemove",g),document.addEventListener("mouseup",u),()=>{document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",u)}},[I,g,u]),se(()=>{e();let t=setTimeout(()=>{e()},100);return()=>clearTimeout(t)},[e]),St(()=>{je(!0),e(),!h.enabled&&he()&&S(!0)},[he,e,h.enabled]),se(()=>{let t=new ResizeObserver(()=>{e()}),o=[];return a.current&&o.push(a.current),_.current&&o.push(_.current),P.current&&document.contains(P.current)&&o.push(P.current),o.forEach(i=>{t.observe(i)}),()=>t.disconnect()},[e]),se(()=>{if(!a.current)return;let t=new MutationObserver(()=>{P.current=null,e()});return t.observe(a.current,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style"]}),()=>t.disconnect()},[e]);let re=Math.max(ke,M);return se(()=>{let t="overlay-scrollbar-webkit-hide",o=document.getElementById(t);o&&o.remove();let i=document.createElement("style");return i.id=t,i.textContent=`
5
5
  .overlay-scrollbar-container::-webkit-scrollbar {
6
6
  display: none !important;
7
7
  width: 0 !important;