const DEFAULT_DURATION_MS=0xfa;function prefersReducedMotion(){try{return window['matchMedia']&&window['matchMedia']('(prefers-reduced-motion:\x20reduce)')['matches'];}catch{return![];}}function safeCancelAnimations(_0x1ebda7){if(!_0x1ebda7||typeof _0x1ebda7['getAnimations']!=='function')return;try{_0x1ebda7['getAnimations']()['forEach'](_0x4e5219=>_0x4e5219['cancel']());}catch{}}function animateRestoreFlip({contentEl:_0x4a49aa,fromRect:_0xd3904,toRect:_0x246074,durationMs:_0x5bf9c6}){if(!_0x4a49aa)return;if(!_0xd3904||!_0x246074)return;if(prefersReducedMotion())return;const _0x48a36f=_0x246074['width']||0x0,_0x16b2d4=_0x246074['height']||0x0,_0x20286c=_0xd3904['width']||0x0,_0x372ccc=_0xd3904['height']||0x0;if(_0x48a36f<=0x0||_0x16b2d4<=0x0||_0x20286c<=0x0||_0x372ccc<=0x0)return;const _0x26945d=_0xd3904['left']-_0x246074['left'],_0x390af9=_0xd3904['top']-_0x246074['top'],_0x2e8754=_0x20286c/_0x48a36f,_0x5990ce=_0x372ccc/_0x16b2d4;if(!Number['isFinite'](_0x26945d)||!Number['isFinite'](_0x390af9)||!Number['isFinite'](_0x2e8754)||!Number['isFinite'](_0x5990ce))return;safeCancelAnimations(_0x4a49aa);const _0x494f3a=_0x4a49aa['style']['transition'],_0x967b2=_0x4a49aa['style']['transformOrigin'],_0x311ba7=_0x4a49aa['style']['willChange'];_0x4a49aa['style']['transition']='none',_0x4a49aa['style']['transformOrigin']='top\x20left',_0x4a49aa['style']['willChange']='transform';const _0x2c43ef='translate('+_0x26945d+'px,\x20'+_0x390af9+'px)\x20scale('+_0x2e8754+',\x20'+_0x5990ce+')',_0x2f8985=_0x4a49aa['animate']([{'transform':_0x2c43ef},{'transform':'none'}],{'duration':_0x5bf9c6,'easing':'ease','fill':'both'}),_0x4475a9=()=>{_0x4a49aa['style']['transition']=_0x494f3a,_0x4a49aa['style']['transformOrigin']=_0x967b2,_0x4a49aa['style']['willChange']=_0x311ba7;};_0x2f8985['addEventListener']('finish',_0x4475a9,{'once':!![]}),_0x2f8985['addEventListener']('cancel',_0x4475a9,{'once':!![]});}export function toggleModalMaximize(_0x4c8121,_0x32c1ff={}){if(!_0x4c8121)return;const {storageKey:_0x57ba8d,updateIcon:_0x42592a,onAfterToggle:_0x1fb9bb,durationMs:durationMs=DEFAULT_DURATION_MS}=_0x32c1ff,_0x406c86=_0x4c8121['querySelector']('.modal-content'),_0x142d37=_0x4c8121['classList']['contains']('maximized'),_0x305872=!_0x142d37;if(!_0x406c86){_0x4c8121['classList']['toggle']('maximized'),_0x42592a?.(_0x305872),_0x1fb9bb?.(_0x305872);if(_0x57ba8d)try{localStorage['setItem'](_0x57ba8d,String(_0x305872));}catch{}return;}if(_0x142d37&&!prefersReducedMotion()){const _0x1992f5=_0x406c86['getBoundingClientRect']();_0x4c8121['classList']['remove']('maximized');const _0x11d925=_0x406c86['getBoundingClientRect']();animateRestoreFlip({'contentEl':_0x406c86,'fromRect':_0x1992f5,'toRect':_0x11d925,'durationMs':durationMs});}else _0x4c8121['classList']['toggle']('maximized');_0x42592a?.(_0x305872),_0x1fb9bb?.(_0x305872);if(_0x57ba8d)try{localStorage['setItem'](_0x57ba8d,String(_0x305872));}catch{}}