const DEFAULT_DURATION_MS=0xfa;function prefersReducedMotion(){try{return window['matchMedia']&&window['matchMedia']('(prefers-reduced-motion:\x20reduce)')['matches'];}catch{return![];}}function safeCancelAnimations(_0x404599){if(!_0x404599||typeof _0x404599['getAnimations']!=='function')return;try{_0x404599['getAnimations']()['forEach'](_0x404cbb=>_0x404cbb['cancel']());}catch{}}function animateRestoreFlip({contentEl:_0x1fc103,fromRect:_0x27b234,toRect:_0xdb0c24,durationMs:_0x419121}){if(!_0x1fc103)return;if(!_0x27b234||!_0xdb0c24)return;if(prefersReducedMotion())return;const _0x1d0afc=_0xdb0c24['width']||0x0,_0x396ef5=_0xdb0c24['height']||0x0,_0x4042c3=_0x27b234['width']||0x0,_0x1343f4=_0x27b234['height']||0x0;if(_0x1d0afc<=0x0||_0x396ef5<=0x0||_0x4042c3<=0x0||_0x1343f4<=0x0)return;const _0x34fc50=_0x27b234['left']-_0xdb0c24['left'],_0x4199e9=_0x27b234['top']-_0xdb0c24['top'],_0x468d48=_0x4042c3/_0x1d0afc,_0x283d3b=_0x1343f4/_0x396ef5;if(!Number['isFinite'](_0x34fc50)||!Number['isFinite'](_0x4199e9)||!Number['isFinite'](_0x468d48)||!Number['isFinite'](_0x283d3b))return;safeCancelAnimations(_0x1fc103);const _0x484cb3=_0x1fc103['style']['transition'],_0x47f426=_0x1fc103['style']['transformOrigin'],_0x3b618e=_0x1fc103['style']['willChange'];_0x1fc103['style']['transition']='none',_0x1fc103['style']['transformOrigin']='top\x20left',_0x1fc103['style']['willChange']='transform';const _0x18f5c8='translate('+_0x34fc50+'px,\x20'+_0x4199e9+'px)\x20scale('+_0x468d48+',\x20'+_0x283d3b+')',_0x46c0e8=_0x1fc103['animate']([{'transform':_0x18f5c8},{'transform':'none'}],{'duration':_0x419121,'easing':'ease','fill':'both'}),_0x2b6cdb=()=>{_0x1fc103['style']['transition']=_0x484cb3,_0x1fc103['style']['transformOrigin']=_0x47f426,_0x1fc103['style']['willChange']=_0x3b618e;};_0x46c0e8['addEventListener']('finish',_0x2b6cdb,{'once':!![]}),_0x46c0e8['addEventListener']('cancel',_0x2b6cdb,{'once':!![]});}export function toggleModalMaximize(_0x56ef8c,_0x9e8678={}){if(!_0x56ef8c)return;const {storageKey:_0x5b7ff5,updateIcon:_0x45f4ca,onAfterToggle:_0x1fb2ac,durationMs:durationMs=DEFAULT_DURATION_MS}=_0x9e8678,_0x11e8ed=_0x56ef8c['querySelector']('.modal-content'),_0xdca050=_0x56ef8c['classList']['contains']('maximized'),_0x4f29ba=!_0xdca050;if(!_0x11e8ed){_0x56ef8c['classList']['toggle']('maximized'),_0x45f4ca?.(_0x4f29ba),_0x1fb2ac?.(_0x4f29ba);if(_0x5b7ff5)try{localStorage['setItem'](_0x5b7ff5,String(_0x4f29ba));}catch{}return;}if(_0xdca050&&!prefersReducedMotion()){const _0x4befe1=_0x11e8ed['getBoundingClientRect']();_0x56ef8c['classList']['remove']('maximized');const _0x4c345b=_0x11e8ed['getBoundingClientRect']();animateRestoreFlip({'contentEl':_0x11e8ed,'fromRect':_0x4befe1,'toRect':_0x4c345b,'durationMs':durationMs});}else _0x56ef8c['classList']['toggle']('maximized');_0x45f4ca?.(_0x4f29ba),_0x1fb2ac?.(_0x4f29ba);if(_0x5b7ff5)try{localStorage['setItem'](_0x5b7ff5,String(_0x4f29ba));}catch{}}