{"version":3,"sources":["webpack:////Users/owenli/Documents/workspace/awi-wlc-fe/src/views/pages/mixins/fixedScrollMixinPage/fixedScrollMixinPage.js","webpack:////Users/owenli/Documents/workspace/awi-wlc-fe/src/views/pages/courseAssessmentPage/js/courseAssessmentPage.js","webpack:////Users/owenli/Documents/workspace/awi-wlc-fe/node_modules/scroll-js/dist/scroll.js","webpack:///./wlc/mediaQuery.js","webpack:////Users/owenli/Documents/workspace/awi-wlc-fe/node_modules/normalize-wheel/index.js","webpack:////Users/owenli/Documents/workspace/awi-wlc-fe/node_modules/normalize-wheel/src/normalizeWheel.js","webpack:////Users/owenli/Documents/workspace/awi-wlc-fe/node_modules/normalize-wheel/src/UserAgent_DEPRECATED.js","webpack:////Users/owenli/Documents/workspace/awi-wlc-fe/node_modules/normalize-wheel/src/isEventSupported.js","webpack:////Users/owenli/Documents/workspace/awi-wlc-fe/node_modules/normalize-wheel/src/ExecutionEnvironment.js"],"names":["normalizeWheel","require","fixedScrollMixinPage","initFixedScrollMixin","self","blocks","arguments","length","undefined","$element","$","element","$tplScroller","$tplHeader","$tplFooter","isScrolling","fixedScroll","data","fixedScrollItems","fixedScrollActiveItemIndex","$sectionFixedScrollContainer","$sectionFixedScrollItems","_","isNil","children","toArray","resizeEvent","setFixedScrollActiveItemIndex","index","scrollToElementIndex","section","hide","scrollIntoView","duration","easing","finally","setTimeout","scrollDuration","scrollToPreviousSection","prevElementIndex","scrollToNextSection","nextElementIndex","concat","_toConsumableArray","off","$fixedScrollEvent","window","css","overflow","overflowY","forEach","attr","wrapInner","find","mediaQuery","breakpointMaxWidth","BREAKPOINTS","SM","each","$fixedScrollItem","$fixedScrollItemInner","height","flex","on","event","preventDefault","outerHeight","clientHeight","minHeight","debounce","leading","trailing","width","position","clientY","isElementScrollable","isElementScrollAtTop","scrollTop","isElementScrollAtBottom","Math","ceil","scrollHeight","offsetHeight","isScrollLocked","hasAttribute","updateScrolledIndex","scrolledIndex","findIndex","fixedScrollElement","parents","throttle","pixelY","originalEvent","currentTarget","lockScroll","isScrollingUp","pixelThreshold","isScrollingDown","touches","deltaY","changedTouches","deltaThreshold","setFixedScrollEvent","oldElementIndex","floor","top","$lastScrollElement","setFixedScrollActiveElement","fixedScrollInnerElement","adjustSectionItemsScrollPosition","CLS","CourseAssessmentPage","_classCallCheck","this","$courseAssessmentSectionNavigatorWidget","$siteSubheaderCourseAssessmentWidget","scrollEasing","$quizBlocks","$sections","$form","sectionActiveIndex","val","initFixedScroll","initAttemptedQuestions","initPagination","key","value","activeIndex","eq","$submitBlock","push","_this","document","ready","attemptedQuestions","incrementAttemptedQuestions","trigger","$checkedItems","totalQuestions","_this2","previous","setActiveSection","next","activeNavigationSectionIndex","not","removeClass","addClass","scrollTo","Object","assign","prototype","el","options","thisArg","_arguments","generator","Element","Window","Error","sanitizeScrollOptions","scroll","from","to","prop","startTime","easeFunc","callback","requestAnimationFrame","currentTime","Date","now","time","min","utils","getDocument","body","documentElement","setScrollPosition","currentScrollPosition","getScrollPosition","scrollProperty","props","y","x","getScrollPropertyByElement","Promise","resolve","getEasing","P","reject","fulfilled","step","e","rejected","result","done","then","apply","scroller","errorMsg","HTMLElement","validateElement","currentContainerScrollYPos","elementScrollYPos","offsetTop","pageYOffset","getBoundingClientRect","left","behavior","__webpack_require__","d","__webpack_exports__","easingMap","linear","t","ease-in","ease-out","ease-in-out","keys","join","MediaQuery","XS","MD","LG","XL","breakpoint","max","clientWidth","innerWidth","isFinite","module","exports","UserAgent_DEPRECATED","isEventSupported","PIXEL_STEP","LINE_HEIGHT","PAGE_HEIGHT","sX","sY","pX","pY","detail","wheelDelta","wheelDeltaY","wheelDeltaX","axis","HORIZONTAL_AXIS","deltaX","deltaMode","spinX","spinY","pixelX","getEventType","firefox","_ie","_firefox","_opera","_webkit","_chrome","_ie_real_version","_osx","_windows","_linux","_android","_win64","_iphone","_ipad","_native","_mobile","_populated","_populate","uas","navigator","userAgent","agent","exec","os","parseFloat","NaN","documentMode","trident","ver","replace","ie","ieCompatibilityMode","ie64","opera","webkit","safari","chrome","windows","osx","linux","iphone","mobile","nativeApp","android","ipad","useHasFeature","ExecutionEnvironment","canUseDOM","implementation","hasFeature","eventNameSuffix","capture","eventName","isSupported","createElement","setAttribute","canUseWorkers","Worker","canUseEventListeners","addEventListener","attachEvent","canUseViewport","screen","isInWorker"],"mappings":"05BAEA,IAAIA,EAAiBC,EAAQ,KAElBC,GACVC,qBAAsB,SAACC,GAAwB,IAAlBC,EAAMC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,KACrCF,EAAKK,SAAWL,EAAKK,UAAYC,EAAEN,EAAKO,SACxCP,EAAKQ,aAAeR,EAAKQ,cAAgBF,EAAE,iBAC3CN,EAAKS,WAAaT,EAAKS,YAAcH,EAAE,eACvCN,EAAKU,WAAaV,EAAKU,YAAcJ,EAAE,eAEvC,IAAIK,GAAc,EACdC,EAAcZ,EAAKK,SAASQ,KAAK,gBAGjCC,KACAC,EAA6B,EAC7BC,EAA+BV,EAAE,yCACjCW,KAEDC,EAAEC,MAAMlB,KACVA,EAASe,EAA6BI,WAAWC,WAIlD,IAoBKC,EA6PDC,EAAgC,SAACC,GACpCT,EAA6BS,GA4D1BC,EAAuB,SAACD,GAC3B,IAAIE,EAAUZ,EAAiBU,GAG5BlB,EAAE,mBAAmBH,QACvBG,EAAE,mBAAmBqB,OAItBC,YAAeF,EAAS1B,EAAKQ,aAAa,IAAMqB,SAnW5B,IAmWsDC,OAlWxD,gBAkWgFC,QAAQ,WACzGR,EAA8BC,GAC9BQ,WAAW,WACVrB,GAAc,GACZsB,QAKDC,EAA0B,WAC7B,IAAIC,EAAmBpB,EAA6B,EAEjDoB,GAAoB,EACtBV,EAAqBU,GAGiB,IAA/BpB,EACPU,EAAqB,GAGrBd,GAAc,GAKZyB,EAAsB,WACzB,IAAIC,EAAmBtB,EAA6B,EAEjDsB,GAAqBvB,EAAiBX,OAAS,EACjDsB,EAAqBY,GAGrB1B,GAAc,GAebV,EAAO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AAAxD,EAAAuD,UASAE,OAAA,WACA,OAAAnB,KAAAZ,GASAgC,QAAA,WACA,OAAApB,KAAAT,GAUA8B,IAAA,WACA,OAAArB,KAAAV,GAQAgC,MAAA,WACA,OAAAtB,KAAAR,GASA+B,OAAA,WACA,OAAAvB,KAAAL,GAGA6B,OAAA,WACA,OAAAxB,KAAAL,GAAAC,GAAAH,GAAAK,GAGA2B,UAAA,WAEA,OAAAzB,KAAAH,GAGA6B,QAAA,WACA,OAAA1B,KAAAP,GAGAkC,KAAA,WACA,OAAA3B,KAAAJ,IAIApC,EAAAC,QAAAC,0CC5QA,IAEAkE,EAFAC,EAA2B1F,EAAQ,KAGnC0F,EAAAC,YACAF,EACAtK,SAAAyK,gBACAzK,SAAAyK,eAAAC,aAGA,IAAA1K,SAAAyK,eAAAC,WAAA,QAwCAxE,EAAAC,QAvBA,SAAAwE,EAAAC,GACA,IAAAL,EAAAC,WACAI,KAAA,qBAAA5K,UACA,SAGA,IAAA6K,EAAA,KAAAF,EACAG,EAAAD,KAAA7K,SAEA,IAAA8K,EAAA,CACA,IAAAvS,EAAAyH,SAAA+K,cAAA,OACAxS,EAAAyS,aAAAH,EAAA,WACAC,EAAA,mBAAAvS,EAAAsS,GAQA,OALAC,GAAAR,GAAA,UAAAK,IAEAG,EAAA9K,SAAAyK,eAAAC,WAAA,uBAGAI,2CC5CA,IAAAN,IACA,oBAAA9P,SACAA,OAAAsF,WACAtF,OAAAsF,SAAA+K,eASAR,GAEAC,YAEAS,cAAA,oBAAAC,OAEAC,qBACAX,MAAA9P,OAAA0Q,mBAAA1Q,OAAA2Q,aAEAC,eAAAd,KAAA9P,OAAA6Q,OAEAC,YAAAhB,GAIAtE,EAAAC,QAAAoE","file":"page-4.2f662a3aa586e55a56ca.js","sourcesContent":["import { scrollIntoView } from 'scroll-js';\nimport { mediaQuery } from '../../../../global/js/wlc/mediaQuery';\nlet normalizeWheel = require('normalize-wheel');\n\nexport let fixedScrollMixinPage = {\n\tinitFixedScrollMixin: (self, blocks = null) => {\n\t\tself.$element = self.$element || $(self.element);\n\t\tself.$tplScroller = self.$tplScroller || $('.tpl-scroller');\n\t\tself.$tplHeader = self.$tplHeader || $('.tpl-header');\n\t\tself.$tplFooter = self.$tplFooter || $('.tpl-footer');\n\n\t\tlet isScrolling = false; // Flag for scrolling, can’t scroll if set to false\n\t\tlet fixedScroll = self.$element.data('fixed-scroll'); // Attribute to enable / disable fixed scroll\n\t\tlet scrollDuration = 750;\n\t\tlet scrollEasing = 'ease-in-out';\n\t\tlet fixedScrollItems = [];\n\t\tlet fixedScrollActiveItemIndex = 0;\n\t\tlet $sectionFixedScrollContainer = $('[data-section-fixed-scroll-container]');\n\t\tlet $sectionFixedScrollItems = [];\n\n\t\tif(_.isNil(blocks)) {\n\t\t\tblocks = $sectionFixedScrollContainer.children().toArray();\n\t\t}\n\n\t\t// Sets attributes to latch events and styling onto the fixed scroll\n\t\tlet setAttributes = () => {\n\t\t\t// Apply a section-fixed-scroll-item attribute to target against\n\t\t\tfixedScrollItems.forEach((element) => {\n\t\t\t\tif(element === self.$tplFooter[0]) {\n\t\t\t\t\t// Add a fixed scroll event to the footer as this is the only element that is outside the fixed-scroll-container\n\t\t\t\t\t$(element).attr('fixed-scroll-event', '');\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// Insert an inner element with the section-fixed-scroll-item attribute\n\t\t\t\t\t// This is because inside the item we a tweaking to a full height\n\t\t\t\t\t$(element).attr('section-fixed-scroll-item', '');\n\t\t\t\t\t$(element).wrapInner('
');\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t$sectionFixedScrollItems = $sectionFixedScrollContainer.find('[section-fixed-scroll-item]');\n\t\t};\n\n\t\t// Enables/disables fixed scroll on mobile screens and handles the sizes dependant on viewport height & width.\n\t\tlet setSectionResizeEvent = () => {\n\t\t\tlet resizeEvent = () => {\n\t\t\t\tif(!mediaQuery.breakpointMaxWidth(mediaQuery.BREAKPOINTS.SM)) {\n\t\t\t\t\tself.$tplScroller.css({\n\t\t\t\t\t\toverflowY: 'hidden'\n\t\t\t\t\t});\n\n\t\t\t\t\t$sectionFixedScrollItems.each((index, element) => {\n\t\t\t\t\t\tlet $fixedScrollItem = $(element);\n\t\t\t\t\t\tlet $fixedScrollItemInner = $fixedScrollItem.find(`[section-fixed-scroll-item-inner]`);\n\n\t\t\t\t\t\t// Reset the values\n\t\t\t\t\t\t$fixedScrollItem.css({\n\t\t\t\t\t\t\theight: 'initial'\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t$fixedScrollItemInner.css({\n\t\t\t\t\t\t\tflex: '1 1 auto'\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t// Prevents bouncing scroll on iOS devices\n\t\t\t\t\t\t$fixedScrollItemInner.on('touchmove', (event) => {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tif($fixedScrollItemInner.outerHeight() >= self.$tplScroller[0].clientHeight) {\n\t\t\t\t\t\t\t$fixedScrollItem.css({\n\t\t\t\t\t\t\t\theight: self.$tplScroller[0].clientHeight\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t$fixedScrollItemInner.css({\n\t\t\t\t\t\t\t\t'minHeight': '100%',\n\t\t\t\t\t\t\t\t'overflowY': 'scroll',\n\t\t\t\t\t\t\t\t'flex': '1 1 auto'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$fixedScrollItem.css({\n\t\t\t\t\t\t\t\theight: 'initial'\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t$fixedScrollItemInner.css({\n\t\t\t\t\t\t\t\tflex: '1 1 auto'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tself.$tplScroller.css({\n\t\t\t\t\t\toverflowY: 'scroll'\n\t\t\t\t\t});\n\n\t\t\t\t\t$sectionFixedScrollItems.each((index, element) => {\n\t\t\t\t\t\tlet $fixedScrollItem = $(element);\n\t\t\t\t\t\tlet $fixedScrollItemInner = $fixedScrollItem.find(`[section-fixed-scroll-item-inner]`);\n\n\t\t\t\t\t\t$fixedScrollItem.css({\n\t\t\t\t\t\t\theight: 'unset'\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t$fixedScrollItemInner.css({\n\t\t\t\t\t\t\theight: 'unset',\n\t\t\t\t\t\t\toverflowY: 'unset',\n\t\t\t\t\t\t\tflex: 'unset'\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t$(window).on('resize.fixedScrollMixin', _.debounce(() => {\n\t\t\t\tresizeEvent();\n\t\t\t}, 250, { leading: false, trailing: true }));\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tresizeEvent();\n\t\t\t}, 250);\n\t\t};\n\n\t\t// Sets the default styles for the fixedScrollItems\n\t\tlet setSectionStyles = () => {\n\t\t\t$sectionFixedScrollItems.each((index, element) => {\n\t\t\t\tlet $fixedScrollItem = $(element);\n\t\t\t\tlet $fixedScrollItemInner = $fixedScrollItem.find(`[section-fixed-scroll-item-inner]`);\n\n\t\t\t\t$fixedScrollItem.css({\n\t\t\t\t\twidth: '100%',\n\t\t\t\t\tposition: 'relative'\n\t\t\t\t});\n\n\t\t\t\t$fixedScrollItemInner.css({\n\t\t\t\t\twidth: '100%'\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\n\t\tlet setFixedScrollEvent = () => {\n\t\t\tself.$fixedScrollEvent = $('[fixed-scroll-event]');\n\n\t\t\tlet isElementScrollable = ($element) => {\n\t\t\t\treturn $element.children()[0].clientHeight > self.$tplScroller[0].clientHeight;\n\t\t\t};\n\n\t\t\tlet isElementScrollAtTop = ($element) => {\n\t\t\t\treturn $element[0].scrollTop <= 0;\n\t\t\t};\n\n\t\t\tlet isElementScrollAtBottom = ($element) => {\n\t\t\t\treturn (Math.ceil($element[0].scrollTop) >= ($element[0].scrollHeight - $element[0].offsetHeight));\n\t\t\t};\n\n\t\t\tlet isScrollLocked = ($element) => {\n\t\t\t\treturn $element[0].hasAttribute('fixed-scroll-event-lock');\n\t\t\t};\n\n\t\t\t// Ensure that the active index is the element that is selected to scroll\n\t\t\tlet updateScrolledIndex = ($element) => {\n\t\t\t\tlet scrolledIndex;\n\t\t\t\t// If the selected element is the element before the tplFooter element and the active index is the tplFooter element\n\t\t\t\tif(fixedScrollItems[fixedScrollItems.length - 2] &&\n\t\t\t\t\tfixedScrollItems[fixedScrollItems.length - 2] === $element[0] && (fixedScrollActiveItemIndex === fixedScrollItems.length - 1)) {\n\t\t\t\t\tscrolledIndex = fixedScrollItems.length - 1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tscrolledIndex = _.findIndex(fixedScrollItems, (fixedScrollElement) => {\n\t\t\t\t\t\tif(fixedScrollElement === self.$tplFooter[0]) {\n\t\t\t\t\t\t\treturn fixedScrollElement === $element[0];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Return the current selected element\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\treturn fixedScrollElement === $element.parents('[section-fixed-scroll-item]')[0];\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tsetFixedScrollActiveItemIndex(scrolledIndex);\n\t\t\t};\n\n\t\t\t// Normal desktop devices scrolling event\n\t\t\tself.$fixedScrollEvent.on('DOMMouseScroll.fixedScrollMixin wheel.fixedScrollMixin scroll.fixedScrollMixin', _.throttle((event) => {\n\t\t\t\tlet pixelThreshold = 5;\n\t\t\t\tif(!mediaQuery.breakpointMaxWidth(mediaQuery.BREAKPOINTS.SM) && !isScrolling) {\n\t\t\t\t\tisScrolling = true;\n\t\t\t\t\tlet nomalizeWheelValue = normalizeWheel(event.originalEvent);\n\t\t\t\t\tlet pixelY = nomalizeWheelValue.pixelY;\n\t\t\t\t\tlet $element = $(event.currentTarget);\n\n\t\t\t\t\t// Prevent scrolling that is triggered in certain elements that have an inner scroll.\n\t\t\t\t\tlet lockScroll = isScrollLocked($element);\n\n\t\t\t\t\tupdateScrolledIndex($element);\n\n\t\t\t\t\tlet isScrollingUp = () => {\n\t\t\t\t\t\treturn pixelY < (pixelThreshold * -1);\n\t\t\t\t\t};\n\n\t\t\t\t\tlet isScrollingDown = () => {\n\t\t\t\t\t\treturn pixelY > pixelThreshold;\n\t\t\t\t\t};\n\n\t\t\t\t\t// There is a scrollable element inside the section\n\t\t\t\t\tif(isElementScrollable($element)) {\n\t\t\t\t\t\t// Scrolled to the top of the section scroll item and the scroll direction is up\n\t\t\t\t\t\tif(isElementScrollAtTop($element) && isScrollingUp() && !lockScroll) {\n\t\t\t\t\t\t\tscrollToPreviousSection();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Scrolled to the bottom of the section scroll item and the scroll direction is down\n\t\t\t\t\t\telse if(isElementScrollAtBottom($element) &&\n\t\t\t\t\t\t\tisScrollingDown() && !lockScroll) {\n\t\t\t\t\t\t\tscrollToNextSection();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tisScrolling = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// There isn’t a scrollable event inside the section\n\t\t\t\t\telse {\n\t\t\t\t\t\t// Scroll up\n\t\t\t\t\t\tif(isScrollingUp() && !lockScroll) {\n\t\t\t\t\t\t\tscrollToPreviousSection();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Scroll down\n\t\t\t\t\t\telse if(isScrollingDown() && !lockScroll) {\n\t\t\t\t\t\t\tscrollToNextSection();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tisScrolling = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, 250, { leading: false, trailing: true }));\n\n\t\t\t// Deals with touch devices that don’t trigger scroll events\n\t\t\t(() => {\n\t\t\t\tlet clientY;\n\t\t\t\tlet deltaThreshold = 75;\n\n\t\t\t\tself.$fixedScrollEvent.on('touchstart.fixedScrollMixin', _.debounce((event) => {\n\t\t\t\t\tclientY = event.touches[0].clientY;\n\t\t\t\t}, 250, { leading: true, trailing: false }));\n\n\t\t\t\tself.$fixedScrollEvent.on('touchend.fixedScrollMixin', _.debounce((event) => {\n\t\t\t\t\tlet deltaY = event.changedTouches[0].clientY - clientY;\n\n\t\t\t\t\tif(!mediaQuery.breakpointMaxWidth(mediaQuery.BREAKPOINTS.SM) && !isScrolling) {\n\t\t\t\t\t\tisScrolling = true;\n\t\t\t\t\t\tlet $element = $(event.currentTarget);\n\n\t\t\t\t\t\t// Prevent scrolling that is triggered in certain elements that have an inner scroll.\n\t\t\t\t\t\tlet lockScroll = isScrollLocked($element);\n\n\t\t\t\t\t\tupdateScrolledIndex($element);\n\n\t\t\t\t\t\tlet isScrollingUp = () => {\n\t\t\t\t\t\t\treturn deltaY > deltaThreshold;\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tlet isScrollingDown = () => {\n\t\t\t\t\t\t\treturn deltaY < (deltaThreshold * -1);\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\t// There is a scrollable element inside the section\n\t\t\t\t\t\tif(isElementScrollable($element)) {\n\t\t\t\t\t\t\t// Scrolled to the top of the section scroll item and the scroll direction is up\n\t\t\t\t\t\t\tif(isElementScrollAtTop($element) && isScrollingUp() && !lockScroll) {\n\t\t\t\t\t\t\t\tscrollToPreviousSection();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Scrolled to the bottom of the section scroll item and the scroll direction is down\n\t\t\t\t\t\t\telse if(isElementScrollAtBottom($element) &&\n\t\t\t\t\t\t\t\tisScrollingDown() && !lockScroll) {\n\t\t\t\t\t\t\t\tscrollToNextSection();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tisScrolling = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// There isn’t a scrollable event inside the section\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// Scroll up\n\t\t\t\t\t\t\tif(isScrollingUp() && !lockScroll) {\n\t\t\t\t\t\t\t\tscrollToPreviousSection();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Scroll down\n\t\t\t\t\t\t\telse if(isScrollingDown() && !lockScroll) {\n\t\t\t\t\t\t\t\tscrollToNextSection();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tisScrolling = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}, 250, { leading: false, trailing: true }));\n\t\t\t})();\n\t\t};\n\n\t\tlet setFixedScrollActiveItemIndex = (index) => {\n\t\t\tfixedScrollActiveItemIndex = index;\n\t\t};\n\n\t\tlet setFixedScrollActiveElement = () => {\n\t\t\tfixedScrollItems.forEach((element, index) => {\n\t\t\t\tif(0 >= Math.floor($(element).position().top)) {\n\t\t\t\t\tfixedScrollActiveItemIndex = index;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Deals with footer as an active element index\n\t\t\tlet $lastScrollElement = $(fixedScrollItems[fixedScrollItems.length - 1]);\n\t\t\tif(Math.floor(self.$tplScroller.outerHeight()) >= (Math.floor($lastScrollElement.position().top + $lastScrollElement.outerHeight()) - 1)) {\n\t\t\t\tfixedScrollActiveItemIndex = fixedScrollItems.length - 1;\n\t\t\t}\n\t\t};\n\n\t\t// Animate the scroll only when the oldActiveElementIndex isnt the same as the current activeElementIndex\n\t\t// This fixes the scrollPositioning of each section so that it is seemless\n\t\tlet adjustSectionItemsScrollPosition = (oldElementIndex) => {\n\t\t\tif(oldElementIndex !== fixedScrollActiveItemIndex) {\n\t\t\t\t$sectionFixedScrollItems.each((index, element) => {\n\t\t\t\t\tlet $fixedScrollItemInner = $(element).find(`[section-fixed-scroll-item-inner]`);\n\t\t\t\t\tlet fixedScrollInnerElement = $fixedScrollItemInner[0];\n\t\t\t\t\tif(index < fixedScrollActiveItemIndex) {\n\t\t\t\t\t\t// Scroll this sections scroll to the bottom\n\t\t\t\t\t\tfixedScrollInnerElement.scrollTop = fixedScrollInnerElement.scrollHeight - fixedScrollInnerElement.clientHeight;\n\t\t\t\t\t}\n\t\t\t\t\telse if(index > fixedScrollActiveItemIndex) {\n\t\t\t\t\t\t// Scroll this sections scroll to the top\n\t\t\t\t\t\t$fixedScrollItemInner[0].scrollTop = 0;\n\t\t\t\t\t}\n\t\t\t\t\t// Only scroll the current section when not scrolling\n\t\t\t\t\telse if(!isScrolling) {\n\t\t\t\t\t\tif(oldElementIndex < fixedScrollActiveItemIndex) {\n\t\t\t\t\t\t\t// Scroll this sections scroll to the top when the oldElementIndex is less then the current element index\n\t\t\t\t\t\t\t$fixedScrollItemInner[0].scrollTop = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(oldElementIndex > fixedScrollActiveItemIndex) {\n\t\t\t\t\t\t\t// Scroll this sections scroll to the bottom\n\t\t\t\t\t\t\t$fixedScrollItemInner[0].scrollTop = fixedScrollInnerElement.scrollHeight - fixedScrollInnerElement.clientHeight;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\n\t\t// tplScroller is invoked when the sectionNavigator widget is clicked or when the element scroll event in $sectionFixedScrollItems is triggered\n\t\tlet setTplScrollerEvent = () => {\n\t\t\tself.$tplScroller.on('scroll.fixedScrollMixin touchmove.fixedScrollMixin', _.throttle(() => {\n\t\t\t\tlet oldElementIndex = fixedScrollActiveItemIndex;\n\n\t\t\t\t// Trailing duration\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tsetFixedScrollActiveElement();\n\t\t\t\t\tadjustSectionItemsScrollPosition(oldElementIndex);\n\t\t\t\t}, scrollDuration);\n\t\t\t}, scrollDuration, { leading: true, trailing: false }));\n\t\t};\n\n\t\tlet scrollToElementIndex = (index) => {\n\t\t\tlet section = fixedScrollItems[index];\n\n\t\t\t// Hide tooltip if exists\n\t\t\tif($('#notepadTooltip').length) {\n\t\t\t\t$('#notepadTooltip').hide();\n\t\t\t}\n\n\t\t\t// Existing scroll into view\n\t\t\tscrollIntoView(section, self.$tplScroller[0], { duration: scrollDuration, easing: scrollEasing }).finally(() => {\n\t\t\t\tsetFixedScrollActiveItemIndex(index);\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tisScrolling = false;\n\t\t\t\t}, scrollDuration + 100);\n\t\t\t});\n\t\t};\n\n\t\t// Scrolls to the previous index\n\t\tlet scrollToPreviousSection = () => {\n\t\t\tlet prevElementIndex = fixedScrollActiveItemIndex - 1;\n\n\t\t\tif(prevElementIndex >= 0) {\n\t\t\t\tscrollToElementIndex(prevElementIndex);\n\t\t\t}\n\t\t\t// Edge case for when the footer is displayed\n\t\t\telse if(fixedScrollActiveItemIndex === 0) {\n\t\t\t\tscrollToElementIndex(0);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tisScrolling = false;\n\t\t\t}\n\t\t};\n\n\t\t// Scrolls to the next index\n\t\tlet scrollToNextSection = () => {\n\t\t\tlet nextElementIndex = fixedScrollActiveItemIndex + 1;\n\n\t\t\tif(nextElementIndex <= (fixedScrollItems.length - 1)) {\n\t\t\t\tscrollToElementIndex(nextElementIndex);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tisScrolling = false;\n\t\t\t}\n\t\t};\n\n\t\t// Remove scrolling events when sections are inactive. Deals with courseAssessmentPage where fixedScrollItems are re-instantiated\n\t\tlet unsetEvents = () => {\n\t\t\tself.$tplScroller.off('scroll.fixedScrollMixin touchmove.fixedScrollMixin');\n\n\t\t\tif(self.$fixedScrollEvent &&self. $fixedScrollEvent.length > 0) {\n\t\t\t\tself.$fixedScrollEvent.off('touchstart.fixedScrollMixin touchend.fixedScrollMixin DOMMouseScroll.fixedScrollMixin wheel.fixedScrollMixin scroll.fixedScrollMixin');\n\t\t\t}\n\n\t\t\t$(window).off('resize.fixedScrollMixin');\n\t\t};\n\n\t\tif(blocks.length > 0) {\n\t\t\tfixedScrollItems = [...blocks, self.$tplFooter[0]];\n\n\t\t\tif(fixedScroll) {\n\t\t\t\t// Remove old events\n\t\t\t\tunsetEvents();\n\n\t\t\t\t// Prevents scroll bouncing for Mac devices\n\t\t\t\t$('html').css({\n\t\t\t\t\toverflow: 'hidden'\n\t\t\t\t});\n\n\t\t\t\tself.$tplScroller.css({\n\t\t\t\t\toverflowY: 'hidden'\n\t\t\t\t});\n\t\t\t\t// Deals with targeting alongside overlay.js file. This is then lower priority class than an inline “overflow: hidden !important”.\n\n\t\t\t\tsetAttributes();\n\t\t\t\tsetSectionResizeEvent();\n\t\t\t\tsetSectionStyles();\n\t\t\t\tsetFixedScrollEvent();\n\t\t\t\tsetTplScrollerEvent();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tconsole.error('FixedScrollMixin::Error', 'Please insert a list of element to be used for the FixedScrollMixin');\n\t\t}\n\t},\n};\n","const NS = 'CourseAssessmentPage';\nconst CLS = 'courseAssessmentPage';\n\nimport { scrollTo } from 'scroll-js';\n\nimport { fixedScrollMixinPage } from '../../../pages/mixins/fixedScrollMixinPage/fixedScrollMixinPage';\n\nexport class CourseAssessmentPage {\n constructor(element) {\n this.element = element;\n this.$element = $(this.element);\n this.$courseAssessmentSectionNavigatorWidget = this.$element.find('[data-wg=\"CourseAssessmentSectionNavigatorWidget\"]');\n this.$tplScroller = $('.tpl-scroller');\n this.$siteSubheaderCourseAssessmentWidget = $('.siteSubheaderCourseAssessmentWidget');\n\n this.scrollDuration = 750;\n this.scrollEasing = 'ease-in-out';\n this.$quizBlocks = this.$element.find('.FormStep').children('.FormChoice').children('[class*=\"Block\"]');\n this.$sections = this.$element.find('.Form__Element.FormStep');\n this.$form = this.$element.find('form');\n\n this.sectionActiveIndex = +this.$element.find(`[name=\"__FormCurrentStepIndex\"]`).val();\n if(_.isNil(this.sectionActiveIndex)) {\n this.sectionActiveIndex = 0;\n }\n\n this.initFixedScroll(this.sectionActiveIndex);\n this.initAttemptedQuestions();\n\n this.initPagination();\n }\n\n initFixedScroll(activeIndex) {\n let blocks = this.$sections.eq(activeIndex).children('.FormChoice').children('[class*=\"Block\"]').toArray();\n let $submitBlock = this.$element.find(`.${CLS}-submit`);\n if($submitBlock.length > 0) {\n blocks.push($submitBlock[0]);\n }\n this.initFixedScrollMixin(this, blocks);\n }\n\n initAttemptedQuestions() {\n $(document).ready(() => {\n if(this.$quizBlocks && this.$quizBlocks.length > 0) {\n let attemptedQuestions = 0;\n\n this.$quizBlocks.each((index, element) => {\n let $element = $(element);\n\n // Increments the attempted questions and mark it as attempted\n let incrementAttemptedQuestions = () => {\n if($element.attr('data-quiz-attempted') !== 'true') {\n $element.attr('data-quiz-attempted', true);\n this.$siteSubheaderCourseAssessmentWidget.trigger('siteSubheaderCourseAssessmentWidget.quizzes.increment', {});\n }\n };\n\n let $multiChoiceAnswerBlock = $element.find('.multiChoiceAnswerBlock');\n $multiChoiceAnswerBlock.on('click', () => {\n incrementAttemptedQuestions();\n });\n\n let $imageSelectAnswerBlock = $element.find('.imageSelectAnswerBlock');\n $imageSelectAnswerBlock.on('click', () => {\n incrementAttemptedQuestions();\n });\n\n // Check if there are items already checked in the quiz block\n let $checkedItems = $element.find(`input[checked=checked]`);\n if($checkedItems && $checkedItems.length > 0) {\n // Quiz has already been attempted\n $element.attr('data-quiz-attempted', true);\n attemptedQuestions++;\n }\n });\n\n // Deal with setting the intial values\n this.$siteSubheaderCourseAssessmentWidget.trigger('siteSubheaderCourseAssessmentWidget.quizzes.init', {\n totalQuestions: this.$quizBlocks.length,\n attemptedQuestions: attemptedQuestions\n });\n }\n });\n }\n\n initPagination() {\n this.$element.find(`.${CLS}-pagination .page-link--previous`).on('click', () => {\n let previous = this.sectionActiveIndex - 1;\n if(previous >= 0) {\n this.setActiveSection(previous);\n }\n });\n\n this.$element.find(`.${CLS}-pagination .page-link--next`).on('click', () => {\n let next = this.sectionActiveIndex + 1;\n if(next <= (this.$sections.length - 1)) {\n this.setActiveSection(next);\n }\n });\n }\n\n setActiveSection(activeIndex) {\n this.$courseAssessmentSectionNavigatorWidget.trigger('courseAssessmentSectionNavigatorWidget.activeNavigationSectionIndex.changed', {\n activeNavigationSectionIndex: activeIndex\n });\n\n this.$element.find('.pagination .page-item')\n .not('.page-item--previous')\n .not('.page-item--next')\n .removeClass('active')\n .eq(activeIndex)\n .addClass('active');\n\n this.initFixedScroll(activeIndex);\n this.sectionActiveIndex = activeIndex; \n scrollTo(this.$tplScroller[0], { top: 0, duration: this.scrollDuration, easing: this.scrollEasing });\n }\n}\n\nObject.assign(CourseAssessmentPage.prototype, fixedScrollMixinPage);","/*!\n * Scroll-js v2.3.2\n * https://github.com/mkay581/scroll-js\n *\n * Copyright (c) 2019 Mark Kennedy\n * Licensed under the MIT license\n */\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\n\nfunction scrollTo(el, options = {}) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!(el instanceof Element) && !(el instanceof Window)) {\r\n throw new Error(`element passed to scrollTo() must be either the window or a DOM element, you passed ${el}!`);\r\n }\r\n options = sanitizeScrollOptions(options);\r\n const scroll = (from, to, prop, startTime, duration = 300, easeFunc, callback) => {\r\n window.requestAnimationFrame(() => {\r\n const currentTime = Date.now();\r\n const time = Math.min(1, (currentTime - startTime) / duration);\r\n if (from === to) {\r\n return callback ? callback() : null;\r\n }\r\n setScrollPosition(el, easeFunc(time) * (to - from) + from);\r\n /* prevent scrolling, if already there, or at end */\r\n if (time < 1) {\r\n scroll(from, to, prop, startTime, duration, easeFunc, callback);\r\n }\r\n else if (callback) {\r\n callback();\r\n }\r\n });\r\n };\r\n const currentScrollPosition = getScrollPosition(el);\r\n const scrollProperty = getScrollPropertyByElement(el);\r\n return new Promise(resolve => {\r\n scroll(currentScrollPosition, typeof options.top === 'number'\r\n ? options.top\r\n : currentScrollPosition, scrollProperty, Date.now(), options.duration, getEasing(options.easing), resolve);\r\n });\r\n });\r\n}\r\nfunction scrollIntoView(element, scroller, options) {\r\n validateElement(element);\r\n if (scroller && !(scroller instanceof Element)) {\r\n options = scroller;\r\n scroller = undefined;\r\n }\r\n const { duration, easing } = sanitizeScrollOptions(options);\r\n scroller = scroller || utils.getDocument().body;\r\n let currentContainerScrollYPos = 0;\r\n let elementScrollYPos = element ? element.offsetTop : 0;\r\n const document = utils.getDocument();\r\n // if the container is the document body or document itself, we'll\r\n // need a different set of coordinates for accuracy\r\n if (scroller === document.body || scroller === document.documentElement) {\r\n // using pageYOffset for cross-browser compatibility\r\n currentContainerScrollYPos = window.pageYOffset;\r\n // must add containers scroll y position to ensure an absolute value that does not change\r\n elementScrollYPos =\r\n element.getBoundingClientRect().top + currentContainerScrollYPos;\r\n }\r\n return scrollTo(scroller, {\r\n top: elementScrollYPos,\r\n left: 0,\r\n duration,\r\n easing\r\n });\r\n}\r\nfunction validateElement(element) {\r\n if (element === undefined) {\r\n const errorMsg = 'The element passed to scrollIntoView() was undefined.';\r\n throw new Error(errorMsg);\r\n }\r\n if (!(element instanceof HTMLElement)) {\r\n throw new Error(`The element passed to scrollIntoView() must be a valid element. You passed ${element}.`);\r\n }\r\n}\r\nfunction getScrollPropertyByElement(el) {\r\n const props = {\r\n window: {\r\n y: 'scrollY',\r\n x: 'scrollX'\r\n },\r\n element: {\r\n y: 'scrollTop',\r\n x: 'scrollLeft'\r\n }\r\n };\r\n const axis = 'y';\r\n if (el instanceof Window) {\r\n return props.window[axis];\r\n }\r\n else {\r\n return props.element[axis];\r\n }\r\n}\r\nfunction sanitizeScrollOptions(options = {}) {\r\n if (options.behavior === 'smooth') {\r\n options.easing = 'ease-in-out';\r\n options.duration = 300;\r\n }\r\n if (options.behavior === 'auto') {\r\n options.duration = 0;\r\n options.easing = 'linear';\r\n }\r\n return options;\r\n}\r\nfunction getScrollPosition(el) {\r\n const document = utils.getDocument();\r\n if (el === document.body ||\r\n el === document.documentElement ||\r\n el instanceof Window) {\r\n return document.body.scrollTop || document.documentElement.scrollTop;\r\n }\r\n else {\r\n return el.scrollTop;\r\n }\r\n}\r\nfunction setScrollPosition(el, value) {\r\n const document = utils.getDocument();\r\n if (el === document.body ||\r\n el === document.documentElement ||\r\n el instanceof Window) {\r\n document.body.scrollTop = value;\r\n document.documentElement.scrollTop = value;\r\n }\r\n else {\r\n el.scrollTop = value;\r\n }\r\n}\r\nconst utils = {\r\n // we're really just exporting this so that tests can mock the document.documentElement\r\n getDocument() {\r\n return document;\r\n }\r\n};\r\nconst easingMap = {\r\n linear(t) {\r\n return t;\r\n },\r\n 'ease-in'(t) {\r\n return t * t;\r\n },\r\n 'ease-out'(t) {\r\n return t * (2 - t);\r\n },\r\n 'ease-in-out'(t) {\r\n return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;\r\n }\r\n};\r\nconst getEasing = (easing) => {\r\n const defaultEasing = 'linear';\r\n const easeFunc = easingMap[easing || defaultEasing];\r\n if (!easeFunc) {\r\n const options = Object.keys(easingMap).join(',');\r\n throw new Error(`Scroll error: scroller does not support an easing option of \"${easing}\". Supported options are ${options}`);\r\n }\r\n return easeFunc;\r\n};\n\nexport { easingMap, scrollIntoView, scrollTo, utils };\n","class 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","module.exports = require('./src/normalizeWheel.js');\n","/**\n * Copyright (c) 2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule normalizeWheel\n * @typechecks\n */\n\n'use strict';\n\nvar UserAgent_DEPRECATED = require('./UserAgent_DEPRECATED');\n\nvar isEventSupported = require('./isEventSupported');\n\n\n// Reasonable defaults\nvar PIXEL_STEP = 10;\nvar LINE_HEIGHT = 40;\nvar PAGE_HEIGHT = 800;\n\n/**\n * Mouse wheel (and 2-finger trackpad) support on the web sucks. It is\n * complicated, thus this doc is long and (hopefully) detailed enough to answer\n * your questions.\n *\n * If you need to react to the mouse wheel in a predictable way, this code is\n * like your bestest friend. * hugs *\n *\n * As of today, there are 4 DOM event types you can listen to:\n *\n * 'wheel' -- Chrome(31+), FF(17+), IE(9+)\n * 'mousewheel' -- Chrome, IE(6+), Opera, Safari\n * 'MozMousePixelScroll' -- FF(3.5 only!) (2010-2013) -- don't bother!\n * 'DOMMouseScroll' -- FF(0.9.7+) since 2003\n *\n * So what to do? The is the best:\n *\n * normalizeWheel.getEventType();\n *\n * In your event callback, use this code to get sane interpretation of the\n * deltas. This code will return an object with properties:\n *\n * spinX -- normalized spin speed (use for zoom) - x plane\n * spinY -- \" - y plane\n * pixelX -- normalized distance (to pixels) - x plane\n * pixelY -- \" - y plane\n *\n * Wheel values are provided by the browser assuming you are using the wheel to\n * scroll a web page by a number of lines or pixels (or pages). Values can vary\n * significantly on different platforms and browsers, forgetting that you can\n * scroll at different speeds. Some devices (like trackpads) emit more events\n * at smaller increments with fine granularity, and some emit massive jumps with\n * linear speed or acceleration.\n *\n * This code does its best to normalize the deltas for you:\n *\n * - spin is trying to normalize how far the wheel was spun (or trackpad\n * dragged). This is super useful for zoom support where you want to\n * throw away the chunky scroll steps on the PC and make those equal to\n * the slow and smooth tiny steps on the Mac. Key data: This code tries to\n * resolve a single slow step on a wheel to 1.\n *\n * - pixel is normalizing the desired scroll delta in pixel units. You'll\n * get the crazy differences between browsers, but at least it'll be in\n * pixels!\n *\n * - positive value indicates scrolling DOWN/RIGHT, negative UP/LEFT. This\n * should translate to positive value zooming IN, negative zooming OUT.\n * This matches the newer 'wheel' event.\n *\n * Why are there spinX, spinY (or pixels)?\n *\n * - spinX is a 2-finger side drag on the trackpad, and a shift + wheel turn\n * with a mouse. It results in side-scrolling in the browser by default.\n *\n * - spinY is what you expect -- it's the classic axis of a mouse wheel.\n *\n * - I dropped spinZ/pixelZ. It is supported by the DOM 3 'wheel' event and\n * probably is by browsers in conjunction with fancy 3D controllers .. but\n * you know.\n *\n * Implementation info:\n *\n * Examples of 'wheel' event if you scroll slowly (down) by one step with an\n * average mouse:\n *\n * OS X + Chrome (mouse) - 4 pixel delta (wheelDelta -120)\n * OS X + Safari (mouse) - N/A pixel delta (wheelDelta -12)\n * OS X + Firefox (mouse) - 0.1 line delta (wheelDelta N/A)\n * Win8 + Chrome (mouse) - 100 pixel delta (wheelDelta -120)\n * Win8 + Firefox (mouse) - 3 line delta (wheelDelta -120)\n *\n * On the trackpad:\n *\n * OS X + Chrome (trackpad) - 2 pixel delta (wheelDelta -6)\n * OS X + Firefox (trackpad) - 1 pixel delta (wheelDelta N/A)\n *\n * On other/older browsers.. it's more complicated as there can be multiple and\n * also missing delta values.\n *\n * The 'wheel' event is more standard:\n *\n * http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents\n *\n * The basics is that it includes a unit, deltaMode (pixels, lines, pages), and\n * deltaX, deltaY and deltaZ. Some browsers provide other values to maintain\n * backward compatibility with older events. Those other values help us\n * better normalize spin speed. Example of what the browsers provide:\n *\n * | event.wheelDelta | event.detail\n * ------------------+------------------+--------------\n * Safari v5/OS X | -120 | 0\n * Safari v5/Win7 | -120 | 0\n * Chrome v17/OS X | -120 | 0\n * Chrome v17/Win7 | -120 | 0\n * IE9/Win7 | -120 | undefined\n * Firefox v4/OS X | undefined | 1\n * Firefox v4/Win7 | undefined | 3\n *\n */\nfunction normalizeWheel(/*object*/ event) /*object*/ {\n var sX = 0, sY = 0, // spinX, spinY\n pX = 0, pY = 0; // pixelX, pixelY\n\n // Legacy\n if ('detail' in event) { sY = event.detail; }\n if ('wheelDelta' in event) { sY = -event.wheelDelta / 120; }\n if ('wheelDeltaY' in event) { sY = -event.wheelDeltaY / 120; }\n if ('wheelDeltaX' in event) { sX = -event.wheelDeltaX / 120; }\n\n // side scrolling on FF with DOMMouseScroll\n if ( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {\n sX = sY;\n sY = 0;\n }\n\n pX = sX * PIXEL_STEP;\n pY = sY * PIXEL_STEP;\n\n if ('deltaY' in event) { pY = event.deltaY; }\n if ('deltaX' in event) { pX = event.deltaX; }\n\n if ((pX || pY) && event.deltaMode) {\n if (event.deltaMode == 1) { // delta in LINE units\n pX *= LINE_HEIGHT;\n pY *= LINE_HEIGHT;\n } else { // delta in PAGE units\n pX *= PAGE_HEIGHT;\n pY *= PAGE_HEIGHT;\n }\n }\n\n // Fall-back if spin cannot be determined\n if (pX && !sX) { sX = (pX < 1) ? -1 : 1; }\n if (pY && !sY) { sY = (pY < 1) ? -1 : 1; }\n\n return { spinX : sX,\n spinY : sY,\n pixelX : pX,\n pixelY : pY };\n}\n\n\n/**\n * The best combination if you prefer spinX + spinY normalization. It favors\n * the older DOMMouseScroll for Firefox, as FF does not include wheelDelta with\n * 'wheel' event, making spin speed determination impossible.\n */\nnormalizeWheel.getEventType = function() /*string*/ {\n return (UserAgent_DEPRECATED.firefox())\n ? 'DOMMouseScroll'\n : (isEventSupported('wheel'))\n ? 'wheel'\n : 'mousewheel';\n};\n\nmodule.exports = normalizeWheel;\n","/**\n * Copyright 2004-present Facebook. All Rights Reserved.\n *\n * @providesModule UserAgent_DEPRECATED\n */\n\n/**\n * Provides entirely client-side User Agent and OS detection. You should prefer\n * the non-deprecated UserAgent module when possible, which exposes our\n * authoritative server-side PHP-based detection to the client.\n *\n * Usage is straightforward:\n *\n * if (UserAgent_DEPRECATED.ie()) {\n * // IE\n * }\n *\n * You can also do version checks:\n *\n * if (UserAgent_DEPRECATED.ie() >= 7) {\n * // IE7 or better\n * }\n *\n * The browser functions will return NaN if the browser does not match, so\n * you can also do version compares the other way:\n *\n * if (UserAgent_DEPRECATED.ie() < 7) {\n * // IE6 or worse\n * }\n *\n * Note that the version is a float and may include a minor version number,\n * so you should always use range operators to perform comparisons, not\n * strict equality.\n *\n * **Note:** You should **strongly** prefer capability detection to browser\n * version detection where it's reasonable:\n *\n * http://www.quirksmode.org/js/support.html\n *\n * Further, we have a large number of mature wrapper functions and classes\n * which abstract away many browser irregularities. Check the documentation,\n * grep for things, or ask on javascript@lists.facebook.com before writing yet\n * another copy of \"event || window.event\".\n *\n */\n\nvar _populated = false;\n\n// Browsers\nvar _ie, _firefox, _opera, _webkit, _chrome;\n\n// Actual IE browser for compatibility mode\nvar _ie_real_version;\n\n// Platforms\nvar _osx, _windows, _linux, _android;\n\n// Architectures\nvar _win64;\n\n// Devices\nvar _iphone, _ipad, _native;\n\nvar _mobile;\n\nfunction _populate() {\n if (_populated) {\n return;\n }\n\n _populated = true;\n\n // To work around buggy JS libraries that can't handle multi-digit\n // version numbers, Opera 10's user agent string claims it's Opera\n // 9, then later includes a Version/X.Y field:\n //\n // Opera/9.80 (foo) Presto/2.2.15 Version/10.10\n var uas = navigator.userAgent;\n var agent = /(?:MSIE.(\\d+\\.\\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\\d+\\.\\d+))|(?:Opera(?:.+Version.|.)(\\d+\\.\\d+))|(?:AppleWebKit.(\\d+(?:\\.\\d+)?))|(?:Trident\\/\\d+\\.\\d+.*rv:(\\d+\\.\\d+))/.exec(uas);\n var os = /(Mac OS X)|(Windows)|(Linux)/.exec(uas);\n\n _iphone = /\\b(iPhone|iP[ao]d)/.exec(uas);\n _ipad = /\\b(iP[ao]d)/.exec(uas);\n _android = /Android/i.exec(uas);\n _native = /FBAN\\/\\w+;/i.exec(uas);\n _mobile = /Mobile/i.exec(uas);\n\n // Note that the IE team blog would have you believe you should be checking\n // for 'Win64; x64'. But MSDN then reveals that you can actually be coming\n // from either x64 or ia64; so ultimately, you should just check for Win64\n // as in indicator of whether you're in 64-bit IE. 32-bit IE on 64-bit\n // Windows will send 'WOW64' instead.\n _win64 = !!(/Win64/.exec(uas));\n\n if (agent) {\n _ie = agent[1] ? parseFloat(agent[1]) : (\n agent[5] ? parseFloat(agent[5]) : NaN);\n // IE compatibility mode\n if (_ie && document && document.documentMode) {\n _ie = document.documentMode;\n }\n // grab the \"true\" ie version from the trident token if available\n var trident = /(?:Trident\\/(\\d+.\\d+))/.exec(uas);\n _ie_real_version = trident ? parseFloat(trident[1]) + 4 : _ie;\n\n _firefox = agent[2] ? parseFloat(agent[2]) : NaN;\n _opera = agent[3] ? parseFloat(agent[3]) : NaN;\n _webkit = agent[4] ? parseFloat(agent[4]) : NaN;\n if (_webkit) {\n // We do not add the regexp to the above test, because it will always\n // match 'safari' only since 'AppleWebKit' appears before 'Chrome' in\n // the userAgent string.\n agent = /(?:Chrome\\/(\\d+\\.\\d+))/.exec(uas);\n _chrome = agent && agent[1] ? parseFloat(agent[1]) : NaN;\n } else {\n _chrome = NaN;\n }\n } else {\n _ie = _firefox = _opera = _chrome = _webkit = NaN;\n }\n\n if (os) {\n if (os[1]) {\n // Detect OS X version. If no version number matches, set _osx to true.\n // Version examples: 10, 10_6_1, 10.7\n // Parses version number as a float, taking only first two sets of\n // digits. If only one set of digits is found, returns just the major\n // version number.\n var ver = /(?:Mac OS X (\\d+(?:[._]\\d+)?))/.exec(uas);\n\n _osx = ver ? parseFloat(ver[1].replace('_', '.')) : true;\n } else {\n _osx = false;\n }\n _windows = !!os[2];\n _linux = !!os[3];\n } else {\n _osx = _windows = _linux = false;\n }\n}\n\nvar UserAgent_DEPRECATED = {\n\n /**\n * Check if the UA is Internet Explorer.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n ie: function() {\n return _populate() || _ie;\n },\n\n /**\n * Check if we're in Internet Explorer compatibility mode.\n *\n * @return bool true if in compatibility mode, false if\n * not compatibility mode or not ie\n */\n ieCompatibilityMode: function() {\n return _populate() || (_ie_real_version > _ie);\n },\n\n\n /**\n * Whether the browser is 64-bit IE. Really, this is kind of weak sauce; we\n * only need this because Skype can't handle 64-bit IE yet. We need to remove\n * this when we don't need it -- tracked by #601957.\n */\n ie64: function() {\n return UserAgent_DEPRECATED.ie() && _win64;\n },\n\n /**\n * Check if the UA is Firefox.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n firefox: function() {\n return _populate() || _firefox;\n },\n\n\n /**\n * Check if the UA is Opera.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n opera: function() {\n return _populate() || _opera;\n },\n\n\n /**\n * Check if the UA is WebKit.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n webkit: function() {\n return _populate() || _webkit;\n },\n\n /**\n * For Push\n * WILL BE REMOVED VERY SOON. Use UserAgent_DEPRECATED.webkit\n */\n safari: function() {\n return UserAgent_DEPRECATED.webkit();\n },\n\n /**\n * Check if the UA is a Chrome browser.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n chrome : function() {\n return _populate() || _chrome;\n },\n\n\n /**\n * Check if the user is running Windows.\n *\n * @return bool `true' if the user's OS is Windows.\n */\n windows: function() {\n return _populate() || _windows;\n },\n\n\n /**\n * Check if the user is running Mac OS X.\n *\n * @return float|bool Returns a float if a version number is detected,\n * otherwise true/false.\n */\n osx: function() {\n return _populate() || _osx;\n },\n\n /**\n * Check if the user is running Linux.\n *\n * @return bool `true' if the user's OS is some flavor of Linux.\n */\n linux: function() {\n return _populate() || _linux;\n },\n\n /**\n * Check if the user is running on an iPhone or iPod platform.\n *\n * @return bool `true' if the user is running some flavor of the\n * iPhone OS.\n */\n iphone: function() {\n return _populate() || _iphone;\n },\n\n mobile: function() {\n return _populate() || (_iphone || _ipad || _android || _mobile);\n },\n\n nativeApp: function() {\n // webviews inside of the native apps\n return _populate() || _native;\n },\n\n android: function() {\n return _populate() || _android;\n },\n\n ipad: function() {\n return _populate() || _ipad;\n }\n};\n\nmodule.exports = UserAgent_DEPRECATED;\n","/**\n * Copyright 2013-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule isEventSupported\n */\n\n'use strict';\n\nvar ExecutionEnvironment = require('./ExecutionEnvironment');\n\nvar useHasFeature;\nif (ExecutionEnvironment.canUseDOM) {\n useHasFeature =\n document.implementation &&\n document.implementation.hasFeature &&\n // always returns true in newer browsers as per the standard.\n // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature\n document.implementation.hasFeature('', '') !== true;\n}\n\n/**\n * Checks if an event is supported in the current execution environment.\n *\n * NOTE: This will not work correctly for non-generic events such as `change`,\n * `reset`, `load`, `error`, and `select`.\n *\n * Borrows from Modernizr.\n *\n * @param {string} eventNameSuffix Event name, e.g. \"click\".\n * @param {?boolean} capture Check if the capture phase is supported.\n * @return {boolean} True if the event is supported.\n * @internal\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\nfunction isEventSupported(eventNameSuffix, capture) {\n if (!ExecutionEnvironment.canUseDOM ||\n capture && !('addEventListener' in document)) {\n return false;\n }\n\n var eventName = 'on' + eventNameSuffix;\n var isSupported = eventName in document;\n\n if (!isSupported) {\n var element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof element[eventName] === 'function';\n }\n\n if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {\n // This is the only way to test support for the `wheel` event in IE9+.\n isSupported = document.implementation.hasFeature('Events.wheel', '3.0');\n }\n\n return isSupported;\n}\n\nmodule.exports = isEventSupported;\n","/**\n * Copyright (c) 2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule ExecutionEnvironment\n */\n\n/*jslint evil: true */\n\n'use strict';\n\nvar canUseDOM = !!(\n typeof window !== 'undefined' &&\n window.document &&\n window.document.createElement\n);\n\n/**\n * Simple, lightweight module assisting with the detection and context of\n * Worker. Helps avoid circular dependencies and allows code to reason about\n * whether or not they are in a Worker, even if they never include the main\n * `ReactWorker` dependency.\n */\nvar ExecutionEnvironment = {\n\n canUseDOM: canUseDOM,\n\n canUseWorkers: typeof Worker !== 'undefined',\n\n canUseEventListeners:\n canUseDOM && !!(window.addEventListener || window.attachEvent),\n\n canUseViewport: canUseDOM && !!window.screen,\n\n isInWorker: !canUseDOM // For now, this is true - might change in the future.\n\n};\n\nmodule.exports = ExecutionEnvironment;\n"],"sourceRoot":""}