1"use strict";(globalThis.__LOADABLE_LOADED_CHUNKS__||=[]).push([[2804],{44073(e,t,i){i.r(t),i.d(t,{default:()=>h});var s=i(76998),l=i(49113),n=i(69329),r=i(85609),c=i(1323),o=i(10011),a=i(13978);const u="IframeModule_iframe__JCvXg";var d=i(23446);function h(e){let{module:{"@type":t,title:i,titleSize:h,appendUserDataToUrl:m,appendIncomingQueryParametersToUrl:p,path:f,url:g,vendor:x,text:w,elementId:S,visualStyle:F,showMaximiseScreenOption:v,id:_,height:b},testId:I}=e;const{search:z}=(0,l.zy)(),W=(0,s.useRef)(null);return(0,s.useEffect)(()=>{const{loggedIn:e,email:t}=a.A.getShortAccountDetails();let i=g;m&&("GLISSER"===x||"GLISSER_LIVE"===x)&&e?i=(0,o.bC)(i,t):z&&p&&(i=(0,o.zI)(i,f,z)),W.current&&W.current.setAttribute("src",i)},[m,p,f,z,g,x]),(0,d.jsx)(r.x,{type:t,theme:F,elementId:S,testId:I,children:(0,d.jsx)("div",{className:"container",children:(0,d.jsxs)("div",{className:"row middle-md",children:[(0,d.jsx)("div",{className:"col-xs-12",children:(0,d.jsx)(n.u_,{title:i,titleSize:h,text:w,lineAfterHeading:!0})}),(0,d.jsx)("div",{className:"col-xs-12",children:(0,d.jsx)(c.A,{enabled:v,children:(0,d.jsx)("iframe",{className:u,ref:W,id:_,title:`iframe-${_}`,width:"100%",height:b})})})]})})})}h.defaultProps={testId:"hub-iframe-module"}},1323(e,t,i){i.d(t,{A:()=>a});var s=i(76998),l=i(34156),n=i.n(l),r=i(68985),c=i(23236),o=i(23446);class a extends s.Component{constructor(){super(...arguments),this.state={fullSizedWindow:!1,iframeInitialWidth:null,iframeInitialHeight:null},this.componentRef=s.createRef(),this.bodyWrapperRef=s.createRef(),this.toggleFullscreenHandler=()=>{this.isFullscreen()||this.state.fullSizedWindow?this.exitFullscreen():this.enterFullscreen()},this.closeActionHandler=()=>{this.isFullscreen()&&this.exitFullscreen(),this.state.fullSizedWindow&&this.exitFullSizeWindow(),(0,c.Tn)(this.props.onCloseHandler)&&this.props.onCloseHandler()},this.onFullscreenToggle=()=>{this.setFullscreenIframe()}}componentDidMount(){r.Fr&&this.props.popupLayout&&(this.enterFullscreen(),this.scrollModalToTop()),document.addEventListener("fullscreenchange",this.onFullscreenToggle),document.addEventListener("mozfullscreenchange",this.onFullscreenToggle),document.addEventListener("webkitfullscreenchange",this.onFullscreenToggle),document.addEventListener("msfullscreenchange",this.onFullscreenToggle)}componentWillUnmount(){document.removeEventListener("fullscreenchange",this.onFullscreenToggle),document.removeEventListener("mozfullscreenchange",this.onFullscreenToggle),document.removeEventListener("webkitfullscreenchange",this.onFullscreenToggle),document.removeEventListener("msfullscreenchange",this.onFullscreenToggle)}scrollModalToTop(){const e=document.querySelector(".c-modal");e&&e.scrollTo(0,0)}setFullSizeIframe(){const e=this.bodyWrapperRef.current.querySelector("iframe");e&&e.setAttribute("height",(window.innerHeight-36).toString())}setFullscreenIframe(){const e=this.bodyWrapperRef.current?this.bodyWrapperRef.current.querySelector("iframe"):null;if(e)if(this.isFullscreen()){this.setState(()=>({iframeInitialWidth:e.getAttribute("width"),iframeInitialHeight:e.getAttribute("height")}));const t=window.screen.width,i=window.screen.height-36;e.setAttribute("width",t.toString()),e.setAttribute("height",i.toString())}else{const{iframeInitialWidth:t,iframeInitialHeight:i}=this.state;e.setAttribute("width",t),e.setAttribute("height",i)}}enterFullSizeWindow(){(0,c.SS)(),this.setFullSizeIframe(),this.setState({fullSizedWindow:!0})}exitFullSizeWindow(){(0,c.fk)(),this.setState({fullSizedWindow:!1})}enterFullscreen(){!1===(0,c.lh)(this.componentRef.current)&&this.enterFullSizeWindow()}exitFullscreen(){!1===(0,c.Eh)()&&this.exitFullSizeWindow()}isFullscreen(){return document.fullscreenElement||document.webkitCurrentFullScreenElement}render(){const{enabled:e=!1,popupLayout:t,children:i}=this.props;if(!e)return i;const s=n()({"c-maximise-screen-wrapper":!0,"c-maximise-screen-wrapper--popup":t,"c-maximise-screen-wrapper--full-size":this.state.fullSizedWindow});return(0,o.jsxs)("div",{ref:this.componentRef,className:s,children:[(0,o.jsx)("div",{className:"c-maximise-screen-wrapper__toolbar c-maximise-screen-wrapper__toolbar--top",children:(0,o.jsxs)("div",{className:"c-maximise-screen-wrapper__toolbar-right",children:[(0,o.jsx)("span",{title:"Enter Full Screen",className:"material-icons c-maximise-screen-wrapper__enter-fullscreen",onClick:this.toggleFullscreenHandler,children:"fullscreen"}),(0,o.jsx)("span",{title:"Exit Full Screen",className:"material-icons c-maximise-screen-wrapper__exit-fullscreen",onClick:this.toggleFullscreenHandler,children:"fullscreen_exit"}),(0,o.jsx)("span",{title:"Close",className:"material-icons c-maximise-screen-wrapper__close",onClick:this.closeActionHandler,children:"close"})]})}),(0,o.jsx)("div",{ref:this.bodyWrapperRef,className:"c-maximise-screen-wrapper__body",children:i})]})}}}}]); 2//# sourceMappingURL=HubIframeModule.93d54853.chunk.js.map
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.