1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[7167],{97649:(e,t,r)=>{r.d(t,{Ay:()=>S,kD:()=>f,Sj:()=>i,zc:()=>m});var a=r(55462),n=r(44545),o=r(69275),l=r(19115),c=r(71815);const s=function(e){const{isLocal:t}=(0,c.ag)(),[r]=(0,a.useState)(`IframedContent__${e.id}`),[l,s]=(0,a.useState)(),{contentUrl:u,fullScreenPageDisplay:d=p.fullScreenPageDisplay,modalDisplay:S=p.modalDisplay}=e;let y=(0,a.useRef)();const[L,D]=(0,a.useState)(!1),[h,g]=(0,a.useState)();return(0,a.useEffect)(()=>{f({iframeSrc:l,iframeRef:y,iframeContentLoaded:L},{setIframeNoScriptMarkup:g})},[y.current,L]),(0,a.useEffect)(()=>{m({contentUrl:u,isLocal:t},{setIframeSrc:s})},[]),a.createElement("div",{ref:y,className:n("IframedContent",{"IframedContent--fullScreenDisplay":d,"IframedContent--modalDisplay":S})},l&&a.createElement(a.Fragment,null,d&&a.createElement(o.A,{log:!0,onLoad:i({setIframeContentLoaded:D}),heightCalculationMethod:"max",src:l,autoResize:!1,frameBorder:"0",title:u,scrolling:!0}),!d&&a.createElement("iframe",{onLoad:i({setIframeContentLoaded:D}),id:r,title:u,src:u,frameBorder:"0"}),h&&a.createElement("noscript",null,h)))},i=(e,t)=>t=>{e.setIframeContentLoaded(!0)},f=(e,t)=>{const{iframeSrc:r,iframeRef:a,iframeContentLoaded:n}=e||{},{setIframeNoScriptMarkup:o}=t||{};if(!a.current&&!n)return;let l=a.current.querySelector("iframe");try{let e=l.contentDocument||l.contentWindow.document;if(e){o(e.querySelector("body").innerHTML),e.querySelector("body").addEventListener("click",function(e){let t=u(e.target);null!==t&&(e.preventDefault(),window.location.href=t.href)})}}catch(c){console.error(`cross-frame-access is not allowed for ${r}`)}},u=function(e){for(;null!==e;){if(e.tagName&&"A"===e.tagName.toUpperCase())return e;e=e.parentNode}return null},m=function(e,t){const{contentUrl:r,isLocal:a}=e||{},{setIframeSrc:n}=t||{};if(r){if(a&&-1!==r.indexOf("https://qa1.ulta.com/innovation")){const e=new URL("https://local.ulta.com:8080/iframe-proxy");return e.searchParams.set("source","iframe"),e.searchParams.set("url",r),void n(e.toString())}try{-1!==r.split("//")[1].split("/")[0].indexOf("ulta.com")?n(`${r}`):n(r)}catch(o){console.error("the iframe source is invalid. Please make sure that the url has the full protocol")}}},d={contentUrl:l.string,fullScreenPagedisplay:l.bool,modalDisplay:l.bool},p={fullScreenPageDisplay:!1,modalDisplay:!1};s.propTypes=d,s.defaultProps=p;const S=s},85377:(e,t,r)=>{r.r(t),r.d(t,{default:()=>a});const a=r(97649).Ay}}]); 2//# sourceMappingURL=ulta-modules-IframedContent-IframedContent-js.c2e93afc.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.