@ehfuse/overlay-scrollbar 1.7.21 → 1.7.23

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.
@@ -81,7 +81,7 @@ export interface OverlayScrollbarProps {
81
81
  }
82
82
  export interface ScrollTopFabConfig {
83
83
  threshold?: number;
84
- idleDelay?: number;
84
+ idleOpacity?: number;
85
85
  scrollingOpacity?: number;
86
86
  hideDelay?: number;
87
87
  position?: "left" | "right";
@@ -1 +1 @@
1
- {"version":3,"file":"OverlayScrollbar.d.ts","sourceRoot":"","sources":["../src/OverlayScrollbar.tsx"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"OverlayScrollbar.d.ts","sourceRoot":"","sources":["../src/OverlayScrollbar.tsx"],"names":[],"mappings":"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"}
package/dist/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import{useRef as I,useEffect as P,useState as h,useCallback as m,useMemo as Me,forwardRef as no,useImperativeHandle as lo,useLayoutEffect as io,useId as ao}from"react";var eo=["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"],We=(w,L)=>{if(w instanceof HTMLElement&&w.isContentEditable||w.closest('[role="textbox"],[role="searchbox"]'))return!0;let S=w.tagName.toLowerCase();if(S==="input"){let p=(w.type||"text").toLowerCase();return!["button","submit","reset","image","hidden"].includes(p)}if(["textarea","select","button"].includes(S)||["svg","path","circle","rect","line","polygon","polyline"].includes(S)||w.getAttribute("contenteditable")==="true")return!0;if(L?.excludeSelectors){for(let p of L.excludeSelectors)if(w.matches(p))return!0}return to(w,L)},to=(w,L)=>{let S=[...eo,...L?.excludeClasses||[]],p=w,z=0,$=5;for(;p&&z<=$;){if(S.some(D=>p.classList.contains(D)))return!0;if(p.classList.contains("MuiDialogContent-root"))break;p=p.parentElement,z++}return!1};import{useEffect as wt,useRef as ne,useState as St}from"react";var Mt=({containerRef:w,config:L})=>{let S=L.enabled??!0,p=L.threshold??80,z=L.maxDistance??p*2,$=L.onRefresh,[D,k]=St(0),[W,q]=St(!1),F=ne(0),he=ne(0),Y=ne(!1),J=ne(!1),le=ne(!1),j=ne(0),ie=ne(!1);return wt(()=>{ie.current=W},[W]),wt(()=>{let M=w.current;if(!M||!(S&&typeof $=="function"))return;let Ee=c=>{let C=c instanceof Element?c:null;for(;C&&C!==M;){if(C instanceof HTMLElement&&C.scrollHeight>C.clientHeight+1&&C.scrollTop>0)return!1;C=C.parentElement}return!0},Ae=c=>{Y.current=!1,J.current=!1,le.current=!1,!ie.current&&c.touches.length===1&&M.scrollTop===0&&Ee(c.target)&&(Y.current=!0,F.current=c.touches[0].clientY,he.current=c.touches[0].clientX)},ee=c=>{if(!Y.current||ie.current||c.touches.length!==1)return;let C=c.touches[0].clientY-F.current,Ce=c.touches[0].clientX-he.current;if(!J.current){if(C<=0||M.scrollTop>0){Y.current=!1;return}if(C>8&&C>Math.abs(Ce))J.current=!0,le.current=M.scrollTop<0;else return}!le.current&&c.cancelable&&c.preventDefault();let He=Math.min(Math.max(C,0)*.5,z);j.current=He,k(He)},G=()=>{if(!Y.current||(Y.current=!1,!J.current))return;J.current=!1,le.current=!1;let c=j.current;j.current=0,c>=p&&!ie.current?(q(!0),k(p),Promise.resolve().then(()=>$()).catch(()=>{}).finally(()=>{q(!1),k(0)})):k(0)};return M.addEventListener("touchstart",Ae,{passive:!0}),M.addEventListener("touchmove",ee,{passive:!1}),M.addEventListener("touchend",G,{passive:!0}),M.addEventListener("touchcancel",G,{passive:!0}),()=>{M.removeEventListener("touchstart",Ae),M.removeEventListener("touchmove",ee),M.removeEventListener("touchend",G),M.removeEventListener("touchcancel",G)}},[w,S,$,p,z]),{pullDistance:D,isRefreshing:W,pullProgress:Math.min(D/p,1),pullThreshold:p}};import{useEffect as oo,useState as ro}from"react";function Et(){let[w,L]=ro(()=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(pointer: coarse)").matches);return oo(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;let S=window.matchMedia("(pointer: coarse)"),p=z=>L(z.matches);return L(S.matches),typeof S.addEventListener=="function"?(S.addEventListener("change",p),()=>S.removeEventListener("change",p)):(S.addListener(p),()=>S.removeListener(p))},[]),w}import{jsx as H,jsxs as tt}from"react/jsx-runtime";var so={},co={},uo={},fo={},po={},ho={},mo=no(({className:w="",style:L={},containerStyle:S={},contentStyle:p={},children:z,onScroll:$,thumb:D=so,track:k=co,arrows:W=uo,dragScroll:q=fo,autoHide:F=po,pullToRefresh:he=ho,showScrollbar:Y=!0,showHorizontalScrollbar:J=!0,detectInnerScroll:le=!1,scrollTopFab:j=!1},ie)=>{let M=Et(),ae=Y,Ee=M?!1:J,ee=`os-${ao().replace(/[^a-zA-Z0-9_-]/g,"")}`,G=j!==!1&&j!=null,c=typeof j=="object"?j:{},C=c.threshold??600,Ce=c.idleDelay??80,He=c.scrollingOpacity??.45,ze=c.hideDelay??1500,Ht=c.position??"right",ot=c.offset??16,Lt=c.background??"#1976d2",Dt=c.color??"#ffffff",Le=c.size??48,[Fe,rt]=h(!1),[kt,nt]=h(!1),se=I(null),te=I(null),Rt=I({});P(()=>{Rt.current={children:z,onScroll:$,showScrollbar:ae,showHorizontalScrollbar:Ee,thumb:D,track:k,arrows:W,dragScroll:q,autoHide:F}});let Ne=I(null),i=I(null),me=I(null),be=I(null),It=I(null),B=I(null),{pullDistance:Be,isRefreshing:De,pullProgress:_e}=Mt({containerRef:i,config:he}),lt=he.indicatorColor??"#1976d2",Ot=Be>0||De,[ke,T]=h(!1),[_,it]=h(!1),[at,st]=h(!1),[Ue,Pt]=h({y:0,scrollTop:0}),[ge,ct]=h(0),[$t,Xe]=h(0),[ce,ut]=h(!1),[dt,ft]=h(!1),[U,pt]=h(!1),[qe,Wt]=h({x:0,scrollLeft:0}),[Ye,ht]=h(0),[je,mt]=h(0),[At,bt]=h(!1),ue=I(!1),[K,gt]=h(!1),[ve,zt]=h({x:0,y:0,scrollTop:0,scrollLeft:0}),[bo,go]=h(null),[Re,Ie]=h(null),[vo,Ft]=h(!1),[Nt,Bt]=h(0),ye=I(null),[vt,yt]=h(!1),Te=I(null),oe=I(null),re=I(null),x=Me(()=>{let e=D.color??"#606060";return{width:D.width??8,minHeight:D.minHeight??50,radius:D.radius??(D.width??8)/2,color:e,opacity:D.opacity??.6,hoverColor:D.hoverColor??e,hoverOpacity:D.hoverOpacity??1}},[D]),r=Me(()=>({width:k.width??16,color:k.color??"rgba(128, 128, 128, 0.1)",visible:k.visible??!0,alignment:k.alignment??"outside",radius:k.radius??x.radius??4,margin:k.margin??4,overflowX:k.overflowX??!0,overflowY:k.overflowY??!0}),[k,x.radius]),N=Me(()=>{let e=W.color??"#808080";return{visible:W.visible??!1,step:W.step??50,color:e,opacity:W.opacity??.6,hoverColor:W.hoverColor??e,hoverOpacity:W.hoverOpacity??1}},[W]),xe=Me(()=>({enabled:M?!1:q.enabled??!0,excludeClasses:q.excludeClasses??[],excludeSelectors:q.excludeSelectors??[]}),[q,M]),a=Me(()=>({enabled:F.enabled??!0,delay:F.delay??1500,delayOnWheel:F.delayOnWheel??700,initialDelay:F.initialDelay??200}),[F]),[de,_t]=h(()=>(F.initialDelay??200)>0),g=x.width,Ut=r.width,Ge=x.minHeight,X=N.visible,Oe=N.step,A=m(()=>{if(!i.current)return;let e=document.activeElement;e&&i.current.contains(e)&&e!==i.current||i.current.focus()},[]);lo(ie,()=>({getScrollContainer:()=>i.current,scrollTo:e=>{i.current&&i.current.scrollTo(e)},get scrollTop(){return i.current?.scrollTop||0},get scrollHeight(){return i.current?.scrollHeight||0},get clientHeight(){return i.current?.clientHeight||0}}),[]);let f=m(()=>{if(B.current){let t=B.current;if(document.contains(t)&&(t.scrollHeight>t.clientHeight+2||t.scrollWidth>t.clientWidth+2))return t;B.current=null}if(!i.current)return null;if(i.current.scrollHeight>i.current.clientHeight+2||i.current.scrollWidth>i.current.clientWidth+2)return B.current=i.current,i.current;if(!le)return null;let e=i.current.querySelectorAll('[data-virtuoso-scroller], [style*="overflow"], .virtuoso-scroller, [style*="overflow: auto"], [style*="overflow:auto"]');for(let t of e){let o=t;if(o!==i.current&&o.classList.contains("overlay-scrollbar-container"))continue;let n=o.parentElement,l=!1;for(;n&&n!==i.current;){if(n.classList.contains("overlay-scrollbar-container")&&n!==i.current){l=!0;break}n=n.parentElement}if(!l&&(o.scrollHeight>o.clientHeight+2||o.scrollWidth>o.clientWidth+2))return B.current=o,o}return null},[]),V=m(()=>f()!==null,[f]),v=m(()=>{Te.current&&(clearTimeout(Te.current),Te.current=null)},[]),Pe=m(()=>{oe.current&&(clearTimeout(oe.current),oe.current=null)},[]),Tt=m(()=>{re.current&&(clearTimeout(re.current),re.current=null)},[]),Xt=m(()=>{Pe(),!(_||U||K||ue.current)&&(v(),T(!1))},[v,Pe,_,U,K]),b=m(e=>{a.enabled&&(v(),Te.current=setTimeout(()=>{T(!1),Te.current=null},e))},[v,a.enabled]),u=m(()=>{let e=f()??i.current;if(!e){T(!1),ut(!1),bt(!1),v();return}!a.enabled&&!de&&(T(!0),v());let t=e.clientHeight,o=e.scrollHeight,n=e.scrollTop,l=e.clientWidth,s=e.scrollWidth,y=e.scrollLeft,E=o-t>0,d=s-l>0,fe=E||d;ut(E),bt(d),fe||(T(!1),v());let we=0,O=0;if(Ne.current){let Z=window.getComputedStyle(Ne.current),Q=parseFloat(Z.paddingTop)||0;O=parseFloat(Z.paddingBottom)||0,we=Q+O,Bt(O)}if(E){let Z=X?g*2+r.margin*4:r.margin*2,Q=t-Z+we,$e=t/o,pe=Math.max(Q*$e,Ge),xt=o-t,Qt=Q-pe,Jt=xt>0?n/xt*Qt:0;ct(pe),Xe(Jt)}else ct(0),Xe(0);let Se=s-l;if(Se>0){let Z=l/s,Q=Math.max(l*Z,50),$e=l-Q,pe=Se>0?y/Se*$e:0;ht(Q),mt(pe)}else ht(0),mt(0)},[f,v,X,g,Ge,a.enabled,de]),qt=m(e=>{e.preventDefault(),e.stopPropagation();let t=f();t&&(it(!0),Pt({y:e.clientY,scrollTop:t.scrollTop}),v(),T(!0),A())},[f,v,A]),Ke=m(e=>{if(!_)return;let t=f();if(!t)return;let o=t.clientHeight,l=t.scrollHeight-o,s=e.clientY-Ue.y,y=o-ge,E=s/y*l,d=Math.max(0,Math.min(l,Ue.scrollTop+E));t.scrollTop=d,u()},[_,Ue,ge,u,f]),Ve=m(()=>{it(!1),V()&&b(a.delay)},[V,b,a.delay]),Yt=m(e=>{if(!be.current)return;let o=be.current.getBoundingClientRect(),n=e.clientY-o.top,l=f();if(!l)return;let s=l.clientHeight,y=l.scrollHeight,d=n/s*(y-s);l.scrollTop=Math.max(0,Math.min(y-s,d)),u(),T(!0),b(a.delay),A()},[u,b,a.delay,f,A]),jt=m(e=>{if(e.preventDefault(),e.stopPropagation(),!i.current)return;let t=Math.max(0,i.current.scrollTop-Oe);i.current.scrollTop=t,u(),T(!0),b(a.delay),A()},[u,b,Oe,a.delay,A]),Gt=m(e=>{if(e.preventDefault(),e.stopPropagation(),!i.current||!me.current)return;let t=i.current,n=me.current.scrollHeight-t.clientHeight,l=Math.min(n,t.scrollTop+Oe);t.scrollTop=l,u(),T(!0),b(a.delay),A()},[u,b,Oe,a.delay,A]),Kt=m(e=>{e.preventDefault(),e.stopPropagation();let t=f();t&&(pt(!0),Wt({x:e.clientX,scrollLeft:t.scrollLeft}),v(),T(!0),A())},[f,v,A]),Ze=m(e=>{if(!U)return;let t=f();if(!t)return;let o=t.clientWidth,l=t.scrollWidth-o,s=e.clientX-qe.x,y=o-Ye,E=s/y*l,d=Math.max(0,Math.min(l,qe.scrollLeft+E));t.scrollLeft=d,u()},[U,qe,Ye,u,f]),Qe=m(()=>{pt(!1),V()&&b(a.delay)},[V,b,a.delay]),Vt=m(e=>{if(!be.current)return;let o=be.current.getBoundingClientRect(),n=e.clientX-o.left,l=f();if(!l)return;let s=l.clientWidth,y=l.scrollWidth,d=n/s*(y-s);l.scrollLeft=Math.max(0,Math.min(y-s,d)),u(),T(!0),b(a.delay),A()},[u,b,a.delay,f,A]),Zt=m(e=>{if(!xe.enabled||e.defaultPrevented)return;let t=e.target,o=i.current;if(!o||!o.contains(t)||We(t,xe)||e.button!==0)return;let n=f();n&&(n.scrollHeight<=n.clientHeight&&n.scrollWidth<=n.clientWidth||(e.preventDefault(),ue.current=!0,zt({x:e.clientX,y:e.clientY,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft||0}),v()))},[xe,We,f,v]),Je=m(e=>{if(!ue.current&&!K)return;let t=f();if(!t)return;let o=ve.x-e.clientX,n=ve.y-e.clientY;if(Math.abs(n)<5&&Math.abs(o)<5)return;ue.current&&(ue.current=!1,gt(!0)),T(!0);let l=Math.max(0,Math.min(t.scrollHeight-t.clientHeight,ve.scrollTop+n)),s=Math.max(0,Math.min(t.scrollWidth-t.clientWidth,ve.scrollLeft+o));t.scrollTop=l,t.scrollLeft=s,u()},[K,ve,f,u]),et=m(()=>{let e=K;ue.current=!1,gt(!1),e&&V()&&b(a.delay)},[K,V,b,a.delay]);P(()=>{let e=s=>{if(u(),G){let d=(s.target?.scrollTop??0)>C;rt(d),nt(!0),se.current&&clearTimeout(se.current),te.current&&(clearTimeout(te.current),te.current=null),se.current=setTimeout(()=>{se.current=null,nt(!1),d&&ze>0&&(te.current=setTimeout(()=>{te.current=null,rt(!1)},ze))},Ce)}if(de){$&&$(s);return}v(),T(!0),Tt();let y=vt?a.delayOnWheel:a.delay;b(y),$&&$(s)},t=()=>{yt(!0),ye.current&&clearTimeout(ye.current),ye.current=setTimeout(()=>{yt(!1)},300),Tt(),re.current=setTimeout(()=>{T(!0),re.current=null,b(a.delayOnWheel)},50)},o=[],n=f();n&&o.push(n);let l=i.current;return l&&!n&&(o.push(l),l.querySelectorAll('[data-virtuoso-scroller], [style*="overflow"], .virtuoso-scroller, [style*="overflow: auto"], [style*="overflow:auto"]').forEach(y=>{let E=y;if(E!==l&&E.classList.contains("overlay-scrollbar-container"))return;let d=E.parentElement;for(;d&&d!==l;){if(d.classList.contains("overlay-scrollbar-container")&&d!==l)return;d=d.parentElement}o.push(E)})),o.forEach(s=>{s.addEventListener("scroll",e,{passive:!0}),s.addEventListener("wheel",t,{passive:!0})}),()=>{o.forEach(s=>{s.removeEventListener("scroll",e),s.removeEventListener("wheel",t)}),ye.current&&clearTimeout(ye.current),re.current&&clearTimeout(re.current)}},[f,u,$,v,b,a,vt,de,G,C,Ce,ze]),P(()=>()=>{se.current&&clearTimeout(se.current),te.current&&clearTimeout(te.current)},[]),P(()=>{let e=o=>{let n=o.target;if(o.defaultPrevented||n instanceof Element&&We(n,xe))return;let l=f();if(!l)return;let{key:s}=o,{scrollTop:y,scrollHeight:E,clientHeight:d}=l,fe=E-d,we=50,O=null;switch(s){case"ArrowUp":o.preventDefault(),O=Math.max(0,y-we);break;case"ArrowDown":o.preventDefault(),O=Math.min(fe,y+we);break;case"PageUp":o.preventDefault(),O=Math.max(0,y-d);break;case"PageDown":o.preventDefault(),O=Math.min(fe,y+d);break;case"Home":o.preventDefault(),O=0;break;case"End":o.preventDefault(),O=fe;break;default:return}if(O!==null){let Se=O/fe,Z=X?g*2+r.margin*4:r.margin*2,pe=(d-Z-ge)*Se;Xe(pe),l.scrollTop=O,v(),T(!0),b(a.delay)}},t=i.current;if(t)return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}},[f,X,g,r.margin,ge,v,b,a.delay,xe]),P(()=>(document.addEventListener("mousemove",Je),document.addEventListener("mouseup",et),()=>{document.removeEventListener("mousemove",Je),document.removeEventListener("mouseup",et)}),[K,Je,et]),P(()=>{if(_)return document.addEventListener("mousemove",Ke),document.addEventListener("mouseup",Ve),()=>{document.removeEventListener("mousemove",Ke),document.removeEventListener("mouseup",Ve)}},[_,Ke,Ve]),P(()=>{if(U)return document.addEventListener("mousemove",Ze),document.addEventListener("mouseup",Qe),()=>{document.removeEventListener("mousemove",Ze),document.removeEventListener("mouseup",Qe)}},[U,Ze,Qe]),P(()=>{u();let e=setTimeout(()=>{u()},100);return()=>clearTimeout(e)},[u]),io(()=>{Ft(!0),u(),!a.enabled&&!de&&V()&&T(!0)},[V,u,a.enabled,de]),P(()=>{if(a.initialDelay>0){let e=setTimeout(()=>{_t(!1)},a.initialDelay);return()=>clearTimeout(e)}},[a.initialDelay]),P(()=>{let e=new ResizeObserver(()=>{u()}),t=[];return i.current&&t.push(i.current),me.current&&t.push(me.current),B.current&&document.contains(B.current)&&t.push(B.current),t.forEach(o=>{e.observe(o)}),()=>e.disconnect()},[u]),P(()=>{if(!i.current)return;let e=new MutationObserver(()=>{B.current=null,u()});return e.observe(i.current,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style"]}),()=>e.disconnect()},[u]);let R=Math.max(Ut,g);return P(()=>{let e="overlay-scrollbar-shared";if(document.getElementById(e))return;let t=document.createElement("style");t.id=e,t.textContent=`
1
+ import{useRef as O,useEffect as W,useState as g,useCallback as v,useMemo as he,forwardRef as co,useImperativeHandle as uo,useLayoutEffect as fo,useId as po}from"react";var oo=["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"],Oe=(r,s)=>{if(r instanceof HTMLElement&&r.isContentEditable||r.closest('[role="textbox"],[role="searchbox"]'))return!0;let f=r.tagName.toLowerCase();if(f==="input"){let c=(r.type||"text").toLowerCase();return!["button","submit","reset","image","hidden"].includes(c)}if(["textarea","select","button"].includes(f)||["svg","path","circle","rect","line","polygon","polyline"].includes(f)||r.getAttribute("contenteditable")==="true")return!0;if(s?.excludeSelectors){for(let c of s.excludeSelectors)if(r.matches(c))return!0}return ro(r,s)},ro=(r,s)=>{let f=[...oo,...s?.excludeClasses||[]],c=r,M=0,S=5;for(;c&&M<=S;){if(f.some(k=>c.classList.contains(k)))return!0;if(c.classList.contains("MuiDialogContent-root"))break;c=c.parentElement,M++}return!1};var no=r=>{if(r==null)return null;if(typeof r=="number")return Number.isFinite(r)?r:null;let s=r.trim();if(s==="")return null;let f=/^(-?\d*\.?\d+)(px)?$/.exec(s);if(!f)return null;let c=Number.parseFloat(f[1]);return Number.isFinite(c)?c:null},lo=r=>{if(r==null)return;if(typeof r=="number")return r;let s=r.trim().split(/\s+/);if(!(s.length===0||s[0]===""))return s.length===1||s.length===2?s[0]:s[2]},io=r=>{let s=typeof r=="number"?[`${r}px`]:r.trim().split(/\s+/),[f,c=f,M=f,S=c]=s;return`${f} ${c} 0 ${S}`},tt=r=>{if(!r)return{style:r,spacerHeight:0};let s=r.paddingBottom!==void 0,f=r.padding!==void 0;if(!s&&!f)return{style:r,spacerHeight:0};let c=s?r.paddingBottom:lo(r.padding),M=no(c);if(M===null||M<=0)return{style:r,spacerHeight:0};let S={...r};return f&&r.padding!==void 0&&(S.padding=io(r.padding)),s&&(S.paddingBottom=0),{style:S,spacerHeight:M}};import{useEffect as Tt,useRef as ne,useState as St}from"react";var Ct=({containerRef:r,config:s})=>{let f=s.enabled??!0,c=s.threshold??80,M=s.maxDistance??c*2,S=s.onRefresh,[k,P]=St(0),[z,q]=St(!1),B=ne(0),me=ne(0),Y=ne(!1),J=ne(!1),le=ne(!1),j=ne(0),ie=ne(!1);return Tt(()=>{ie.current=z},[z]),Tt(()=>{let H=r.current;if(!H||!(f&&typeof S=="function"))return;let Me=p=>{let D=p instanceof Element?p:null;for(;D&&D!==H;){if(D instanceof HTMLElement&&D.scrollHeight>D.clientHeight+1&&D.scrollTop>0)return!1;D=D.parentElement}return!0},ze=p=>{Y.current=!1,J.current=!1,le.current=!1,!ie.current&&p.touches.length===1&&H.scrollTop===0&&Me(p.target)&&(Y.current=!0,B.current=p.touches[0].clientY,me.current=p.touches[0].clientX)},ee=p=>{if(!Y.current||ie.current||p.touches.length!==1)return;let D=p.touches[0].clientY-B.current,Ae=p.touches[0].clientX-me.current;if(!J.current){if(D<=0||H.scrollTop>0){Y.current=!1;return}if(D>8&&D>Math.abs(Ae))J.current=!0,le.current=H.scrollTop<0;else return}!le.current&&p.cancelable&&p.preventDefault();let se=Math.min(Math.max(D,0)*.5,M);j.current=se,P(se)},G=()=>{if(!Y.current||(Y.current=!1,!J.current))return;J.current=!1,le.current=!1;let p=j.current;j.current=0,p>=c&&!ie.current?(q(!0),P(c),Promise.resolve().then(()=>S()).catch(()=>{}).finally(()=>{q(!1),P(0)})):P(0)};return H.addEventListener("touchstart",ze,{passive:!0}),H.addEventListener("touchmove",ee,{passive:!1}),H.addEventListener("touchend",G,{passive:!0}),H.addEventListener("touchcancel",G,{passive:!0}),()=>{H.removeEventListener("touchstart",ze),H.removeEventListener("touchmove",ee),H.removeEventListener("touchend",G),H.removeEventListener("touchcancel",G)}},[r,f,S,c,M]),{pullDistance:k,isRefreshing:z,pullProgress:Math.min(k/c,1),pullThreshold:c}};import{useEffect as ao,useState as so}from"react";function Et(){let[r,s]=so(()=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(pointer: coarse)").matches);return ao(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;let f=window.matchMedia("(pointer: coarse)"),c=M=>s(M.matches);return s(f.matches),typeof f.addEventListener=="function"?(f.addEventListener("change",c),()=>f.removeEventListener("change",c)):(f.addListener(c),()=>f.removeListener(c))},[]),r}import{jsx as R,jsxs as We}from"react/jsx-runtime";var ho={},mo={},bo={},go={},vo={},yo={},xo=co(({className:r="",style:s={},containerStyle:f={},contentStyle:c={},children:M,onScroll:S,thumb:k=ho,track:P=mo,arrows:z=bo,dragScroll:q=go,autoHide:B=vo,pullToRefresh:me=yo,showScrollbar:Y=!0,showHorizontalScrollbar:J=!0,detectInnerScroll:le=!1,scrollTopFab:j=!1},ie)=>{let H=Et(),ae=Y,Me=H?!1:J,ee=`os-${po().replace(/[^a-zA-Z0-9_-]/g,"")}`,G=j!==!1&&j!=null,p=typeof j=="object"?j:{},D=p.threshold??600,Ae=p.idleOpacity??p.scrollingOpacity??.45,se=p.hideDelay??1500,Ht=p.position??"right",ot=p.offset??16,Lt=p.background??"#1976d2",Dt=p.color??"#ffffff",He=p.size??48,[Be,rt]=g(!1),[Rt,be]=g(!1),te=O(null),kt=O({});W(()=>{kt.current={children:M,onScroll:S,showScrollbar:ae,showHorizontalScrollbar:Me,thumb:k,track:P,arrows:z,dragScroll:q,autoHide:B}});let Fe=O(null),a=O(null),ge=O(null),ve=O(null),Pt=O(null),N=O(null),{pullDistance:Ne,isRefreshing:Le,pullProgress:_e}=Ct({containerRef:a,config:me}),nt=me.indicatorColor??"#1976d2",It=Ne>0||Le,[De,C]=g(!1),[_,lt]=g(!1),[it,at]=g(!1),[Ue,$t]=g({y:0,scrollTop:0}),[ye,st]=g(0),[Ot,Xe]=g(0),[ce,ct]=g(!1),[ut,dt]=g(!1),[U,ft]=g(!1),[qe,Wt]=g({x:0,scrollLeft:0}),[Ye,pt]=g(0),[je,ht]=g(0),[zt,mt]=g(!1),ue=O(!1),[K,bt]=g(!1),[xe,At]=g({x:0,y:0,scrollTop:0,scrollLeft:0}),[wo,To]=g(null),[Re,ke]=g(null),[So,Bt]=g(!1),[Ft,Nt]=g(0),we=O(null),[gt,vt]=g(!1),Te=O(null),oe=O(null),re=O(null),E=he(()=>{let e=k.color??"#606060";return{width:k.width??8,minHeight:k.minHeight??50,radius:k.radius??(k.width??8)/2,color:e,opacity:k.opacity??.6,hoverColor:k.hoverColor??e,hoverOpacity:k.hoverOpacity??1}},[k]),n=he(()=>({width:P.width??16,color:P.color??"rgba(128, 128, 128, 0.1)",visible:P.visible??!0,alignment:P.alignment??"outside",radius:P.radius??E.radius??4,margin:P.margin??4,overflowX:P.overflowX??!0,overflowY:P.overflowY??!0}),[P,E.radius]),F=he(()=>{let e=z.color??"#808080";return{visible:z.visible??!1,step:z.step??50,color:e,opacity:z.opacity??.6,hoverColor:z.hoverColor??e,hoverOpacity:z.hoverOpacity??1}},[z]),Se=he(()=>({enabled:H?!1:q.enabled??!0,excludeClasses:q.excludeClasses??[],excludeSelectors:q.excludeSelectors??[]}),[q,H]),u=he(()=>({enabled:B.enabled??!0,delay:B.delay??1500,delayOnWheel:B.delayOnWheel??700,initialDelay:B.initialDelay??200}),[B]),[de,_t]=g(()=>(B.initialDelay??200)>0),x=E.width,Ut=n.width,Ge=E.minHeight,X=F.visible,Pe=F.step,A=v(()=>{if(!a.current)return;let e=document.activeElement;e&&a.current.contains(e)&&e!==a.current||a.current.focus()},[]);uo(ie,()=>({getScrollContainer:()=>a.current,scrollTo:e=>{a.current&&a.current.scrollTo(e)},get scrollTop(){return a.current?.scrollTop||0},get scrollHeight(){return a.current?.scrollHeight||0},get clientHeight(){return a.current?.clientHeight||0}}),[]);let b=v(()=>{if(N.current){let t=N.current;if(document.contains(t)&&(t.scrollHeight>t.clientHeight+2||t.scrollWidth>t.clientWidth+2))return t;N.current=null}if(!a.current)return null;if(a.current.scrollHeight>a.current.clientHeight+2||a.current.scrollWidth>a.current.clientWidth+2)return N.current=a.current,a.current;if(!le)return null;let e=a.current.querySelectorAll('[data-virtuoso-scroller], [style*="overflow"], .virtuoso-scroller, [style*="overflow: auto"], [style*="overflow:auto"]');for(let t of e){let o=t;if(o!==a.current&&o.classList.contains("overlay-scrollbar-container"))continue;let l=o.parentElement,i=!1;for(;l&&l!==a.current;){if(l.classList.contains("overlay-scrollbar-container")&&l!==a.current){i=!0;break}l=l.parentElement}if(!i&&(o.scrollHeight>o.clientHeight+2||o.scrollWidth>o.clientWidth+2))return N.current=o,o}return null},[]),V=v(()=>b()!==null,[b]),w=v(()=>{Te.current&&(clearTimeout(Te.current),Te.current=null)},[]),Ie=v(()=>{oe.current&&(clearTimeout(oe.current),oe.current=null)},[]),yt=v(()=>{re.current&&(clearTimeout(re.current),re.current=null)},[]),Xt=v(()=>{Ie(),!(_||U||K||ue.current)&&(w(),C(!1))},[w,Ie,_,U,K]),y=v(e=>{u.enabled&&(w(),Te.current=setTimeout(()=>{C(!1),Te.current=null},e))},[w,u.enabled]),h=v(()=>{let e=b()??a.current;if(!e){C(!1),ct(!1),mt(!1),w();return}!u.enabled&&!de&&(C(!0),w());let t=e.clientHeight,o=e.scrollHeight,l=e.scrollTop,i=e.clientWidth,d=e.scrollWidth,T=e.scrollLeft,L=o-t>0,m=d-i>0,fe=L||m;ct(L),mt(m),fe||(C(!1),w());let Ce=0,$=0;if(Fe.current){let Z=window.getComputedStyle(Fe.current),Q=parseFloat(Z.paddingTop)||0;$=parseFloat(Z.paddingBottom)||0,Ce=Q+$,Nt($)}if(L){let Z=X?x*2+n.margin*4:n.margin*2,Q=t-Z+Ce,$e=t/o,pe=Math.max(Q*$e,Ge),wt=o-t,eo=Q-pe,to=wt>0?l/wt*eo:0;st(pe),Xe(to)}else st(0),Xe(0);let Ee=d-i;if(Ee>0){let Z=i/d,Q=Math.max(i*Z,50),$e=i-Q,pe=Ee>0?T/Ee*$e:0;pt(Q),ht(pe)}else pt(0),ht(0)},[b,w,X,x,Ge,u.enabled,de]),qt=v(e=>{e.preventDefault(),e.stopPropagation();let t=b();t&&(lt(!0),$t({y:e.clientY,scrollTop:t.scrollTop}),w(),C(!0),A())},[b,w,A]),Ke=v(e=>{if(!_)return;let t=b();if(!t)return;let o=t.clientHeight,i=t.scrollHeight-o,d=e.clientY-Ue.y,T=o-ye,L=d/T*i,m=Math.max(0,Math.min(i,Ue.scrollTop+L));t.scrollTop=m,h()},[_,Ue,ye,h,b]),Ve=v(()=>{lt(!1),V()&&y(u.delay)},[V,y,u.delay]),Yt=v(e=>{if(!ve.current)return;let o=ve.current.getBoundingClientRect(),l=e.clientY-o.top,i=b();if(!i)return;let d=i.clientHeight,T=i.scrollHeight,m=l/d*(T-d);i.scrollTop=Math.max(0,Math.min(T-d,m)),h(),C(!0),y(u.delay),A()},[h,y,u.delay,b,A]),jt=v(e=>{if(e.preventDefault(),e.stopPropagation(),!a.current)return;let t=Math.max(0,a.current.scrollTop-Pe);a.current.scrollTop=t,h(),C(!0),y(u.delay),A()},[h,y,Pe,u.delay,A]),Gt=v(e=>{if(e.preventDefault(),e.stopPropagation(),!a.current||!ge.current)return;let t=a.current,l=ge.current.scrollHeight-t.clientHeight,i=Math.min(l,t.scrollTop+Pe);t.scrollTop=i,h(),C(!0),y(u.delay),A()},[h,y,Pe,u.delay,A]),Kt=v(e=>{e.preventDefault(),e.stopPropagation();let t=b();t&&(ft(!0),Wt({x:e.clientX,scrollLeft:t.scrollLeft}),w(),C(!0),A())},[b,w,A]),Ze=v(e=>{if(!U)return;let t=b();if(!t)return;let o=t.clientWidth,i=t.scrollWidth-o,d=e.clientX-qe.x,T=o-Ye,L=d/T*i,m=Math.max(0,Math.min(i,qe.scrollLeft+L));t.scrollLeft=m,h()},[U,qe,Ye,h,b]),Qe=v(()=>{ft(!1),V()&&y(u.delay)},[V,y,u.delay]),Vt=v(e=>{if(!ve.current)return;let o=ve.current.getBoundingClientRect(),l=e.clientX-o.left,i=b();if(!i)return;let d=i.clientWidth,T=i.scrollWidth,m=l/d*(T-d);i.scrollLeft=Math.max(0,Math.min(T-d,m)),h(),C(!0),y(u.delay),A()},[h,y,u.delay,b,A]),Zt=v(e=>{if(!Se.enabled||e.defaultPrevented)return;let t=e.target,o=a.current;if(!o||!o.contains(t)||Oe(t,Se)||e.button!==0)return;let l=b();l&&(l.scrollHeight<=l.clientHeight&&l.scrollWidth<=l.clientWidth||(e.preventDefault(),ue.current=!0,At({x:e.clientX,y:e.clientY,scrollTop:l.scrollTop,scrollLeft:l.scrollLeft||0}),w()))},[Se,Oe,b,w]),Je=v(e=>{if(!ue.current&&!K)return;let t=b();if(!t)return;let o=xe.x-e.clientX,l=xe.y-e.clientY;if(Math.abs(l)<5&&Math.abs(o)<5)return;ue.current&&(ue.current=!1,bt(!0)),C(!0);let i=Math.max(0,Math.min(t.scrollHeight-t.clientHeight,xe.scrollTop+l)),d=Math.max(0,Math.min(t.scrollWidth-t.clientWidth,xe.scrollLeft+o));t.scrollTop=i,t.scrollLeft=d,h()},[K,xe,b,h]),et=v(()=>{let e=K;ue.current=!1,bt(!1),e&&V()&&y(u.delay)},[K,V,y,u.delay]);W(()=>{let e=d=>{if(h(),G){let m=(d.target?.scrollTop??0)>D;rt(m),te.current&&(clearTimeout(te.current),te.current=null),m&&se>0&&(te.current=setTimeout(()=>{te.current=null,rt(!1)},se))}if(de){S&&S(d);return}w(),C(!0),yt();let T=gt?u.delayOnWheel:u.delay;y(T),S&&S(d)},t=()=>{vt(!0),we.current&&clearTimeout(we.current),we.current=setTimeout(()=>{vt(!1)},300),yt(),re.current=setTimeout(()=>{C(!0),re.current=null,y(u.delayOnWheel)},50)},o=[],l=b();l&&o.push(l);let i=a.current;return i&&!l&&(o.push(i),i.querySelectorAll('[data-virtuoso-scroller], [style*="overflow"], .virtuoso-scroller, [style*="overflow: auto"], [style*="overflow:auto"]').forEach(T=>{let L=T;if(L!==i&&L.classList.contains("overlay-scrollbar-container"))return;let m=L.parentElement;for(;m&&m!==i;){if(m.classList.contains("overlay-scrollbar-container")&&m!==i)return;m=m.parentElement}o.push(L)})),o.forEach(d=>{d.addEventListener("scroll",e,{passive:!0}),d.addEventListener("wheel",t,{passive:!0})}),()=>{o.forEach(d=>{d.removeEventListener("scroll",e),d.removeEventListener("wheel",t)}),we.current&&clearTimeout(we.current),re.current&&clearTimeout(re.current)}},[b,h,S,w,y,u,gt,de,G,D,se]),W(()=>()=>{te.current&&clearTimeout(te.current)},[]),W(()=>{let e=o=>{let l=o.target;if(o.defaultPrevented||l instanceof Element&&Oe(l,Se))return;let i=b();if(!i)return;let{key:d}=o,{scrollTop:T,scrollHeight:L,clientHeight:m}=i,fe=L-m,Ce=50,$=null;switch(d){case"ArrowUp":o.preventDefault(),$=Math.max(0,T-Ce);break;case"ArrowDown":o.preventDefault(),$=Math.min(fe,T+Ce);break;case"PageUp":o.preventDefault(),$=Math.max(0,T-m);break;case"PageDown":o.preventDefault(),$=Math.min(fe,T+m);break;case"Home":o.preventDefault(),$=0;break;case"End":o.preventDefault(),$=fe;break;default:return}if($!==null){let Ee=$/fe,Z=X?x*2+n.margin*4:n.margin*2,pe=(m-Z-ye)*Ee;Xe(pe),i.scrollTop=$,w(),C(!0),y(u.delay)}},t=a.current;if(t)return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}},[b,X,x,n.margin,ye,w,y,u.delay,Se]),W(()=>(document.addEventListener("mousemove",Je),document.addEventListener("mouseup",et),()=>{document.removeEventListener("mousemove",Je),document.removeEventListener("mouseup",et)}),[K,Je,et]),W(()=>{if(_)return document.addEventListener("mousemove",Ke),document.addEventListener("mouseup",Ve),()=>{document.removeEventListener("mousemove",Ke),document.removeEventListener("mouseup",Ve)}},[_,Ke,Ve]),W(()=>{if(U)return document.addEventListener("mousemove",Ze),document.addEventListener("mouseup",Qe),()=>{document.removeEventListener("mousemove",Ze),document.removeEventListener("mouseup",Qe)}},[U,Ze,Qe]),W(()=>{h();let e=setTimeout(()=>{h()},100);return()=>clearTimeout(e)},[h]),fo(()=>{Bt(!0),h(),!u.enabled&&!de&&V()&&C(!0)},[V,h,u.enabled,de]),W(()=>{if(u.initialDelay>0){let e=setTimeout(()=>{_t(!1)},u.initialDelay);return()=>clearTimeout(e)}},[u.initialDelay]),W(()=>{let e=new ResizeObserver(()=>{h()}),t=[];return a.current&&t.push(a.current),ge.current&&t.push(ge.current),N.current&&document.contains(N.current)&&t.push(N.current),t.forEach(o=>{e.observe(o)}),()=>e.disconnect()},[h]),W(()=>{if(!a.current)return;let e=new MutationObserver(()=>{N.current=null,h()});return e.observe(a.current,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style"]}),()=>e.disconnect()},[h]);let I=Math.max(Ut,x);W(()=>{let e="overlay-scrollbar-shared";if(document.getElementById(e))return;let t=document.createElement("style");t.id=e,t.textContent=`
2
2
  /* ehfuse-editor-content\uB294 \uC2A4\uD06C\uB864\uBC14 \uC720\uC9C0 */
3
3
  .overlay-scrollbar-container .ehfuse-editor-content {
4
4
  scrollbar-width: thin !important;
@@ -27,16 +27,16 @@ import{useRef as I,useEffect as P,useState as h,useCallback as m,useMemo as Me,f
27
27
  from { transform: rotate(0deg); }
28
28
  to { transform: rotate(360deg); }
29
29
  }
30
- `,document.head.appendChild(t)},[]),P(()=>{let e=`overlay-scrollbar-instance-${ee}`,t=document.getElementById(e);t&&t.remove();let o=document.createElement("style");o.id=e;let n=`.${ee}`;return o.textContent=`
31
- ${n} {
30
+ `,document.head.appendChild(t)},[]),W(()=>{let e=`overlay-scrollbar-instance-${ee}`,t=document.getElementById(e);t&&t.remove();let o=document.createElement("style");o.id=e;let l=`.${ee}`;return o.textContent=`
31
+ ${l} {
32
32
  scrollbar-width: none !important;
33
33
  -ms-overflow-style: none !important;
34
34
  }
35
- ${n}::-webkit-scrollbar {
35
+ ${l}::-webkit-scrollbar {
36
36
  display: none !important;
37
37
  width: 0 !important;
38
38
  height: 0 !important;
39
39
  }
40
- ${n}::-webkit-scrollbar-track { display: none !important; }
41
- ${n}::-webkit-scrollbar-thumb { display: none !important; }`,document.head.appendChild(o),()=>{document.getElementById(e)?.remove()}},[ee]),tt("div",{ref:Ne,className:`overlay-scrollbar-wrapper ${w}`,onMouseLeave:Xt,style:{display:"flex",flexDirection:"column",position:"relative",minHeight:0,height:"100%",flex:"1 1 0%",overflow:"visible",...L},children:[Ot&&H("div",{className:"overlay-scrollbar-pull-indicator",style:{position:"absolute",top:0,left:"50%",transform:`translate(-50%, ${Be-68}px)`,transition:De?"transform 0.15s ease-out":Be===0?"transform 0.2s ease-out":"none",width:60,height:60,borderRadius:"50%",background:"#ffffff",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.25)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1001,pointerEvents:"none",opacity:De?1:Math.min(_e*1.5,1)},children:De?H("svg",{width:"36",height:"36",viewBox:"0 0 24 24",style:{animation:"overlay-scrollbar-ptr-spin 0.8s linear infinite"},children:H("circle",{cx:"12",cy:"12",r:"9",fill:"none",stroke:lt,strokeWidth:"2.5",strokeLinecap:"round",strokeDasharray:"42",strokeDashoffset:"14"})}):H("svg",{width:"36",height:"36",viewBox:"0 0 24 24",style:{transform:`rotate(${_e*270}deg)`,opacity:_e>=1?1:.6},children:H("path",{d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z",fill:lt})})}),H("div",{ref:i,className:`overlay-scrollbar-container ${ee}`,tabIndex:-1,onMouseDown:Zt,style:{display:"flex",width:"100%",flex:"1 1 auto",minHeight:0,overflow:"auto",outline:"none",userSelect:K?"none":"auto",...S},children:H("div",{ref:me,className:"overlay-scrollbar-content",style:{flex:"1 1 0%",minHeight:0,display:"flex",flexDirection:"column",boxSizing:"border-box",...p},children:z})}),ae&&ce&&(r.overflowY??!0)&&tt("div",{ref:be,className:"overlay-scrollbar-track",onMouseEnter:()=>{v(),oe.current=setTimeout(()=>{T(!0),oe.current=null},100)},onMouseLeave:()=>{Pe(),_||b(a.delay)},style:{position:"absolute",top:0,right:0,width:`${R}px`,height:"100%",opacity:ke?1:0,transition:"opacity 0.2s ease-in-out",cursor:"pointer",zIndex:1e3,pointerEvents:"auto"},children:[r.visible&&H("div",{className:"overlay-scrollbar-track-background",onClick:e=>{e.preventDefault(),e.stopPropagation(),Yt(e)},style:{position:"absolute",top:X?`${x.width+r.margin*2}px`:`${r.margin}px`,right:r.alignment==="outside"?"0px":`${(R-x.width)/2}px`,width:`${x.width}px`,height:X?`calc(100% - ${x.width*2+r.margin*4}px)`:`calc(100% - ${r.margin*2}px)`,backgroundColor:r.color,borderRadius:`${r.radius}px`,cursor:"pointer"}}),H("div",{ref:It,className:"overlay-scrollbar-thumb",onMouseDown:qt,onMouseEnter:()=>st(!0),onMouseLeave:()=>st(!1),style:{position:"absolute",top:`${(X?g+r.margin*2:r.margin)+$t}px`,right:r.alignment==="outside"?"0px":`${(R-g)/2}px`,width:`${g}px`,height:`${Math.max(ge,Ge)}px`,backgroundColor:at||_?x.hoverColor:x.color,opacity:at||_?x.hoverOpacity:x.opacity,borderRadius:`${x.radius}px`,cursor:"pointer",transition:"background-color 0.2s ease-in-out, opacity 0.2s ease-in-out"}})]}),ae&&ce&&X&&H("div",{className:"overlay-scrollbar-up-arrow",onClick:jt,onMouseEnter:()=>Ie("up"),onMouseLeave:()=>Ie(null),style:{position:"absolute",top:`${r.margin}px`,right:r.alignment==="outside"?"0px":`${(R-g)/2}px`,width:`${g}px`,height:`${g}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(g*.75,8)}px`,color:Re==="up"?N.hoverColor:N.color,userSelect:"none",zIndex:1001,opacity:ke?Re==="up"?N.hoverOpacity:N.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25B2"}),ae&&ce&&X&&H("div",{className:"overlay-scrollbar-down-arrow",onClick:Gt,onMouseEnter:()=>Ie("down"),onMouseLeave:()=>Ie(null),style:{position:"absolute",bottom:`${r.margin}px`,right:r.alignment==="outside"?"0px":`${(R-g)/2}px`,width:`${g}px`,height:`${g}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(g*.75,8)}px`,color:Re==="down"?N.hoverColor:N.color,userSelect:"none",zIndex:1001,opacity:ke?Re==="down"?N.hoverOpacity:N.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25BC"}),ae&&Ee&&At&&(r.overflowX??!0)&&tt("div",{className:"overlay-scrollbar-horizontal-track",onMouseEnter:()=>{v(),oe.current=setTimeout(()=>{T(!0),oe.current=null},100)},onMouseLeave:()=>{Pe(),U||b(a.delay)},style:{position:"absolute",bottom:`${Nt}px`,left:0,width:"100%",height:`${R}px`,opacity:ke?1:0,transition:"opacity 0.2s ease-in-out",cursor:"pointer",zIndex:1e3,pointerEvents:"auto"},children:[r.visible&&H("div",{className:"overlay-scrollbar-horizontal-track-background",onClick:e=>{e.preventDefault(),e.stopPropagation(),Vt(e)},style:{position:"absolute",bottom:r.alignment==="outside"?"0px":`${(R-g)/2}px`,left:`${r.margin}px`,right:ce?r.alignment==="outside"?`${R-r.margin}px`:`${R}px`:`${r.margin}px`,height:`${g}px`,backgroundColor:r.color,borderRadius:`${r.radius}px`,cursor:"pointer"}}),H("div",{className:"overlay-scrollbar-horizontal-thumb",onMouseDown:Kt,onMouseEnter:()=>ft(!0),onMouseLeave:()=>ft(!1),style:{position:"absolute",bottom:r.alignment==="outside"?"0px":`${(R-g)/2}px`,left:`${r.margin+je}px`,right:ce?r.alignment==="outside"?`${R-r.margin}px`:`${R}px`:"auto",maxWidth:ce?r.alignment==="outside"?`calc(100% - ${r.margin+je+R-r.margin}px)`:`calc(100% - ${r.margin+je+R}px)`:"none",width:`${Math.max(Ye,50)}px`,height:`${g}px`,backgroundColor:dt||U?x.hoverColor:x.color,opacity:dt||U?x.hoverOpacity:x.opacity,borderRadius:`${x.radius}px`,cursor:"pointer",transition:"background-color 0.2s ease-in-out, opacity 0.2s ease-in-out"}})]}),G&&H("button",{type:"button","aria-label":"\uB9E8 \uC704\uB85C",onClick:()=>i.current?.scrollTo({top:0,behavior:"smooth"}),style:{position:"absolute",[Ht]:ot,bottom:ot,zIndex:1200,width:Le,height:Le,padding:0,display:"flex",alignItems:"center",justifyContent:"center",border:"none",borderRadius:"50%",backgroundColor:Lt,color:Dt,boxShadow:"0 3px 8px rgba(15, 23, 42, 0.28)",cursor:"pointer",opacity:Fe?kt?He:1:0,pointerEvents:Fe?"auto":"none",transition:Fe?"opacity 0.15s ease":"opacity 0.45s ease"},children:H("svg",{width:Math.round(Le*.5),height:Math.round(Le*.5),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:H("polyline",{points:"18 15 12 9 6 15"})})})]})}),Ct=mo;export{Ct as OverlayScrollbar,Ct as default};
40
+ ${l}::-webkit-scrollbar-track { display: none !important; }
41
+ ${l}::-webkit-scrollbar-thumb { display: none !important; }`,document.head.appendChild(o),()=>{document.getElementById(e)?.remove()}},[ee]);let{normalizedContainerStyle:Qt,normalizedContentStyle:Jt,bottomSpacerHeight:xt}=he(()=>{let e=tt(f),t=tt(c);return{normalizedContainerStyle:e.style,normalizedContentStyle:t.style,bottomSpacerHeight:e.spacerHeight+t.spacerHeight}},[f,c]);return We("div",{ref:Fe,className:`overlay-scrollbar-wrapper ${r}`,onMouseLeave:Xt,style:{display:"flex",flexDirection:"column",position:"relative",minHeight:0,height:"100%",flex:"1 1 0%",overflow:"visible",...s},children:[It&&R("div",{className:"overlay-scrollbar-pull-indicator",style:{position:"absolute",top:0,left:"50%",transform:`translate(-50%, ${Ne-68}px)`,transition:Le?"transform 0.15s ease-out":Ne===0?"transform 0.2s ease-out":"none",width:60,height:60,borderRadius:"50%",background:"#ffffff",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.25)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1001,pointerEvents:"none",opacity:Le?1:Math.min(_e*1.5,1)},children:Le?R("svg",{width:"36",height:"36",viewBox:"0 0 24 24",style:{animation:"overlay-scrollbar-ptr-spin 0.8s linear infinite"},children:R("circle",{cx:"12",cy:"12",r:"9",fill:"none",stroke:nt,strokeWidth:"2.5",strokeLinecap:"round",strokeDasharray:"42",strokeDashoffset:"14"})}):R("svg",{width:"36",height:"36",viewBox:"0 0 24 24",style:{transform:`rotate(${_e*270}deg)`,opacity:_e>=1?1:.6},children:R("path",{d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z",fill:nt})})}),R("div",{ref:a,className:`overlay-scrollbar-container ${ee}`,tabIndex:-1,onMouseDown:Zt,style:{display:"flex",width:"100%",flex:"1 1 auto",minHeight:0,overflow:"auto",outline:"none",userSelect:K?"none":"auto",...Qt},children:We("div",{ref:ge,className:"overlay-scrollbar-content",style:{flex:"1 1 0%",minHeight:0,display:"flex",flexDirection:"column",boxSizing:"border-box",...Jt},children:[M,xt>0&&R("div",{className:"overlay-scrollbar-bottom-spacer","aria-hidden":"true",style:{flex:"0 0 auto",height:xt}})]})}),ae&&ce&&(n.overflowY??!0)&&We("div",{ref:ve,className:"overlay-scrollbar-track",onMouseEnter:()=>{w(),oe.current=setTimeout(()=>{C(!0),oe.current=null},100)},onMouseLeave:()=>{Ie(),_||y(u.delay)},style:{position:"absolute",top:0,right:0,width:`${I}px`,height:"100%",opacity:De?1:0,transition:"opacity 0.2s ease-in-out",cursor:"pointer",zIndex:1e3,pointerEvents:"auto"},children:[n.visible&&R("div",{className:"overlay-scrollbar-track-background",onClick:e=>{e.preventDefault(),e.stopPropagation(),Yt(e)},style:{position:"absolute",top:X?`${E.width+n.margin*2}px`:`${n.margin}px`,right:n.alignment==="outside"?"0px":`${(I-E.width)/2}px`,width:`${E.width}px`,height:X?`calc(100% - ${E.width*2+n.margin*4}px)`:`calc(100% - ${n.margin*2}px)`,backgroundColor:n.color,borderRadius:`${n.radius}px`,cursor:"pointer"}}),R("div",{ref:Pt,className:"overlay-scrollbar-thumb",onMouseDown:qt,onMouseEnter:()=>at(!0),onMouseLeave:()=>at(!1),style:{position:"absolute",top:`${(X?x+n.margin*2:n.margin)+Ot}px`,right:n.alignment==="outside"?"0px":`${(I-x)/2}px`,width:`${x}px`,height:`${Math.max(ye,Ge)}px`,backgroundColor:it||_?E.hoverColor:E.color,opacity:it||_?E.hoverOpacity:E.opacity,borderRadius:`${E.radius}px`,cursor:"pointer",transition:"background-color 0.2s ease-in-out, opacity 0.2s ease-in-out"}})]}),ae&&ce&&X&&R("div",{className:"overlay-scrollbar-up-arrow",onClick:jt,onMouseEnter:()=>ke("up"),onMouseLeave:()=>ke(null),style:{position:"absolute",top:`${n.margin}px`,right:n.alignment==="outside"?"0px":`${(I-x)/2}px`,width:`${x}px`,height:`${x}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(x*.75,8)}px`,color:Re==="up"?F.hoverColor:F.color,userSelect:"none",zIndex:1001,opacity:De?Re==="up"?F.hoverOpacity:F.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25B2"}),ae&&ce&&X&&R("div",{className:"overlay-scrollbar-down-arrow",onClick:Gt,onMouseEnter:()=>ke("down"),onMouseLeave:()=>ke(null),style:{position:"absolute",bottom:`${n.margin}px`,right:n.alignment==="outside"?"0px":`${(I-x)/2}px`,width:`${x}px`,height:`${x}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(x*.75,8)}px`,color:Re==="down"?F.hoverColor:F.color,userSelect:"none",zIndex:1001,opacity:De?Re==="down"?F.hoverOpacity:F.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25BC"}),ae&&Me&&zt&&(n.overflowX??!0)&&We("div",{className:"overlay-scrollbar-horizontal-track",onMouseEnter:()=>{w(),oe.current=setTimeout(()=>{C(!0),oe.current=null},100)},onMouseLeave:()=>{Ie(),U||y(u.delay)},style:{position:"absolute",bottom:`${Ft}px`,left:0,width:"100%",height:`${I}px`,opacity:De?1:0,transition:"opacity 0.2s ease-in-out",cursor:"pointer",zIndex:1e3,pointerEvents:"auto"},children:[n.visible&&R("div",{className:"overlay-scrollbar-horizontal-track-background",onClick:e=>{e.preventDefault(),e.stopPropagation(),Vt(e)},style:{position:"absolute",bottom:n.alignment==="outside"?"0px":`${(I-x)/2}px`,left:`${n.margin}px`,right:ce?n.alignment==="outside"?`${I-n.margin}px`:`${I}px`:`${n.margin}px`,height:`${x}px`,backgroundColor:n.color,borderRadius:`${n.radius}px`,cursor:"pointer"}}),R("div",{className:"overlay-scrollbar-horizontal-thumb",onMouseDown:Kt,onMouseEnter:()=>dt(!0),onMouseLeave:()=>dt(!1),style:{position:"absolute",bottom:n.alignment==="outside"?"0px":`${(I-x)/2}px`,left:`${n.margin+je}px`,right:ce?n.alignment==="outside"?`${I-n.margin}px`:`${I}px`:"auto",maxWidth:ce?n.alignment==="outside"?`calc(100% - ${n.margin+je+I-n.margin}px)`:`calc(100% - ${n.margin+je+I}px)`:"none",width:`${Math.max(Ye,50)}px`,height:`${x}px`,backgroundColor:ut||U?E.hoverColor:E.color,opacity:ut||U?E.hoverOpacity:E.opacity,borderRadius:`${E.radius}px`,cursor:"pointer",transition:"background-color 0.2s ease-in-out, opacity 0.2s ease-in-out"}})]}),G&&R("button",{type:"button","aria-label":"\uB9E8 \uC704\uB85C",onClick:()=>{be(!1),a.current?.scrollTo({top:0,behavior:"smooth"})},onPointerDown:()=>be(!0),onPointerUp:()=>be(!1),onPointerLeave:()=>be(!1),onPointerCancel:()=>be(!1),style:{position:"absolute",[Ht]:ot,bottom:ot,zIndex:1200,width:He,height:He,padding:0,display:"flex",alignItems:"center",justifyContent:"center",border:"none",borderRadius:"50%",backgroundColor:Lt,color:Dt,boxShadow:"0 3px 8px rgba(15, 23, 42, 0.28)",cursor:"pointer",opacity:Be?Rt?1:Ae:0,pointerEvents:Be?"auto":"none",transition:Be?"opacity 0.15s ease":"opacity 0.45s ease"},children:R("svg",{width:Math.round(He*.5),height:Math.round(He*.5),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:R("polyline",{points:"18 15 12 9 6 15"})})})]})}),Mt=xo;export{Mt as OverlayScrollbar,Mt as default};
42
42
  //# sourceMappingURL=index.esm.js.map