????

Your IP : 216.73.216.35


Current Path : C:/inetpub/vhost/kiemkegpmb.gdtsolutions.vn/www/assets/
Upload File :
Current File : C:/inetpub/vhost/kiemkegpmb.gdtsolutions.vn/www/assets/ButtonBase-b5c14933.js

import{r,y as me,P as n,F as ae}from"./index-66f9303d.js";import{b as be,f as Oe}from"./useTheme-04a7a0e8.js";import{c as W}from"./withStyles-88702e75.js";import{a as A,u as ie,d as Ye}from"./DialogCustomize-662f79ab.js";import{w as ve}from"./capitalize-67f31d18.js";import{T as Ae}from"./TransitionGroup-5d30e17f.js";import{r as pe,e as je}from"./refType-95cbe556.js";var G=!0,ue=!1,de=null,qe={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function He(i){var e=i.type,s=i.tagName;return!!(s==="INPUT"&&qe[e]&&!i.readOnly||s==="TEXTAREA"&&!i.readOnly||i.isContentEditable)}function We(i){i.metaKey||i.altKey||i.ctrlKey||(G=!0)}function oe(){G=!1}function Ge(){this.visibilityState==="hidden"&&ue&&(G=!0)}function Je(i){i.addEventListener("keydown",We,!0),i.addEventListener("mousedown",oe,!0),i.addEventListener("pointerdown",oe,!0),i.addEventListener("touchstart",oe,!0),i.addEventListener("visibilitychange",Ge,!0)}function he(i){var e=i.target;try{return e.matches(":focus-visible")}catch{}return G||He(e)}function Qe(){ue=!0,window.clearTimeout(de),de=window.setTimeout(function(){ue=!1},100)}function Ze(){var i=r.useCallback(function(e){var s=me.findDOMNode(e);s!=null&&Je(s.ownerDocument)},[]);return r.useDebugValue(he),{isFocusVisible:he,onBlurVisible:Qe,ref:i}}var et=typeof window>"u"?r.useEffect:r.useLayoutEffect;function ye(i){var e=i.classes,s=i.pulsate,N=s===void 0?!1:s,P=i.rippleX,y=i.rippleY,g=i.rippleSize,L=i.in,d=i.onExited,_=d===void 0?function(){}:d,R=i.timeout,h=r.useState(!1),p=h[0],l=h[1],m=W(e.ripple,e.rippleVisible,N&&e.ripplePulsate),a={width:g,height:g,top:-(g/2)+y,left:-(g/2)+P},S=W(e.child,p&&e.childLeaving,N&&e.childPulsate),T=A(_);return et(function(){if(!L){l(!0);var b=setTimeout(T,R);return function(){clearTimeout(b)}}},[T,L,R]),r.createElement("span",{className:m,style:a},r.createElement("span",{className:S}))}ye.propTypes={classes:n.object.isRequired,in:n.bool,onExited:n.func,pulsate:n.bool,rippleSize:n.number,rippleX:n.number,rippleY:n.number,timeout:n.number.isRequired};var se=550,tt=80,nt=function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(se,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(se,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}},ge=r.forwardRef(function(e,s){var N=e.center,P=N===void 0?!1:N,y=e.classes,g=e.className,L=be(e,["center","classes","className"]),d=r.useState([]),_=d[0],R=d[1],h=r.useRef(0),p=r.useRef(null);r.useEffect(function(){p.current&&(p.current(),p.current=null)},[_]);var l=r.useRef(!1),m=r.useRef(null),a=r.useRef(null),S=r.useRef(null);r.useEffect(function(){return function(){clearTimeout(m.current)}},[]);var T=r.useCallback(function(o){var u=o.pulsate,c=o.rippleX,x=o.rippleY,B=o.rippleSize,$=o.cb;R(function(F){return[].concat(Oe(F),[r.createElement(ye,{key:h.current,classes:y,timeout:se,pulsate:u,rippleX:c,rippleY:x,rippleSize:B})])}),h.current+=1,p.current=$},[y]),b=r.useCallback(function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=arguments.length>2?arguments[2]:void 0,x=u.pulsate,B=x===void 0?!1:x,$=u.center,F=$===void 0?P||u.pulsate:$,K=u.fakeElement,J=K===void 0?!1:K;if(o.type==="mousedown"&&l.current){l.current=!1;return}o.type==="touchstart"&&(l.current=!0);var E=J?null:S.current,M=E?E.getBoundingClientRect():{width:0,height:0,left:0,top:0},w,k,v;if(F||o.clientX===0&&o.clientY===0||!o.clientX&&!o.touches)w=Math.round(M.width/2),k=Math.round(M.height/2);else{var j=o.touches?o.touches[0]:o,Q=j.clientX,q=j.clientY;w=Math.round(Q-M.left),k=Math.round(q-M.top)}if(F)v=Math.sqrt((2*Math.pow(M.width,2)+Math.pow(M.height,2))/3),v%2===0&&(v+=1);else{var Z=Math.max(Math.abs((E?E.clientWidth:0)-w),w)*2+2,U=Math.max(Math.abs((E?E.clientHeight:0)-k),k)*2+2;v=Math.sqrt(Math.pow(Z,2)+Math.pow(U,2))}o.touches?a.current===null&&(a.current=function(){T({pulsate:B,rippleX:w,rippleY:k,rippleSize:v,cb:c})},m.current=setTimeout(function(){a.current&&(a.current(),a.current=null)},tt)):T({pulsate:B,rippleX:w,rippleY:k,rippleSize:v,cb:c})},[P,T]),C=r.useCallback(function(){b({},{pulsate:!0})},[b]),I=r.useCallback(function(o,u){if(clearTimeout(m.current),o.type==="touchend"&&a.current){o.persist(),a.current(),a.current=null,m.current=setTimeout(function(){I(o,u)});return}a.current=null,R(function(c){return c.length>0?c.slice(1):c}),p.current=u},[]);return r.useImperativeHandle(s,function(){return{pulsate:C,start:b,stop:I}},[C,b,I]),r.createElement("span",ae({className:W(y.root,g),ref:S},L),r.createElement(Ae,{component:null,exit:!0},_))});ge.propTypes={center:n.bool,classes:n.object.isRequired,className:n.string};const rt=ve(nt,{flip:!1,name:"MuiTouchRipple"})(r.memo(ge));var it={root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},Re=r.forwardRef(function(e,s){var N=e.action,P=e.buttonRef,y=e.centerRipple,g=y===void 0?!1:y,L=e.children,d=e.classes,_=e.className,R=e.component,h=R===void 0?"button":R,p=e.disabled,l=p===void 0?!1:p,m=e.disableRipple,a=m===void 0?!1:m,S=e.disableTouchRipple,T=S===void 0?!1:S,b=e.focusRipple,C=b===void 0?!1:b,I=e.focusVisibleClassName,o=e.onBlur,u=e.onClick,c=e.onFocus,x=e.onFocusVisible,B=e.onKeyDown,$=e.onKeyUp,F=e.onMouseDown,K=e.onMouseLeave,J=e.onMouseUp,E=e.onTouchEnd,M=e.onTouchMove,w=e.onTouchStart,k=e.onDragLeave,v=e.tabIndex,j=v===void 0?0:v,Q=e.TouchRippleProps,q=e.type,Z=q===void 0?"button":q,U=be(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),X=r.useRef(null);function Te(){return me.findDOMNode(X.current)}var f=r.useRef(null),le=r.useState(!1),D=le[0],H=le[1];l&&D&&H(!1);var ee=Ze(),Ee=ee.isFocusVisible,Me=ee.onBlurVisible,we=ee.ref;r.useImperativeHandle(N,function(){return{focusVisible:function(){H(!0),X.current.focus()}}},[]),r.useEffect(function(){D&&C&&!a&&f.current.pulsate()},[a,C,D]);function V(t,Y){var Xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:T;return A(function(fe){Y&&Y(fe);var ze=Xe;return!ze&&f.current&&f.current[t](fe),!0})}var ke=V("start",F),De=V("stop",k),Ve=V("stop",J),Ne=V("stop",function(t){D&&t.preventDefault(),K&&K(t)}),Se=V("start",w),Ce=V("stop",E),xe=V("stop",M),Be=V("stop",function(t){D&&(Me(t),H(!1)),o&&o(t)},!1),$e=A(function(t){X.current||(X.current=t.currentTarget),Ee(t)&&(H(!0),x&&x(t)),c&&c(t)}),te=function(){var Y=Te();return h&&h!=="button"&&!(Y.tagName==="A"&&Y.href)},ne=r.useRef(!1),Pe=A(function(t){C&&!ne.current&&D&&f.current&&t.key===" "&&(ne.current=!0,t.persist(),f.current.stop(t,function(){f.current.start(t)})),t.target===t.currentTarget&&te()&&t.key===" "&&t.preventDefault(),B&&B(t),t.target===t.currentTarget&&te()&&t.key==="Enter"&&!l&&(t.preventDefault(),u&&u(t))}),Le=A(function(t){C&&t.key===" "&&f.current&&D&&!t.defaultPrevented&&(ne.current=!1,t.persist(),f.current.stop(t,function(){f.current.pulsate(t)})),$&&$(t),u&&t.target===t.currentTarget&&te()&&t.key===" "&&!t.defaultPrevented&&u(t)}),z=h;z==="button"&&U.href&&(z="a");var O={};z==="button"?(O.type=Z,O.disabled=l):((z!=="a"||!U.href)&&(O.role="button"),O["aria-disabled"]=l);var _e=ie(P,s),Fe=ie(we,X),Ie=ie(_e,Fe),ce=r.useState(!1),Ke=ce[0],Ue=ce[1];r.useEffect(function(){Ue(!0)},[]);var re=Ke&&!a&&!l;return r.useEffect(function(){re&&!f.current&&console.error(["Material-UI: The `component` prop provided to ButtonBase is invalid.","Please make sure the children prop is rendered in this custom component."].join(`
`))},[re]),r.createElement(z,ae({className:W(d.root,_,D&&[d.focusVisible,I],l&&d.disabled),onBlur:Be,onClick:u,onFocus:$e,onKeyDown:Pe,onKeyUp:Le,onMouseDown:ke,onMouseLeave:Ne,onMouseUp:Ve,onDragLeave:De,onTouchEnd:Ce,onTouchMove:xe,onTouchStart:Se,ref:Ie,tabIndex:l?-1:j},O,U),L,re?r.createElement(rt,ae({ref:f,center:g},Q)):null)});Re.propTypes={action:pe,buttonRef:Ye(pe,"Use `ref` instead."),centerRipple:n.bool,children:n.node,classes:n.object,className:n.string,component:je,disabled:n.bool,disableRipple:n.bool,disableTouchRipple:n.bool,focusRipple:n.bool,focusVisibleClassName:n.string,href:n.string,onBlur:n.func,onClick:n.func,onDragLeave:n.func,onFocus:n.func,onFocusVisible:n.func,onKeyDown:n.func,onKeyUp:n.func,onMouseDown:n.func,onMouseLeave:n.func,onMouseUp:n.func,onTouchEnd:n.func,onTouchMove:n.func,onTouchStart:n.func,tabIndex:n.oneOfType([n.number,n.string]),TouchRippleProps:n.object,type:n.oneOfType([n.oneOf(["button","reset","submit"]),n.string])};const pt=ve(it,{name:"MuiButtonBase"})(Re);export{pt as B,Ze as u};