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kBmC,KAAiBf,GAUpCmK,GAAYsH,GACDD,IAAgB,CAAEhS,SAAU,IANzC0F,GAAI,+BAcJ8M,KA9CAnI,GAHA3K,EAASwS,EACT7Q,EAAQ8Q,EAEeH,IAuD3B,SAASpM,GAASoM,EAAcC,EAAkB5G,EAAcC,GAQrDpK,GAAiB8Q,KAAgB3S,EAgBxCqG,GAAI,4BAA8BsM,IAtB5BA,IAAgB,CAAEvM,MAAO,EAAGgN,UAAW,EAAGnN,KAAM,IACpDI,GAAI,kBAAoBuM,GAUL,SAAjBD,EACFpN,GAAWoN,EAAcC,EAAkB5G,EAAcC,GAEzD3G,EACEqN,EACAC,EACA5G,EACAC,IAQR,SAASkH,KACFtR,IACHA,GAAgB,EAChBwE,GAAI,0BAENR,aAAa/D,GACbA,EAAqBgE,YAAW,WAC9BjE,GAAgB,EAChBwE,GAAI,0BACJA,GAAI,QACHlG,GAGL,SAASmG,GAAaqM,GACpBtS,EAAS6D,EAAU3D,KACnByB,EAAQkD,EAAShD,KAEjB8I,GAAQ3K,EAAQ2B,EAAO2Q,GAGzB,SAASrH,GAAYsH,GACnB,IAAIS,EAAM9S,EACVA,EAAiBD,EAEjB+F,GAAI,wBAA0BuM,GAC9BO,KACA7M,GAAa,SAEb/F,EAAiB8S,EAGnB,SAASrI,GAAQvI,EAAQI,EAAO8P,EAAcrK,EAAKiB,GASjD,IAEIvC,EATEzH,IAAcgK,EAChBA,EAAe5H,EAEf0E,GAAI,yBAA2BkD,GAcjClD,GAAI,kCARFW,EACE9F,EACA,IAHOuB,EAAS,IAAMI,EAKtB,IACA8P,GACCpT,IAAc+I,EAAM,IAAMA,EAAM,KAEY,KACjD7G,EAAO6R,YAAYvS,EAAQiG,EAASuC,GAoHxC,SAAS1B,KACH,YAAcnF,SAAS6Q,YACzB/T,OAAOkC,OAAO4R,YAAY,4BAA6B,MAlwC3D,I","sources":["node_modules/iframe-resizer/js/iframeResizer.contentWindow.js"],"sourcesContent":["/*\n * File: iframeResizer.contentWindow.js\n * Desc: Include this file in any page being loaded into an iframe\n * to force the iframe to resize to the content size.\n * Requires: iframeResizer.js on host page.\n * Doc: https://github.com/davidjbradshaw/iframe-resizer\n * Author: David J. Bradshaw - dave@bradshaw.net\n *\n */\n\n// eslint-disable-next-line sonarjs/cognitive-complexity, no-shadow-restricted-names\n;(function (undefined) {\n if (typeof window === 'undefined') return // don't run for server side render\n\n var autoResize = true,\n base = 10,\n bodyBackground = '',\n bodyMargin = 0,\n bodyMarginStr = '',\n bodyObserver = null,\n bodyPadding = '',\n calculateWidth = false,\n doubleEventList = { resize: 1, click: 1 },\n eventCancelTimer = 128,\n firstRun = true,\n height = 1,\n heightCalcModeDefault = 'bodyOffset',\n heightCalcMode = heightCalcModeDefault,\n initLock = true,\n initMsg = '',\n inPageLinks = {},\n interval = 32,\n intervalTimer = null,\n logging = false,\n mouseEvents = false,\n msgID = '[iFrameSizer]', // Must match host page msg ID\n msgIdLen = msgID.length,\n myID = '',\n resetRequiredMethods = {\n max: 1,\n min: 1,\n bodyScroll: 1,\n documentElementScroll: 1\n },\n resizeFrom = 'child',\n sendPermit = true,\n target = window.parent,\n targetOriginDefault = '*',\n tolerance = 0,\n triggerLocked = false,\n triggerLockedTimer = null,\n throttledTimer = 16,\n width = 1,\n widthCalcModeDefault = 'scroll',\n widthCalcMode = widthCalcModeDefault,\n win = window,\n onMessage = function () {\n warn('onMessage function not defined')\n },\n onReady = function () {},\n onPageInfo = function () {},\n customCalcMethods = {\n height: function () {\n warn('Custom height calculation function not defined')\n return document.documentElement.offsetHeight\n },\n width: function () {\n warn('Custom width calculation function not defined')\n return document.body.scrollWidth\n }\n },\n eventHandlersByName = {},\n passiveSupported = false\n\n function noop() {}\n\n try {\n var options = Object.create(\n {},\n {\n passive: {\n get: function () {\n passiveSupported = true\n }\n }\n }\n )\n window.addEventListener('test', noop, options)\n window.removeEventListener('test', noop, options)\n } catch (error) {\n /* */\n }\n\n function addEventListener(el, evt, func, options) {\n el.addEventListener(evt, func, passiveSupported ? options || {} : false)\n }\n\n function removeEventListener(el, evt, func) {\n el.removeEventListener(evt, func, false)\n }\n\n function capitalizeFirstLetter(string) {\n return string.charAt(0).toUpperCase() + string.slice(1)\n }\n\n // Based on underscore.js\n function throttle(func) {\n var context,\n args,\n result,\n timeout = null,\n previous = 0,\n later = function () {\n previous = Date.now()\n timeout = null\n result = func.apply(context, args)\n if (!timeout) {\n // eslint-disable-next-line no-multi-assign\n context = args = null\n }\n }\n\n return function () {\n var now = Date.now()\n\n if (!previous) {\n previous = now\n }\n\n var remaining = throttledTimer - (now - previous)\n\n context = this\n args = arguments\n\n if (remaining <= 0 || remaining > throttledTimer) {\n if (timeout) {\n clearTimeout(timeout)\n timeout = null\n }\n\n previous = now\n result = func.apply(context, args)\n\n if (!timeout) {\n // eslint-disable-next-line no-multi-assign\n context = args = null\n }\n } else if (!timeout) {\n timeout = setTimeout(later, remaining)\n }\n\n return result\n }\n }\n\n function formatLogMsg(msg) {\n return msgID + '[' + myID + '] ' + msg\n }\n\n function log(msg) {\n if (logging && 'object' === typeof window.console) {\n // eslint-disable-next-line no-console\n console.log(formatLogMsg(msg))\n }\n }\n\n function warn(msg) {\n if ('object' === typeof window.console) {\n // eslint-disable-next-line no-console\n console.warn(formatLogMsg(msg))\n }\n }\n\n function init() {\n readDataFromParent()\n log('Initialising iFrame (' + window.location.href + ')')\n readDataFromPage()\n setMargin()\n setBodyStyle('background', bodyBackground)\n setBodyStyle('padding', bodyPadding)\n injectClearFixIntoBodyElement()\n checkHeightMode()\n checkWidthMode()\n stopInfiniteResizingOfIFrame()\n setupPublicMethods()\n setupMouseEvents()\n startEventListeners()\n inPageLinks = setupInPageLinks()\n sendSize('init', 'Init message from host page')\n onReady()\n }\n\n function readDataFromParent() {\n function strBool(str) {\n return 'true' === str\n }\n\n var data = initMsg.substr(msgIdLen).split(':')\n\n myID = data[0]\n bodyMargin = undefined !== data[1] ? Number(data[1]) : bodyMargin // For V1 compatibility\n calculateWidth = undefined !== data[2] ? strBool(data[2]) : calculateWidth\n logging = undefined !== data[3] ? strBool(data[3]) : logging\n interval = undefined !== data[4] ? Number(data[4]) : interval\n autoResize = undefined !== data[6] ? strBool(data[6]) : autoResize\n bodyMarginStr = data[7]\n heightCalcMode = undefined !== data[8] ? data[8] : heightCalcMode\n bodyBackground = data[9]\n bodyPadding = data[10]\n tolerance = undefined !== data[11] ? Number(data[11]) : tolerance\n inPageLinks.enable = undefined !== data[12] ? strBool(data[12]) : false\n resizeFrom = undefined !== data[13] ? data[13] : resizeFrom\n widthCalcMode = undefined !== data[14] ? data[14] : widthCalcMode\n mouseEvents = undefined !== data[15] ? Boolean(data[15]) : mouseEvents\n }\n\n function depricate(key) {\n var splitName = key.split('Callback')\n\n if (splitName.length === 2) {\n var name =\n 'on' + splitName[0].charAt(0).toUpperCase() + splitName[0].slice(1)\n this[name] = this[key]\n delete this[key]\n warn(\n \"Deprecated: '\" +\n key +\n \"' has been renamed '\" +\n name +\n \"'. The old method will be removed in the next major version.\"\n )\n }\n }\n\n function readDataFromPage() {\n function readData() {\n var data = window.iFrameResizer\n\n log('Reading data from page: ' + JSON.stringify(data))\n Object.keys(data).forEach(depricate, data)\n\n onMessage = 'onMessage' in data ? data.onMessage : onMessage\n onReady = 'onReady' in data ? data.onReady : onReady\n targetOriginDefault =\n 'targetOrigin' in data ? data.targetOrigin : targetOriginDefault\n heightCalcMode =\n 'heightCalculationMethod' in data\n ? data.heightCalculationMethod\n : heightCalcMode\n widthCalcMode =\n 'widthCalculationMethod' in data\n ? data.widthCalculationMethod\n : widthCalcMode\n }\n\n function setupCustomCalcMethods(calcMode, calcFunc) {\n if ('function' === typeof calcMode) {\n log('Setup custom ' + calcFunc + 'CalcMethod')\n customCalcMethods[calcFunc] = calcMode\n calcMode = 'custom'\n }\n\n return calcMode\n }\n\n if (\n 'iFrameResizer' in window &&\n Object === window.iFrameResizer.constructor\n ) {\n readData()\n heightCalcMode = setupCustomCalcMethods(heightCalcMode, 'height')\n widthCalcMode = setupCustomCalcMethods(widthCalcMode, 'width')\n }\n\n log('TargetOrigin for parent set to: ' + targetOriginDefault)\n }\n\n function chkCSS(attr, value) {\n if (-1 !== value.indexOf('-')) {\n warn('Negative CSS value ignored for ' + attr)\n value = ''\n }\n return value\n }\n\n function setBodyStyle(attr, value) {\n if (undefined !== value && '' !== value && 'null' !== value) {\n document.body.style[attr] = value\n log('Body ' + attr + ' set to \"' + value + '\"')\n }\n }\n\n function setMargin() {\n // If called via V1 script, convert bodyMargin from int to str\n if (undefined === bodyMarginStr) {\n bodyMarginStr = bodyMargin + 'px'\n }\n\n setBodyStyle('margin', chkCSS('margin', bodyMarginStr))\n }\n\n function stopInfiniteResizingOfIFrame() {\n document.documentElement.style.height = ''\n document.body.style.height = ''\n log('HTML & body height set to \"auto\"')\n }\n\n function manageTriggerEvent(options) {\n var listener = {\n add: function (eventName) {\n function handleEvent() {\n sendSize(options.eventName, options.eventType)\n }\n\n eventHandlersByName[eventName] = handleEvent\n\n addEventListener(window, eventName, handleEvent, { passive: true })\n },\n remove: function (eventName) {\n var handleEvent = eventHandlersByName[eventName]\n delete eventHandlersByName[eventName]\n\n removeEventListener(window, eventName, handleEvent)\n }\n }\n\n if (options.eventNames && Array.prototype.map) {\n options.eventName = options.eventNames[0]\n options.eventNames.map(listener[options.method])\n } else {\n listener[options.method](options.eventName)\n }\n\n log(\n capitalizeFirstLetter(options.method) +\n ' event listener: ' +\n options.eventType\n )\n }\n\n function manageEventListeners(method) {\n manageTriggerEvent({\n method: method,\n eventType: 'Animation Start',\n eventNames: ['animationstart', 'webkitAnimationStart']\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Animation Iteration',\n eventNames: ['animationiteration', 'webkitAnimationIteration']\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Animation End',\n eventNames: ['animationend', 'webkitAnimationEnd']\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Input',\n eventName: 'input'\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Mouse Up',\n eventName: 'mouseup'\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Mouse Down',\n eventName: 'mousedown'\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Orientation Change',\n eventName: 'orientationchange'\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Print',\n eventName: ['afterprint', 'beforeprint']\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Ready State Change',\n eventName: 'readystatechange'\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Touch Start',\n eventName: 'touchstart'\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Touch End',\n eventName: 'touchend'\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Touch Cancel',\n eventName: 'touchcancel'\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Transition Start',\n eventNames: [\n 'transitionstart',\n 'webkitTransitionStart',\n 'MSTransitionStart',\n 'oTransitionStart',\n 'otransitionstart'\n ]\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Transition Iteration',\n eventNames: [\n 'transitioniteration',\n 'webkitTransitionIteration',\n 'MSTransitionIteration',\n 'oTransitionIteration',\n 'otransitioniteration'\n ]\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Transition End',\n eventNames: [\n 'transitionend',\n 'webkitTransitionEnd',\n 'MSTransitionEnd',\n 'oTransitionEnd',\n 'otransitionend'\n ]\n })\n if ('child' === resizeFrom) {\n manageTriggerEvent({\n method: method,\n eventType: 'IFrame Resized',\n eventName: 'resize'\n })\n }\n }\n\n function checkCalcMode(calcMode, calcModeDefault, modes, type) {\n if (calcModeDefault !== calcMode) {\n if (!(calcMode in modes)) {\n warn(\n calcMode + ' is not a valid option for ' + type + 'CalculationMethod.'\n )\n calcMode = calcModeDefault\n }\n log(type + ' calculation method set to \"' + calcMode + '\"')\n }\n\n return calcMode\n }\n\n function checkHeightMode() {\n heightCalcMode = checkCalcMode(\n heightCalcMode,\n heightCalcModeDefault,\n getHeight,\n 'height'\n )\n }\n\n function checkWidthMode() {\n widthCalcMode = checkCalcMode(\n widthCalcMode,\n widthCalcModeDefault,\n getWidth,\n 'width'\n )\n }\n\n function startEventListeners() {\n if (true === autoResize) {\n manageEventListeners('add')\n setupMutationObserver()\n } else {\n log('Auto Resize disabled')\n }\n }\n\n // function stopMsgsToParent() {\n // log('Disable outgoing messages')\n // sendPermit = false\n // }\n\n // function removeMsgListener() {\n // log('Remove event listener: Message')\n // removeEventListener(window, 'message', receiver)\n // }\n\n function disconnectMutationObserver() {\n if (null !== bodyObserver) {\n /* istanbul ignore next */ // Not testable in PhantonJS\n bodyObserver.disconnect()\n }\n }\n\n function stopEventListeners() {\n manageEventListeners('remove')\n disconnectMutationObserver()\n clearInterval(intervalTimer)\n }\n\n // function teardown() {\n // stopMsgsToParent()\n // removeMsgListener()\n // if (true === autoResize) stopEventListeners()\n // }\n\n function injectClearFixIntoBodyElement() {\n var clearFix = document.createElement('div')\n clearFix.style.clear = 'both'\n // Guard against the following having been globally redefined in CSS.\n clearFix.style.display = 'block'\n clearFix.style.height = '0'\n document.body.appendChild(clearFix)\n }\n\n function setupInPageLinks() {\n function getPagePosition() {\n return {\n x:\n window.pageXOffset !== undefined\n ? window.pageXOffset\n : document.documentElement.scrollLeft,\n y:\n window.pageYOffset !== undefined\n ? window.pageYOffset\n : document.documentElement.scrollTop\n }\n }\n\n function getElementPosition(el) {\n var elPosition = el.getBoundingClientRect(),\n pagePosition = getPagePosition()\n\n return {\n x: parseInt(elPosition.left, 10) + parseInt(pagePosition.x, 10),\n y: parseInt(elPosition.top, 10) + parseInt(pagePosition.y, 10)\n }\n }\n\n function findTarget(location) {\n function jumpToTarget(target) {\n var jumpPosition = getElementPosition(target)\n\n log(\n 'Moving to in page link (#' +\n hash +\n ') at x: ' +\n jumpPosition.x +\n ' y: ' +\n jumpPosition.y\n )\n sendMsg(jumpPosition.y, jumpPosition.x, 'scrollToOffset') // X&Y reversed at sendMsg uses height/width\n }\n\n var hash = location.split('#')[1] || location, // Remove # if present\n hashData = decodeURIComponent(hash),\n target =\n document.getElementById(hashData) ||\n document.getElementsByName(hashData)[0]\n\n if (undefined !== target) {\n jumpToTarget(target)\n } else {\n log(\n 'In page link (#' +\n hash +\n ') not found in iFrame, so sending to parent'\n )\n sendMsg(0, 0, 'inPageLink', '#' + hash)\n }\n }\n\n function checkLocationHash() {\n var hash = window.location.hash\n var href = window.location.href\n\n if ('' !== hash && '#' !== hash) {\n findTarget(href)\n }\n }\n\n function bindAnchors() {\n function setupLink(el) {\n function linkClicked(e) {\n e.preventDefault()\n\n /* jshint validthis:true */\n findTarget(this.getAttribute('href'))\n }\n\n if ('#' !== el.getAttribute('href')) {\n addEventListener(el, 'click', linkClicked)\n }\n }\n\n Array.prototype.forEach.call(\n document.querySelectorAll('a[href^=\"#\"]'),\n setupLink\n )\n }\n\n function bindLocationHash() {\n addEventListener(window, 'hashchange', checkLocationHash)\n }\n\n function initCheck() {\n // Check if page loaded with location hash after init resize\n setTimeout(checkLocationHash, eventCancelTimer)\n }\n\n function enableInPageLinks() {\n /* istanbul ignore else */ // Not testable in phantonJS\n if (Array.prototype.forEach && document.querySelectorAll) {\n log('Setting up location.hash handlers')\n bindAnchors()\n bindLocationHash()\n initCheck()\n } else {\n warn(\n 'In page linking not fully supported in this browser! (See README.md for IE8 workaround)'\n )\n }\n }\n\n if (inPageLinks.enable) {\n enableInPageLinks()\n } else {\n log('In page linking not enabled')\n }\n\n return {\n findTarget: findTarget\n }\n }\n\n function setupMouseEvents() {\n if (mouseEvents !== true) return\n\n function sendMouse(e) {\n sendMsg(0, 0, e.type, e.screenY + ':' + e.screenX)\n }\n\n function addMouseListener(evt, name) {\n log('Add event listener: ' + name)\n addEventListener(window.document, evt, sendMouse)\n }\n\n addMouseListener('mouseenter', 'Mouse Enter')\n addMouseListener('mouseleave', 'Mouse Leave')\n }\n\n function setupPublicMethods() {\n log('Enable public methods')\n\n win.parentIFrame = {\n autoResize: function autoResizeF(resize) {\n if (true === resize && false === autoResize) {\n autoResize = true\n startEventListeners()\n } else if (false === resize && true === autoResize) {\n autoResize = false\n stopEventListeners()\n }\n sendMsg(0, 0, 'autoResize', JSON.stringify(autoResize))\n return autoResize\n },\n\n close: function closeF() {\n sendMsg(0, 0, 'close')\n // teardown()\n },\n\n getId: function getIdF() {\n return myID\n },\n\n getPageInfo: function getPageInfoF(callback) {\n if ('function' === typeof callback) {\n onPageInfo = callback\n sendMsg(0, 0, 'pageInfo')\n } else {\n onPageInfo = function () {}\n sendMsg(0, 0, 'pageInfoStop')\n }\n },\n\n moveToAnchor: function moveToAnchorF(hash) {\n inPageLinks.findTarget(hash)\n },\n\n reset: function resetF() {\n resetIFrame('parentIFrame.reset')\n },\n\n scrollTo: function scrollToF(x, y) {\n sendMsg(y, x, 'scrollTo') // X&Y reversed at sendMsg uses height/width\n },\n\n scrollToOffset: function scrollToF(x, y) {\n sendMsg(y, x, 'scrollToOffset') // X&Y reversed at sendMsg uses height/width\n },\n\n sendMessage: function sendMessageF(msg, targetOrigin) {\n sendMsg(0, 0, 'message', JSON.stringify(msg), targetOrigin)\n },\n\n setHeightCalculationMethod: function setHeightCalculationMethodF(\n heightCalculationMethod\n ) {\n heightCalcMode = heightCalculationMethod\n checkHeightMode()\n },\n\n setWidthCalculationMethod: function setWidthCalculationMethodF(\n widthCalculationMethod\n ) {\n widthCalcMode = widthCalculationMethod\n checkWidthMode()\n },\n\n setTargetOrigin: function setTargetOriginF(targetOrigin) {\n log('Set targetOrigin: ' + targetOrigin)\n targetOriginDefault = targetOrigin\n },\n\n size: function sizeF(customHeight, customWidth) {\n var valString =\n '' + (customHeight || '') + (customWidth ? ',' + customWidth : '')\n sendSize(\n 'size',\n 'parentIFrame.size(' + valString + ')',\n customHeight,\n customWidth\n )\n }\n }\n }\n\n function initInterval() {\n if (0 !== interval) {\n log('setInterval: ' + interval + 'ms')\n intervalTimer = setInterval(function () {\n sendSize('interval', 'setInterval: ' + interval)\n }, Math.abs(interval))\n }\n }\n\n // Not testable in PhantomJS\n /* istanbul ignore next */\n function setupBodyMutationObserver() {\n function addImageLoadListners(mutation) {\n function addImageLoadListener(element) {\n if (false === element.complete) {\n log('Attach listeners to ' + element.src)\n element.addEventListener('load', imageLoaded, false)\n element.addEventListener('error', imageError, false)\n elements.push(element)\n }\n }\n\n if (mutation.type === 'attributes' && mutation.attributeName === 'src') {\n addImageLoadListener(mutation.target)\n } else if (mutation.type === 'childList') {\n Array.prototype.forEach.call(\n mutation.target.querySelectorAll('img'),\n addImageLoadListener\n )\n }\n }\n\n function removeFromArray(element) {\n elements.splice(elements.indexOf(element), 1)\n }\n\n function removeImageLoadListener(element) {\n log('Remove listeners from ' + element.src)\n element.removeEventListener('load', imageLoaded, false)\n element.removeEventListener('error', imageError, false)\n removeFromArray(element)\n }\n\n function imageEventTriggered(event, type, typeDesc) {\n removeImageLoadListener(event.target)\n sendSize(type, typeDesc + ': ' + event.target.src)\n }\n\n function imageLoaded(event) {\n imageEventTriggered(event, 'imageLoad', 'Image loaded')\n }\n\n function imageError(event) {\n imageEventTriggered(event, 'imageLoadFailed', 'Image load failed')\n }\n\n function mutationObserved(mutations) {\n sendSize(\n 'mutationObserver',\n 'mutationObserver: ' + mutations[0].target + ' ' + mutations[0].type\n )\n\n // Deal with WebKit / Blink asyncing image loading when tags are injected into the page\n mutations.forEach(addImageLoadListners)\n }\n\n function createMutationObserver() {\n var target = document.querySelector('body'),\n config = {\n attributes: true,\n attributeOldValue: false,\n characterData: true,\n characterDataOldValue: false,\n childList: true,\n subtree: true\n }\n\n observer = new MutationObserver(mutationObserved)\n\n log('Create body MutationObserver')\n observer.observe(target, config)\n\n return observer\n }\n\n var elements = [],\n MutationObserver =\n window.MutationObserver || window.WebKitMutationObserver,\n observer = createMutationObserver()\n\n return {\n disconnect: function () {\n if ('disconnect' in observer) {\n log('Disconnect body MutationObserver')\n observer.disconnect()\n elements.forEach(removeImageLoadListener)\n }\n }\n }\n }\n\n function setupMutationObserver() {\n var forceIntervalTimer = 0 > interval\n\n // Not testable in PhantomJS\n /* istanbul ignore if */ if (\n window.MutationObserver ||\n window.WebKitMutationObserver\n ) {\n if (forceIntervalTimer) {\n initInterval()\n } else {\n bodyObserver = setupBodyMutationObserver()\n }\n } else {\n log('MutationObserver not supported in this browser!')\n initInterval()\n }\n }\n\n // document.documentElement.offsetHeight is not reliable, so\n // we have to jump through hoops to get a better value.\n function getComputedStyle(prop, el) {\n var retVal = 0\n el = el || document.body // Not testable in phantonJS\n\n retVal = document.defaultView.getComputedStyle(el, null)\n retVal = null !== retVal ? retVal[prop] : 0\n\n return parseInt(retVal, base)\n }\n\n function chkEventThottle(timer) {\n if (timer > throttledTimer / 2) {\n throttledTimer = 2 * timer\n log('Event throttle increased to ' + throttledTimer + 'ms')\n }\n }\n\n // Idea from https://github.com/guardian/iframe-messenger\n function getMaxElement(side, elements) {\n var elementsLength = elements.length,\n elVal = 0,\n maxVal = 0,\n Side = capitalizeFirstLetter(side),\n timer = Date.now()\n\n for (var i = 0; i < elementsLength; i++) {\n elVal =\n elements[i].getBoundingClientRect()[side] +\n getComputedStyle('margin' + Side, elements[i])\n if (elVal > maxVal) {\n maxVal = elVal\n }\n }\n\n timer = Date.now() - timer\n\n log('Parsed ' + elementsLength + ' HTML elements')\n log('Element position calculated in ' + timer + 'ms')\n\n chkEventThottle(timer)\n\n return maxVal\n }\n\n function getAllMeasurements(dimensions) {\n return [\n dimensions.bodyOffset(),\n dimensions.bodyScroll(),\n dimensions.documentElementOffset(),\n dimensions.documentElementScroll()\n ]\n }\n\n function getTaggedElements(side, tag) {\n function noTaggedElementsFound() {\n warn('No tagged elements (' + tag + ') found on page')\n return document.querySelectorAll('body *')\n }\n\n var elements = document.querySelectorAll('[' + tag + ']')\n\n if (elements.length === 0) noTaggedElementsFound()\n\n return getMaxElement(side, elements)\n }\n\n function getAllElements() {\n return document.querySelectorAll('body *')\n }\n\n var getHeight = {\n bodyOffset: function getBodyOffsetHeight() {\n return (\n document.body.offsetHeight +\n getComputedStyle('marginTop') +\n getComputedStyle('marginBottom')\n )\n },\n\n offset: function () {\n return getHeight.bodyOffset() // Backwards compatability\n },\n\n bodyScroll: function getBodyScrollHeight() {\n return document.body.scrollHeight\n },\n\n custom: function getCustomWidth() {\n return customCalcMethods.height()\n },\n\n documentElementOffset: function getDEOffsetHeight() {\n return document.documentElement.offsetHeight\n },\n\n documentElementScroll: function getDEScrollHeight() {\n return document.documentElement.scrollHeight\n },\n\n max: function getMaxHeight() {\n return Math.max.apply(null, getAllMeasurements(getHeight))\n },\n\n min: function getMinHeight() {\n return Math.min.apply(null, getAllMeasurements(getHeight))\n },\n\n grow: function growHeight() {\n return getHeight.max() // Run max without the forced downsizing\n },\n\n lowestElement: function getBestHeight() {\n return Math.max(\n getHeight.bodyOffset() || getHeight.documentElementOffset(),\n getMaxElement('bottom', getAllElements())\n )\n },\n\n taggedElement: function getTaggedElementsHeight() {\n return getTaggedElements('bottom', 'data-iframe-height')\n }\n },\n getWidth = {\n bodyScroll: function getBodyScrollWidth() {\n return document.body.scrollWidth\n },\n\n bodyOffset: function getBodyOffsetWidth() {\n return document.body.offsetWidth\n },\n\n custom: function getCustomWidth() {\n return customCalcMethods.width()\n },\n\n documentElementScroll: function getDEScrollWidth() {\n return document.documentElement.scrollWidth\n },\n\n documentElementOffset: function getDEOffsetWidth() {\n return document.documentElement.offsetWidth\n },\n\n scroll: function getMaxWidth() {\n return Math.max(getWidth.bodyScroll(), getWidth.documentElementScroll())\n },\n\n max: function getMaxWidth() {\n return Math.max.apply(null, getAllMeasurements(getWidth))\n },\n\n min: function getMinWidth() {\n return Math.min.apply(null, getAllMeasurements(getWidth))\n },\n\n rightMostElement: function rightMostElement() {\n return getMaxElement('right', getAllElements())\n },\n\n taggedElement: function getTaggedElementsWidth() {\n return getTaggedElements('right', 'data-iframe-width')\n }\n }\n\n function sizeIFrame(\n triggerEvent,\n triggerEventDesc,\n customHeight,\n customWidth\n ) {\n function resizeIFrame() {\n height = currentHeight\n width = currentWidth\n\n sendMsg(height, width, triggerEvent)\n }\n\n function isSizeChangeDetected() {\n function checkTolarance(a, b) {\n var retVal = Math.abs(a - b) <= tolerance\n return !retVal\n }\n\n currentHeight =\n undefined !== customHeight ? customHeight : getHeight[heightCalcMode]()\n currentWidth =\n undefined !== customWidth ? customWidth : getWidth[widthCalcMode]()\n\n return (\n checkTolarance(height, currentHeight) ||\n (calculateWidth && checkTolarance(width, currentWidth))\n )\n }\n\n function isForceResizableEvent() {\n return !(triggerEvent in { init: 1, interval: 1, size: 1 })\n }\n\n function isForceResizableCalcMode() {\n return (\n heightCalcMode in resetRequiredMethods ||\n (calculateWidth && widthCalcMode in resetRequiredMethods)\n )\n }\n\n function logIgnored() {\n log('No change in size detected')\n }\n\n function checkDownSizing() {\n if (isForceResizableEvent() && isForceResizableCalcMode()) {\n resetIFrame(triggerEventDesc)\n } else if (!(triggerEvent in { interval: 1 })) {\n logIgnored()\n }\n }\n\n var currentHeight, currentWidth\n\n if (isSizeChangeDetected() || 'init' === triggerEvent) {\n lockTrigger()\n resizeIFrame()\n } else {\n checkDownSizing()\n }\n }\n\n var sizeIFrameThrottled = throttle(sizeIFrame)\n\n function sendSize(triggerEvent, triggerEventDesc, customHeight, customWidth) {\n function recordTrigger() {\n if (!(triggerEvent in { reset: 1, resetPage: 1, init: 1 })) {\n log('Trigger event: ' + triggerEventDesc)\n }\n }\n\n function isDoubleFiredEvent() {\n return triggerLocked && triggerEvent in doubleEventList\n }\n\n if (!isDoubleFiredEvent()) {\n recordTrigger()\n if (triggerEvent === 'init') {\n sizeIFrame(triggerEvent, triggerEventDesc, customHeight, customWidth)\n } else {\n sizeIFrameThrottled(\n triggerEvent,\n triggerEventDesc,\n customHeight,\n customWidth\n )\n }\n } else {\n log('Trigger event cancelled: ' + triggerEvent)\n }\n }\n\n function lockTrigger() {\n if (!triggerLocked) {\n triggerLocked = true\n log('Trigger event lock on')\n }\n clearTimeout(triggerLockedTimer)\n triggerLockedTimer = setTimeout(function () {\n triggerLocked = false\n log('Trigger event lock off')\n log('--')\n }, eventCancelTimer)\n }\n\n function triggerReset(triggerEvent) {\n height = getHeight[heightCalcMode]()\n width = getWidth[widthCalcMode]()\n\n sendMsg(height, width, triggerEvent)\n }\n\n function resetIFrame(triggerEventDesc) {\n var hcm = heightCalcMode\n heightCalcMode = heightCalcModeDefault\n\n log('Reset trigger event: ' + triggerEventDesc)\n lockTrigger()\n triggerReset('reset')\n\n heightCalcMode = hcm\n }\n\n function sendMsg(height, width, triggerEvent, msg, targetOrigin) {\n function setTargetOrigin() {\n if (undefined === targetOrigin) {\n targetOrigin = targetOriginDefault\n } else {\n log('Message targetOrigin: ' + targetOrigin)\n }\n }\n\n function sendToParent() {\n var size = height + ':' + width,\n message =\n myID +\n ':' +\n size +\n ':' +\n triggerEvent +\n (undefined !== msg ? ':' + msg : '')\n\n log('Sending message to host page (' + message + ')')\n target.postMessage(msgID + message, targetOrigin)\n }\n\n if (true === sendPermit) {\n setTargetOrigin()\n sendToParent()\n }\n }\n\n function receiver(event) {\n var processRequestFromParent = {\n init: function initFromParent() {\n initMsg = event.data\n target = event.source\n\n init()\n firstRun = false\n setTimeout(function () {\n initLock = false\n }, eventCancelTimer)\n },\n\n reset: function resetFromParent() {\n if (!initLock) {\n log('Page size reset by host page')\n triggerReset('resetPage')\n } else {\n log('Page reset ignored by init')\n }\n },\n\n resize: function resizeFromParent() {\n sendSize('resizeParent', 'Parent window requested size check')\n },\n\n moveToAnchor: function moveToAnchorF() {\n inPageLinks.findTarget(getData())\n },\n inPageLink: function inPageLinkF() {\n this.moveToAnchor()\n }, // Backward compatability\n\n pageInfo: function pageInfoFromParent() {\n var msgBody = getData()\n log('PageInfoFromParent called from parent: ' + msgBody)\n onPageInfo(JSON.parse(msgBody))\n log(' --')\n },\n\n message: function messageFromParent() {\n var msgBody = getData()\n\n log('onMessage called from parent: ' + msgBody)\n // eslint-disable-next-line sonarjs/no-extra-arguments\n onMessage(JSON.parse(msgBody))\n log(' --')\n }\n }\n\n function isMessageForUs() {\n return msgID === ('' + event.data).substr(0, msgIdLen) // ''+ Protects against non-string messages\n }\n\n function getMessageType() {\n return event.data.split(']')[1].split(':')[0]\n }\n\n function getData() {\n return event.data.substr(event.data.indexOf(':') + 1)\n }\n\n function isMiddleTier() {\n return (\n (!(typeof module !== 'undefined' && module.exports) &&\n 'iFrameResize' in window) ||\n ('jQuery' in window && 'iFrameResize' in window.jQuery.prototype)\n )\n }\n\n function isInitMsg() {\n // Test if this message is from a child below us. This is an ugly test, however, updating\n // the message format would break backwards compatibity.\n return event.data.split(':')[2] in { true: 1, false: 1 }\n }\n\n function callFromParent() {\n var messageType = getMessageType()\n\n if (messageType in processRequestFromParent) {\n processRequestFromParent[messageType]()\n } else if (!isMiddleTier() && !isInitMsg()) {\n warn('Unexpected message (' + event.data + ')')\n }\n }\n\n function processMessage() {\n if (false === firstRun) {\n callFromParent()\n } else if (isInitMsg()) {\n processRequestFromParent.init()\n } else {\n log(\n 'Ignored message of type \"' +\n getMessageType() +\n '\". Received before initialization.'\n )\n }\n }\n\n if (isMessageForUs()) {\n processMessage()\n }\n }\n\n // Normally the parent kicks things off when it detects the iFrame has loaded.\n // If this script is async-loaded, then tell parent page to retry init.\n function chkLateLoaded() {\n if ('loading' !== document.readyState) {\n window.parent.postMessage('[iFrameResizerChild]Ready', '*')\n }\n }\n\n addEventListener(window, 'message', receiver)\n addEventListener(window, 'readystatechange', chkLateLoaded)\n chkLateLoaded()\n\n \n})()\n"],"names":["undefined","window","autoResize","bodyBackground","bodyMargin","bodyMarginStr","bodyObserver","bodyPadding","calculateWidth","doubleEventList","resize","click","eventCancelTimer","firstRun","height1","heightCalcModeDefault","heightCalcMode","initLock","initMsg","inPageLinks","interval","intervalTimer","logging","mouseEvents","msgID","msgIdLen","length","myID","resetRequiredMethods","max","min","bodyScroll","documentElementScroll","resizeFrom","target1","parent","targetOriginDefault","tolerance","triggerLocked","triggerLockedTimer","throttledTimer","width1","widthCalcModeDefault","widthCalcMode","win","onMessage","warn","onReady","onPageInfo","customCalcMethods","height","document","documentElement","offsetHeight","width","body","scrollWidth","eventHandlersByName","passiveSupported","options","Object","create","passive","get","addEventListener","noop","removeEventListener","error","func","context","args","result","timeout","previous","later","getHeight","bodyOffset","getComputedStyle","offset","scrollHeight","custom","documentElementOffset","Math","apply","getAllMeasurements","grow","lowestElement","getMaxElement","getAllElements","taggedElement","getTaggedElements","getWidth","offsetWidth","scroll","rightMostElement","sizeIFrameThrottled","sizeIFrame","Date","now","remaining","this","arguments","clearTimeout","setTimeout","event","processRequestFromParent","init","data","source","reset","log","triggerReset","sendSize","moveToAnchor","findTarget","getData","inPageLink","pageInfo","msgBody","JSON","parse","message","getMessageType","split","substr","indexOf","isInitMsg","true","false","callFromParent","messageType","$67c5fd56d272e940$exports","jQuery","prototype","chkLateLoaded","el","evt","capitalizeFirstLetter","string","charAt","toUpperCase","slice","formatLogMsg","msg","console","clearFix","strBool","str","Number","enable","Boolean","readDataFromParent","location","href","readData","iFrameResizer","stringify","keys","forEach","depricate","targetOrigin","heightCalculationMethod","widthCalculationMethod","setupCustomCalcMethods","calcMode","calcFunc","constructor","readDataFromPage","setBodyStyle","attr","value","chkCSS","setMargin","createElement","style","clear","display","appendChild","checkHeightMode","checkWidthMode","parentIFrame","startEventListeners","manageEventListeners","disconnect","clearInterval","sendMsg","close","getId","getPageInfo","callback","hash","resetIFrame","scrollTo","x","y","scrollToOffset","sendMessage","setHeightCalculationMethod","setWidthCalculationMethod","setTargetOrigin","size","customHeight","customWidth","sendMouse","e","type","screenY","screenX","addMouseListener","name","setupMouseEvents","getPagePosition","pageXOffset","scrollLeft","pageYOffset","scrollTop","getElementPosition","elPosition","getBoundingClientRect","pagePosition","parseInt","left","top","jumpToTarget","target","jumpPosition","hashData","decodeURIComponent","target2","getElementById","getElementsByName","checkLocationHash","bindAnchors","setupLink","linkClicked","preventDefault","getAttribute","Array","call","querySelectorAll","bindLocationHash","initCheck","enableInPageLinks","setupInPageLinks","key","splitName","manageTriggerEvent","listener","add","eventName","handleEvent","eventType","remove","eventNames","map","method","checkCalcMode","calcModeDefault","modes","forceIntervalTimer","MutationObserver","WebKitMutationObserver","initInterval","addImageLoadListners","mutation","addImageLoadListener","element","complete","src","imageLoaded","imageError","elements","push","attributeName","removeFromArray","splice","removeImageLoadListener","imageEventTriggered","typeDesc","mutationObserved","mutations","createMutationObserver","querySelector","config","attributes","attributeOldValue","characterData","characterDataOldValue","childList","subtree","observer","observe","setupBodyMutationObserver","setInterval","abs","prop","retVal","defaultView","side","elementsLength","elVal","maxVal","Side","timer","i","chkEventThottle","dimensions","tag","triggerEvent","triggerEventDesc","currentHeight","currentWidth","checkTolarance","a","b","isSizeChangeDetected","lockTrigger","resetPage","hcm","postMessage","readyState"],"version":3,"file":"embed.js.map"}