(window["webpackJsonp_name_"] = window["webpackJsonp_name_"] || []).push([[17],{ /***/ 124: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _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; }; }(); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var VideoPost = function () { function VideoPost() { var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; _classCallCheck(this, VideoPost); this.isMouseOver = false; this._params = Object.assign({}, VideoPost.default, params); if (!this.elem) { return; } this.isMouseOver = false; this.init(); } _createClass(VideoPost, [{ key: 'init', value: function init() { this.dataVideo = this.elem.getAttribute('data-video'); if (!this.dataVideo) { return false; } this.dataVideo = JSON.parse(decodeURIComponent(this.dataVideo)); var template = '\n\t\t\t\n\t\t'; if (this.dataVideo.embed) { var isYouTube = this.dataVideo.embed.includes('https://youtu.be/'); if (isYouTube) { this.dataVideo.embed = this.dataVideo.embed.replace('https://youtu.be', 'https://www.youtube.com/embed'); } else { var isVimeo = this.dataVideo.embed.includes('https://vimeo.com/'); if (isVimeo) { this.dataVideo.embed = this.dataVideo.embed.replace('https://vimeo.com', 'https://player.vimeo.com/video'); } else { return false; } } template = '
\n\t\t\t \n\t\t\t
'; } this.elem.innerHTML = template; } }, { key: 'elem', get: function get() { return this._params.elem; } }, { key: 'elemName', get: function get() { return this._params.elemName; } }, { key: 'autoplay', get: function get() { return this._params.autoplay; } }, { key: 'index', get: function get() { return this._params.index; } }], [{ key: 'default', get: function get() { return { elem: null, elemName: null, index: 0, autoplay: false }; } }]); return VideoPost; }(); exports.default = VideoPost; /***/ }) }]);