import{j as M}from"./main-ac2fa4b1.js";import{r as te}from"./chunk-react-162a731f.js";import{c as Z}from"./chunk-index-89b7ba38.js";import{c as ke,g as Ne}from"./chunk-lodash-6114c6d4.js";import{aV as Pe,m as He,B as J,aW as Ie,y as Be}from"./chunk-material-ui-42c43899.js";var we={},Se={},re={exports:{}},X={exports:{}};(function(){var r,n,a,u,s,p;typeof performance<"u"&&performance!==null&&performance.now?X.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(X.exports=function(){return(r()-s)/1e6},n=process.hrtime,r=function(){var d;return d=n(),d[0]*1e9+d[1]},u=r(),p=process.uptime()*1e9,s=u-p):Date.now?(X.exports=function(){return Date.now()-a},a=Date.now()):(X.exports=function(){return new Date().getTime()-a},a=new Date().getTime())}).call(ke);var Ue=X.exports,$e=Ue,z=typeof window>"u"?ke:window,K=["moz","webkit"],I="AnimationFrame",B=z["request"+I],Y=z["cancel"+I]||z["cancelRequest"+I];for(var j=0;!B&&j<K.length;j++)B=z[K[j]+"Request"+I],Y=z[K[j]+"Cancel"+I]||z[K[j]+"CancelRequest"+I];if(!B||!Y){var ge=0,be=0,F=[],je=1e3/60;B=function(r){if(F.length===0){var n=$e(),a=Math.max(0,je-(n-ge));ge=a+n,setTimeout(function(){var u=F.slice(0);F.length=0;for(var s=0;s<u.length;s++)if(!u[s].cancelled)try{u[s].callback(ge)}catch(p){setTimeout(function(){throw p},0)}},Math.round(a))}return F.push({handle:++be,callback:r,cancelled:!1}),be},Y=function(r){for(var n=0;n<F.length;n++)F[n].handle===r&&(F[n].cancelled=!0)}}re.exports=function(r){return B.call(z,r)};re.exports.cancel=function(){Y.apply(z,arguments)};re.exports.polyfill=function(r){r||(r=z),r.requestAnimationFrame=B,r.cancelAnimationFrame=Y};var Xe=re.exports,ne={exports:{}},pe=null,Te=["Webkit","Moz","O","ms"],Ye=function(n){pe||(pe=document.createElement("div"));var a=pe.style;if(n in a)return n;for(var u=n.charAt(0).toUpperCase()+n.slice(1),s=Te.length;s>=0;s--){var p=Te[s]+u;if(p in a)return p}return!1},qe=Ke,Ge=/\s/,Ze=/(_|-|\.|:)/,Je=/([a-z][A-Z]|[A-Z][a-z])/;function Ke(r){return Ge.test(r)?r.toLowerCase():Ze.test(r)?(et(r)||r).toLowerCase():Je.test(r)?rt(r).toLowerCase():r.toLowerCase()}var Qe=/[\W_]+(.|$)/g;function et(r){return r.replace(Qe,function(n,a){return a?" "+a:""})}var tt=/(.)([A-Z]+)/g;function rt(r){return r.replace(tt,function(n,a,u){return a+" "+u.toLowerCase().split("").join(" ")})}var nt=qe,at=it;function it(r){return nt(r).replace(/[\W_]+(.|$)/g,function(n,a){return a?" "+a:""}).trim()}var ot=at,lt=ut;function ut(r){return ot(r).replace(/\s(\w)/g,function(n,a){return a.toUpperCase()})}var st={animationIterationCount:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,stopOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0},ct=function(r,n){return typeof n=="number"&&!st[r]?n+"px":n},dt=Ye,ht=lt,Q={float:"cssFloat"},ft=ct;function ee(r,n,a){var u=Q[n];if(typeof u>"u"&&(u=gt(n)),u){if(a===void 0)return r.style[u];r.style[u]=ft(u,a)}}function vt(r,n){for(var a in n)n.hasOwnProperty(a)&&ee(r,a,n[a])}function gt(r){var n=ht(r),a=dt(n);return Q[n]=Q[r]=Q[a]=a,a}function ye(){arguments.length===2?typeof arguments[1]=="string"?arguments[0].style.cssText=arguments[1]:vt(arguments[0],arguments[1]):ee(arguments[0],arguments[1],arguments[2])}ne.exports=ye;ne.exports.set=ye;ne.exports.get=function(r,n){return Array.isArray(n)?n.reduce(function(a,u){return a[u]=ee(r,u||""),a},{}):ee(r,n||"")};var De=ne.exports,Le={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=n;function n(a){return typeof a=="string"}})(Le);var _e={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=p;var n=De,a=u(n);function u(d){return d&&d.__esModule?d:{default:d}}var s=!1;function p(){if(s!==!1)return s;if(typeof document<"u"){var d=document.createElement("div");(0,a.default)(d,{width:100,height:100,position:"absolute",top:-9999,overflow:"scroll",MsOverflowStyle:"scrollbar"}),document.body.appendChild(d),s=d.offsetWidth-d.clientWidth,document.body.removeChild(d)}else s=0;return s||0}})(_e);var Me={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=n;function n(){return!1}})(Me);var ze={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=n;function n(a){var u=a.clientWidth,s=getComputedStyle(a),p=s.paddingLeft,d=s.paddingRight;return u-parseFloat(p)-parseFloat(d)}})(ze);var Ve={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=n;function n(a){var u=a.clientHeight,s=getComputedStyle(a),p=s.paddingTop,d=s.paddingBottom;return u-parseFloat(p)-parseFloat(d)}})(Ve);var k={};Object.defineProperty(k,"__esModule",{value:!0});k.containerStyleDefault={position:"relative",overflow:"hidden",width:"100%",height:"100%"};k.containerStyleAutoHeight={height:"auto"};k.viewStyleDefault={position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"scroll",WebkitOverflowScrolling:"touch"};k.viewStyleAutoHeight={position:"relative",top:void 0,left:void 0,right:void 0,bottom:void 0};k.viewStyleUniversalInitial={overflow:"hidden",marginRight:0,marginBottom:0};k.trackHorizontalStyleDefault={position:"absolute",height:6};k.trackVerticalStyleDefault={position:"absolute",width:6};k.thumbHorizontalStyleDefault={position:"relative",display:"block",height:"100%"};k.thumbVerticalStyleDefault={position:"relative",display:"block",width:"100%"};k.disableSelectStyle={userSelect:"none"};k.disableSelectStyleReset={userSelect:""};var R={};Object.defineProperty(R,"__esModule",{value:!0});var C=Object.assign||function(r){for(var n=1;n<arguments.length;n++){var a=arguments[n];for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&(r[u]=a[u])}return r};R.renderViewDefault=bt;R.renderTrackHorizontalDefault=Tt;R.renderTrackVerticalDefault=kt;R.renderThumbHorizontalDefault=Ht;R.renderThumbVerticalDefault=wt;var pt=te,q=mt(pt);function mt(r){return r&&r.__esModule?r:{default:r}}function ae(r,n){var a={};for(var u in r)n.indexOf(u)>=0||Object.prototype.hasOwnProperty.call(r,u)&&(a[u]=r[u]);return a}function bt(r){return q.default.createElement("div",r)}function Tt(r){var n=r.style,a=ae(r,["style"]),u=C({},n,{right:2,bottom:2,left:2,borderRadius:3});return q.default.createElement("div",C({style:u},a))}function kt(r){var n=r.style,a=ae(r,["style"]),u=C({},n,{right:2,bottom:2,top:2,borderRadius:3});return q.default.createElement("div",C({style:u},a))}function Ht(r){var n=r.style,a=ae(r,["style"]),u=C({},n,{cursor:"pointer",borderRadius:"inherit",backgroundColor:"rgba(0,0,0,.2)"});return q.default.createElement("div",C({style:u},a))}function wt(r){var n=r.style,a=ae(r,["style"]),u=C({},n,{cursor:"pointer",borderRadius:"inherit",backgroundColor:"rgba(0,0,0,.2)"});return q.default.createElement("div",C({style:u},a))}(function(r){Object.defineProperty(r,"__esModule",{value:!0});var n=Object.assign||function(g){for(var f=1;f<arguments.length;f++){var o=arguments[f];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(g[t]=o[t])}return g},a=function(){function g(f,o){for(var t=0;t<o.length;t++){var i=o[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(f,i.key,i)}}return function(f,o,t){return o&&g(f.prototype,o),t&&g(f,t),f}}(),u=Xe,s=V(u),p=De,d=V(p),_=te,ie=Pe,h=V(ie),oe=Le,A=V(oe),le=_e,N=V(le),b=Me,y=V(b),We=ze,ue=V(We),xe=Ve,se=V(xe),H=k,U=R;function V(g){return g&&g.__esModule?g:{default:g}}function Ee(g,f){var o={};for(var t in g)f.indexOf(t)>=0||Object.prototype.hasOwnProperty.call(g,t)&&(o[t]=g[t]);return o}function Oe(g,f){if(!(g instanceof f))throw new TypeError("Cannot call a class as a function")}function Ce(g,f){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:g}function Fe(g,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);g.prototype=Object.create(f&&f.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(g,f):g.__proto__=f)}var ce=function(g){Fe(f,g);function f(o){var t;Oe(this,f);for(var i=arguments.length,l=Array(i>1?i-1:0),c=1;c<i;c++)l[c-1]=arguments[c];var e=Ce(this,(t=f.__proto__||Object.getPrototypeOf(f)).call.apply(t,[this,o].concat(l)));return e.getScrollLeft=e.getScrollLeft.bind(e),e.getScrollTop=e.getScrollTop.bind(e),e.getScrollWidth=e.getScrollWidth.bind(e),e.getScrollHeight=e.getScrollHeight.bind(e),e.getClientWidth=e.getClientWidth.bind(e),e.getClientHeight=e.getClientHeight.bind(e),e.getValues=e.getValues.bind(e),e.getThumbHorizontalWidth=e.getThumbHorizontalWidth.bind(e),e.getThumbVerticalHeight=e.getThumbVerticalHeight.bind(e),e.getScrollLeftForOffset=e.getScrollLeftForOffset.bind(e),e.getScrollTopForOffset=e.getScrollTopForOffset.bind(e),e.scrollLeft=e.scrollLeft.bind(e),e.scrollTop=e.scrollTop.bind(e),e.scrollToLeft=e.scrollToLeft.bind(e),e.scrollToTop=e.scrollToTop.bind(e),e.scrollToRight=e.scrollToRight.bind(e),e.scrollToBottom=e.scrollToBottom.bind(e),e.handleTrackMouseEnter=e.handleTrackMouseEnter.bind(e),e.handleTrackMouseLeave=e.handleTrackMouseLeave.bind(e),e.handleHorizontalTrackMouseDown=e.handleHorizontalTrackMouseDown.bind(e),e.handleVerticalTrackMouseDown=e.handleVerticalTrackMouseDown.bind(e),e.handleHorizontalThumbMouseDown=e.handleHorizontalThumbMouseDown.bind(e),e.handleVerticalThumbMouseDown=e.handleVerticalThumbMouseDown.bind(e),e.handleWindowResize=e.handleWindowResize.bind(e),e.handleScroll=e.handleScroll.bind(e),e.handleDrag=e.handleDrag.bind(e),e.handleDragEnd=e.handleDragEnd.bind(e),e.state={didMountUniversal:!1},e}return a(f,[{key:"componentDidMount",value:function(){this.addListeners(),this.update(),this.componentDidMountUniversal()}},{key:"componentDidMountUniversal",value:function(){var t=this.props.universal;t&&this.setState({didMountUniversal:!0})}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"componentWillUnmount",value:function(){this.removeListeners(),(0,u.cancel)(this.requestFrame),clearTimeout(this.hideTracksTimeout),clearInterval(this.detectScrollingInterval)}},{key:"getScrollLeft",value:function(){return this.view?this.view.scrollLeft:0}},{key:"getScrollTop",value:function(){return this.view?this.view.scrollTop:0}},{key:"getScrollWidth",value:function(){return this.view?this.view.scrollWidth:0}},{key:"getScrollHeight",value:function(){return this.view?this.view.scrollHeight:0}},{key:"getClientWidth",value:function(){return this.view?this.view.clientWidth:0}},{key:"getClientHeight",value:function(){return this.view?this.view.clientHeight:0}},{key:"getValues",value:function(){var t=this.view||{},i=t.scrollLeft,l=i===void 0?0:i,c=t.scrollTop,e=c===void 0?0:c,v=t.scrollWidth,m=v===void 0?0:v,T=t.scrollHeight,W=T===void 0?0:T,D=t.clientWidth,x=D===void 0?0:D,w=t.clientHeight,L=w===void 0?0:w;return{left:l/(m-x)||0,top:e/(W-L)||0,scrollLeft:l,scrollTop:e,scrollWidth:m,scrollHeight:W,clientWidth:x,clientHeight:L}}},{key:"getThumbHorizontalWidth",value:function(){var t=this.props,i=t.thumbSize,l=t.thumbMinSize,c=this.view,e=c.scrollWidth,v=c.clientWidth,m=(0,ue.default)(this.trackHorizontal),T=Math.ceil(v/e*m);return m===T?0:i||Math.max(T,l)}},{key:"getThumbVerticalHeight",value:function(){var t=this.props,i=t.thumbSize,l=t.thumbMinSize,c=this.view,e=c.scrollHeight,v=c.clientHeight,m=(0,se.default)(this.trackVertical),T=Math.ceil(v/e*m);return m===T?0:i||Math.max(T,l)}},{key:"getScrollLeftForOffset",value:function(t){var i=this.view,l=i.scrollWidth,c=i.clientWidth,e=(0,ue.default)(this.trackHorizontal),v=this.getThumbHorizontalWidth();return t/(e-v)*(l-c)}},{key:"getScrollTopForOffset",value:function(t){var i=this.view,l=i.scrollHeight,c=i.clientHeight,e=(0,se.default)(this.trackVertical),v=this.getThumbVerticalHeight();return t/(e-v)*(l-c)}},{key:"scrollLeft",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.view&&(this.view.scrollLeft=t)}},{key:"scrollTop",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.view&&(this.view.scrollTop=t)}},{key:"scrollToLeft",value:function(){this.view&&(this.view.scrollLeft=0)}},{key:"scrollToTop",value:function(){this.view&&(this.view.scrollTop=0)}},{key:"scrollToRight",value:function(){this.view&&(this.view.scrollLeft=this.view.scrollWidth)}},{key:"scrollToBottom",value:function(){this.view&&(this.view.scrollTop=this.view.scrollHeight)}},{key:"addListeners",value:function(){if(!(typeof document>"u"||!this.view)){var t=this.view,i=this.trackHorizontal,l=this.trackVertical,c=this.thumbHorizontal,e=this.thumbVertical;t.addEventListener("scroll",this.handleScroll),(0,N.default)()&&(i.addEventListener("mouseenter",this.handleTrackMouseEnter),i.addEventListener("mouseleave",this.handleTrackMouseLeave),i.addEventListener("mousedown",this.handleHorizontalTrackMouseDown),l.addEventListener("mouseenter",this.handleTrackMouseEnter),l.addEventListener("mouseleave",this.handleTrackMouseLeave),l.addEventListener("mousedown",this.handleVerticalTrackMouseDown),c.addEventListener("mousedown",this.handleHorizontalThumbMouseDown),e.addEventListener("mousedown",this.handleVerticalThumbMouseDown),window.addEventListener("resize",this.handleWindowResize))}}},{key:"removeListeners",value:function(){if(!(typeof document>"u"||!this.view)){var t=this.view,i=this.trackHorizontal,l=this.trackVertical,c=this.thumbHorizontal,e=this.thumbVertical;t.removeEventListener("scroll",this.handleScroll),(0,N.default)()&&(i.removeEventListener("mouseenter",this.handleTrackMouseEnter),i.removeEventListener("mouseleave",this.handleTrackMouseLeave),i.removeEventListener("mousedown",this.handleHorizontalTrackMouseDown),l.removeEventListener("mouseenter",this.handleTrackMouseEnter),l.removeEventListener("mouseleave",this.handleTrackMouseLeave),l.removeEventListener("mousedown",this.handleVerticalTrackMouseDown),c.removeEventListener("mousedown",this.handleHorizontalThumbMouseDown),e.removeEventListener("mousedown",this.handleVerticalThumbMouseDown),window.removeEventListener("resize",this.handleWindowResize),this.teardownDragging())}}},{key:"handleScroll",value:function(t){var i=this,l=this.props,c=l.onScroll,e=l.onScrollFrame;c&&c(t),this.update(function(v){var m=v.scrollLeft,T=v.scrollTop;i.viewScrollLeft=m,i.viewScrollTop=T,e&&e(v)}),this.detectScrolling()}},{key:"handleScrollStart",value:function(){var t=this.props.onScrollStart;t&&t(),this.handleScrollStartAutoHide()}},{key:"handleScrollStartAutoHide",value:function(){var t=this.props.autoHide;t&&this.showTracks()}},{key:"handleScrollStop",value:function(){var t=this.props.onScrollStop;t&&t(),this.handleScrollStopAutoHide()}},{key:"handleScrollStopAutoHide",value:function(){var t=this.props.autoHide;t&&this.hideTracks()}},{key:"handleWindowResize",value:function(){this.update()}},{key:"handleHorizontalTrackMouseDown",value:function(t){t.preventDefault();var i=t.target,l=t.clientX,c=i.getBoundingClientRect(),e=c.left,v=this.getThumbHorizontalWidth(),m=Math.abs(e-l)-v/2;this.view.scrollLeft=this.getScrollLeftForOffset(m)}},{key:"handleVerticalTrackMouseDown",value:function(t){t.preventDefault();var i=t.target,l=t.clientY,c=i.getBoundingClientRect(),e=c.top,v=this.getThumbVerticalHeight(),m=Math.abs(e-l)-v/2;this.view.scrollTop=this.getScrollTopForOffset(m)}},{key:"handleHorizontalThumbMouseDown",value:function(t){t.preventDefault(),this.handleDragStart(t);var i=t.target,l=t.clientX,c=i.offsetWidth,e=i.getBoundingClientRect(),v=e.left;this.prevPageX=c-(l-v)}},{key:"handleVerticalThumbMouseDown",value:function(t){t.preventDefault(),this.handleDragStart(t);var i=t.target,l=t.clientY,c=i.offsetHeight,e=i.getBoundingClientRect(),v=e.top;this.prevPageY=c-(l-v)}},{key:"setupDragging",value:function(){(0,d.default)(document.body,H.disableSelectStyle),document.addEventListener("mousemove",this.handleDrag),document.addEventListener("mouseup",this.handleDragEnd),document.onselectstart=y.default}},{key:"teardownDragging",value:function(){(0,d.default)(document.body,H.disableSelectStyleReset),document.removeEventListener("mousemove",this.handleDrag),document.removeEventListener("mouseup",this.handleDragEnd),document.onselectstart=void 0}},{key:"handleDragStart",value:function(t){this.dragging=!0,t.stopImmediatePropagation(),this.setupDragging()}},{key:"handleDrag",value:function(t){if(this.prevPageX){var i=t.clientX,l=this.trackHorizontal.getBoundingClientRect(),c=l.left,e=this.getThumbHorizontalWidth(),v=e-this.prevPageX,m=-c+i-v;this.view.scrollLeft=this.getScrollLeftForOffset(m)}if(this.prevPageY){var T=t.clientY,W=this.trackVertical.getBoundingClientRect(),D=W.top,x=this.getThumbVerticalHeight(),w=x-this.prevPageY,L=-D+T-w;this.view.scrollTop=this.getScrollTopForOffset(L)}return!1}},{key:"handleDragEnd",value:function(){this.dragging=!1,this.prevPageX=this.prevPageY=0,this.teardownDragging(),this.handleDragEndAutoHide()}},{key:"handleDragEndAutoHide",value:function(){var t=this.props.autoHide;t&&this.hideTracks()}},{key:"handleTrackMouseEnter",value:function(){this.trackMouseOver=!0,this.handleTrackMouseEnterAutoHide()}},{key:"handleTrackMouseEnterAutoHide",value:function(){var t=this.props.autoHide;t&&this.showTracks()}},{key:"handleTrackMouseLeave",value:function(){this.trackMouseOver=!1,this.handleTrackMouseLeaveAutoHide()}},{key:"handleTrackMouseLeaveAutoHide",value:function(){var t=this.props.autoHide;t&&this.hideTracks()}},{key:"showTracks",value:function(){clearTimeout(this.hideTracksTimeout),(0,d.default)(this.trackHorizontal,{opacity:1}),(0,d.default)(this.trackVertical,{opacity:1})}},{key:"hideTracks",value:function(){var t=this;if(!this.dragging&&!this.scrolling&&!this.trackMouseOver){var i=this.props.autoHideTimeout;clearTimeout(this.hideTracksTimeout),this.hideTracksTimeout=setTimeout(function(){(0,d.default)(t.trackHorizontal,{opacity:0}),(0,d.default)(t.trackVertical,{opacity:0})},i)}}},{key:"detectScrolling",value:function(){var t=this;this.scrolling||(this.scrolling=!0,this.handleScrollStart(),this.detectScrollingInterval=setInterval(function(){t.lastViewScrollLeft===t.viewScrollLeft&&t.lastViewScrollTop===t.viewScrollTop&&(clearInterval(t.detectScrollingInterval),t.scrolling=!1,t.handleScrollStop()),t.lastViewScrollLeft=t.viewScrollLeft,t.lastViewScrollTop=t.viewScrollTop},100))}},{key:"raf",value:function(t){var i=this;this.requestFrame&&s.default.cancel(this.requestFrame),this.requestFrame=(0,s.default)(function(){i.requestFrame=void 0,t()})}},{key:"update",value:function(t){var i=this;this.raf(function(){return i._update(t)})}},{key:"_update",value:function(t){var i=this.props,l=i.onUpdate,c=i.hideTracksWhenNotNeeded,e=this.getValues();if((0,N.default)()){var v=e.scrollLeft,m=e.clientWidth,T=e.scrollWidth,W=(0,ue.default)(this.trackHorizontal),D=this.getThumbHorizontalWidth(),x=v/(T-m)*(W-D),w={width:D,transform:"translateX("+x+"px)"},L=e.scrollTop,E=e.clientHeight,O=e.scrollHeight,de=(0,se.default)(this.trackVertical),G=this.getThumbVerticalHeight(),he=L/(O-E)*(de-G),P={height:G,transform:"translateY("+he+"px)"};if(c){var fe={visibility:T>m?"visible":"hidden"},ve={visibility:O>E?"visible":"hidden"};(0,d.default)(this.trackHorizontal,fe),(0,d.default)(this.trackVertical,ve)}(0,d.default)(this.thumbHorizontal,w),(0,d.default)(this.thumbVertical,P)}l&&l(e),typeof t=="function"&&t(e)}},{key:"render",value:function(){var t=this,i=(0,N.default)(),l=this.props;l.onScroll,l.onScrollFrame,l.onScrollStart,l.onScrollStop,l.onUpdate;var c=l.renderView,e=l.renderTrackHorizontal,v=l.renderTrackVertical,m=l.renderThumbHorizontal,T=l.renderThumbVertical,W=l.tagName;l.hideTracksWhenNotNeeded;var D=l.autoHide;l.autoHideTimeout;var x=l.autoHideDuration;l.thumbSize,l.thumbMinSize;var w=l.universal,L=l.autoHeight,E=l.autoHeightMin,O=l.autoHeightMax,de=l.style,G=l.children,he=Ee(l,["onScroll","onScrollFrame","onScrollStart","onScrollStop","onUpdate","renderView","renderTrackHorizontal","renderTrackVertical","renderThumbHorizontal","renderThumbVertical","tagName","hideTracksWhenNotNeeded","autoHide","autoHideTimeout","autoHideDuration","thumbSize","thumbMinSize","universal","autoHeight","autoHeightMin","autoHeightMax","style","children"]),P=this.state.didMountUniversal,fe=n({},H.containerStyleDefault,L&&n({},H.containerStyleAutoHeight,{minHeight:E,maxHeight:O}),de),ve=n({},H.viewStyleDefault,{marginRight:i?-i:0,marginBottom:i?-i:0},L&&n({},H.viewStyleAutoHeight,{minHeight:(0,A.default)(E)?"calc("+E+" + "+i+"px)":E+i,maxHeight:(0,A.default)(O)?"calc("+O+" + "+i+"px)":O+i}),L&&w&&!P&&{minHeight:E,maxHeight:O},w&&!P&&H.viewStyleUniversalInitial),me={transition:"opacity "+x+"ms",opacity:0},Re=n({},H.trackHorizontalStyleDefault,D&&me,(!i||w&&!P)&&{display:"none"}),Ae=n({},H.trackVerticalStyleDefault,D&&me,(!i||w&&!P)&&{display:"none"});return(0,_.createElement)(W,n({},he,{style:fe,ref:function(S){t.container=S}}),[(0,_.cloneElement)(c({style:ve}),{key:"view",ref:function(S){t.view=S}},G),(0,_.cloneElement)(e({style:Re}),{key:"trackHorizontal",ref:function(S){t.trackHorizontal=S}},(0,_.cloneElement)(m({style:H.thumbHorizontalStyleDefault}),{ref:function(S){t.thumbHorizontal=S}})),(0,_.cloneElement)(v({style:Ae}),{key:"trackVertical",ref:function(S){t.trackVertical=S}},(0,_.cloneElement)(T({style:H.thumbVerticalStyleDefault}),{ref:function(S){t.thumbVertical=S}}))])}}]),f}(_.Component);r.default=ce,ce.propTypes={onScroll:h.default.func,onScrollFrame:h.default.func,onScrollStart:h.default.func,onScrollStop:h.default.func,onUpdate:h.default.func,renderView:h.default.func,renderTrackHorizontal:h.default.func,renderTrackVertical:h.default.func,renderThumbHorizontal:h.default.func,renderThumbVertical:h.default.func,tagName:h.default.string,thumbSize:h.default.number,thumbMinSize:h.default.number,hideTracksWhenNotNeeded:h.default.bool,autoHide:h.default.bool,autoHideTimeout:h.default.number,autoHideDuration:h.default.number,autoHeight:h.default.bool,autoHeightMin:h.default.oneOfType([h.default.number,h.default.string]),autoHeightMax:h.default.oneOfType([h.default.number,h.default.string]),universal:h.default.bool,style:h.default.object,children:h.default.node},ce.defaultProps={renderView:U.renderViewDefault,renderTrackHorizontal:U.renderTrackHorizontalDefault,renderTrackVertical:U.renderTrackVerticalDefault,renderThumbHorizontal:U.renderThumbHorizontalDefault,renderThumbVertical:U.renderThumbVerticalDefault,tagName:"div",thumbMinSize:30,hideTracksWhenNotNeeded:!1,autoHide:!1,autoHideTimeout:1e3,autoHideDuration:200,autoHeight:!1,autoHeightMin:0,autoHeightMax:200,universal:!1}})(Se);(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.Scrollbars=void 0;var n=Se,a=u(n);function u(s){return s&&s.__esModule?s:{default:s}}r.default=a.default,r.Scrollbars=a.default})(we);const St=Ne(we),yt=He(r=>({trackVertical:{position:"absolute",right:0,top:0,height:"100%",backgroundColor:"#F0F3F6",width:4},scrollBlock:{"& li":{"list-style":"none"}}}),{name:"Scrollbars"});function Dt({children:r,customStyles:n,style:a}){const u=yt();return M.jsx(St,{autoHide:!1,style:a,className:u.scrollBlock,renderTrackVertical:({style:s,...p})=>M.jsx(J,{className:n!=null&&n.trackVertical?Z(u.trackVertical,n==null?void 0:n.trackVertical):u.trackVertical,...p}),renderThumbVertical:({...s})=>M.jsx(J,{className:(n==null?void 0:n.thumbVertical)&&Z(n==null?void 0:n.thumbVertical),...s}),renderTrackHorizontal:({style:s,...p})=>M.jsx(J,{className:(n==null?void 0:n.trackHorizontal)&&Z(n==null?void 0:n.trackHorizontal),...p}),renderThumbHorizontal:({style:s,...p})=>M.jsx(J,{className:(n==null?void 0:n.thumbHorizontal)&&Z(n==null?void 0:n.thumbHorizontal),...p}),children:r})}const Lt=He(r=>({selectPopper:{top:30,"&$selectDisablePortal":{zIndex:50}},selectRoot:{position:"relative",zIndex:150},selectDisablePortal:{},selectDropdownContent:{"&.MuiAutocomplete-paper":{height:300,margin:"unset",background:"#FFFFFF",border:"1px solid rgba(0, 16, 61, 0.16)",boxSizing:"border-box",borderRadius:16,boxShadow:"unset",paddingTop:30,paddingLeft:8}},selectOption:{borderTopLeftRadius:8,borderBottomLeftRadius:8,'&[aria-selected="true"]':{backgroundColor:r.color.black20},"&:active":{backgroundColor:r.color.black40}},selectBox:{height:245},selectGroupUI:{margin:0},selectGroupLabel:{backgroundColor:r.color.black20}})),_t=te.forwardRef((r,n)=>{const{children:a,style:u,...s}=r;return M.jsx("div",{ref:n,...s,className:u,children:M.jsx(Dt,{...s,children:a})})}),Et=({inputValue:r,placeholder:n,options:a,optionsSorting:u,debug:s,listBoxStyle:p,autoCompleteProps:d,onChange:_,onChangeInput:ie})=>{const h=Lt(),[oe,A]=te.useState(!1),le=a.map(b=>{const y=b.title[0].toUpperCase();return{letterFirst:/[0-9]/.test(y)?"0-9":y,...b}}),N=(b,y)=>{_(b,y),A(!1)};return M.jsx(Ie,{disablePortal:!0,disableClearable:!0,disableListWrap:!0,fullWidth:!0,onChange:N,inputValue:r,onInputChange:ie,onOpen:()=>{a.length&&A(!0)},onClose:()=>A(!1),classes:{root:h.selectRoot,popperDisablePortal:h.selectDisablePortal,popper:h.selectPopper,paper:h.selectDropdownContent,option:h.selectOption,groupLabel:h.selectGroupLabel,groupUl:h.selectGroupUI},ListboxComponent:_t,ListboxProps:{style:p||h.selectBox},renderTags:()=>null,options:u?le.sort((b,y)=>-y.letterFirst.localeCompare(b.letterFirst)):a,open:oe,debug:s,groupBy:b=>b.letterFirst?b.letterFirst:"",getOptionSelected:(b,y)=>b.value===y.value,getOptionLabel:b=>b.title,renderInput:d!=null&&d.renderInput?d==null?void 0:d.renderInput:b=>M.jsx(Be,{...b,placeholder:`Выберите ${n==null?void 0:n.toLocaleLowerCase()}`,variant:"outlined"}),noOptionsText:`${n} не найден`})};export{Et as A,Dt as S};