{"version":3,"sources":["webpack:///javascripts/78-257c10c0995a4d25fa59.min.js","webpack:///./app/assets/javascripts/landing-template/components/sections/SectionVideoTime.ts","webpack:///./app/assets/html/landing-template/components/sections/section-video-time.html"],"names":["webpackJsonp","4lUF","module","exports","__webpack_require__","SectionVideoTime","$stateParams","this","currentVideoTime","lastWistiaTime","wistiaOptions","volume","wistiaCrosstimeListeners","ltTitle","t","description","d","introduceVideoShow","iv","$inject","prototype","$onDestroy","unBindWistiaCrosstime","handlerWistiaModalClose","changeVideoTime","timeStep","setActive","time","setWistiaPlayer","video","_this","wistiaVideo","timeSteps","forEach","bindWistiaCrosstime","ts","isActive","o","unbind","fun","bindFun","push","bind","angular","component","bindings","buttons","background","isScrollButton","controller","templateUrl","Jul4","p"],"mappings":"AAAAA,cAAc,KAERC,OACA,SAAUC,EAAQC,EAASC,GCHjC,GAAAC,GAAA,WAkBI,QAAAA,GAAoBC,GAAAC,KAAAD,eAXpBC,KAAAC,iBAAyB,EAIjBD,KAAAE,eAAiB,EACjBF,KAAAG,eACJC,OAAQ,GAGJJ,KAAAK,4BAGJL,KAAKM,QAAqBN,KAAKD,aAAaQ,GAAKP,KAAKM,QACtDN,KAAKQ,YAAqBR,KAAKD,aAAaU,GAAKT,KAAKQ,YACtDR,KAAKU,mBAAqBV,KAAKD,aAAaY,GA2CpD,MD1DIb,GAAiBc,SAAW,gBCkB5Bd,EAAAe,UAAAC,WAAA,WACId,KAAKe,yBAGTjB,EAAAe,UAAAG,wBAAA,WACIhB,KAAKU,oBAAqB,EAC1BV,KAAKC,iBAAqBD,KAAKE,gBAGnCJ,EAAAe,UAAAI,gBAAA,SAAgBC,GACZlB,KAAKmB,UAAUD,GACflB,KAAKC,iBAAmBiB,EAASE,MAGrCtB,EAAAe,UAAAQ,gBAAA,SAAgBC,GAAhB,GAAAC,GAAAvB,IACIA,MAAKwB,YAAcF,EACnBtB,KAAKwB,YAAYpB,OAAOJ,KAAKG,cAAcC,QAC3CJ,KAAKyB,UAAUC,QAAQ,SAAAR,GAAY,MAAAK,GAAKI,oBAAoBT,MAGxDpB,EAAAe,UAAAM,UAAR,SAAkBD,GACdlB,KAAKyB,UAAUC,QAAQ,SAAAE,GAAM,MAAAA,GAAGC,UAAW,IAC3CX,EAASW,UAAa,EACtB7B,KAAKE,eAAiBgB,EAASE,MAG3BtB,EAAAe,UAAAE,sBAAR,cAAAQ,GAAAvB,IACQA,MAAKwB,aACLxB,KAAKK,yBAAyBqB,QAAQ,SAAAI,GAAK,MAAAP,GAAKC,YAAYO,OAAO,YAAaD,EAAEV,KAAMU,EAAEE,QAI1FlC,EAAAe,UAAAc,oBAAR,SAA4BT,GAA5B,GAAAK,GAAAvB,KACUiC,EAAU,WAAM,MAAAV,GAAKJ,UAAUD,GACrClB,MAAKK,yBAAyB6B,MAC1BF,IAAKC,EACLb,KAAMF,EAASE,OAEnBpB,KAAKwB,aAAexB,KAAKwB,YAAYW,KAAK,YAAajB,EAASE,KAAMa,IAE9EnC,IAEAsC,SAAQzC,OAAO,oCAAqC0C,UAAU,oBAC1DC,UACIhC,QAAS,IACTE,YAAa,IACb+B,QAAS,IACTjB,MAAO,IACPG,UAAW,IACXe,WAAY,IACZC,eAAgB,KAEpBC,WAAY5C,EACZ6C,YAAa9C,EAAQ,WDFnB+C,KACA,SAAUjD,EAAQC,EAASC,GE5EjCF,EAAAC,QAAAC,EAAAgD,EAAA","file":"javascripts/78-257c10c0995a4d25fa59.min.js","sourcesContent":["webpackJsonp([78],{\n\n/***/ \"4lUF\":\n/***/ (function(module, exports, __webpack_require__) {\n\nvar SectionVideoTime = (function () {\r\n SectionVideoTime.$inject = [\"$stateParams\"];\r\n function SectionVideoTime($stateParams) {\r\n this.$stateParams = $stateParams;\r\n this.currentVideoTime = 0;\r\n this.lastWistiaTime = 0;\r\n this.wistiaOptions = {\r\n volume: 0\r\n };\r\n this.wistiaCrosstimeListeners = [];\r\n this.ltTitle = this.$stateParams.t || this.ltTitle;\r\n this.description = this.$stateParams.d || this.description;\r\n this.introduceVideoShow = this.$stateParams.iv;\r\n }\r\n SectionVideoTime.prototype.$onDestroy = function () {\r\n this.unBindWistiaCrosstime();\r\n };\r\n SectionVideoTime.prototype.handlerWistiaModalClose = function () {\r\n this.introduceVideoShow = false;\r\n this.currentVideoTime = this.lastWistiaTime;\r\n };\r\n SectionVideoTime.prototype.changeVideoTime = function (timeStep) {\r\n this.setActive(timeStep);\r\n this.currentVideoTime = timeStep.time;\r\n };\r\n SectionVideoTime.prototype.setWistiaPlayer = function (video) {\r\n var _this = this;\r\n this.wistiaVideo = video;\r\n this.wistiaVideo.volume(this.wistiaOptions.volume);\r\n this.timeSteps.forEach(function (timeStep) { return _this.bindWistiaCrosstime(timeStep); });\r\n };\r\n SectionVideoTime.prototype.setActive = function (timeStep) {\r\n this.timeSteps.forEach(function (ts) { return ts.isActive = false; });\r\n timeStep.isActive = true;\r\n this.lastWistiaTime = timeStep.time;\r\n };\r\n SectionVideoTime.prototype.unBindWistiaCrosstime = function () {\r\n var _this = this;\r\n if (this.wistiaVideo) {\r\n this.wistiaCrosstimeListeners.forEach(function (o) { return _this.wistiaVideo.unbind('crosstime', o.time, o.fun); });\r\n }\r\n };\r\n SectionVideoTime.prototype.bindWistiaCrosstime = function (timeStep) {\r\n var _this = this;\r\n var bindFun = function () { return _this.setActive(timeStep); };\r\n this.wistiaCrosstimeListeners.push({\r\n fun: bindFun,\r\n time: timeStep.time\r\n });\r\n this.wistiaVideo && this.wistiaVideo.bind(\"crosstime\", timeStep.time, bindFun);\r\n };\r\n return SectionVideoTime;\r\n}());\r\nangular.module('animatronApp.sectionVideoTime', []).component('sectionVideoTime', {\r\n bindings: {\r\n ltTitle: '<',\r\n description: '<',\r\n buttons: '<',\r\n video: '<',\r\n timeSteps: '<',\r\n background: '<',\r\n isScrollButton: '<'\r\n },\r\n controller: SectionVideoTime,\r\n templateUrl: __webpack_require__(\"Jul4\")\r\n});\r\n\n\n/***/ }),\n\n/***/ \"Jul4\":\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__.p + \"html/section-video-time_738e371e464d60f85a6e2dc269b638b5.html\";\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// javascripts/78-257c10c0995a4d25fa59.min.js","class SectionVideoTime implements ng.IComponentController {\n ltTitle: string;\n description: string;\n video: anm.LandingVideo;\n buttons: anm.LandingButtonData[];\n timeSteps: anm.LandingTimeStep[];\n background: anm.LandingBackground;\n currentVideoTime = 0;\n isScrollButton: boolean;\n introduceVideoShow: boolean;\n private wistiaVideo: any;\n private lastWistiaTime = 0;\n private wistiaOptions = {\n volume: 0\n };\n\n private wistiaCrosstimeListeners: {fun: () => any, time: number}[] = [];\n\n constructor(private $stateParams: ng.ui.IStateParamsService) {\n this.ltTitle = this.$stateParams.t || this.ltTitle;\n this.description = this.$stateParams.d || this.description;\n this.introduceVideoShow = this.$stateParams.iv;\n }\n\n $onDestroy() {\n this.unBindWistiaCrosstime();\n }\n\n handlerWistiaModalClose() {\n this.introduceVideoShow = false;\n this.currentVideoTime = this.lastWistiaTime;\n }\n\n changeVideoTime(timeStep: anm.LandingTimeStep) {\n this.setActive(timeStep);\n this.currentVideoTime = timeStep.time;\n }\n\n setWistiaPlayer(video: any) {\n this.wistiaVideo = video;\n this.wistiaVideo.volume(this.wistiaOptions.volume);\n this.timeSteps.forEach(timeStep => this.bindWistiaCrosstime(timeStep));\n }\n\n private setActive(timeStep: anm.LandingTimeStep) {\n this.timeSteps.forEach(ts => ts.isActive = false);\n timeStep.isActive = true;\n this.lastWistiaTime = timeStep.time;\n }\n\n private unBindWistiaCrosstime() {\n if (this.wistiaVideo) {\n this.wistiaCrosstimeListeners.forEach(o => this.wistiaVideo.unbind('crosstime', o.time, o.fun));\n }\n }\n\n private bindWistiaCrosstime(timeStep: anm.LandingTimeStep) {\n const bindFun = () => this.setActive(timeStep);\n this.wistiaCrosstimeListeners.push({\n fun: bindFun,\n time: timeStep.time\n });\n this.wistiaVideo && this.wistiaVideo.bind(\"crosstime\", timeStep.time, bindFun);\n }\n}\n\nangular.module('animatronApp.sectionVideoTime', []).component('sectionVideoTime', {\n bindings: {\n ltTitle: '<',\n description: '<',\n buttons: '<',\n video: '<',\n timeSteps: '<',\n background: '<',\n isScrollButton: '<'\n },\n controller: SectionVideoTime,\n templateUrl: require('landing-template/components/sections/section-video-time.html')\n});\n\n\n\n// WEBPACK FOOTER //\n// ./app/assets/javascripts/landing-template/components/sections/SectionVideoTime.ts","module.exports = __webpack_public_path__ + \"html/section-video-time_738e371e464d60f85a6e2dc269b638b5.html\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/assets/html/landing-template/components/sections/section-video-time.html\n// module id = Jul4\n// module chunks = 78"],"sourceRoot":""}