const DEFAULT_DURATION_MS=0xfa;function prefersReducedMotion(){try{return window['matchMedia']&&window['matchMedia']('(prefers-reduced-motion:\x20reduce)')['matches'];}catch{return![];}}function safeCancelAnimations(_0x56eae5){if(!_0x56eae5||typeof _0x56eae5['getAnimations']!=='function')return;try{_0x56eae5['getAnimations']()['forEach'](_0x2416ce=>_0x2416ce['cancel']());}catch{}}function animateRestoreFlip({contentEl:_0x112271,fromRect:_0x3e9749,toRect:_0x31b394,durationMs:_0x4bb7f4}){if(!_0x112271)return;if(!_0x3e9749||!_0x31b394)return;if(prefersReducedMotion())return;const _0x241ae2=_0x31b394['width']||0x0,_0x181b27=_0x31b394['height']||0x0,_0x80bcc4=_0x3e9749['width']||0x0,_0x38213c=_0x3e9749['height']||0x0;if(_0x241ae2<=0x0||_0x181b27<=0x0||_0x80bcc4<=0x0||_0x38213c<=0x0)return;const _0xff356=_0x3e9749['left']-_0x31b394['left'],_0x31ca30=_0x3e9749['top']-_0x31b394['top'],_0x275673=_0x80bcc4/_0x241ae2,_0x3511e4=_0x38213c/_0x181b27;if(!Number['isFinite'](_0xff356)||!Number['isFinite'](_0x31ca30)||!Number['isFinite'](_0x275673)||!Number['isFinite'](_0x3511e4))return;safeCancelAnimations(_0x112271);const _0x502dd5=_0x112271['style']['transition'],_0x7c4d71=_0x112271['style']['transformOrigin'],_0x1f1bed=_0x112271['style']['willChange'];_0x112271['style']['transition']='none',_0x112271['style']['transformOrigin']='top\x20left',_0x112271['style']['willChange']='transform';const _0x241dbe='translate('+_0xff356+'px,\x20'+_0x31ca30+'px)\x20scale('+_0x275673+',\x20'+_0x3511e4+')',_0x5dfc26=_0x112271['animate']([{'transform':_0x241dbe},{'transform':'none'}],{'duration':_0x4bb7f4,'easing':'ease','fill':'both'}),_0x21d93d=()=>{_0x112271['style']['transition']=_0x502dd5,_0x112271['style']['transformOrigin']=_0x7c4d71,_0x112271['style']['willChange']=_0x1f1bed;};_0x5dfc26['addEventListener']('finish',_0x21d93d,{'once':!![]}),_0x5dfc26['addEventListener']('cancel',_0x21d93d,{'once':!![]});}export function toggleModalMaximize(_0x17a90e,_0x43d4a7={}){if(!_0x17a90e)return;const {storageKey:_0x5b1a25,updateIcon:_0x76be86,onAfterToggle:_0x1c9ddc,durationMs:durationMs=DEFAULT_DURATION_MS}=_0x43d4a7,_0xdaf075=_0x17a90e['querySelector']('.modal-content'),_0x141379=_0x17a90e['classList']['contains']('maximized'),_0x1df70c=!_0x141379;if(!_0xdaf075){_0x17a90e['classList']['toggle']('maximized'),_0x76be86?.(_0x1df70c),_0x1c9ddc?.(_0x1df70c);if(_0x5b1a25)try{localStorage['setItem'](_0x5b1a25,String(_0x1df70c));}catch{}return;}if(_0x141379&&!prefersReducedMotion()){const _0x21566e=_0xdaf075['getBoundingClientRect']();_0x17a90e['classList']['remove']('maximized');const _0x4ddc3c=_0xdaf075['getBoundingClientRect']();animateRestoreFlip({'contentEl':_0xdaf075,'fromRect':_0x21566e,'toRect':_0x4ddc3c,'durationMs':durationMs});}else _0x17a90e['classList']['toggle']('maximized');_0x76be86?.(_0x1df70c),_0x1c9ddc?.(_0x1df70c);if(_0x5b1a25)try{localStorage['setItem'](_0x5b1a25,String(_0x1df70c));}catch{}}