PageSourceSearch

https://ocdevel.com/assets/Popover-BpKyjzDj.js

js ocdevel.com collected 2026-10-02 02:54:36 UTC 6,690 bytes, 1 lines download raw bytes

1import{K as e,Z as t}from"./components-CGixsG0W.js";import{t as n}from"./jsx-runtime-BHHUrIdi.js";import{h as r,t as i}from"./DefaultPropsProvider-CPqIoXPn.js";import{g as a,h as o,n as s,o as c,p as l,r as u,s as d,u as f}from"./utils-CDJIHelb.js";import{n as p,t as m}from"./Paper-DcVnOgLn.js";import{B as h,D as g,M as _,O as v,V as y,w as b}from"./analytics-Ds4yheQb.js";import{l as x,r as S}from"./ButtonBase-BJkNbra3.js";import{r as C}from"./setRef-CXizuHvn.js";import{t as w}from"./mergeSlotProps-DLjrZ1uQ.js";function T(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)}return r.clear=()=>{clearTimeout(n)},r}var E=t(e(),1),D=n(),O=C,k=T,A=h;function j(e){return`scale(${e}, ${e**2})`}var M={entering:{opacity:1,transform:j(1)},entered:{opacity:1,transform:`none`},exiting:{opacity:0,transform:j(.75)},exited:{opacity:0,transform:j(.75)}},N={opacity:0,transform:j(.75),visibility:`hidden`},P=E.forwardRef(function(e,t){let{addEndListener:n,appear:r=!0,children:i,disablePrefersReducedMotion:a=!1,easing:o,in:l,onEnter:f,onEntered:m,onEntering:h,onExit:_,onExited:y,onExiting:b,style:C,timeout:w=`auto`,...T}=e,O=E.useRef(null),k=p(),A=S(k.motion.reducedMotion,a),P=E.useRef(null),F=x(P,v(i),t),I=c(P,h),L=c(P,(e,t)=>{A.shouldReduceMotion||d(e);let{duration:n,delay:r,easing:i}=u({style:C,timeout:w,easing:o},{mode:`enter`}),a;w===`auto`&&!A.shouldReduceMotion?(a=k.transitions.getAutoHeightDuration(e.clientHeight),O.current=a):(a=n,O.current=null);let s=A.getTransitionTiming({duration:a,delay:r});e.style.transition=[k.transitions.create(`opacity`,{duration:s.duration,delay:s.delay}),k.transitions.create(`transform`,{duration:typeof s.duration==`string`?s.duration:s.duration*.666,delay:s.delay,easing:i})].join(`,`),f&&f(e,t)}),R=c(P,m),z=c(P,b),B=c(P,e=>{let{duration:t,delay:n,easing:r}=u({style:C,timeout:w,easing:o},{mode:`exit`}),i;w===`auto`&&!A.shouldReduceMotion?(i=k.transitions.getAutoHeightDuration(e.clientHeight),O.current=i):(i=t,O.current=null);let a=A.getTransitionTiming({duration:i,delay:n});e.style.transition=[k.transitions.create(`opacity`,{duration:a.duration,delay:a.delay}),k.transitions.create(`transform`,{duration:typeof a.duration==`string`?a.duration:a.duration*.666,delay:a.delay||(typeof a.duration==`string`?a.duration:a.duration*.333),easing:r})].join(`,`),e.style.opacity=0,e.style.transform=j(.75),_&&_(e)}),V=c(P,e=>{e.style.transition=``,y&&y(e)});return(0,D.jsx)(g,{appear:r,in:l,nodeRef:P,onEnter:L,onEntered:R,onEntering:I,onExit:B,onExited:V,onExiting:z,addEndListener:n?e=>{n(P.current,e)}:void 0,getAutoTimeout:w===`auto`?()=>O.current:void 0,reduceMotion:A.shouldReduceMotion,timeout:w===`auto`?null:w,...T,children:(e,{ownerState:t,...n})=>{let r=s(e,l,M,N,C,i.props.style);return E.cloneElement(i,{style:r,ref:F,...n})}})});P&&(P.muiSupportAuto=!0);function F(e){return a(`MuiPopover`,e)}o(`MuiPopover`,[`root`,`paper`]);function I(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.height/2:t===`bottom`&&(n=e.height),n}function L(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.width/2:t===`right`&&(n=e.width),n}function R(e){return[e.horizontal,e.vertical].map(e=>typeof e==`number`?`${e}px`:e).join(` `)}function z(e){return typeof e==`function`?e():e}var B=e=>{let{classes:t}=e;return l({root:[`root`],paper:[`paper`]},F,t)},V=f(b,{name:`MuiPopover`,slot:`Root`})({}),H=f(m,{name:`MuiPopover`,slot:`Paper`})({position:`absolute`,overflowY:`auto`,overflowX:`hidden`,minWidth:16,minHeight:16,maxWidth:`calc(100% - 32px)`,maxHeight:`calc(100% - 32px)`,outline:0}),U=E.forwardRef(function(e,t){let n=i({props:e,name:`MuiPopover`}),{action:a,anchorEl:o,anchorOrigin:s={vertical:`top`,horizontal:`left`},anchorPosition:c,anchorReference:l=`anchorEl`,children:u,className:d,container:f,disableAutoFocus:p=!1,elevation:m=8,marginThreshold:h=16,open:g,slots:v={},slotProps:b={},transformOrigin:x={vertical:`top`,horizontal:`left`},transitionDuration:S=`auto`,disableScrollLock:C=!1,...T}=n,j=E.useRef(),M={...n,anchorOrigin:s,anchorReference:l,elevation:m,marginThreshold:h,transformOrigin:x,transitionDuration:S},N=B(M),F=E.useCallback(()=>
vendor: 2,536 bytes, line 1
1{if(l===`anchorPosition`)return c;let e=z(o),t=(e&&e.nodeType===1?e:O(j.current).body).getBoundingClientRect();return{top:t.top+I(t,s.vertical),left:t.left+L(t,s.horizontal)}},[o,s.horizontal,s.vertical,c,l]),U=E.useCallback(e=>({vertical:I(e,x.vertical),horizontal:L(e,x.horizontal)}),[x.horizontal,x.vertical]),W=E.useCallback(e=>{let t={width:e.offsetWidth,height:e.offsetHeight},n=U(t);if(l===`none`)return{top:null,left:null,transformOrigin:R(n)};let r=F(),i=r.top-n.vertical,a=r.left-n.horizontal,s=i+t.height,c=a+t.width,u=A(z(o)),d=u.innerHeight-h,f=u.innerWidth-h;if(h!=null&&i<h){let e=i-h;i-=e,n.vertical+=e}else if(h!=null&&s>d){let e=s-d;i-=e,n.vertical+=e}if(h!=null&&a<h){let e=a-h;a-=e,n.horizontal+=e}else if(c>f){let e=c-f;a-=e,n.horizontal+=e}return{top:`${Math.round(i)}px`,left:`${Math.round(a)}px`,transformOrigin:R(n)}},[o,l,F,U,h]),[G,K]=E.useState(g),q=E.useCallback(()=>{let e=j.current;if(!e)return;let t=W(e);t.top!=null&&e.style.setProperty(`top`,t.top),t.left!=null&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,K(!0)},[W]);E.useEffect(()=>(C&&window.addEventListener(`scroll`,q),()=>window.removeEventListener(`scroll`,q)),[o,C,q]);let J=()=>{q()},Y=()=>{K(!1)};E.useEffect(()=>{g&&q()}),E.useImperativeHandle(a,()=>g?{updatePosition:()=>{q()}}:null,[g,q]),E.useEffect(()=>{if(!g)return;let e=k(()=>{q()}),t=A(z(o));return t.addEventListener(`resize`,e),()=>{e.clear(),t.removeEventListener(`resize`,e)}},[o,g,q]);let X=S,Z={slots:v,slotProps:b},[Q,ee]=_(`transition`,{elementType:P,externalForwardedProps:Z,ownerState:M,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),J()},onExited:t=>{e.onExited?.(t),Y()}}),additionalProps:{appear:!0,in:g}});S===`auto`&&!Q.muiSupportAuto&&(X=void 0);let te=f||(o?O(z(o)).body:void 0),[$,{slots:ne,slotProps:re,...ie}]=_(`root`,{ref:t,elementType:V,externalForwardedProps:{...Z,...T},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:v.backdrop},slotProps:{backdrop:w(typeof b.backdrop==`function`?b.backdrop(M):b.backdrop,{invisible:!0})},container:te,open:g},ownerState:M,className:r(N.root,d)}),[ae,oe]=_(`paper`,{ref:j,className:N.paper,elementType:H,externalForwardedProps:Z,shouldForwardComponentProp:!0,additionalProps:{elevation:m,style:G?void 0:{opacity:0}},ownerState:M});return(0,D.jsx)($,{...ie,...!y($)&&{slots:ne,slotProps:re,disableAutoFocus:p,disableScrollLock:C},children:(0,D.jsx)(Q,{...ee,timeout:X,children:(0,D.jsx)(ae,{...oe,children:u})})})});export{k as a,A as i,H as n,O as o,P as r,T as s,U as t};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.