{"version":3,"sources":["webpack:///webpack/universalModuleDefinition?5ca6","webpack:///starred.js","webpack:///webpack/bootstrap ea144d808d23d0c2d761?2f0f","webpack:///./src/model/starred.js?4a34","webpack:///./src/view/bookmark-button.js?c346","webpack:///./src/constants.js?a228","webpack:///./src/view/list.js?a48e","webpack:///./templates/ppll2017.js?213b","webpack:///./src/view/remove-button.js?a876","webpack:///./src/index.js","webpack:///./package.json"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","0","52","_classCallCheck","instance","Constructor","TypeError","_updateStarred","operation","uuid","data","Voonto","$","extend","options","ajax","url","method","Object","defineProperty","value","_createClass","defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","key","protoProps","staticProps","prototype","Starred","_ref","serviceUrl","medio","usuario","signature","timestamp","promise","inicio","numero","default","57","_setStarred","active","isStarred","element$","addClass","_constants","STARRED_CLASS","removeClass","EXIST","WITHOUT_ERRORS","BookmarkButtonView","_this","newsId","userType","starred","showLogin","isUserRegistered","then","existe","on","buttonClicked","bind","unsetStarred","setStarred","_this2","status","_this3","58","CONFIG_NAMESPACE","61","_interopRequireDefault","obj","__esModule","_ppll","_ppll2","_removeButton","_removeButton2","ListView","templatesUrl","templateName","tlddomain","getStarred","undefined","reactElement","append","render","62","TYPE","estandar","reportaje","SECTION","on-extra/territorios","classPart","content","on-extra/dinero","on-extra/butaca","on-extra/musica","EXTRA","yes","StarredElement","domain","type","fecha","hora","category","author","imagen","genero","moment","Date","format","seccion","extra","elemFigure","titulo","template","63","RemoveButtonView","event","clickedElementNewId","parent","remove","66","VERSION","_slicedToArray","sliceIterator","arr","_arr","_n","_d","_e","_s","_i","Symbol","iterator","next","done","push","err","Array","isArray","_package","_package2","_bookmarkButton","_bookmarkButton2","_list","_list2","_starred","_starred2","_Voonto","ready","app","promises","userInfo","config","when","RSVP","all","_ref2","gigyaux","userdata","getUserType","responseGetAccountInfo","lookup","Error","UID","UIDSignature","signatureTimestamp","each","el$","list","version","67","name","description","main","scripts","test","start","build","contributors","license","devDependencies","babel-core","babel-loader","babel-polyfill","babel-preset-es2015","chai","chalk","html-webpack-plugin","json-loader","mocha","mocha-loader","mocha-phantomjs","webpack","webpack-shell-plugin"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,UAAAH,GACA,gBAAAC,SACAA,QAAA,QAAAD,IAEAD,EAAA,QAAAC,KACCK,KAAA,WACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAP,OAGA,IAAAC,GAAAO,EAAAD,IACAP,WACAS,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAS,QAAA,EAGAT,EAAAD,QAvBA,GAAAQ,KAqCA,OATAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,GAGAR,EAAA,KDgBMS,EACA,SAAUd,EAAQD,EAASM,GAEhCL,EAAOD,QAAUM,EAAoB,KAKhCU,GACA,SAAUf,EAAQD,GAEvB,YAQA,SAASiB,GAAgBC,EAAUC,GAAe,KAAMD,YAAoBC,IAAgB,KAAM,IAAIC,WAAU,qCE9BjH,QAASC,GAAeC,EAAWC,GACjC,GAAIC,IAAQD,KAAMA,EAGlB,OAFAE,QAAOC,EAAEC,OAAOH,EAAMpB,KAAKwB,SAEpBH,OAAOC,EAAEG,MACdC,IAAQ1B,KAAK0B,IAAb,IAAoBR,EACpBS,OAAQ,OACRP,KAAMA,IFiBTQ,OAAOC,eAAejC,EAAS,cAC7BkC,OAAO,GAGT,IAAIC,GAAe,WAAc,QAASC,GAAiBC,EAAQC,GAAS,IAAK,GAAIC,GAAI,EAAGA,EAAID,EAAME,OAAQD,IAAK,CAAE,GAAIE,GAAaH,EAAMC,EAAIE,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AEAC,QAAA,4BACAC,iBACAC,aAAA,UACAC,eAAA,SACAC,iBAAA,UACAC,sBAAA,UACAC,KAAA,SACAC,MAAA,SACAC,sBAAA,UACAC,cAAA,SACAC,MAAA,SACAC,eAAA,SACAC,kBAAA,SACAC,QAAA,UACAC,uBAAA","file":"starred.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Starred\"] = factory();\n\telse\n\t\troot[\"Starred\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Starred\"] = factory();\n\telse\n\t\troot[\"Starred\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 0:\n/***/ (function(module, exports, __webpack_require__) {\n\n\tmodule.exports = __webpack_require__(66);\n\n\n/***/ }),\n\n/***/ 52:\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar Starred = function () {\n\t function Starred(_ref, serviceUrl) {\n\t var medio = _ref.medio,\n\t usuario = _ref.usuario,\n\t signature = _ref.signature,\n\t timestamp = _ref.timestamp;\n\t\n\t _classCallCheck(this, Starred);\n\t\n\t this.options = { medio: medio, usuario: usuario, signature: signature, timestamp: timestamp };\n\t this.url = serviceUrl;\n\t }\n\t\n\t _createClass(Starred, [{\n\t key: 'isStarred',\n\t value: function isStarred(uuid) {\n\t if (this.promise) {\n\t return this.promise;\n\t }\n\t\n\t var data = { uuid: uuid };\n\t Voonto.$.extend(data, this.options);\n\t\n\t this.promise = Voonto.$.ajax({\n\t url: this.url + '/existe',\n\t data: data\n\t });\n\t\n\t return this.promise;\n\t }\n\t }, {\n\t key: 'setStarred',\n\t value: function setStarred(uuid) {\n\t return _updateStarred.call(this, 'alta', uuid);\n\t }\n\t }, {\n\t key: 'unsetStarred',\n\t value: function unsetStarred(uuid) {\n\t return _updateStarred.call(this, 'baja', uuid);\n\t }\n\t }, {\n\t key: 'getStarred',\n\t value: function getStarred() {\n\t var data = { inicio: 0, numero: 1000 };\n\t Voonto.$.extend(data, this.options);\n\t\n\t return Voonto.$.ajax({\n\t url: this.url + '/listado',\n\t data: data\n\t });\n\t }\n\t }]);\n\t\n\t return Starred;\n\t}();\n\t\n\texports.default = Starred;\n\t\n\t/* Private */\n\t\n\tfunction _updateStarred(operation, uuid) {\n\t var data = { uuid: uuid };\n\t Voonto.$.extend(data, this.options);\n\t\n\t return Voonto.$.ajax({\n\t url: this.url + '/' + operation,\n\t method: 'post',\n\t data: data\n\t });\n\t}\n\n/***/ }),\n\n/***/ 57:\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _constants = __webpack_require__(58);\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar EXIST = 1,\n\t WITHOUT_ERRORS = 0;\n\t\n\tvar BookmarkButtonView = function () {\n\t function BookmarkButtonView(element$, _ref) {\n\t var _this = this;\n\t\n\t var newsId = _ref.newsId,\n\t userType = _ref.userType,\n\t starred = _ref.starred,\n\t showLogin = _ref.showLogin;\n\t\n\t _classCallCheck(this, BookmarkButtonView);\n\t\n\t this.isUserRegistered = userType !== 'anonimo';\n\t this.starred = starred;\n\t this.element$ = element$;\n\t this.isStarred = false;\n\t this.showLogin = showLogin;\n\t this.newsId = newsId;\n\t\n\t if (this.isUserRegistered) {\n\t starred.isStarred(this.newsId).then(function (data) {\n\t if (data.existe === EXIST) {\n\t _setStarred.call(_this, true);\n\t }\n\t });\n\t }\n\t\n\t element$.on('click', this.buttonClicked.bind(this));\n\t }\n\t\n\t _createClass(BookmarkButtonView, [{\n\t key: 'buttonClicked',\n\t value: function buttonClicked() {\n\t if (this.isUserRegistered) {\n\t if (this.isStarred) {\n\t this.unsetStarred();\n\t } else {\n\t this.setStarred();\n\t }\n\t } else {\n\t this.showLogin();\n\t }\n\t }\n\t }, {\n\t key: 'setStarred',\n\t value: function setStarred() {\n\t var _this2 = this;\n\t\n\t this.starred.setStarred(this.newsId).then(function (data) {\n\t if (data.status === WITHOUT_ERRORS) {\n\t _setStarred.call(_this2, true);\n\t }\n\t });\n\t }\n\t }, {\n\t key: 'unsetStarred',\n\t value: function unsetStarred() {\n\t var _this3 = this;\n\t\n\t this.starred.unsetStarred(this.newsId).then(function (data) {\n\t if (data.status === WITHOUT_ERRORS) {\n\t _setStarred.call(_this3, false);\n\t }\n\t });\n\t }\n\t }]);\n\t\n\t return BookmarkButtonView;\n\t}();\n\t\n\texports.default = BookmarkButtonView;\n\t\n\t/* Private */\n\t\n\tfunction _setStarred(active) {\n\t this.isStarred = active;\n\t if (active) {\n\t this.element$.addClass(_constants.STARRED_CLASS);\n\t } else {\n\t this.element$.removeClass(_constants.STARRED_CLASS);\n\t }\n\t}\n\n/***/ }),\n\n/***/ 58:\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\tvar CONFIG_NAMESPACE = exports.CONFIG_NAMESPACE = 'vocento.config.starred';\n\tvar STARRED_CLASS = exports.STARRED_CLASS = 'voc-bookmarked';\n\n/***/ }),\n\n/***/ 61:\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _ppll = __webpack_require__(62);\n\t\n\tvar _ppll2 = _interopRequireDefault(_ppll);\n\t\n\tvar _removeButton = __webpack_require__(63);\n\t\n\tvar _removeButton2 = _interopRequireDefault(_removeButton);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar ListView = function () {\n\t function ListView(element$, _ref) {\n\t var starred = _ref.starred,\n\t templatesUrl = _ref.templatesUrl,\n\t templateName = _ref.templateName,\n\t tlddomain = _ref.tlddomain;\n\t\n\t _classCallCheck(this, ListView);\n\t\n\t this.element$ = element$;\n\t this.options = { starred: starred, templatesUrl: templatesUrl, templateName: templateName, tlddomain: tlddomain };\n\t\n\t // Voonto.$.ajax({\n\t // url: `${templatesUrl}/${templateName}.js`\n\t // }).then((templates) => {\n\t // console.log(templates);\n\t // this.options.templates = templates;\n\t // });\n\t }\n\t\n\t _createClass(ListView, [{\n\t key: 'render',\n\t value: function render() {\n\t var _this = this;\n\t\n\t this.options.starred.getStarred().then(function (data) {\n\t if (data.data !== undefined) {\n\t var reactElement = new _ppll2.default(_this.options.tlddomain);\n\t\n\t for (var i = 0; i < data.data.length; i++) {\n\t _this.element$.append(reactElement.render(data.data[i]));\n\t }\n\t new _removeButton2.default($('[data-voc-starred-remove]'), _this.options.starred);\n\t }\n\t });\n\t }\n\t }]);\n\t\n\t return ListView;\n\t}();\n\t\n\texports.default = ListView;\n\n/***/ }),\n\n/***/ 62:\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar TYPE = {\n\t estandar: 'box',\n\t reportaje: 'circle',\n\t default: 'type-3'\n\t};\n\t\n\tvar SECTION = {\n\t 'on-extra/territorios': {\n\t classPart: 'territorios',\n\t content: 'Territorios'\n\t },\n\t 'on-extra/dinero': {\n\t classPart: 'dinero',\n\t content: 'Dinero'\n\t },\n\t 'on-extra/butaca': {\n\t classPart: 'butaca',\n\t content: 'La Butaca'\n\t },\n\t 'on-extra/musica': {\n\t classPart: 'musik',\n\t content: 'Musik'\n\t }\n\t};\n\tvar EXTRA = {\n\t yes: {\n\t classPart: 'on-extra',\n\t content: 'ON+EXTRA'\n\t }\n\t};\n\t\n\tvar StarredElement = function () {\n\t function StarredElement(domain) {\n\t _classCallCheck(this, StarredElement);\n\t\n\t this.domain = domain;\n\t }\n\t\n\t _createClass(StarredElement, [{\n\t key: 'render',\n\t value: function render(data) {\n\t var type, fecha, hora, classPart, content, category, author, url, imagen;\n\t\n\t type = data.genero in TYPE ? TYPE[data.genero] : TYPE.default;\n\t fecha = moment(new Date(data.fecha)).format(\"DD/MM/YYYY\");\n\t hora = moment(new Date(data.fecha)).format(\"HH:mm\");\n\t author = data.author ? '
' + data.author + '
' : '';\n\t url = '' + data.url;\n\t\n\t if (data.seccion in SECTION) {\n\t classPart = SECTION[data.seccion].classPart;\n\t content = SECTION[data.seccion].content;\n\t } else if (data.extra in EXTRA) {\n\t classPart = EXTRA[data.extra].classPart;\n\t content = EXTRA[data.extra].content;\n\t }\n\t\n\t category = data.seccion in SECTION || data.extra in EXTRA ? '
' + content + '
' : '';\n\t\n\t imagen = '';\n\t if (data.imagen) {\n\t var elemFigure = type == 'circle' ? 'figure' : 'picture';\n\t imagen = '
\\n
\\n <' + elemFigure + '>\\n \\n \"'\\n \\n \\n
\\n
';\n\t }\n\t\n\t var template = '
\\n
\\n
\\n
\\n ' + category + '\\n
' + fecha + '
\\n
' + hora + '
\\n
\\n \\n ' + author + '\\n
\\n
\\n ' + imagen + '\\n
\\n
\\n \\n w\\n \\n
\\n
\\n
';\n\t\n\t return template;\n\t }\n\t }]);\n\t\n\t return StarredElement;\n\t}();\n\t\n\texports.default = StarredElement;\n\n/***/ }),\n\n/***/ 63:\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar WITHOUT_ERRORS = 0;\n\t\n\tvar RemoveButtonView = function () {\n\t function RemoveButtonView(element$, starred) {\n\t _classCallCheck(this, RemoveButtonView);\n\t\n\t this.element$ = element$;\n\t this.options = { starred: starred };\n\t\n\t element$.on('click', this.buttonClicked.bind(this));\n\t }\n\t\n\t _createClass(RemoveButtonView, [{\n\t key: 'buttonClicked',\n\t value: function buttonClicked(event) {\n\t var clickedElementNewId = $(event.target).parent().data('voc-starred-remove');\n\t this.options.starred.unsetStarred(clickedElementNewId).then(function (data) {\n\t if (data.status === WITHOUT_ERRORS) {\n\t $('[data-voc-starred-element-' + clickedElementNewId + ']').remove();\n\t }\n\t });\n\t }\n\t }]);\n\t\n\t return RemoveButtonView;\n\t}();\n\t\n\texports.default = RemoveButtonView;\n\t\n\t/* Private */\n\n/***/ }),\n\n/***/ 66:\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.VERSION = undefined;\n\t\n\tvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\t\n\tvar _package = __webpack_require__(67);\n\t\n\tvar _package2 = _interopRequireDefault(_package);\n\t\n\tvar _constants = __webpack_require__(58);\n\t\n\tvar _bookmarkButton = __webpack_require__(57);\n\t\n\tvar _bookmarkButton2 = _interopRequireDefault(_bookmarkButton);\n\t\n\tvar _list = __webpack_require__(61);\n\t\n\tvar _list2 = _interopRequireDefault(_list);\n\t\n\tvar _starred = __webpack_require__(52);\n\t\n\tvar _starred2 = _interopRequireDefault(_starred);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tvar _Voonto = Voonto,\n\t $ = _Voonto.$;\n\t\n\t\n\tVoonto.ready.then(function (app) {\n\t var promises, userType, showLogin, userInfo, content, medio, tlddomain, config, starred;\n\t\n\t promises = [app.when('vocuser:ready'), app.when('vocuser:userdata')];\n\t\n\t Voonto.RSVP.all(promises).then(function (_ref) {\n\t var _ref2 = _slicedToArray(_ref, 2),\n\t gigyaux = _ref2[0],\n\t userdata = _ref2[1];\n\t\n\t userType = gigyaux.getUserType();\n\t showLogin = gigyaux.showLogin;\n\t userInfo = userdata.responseGetAccountInfo;\n\t medio = app.lookup('vocento.site.media');\n\t tlddomain = app.lookup('vocento.site.tlddomain');\n\t config = app.lookup(_constants.CONFIG_NAMESPACE);\n\t content = app.lookup('vocento.site.content');\n\t\n\t if (!config.serviceUrl) {\n\t throw Error('[Starred] service url is not defined within ' + _constants.CONFIG_NAMESPACE);\n\t }\n\t if (!config.templatesUrl) {\n\t throw Error('[Starred] templates url is not defined within ' + _constants.CONFIG_NAMESPACE);\n\t }\n\t\n\t starred = new _starred2.default({\n\t medio: medio,\n\t usuario: userInfo.UID,\n\t signature: userInfo.UIDSignature,\n\t timestamp: userInfo.signatureTimestamp\n\t }, config.serviceUrl);\n\t\n\t //NOTA: Si existe newsId y es un string estamos en una noticia y hay que controlar el boton\n\t if (content.newsId) {\n\t new _bookmarkButton2.default($('[data-voc-starred]'), { newsId: content.newsId, userType: userType, starred: starred, showLogin: showLogin });\n\t }\n\t\n\t $('[data-voc-starred-list]').each(function () {\n\t var el$ = $(this);\n\t var list = new _list2.default(el$, {\n\t starred: starred,\n\t templatesUrl: config.templatesUrl,\n\t templateName: el$.data('voc-starred-template'),\n\t tlddomain: tlddomain\n\t });\n\t list.render();\n\t });\n\t });\n\t});\n\t\n\tvar VERSION = exports.VERSION = _package2.default.version;\n\n/***/ }),\n\n/***/ 67:\n/***/ (function(module, exports) {\n\n\tmodule.exports = {\n\t\t\"name\": \"starred\",\n\t\t\"version\": \"1.0.10\",\n\t\t\"description\": \"\",\n\t\t\"main\": \"src/index.js\",\n\t\t\"scripts\": {\n\t\t\t\"test\": \"./node_modules/.bin/webpack && ./node_modules/.bin/mocha-phantomjs dist/spec/index.html --reporter xunit --file test-results.xml\",\n\t\t\t\"start\": \"webpack-dev-server\",\n\t\t\t\"build\": \"./node_modules/webpack/bin/webpack.js\"\n\t\t},\n\t\t\"contributors\": [\n\t\t\t\"Ivan Perez P \",\n\t\t\t\"Esther Ibáñez Gonález \"\n\t\t],\n\t\t\"license\": \"SEE LICENSE IN LICENSE.md\",\n\t\t\"devDependencies\": {\n\t\t\t\"babel-core\": \"^6.17.0\",\n\t\t\t\"babel-loader\": \"^6.2.5\",\n\t\t\t\"babel-polyfill\": \"^6.16.0\",\n\t\t\t\"babel-preset-es2015\": \"^6.16.0\",\n\t\t\t\"chai\": \"^3.5.0\",\n\t\t\t\"chalk\": \"^1.1.3\",\n\t\t\t\"html-webpack-plugin\": \"^2.24.1\",\n\t\t\t\"json-loader\": \"^0.5.4\",\n\t\t\t\"mocha\": \"^3.1.0\",\n\t\t\t\"mocha-loader\": \"^1.0.0\",\n\t\t\t\"mocha-phantomjs\": \"^4.1.0\",\n\t\t\t\"webpack\": \"^1.13.3\",\n\t\t\t\"webpack-shell-plugin\": \"^0.4.3\"\n\t\t}\n\t};\n\n/***/ })\n\n/******/ })\n});\n;\n\n\n// WEBPACK FOOTER //\n// starred.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap ea144d808d23d0c2d761","class Starred {\n constructor({medio, usuario, signature, timestamp}, serviceUrl) {\n this.options = {medio, usuario, signature, timestamp};\n this.url = serviceUrl;\n }\n\n isStarred(uuid) {\n if (this.promise) {return this.promise;}\n\n let data = {uuid: uuid};\n Voonto.$.extend(data, this.options);\n\n this.promise = Voonto.$.ajax({\n url: `${this.url}/existe`,\n data: data\n });\n\n return this.promise;\n }\n\n setStarred(uuid) {\n return _updateStarred.call(this, 'alta', uuid);\n }\n\n unsetStarred(uuid) {\n return _updateStarred.call(this, 'baja', uuid);\n }\n\n getStarred() {\n let data = {inicio: 0, numero: 1000};\n Voonto.$.extend(data, this.options);\n\n return Voonto.$.ajax({\n url: `${this.url}/listado`,\n data: data\n });\n }\n}\n\nexport default Starred;\n\n/* Private */\n\nfunction _updateStarred(operation, uuid) {\n let data = {uuid: uuid};\n Voonto.$.extend(data, this.options);\n\n return Voonto.$.ajax({\n url: `${this.url}/${operation}`,\n method: 'post',\n data: data\n });\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/model/starred.js","import {STARRED_CLASS} from '../constants';\n\nconst\n EXIST = 1,\n WITHOUT_ERRORS = 0\n;\n\nclass BookmarkButtonView {\n constructor(element$, {newsId, userType, starred, showLogin}) {\n this.isUserRegistered = (userType !== 'anonimo');\n this.starred = starred;\n this.element$ = element$;\n this.isStarred = false;\n this.showLogin = showLogin;\n this.newsId = newsId;\n\n if (this.isUserRegistered) {\n starred.isStarred(this.newsId).then((data) => {\n if (data.existe === EXIST) {\n _setStarred.call(this, true);\n }\n });\n }\n\n element$.on('click', this.buttonClicked.bind(this));\n }\n\n buttonClicked() {\n if (this.isUserRegistered) {\n if (this.isStarred) {this.unsetStarred();}\n else {this.setStarred();}\n }\n else { this.showLogin(); }\n }\n\n setStarred() {\n this.starred.setStarred(this.newsId).then((data) => {\n if (data.status === WITHOUT_ERRORS) {\n _setStarred.call(this, true);\n }\n });\n }\n\n unsetStarred() {\n this.starred.unsetStarred(this.newsId).then((data) => {\n if (data.status === WITHOUT_ERRORS) {\n _setStarred.call(this, false);\n }\n });\n }\n}\n\nexport default BookmarkButtonView;\n\n/* Private */\n\nfunction _setStarred(active) {\n this.isStarred = active;\n if (active) {\n this.element$.addClass(STARRED_CLASS);\n } else {\n this.element$.removeClass(STARRED_CLASS);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/view/bookmark-button.js","export const CONFIG_NAMESPACE = 'vocento.config.starred';\nexport const STARRED_CLASS = 'voc-bookmarked';\n\n\n\n// WEBPACK FOOTER //\n// ./src/constants.js","import StarredElement from '../../templates/ppll2017';\nimport RemoveButtonView from './remove-button';\n\nclass ListView {\n constructor(element$, {starred, templatesUrl, templateName, tlddomain}) {\n this.element$ = element$;\n this.options = {starred, templatesUrl, templateName, tlddomain};\n\n// Voonto.$.ajax({\n// url: `${templatesUrl}/${templateName}.js`\n// }).then((templates) => {\n// console.log(templates);\n// this.options.templates = templates;\n// });\n }\n\n render() {\n this.options.starred.getStarred().then((data) => {\n if (data.data !== undefined) {\n var reactElement = new StarredElement(this.options.tlddomain);\n\n for (var i=0; i ${data.author} ` : '';\n url = `${data.url}`;\n \n if (data.seccion in SECTION) {\n classPart = SECTION[data.seccion].classPart;\n content = SECTION[data.seccion].content;\n } else if (data.extra in EXTRA) {\n classPart = EXTRA[data.extra].classPart;\n content = EXTRA[data.extra].content;\n }\n\n category = data.seccion in SECTION || data.extra in EXTRA ? `
${content}
` : '';\n \n imagen = '';\n if (data.imagen) {\n var elemFigure = (type == 'circle') ? 'figure' : 'picture';\n imagen = `
\n
\n <${elemFigure}>\n \n \"${data.titulo}\"\n \n \n
\n
`;\n }\n\n var template = `
\n
\n
\n
\n ${category}\n
${fecha}
\n
${hora}
\n
\n \n ${author}\n
\n
\n ${imagen}\n
\n
\n \n w\n \n
\n
\n
`;\n\n return template;\n }\n}\n\nexport default StarredElement;\n\n\n\n// WEBPACK FOOTER //\n// ./templates/ppll2017.js","const WITHOUT_ERRORS = 0;\n\nclass RemoveButtonView {\n constructor(element$, starred) {\n this.element$ = element$;\n this.options = {starred};\n\n element$.on('click', this.buttonClicked.bind(this));\n }\n\n buttonClicked(event) {\n var clickedElementNewId = $(event.target).parent().data('voc-starred-remove');\n this.options.starred.unsetStarred(clickedElementNewId).then((data) => {\n if (data.status === WITHOUT_ERRORS) {\n $(`[data-voc-starred-element-${clickedElementNewId}]`).remove();\n }\n });\n }\n\n}\n\nexport default RemoveButtonView;\n\n/* Private */\n\n\n\n\n\n// WEBPACK FOOTER //\n// ./src/view/remove-button.js","import pkg from '../package.json';\nimport {\n CONFIG_NAMESPACE,\n STARRED_RENDERED} from './constants';\nimport BookmarkButtonView from './view/bookmark-button';\nimport ListView from './view/list';\nimport Starred from './model/starred';\n\nconst {$} = Voonto;\n\nVoonto.ready.then((app) => {\n var promises, userType, showLogin, userInfo, content, medio, tlddomain, config, starred;\n\n promises = [\n app.when('vocuser:ready'),\n app.when('vocuser:userdata')\n ];\n\n Voonto.RSVP.all(promises).then(([gigyaux, userdata]) => {\n userType = gigyaux.getUserType();\n showLogin = gigyaux.showLogin;\n userInfo = userdata.responseGetAccountInfo;\n medio = app.lookup('vocento.site.media');\n tlddomain = app.lookup('vocento.site.tlddomain');\n config = app.lookup(CONFIG_NAMESPACE);\n content = app.lookup('vocento.site.content');\n\n if (!config.serviceUrl) {throw Error(`[Starred] service url is not defined within ${CONFIG_NAMESPACE}`);}\n if (!config.templatesUrl) {throw Error(`[Starred] templates url is not defined within ${CONFIG_NAMESPACE}`);}\n\n starred = new Starred({\n medio,\n usuario: userInfo.UID,\n signature: userInfo.UIDSignature,\n timestamp: userInfo.signatureTimestamp\n }, config.serviceUrl);\n\n //NOTA: Si existe newsId y es un string estamos en una noticia y hay que controlar el boton\n if (content.newsId) {\n new BookmarkButtonView($('[data-voc-starred]'), {newsId: content.newsId, userType, starred, showLogin});\n }\n\n $('[data-voc-starred-list]').each(function() {\n const el$ = $(this);\n const list = new ListView(el$, {\n starred,\n templatesUrl: config.templatesUrl,\n templateName: el$.data('voc-starred-template'),\n tlddomain\n });\n list.render();\n });\n });\n});\n\nexport const VERSION = pkg.version;\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","module.exports = {\n\t\"name\": \"starred\",\n\t\"version\": \"1.0.10\",\n\t\"description\": \"\",\n\t\"main\": \"src/index.js\",\n\t\"scripts\": {\n\t\t\"test\": \"./node_modules/.bin/webpack && ./node_modules/.bin/mocha-phantomjs dist/spec/index.html --reporter xunit --file test-results.xml\",\n\t\t\"start\": \"webpack-dev-server\",\n\t\t\"build\": \"./node_modules/webpack/bin/webpack.js\"\n\t},\n\t\"contributors\": [\n\t\t\"Ivan Perez P \",\n\t\t\"Esther Ibáñez Gonález \"\n\t],\n\t\"license\": \"SEE LICENSE IN LICENSE.md\",\n\t\"devDependencies\": {\n\t\t\"babel-core\": \"^6.17.0\",\n\t\t\"babel-loader\": \"^6.2.5\",\n\t\t\"babel-polyfill\": \"^6.16.0\",\n\t\t\"babel-preset-es2015\": \"^6.16.0\",\n\t\t\"chai\": \"^3.5.0\",\n\t\t\"chalk\": \"^1.1.3\",\n\t\t\"html-webpack-plugin\": \"^2.24.1\",\n\t\t\"json-loader\": \"^0.5.4\",\n\t\t\"mocha\": \"^3.1.0\",\n\t\t\"mocha-loader\": \"^1.0.0\",\n\t\t\"mocha-phantomjs\": \"^4.1.0\",\n\t\t\"webpack\": \"^1.13.3\",\n\t\t\"webpack-shell-plugin\": \"^0.4.3\"\n\t}\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./package.json\n// module id = 67\n// module chunks = 1"],"sourceRoot":""}