const DEFAULT_DURATION_MS=0xfa;function prefersReducedMotion(){try{return window['matchMedia']&&window['matchMedia']('(prefers-reduced-motion:\x20reduce)')['matches'];}catch{return![];}}function safeCancelAnimations(_0x3cdeb0){if(!_0x3cdeb0||typeof _0x3cdeb0['getAnimations']!=='function')return;try{_0x3cdeb0['getAnimations']()['forEach'](_0x531174=>_0x531174['cancel']());}catch{}}function animateRestoreFlip({contentEl:_0x145499,fromRect:_0x46d9e0,toRect:_0x4c40de,durationMs:_0x39dc4d}){if(!_0x145499)return;if(!_0x46d9e0||!_0x4c40de)return;if(prefersReducedMotion())return;const _0x36cb61=_0x4c40de['width']||0x0,_0x396099=_0x4c40de['height']||0x0,_0x5a62e3=_0x46d9e0['width']||0x0,_0x3865aa=_0x46d9e0['height']||0x0;if(_0x36cb61<=0x0||_0x396099<=0x0||_0x5a62e3<=0x0||_0x3865aa<=0x0)return;const _0x210622=_0x46d9e0['left']-_0x4c40de['left'],_0x2a96e8=_0x46d9e0['top']-_0x4c40de['top'],_0x243994=_0x5a62e3/_0x36cb61,_0x483b92=_0x3865aa/_0x396099;if(!Number['isFinite'](_0x210622)||!Number['isFinite'](_0x2a96e8)||!Number['isFinite'](_0x243994)||!Number['isFinite'](_0x483b92))return;safeCancelAnimations(_0x145499);const _0x12c91d=_0x145499['style']['transition'],_0x34b620=_0x145499['style']['transformOrigin'],_0x4fe53c=_0x145499['style']['willChange'];_0x145499['style']['transition']='none',_0x145499['style']['transformOrigin']='top\x20left',_0x145499['style']['willChange']='transform';const _0x5a1009='translate('+_0x210622+'px,\x20'+_0x2a96e8+'px)\x20scale('+_0x243994+',\x20'+_0x483b92+')',_0x254eca=_0x145499['animate']([{'transform':_0x5a1009},{'transform':'none'}],{'duration':_0x39dc4d,'easing':'ease','fill':'both'}),_0x273cda=()=>{_0x145499['style']['transition']=_0x12c91d,_0x145499['style']['transformOrigin']=_0x34b620,_0x145499['style']['willChange']=_0x4fe53c;};_0x254eca['addEventListener']('finish',_0x273cda,{'once':!![]}),_0x254eca['addEventListener']('cancel',_0x273cda,{'once':!![]});}export function toggleModalMaximize(_0xa53ceb,_0x59f0df={}){if(!_0xa53ceb)return;const {storageKey:_0x3a9542,updateIcon:_0x16b12d,onAfterToggle:_0x4bf02c,durationMs:durationMs=DEFAULT_DURATION_MS}=_0x59f0df,_0x66a056=_0xa53ceb['querySelector']('.modal-content'),_0x25bfbb=_0xa53ceb['classList']['contains']('maximized'),_0x5a6b7f=!_0x25bfbb;if(!_0x66a056){_0xa53ceb['classList']['toggle']('maximized'),_0x16b12d?.(_0x5a6b7f),_0x4bf02c?.(_0x5a6b7f);if(_0x3a9542)try{localStorage['setItem'](_0x3a9542,String(_0x5a6b7f));}catch{}return;}if(_0x25bfbb&&!prefersReducedMotion()){const _0x16b605=_0x66a056['getBoundingClientRect']();_0xa53ceb['classList']['remove']('maximized');const _0x1a656a=_0x66a056['getBoundingClientRect']();animateRestoreFlip({'contentEl':_0x66a056,'fromRect':_0x16b605,'toRect':_0x1a656a,'durationMs':durationMs});}else _0xa53ceb['classList']['toggle']('maximized');_0x16b12d?.(_0x5a6b7f),_0x4bf02c?.(_0x5a6b7f);if(_0x3a9542)try{localStorage['setItem'](_0x3a9542,String(_0x5a6b7f));}catch{}}