{"version":3,"sources":["_bpoint-payment-form.js","_card-slider.js","_form.js","_gallery.js","_header.js","_iframe-resizer.js","_image-popup.js","_image-slider.js","_privacy-policy.js","_sponsor-slider.js","_web-to-lead-forms.js"],"names":["$","document","ready","window","txnCallback","txnResponse","authKeyResponse","remove","AjaxResponseType","ApiResponseCode","ajax","ResultKey","method","success","data","done","responseCode","prepend","class","text","responseText","location","href","RedirectionUrl","fail","enableForm","i","Errors","length","Message","authKeySuccess","_cbaRequest","AuthKey","authKey","Type","type","StoreCard","storeCard","CardNumber","val","Cvn","ExpiryMonth","ExpiryYear","CardHolderName","CallbackFunction","CBA","ProcessPayment","disableForm","attr","removeAttr","slick","arrows","dots","infinite","slidesToShow","slidesToScroll","speed","responsive","breakpoint","settings","click","delay","animate","scrollTop","this","first","offset","console","log","on","gallery","SimpleLightbox","sourceAttr","overlay","spinner","nav","navText","captions","captionDelay","captionSelector","captionType","captionPosition","captionClass","captionsData","close","closeText","swipeClose","showCounter","fileExt","animationSlide","animationSpeed","preloading","enableKeyboard","loop","rel","docClose","swipeTolerance","className","widthRatio","heightRatio","scaleImageToRatio","disableRightClick","disableScroll","alertError","alertErrorMessage","additionalHtml","history","throttleInterval","doubleTapZoom","maxZoom","htmlClass","rtl","fixedClass","fadeSpeed","uniqueImages","focus","modalVideo","channel","youtube","autoplay","cc_load_policy","color","controls","disablekb","enablejsapi","end","fs","h1","iv_load_policy","listType","modestbranding","origin","playsinline","showinfo","start","wmode","theme","ratio","vimeo","api","autopause","byline","callback","height","maxheight","maxwidth","muted","player_id","portrait","title","width","xhtml","hide","toggle","children","toggleClass","removeClass","addClass","next","windowHeight","elementPosition","yPosition","top","xPositionOffset","left","css","menuCutoff","newMenuPosition","undefined","count","logEnabled","hiddenCheckEnabled","msgHeaderLen","msgId","msgIdLen","pagePosition","requestAnimationFrame","resetRequiredMethods","max","scroll","bodyScroll","documentElementScroll","timer","defaults","autoResize","bodyBackground","bodyMargin","bodyMarginV1","bodyPadding","checkOrigin","inPageLinks","enablePublicMethods","heightCalculationMethod","id","interval","maxHeight","Infinity","maxWidth","minHeight","minWidth","mouseEvents","resizeFrom","scrolling","sizeHeight","sizeWidth","warningTimeout","tolerance","widthCalculationMethod","onClose","onClosed","onInit","onMessage","warn","onMouseEnter","onMouseLeave","onResized","onScroll","frameTimer","jQuery","fn","iFrameResize","options","filter","each","index","element","setupIFrame","info","createJQueryPublicMethod","define","amd","factory","module","exports","getMutationObserver","MutationObserver","WebKitMutationObserver","MozMutationObserver","addEventListener","el","evt","func","removeEventListener","formatLogHeader","iframeId","retStr","self","parentIFrame","getId","getMyID","isLogEnabled","msg","output","enabled","iFrameListener","event","resizeIFrame","ensureInRange","syncResize","setSize","messageData","setPagePosition","getPaddingEnds","compStyle","boxSizing","paddingTop","parseInt","paddingBottom","getBorderEnds","borderTopWidth","borderBottomWidth","Dimension","Number","min","dimension","toLowerCase","size","getMsgBody","substr","indexOf","sendPageInfoToIframe","iframe","time","frameId","bodyPosition","iFramePosition","trigger","body","getBoundingClientRect","JSON","stringify","iframeHeight","iframeWidth","clientHeight","Math","documentElement","innerHeight","clientWidth","innerWidth","offsetTop","offsetLeft","pageYOffset","scrollLeft","pageXOffset","documentHeight","documentWidth","windowWidth","setTimeout","getElementPosition","target","getPagePosition","x","floor","y","scrollRequestFromChild","addOffset","newPosition","scrollTo","unsetPagePosition","onMouse","mousePos","split","screenX","screenY","funcName","chkEvent","retBool","retCode","createOutgoingMsg","iFrameReadyMsgReceived","getComputedStyle","loaded","true","false","hasSettings","remoteHost","constructor","Array","checkList","Error","isMessageFromIFrame","firstRun","closeIFrame","msgBody","message","parse","setListener","sendPageInfo","stop","forEach","stopPageInfo","startPageInfoMonitor","hash","hashData","decodeURIComponent","getElementById","getElementsByName","jumpPosition","moveToAnchor","resetIFrame","actionMsg","retVal","TypeError","removeIframeListeners","parentNode","removeChild","error","chkZero","checkIFrames","checkIFrame","settingId","chkDimension","style","isVisible","offsetParent","Object","keys","key","mutationObserved","mutations","debouce","createMutationObserver","querySelector","config","attributes","attributeOldValue","characterData","characterDataOldValue","childList","subtree","observe","fixHiddenIFrames","processDimension","setDimension","doNotSync","jasmine","calleeMsg","noResponseWarning","errorShown","contentWindow","targetOrigin","postMessage","msgTimeout","depricate","splitName","name","charAt","toUpperCase","slice","src","ensureHasId","join","checkOptions","option","prototype","hasOwnProperty","call","copyOptions","match","processOptions","overflow","setScrolling","addStyle","chkMinMax","setLimits","mutation","removedNodes","removedNode","createDestroyObserver","resetRequertMethod","iFrameResizer","bind","removeListeners","resize","anchor","sendMessage","tabVisible","visibilityState","sendTriggerMsg","eventName","isIFrameResizeEnabled","setupEventListeners","init","tagName","chkType","iFrames","push","vendors","setupRequestAnimationFrame","warnDeprecatedOptions","querySelectorAll","imgSrc","prop","imgAlt","imgCaption","append","popupOverlay","fadeIn","fadeOut","autoplaySpeed","url","html","post","modal","e","$dobSelector","$dateFieldName","$form","closest","$dobValueField","insertAfter","setDate","date","Date","formattedDate","getDate","getMonth","getFullYear","change","submit"],"mappings":"AAAAA,EAAAC,UAAAC,OAAA,WAEAC,OAAAC,YAAA,SAAAC,EAAAC,GAGA,GAFAN,EAAA,oCAAAO,SAEA,IAAAF,EAAAG,kBAAAH,EAAAI,gBAAA,IAEAT,EAAAU,KAAA,mCAAAL,EAAAM,UACA,CACAC,OAAA,MACAC,QAAA,SAAAC,GAEA,IACAC,MAAA,SAAAD,GACA,MAAAA,EAAAE,aACAhB,EAAA,2BAAAiB,QAAAjB,EAAA,WAAA,CACAkB,MAAA,qBACAC,KAAAL,EAAAM,gBAGAjB,OAAAkB,SAAAC,KAAAjB,EAAAkB,cAEA,IAAAC,MAAA,WACAxB,EAAA,2BAAAiB,QAAAjB,EAAA,WAAA,CACAkB,MAAA,qBACAC,KAAA,2BAEAhB,OAAAsB,YACA,QAEA,CACA,IAAA,IAAAC,EAAA,EAAAA,EAAArB,EAAAsB,OAAAC,OAAAF,IACA1B,EAAA,2BAAAiB,QAAAjB,EAAA,WAAA,CACAkB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AE,EAAAD,EAAAnc,KAAA,iBACA,QAAA,IAAAoc,GAAAA,EAAAtb,OAAA,EAAA,CACA,MAAAub,EAAAF,EAAAG,QAAA,QACAC,EAAArd,EAAA,UAAAkd,EAAA,WACA,IAAAG,IACAA,EAAArd,EAAA,YAAA,CAAAmC,KAAA,SAAA8J,GAAAiR,EAAA7D,KAAA6D,IACAG,EAAAC,YAAAL,IAEA,MAAAM,EAAA,WACA,MAAAC,EAAA,IAAAC,KAAAR,EAAA1a,OACAmb,EAAAF,EAAAG,UAAA,KAAAH,EAAAI,WAAA,GAAA,IAAAJ,EAAAK,cACAR,EAAA9a,IAAAmb,GACAvZ,QAAAC,IAAA6Y,EAAA1a,MAAA8a,EAAA9a,MACA,EACA0a,EAAAa,QAAA,WACAP,GACA,IACAJ,EAAAY,QAAA,WACAR,GACA,GACA,MACApZ,QAAAC,IAAA,gCAAA6Y,EAAAja,KAAA,QAEA,GAGA","file":"main.js","sourcesContent":["$(document).ready(function () {\r\n\r\n window.txnCallback = function (txnResponse, authKeyResponse) {\r\n $('.js-bpoint-payment-form > .alert').remove();\r\n\r\n if (txnResponse.AjaxResponseType === 0 && txnResponse.ApiResponseCode < 100) {\r\n\r\n $.ajax(\"/shoppingcart/bpointvalidatetxn/\" + txnResponse.ResultKey,\r\n {\r\n method: \"GET\",\r\n success: function (data) {\r\n\r\n }\r\n }).done(function (data) {\r\n if (data.responseCode !== \"0\") {\r\n $('.js-bpoint-payment-form').prepend($('', {\r\n class: 'alert alert-danger',\r\n text: data.responseText\r\n }));\r\n } else {\r\n window.location.href = txnResponse.RedirectionUrl;\r\n }\r\n }).fail(function () {\r\n $('.js-bpoint-payment-form').prepend($('', {\r\n class: 'alert alert-danger',\r\n text: 'Something went wrong.'\r\n }));\r\n window.enableForm();\r\n });\r\n\r\n } else {\r\n for (var i = 0; i < txnResponse.Errors.length; i++) {\r\n $('.js-bpoint-payment-form').prepend($('', {\r\n class: 'alert alert-danger',\r\n text: txnResponse.Errors[i].Message\r\n }));\r\n }\r\n window.enableForm();\r\n }\r\n }\r\n\r\n window.authKeySuccess = function (authKeyResponse) {\r\n var _cbaRequest = {\r\n AuthKey: authKeyResponse.authKey,\r\n Type: authKeyResponse.type,\r\n StoreCard: authKeyResponse.storeCard,\r\n\r\n // From form\r\n CardNumber: $(\"#ccnumber\").val(),\r\n Cvn: $(\"#cvv\").val(),\r\n ExpiryMonth: $(\"#ccmonth\").val(),\r\n ExpiryYear: $(\"#ccyear\").val(),\r\n CardHolderName: $(\"#name\").val(),\r\n\r\n CallbackFunction: function (txnResponse) {\r\n window.txnCallback(txnResponse, authKeyResponse);\r\n }\r\n }\r\n\r\n CBA.ProcessPayment(_cbaRequest);\r\n }\r\n\r\n window.disableForm = function () {\r\n $(\".js-bpoint-payment-form > fieldset\").attr(\"disabled\", \"disabled\");\r\n }\r\n\r\n window.enableForm = function () {\r\n $(\".js-bpoint-payment-form > fieldset\").removeAttr(\"disabled\");\r\n }\r\n\r\n});","$(document).ready(function () {\r\n $(\".card-slider\").slick({\r\n arrows: true,\r\n dots: false,\r\n infinite: true,\r\n slidesToShow: 3,\r\n slidesToScroll: 1,\r\n speed: 500,\r\n responsive: [\r\n {\r\n breakpoint: 768,\r\n settings: {\r\n slidesToShow: 1,\r\n slidesToScroll: 1\r\n }\r\n },\r\n {\r\n breakpoint: 992,\r\n settings: {\r\n slidesToShow: 2,\r\n slidesToScroll: 2\r\n }\r\n },\r\n ]\r\n });\r\n});","$(\"input[type='submit']\").click(function(){\r\n\t$('#content').delay(200).animate({\r\n\t\tscrollTop: ($(this).first('.field-validation-error').offset().top)\r\n\t});\r\n\tconsole.log(\"complete\")\r\n});","// $(\".powerpoint\").click(function(){\r\n// \tvar powerpointURL = $(this).attr(\"data-powerpoint\");\r\n\r\n// \t$(\"body\").append(\"
\" + powerpointURL + \"
\")\r\n// });\r\n\r\n$(\"body\").on(\"click\", \".js-powerpoint-close, .powerpoint-lightbox\", function () {\r\n\t$(\".powerpoint-lightbox\").remove();\r\n});\r\n\r\nvar gallery = new SimpleLightbox('.img-container a.big', {\r\n\t// default source attribute\r\n\tsourceAttr: 'href',\r\n\r\n\t// shows fullscreen overlay\r\n\toverlay: true,\r\n\r\n\t// shows loading spinner\r\n\tspinner: true,\r\n\r\n\t// shows navigation arrows\r\n\tnav: true,\r\n\r\n\t// text for navigation arrows\r\n\tnavText: ['<', '>'],\r\n\r\n\t// shows image captions\r\n\tcaptions: true,\r\n\tcaptionDelay: 0,\r\n\tcaptionSelector: 'img',\r\n\tcaptionType: 'attr',\r\n\tcaptionPosition: 'bottom',\r\n\tcaptionClass: 'text-center',\r\n\r\n\t// captions attribute (title or data-title)\r\n\tcaptionsData: 'title',\r\n\r\n\t// shows close button\r\n\tclose: true,\r\n\r\n\t// text for close button\r\n\tcloseText: 'X',\r\n\r\n\t// swipe up or down to close gallery\r\n\tswipeClose: true,\r\n\r\n\t// show counter\r\n\tshowCounter: true,\r\n\r\n\t// file extensions\r\n\tfileExt: 'png|jpg|jpeg|gif',\r\n\r\n\t// weather to slide in new photos or not, disable to fade\r\n\tanimationSlide: true,\r\n\r\n\t// animation speed in ms\r\n\tanimationSpeed: 250,\r\n\r\n\t// image preloading\r\n\tpreloading: true,\r\n\r\n\t// keyboard navigation\r\n\tenableKeyboard: true,\r\n\r\n\t// endless looping\r\n\tloop: true,\r\n\r\n\t// group images by rel attribute of link with same selector\r\n\trel: false,\r\n\r\n\t// closes the lightbox when clicking outside\r\n\tdocClose: true,\r\n\r\n\t// how much pixel you have to swipe\r\n\tswipeTolerance: 50,\r\n\r\n\t// lightbox wrapper Class\r\n\tclassName: 'simple-lightbox',\r\n\r\n\t// width / height ratios\r\n\twidthRatio: 0.8,\r\n\theightRatio: 0.9,\r\n\r\n\t// scales the image up to the defined ratio size\r\n\tscaleImageToRatio: false,\r\n\r\n\t// disable right click\r\n\tdisableRightClick: false,\r\n\r\n\t// disable page scroll\r\n\tdisableScroll: true,\r\n\r\n\t// show an alert if image was not found\r\n\talertError: true,\r\n\r\n\t// alert message\r\n\talertErrorMessage: 'Image not found, next image will be loaded',\r\n\r\n\t// additional HTML showing inside every image\r\n\tadditionalHtml: false,\r\n\r\n\t// enable history back closes lightbox instead of reloading the page\r\n\thistory: true,\r\n\r\n\t// time to wait between slides\r\n\tthrottleInterval: 0,\r\n\r\n\t// Pinch to Zoom feature for touch devices\r\n\tdoubleTapZoom: 2,\r\n\tmaxZoom: 10,\r\n\r\n\t// adds class to html element if lightbox is open\r\n\thtmlClass: 'has-lightbox',\r\n\r\n\t// RTL mode\r\n\trtl: false,\r\n\r\n\t// elements with this class are fixed and get the right padding when lightbox opens\r\n\tfixedClass: 'sl-fixed',\r\n\r\n\t// fade speed in ms\r\n\tfadeSpeed: 300,\r\n\r\n\t// whether to uniqualize images\r\n\tuniqueImages: false,\r\n\r\n\t// focus the lightbox on open to enable tab control\r\n\tfocus: true,\r\n});\r\n\r\n$(\".js-video-button\").modalVideo({\r\n\tchannel: 'youtube',\r\n\tyoutube: {\r\n\t\tautoplay: 1,\r\n\t\tcc_load_policy: 1,\r\n\t\tcolor: null,\r\n\t\tcontrols: 1,\r\n\t\tdisablekb: 0,\r\n\t\tenablejsapi: 0,\r\n\t\tend: null,\r\n\t\tfs: 1,\r\n\t\th1: null,\r\n\t\tiv_load_policy: 1,\r\n\t\tlistType: null,\r\n\t\tloop: 0,\r\n\t\tmodestbranding: null,\r\n\t\torigin: null,\r\n\t\tplaysinline: null,\r\n\t\trel: 0,\r\n\t\tshowinfo: 1,\r\n\t\tstart: 0,\r\n\t\twmode: 'transparent',\r\n\t\ttheme: 'dark'\r\n\t},\r\n\tratio: '16:9',\r\n\tvimeo: {\r\n\t\tapi: false,\r\n\t\tautopause: true,\r\n\t\tautoplay: true,\r\n\t\tbyline: true,\r\n\t\tcallback: null,\r\n\t\tcolor: null,\r\n\t\theight: null,\r\n\t\tloop: false,\r\n\t\tmaxheight: null,\r\n\t\tmaxwidth: null,\r\n\t\tmuted: false,\r\n\t\tplayer_id: null,\r\n\t\tportrait: true,\r\n\t\ttitle: true,\r\n\t\twidth: null,\r\n\t\txhtml: false\r\n\t},\r\n});","$(document).ready(function () {\r\n $(\".nav-toggle\").click(function() { \r\n $(\".search-mobile\").hide();\r\n $(\".nav-wrapper\").toggle();\r\n $(\".nav-toggle\").children().toggleClass(\"fa-times\");\r\n $(\".nav-toggle\").children().toggleClass(\"fa-bars\");\r\n $(\".search-toggle\").children().removeClass(\"fa-times\");\r\n $(\".search-toggle\").children().addClass(\"fa-search\");\r\n });\r\n\r\n $(\".search-toggle\").click(function() {\r\n $(\".nav-wrapper\").hide();\r\n $(this).children().toggleClass(\"fa-times\");\r\n $(this).children().toggleClass(\"fa-search\");\r\n $(\".nav-toggle\").children().removeClass(\"fa-times\");\r\n $(\".nav-toggle\").children().addClass(\"fa-bars\");\r\n $(\".search-mobile\").toggle();\r\n });\r\n\r\n $(\".subnav-toggle\").click(function() {\r\n $(this).next(\".subnav\").toggle();\r\n $(this).children().toggleClass(\"fa-chevron-down\");\r\n $(this).children().toggleClass(\"fa-chevron-up\");\r\n });\r\n\r\n $(\".subnav-mobile\").click(function() {\r\n $(this).next(\".nav-list\").toggle();\r\n $(this).children().toggleClass(\"fa-chevron-down\");\r\n $(this).children().toggleClass(\"fa-chevron-up\");\r\n });\r\n\r\n $(\"main, footer\").click(function() {\r\n\t\tif ($(window).width() < 1296) {\r\n\t\t\t$(\".nav-wrapper\").hide();\r\n\t\t\t$(\".search-mobile\").hide();\r\n\t\t\t$(\".nav-toggle\").children().removeClass(\"fa-times\");\r\n\t\t\t$(\".nav-toggle\").children().addClass(\"fa-bars\");\r\n\t\t\t$(\".search-toggle\").children().removeClass(\"fa-times\");\r\n\t\t\t$(\".search-toggle\").children().addClass(\"fa-search\");\r\n\t\t} \r\n });\r\n \r\n $(\"header .top-nav .nav-wrapper .main-nav > ul li .subnav ul li ul li\").on('click mouseover', function(){\r\n var windowHeight = $(window).height();\r\n var elementPosition = $(this).offset();\r\n var yPosition = elementPosition.top;\r\n var xPosition = elementPosition.left;\r\n var xPositionOffset = xPosition + $(this).width();\r\n\r\n $(this).children(\"ul\").css(\"top\", yPosition + \"px\");\r\n $(this).children(\"ul\").css(\"left\", xPositionOffset + \"px\");\r\n\r\n var menuHeight = $(this).children(\"ul\").height();\r\n var menuCutoff = windowHeight - menuHeight - yPosition;\r\n var newMenuPosition = menuCutoff + yPosition - 5;\r\n\r\n if(menuCutoff < 0) {\r\n $(this).children(\"ul\").css(\"top\", newMenuPosition + \"px\");\r\n }\r\n });\r\n});","/*\r\n\t* File: iframeResizer.js\r\n\t* Desc: Force iframes to size to content.\r\n\t* Requires: iframeResizer.contentWindow.js to be loaded into the target frame.\r\n\t* Doc: https://github.com/davidjbradshaw/iframe-resizer\r\n\t* Author: David J. Bradshaw - dave@bradshaw.net\r\n\t* Contributor: Jure Mav - jure.mav@gmail.com\r\n\t* Contributor: Reed Dadoune - reed@dadoune.com\r\n*/\r\n\r\n// eslint-disable-next-line sonarjs/cognitive-complexity, no-shadow-restricted-names\r\n;\r\n(function (undefined) {\r\n\tif (typeof window === 'undefined') return // don't run for server side render\r\n\r\n\tvar count = 0,\r\n\t\tlogEnabled = false,\r\n\t\thiddenCheckEnabled = false,\r\n\t\tmsgHeader = 'message',\r\n\t\tmsgHeaderLen = msgHeader.length,\r\n\t\tmsgId = '[iFrameSizer]', // Must match iframe msg ID\r\n\t\tmsgIdLen = msgId.length,\r\n\t\tpagePosition = null,\r\n\t\trequestAnimationFrame = window.requestAnimationFrame,\r\n\t\tresetRequiredMethods = {\r\n\t\t\tmax: 1,\r\n\t\t\tscroll: 1,\r\n\t\t\tbodyScroll: 1,\r\n\t\t\tdocumentElementScroll: 1\r\n\t\t},\r\n\t\tsettings = {},\r\n\t\ttimer = null,\r\n\t\tdefaults = {\r\n\t\t\tautoResize: true,\r\n\t\t\tbodyBackground: null,\r\n\t\t\tbodyMargin: null,\r\n\t\t\tbodyMarginV1: 8,\r\n\t\t\tbodyPadding: null,\r\n\t\t\tcheckOrigin: true,\r\n\t\t\tinPageLinks: false,\r\n\t\t\tenablePublicMethods: true,\r\n\t\t\theightCalculationMethod: 'bodyOffset',\r\n\t\t\tid: 'iFrameResizer',\r\n\t\t\tinterval: 32,\r\n\t\t\tlog: false,\r\n\t\t\tmaxHeight: Infinity,\r\n\t\t\tmaxWidth: Infinity,\r\n\t\t\tminHeight: 0,\r\n\t\t\tminWidth: 0,\r\n\t\t\tmouseEvents: true,\r\n\t\t\tresizeFrom: 'parent',\r\n\t\t\tscrolling: false,\r\n\t\t\tsizeHeight: true,\r\n\t\t\tsizeWidth: false,\r\n\t\t\twarningTimeout: 5000,\r\n\t\t\ttolerance: 0,\r\n\t\t\twidthCalculationMethod: 'scroll',\r\n\t\t\tonClose: function () {\r\n\t\t\t\treturn true\r\n\t\t\t},\r\n\t\t\tonClosed: function () {},\r\n\t\t\tonInit: function () {},\r\n\t\t\tonMessage: function () {\r\n\t\t\t\twarn('onMessage function not defined')\r\n\t\t\t},\r\n\t\t\tonMouseEnter: function () {},\r\n\t\t\tonMouseLeave: function () {},\r\n\t\t\tonResized: function () {},\r\n\t\t\tonScroll: function () {\r\n\t\t\t\treturn true\r\n\t\t\t}\r\n\t\t}\r\n\r\n\tfunction getMutationObserver() {\r\n\t\treturn (\r\n\t\t\twindow.MutationObserver ||\r\n\t\t\twindow.WebKitMutationObserver ||\r\n\t\t\twindow.MozMutationObserver\r\n\t\t)\r\n\t}\r\n\r\n\tfunction addEventListener(el, evt, func) {\r\n\t\tel.addEventListener(evt, func, false)\r\n\t}\r\n\r\n\tfunction removeEventListener(el, evt, func) {\r\n\t\tel.removeEventListener(evt, func, false)\r\n\t}\r\n\r\n\tfunction setupRequestAnimationFrame() {\r\n\t\tvar vendors = ['moz', 'webkit', 'o', 'ms']\r\n\t\tvar x\r\n\r\n\t\t// Remove vendor prefixing if prefixed and break early if not\r\n\t\tfor (x = 0; x < vendors.length && !requestAnimationFrame; x += 1) {\r\n\t\t\trequestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame']\r\n\t\t}\r\n\r\n\t\tif (!requestAnimationFrame) {\r\n\t\t\tlog('setup', 'RequestAnimationFrame not supported')\r\n\t\t} else {\r\n\t\t\t// Firefox extension content-scripts have a globalThis object that is not the same as window.\r\n\t\t\t// Binding `requestAnimationFrame` to window allows the function to work and prevents errors\r\n\t\t\t// being thrown when run in that context, and should be a no-op in every other context.\r\n\t\t\trequestAnimationFrame = requestAnimationFrame.bind(window)\r\n\t\t}\r\n\t}\r\n\r\n\tfunction getMyID(iframeId) {\r\n\t\tvar retStr = 'Host page: ' + iframeId\r\n\r\n\t\tif (window.top !== window.self) {\r\n\t\t\t// eslint-disable-next-line unicorn/prefer-ternary\r\n\t\t\tif (window.parentIFrame && window.parentIFrame.getId) {\r\n\t\t\t\tretStr = window.parentIFrame.getId() + ': ' + iframeId\r\n\t\t\t} else {\r\n\t\t\t\tretStr = 'Nested host page: ' + iframeId\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn retStr\r\n\t}\r\n\r\n\tfunction formatLogHeader(iframeId) {\r\n\t\treturn msgId + '[' + getMyID(iframeId) + ']'\r\n\t}\r\n\r\n\tfunction isLogEnabled(iframeId) {\r\n\t\treturn settings[iframeId] ? settings[iframeId].log : logEnabled\r\n\t}\r\n\r\n\tfunction log(iframeId, msg) {\r\n\t\toutput('log', iframeId, msg, isLogEnabled(iframeId))\r\n\t}\r\n\r\n\tfunction info(iframeId, msg) {\r\n\t\toutput('info', iframeId, msg, isLogEnabled(iframeId))\r\n\t}\r\n\r\n\tfunction warn(iframeId, msg) {\r\n\t\toutput('warn', iframeId, msg, true)\r\n\t}\r\n\r\n\tfunction output(type, iframeId, msg, enabled) {\r\n\t\tif (true === enabled && 'object' === typeof window.console) {\r\n\t\t\t// eslint-disable-next-line no-console\r\n\t\t\tconsole[type](formatLogHeader(iframeId), msg)\r\n\t\t}\r\n\t}\r\n\r\n\tfunction iFrameListener(event) {\r\n\t\tfunction resizeIFrame() {\r\n\t\t\tfunction resize() {\r\n\t\t\t\tsetSize(messageData)\r\n\t\t\t\tsetPagePosition(iframeId)\r\n\t\t\t\ton('onResized', messageData)\r\n\t\t\t}\r\n\r\n\t\t\tensureInRange('Height')\r\n\t\t\tensureInRange('Width')\r\n\r\n\t\t\tsyncResize(resize, messageData, 'init')\r\n\t\t}\r\n\r\n\t\tfunction processMsg() {\r\n\t\t\tvar data = msg.substr(msgIdLen).split(':')\r\n\t\t\tvar height = data[1] ? parseInt(data[1], 10) : 0\r\n\t\t\tvar iframe = settings[data[0]] && settings[data[0]].iframe\r\n\t\t\tvar compStyle = getComputedStyle(iframe)\r\n\r\n\t\t\treturn {\r\n\t\t\t\tiframe: iframe,\r\n\t\t\t\tid: data[0],\r\n\t\t\t\theight: height + getPaddingEnds(compStyle) + getBorderEnds(compStyle),\r\n\t\t\t\twidth: data[2],\r\n\t\t\t\ttype: data[3]\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction getPaddingEnds(compStyle) {\r\n\t\t\tif (compStyle.boxSizing !== 'border-box') {\r\n\t\t\t\treturn 0\r\n\t\t\t}\r\n\t\t\tvar top = compStyle.paddingTop ? parseInt(compStyle.paddingTop, 10) : 0\r\n\t\t\tvar bot = compStyle.paddingBottom ?\r\n\t\t\t\tparseInt(compStyle.paddingBottom, 10) :\r\n\t\t\t\t0\r\n\t\t\treturn top + bot\r\n\t\t}\r\n\r\n\t\tfunction getBorderEnds(compStyle) {\r\n\t\t\tif (compStyle.boxSizing !== 'border-box') {\r\n\t\t\t\treturn 0\r\n\t\t\t}\r\n\t\t\tvar top = compStyle.borderTopWidth ?\r\n\t\t\t\tparseInt(compStyle.borderTopWidth, 10) :\r\n\t\t\t\t0\r\n\t\t\tvar bot = compStyle.borderBottomWidth ?\r\n\t\t\t\tparseInt(compStyle.borderBottomWidth, 10) :\r\n\t\t\t\t0\r\n\t\t\treturn top + bot\r\n\t\t}\r\n\r\n\t\tfunction ensureInRange(Dimension) {\r\n\t\t\tvar max = Number(settings[iframeId]['max' + Dimension]),\r\n\t\t\t\tmin = Number(settings[iframeId]['min' + Dimension]),\r\n\t\t\t\tdimension = Dimension.toLowerCase(),\r\n\t\t\t\tsize = Number(messageData[dimension])\r\n\r\n\t\t\tlog(iframeId, 'Checking ' + dimension + ' is in range ' + min + '-' + max)\r\n\r\n\t\t\tif (size < min) {\r\n\t\t\t\tsize = min\r\n\t\t\t\tlog(iframeId, 'Set ' + dimension + ' to min value')\r\n\t\t\t}\r\n\r\n\t\t\tif (size > max) {\r\n\t\t\t\tsize = max\r\n\t\t\t\tlog(iframeId, 'Set ' + dimension + ' to max value')\r\n\t\t\t}\r\n\r\n\t\t\tmessageData[dimension] = '' + size\r\n\t\t}\r\n\r\n\t\tfunction isMessageFromIFrame() {\r\n\t\t\tfunction checkAllowedOrigin() {\r\n\t\t\t\tfunction checkList() {\r\n\t\t\t\t\tvar i = 0,\r\n\t\t\t\t\t\tretCode = false\r\n\r\n\t\t\t\t\tlog(\r\n\t\t\t\t\t\tiframeId,\r\n\t\t\t\t\t\t'Checking connection is from allowed list of origins: ' +\r\n\t\t\t\t\t\tcheckOrigin\r\n\t\t\t\t\t)\r\n\r\n\t\t\t\t\tfor (; i < checkOrigin.length; i++) {\r\n\t\t\t\t\t\tif (checkOrigin[i] === origin) {\r\n\t\t\t\t\t\t\tretCode = true\r\n\t\t\t\t\t\t\tbreak\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn retCode\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfunction checkSingle() {\r\n\t\t\t\t\tvar remoteHost = settings[iframeId] && settings[iframeId].remoteHost\r\n\t\t\t\t\tlog(iframeId, 'Checking connection is from: ' + remoteHost)\r\n\t\t\t\t\treturn origin === remoteHost\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn checkOrigin.constructor === Array ? checkList() : checkSingle()\r\n\t\t\t}\r\n\r\n\t\t\tvar origin = event.origin,\r\n\t\t\t\tcheckOrigin = settings[iframeId] && settings[iframeId].checkOrigin\r\n\r\n\t\t\tif (checkOrigin && '' + origin !== 'null' && !checkAllowedOrigin()) {\r\n\t\t\t\tthrow new Error(\r\n\t\t\t\t\t'Unexpected message received from: ' +\r\n\t\t\t\t\torigin +\r\n\t\t\t\t\t' for ' +\r\n\t\t\t\t\tmessageData.iframe.id +\r\n\t\t\t\t\t'. Message was: ' +\r\n\t\t\t\t\tevent.data +\r\n\t\t\t\t\t'. This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.'\r\n\t\t\t\t)\r\n\t\t\t}\r\n\r\n\t\t\treturn true\r\n\t\t}\r\n\r\n\t\tfunction isMessageForUs() {\r\n\t\t\treturn (\r\n\t\t\t\tmsgId === ('' + msg).substr(0, msgIdLen) &&\r\n\t\t\t\tmsg.substr(msgIdLen).split(':')[0] in settings\r\n\t\t\t) // ''+Protects against non-string msg\r\n\t\t}\r\n\r\n\t\tfunction isMessageFromMetaParent() {\r\n\t\t\t// Test if this message is from a parent above us. This is an ugly test, however, updating\r\n\t\t\t// the message format would break backwards compatibity.\r\n\t\t\tvar retCode = messageData.type in {\r\n\t\t\t\ttrue: 1,\r\n\t\t\t\tfalse: 1,\r\n\t\t\t\tundefined: 1\r\n\t\t\t}\r\n\r\n\t\t\tif (retCode) {\r\n\t\t\t\tlog(iframeId, 'Ignoring init message from meta parent page')\r\n\t\t\t}\r\n\r\n\t\t\treturn retCode\r\n\t\t}\r\n\r\n\t\tfunction getMsgBody(offset) {\r\n\t\t\treturn msg.substr(msg.indexOf(':') + msgHeaderLen + offset)\r\n\t\t}\r\n\r\n\t\tfunction forwardMsgFromIFrame(msgBody) {\r\n\t\t\tlog(\r\n\t\t\t\tiframeId,\r\n\t\t\t\t'onMessage passed: {iframe: ' +\r\n\t\t\t\tmessageData.iframe.id +\r\n\t\t\t\t', message: ' +\r\n\t\t\t\tmsgBody +\r\n\t\t\t\t'}'\r\n\t\t\t)\r\n\r\n\t\t\ton('onMessage', {\r\n\t\t\t\tiframe: messageData.iframe,\r\n\t\t\t\tmessage: JSON.parse(msgBody)\r\n\t\t\t})\r\n\r\n\t\t\tlog(iframeId, '--')\r\n\t\t}\r\n\r\n\t\tfunction getPageInfo() {\r\n\t\t\tvar bodyPosition = document.body.getBoundingClientRect(),\r\n\t\t\t\tiFramePosition = messageData.iframe.getBoundingClientRect()\r\n\r\n\t\t\treturn JSON.stringify({\r\n\t\t\t\tiframeHeight: iFramePosition.height,\r\n\t\t\t\tiframeWidth: iFramePosition.width,\r\n\t\t\t\tclientHeight: Math.max(\r\n\t\t\t\t\tdocument.documentElement.clientHeight,\r\n\t\t\t\t\twindow.innerHeight || 0\r\n\t\t\t\t),\r\n\t\t\t\tclientWidth: Math.max(\r\n\t\t\t\t\tdocument.documentElement.clientWidth,\r\n\t\t\t\t\twindow.innerWidth || 0\r\n\t\t\t\t),\r\n\t\t\t\toffsetTop: parseInt(iFramePosition.top - bodyPosition.top, 10),\r\n\t\t\t\toffsetLeft: parseInt(iFramePosition.left - bodyPosition.left, 10),\r\n\t\t\t\tscrollTop: window.pageYOffset,\r\n\t\t\t\tscrollLeft: window.pageXOffset,\r\n\t\t\t\tdocumentHeight: document.documentElement.clientHeight,\r\n\t\t\t\tdocumentWidth: document.documentElement.clientWidth,\r\n\t\t\t\twindowHeight: window.innerHeight,\r\n\t\t\t\twindowWidth: window.innerWidth\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tfunction sendPageInfoToIframe(iframe, iframeId) {\r\n\t\t\tfunction debouncedTrigger() {\r\n\t\t\t\ttrigger('Send Page Info', 'pageInfo:' + getPageInfo(), iframe, iframeId)\r\n\t\t\t}\r\n\t\t\tdebounceFrameEvents(debouncedTrigger, 32, iframeId)\r\n\t\t}\r\n\r\n\t\tfunction startPageInfoMonitor() {\r\n\t\t\tfunction setListener(type, func) {\r\n\t\t\t\tfunction sendPageInfo() {\r\n\t\t\t\t\tif (settings[id]) {\r\n\t\t\t\t\t\tsendPageInfoToIframe(settings[id].iframe, id)\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tstop()\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t;\r\n\t\t\t\t['scroll', 'resize'].forEach(function (evt) {\r\n\t\t\t\t\tlog(id, type + evt + ' listener for sendPageInfo')\r\n\t\t\t\t\tfunc(window, evt, sendPageInfo)\r\n\t\t\t\t})\r\n\t\t\t}\r\n\r\n\t\t\tfunction stop() {\r\n\t\t\t\tsetListener('Remove ', removeEventListener)\r\n\t\t\t}\r\n\r\n\t\t\tfunction start() {\r\n\t\t\t\tsetListener('Add ', addEventListener)\r\n\t\t\t}\r\n\r\n\t\t\tvar id = iframeId // Create locally scoped copy of iFrame ID\r\n\r\n\t\t\tstart()\r\n\r\n\t\t\tif (settings[id]) {\r\n\t\t\t\tsettings[id].stopPageInfo = stop\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction stopPageInfoMonitor() {\r\n\t\t\tif (settings[iframeId] && settings[iframeId].stopPageInfo) {\r\n\t\t\t\tsettings[iframeId].stopPageInfo()\r\n\t\t\t\tdelete settings[iframeId].stopPageInfo\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction checkIFrameExists() {\r\n\t\t\tvar retBool = true\r\n\r\n\t\t\tif (null === messageData.iframe) {\r\n\t\t\t\twarn(iframeId, 'IFrame (' + messageData.id + ') not found')\r\n\t\t\t\tretBool = false\r\n\t\t\t}\r\n\t\t\treturn retBool\r\n\t\t}\r\n\r\n\t\tfunction getElementPosition(target) {\r\n\t\t\tvar iFramePosition = target.getBoundingClientRect()\r\n\r\n\t\t\tgetPagePosition(iframeId)\r\n\r\n\t\t\treturn {\r\n\t\t\t\tx: Math.floor(Number(iFramePosition.left) + Number(pagePosition.x)),\r\n\t\t\t\ty: Math.floor(Number(iFramePosition.top) + Number(pagePosition.y))\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction scrollRequestFromChild(addOffset) {\r\n\t\t\t/* istanbul ignore next */ // Not testable in Karma\r\n\t\t\tfunction reposition() {\r\n\t\t\t\tpagePosition = newPosition\r\n\t\t\t\tscrollTo()\r\n\t\t\t\tlog(iframeId, '--')\r\n\t\t\t}\r\n\r\n\t\t\tfunction calcOffset() {\r\n\t\t\t\treturn {\r\n\t\t\t\t\tx: Number(messageData.width) + offset.x,\r\n\t\t\t\t\ty: Number(messageData.height) + offset.y\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction scrollParent() {\r\n\t\t\t\tif (window.parentIFrame) {\r\n\t\t\t\t\twindow.parentIFrame['scrollTo' + (addOffset ? 'Offset' : '')](\r\n\t\t\t\t\t\tnewPosition.x,\r\n\t\t\t\t\t\tnewPosition.y\r\n\t\t\t\t\t)\r\n\t\t\t\t} else {\r\n\t\t\t\t\twarn(\r\n\t\t\t\t\t\tiframeId,\r\n\t\t\t\t\t\t'Unable to scroll to requested position, window.parentIFrame not found'\r\n\t\t\t\t\t)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar offset = addOffset ?\r\n\t\t\t\tgetElementPosition(messageData.iframe) : {\r\n\t\t\t\t\tx: 0,\r\n\t\t\t\t\ty: 0\r\n\t\t\t\t},\r\n\t\t\t\tnewPosition = calcOffset()\r\n\r\n\t\t\tlog(\r\n\t\t\t\tiframeId,\r\n\t\t\t\t'Reposition requested from iFrame (offset x:' +\r\n\t\t\t\toffset.x +\r\n\t\t\t\t' y:' +\r\n\t\t\t\toffset.y +\r\n\t\t\t\t')'\r\n\t\t\t)\r\n\r\n\t\t\tif (window.top !== window.self) {\r\n\t\t\t\tscrollParent()\r\n\t\t\t} else {\r\n\t\t\t\treposition()\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction scrollTo() {\r\n\t\t\tif (false !== on('onScroll', pagePosition)) {\r\n\t\t\t\tsetPagePosition(iframeId)\r\n\t\t\t} else {\r\n\t\t\t\tunsetPagePosition()\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction findTarget(location) {\r\n\t\t\tfunction jumpToTarget() {\r\n\t\t\t\tvar jumpPosition = getElementPosition(target)\r\n\r\n\t\t\t\tlog(\r\n\t\t\t\t\tiframeId,\r\n\t\t\t\t\t'Moving to in page link (#' +\r\n\t\t\t\t\thash +\r\n\t\t\t\t\t') at x: ' +\r\n\t\t\t\t\tjumpPosition.x +\r\n\t\t\t\t\t' y: ' +\r\n\t\t\t\t\tjumpPosition.y\r\n\t\t\t\t)\r\n\t\t\t\tpagePosition = {\r\n\t\t\t\t\tx: jumpPosition.x,\r\n\t\t\t\t\ty: jumpPosition.y\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscrollTo()\r\n\t\t\t\tlog(iframeId, '--')\r\n\t\t\t}\r\n\r\n\t\t\tfunction jumpToParent() {\r\n\t\t\t\tif (window.parentIFrame) {\r\n\t\t\t\t\twindow.parentIFrame.moveToAnchor(hash)\r\n\t\t\t\t} else {\r\n\t\t\t\t\tlog(\r\n\t\t\t\t\t\tiframeId,\r\n\t\t\t\t\t\t'In page link #' +\r\n\t\t\t\t\t\thash +\r\n\t\t\t\t\t\t' not found and window.parentIFrame not found'\r\n\t\t\t\t\t)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar hash = location.split('#')[1] || '',\r\n\t\t\t\thashData = decodeURIComponent(hash),\r\n\t\t\t\ttarget =\r\n\t\t\t\tdocument.getElementById(hashData) ||\r\n\t\t\t\tdocument.getElementsByName(hashData)[0]\r\n\r\n\t\t\tif (target) {\r\n\t\t\t\tjumpToTarget()\r\n\t\t\t} else if (window.top !== window.self) {\r\n\t\t\t\tjumpToParent()\r\n\t\t\t} else {\r\n\t\t\t\tlog(iframeId, 'In page link #' + hash + ' not found')\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction onMouse(event) {\r\n\t\t\tvar mousePos = {}\r\n\r\n\t\t\tif (Number(messageData.width) === 0 && Number(messageData.height) === 0) {\r\n\t\t\t\tvar data = getMsgBody(9).split(':')\r\n\t\t\t\tmousePos = {\r\n\t\t\t\t\tx: data[1],\r\n\t\t\t\t\ty: data[0]\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tmousePos = {\r\n\t\t\t\t\tx: messageData.width,\r\n\t\t\t\t\ty: messageData.height\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\ton(event, {\r\n\t\t\t\tiframe: messageData.iframe,\r\n\t\t\t\tscreenX: Number(mousePos.x),\r\n\t\t\t\tscreenY: Number(mousePos.y),\r\n\t\t\t\ttype: messageData.type\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tfunction on(funcName, val) {\r\n\t\t\treturn chkEvent(iframeId, funcName, val)\r\n\t\t}\r\n\r\n\t\tfunction actionMsg() {\r\n\t\t\tif (settings[iframeId] && settings[iframeId].firstRun) firstRun()\r\n\r\n\t\t\tswitch (messageData.type) {\r\n\t\t\t\tcase 'close':\r\n\t\t\t\t\tcloseIFrame(messageData.iframe)\r\n\t\t\t\t\tbreak\r\n\r\n\t\t\t\tcase 'message':\r\n\t\t\t\t\tforwardMsgFromIFrame(getMsgBody(6))\r\n\t\t\t\t\tbreak\r\n\r\n\t\t\t\tcase 'mouseenter':\r\n\t\t\t\t\tonMouse('onMouseEnter')\r\n\t\t\t\t\tbreak\r\n\r\n\t\t\t\tcase 'mouseleave':\r\n\t\t\t\t\tonMouse('onMouseLeave')\r\n\t\t\t\t\tbreak\r\n\r\n\t\t\t\tcase 'autoResize':\r\n\t\t\t\t\tsettings[iframeId].autoResize = JSON.parse(getMsgBody(9))\r\n\t\t\t\t\tbreak\r\n\r\n\t\t\t\tcase 'scrollTo':\r\n\t\t\t\t\tscrollRequestFromChild(false)\r\n\t\t\t\t\tbreak\r\n\r\n\t\t\t\tcase 'scrollToOffset':\r\n\t\t\t\t\tscrollRequestFromChild(true)\r\n\t\t\t\t\tbreak\r\n\r\n\t\t\t\tcase 'pageInfo':\r\n\t\t\t\t\tsendPageInfoToIframe(\r\n\t\t\t\t\t\tsettings[iframeId] && settings[iframeId].iframe,\r\n\t\t\t\t\t\tiframeId\r\n\t\t\t\t\t)\r\n\t\t\t\t\tstartPageInfoMonitor()\r\n\t\t\t\t\tbreak\r\n\r\n\t\t\t\tcase 'pageInfoStop':\r\n\t\t\t\t\tstopPageInfoMonitor()\r\n\t\t\t\t\tbreak\r\n\r\n\t\t\t\tcase 'inPageLink':\r\n\t\t\t\t\tfindTarget(getMsgBody(9))\r\n\t\t\t\t\tbreak\r\n\r\n\t\t\t\tcase 'reset':\r\n\t\t\t\t\tresetIFrame(messageData)\r\n\t\t\t\t\tbreak\r\n\r\n\t\t\t\tcase 'init':\r\n\t\t\t\t\tresizeIFrame()\r\n\t\t\t\t\ton('onInit', messageData.iframe)\r\n\t\t\t\t\tbreak\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tif (\r\n\t\t\t\t\t\tNumber(messageData.width) === 0 &&\r\n\t\t\t\t\t\tNumber(messageData.height) === 0\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\twarn(\r\n\t\t\t\t\t\t\t'Unsupported message received (' +\r\n\t\t\t\t\t\t\tmessageData.type +\r\n\t\t\t\t\t\t\t'), this is likely due to the iframe containing a later ' +\r\n\t\t\t\t\t\t\t'version of iframe-resizer than the parent page'\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tresizeIFrame()\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction hasSettings(iframeId) {\r\n\t\t\tvar retBool = true\r\n\r\n\t\t\tif (!settings[iframeId]) {\r\n\t\t\t\tretBool = false\r\n\t\t\t\twarn(\r\n\t\t\t\t\tmessageData.type +\r\n\t\t\t\t\t' No settings for ' +\r\n\t\t\t\t\tiframeId +\r\n\t\t\t\t\t'. Message was: ' +\r\n\t\t\t\t\tmsg\r\n\t\t\t\t)\r\n\t\t\t}\r\n\r\n\t\t\treturn retBool\r\n\t\t}\r\n\r\n\t\tfunction iFrameReadyMsgReceived() {\r\n\t\t\t// eslint-disable-next-line no-restricted-syntax, guard-for-in\r\n\t\t\tfor (var iframeId in settings) {\r\n\t\t\t\ttrigger(\r\n\t\t\t\t\t'iFrame requested init',\r\n\t\t\t\t\tcreateOutgoingMsg(iframeId),\r\n\t\t\t\t\tsettings[iframeId].iframe,\r\n\t\t\t\t\tiframeId\r\n\t\t\t\t)\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction firstRun() {\r\n\t\t\tif (settings[iframeId]) {\r\n\t\t\t\tsettings[iframeId].firstRun = false\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar msg = event.data,\r\n\t\t\tmessageData = {},\r\n\t\t\tiframeId = null\r\n\r\n\t\tif ('[iFrameResizerChild]Ready' === msg) {\r\n\t\t\tiFrameReadyMsgReceived()\r\n\t\t} else if (isMessageForUs()) {\r\n\t\t\tmessageData = processMsg()\r\n\t\t\tiframeId = messageData.id\r\n\t\t\tif (settings[iframeId]) {\r\n\t\t\t\tsettings[iframeId].loaded = true\r\n\t\t\t}\r\n\r\n\t\t\tif (!isMessageFromMetaParent() && hasSettings(iframeId)) {\r\n\t\t\t\tlog(iframeId, 'Received: ' + msg)\r\n\r\n\t\t\t\tif (checkIFrameExists() && isMessageFromIFrame()) {\r\n\t\t\t\t\tactionMsg()\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tinfo(iframeId, 'Ignored: ' + msg)\r\n\t\t}\r\n\t}\r\n\r\n\tfunction chkEvent(iframeId, funcName, val) {\r\n\t\tvar func = null,\r\n\t\t\tretVal = null\r\n\r\n\t\tif (settings[iframeId]) {\r\n\t\t\tfunc = settings[iframeId][funcName]\r\n\r\n\t\t\tif ('function' === typeof func) {\r\n\t\t\t\tretVal = func(val)\r\n\t\t\t} else {\r\n\t\t\t\tthrow new TypeError(\r\n\t\t\t\t\tfuncName + ' on iFrame[' + iframeId + '] is not a function'\r\n\t\t\t\t)\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn retVal\r\n\t}\r\n\r\n\tfunction removeIframeListeners(iframe) {\r\n\t\tvar iframeId = iframe.id\r\n\t\tdelete settings[iframeId]\r\n\t}\r\n\r\n\tfunction closeIFrame(iframe) {\r\n\t\tvar iframeId = iframe.id\r\n\t\tif (chkEvent(iframeId, 'onClose', iframeId) === false) {\r\n\t\t\tlog(iframeId, 'Close iframe cancelled by onClose event')\r\n\t\t\treturn\r\n\t\t}\r\n\t\tlog(iframeId, 'Removing iFrame: ' + iframeId)\r\n\r\n\t\ttry {\r\n\t\t\t// Catch race condition error with React\r\n\t\t\tif (iframe.parentNode) {\r\n\t\t\t\tiframe.parentNode.removeChild(iframe)\r\n\t\t\t}\r\n\t\t} catch (error) {\r\n\t\t\twarn(error)\r\n\t\t}\r\n\r\n\t\tchkEvent(iframeId, 'onClosed', iframeId)\r\n\t\tlog(iframeId, '--')\r\n\t\tremoveIframeListeners(iframe)\r\n\t}\r\n\r\n\tfunction getPagePosition(iframeId) {\r\n\t\tif (null === pagePosition) {\r\n\t\t\tpagePosition = {\r\n\t\t\t\tx: window.pageXOffset !== undefined ?\r\n\t\t\t\t\twindow.pageXOffset : document.documentElement.scrollLeft,\r\n\t\t\t\ty: window.pageYOffset !== undefined ?\r\n\t\t\t\t\twindow.pageYOffset : document.documentElement.scrollTop\r\n\t\t\t}\r\n\t\t\tlog(\r\n\t\t\t\tiframeId,\r\n\t\t\t\t'Get page position: ' + pagePosition.x + ',' + pagePosition.y\r\n\t\t\t)\r\n\t\t}\r\n\t}\r\n\r\n\tfunction setPagePosition(iframeId) {\r\n\t\tif (null !== pagePosition) {\r\n\t\t\twindow.scrollTo(pagePosition.x, pagePosition.y)\r\n\t\t\tlog(\r\n\t\t\t\tiframeId,\r\n\t\t\t\t'Set page position: ' + pagePosition.x + ',' + pagePosition.y\r\n\t\t\t)\r\n\t\t\tunsetPagePosition()\r\n\t\t}\r\n\t}\r\n\r\n\tfunction unsetPagePosition() {\r\n\t\tpagePosition = null\r\n\t}\r\n\r\n\tfunction resetIFrame(messageData) {\r\n\t\tfunction reset() {\r\n\t\t\tsetSize(messageData)\r\n\t\t\ttrigger('reset', 'reset', messageData.iframe, messageData.id)\r\n\t\t}\r\n\r\n\t\tlog(\r\n\t\t\tmessageData.id,\r\n\t\t\t'Size reset requested by ' +\r\n\t\t\t('init' === messageData.type ? 'host page' : 'iFrame')\r\n\t\t)\r\n\t\tgetPagePosition(messageData.id)\r\n\t\tsyncResize(reset, messageData, 'reset')\r\n\t}\r\n\r\n\tfunction setSize(messageData) {\r\n\t\tfunction setDimension(dimension) {\r\n\t\t\tif (!messageData.id) {\r\n\t\t\t\tlog('undefined', 'messageData id not set')\r\n\t\t\t\treturn\r\n\t\t\t}\r\n\t\t\tmessageData.iframe.style[dimension] = messageData[dimension] + 'px'\r\n\t\t\tlog(\r\n\t\t\t\tmessageData.id,\r\n\t\t\t\t'IFrame (' +\r\n\t\t\t\tiframeId +\r\n\t\t\t\t') ' +\r\n\t\t\t\tdimension +\r\n\t\t\t\t' set to ' +\r\n\t\t\t\tmessageData[dimension] +\r\n\t\t\t\t'px'\r\n\t\t\t)\r\n\t\t}\r\n\r\n\t\tfunction chkZero(dimension) {\r\n\t\t\t// FireFox sets dimension of hidden iFrames to zero.\r\n\t\t\t// So if we detect that set up an event to check for\r\n\t\t\t// when iFrame becomes visible.\r\n\r\n\t\t\t/* istanbul ignore next */ // Not testable in PhantomJS\r\n\t\t\tif (!hiddenCheckEnabled && '0' === messageData[dimension]) {\r\n\t\t\t\thiddenCheckEnabled = true\r\n\t\t\t\tlog(iframeId, 'Hidden iFrame detected, creating visibility listener')\r\n\t\t\t\tfixHiddenIFrames()\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction processDimension(dimension) {\r\n\t\t\tsetDimension(dimension)\r\n\t\t\tchkZero(dimension)\r\n\t\t}\r\n\r\n\t\tvar iframeId = messageData.iframe.id\r\n\r\n\t\tif (settings[iframeId]) {\r\n\t\t\tif (settings[iframeId].sizeHeight) {\r\n\t\t\t\tprocessDimension('height')\r\n\t\t\t}\r\n\t\t\tif (settings[iframeId].sizeWidth) {\r\n\t\t\t\tprocessDimension('width')\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction syncResize(func, messageData, doNotSync) {\r\n\t\t/* istanbul ignore if */ // Not testable in PhantomJS\r\n\t\tif (\r\n\t\t\tdoNotSync !== messageData.type &&\r\n\t\t\trequestAnimationFrame &&\r\n\t\t\t// including check for jasmine because had trouble getting spy to work in unit test using requestAnimationFrame\r\n\t\t\t!window.jasmine\r\n\t\t) {\r\n\t\t\tlog(messageData.id, 'Requesting animation frame')\r\n\t\t\trequestAnimationFrame(func)\r\n\t\t} else {\r\n\t\t\tfunc()\r\n\t\t}\r\n\t}\r\n\r\n\tfunction trigger(calleeMsg, msg, iframe, id, noResponseWarning) {\r\n\t\tfunction postMessageToIFrame() {\r\n\t\t\tvar target = settings[id] && settings[id].targetOrigin\r\n\t\t\tlog(\r\n\t\t\t\tid,\r\n\t\t\t\t'[' +\r\n\t\t\t\tcalleeMsg +\r\n\t\t\t\t'] Sending msg to iframe[' +\r\n\t\t\t\tid +\r\n\t\t\t\t'] (' +\r\n\t\t\t\tmsg +\r\n\t\t\t\t') targetOrigin: ' +\r\n\t\t\t\ttarget\r\n\t\t\t)\r\n\t\t\tiframe.contentWindow.postMessage(msgId + msg, target)\r\n\t\t}\r\n\r\n\t\tfunction iFrameNotFound() {\r\n\t\t\twarn(id, '[' + calleeMsg + '] IFrame(' + id + ') not found')\r\n\t\t}\r\n\r\n\t\tfunction chkAndSend() {\r\n\t\t\tif (\r\n\t\t\t\tiframe &&\r\n\t\t\t\t'contentWindow' in iframe &&\r\n\t\t\t\tnull !== iframe.contentWindow\r\n\t\t\t) {\r\n\t\t\t\t// Null test for PhantomJS\r\n\t\t\t\tpostMessageToIFrame()\r\n\t\t\t} else {\r\n\t\t\t\tiFrameNotFound()\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction warnOnNoResponse() {\r\n\t\t\tfunction warning() {\r\n\t\t\t\tif (settings[id] && !settings[id].loaded && !errorShown) {\r\n\t\t\t\t\terrorShown = true\r\n\t\t\t\t\twarn(\r\n\t\t\t\t\t\tid,\r\n\t\t\t\t\t\t'IFrame has not responded within ' +\r\n\t\t\t\t\t\tsettings[id].warningTimeout / 1000 +\r\n\t\t\t\t\t\t' seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning.'\r\n\t\t\t\t\t)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (\r\n\t\t\t\t!!noResponseWarning &&\r\n\t\t\t\tsettings[id] &&\r\n\t\t\t\t!!settings[id].warningTimeout\r\n\t\t\t) {\r\n\t\t\t\tsettings[id].msgTimeout = setTimeout(\r\n\t\t\t\t\twarning,\r\n\t\t\t\t\tsettings[id].warningTimeout\r\n\t\t\t\t)\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar errorShown = false\r\n\r\n\t\tid = id || iframe.id\r\n\r\n\t\tif (settings[id]) {\r\n\t\t\tchkAndSend()\r\n\t\t\twarnOnNoResponse()\r\n\t\t}\r\n\t}\r\n\r\n\tfunction createOutgoingMsg(iframeId) {\r\n\t\treturn (\r\n\t\t\tiframeId +\r\n\t\t\t':' +\r\n\t\t\tsettings[iframeId].bodyMarginV1 +\r\n\t\t\t':' +\r\n\t\t\tsettings[iframeId].sizeWidth +\r\n\t\t\t':' +\r\n\t\t\tsettings[iframeId].log +\r\n\t\t\t':' +\r\n\t\t\tsettings[iframeId].interval +\r\n\t\t\t':' +\r\n\t\t\tsettings[iframeId].enablePublicMethods +\r\n\t\t\t':' +\r\n\t\t\tsettings[iframeId].autoResize +\r\n\t\t\t':' +\r\n\t\t\tsettings[iframeId].bodyMargin +\r\n\t\t\t':' +\r\n\t\t\tsettings[iframeId].heightCalculationMethod +\r\n\t\t\t':' +\r\n\t\t\tsettings[iframeId].bodyBackground +\r\n\t\t\t':' +\r\n\t\t\tsettings[iframeId].bodyPadding +\r\n\t\t\t':' +\r\n\t\t\tsettings[iframeId].tolerance +\r\n\t\t\t':' +\r\n\t\t\tsettings[iframeId].inPageLinks +\r\n\t\t\t':' +\r\n\t\t\tsettings[iframeId].resizeFrom +\r\n\t\t\t':' +\r\n\t\t\tsettings[iframeId].widthCalculationMethod +\r\n\t\t\t':' +\r\n\t\t\tsettings[iframeId].mouseEvents\r\n\t\t)\r\n\t}\r\n\r\n\tfunction setupIFrame(iframe, options) {\r\n\t\tfunction setLimits() {\r\n\t\t\tfunction addStyle(style) {\r\n\t\t\t\tif (\r\n\t\t\t\t\tInfinity !== settings[iframeId][style] &&\r\n\t\t\t\t\t0 !== settings[iframeId][style]\r\n\t\t\t\t) {\r\n\t\t\t\t\tiframe.style[style] = settings[iframeId][style] + 'px'\r\n\t\t\t\t\tlog(\r\n\t\t\t\t\t\tiframeId,\r\n\t\t\t\t\t\t'Set ' + style + ' = ' + settings[iframeId][style] + 'px'\r\n\t\t\t\t\t)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction chkMinMax(dimension) {\r\n\t\t\t\tif (\r\n\t\t\t\t\tsettings[iframeId]['min' + dimension] >\r\n\t\t\t\t\tsettings[iframeId]['max' + dimension]\r\n\t\t\t\t) {\r\n\t\t\t\t\tthrow new Error(\r\n\t\t\t\t\t\t'Value for min' +\r\n\t\t\t\t\t\tdimension +\r\n\t\t\t\t\t\t' can not be greater than max' +\r\n\t\t\t\t\t\tdimension\r\n\t\t\t\t\t)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tchkMinMax('Height')\r\n\t\t\tchkMinMax('Width')\r\n\r\n\t\t\taddStyle('maxHeight')\r\n\t\t\taddStyle('minHeight')\r\n\t\t\taddStyle('maxWidth')\r\n\t\t\taddStyle('minWidth')\r\n\t\t}\r\n\r\n\t\tfunction newId() {\r\n\t\t\tvar id = (options && options.id) || defaults.id + count++\r\n\t\t\tif (null !== document.getElementById(id)) {\r\n\t\t\t\tid += count++\r\n\t\t\t}\r\n\t\t\treturn id\r\n\t\t}\r\n\r\n\t\tfunction ensureHasId(iframeId) {\r\n\t\t\tif ('' === iframeId) {\r\n\t\t\t\t// eslint-disable-next-line no-multi-assign\r\n\t\t\t\tiframe.id = iframeId = newId()\r\n\t\t\t\tlogEnabled = (options || {}).log\r\n\t\t\t\tlog(\r\n\t\t\t\t\tiframeId,\r\n\t\t\t\t\t'Added missing iframe ID: ' + iframeId + ' (' + iframe.src + ')'\r\n\t\t\t\t)\r\n\t\t\t}\r\n\r\n\t\t\treturn iframeId\r\n\t\t}\r\n\r\n\t\tfunction setScrolling() {\r\n\t\t\tlog(\r\n\t\t\t\tiframeId,\r\n\t\t\t\t'IFrame scrolling ' +\r\n\t\t\t\t(settings[iframeId] && settings[iframeId].scrolling ?\r\n\t\t\t\t\t'enabled' :\r\n\t\t\t\t\t'disabled') +\r\n\t\t\t\t' for ' +\r\n\t\t\t\tiframeId\r\n\t\t\t)\r\n\t\t\tiframe.style.overflow =\r\n\t\t\t\tfalse === (settings[iframeId] && settings[iframeId].scrolling) ?\r\n\t\t\t\t'hidden' :\r\n\t\t\t\t'auto'\r\n\t\t\tswitch (settings[iframeId] && settings[iframeId].scrolling) {\r\n\t\t\t\tcase 'omit':\r\n\t\t\t\t\tbreak\r\n\r\n\t\t\t\tcase true:\r\n\t\t\t\t\tiframe.scrolling = 'yes'\r\n\t\t\t\t\tbreak\r\n\r\n\t\t\t\tcase false:\r\n\t\t\t\t\tiframe.scrolling = 'no'\r\n\t\t\t\t\tbreak\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tiframe.scrolling = settings[iframeId] ?\r\n\t\t\t\t\t\tsettings[iframeId].scrolling :\r\n\t\t\t\t\t\t'no'\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// The V1 iFrame script expects an int, where as in V2 expects a CSS\r\n\t\t// string value such as '1px 3em', so if we have an int for V2, set V1=V2\r\n\t\t// and then convert V2 to a string PX value.\r\n\t\tfunction setupBodyMarginValues() {\r\n\t\t\tif (\r\n\t\t\t\t'number' ===\r\n\t\t\t\ttypeof (settings[iframeId] && settings[iframeId].bodyMargin) ||\r\n\t\t\t\t'0' === (settings[iframeId] && settings[iframeId].bodyMargin)\r\n\t\t\t) {\r\n\t\t\t\tsettings[iframeId].bodyMarginV1 = settings[iframeId].bodyMargin\r\n\t\t\t\tsettings[iframeId].bodyMargin =\r\n\t\t\t\t\t'' + settings[iframeId].bodyMargin + 'px'\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction checkReset() {\r\n\t\t\t// Reduce scope of firstRun to function, because IE8's JS execution\r\n\t\t\t// context stack is borked and this value gets externally\r\n\t\t\t// changed midway through running this function!!!\r\n\t\t\tvar firstRun = settings[iframeId] && settings[iframeId].firstRun,\r\n\t\t\t\tresetRequertMethod =\r\n\t\t\t\tsettings[iframeId] &&\r\n\t\t\t\tsettings[iframeId].heightCalculationMethod in resetRequiredMethods\r\n\r\n\t\t\tif (!firstRun && resetRequertMethod) {\r\n\t\t\t\tresetIFrame({\r\n\t\t\t\t\tiframe: iframe,\r\n\t\t\t\t\theight: 0,\r\n\t\t\t\t\twidth: 0,\r\n\t\t\t\t\ttype: 'init'\r\n\t\t\t\t})\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction setupIFrameObject() {\r\n\t\t\tif (settings[iframeId]) {\r\n\t\t\t\tsettings[iframeId].iframe.iFrameResizer = {\r\n\t\t\t\t\tclose: closeIFrame.bind(null, settings[iframeId].iframe),\r\n\r\n\t\t\t\t\tremoveListeners: removeIframeListeners.bind(\r\n\t\t\t\t\t\tnull,\r\n\t\t\t\t\t\tsettings[iframeId].iframe\r\n\t\t\t\t\t),\r\n\r\n\t\t\t\t\tresize: trigger.bind(\r\n\t\t\t\t\t\tnull,\r\n\t\t\t\t\t\t'Window resize',\r\n\t\t\t\t\t\t'resize',\r\n\t\t\t\t\t\tsettings[iframeId].iframe\r\n\t\t\t\t\t),\r\n\r\n\t\t\t\t\tmoveToAnchor: function (anchor) {\r\n\t\t\t\t\t\ttrigger(\r\n\t\t\t\t\t\t\t'Move to anchor',\r\n\t\t\t\t\t\t\t'moveToAnchor:' + anchor,\r\n\t\t\t\t\t\t\tsettings[iframeId].iframe,\r\n\t\t\t\t\t\t\tiframeId\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t},\r\n\r\n\t\t\t\t\tsendMessage: function (message) {\r\n\t\t\t\t\t\tmessage = JSON.stringify(message)\r\n\t\t\t\t\t\ttrigger(\r\n\t\t\t\t\t\t\t'Send Message',\r\n\t\t\t\t\t\t\t'message:' + message,\r\n\t\t\t\t\t\t\tsettings[iframeId].iframe,\r\n\t\t\t\t\t\t\tiframeId\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// We have to call trigger twice, as we can not be sure if all\r\n\t\t// iframes have completed loading when this code runs. The\r\n\t\t// event listener also catches the page changing in the iFrame.\r\n\t\tfunction init(msg) {\r\n\t\t\tfunction iFrameLoaded() {\r\n\t\t\t\ttrigger('iFrame.onload', msg, iframe, undefined, true)\r\n\t\t\t\tcheckReset()\r\n\t\t\t}\r\n\r\n\t\t\tfunction createDestroyObserver(MutationObserver) {\r\n\t\t\t\tif (!iframe.parentNode) {\r\n\t\t\t\t\treturn\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar destroyObserver = new MutationObserver(function (mutations) {\r\n\t\t\t\t\tmutations.forEach(function (mutation) {\r\n\t\t\t\t\t\tvar removedNodes = Array.prototype.slice.call(mutation\r\n\t\t\t\t\t\t\t.removedNodes) // Transform NodeList into an Array\r\n\t\t\t\t\t\tremovedNodes.forEach(function (removedNode) {\r\n\t\t\t\t\t\t\tif (removedNode === iframe) {\r\n\t\t\t\t\t\t\t\tcloseIFrame(iframe)\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t})\r\n\t\t\t\t})\r\n\t\t\t\tdestroyObserver.observe(iframe.parentNode, {\r\n\t\t\t\t\tchildList: true\r\n\t\t\t\t})\r\n\t\t\t}\r\n\r\n\t\t\tvar MutationObserver = getMutationObserver()\r\n\t\t\tif (MutationObserver) {\r\n\t\t\t\tcreateDestroyObserver(MutationObserver)\r\n\t\t\t}\r\n\r\n\t\t\taddEventListener(iframe, 'load', iFrameLoaded)\r\n\t\t\ttrigger('init', msg, iframe, undefined, true)\r\n\t\t}\r\n\r\n\t\tfunction checkOptions(options) {\r\n\t\t\tif ('object' !== typeof options) {\r\n\t\t\t\tthrow new TypeError('Options is not an object')\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction copyOptions(options) {\r\n\t\t\t// eslint-disable-next-line no-restricted-syntax\r\n\t\t\tfor (var option in defaults) {\r\n\t\t\t\tif (Object.prototype.hasOwnProperty.call(defaults, option)) {\r\n\t\t\t\t\tsettings[iframeId][option] = Object.prototype.hasOwnProperty.call(\r\n\t\t\t\t\t\t\toptions,\r\n\t\t\t\t\t\t\toption\r\n\t\t\t\t\t\t) ?\r\n\t\t\t\t\t\toptions[option] :\r\n\t\t\t\t\t\tdefaults[option]\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction getTargetOrigin(remoteHost) {\r\n\t\t\treturn '' === remoteHost ||\r\n\t\t\t\tnull !== remoteHost.match(/^(about:blank|javascript:|file:\\/\\/)/) ?\r\n\t\t\t\t'*' :\r\n\t\t\t\tremoteHost\r\n\t\t}\r\n\r\n\t\tfunction depricate(key) {\r\n\t\t\tvar splitName = key.split('Callback')\r\n\r\n\t\t\tif (splitName.length === 2) {\r\n\t\t\t\tvar name =\r\n\t\t\t\t\t'on' + splitName[0].charAt(0).toUpperCase() + splitName[0].slice(1)\r\n\t\t\t\tthis[name] = this[key]\r\n\t\t\t\tdelete this[key]\r\n\t\t\t\twarn(\r\n\t\t\t\t\tiframeId,\r\n\t\t\t\t\t\"Deprecated: '\" +\r\n\t\t\t\t\tkey +\r\n\t\t\t\t\t\"' has been renamed '\" +\r\n\t\t\t\t\tname +\r\n\t\t\t\t\t\"'. The old method will be removed in the next major version.\"\r\n\t\t\t\t)\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction processOptions(options) {\r\n\t\t\toptions = options || {}\r\n\t\t\tsettings[iframeId] = {\r\n\t\t\t\tfirstRun: true,\r\n\t\t\t\tiframe: iframe,\r\n\t\t\t\tremoteHost: iframe.src && iframe.src.split('/').slice(0, 3).join('/')\r\n\t\t\t}\r\n\r\n\t\t\tcheckOptions(options)\r\n\t\t\tObject.keys(options).forEach(depricate, options)\r\n\t\t\tcopyOptions(options)\r\n\r\n\t\t\tif (settings[iframeId]) {\r\n\t\t\t\tsettings[iframeId].targetOrigin =\r\n\t\t\t\t\ttrue === settings[iframeId].checkOrigin ?\r\n\t\t\t\t\tgetTargetOrigin(settings[iframeId].remoteHost) :\r\n\t\t\t\t\t'*'\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction beenHere() {\r\n\t\t\treturn iframeId in settings && 'iFrameResizer' in iframe\r\n\t\t}\r\n\r\n\t\tvar iframeId = ensureHasId(iframe.id)\r\n\r\n\t\tif (!beenHere()) {\r\n\t\t\tprocessOptions(options)\r\n\t\t\tsetScrolling()\r\n\t\t\tsetLimits()\r\n\t\t\tsetupBodyMarginValues()\r\n\t\t\tinit(createOutgoingMsg(iframeId))\r\n\t\t\tsetupIFrameObject()\r\n\t\t} else {\r\n\t\t\twarn(iframeId, 'Ignored iFrame, already setup.')\r\n\t\t}\r\n\t}\r\n\r\n\tfunction debouce(fn, time) {\r\n\t\tif (null === timer) {\r\n\t\t\ttimer = setTimeout(function () {\r\n\t\t\t\ttimer = null\r\n\t\t\t\tfn()\r\n\t\t\t}, time)\r\n\t\t}\r\n\t}\r\n\r\n\tvar frameTimer = {}\r\n\r\n\tfunction debounceFrameEvents(fn, time, frameId) {\r\n\t\tif (!frameTimer[frameId]) {\r\n\t\t\tframeTimer[frameId] = setTimeout(function () {\r\n\t\t\t\tframeTimer[frameId] = null\r\n\t\t\t\tfn()\r\n\t\t\t}, time)\r\n\t\t}\r\n\t}\r\n\r\n\t// Not testable in PhantomJS\r\n\t/* istanbul ignore next */\r\n\r\n\tfunction fixHiddenIFrames() {\r\n\t\tfunction checkIFrames() {\r\n\t\t\tfunction checkIFrame(settingId) {\r\n\t\t\t\tfunction chkDimension(dimension) {\r\n\t\t\t\t\treturn (\r\n\t\t\t\t\t\t'0px' ===\r\n\t\t\t\t\t\t(settings[settingId] && settings[settingId].iframe.style[dimension])\r\n\t\t\t\t\t)\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfunction isVisible(el) {\r\n\t\t\t\t\treturn null !== el.offsetParent\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (\r\n\t\t\t\t\tsettings[settingId] &&\r\n\t\t\t\t\tisVisible(settings[settingId].iframe) &&\r\n\t\t\t\t\t(chkDimension('height') || chkDimension('width'))\r\n\t\t\t\t) {\r\n\t\t\t\t\ttrigger(\r\n\t\t\t\t\t\t'Visibility change',\r\n\t\t\t\t\t\t'resize',\r\n\t\t\t\t\t\tsettings[settingId].iframe,\r\n\t\t\t\t\t\tsettingId\r\n\t\t\t\t\t)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tObject.keys(settings).forEach(function (key) {\r\n\t\t\t\tcheckIFrame(key)\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tfunction mutationObserved(mutations) {\r\n\t\t\tlog(\r\n\t\t\t\t'window',\r\n\t\t\t\t'Mutation observed: ' + mutations[0].target + ' ' + mutations[0].type\r\n\t\t\t)\r\n\t\t\tdebouce(checkIFrames, 16)\r\n\t\t}\r\n\r\n\t\tfunction createMutationObserver() {\r\n\t\t\tvar target = document.querySelector('body'),\r\n\t\t\t\tconfig = {\r\n\t\t\t\t\tattributes: true,\r\n\t\t\t\t\tattributeOldValue: false,\r\n\t\t\t\t\tcharacterData: true,\r\n\t\t\t\t\tcharacterDataOldValue: false,\r\n\t\t\t\t\tchildList: true,\r\n\t\t\t\t\tsubtree: true\r\n\t\t\t\t},\r\n\t\t\t\tobserver = new MutationObserver(mutationObserved)\r\n\r\n\t\t\tobserver.observe(target, config)\r\n\t\t}\r\n\r\n\t\tvar MutationObserver = getMutationObserver()\r\n\t\tif (MutationObserver) {\r\n\t\t\tcreateMutationObserver()\r\n\t\t}\r\n\t}\r\n\r\n\tfunction resizeIFrames(event) {\r\n\t\tfunction resize() {\r\n\t\t\tsendTriggerMsg('Window ' + event, 'resize')\r\n\t\t}\r\n\r\n\t\tlog('window', 'Trigger event: ' + event)\r\n\t\tdebouce(resize, 16)\r\n\t}\r\n\r\n\t// Not testable in PhantomJS\r\n\t/* istanbul ignore next */\r\n\tfunction tabVisible() {\r\n\t\tfunction resize() {\r\n\t\t\tsendTriggerMsg('Tab Visable', 'resize')\r\n\t\t}\r\n\r\n\t\tif ('hidden' !== document.visibilityState) {\r\n\t\t\tlog('document', 'Trigger event: Visiblity change')\r\n\t\t\tdebouce(resize, 16)\r\n\t\t}\r\n\t}\r\n\r\n\tfunction sendTriggerMsg(eventName, event) {\r\n\t\tfunction isIFrameResizeEnabled(iframeId) {\r\n\t\t\treturn (\r\n\t\t\t\tsettings[iframeId] &&\r\n\t\t\t\t'parent' === settings[iframeId].resizeFrom &&\r\n\t\t\t\tsettings[iframeId].autoResize &&\r\n\t\t\t\t!settings[iframeId].firstRun\r\n\t\t\t)\r\n\t\t}\r\n\r\n\t\tObject.keys(settings).forEach(function (iframeId) {\r\n\t\t\tif (isIFrameResizeEnabled(iframeId)) {\r\n\t\t\t\ttrigger(eventName, event, settings[iframeId].iframe, iframeId)\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tfunction setupEventListeners() {\r\n\t\taddEventListener(window, 'message', iFrameListener)\r\n\r\n\t\taddEventListener(window, 'resize', function () {\r\n\t\t\tresizeIFrames('resize')\r\n\t\t})\r\n\r\n\t\taddEventListener(document, 'visibilitychange', tabVisible)\r\n\r\n\t\taddEventListener(document, '-webkit-visibilitychange', tabVisible)\r\n\t}\r\n\r\n\tfunction factory() {\r\n\t\tfunction init(options, element) {\r\n\t\t\tfunction chkType() {\r\n\t\t\t\tif (!element.tagName) {\r\n\t\t\t\t\tthrow new TypeError('Object is not a valid DOM element')\r\n\t\t\t\t} else if ('IFRAME' !== element.tagName.toUpperCase()) {\r\n\t\t\t\t\tthrow new TypeError(\r\n\t\t\t\t\t\t'Expected