{"version":3,"sources":["webpack:///./PandoSites.Web/Shared/DoubleClick/Scripts/_utilities.js","webpack:///./PandoSites.Web/Shared/DoubleClick/Scripts/_doubleClickAd.js","webpack:///./PandoSites.Web/Shared/DoubleClick/Scripts/doubleClickContainer.vue?e181","webpack:///./PandoSites.Web/Shared/DoubleClick/Scripts/doubleClickContainer.vue?2ee6","webpack:///./PandoSites.Web/Shared/DoubleClick/Scripts/doubleClickContainer.vue","webpack:///./PandoSites.Web/Shared/DoubleClick/Scripts/_adhesiveAdObserver.js"],"names":["_utilities_external","debugMode","_utilities_internal","googleServicesEnabled","constants","defaultLyticsWaitTime","refreshTargetingKey","refreshTargetingValue","refreshDelaySeconds","initialize","settings","alreadyInitialized","GeneralMills","debugDoubleClickComponent","window","location","search","match","console","log","stopWatches","initializeGoogleTagApi","enableGoogleServicesForPage","testMode","internal","createStopWatch","adContainerId","adDisplayRequested","adSlotRendered","adLoaded","lyticsDataRequested","lyticsLoaded","startTimer","stopWatchProperty","Date","now","getTimeSpan","startTime","endTime","userHasRestrictionCookie","b","document","cookie","pop","googletag","cmd","push","pubads","disableInitialLoad","enableAsyncRendering","PrivacyOptOut","setPrivacySettings","restrictDataProcessing","subscribeToGoogleTagImpressionEvent","subscribeToGoogleTagEvents","adSettings","relevantMetadata","length","setTargeting","enableServices","showTimingData","adSlot","getSlotElementId","adUnitPath","getAdUnitPath","adStopWatch","message","addEventListener","event","slot","isEmpty","inViewPercentage","getTargeting","indexOf","setTimeout","refresh","Scripts_doubleClickContainervue_type_script_lang_js_","data","userClosedAd","windowWidth","ad","methods","init","this","minPageWidth","defaultMinPageWidth","maxPageWidth","defaultMaxPageWidth","doubleClickAdContainerId","elementId","parent","$el","parentElement","classList","contains","firstElementChild","_adhesiveAdObserver","closeAd","computed","showAd","Number","watch","newVal","external","load","adSlotSettings","adId","adSize","parseAdSizeArray","size","networkCode","refreshWhenViewed","renderAdSlot","sizeArray","JSON","parse","error","targetingData","defineSlot","addService","key","segments","display","mounted","_this","innerWidth","component","Object","componentNormalizer","render","staticRenderFns","options","__file","__webpack_exports__","__webpack_require__","config","isRdp","isPdp","rdpSelector","pdpSelector","spacingSelector","adhesiveAdSelector","adhesiveHeaderAdFixedClass","logMessage","forceLog","setupHeaderAdSpacing","spacing","querySelector","add","body","closeButtons","getElementsByClassName","i","onclick","remove","addObserver","adhesiveAd","children"],"mappings":"0HAEIA,EAAQ,CACZC,WAAA,GAEIC,EAAQ,CACZC,uBAAA,GAEAH,EAAQI,UAAA,CACRC,sBAAA,KACAC,oBAAA,UACAC,sBAAA,OACAC,oBAAA,IAGAR,EAAQS,WAAA,SAAAC,GACFR,EAAQS,qBACZT,EAAQS,oBAAA,EACRX,EAAQC,YAAAW,aAAAC,6BAAAC,OAAAC,SAAAC,OAAAC,MAAA,mCACRjB,EAAQC,WAAAiB,QAAAC,IAAA,sDACRnB,EAAQoB,YAAA,GACRlB,EAAQmB,uBAAAX,GACRR,EAAQoB,4BAAAZ,GAEVA,EAAAa,WACIvB,EAAQwB,SAAYtB,KAIxBF,EAAQyB,gBAAA,SAAAC,GACR,OAAM1B,EAAQoB,YAAAM,GAAoC1B,EAAQoB,YAAAM,IAExD1B,EAAQoB,YAAAM,GAAA,CACVC,mBAAA,EACAC,eAAA,EACAC,SAAA,EACAC,oBAAA,EACAC,aAAA,GAES/B,EAAQoB,YAAAM,KAGjB1B,EAAQgC,WAAA,SAAAN,EAAAO,GACDjC,EAAQoB,YAAAM,IACX1B,EAAQyB,gBAAAC,GAIV1B,EAAQoB,YAAAM,GAAAO,GAAAC,KAAAC,OAGVnC,EAAQoC,YAAA,SAAAC,EAAAC,GACR,OAAAA,EAAAD,GAIAnC,EAAQqC,yBAAA,WACR,IACAC,EAAAC,SAAAC,OAAAzB,MAAA,kEACA,SAAAuB,GAAA,MAAAA,EAAAG,QAIAzC,EAAQmB,uBAAA,SAAAX,GACRI,OAAA8B,UAAA9B,OAAA8B,WAAA,GACA9B,OAAA8B,UAAAC,IAAA/B,OAAA8B,U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EA,GAAA7D,EAGA,IAFA,IAAAsE,EAAAtE,EAAAuE,uBAAA,iBAEAC,EAAA,EAAqBA,EAAAF,EAAA7F,OAAyB+F,IAC9CF,EAAAE,GAAAC,QAAA,WACAP,KAAArD,UAAA6D,OAAA,WACAjH,SAAA4G,KAAAxD,UAAA6D,OAAAlI,EAAAsH,8BAMAtH,EAAAmI,YAAA,WACAnI,EAAAyH,wBAGAzH,EAAAf,WAAA,WACAe,EAAAgH,QAAA/F,SAAA0G,cAAA3H,EAAAkH,aACAlH,EAAAiH,QAAAhG,SAAA0G,cAAA3H,EAAAmH,aACA,IAAAiB,EAAAnH,SAAA0G,cAAA3H,EAAAqH,oBAEAe,KAAAC,SAAApG,OAAA,KACAjC,EAAAgH,OAAAhH,EAAAiH,QAAAmB,EAAA/D,UAAAuD,IAAA,0BACA5H,EAAAmI,gBAKAnI,EAAAf,WAAA8H,GACAhC","file":"dblClick.b8574fd1a5f7e7f39396.chunk.js","sourcesContent":["export { external as default }; //util functions to be shared by all ad instances on the page \n\nvar external = {\n debugMode: false\n};\nvar internal = {\n googleServicesEnabled: false\n};\nexternal.constants = {\n defaultLyticsWaitTime: 9999,\n refreshTargetingKey: \"refresh\",\n refreshTargetingValue: \"true\",\n refreshDelaySeconds: 30\n}; //one-time initialization logic for page\n\nexternal.initialize = function (settings) {\n if (internal.alreadyInitialized) return;\n internal.alreadyInitialized = true;\n external.debugMode = !!GeneralMills.debugDoubleClickComponent || !!window.location.search.match(/debugDoubleClickComponent=true/i);\n external.debugMode && console.log(\"[DoubleClick] Initializing DoubleClick for page...\");\n external.stopWatches = {};\n internal.initializeGoogleTagApi(settings);\n internal.enableGoogleServicesForPage(settings);\n\n if (settings.testMode) {\n external.internal = internal;\n }\n};\n\nexternal.createStopWatch = function (adContainerId) {\n if (external.stopWatches[adContainerId]) return external.stopWatches[adContainerId]; //creates a new stopwatch per ad\n\n external.stopWatches[adContainerId] = {\n adDisplayRequested: 0,\n adSlotRendered: 0,\n adLoaded: 0,\n lyticsDataRequested: 0,\n lyticsLoaded: 0\n };\n return external.stopWatches[adContainerId];\n};\n\nexternal.startTimer = function (adContainerId, stopWatchProperty) {\n if (!external.stopWatches[adContainerId]) {\n external.createStopWatch(adContainerId);\n } //start the timer for this ad's stopwatch field\n\n\n external.stopWatches[adContainerId][stopWatchProperty] = Date.now();\n};\n\nexternal.getTimeSpan = function (startTime, endTime) {\n return endTime - startTime; //timespan in number of milliseconds\n}; // Original GAM opt-out, need to keep until Jan 2021\n\n\ninternal.userHasRestrictionCookie = function () {\n var name = \"DoubleClickRestrictDataProcessing\";\n var b = document.cookie.match('(^|[^;]+)\\\\s*' + name + '\\\\s*=\\\\s*([^;]+)');\n if (b && b.pop() === \"1\") return true;\n return false;\n};\n\ninternal.initializeGoogleTagApi = function (settings) {\n window.googletag = window.googletag || {};\n window.googletag.cmd = window.googletag.cmd || [];\n window.googletag.cmd.push(function () {\n //disable initial load until each ad slot calls it's own refresh() to display: https://support.google.com/dfp_premium/answer/4578089#lazyloading\n window.googletag.pubads().disableInitialLoad();\n window.googletag.pubads().enableAsyncRendering(); //async rendering: https://support.google.com/dfp_premium/answer/183282\n // If user has opted out of personalization, set privacy restriction\n\n if (settings.PrivacyOptOut || internal.userHasRestrictionCookie()) googletag.pubads().setPrivacySettings({\n 'restrictDataProcessing': true\n });\n });\n internal.subscribeToGoogleTagImpressionEvent();\n\n if (external.debugMode) {\n internal.subscribeToGoogleTagEvents();\n }\n};\n\ninternal.enableGoogleServicesForPage = function (adSettings) {\n //only execute page-level calls once per page\n if (internal.googleServicesEnabled) return;\n internal.googleServicesEnabled = true; //set page-level settings prior to calling enableServices(): \n //https://developers.google.com/doubleclick-gpt/common_implementation_mistakes#scenario-5-mis-ordering-calls-to-gpt\n\n window.googletag.cmd.push(function () {\n //page-level targeting values from metadata\n if (adSettings.relevantMetadata && adSettings.relevantMetadata.length > 0) window.googletag.pubads().setTargeting(\"keywords\", adSettings.relevantMetadata);\n window.googletag.enableServices();\n external.debugMode && console.log(\"[DoubleClick] GPT services enabled for page.\");\n });\n};\n\ninternal.showTimingData = function (adSlot) {\n if (!adSlot) return;\n var adContainerId = adSlot.getSlotElementId();\n var adUnitPath = adSlot.getAdUnitPath();\n var adStopWatch = external.stopWatches[adContainerId];\n if (!adStopWatch) return;\n var adLoadTime = external.getTimeSpan(adStopWatch.adDisplayRequested, adStopWatch.adLoaded);\n var message = \"[DoubleClick][GPT] Ad load complete(contents loaded): \" + adUnitPath + \"\\r\\nLoad Time(ms): \" + adLoadTime;\n console.log(message);\n};\n\ninternal.subscribeToGoogleTagEvents = function () {\n //Subscribe to GPT specific service events: https://developers.google.com/doubleclick-gpt/reference#googletagservice\n window.googletag.cmd.push(function () {\n //Fires when the pubads service renders (creative code is injected into slot).\n //This will occur before the creative's resources are fetched, so the creative may not be visible yet\n window.googletag.pubads().addEventListener(\"slotRenderEnded\", function (event) {\n if (!event || !event.slot) return;\n var adUnitPath = event.slot.getAdUnitPath();\n\n if (event.isEmpty) {\n external.debugMode && console.log(\"[DoubleClick][GPT] No ad returned for unit: \" + adUnitPath);\n }\n\n var adContainerId = event.slot.getSlotElementId();\n external.startTimer(adContainerId, \"adSlotRendered\");\n external.debugMode && console.log(\"[DoubleClick][GPT] Slot is ready(contents loading): \" + adUnitPath);\n }); //Fires when the creative's iframe fires its load event\n\n window.googletag.pubads().addEventListener(\"slotOnload\", function (event) {\n if (!event || !event.slot) return;\n var adContainerId = event.slot.getSlotElementId();\n external.startTimer(adContainerId, \"adLoaded\");\n external.debugMode && internal.showTimingData(event.slot);\n }); //Fires whenever the on-screen percentage of an ad slot's area changes\n\n window.googletag.pubads().addEventListener(\"slotVisibilityChanged\", function (event) {\n if (!event || !event.slot) return;\n var adUnitPath = event.slot.getAdUnitPath();\n external.debugMode && console.log(\"[DoubleClick][GPT] Slot on-screen visibility changed to \" + event.inViewPercentage + \"%: \" + adUnitPath);\n });\n });\n}; // Wiring this up separately to allow spaced refresh of viewed ads\n\n\ninternal.subscribeToGoogleTagImpressionEvent = function () {\n window.googletag.cmd.push(function () {\n // Fires when an impression becomes viewable, according to Active View criteria\n window.googletag.pubads().addEventListener(\"impressionViewable\", function (event) {\n if (!event || !event.slot) return;\n var adUnitPath = event.slot.getAdUnitPath();\n external.debugMode && console.log(\"[DoubleClick][GPT] Ad impression officially viewable: \" + adUnitPath);\n var slot = event.slot;\n\n if (slot.getTargeting(external.constants.refreshTargetingKey).indexOf(external.constants.refreshTargetingValue) > -1) {\n external.debugMode && console.log(\"[DoubleClick][GPT] Refresh targeting detected, setting refresh timeout: \" + adUnitPath);\n setTimeout(function () {\n external.debugMode && console.log(\"[DoubleClick][GPT] Ad refresh initiated: \" + adUnitPath);\n googletag.pubads().refresh([slot]);\n }, external.constants.refreshDelaySeconds * 1000);\n }\n });\n });\n};","import utils from './_utilities'; //singleton instance for the page.\n\n/*\n * Interacts with the GPT to create and manage an ad instance. \n */\n\nexport default (function (settings) {\n var external = {};\n var internal = {};\n\n internal.load = function (settings) {\n internal.adSlotSettings = {\n adId: settings.adId,\n adContainerId: settings.adContainerId,\n adSize: internal.parseAdSizeArray(settings.size),\n networkCode: settings.networkCode,\n refresh: settings.refreshWhenViewed\n };\n utils.initialize(settings);\n\n if (settings.testMode) {\n external.internal = internal;\n }\n\n utils.createStopWatch(internal.adSlotSettings.adContainerId);\n\n if (!internal.adSlotSettings.adSize) {\n utils.debugMode && console.log(\"[DoubleClick] Ad not enabled, bypassing render. AdId: \" + internal.adSlotSettings.adId);\n return;\n }\n\n internal.renderAdSlot();\n };\n\n internal.parseAdSizeArray = function (sizeArray) {\n try {\n return JSON.parse(sizeArray); //parse string into array\n } catch (error) {\n console.log(error);\n return null;\n }\n };\n\n internal.renderAdSlot = function (targetingData) {\n utils.startTimer(internal.adSlotSettings.adContainerId, \"adDisplayRequested\");\n window.googletag.cmd.push(function () {\n utils.debugMode && console.log(\"[DoubleClick] Render requested. AdId: \" + internal.adSlotSettings.adId);\n var adUnitPath = internal.adSlotSettings.networkCode + internal.adSlotSettings.adId;\n var adSlot = window.googletag.defineSlot(adUnitPath, internal.adSlotSettings.adSize, internal.adSlotSettings.adContainerId);\n\n if (!adSlot) {\n utils.debugMode && console.log(\"[DoubleClick] Unexpected null slot returned from GPT. Unable to render ad. AdId: \" + internal.adSlotSettings.adId);\n return;\n }\n\n adSlot.addService(window.googletag.pubads());\n\n if (targetingData && targetingData.key) {\n adSlot.setTargeting(targetingData.key, targetingData.segments); //slot specific targeting data\n\n utils.debugMode && console.log(\"[DoubleClick] Rendering ad with personalization. AdId: \" + internal.adSlotSettings.adId);\n }\n\n if (internal.adSlotSettings.refresh) {\n adSlot.setTargeting(utils.constants.refreshTargetingKey, utils.constants.refreshTargetingValue); //enable refresh\n\n utils.debugMode && console.log(\"[DoubleClick] Rendering ad with refresh enabled. AdId: \" + internal.adSlotSettings.adId);\n }\n\n window.googletag.display(internal.adSlotSettings.adContainerId); //with disableInitialLoad() specified, this will prep, but not fetch the ad until refresh() called\n\n window.googletag.pubads().refresh([adSlot]); //fetch the ad\n });\n };\n\n internal.load(settings);\n return external;\n});","import mod from \"-!../../../../custom_webpack_modules/styleAppenderLoader/index.js??ref--2-0!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/webpack-import-glob-loader/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./doubleClickContainer.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../custom_webpack_modules/styleAppenderLoader/index.js??ref--2-0!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/webpack-import-glob-loader/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./doubleClickContainer.vue?vue&type=script&lang=js&\"","import \"@Styles/Shared/DoubleClick/doubleClickContainer_sm.less\";\nimport \"@Styles/Shared/DoubleClick/doubleClickContainer_md.less\";\nimport \"@Styles/Shared/DoubleClick/doubleClickContainer_lg.less\";\nimport DoubleClickAd from './_doubleClickAd';\nimport AdhesiveAdObserver from './_adhesiveAdObserver';\nexport default {\n data: function data() {\n return {\n userClosedAd: false,\n settings: {},\n windowWidth: 0,\n ad: null\n };\n },\n methods: {\n init: function init(settings) {\n this.settings = settings || {};\n this.settings.minPageWidth = this.settings.minPageWidth || this.settings.defaultMinPageWidth;\n this.settings.maxPageWidth = this.settings.maxPageWidth || this.settings.defaultMaxPageWidth;\n this.settings.doubleClickAdContainerId = settings.elementId;\n var parent = this.$el.parentElement;\n\n if (parent && parent.classList.contains('adhesiveAd') && parent.firstElementChild == this.$el) {\n // set the up adhesive ad observer only once\n new AdhesiveAdObserver();\n }\n },\n closeAd: function closeAd() {\n this.userClosedAd = true;\n }\n },\n computed: {\n showAd: function showAd() {\n return this.windowWidth >= Number(this.settings.minPageWidth) && this.windowWidth <= Number(this.settings.maxPageWidth) && !this.userClosedAd;\n }\n },\n watch: {\n showAd: function showAd(newVal) {\n if (newVal === true && this.ad === null) {\n // create the ad instance the first time it is shown\n this.ad = DoubleClickAd(this.settings);\n }\n }\n },\n mounted: function mounted() {\n var _this = this;\n\n this.windowWidth = window.innerWidth;\n window.addEventListener('resize', function () {\n if (window.innerWidth > 0) _this.windowWidth = window.innerWidth;\n });\n }\n};","var render, staticRenderFns\nimport script from \"./doubleClickContainer.vue?vue&type=script&lang=js&\"\nexport * from \"./doubleClickContainer.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"D:\\\\actions-runner\\\\_work\\\\red.PandoSites\\\\red.PandoSites\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!module.hot.data) {\n api.createRecord('7404e77c', component.options)\n } else {\n api.reload('7404e77c', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"PandoSites.Web/Shared/DoubleClick/Scripts/doubleClickContainer.vue\"\nexport default component.exports","import { BottomDockObserver } from '@Shared/Common';\n\nvar adhesiveAdObserver = function adhesiveAdObserver(config) {\n var external = {};\n var internal = {\n isRdp: false,\n isPdp: false,\n rdpSelector: '.recipeDetail',\n pdpSelector: '.productDetail',\n spacingSelector: '.adhesiveAdSpacing',\n adhesiveAdSelector: '.adhesiveAd',\n adhesiveHeaderAdFixedClass: 'adhesiveHeaderAdFixed'\n };\n\n if (config && config.testMode === true) {\n external.internal = internal;\n }\n\n internal.logMessage = function (message, forceLog) {\n if (external.debugMode === true || forceLog) {\n console.log(\"[AdhesiveAd] \" + message);\n }\n };\n\n internal.setupHeaderAdSpacing = function () {\n var spacing = document.querySelector(internal.spacingSelector);\n\n if (spacing) {\n spacing.classList.add('visible');\n if (internal.isRdp || internal.isPdp) spacing.classList.add('visibleDesktop');\n document.body.classList.add(internal.adhesiveHeaderAdFixedClass);\n }\n\n var ad = document.querySelector(internal.adhesiveAdSelector);\n\n if (ad) {\n var closeButtons = ad.getElementsByClassName('closeAdButton');\n\n for (var i = 0; i < closeButtons.length; i++) {\n closeButtons[i].onclick = function () {\n if (spacing) spacing.classList.remove('visible');\n document.body.classList.remove(internal.adhesiveHeaderAdFixedClass);\n };\n }\n }\n };\n\n internal.addObserver = function () {\n internal.setupHeaderAdSpacing();\n };\n\n internal.initialize = function () {\n internal.isRdp = !!document.querySelector(internal.rdpSelector);\n internal.isPdp = !!document.querySelector(internal.pdpSelector);\n var adhesiveAd = document.querySelector(internal.adhesiveAdSelector);\n\n if (adhesiveAd && adhesiveAd.children.length > 0) {\n if (internal.isRdp || internal.isPdp) adhesiveAd.classList.add('bottomAdhesiveAdMobile');\n internal.addObserver();\n }\n }; //init during object constructrion\n\n\n internal.initialize(config);\n return external;\n};\n\nexport default adhesiveAdObserver;"],"sourceRoot":""}