{"version":3,"sources":["webpack:///javascripts/73-257c10c0995a4d25fa59.min.js","webpack:///./app/assets/javascripts/landing-template/LandingTemplate.ts","webpack:///./app/assets/html/landing-template/landing-template.html"],"names":["webpackJsonp","/vY6","module","exports","__webpack_require__","Object","defineProperty","value","TemplateLandingPages_1","underscore_extensions_1","LandingTemplate","$state","$element","$rootScope","$compile","_this","this","scopeList","landingData","default","find","landing","is","url","$inject","prototype","$onInit","compileSections","$onDestroy","forEach","scope","$destroy","sectionsContainerEl","angular","element","querySelector","getKey","key","curKey","Utils","toHyphenCase","sectionDataToString","_","compose","attrsArr","join","keys","map","sections","section","attrs","sectionEl","name","assign","$new","push","append","component","controller","templateUrl","SjG1","p"],"mappings":"AAAAA,cAAc,KAERC,OACA,SAAUC,EAAQC,EAASC,GAEjC,YCJAC,QAAOC,eAAeH,EAAS,cAAgBI,OAAO,GADtD,IAAAC,GAAAJ,EAAA,QACAK,EAAAL,EAAA,QAEAM,EAAA,WAII,QAAAA,GAAoBC,EACAC,EACAC,EACAC,GAHpB,GAAAC,GAAAC,IAAoBA,MAAAL,SACAK,KAAAJ,WACAI,KAAAH,aACAG,KAAAF,WALZE,KAAAC,aAMJD,KAAKE,YAAcV,EAAAW,QAAaC,KAAK,SAAAC,GAAW,MAAAN,GAAKJ,OAAOW,GAAGD,EAAQE,OA+B/E,MD/BIb,GAAgBc,SAAW,SAAU,WAAY,aAAc,YCG/Dd,EAAAe,UAAAC,QAAA,WACIV,KAAKW,mBAGTjB,EAAAe,UAAAG,WAAA,WACIZ,KAAKC,UAAUY,QAAQ,SAACC,GAAqB,MAAAA,GAAMC,cAG/CrB,EAAAe,UAAAE,gBAAR,cAAAZ,GAAAC,KACUgB,EAAsBC,QAAQC,QAAQlB,KAAKJ,SAAS,GAAGuB,cAAc,cACrEC,EAAS,SAACC,GACZ,GAAMC,GAAiB,UAARD,EAAkB,UAAYA,CAC7C,OAAO5B,GAAA8B,MAAMC,aAAaF,IAExBG,EAAsBC,EAAEC,QAAA,SACxBC,GAAuB,MAAAA,GAASC,KAAK,eACrCC,GAAmB,MAAAA,GAAKC,IAAI,SAAAV,GAAO,MAAGD,GAAOC,GAAI,KAAKA,EAAG,OAC3DK,EAAEI,KAGN9B,MAAKE,YAAY8B,SAASnB,QAAQ,SAAAoB,GAC9B,GAAMC,GAAQT,EAAoBQ,GAC5BE,EAAYlB,QAAQC,QAAQ,YAAYe,EAAQG,KAAI,IAAIF,EAAK,cAAcD,EAAQG,KAAI,KACvFtB,EAAQzB,OAAOgD,OAAOtC,EAAKF,WAAWyC,OAAQL,EACpDlC,GAAKE,UAAUsC,KAAKzB,GACpBE,EAAoBwB,OAAOzC,EAAKD,SAASqC,GAAWrB,OAGhEpB,IAEAuB,SAAQ/B,OAAO,mCAAoCuD,UAAU,mBACzDC,WAAYhD,EACZiD,YAAavD,EAAQ,WDOnBwD,KACA,SAAU1D,EAAQC,EAASC,GEtDjCF,EAAAC,QAAAC,EAAAyD,EAAA","file":"javascripts/73-257c10c0995a4d25fa59.min.js","sourcesContent":["webpackJsonp([73],{\n\n/***/ \"/vY6\":\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar TemplateLandingPages_1 = __webpack_require__(\"9/76\");\r\nvar underscore_extensions_1 = __webpack_require__(\"R0iF\");\r\nvar LandingTemplate = (function () {\r\n LandingTemplate.$inject = [\"$state\", \"$element\", \"$rootScope\", \"$compile\"];\r\n function LandingTemplate($state, $element, $rootScope, $compile) {\r\n var _this = this;\r\n this.$state = $state;\r\n this.$element = $element;\r\n this.$rootScope = $rootScope;\r\n this.$compile = $compile;\r\n this.scopeList = [];\r\n this.landingData = TemplateLandingPages_1.default.find(function (landing) { return _this.$state.is(landing.url); });\r\n }\r\n LandingTemplate.prototype.$onInit = function () {\r\n this.compileSections();\r\n };\r\n LandingTemplate.prototype.$onDestroy = function () {\r\n this.scopeList.forEach(function (scope) { return scope.$destroy(); });\r\n };\r\n LandingTemplate.prototype.compileSections = function () {\r\n var _this = this;\r\n var sectionsContainerEl = angular.element(this.$element[0].querySelector('#sections'));\r\n var getKey = function (key) {\r\n var curKey = key === 'title' ? 'ltTitle' : key;\r\n return underscore_extensions_1.Utils.toHyphenCase(curKey);\r\n };\r\n var sectionDataToString = _.compose((function (attrsArr) { return attrsArr.join(' '); }), (function (keys) { return keys.map(function (key) { return getKey(key) + \"=\\\"\" + key + \"\\\"\"; }); }), _.keys);\r\n this.landingData.sections.forEach(function (section) {\r\n var attrs = sectionDataToString(section);\r\n var sectionEl = angular.element(\"\");\r\n var scope = Object.assign(_this.$rootScope.$new(), section);\r\n _this.scopeList.push(scope);\r\n sectionsContainerEl.append(_this.$compile(sectionEl)(scope));\r\n });\r\n };\r\n return LandingTemplate;\r\n}());\r\nangular.module('animatronApp.landingTemplate', []).component('landingTemplate', {\r\n controller: LandingTemplate,\r\n templateUrl: __webpack_require__(\"SjG1\")\r\n});\r\n\n\n/***/ }),\n\n/***/ \"SjG1\":\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__.p + \"html/landing-template_404541639e794e34598793e5499171f6.html\";\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// javascripts/73-257c10c0995a4d25fa59.min.js","import landingsData from '../TemplateLandingPages';\nimport {Utils} from '../underscore-extensions';\n\nclass LandingTemplate implements ng.IComponentController {\n private landingData: anm.LandingData;\n private scopeList = [] as ng.IScope[];\n\n constructor(private $state: ng.ui.IStateService,\n private $element: ng.IAugmentedJQuery,\n private $rootScope: ng.IRootScopeService,\n private $compile: ng.ICompileService) {\n this.landingData = landingsData.find(landing => this.$state.is(landing.url));\n }\n\n $onInit() {\n this.compileSections();\n }\n\n $onDestroy() {\n this.scopeList.forEach((scope: ng.IScope) => scope.$destroy());\n }\n\n private compileSections() {\n const sectionsContainerEl = angular.element(this.$element[0].querySelector('#sections'));\n const getKey = (key: string) => {\n const curKey = key === 'title' ? 'ltTitle' : key;\n return Utils.toHyphenCase(curKey)\n };\n const sectionDataToString = _.compose(\n ((attrsArr: string[]) => attrsArr.join(' ')),\n ((keys: string[]) => keys.map(key => `${getKey(key)}=\"${key}\"`)),\n _.keys,\n );\n\n this.landingData.sections.forEach(section => {\n const attrs = sectionDataToString(section);\n const sectionEl = angular.element(``);\n const scope = Object.assign(this.$rootScope.$new(), section);\n this.scopeList.push(scope);\n sectionsContainerEl.append(this.$compile(sectionEl)(scope));\n });\n }\n}\n\nangular.module('animatronApp.landingTemplate', []).component('landingTemplate', {\n controller: LandingTemplate,\n templateUrl: require('landing-template/landing-template.html')\n});\n\n\n\n// WEBPACK FOOTER //\n// ./app/assets/javascripts/landing-template/LandingTemplate.ts","module.exports = __webpack_public_path__ + \"html/landing-template_404541639e794e34598793e5499171f6.html\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/assets/html/landing-template/landing-template.html\n// module id = SjG1\n// module chunks = 73"],"sourceRoot":""}