{"version":3,"sources":["webpack:///./widgets/hotspotBlock.js","webpack:///./viewsHandler.js","webpack:///./mediaQuery.js"],"names":["CLS","HotspotBlock","element","_this","_classCallCheck","this","$element","$","$canvas","find","concat","$image","$hotspots","$hotspotColumnContent","$card","$cardDescription","cardAnimationDuration","cardAnimationCompleted","hide","css","opacity","setTimeout","show","$activeHotspotBlock","$imageProperties","ratio","width","height","key","value","_this2","setRatio","scaleImage","setHotspots","setHotspotClickEvent","setHotspotContentHeight","window","resize","_","debounce","initFullWindowHeight","initTrackingItems","visibility","each","index","x","isNil","attr","parseInt","y","isFinite","left","Math","abs","top","display","transform","_this3","on","event","currentTarget","deactivate","removeClass","html","activate","$elementToActivate","addClass","description","is","mediaQuery","breakpointMaxWidth","BREAKPOINTS","LG","minHeight","Object","assign","prototype","fullWindowHeightMixinBlock","trackingItemsMixinBlock","self","data","setElementHeight","$tplHeader","headerHeight","length","compactViewMixin","initCompactView","classes","$tplScroller","document","body","applyCompactView","forEach","classItem","isBlockExceedingHeight","clientHeight","outerHeight","toggleCompactViewAttribute","removeAttr","$items","trackingId","$tracker","activeItems","trackingItemId","item","push","trigger","MediaQuery","XS","SM","MD","XL","breakpoint","max","documentElement","clientWidth","innerWidth"],"mappings":"u4BAOA,IACMA,EAAM,eAECC,EAAY,WA+BvB,O,EA9BD,SAAAA,EAAYC,GAAS,IAAAC,EAAA,M,4FAAAC,CAAA,KAAAH,GACpBI,KAAKH,QAAUA,EACfG,KAAKC,SAAWC,EAAEL,GAElBG,KAAKG,QAAUH,KAAKC,SAASG,KAAK,IAADC,OAAKV,EAAG,YACzCK,KAAKM,OAASN,KAAKC,SAASG,KAAK,IAADC,OAAKV,EAAG,WACxCK,KAAKO,UAAYP,KAAKC,SAASG,KAAK,2BACpCJ,KAAKQ,sBAAwBR,KAAKC,SAASG,KAAK,IAADC,OAAKV,EAAG,kBACvDK,KAAKS,MAAQT,KAAKC,SAASG,KAAK,IAADC,OAAKV,EAAG,UACvCK,KAAKU,iBAAm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tG,KAAKkE,YAAc,CAClBqC,GAAI,EACJC,GAAI,IACJC,GAAI,IACJtC,GAAI,IACJuC,GAAI,Q,EAEL,EAAAnF,IAAA,qBAAAC,MAED,SAAmBmF,GAClB,IAAItF,EAAQ0B,KAAK6D,IAAIxB,SAASyB,gBAAgBC,YAAa/E,OAAOgF,YAAc,GAEhF,QAAI9E,IAAEY,SAAS8D,IACPA,EAAatF,O,0FAfP","file":"39.js","sourcesContent":["/* eslint-disable no-console */\n/* eslint-disable max-len */\n// taken from AWI-WLC\nimport _ from 'lodash';\nimport {fullWindowHeightMixinBlock, trackingItemsMixinBlock} from '../viewsHandler';\nimport {mediaQuery} from '../mediaQuery';\n\nconst NS = 'HotspotBlock';\nconst CLS = 'hotspotBlock';\n\nexport class HotspotBlock {\n\tconstructor(element) {\n\t\tthis.element = element;\n\t\tthis.$element = $(element);\n\n\t\tthis.$canvas = this.$element.find(`.${CLS}-canvas`);\n\t\tthis.$image = this.$element.find(`.${CLS}-image`);\n\t\tthis.$hotspots = this.$element.find(`.hotspotCoordinateBlock`);\n\t\tthis.$hotspotColumnContent = this.$element.find(`.${CLS}-col--content`);\n\t\tthis.$card = this.$element.find(`.${CLS}-card`);\n\t\tthis.$cardDescription = this.$card.find(`.${CLS}-card-description`);\n\t\tthis.cardAnimationDuration = 500;\n\t\tthis.cardAnimationCompleted = true;\n\n\t\t// Initial animation of card\n\t\tthis.$card.hide();\n\t\tthis.$card.css({\n\t\t\topacity: 0,\n\t\t});\n\n\t\tsetTimeout(() => {\n\t\t\tthis.$card.show();\n\t\t}, this.cardAnimationDuration);\n\n\t\tthis.$activeHotspotBlock = null;\n\t\tthis.$imageProperties = {\n\t\t\tratio: {\n\t\t\t\twidth: null,\n\t\t\t\theight: null,\n\t\t\t},\n\t\t};\n\t}\n\n\tinit() {\n\t\tthis.setRatio();\n\t\tthis.scaleImage();\n\t\tthis.setHotspots();\n\t\tthis.setHotspotClickEvent();\n\t\tthis.setHotspotContentHeight();\n\n\t\t$(window).resize(_.debounce(() => {\n\t\t\tthis.scaleImage();\n\t\t\tthis.setHotspots();\n\t\t\tthis.setHotspotContentHeight();\n\t\t}, 25));\n\n\t\tthis.initFullWindowHeight(this);\n\t\tthis.initTrackingItems(this, this.$hotspots);\n\n\t\t// Trigger this again\n\t\tsetTimeout(() => {\n\t\t\tthis.scaleImage();\n\t\t\tthis.setHotspots();\n\t\t\tthis.setHotspotContentHeight();\n\t\t}, 500);\n\t}\n\n\tsetRatio() {\n\t\tthis.$imageProperties.ratio.width = this.$image.width();\n\t\tthis.$imageProperties.ratio.height = this.$image.height();\n\t}\n\n\tscaleImage() {\n\t\tlet width = this.$canvas.width();\n\n\t\tthis.$image.css({\n\t\t\twidth: width,\n\t\t\theight: (width * (this.$imageProperties.ratio.height / this.$imageProperties.ratio.width)),\n\t\t\tvisibility: 'visible',\n\t\t});\n\t}\n\n\tsetHotspots() {\n\t\tthis.$hotspots.each((index, element) => {\n\t\t\tlet x = !_.isNil($(element).attr('data-x-percentage')) ? parseInt($(element).attr('data-x-percentage')) : null;\n\t\t\tlet y = !_.isNil($(element).attr('data-y-percentage')) ? parseInt($(element).attr('data-y-percentage')) : null;\n\n\t\t\tif (_.isFinite(x) && x >= 0 && x <= 100) {\n\t\t\t\tif (_.isFinite(y) && y >= 0 && y <= 100) {\n\t\t\t\t\t$(element).css({\n\t\t\t\t\t\tleft: `${Math.abs(x - 100)}%`,\n\t\t\t\t\t\ttop: `${Math.abs(y - 100)}%`,\n\t\t\t\t\t\tdisplay: 'inline-block',\n\t\t\t\t\t\ttransform: 'translate3d(-50%, -50%, 0)',\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tconsole.error(`${NS}::Error`, 'Please supply a valid y-percentage between 0–100');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconsole.error(`${NS}::Error`, 'Please supply a valid x-percentage between 0–100');\n\t\t\t}\n\t\t});\n\t}\n\n\tsetHotspotClickEvent() {\n\t\tthis.$hotspots.on('click', (event) => {\n\t\t\tlet $element = $(event.currentTarget);\n\n\t\t\tif (this.cardAnimationCompleted) {\n\t\t\t\tlet deactivate = () => {\n\t\t\t\t\tthis.cardAnimationCompleted = false;\n\n\t\t\t\t\tthis.$activeHotspotBlock.removeClass('hotspotCoordinateBlock--active');\n\t\t\t\t\tthis.$activeHotspotBlock = null;\n\n\t\t\t\t\tthis.$card.css({\n\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t});\n\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tthis.$cardDescription.html('');\n\t\t\t\t\t\tthis.cardAnimationCompleted = true;\n\t\t\t\t\t}, this.cardAnimationDuration);\n\t\t\t\t};\n\n\t\t\t\tlet activate = ($elementToActivate) => {\n\t\t\t\t\tthis.cardAnimationCompleted = false;\n\n\t\t\t\t\tthis.$activeHotspotBlock = $elementToActivate;\n\t\t\t\t\tthis.$activeHotspotBlock.addClass('hotspotCoordinateBlock--active');\n\t\t\t\t\tlet description = this.$activeHotspotBlock.find('.hotspotCoordinateBlock-content').html();\n\t\t\t\t\tthis.$cardDescription.html(description);\n\t\t\t\t\tthis.$card.css({\n\t\t\t\t\t\topacity: 1,\n\t\t\t\t\t});\n\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tthis.cardAnimationCompleted = true;\n\t\t\t\t\t}, this.cardAnimationDuration);\n\t\t\t\t};\n\n\t\t\t\tif (!this.$activeHotspotBlock) {\n\t\t\t\t\tactivate($element);\n\t\t\t\t} else if (this.$activeHotspotBlock.is($element)) {\n\t\t\t\t\tdeactivate();\n\t\t\t\t} else {\n\t\t\t\t\tdeactivate();\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tactivate($element);\n\t\t\t\t\t}, this.cardAnimationDuration);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\tsetHotspotContentHeight() {\n\t\tif (!mediaQuery.breakpointMaxWidth(mediaQuery.BREAKPOINTS.LG)) {\n\t\t\tthis.$hotspotColumnContent.css({\n\t\t\t\tminHeight: this.$image.height(),\n\t\t\t});\n\t\t} else {\n\t\t\tthis.$hotspotColumnContent.css({\n\t\t\t\tminHeight: 'unset',\n\t\t\t});\n\t\t}\n\t}\n}\n\nObject.assign(HotspotBlock.prototype, fullWindowHeightMixinBlock);\nObject.assign(HotspotBlock.prototype, trackingItemsMixinBlock);\n","/* eslint-disable no-console */\n/* eslint-disable max-len */\nimport _ from 'lodash';\n\nexport let fullWindowHeightMixinBlock = {\n\tinitFullWindowHeight: (self) => {\n\t\tself.$element = self.$element || $(self.element);\n\n\t\tif (!_.isNil(self.$element.data('fullscreen')) && self.$element.data('fullscreen')) {\n\t\t\tlet setElementHeight = () => {\n\t\t\t\tlet $tplHeader = $('.siteHeader');\n\t\t\t\tlet headerHeight = 0;\n\n\t\t\t\tif ($tplHeader.length > 0) {\n\t\t\t\t\theaderHeight = $tplHeader.height();\n\t\t\t\t}\n\n\t\t\t\t// Slight delay\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tself.$element.css({\n\t\t\t\t\t\tminHeight: `${$(window).height() - headerHeight}px`,\n\t\t\t\t\t\tvisibility: 'visible',\n\t\t\t\t\t});\n\t\t\t\t}, 250);\n\t\t\t};\n\n\t\t\t$(window).resize(_.debounce(() => {\n\t\t\t\tsetElementHeight();\n\t\t\t}, 250));\n\n\t\t\tsetElementHeight();\n\t\t} else {\n\t\t\t// Slight delay\n\t\t\tsetTimeout(() => {\n\t\t\t\tself.$element.css({\n\t\t\t\t\tvisibility: 'visible',\n\t\t\t\t});\n\t\t\t}, 250);\n\t\t}\n\t},\n};\n\nexport let compactViewMixin = {\n\tinitCompactView: (self, classes) => {\n\t\tlet minimumHeight = 550; // 550px was the chosen number to have compact views\n\t\tself.$element = self.$element || $(self.element);\n\t\tself.$tplScroller = self.$tplScroller || $(document.body);\n\t\tclasses = classes || [];\n\n\t\tif (self.$tplScroller && self.$tplScroller.length > 0) {\n\t\t\tlet applyCompactView = () => {\n\t\t\t\tself.$element.attr('compact-view', 'true');\n\n\t\t\t\tif (classes.length > 0) {\n\t\t\t\t\tclasses.forEach((classItem) => {\n\t\t\t\t\t\tself.$element.find(classItem).attr('compact-view', true);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tlet unapplyCompactView = () => {\n\t\t\t\tself.$element.removeAttr('compact-view');\n\n\t\t\t\tif (classes.length > 0) {\n\t\t\t\t\tclasses.forEach((classItem) => {\n\t\t\t\t\t\tself.$element.find(classItem).removeAttr('compact-view');\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tlet isBlockExceedingHeight = () => {\n\t\t\t\treturn self.$tplScroller[0].clientHeight <= minimumHeight ||\n\t\t\t\t\t((self.$element.outerHeight() > minimumHeight) && self.$element.outerHeight() > self.$tplScroller[0].clientHeight);\n\t\t\t};\n\n\t\t\tlet toggleCompactViewAttribute = () => {\n\t\t\t\tif (isBlockExceedingHeight()) {\n\t\t\t\t\tapplyCompactView();\n\n\t\t\t\t\t// Re-render\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tif (isBlockExceedingHeight()) {\n\t\t\t\t\t\t\tapplyCompactView();\n\t\t\t\t\t\t}\n\t\t\t\t\t}, 500);\n\t\t\t\t} else {\n\t\t\t\t\tunapplyCompactView();\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t$(window).resize(_.debounce(() => {\n\t\t\t\ttoggleCompactViewAttribute();\n\t\t\t}, 250));\n\n\t\t\ttoggleCompactViewAttribute();\n\t\t}\n\t},\n};\n\nexport let trackingItemsMixinBlock = {\n\tinitTrackingItems: (self, $items) => {\n\t\tself.$element = self.$element || $(self.element);\n\n\t\tlet trackingId = self.$element.data('trackingId');\n\t\tif (!_.isNil(trackingId) && trackingId !== '') {\n\t\t\tlet $tracker = $('[data-pg][data-tracker=\"true\"]');\n\n\t\t\tif (!($tracker && $tracker.length > 0)) {\n\t\t\t\tconsole.error('TrackingItemsMixinBlock::Error', 'Please ensure that the [data-pg][data-tracker=\"true\"] element exists');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (!($items && $items.length > 0)) {\n\t\t\t\tconsole.error('TrackingItemsMixinBlock::Error', 'Please supply jQuery object for the list of clickable items');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$items.each((index, element) => {\n\t\t\t\tlet $element = $(element);\n\t\t\t\t$element.attr('data-tracking-item-id', index);\n\t\t\t\t$element.attr('data-tracking-item-complete', false);\n\t\t\t});\n\n\t\t\tlet activeItems = [];\n\n\t\t\t$items.on('click', (event) => {\n\t\t\t\tlet $element = $(event.currentTarget);\n\t\t\t\tlet trackingItemId = $element.data('trackingItemId'); // TrackingItem of the item inside the block\n\n\t\t\t\t// If the item is active\n\t\t\t\tlet isFound = _.find(activeItems, (item) => {\n\t\t\t\t\treturn item === trackingItemId;\n\t\t\t\t});\n\t\t\t\tif (!isFound) {\n\t\t\t\t\tactiveItems.push(trackingItemId);\n\t\t\t\t\t$element.attr('data-tracking-item-complete', true); // Mark item as complete\n\n\t\t\t\t\tif ($items.length === activeItems.length) {\n\t\t\t\t\t\t$tracker.trigger('tracking.complete', {\n\t\t\t\t\t\t\t$element: self.$element,\n\t\t\t\t\t\t\ttrackingId: trackingId,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tself.$element.data('trackingComplete', true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t},\n};\n","/* eslint-disable no-console */\n/* eslint-disable max-len */\nimport _ from 'lodash';\n\nclass MediaQuery {\n\tconstructor() {\n\t\tthis.BREAKPOINTS = {\n\t\t\tXS: 0,\n\t\t\tSM: 576,\n\t\t\tMD: 768,\n\t\t\tLG: 992,\n\t\t\tXL: 1200,\n\t\t};\n\t}\n\n\tbreakpointMaxWidth(breakpoint) {\n\t\tlet width = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);\n\n\t\tif (_.isFinite(breakpoint)) {\n\t\t\treturn breakpoint > width;\n\t\t}\n\t\tconsole.error(`MediaQuery::Error`, 'Please supply a valid breakpoint');\n\t\treturn false;\n\t}\n}\n\nexport let mediaQuery = new MediaQuery();\n"],"sourceRoot":""}