From 751b5d082ebb3a1f8ad5cd019bf978a73c2e6c1b Mon Sep 17 00:00:00 2001 From: Maxim Date: Sat, 4 Feb 2017 16:19:58 +0300 Subject: [PATCH] upload source code --- install.txt | 0 tv_series_install.php | 44 ++ upload/engine/classes/sdopFields.js | 66 +++ upload/engine/inc/tv_series.php | 638 +++++++++++++++++++++++ upload/engine/modules/tv_series_last.php | 85 +++ upload/engine/skins/images/tv_series.png | Bin 0 -> 18820 bytes upload/templates/Default/js/tv_series.js | 109 ++++ upload/templates/Default/js/vue.min.js | 9 + 8 files changed, 951 insertions(+) create mode 100644 install.txt create mode 100644 tv_series_install.php create mode 100644 upload/engine/classes/sdopFields.js create mode 100644 upload/engine/inc/tv_series.php create mode 100644 upload/engine/modules/tv_series_last.php create mode 100644 upload/engine/skins/images/tv_series.png create mode 100644 upload/templates/Default/js/tv_series.js create mode 100644 upload/templates/Default/js/vue.min.js diff --git a/install.txt b/install.txt new file mode 100644 index 0000000..e69de29 diff --git a/tv_series_install.php b/tv_series_install.php new file mode 100644 index 0000000..6b78a70 --- /dev/null +++ b/tv_series_install.php @@ -0,0 +1,44 @@ +db->query("CREATE TABLE IF NOT EXISTS `".PREFIX."_tv_series` ( + `id` int(11) NOT NULL, + `news_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + `release_date` datetime DEFAULT NULL, + `number` int(6) NOT NULL, + `name` varchar(255) DEFAULT NULL, + `created_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; + +"); + +$dle_api->db->query("CREATE TABLE IF NOT EXISTS `".PREFIX."_tv_series_file_sharing` ( + `id` varchar(100) NOT NULL, + `icon` varchar(200) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +"); + +$dle_api->db->query("CREATE TABLE IF NOT EXISTS `".PREFIX."_tv_series_links` ( + `id` int(11) NOT NULL, + `series_id` int(11) NOT NULL, + `lang` varchar(10) NOT NULL, + `file_sharing_id` varchar(100) NOT NULL, + `url` varchar(255) NOT NULL, + `created_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `dle_tv_series_links_series_id` (`series_id`,`lang`) +) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8; + +"); + +// Install module to admin +$dle_api->install_admin_module('tv_series', 'TV Series - сериалы в полной новости', 'Модуль позволяет выводить в полной новости сериалы', 'tv_series.png'); + +echo 'TV Series successfully installed! All ok!'; \ No newline at end of file diff --git a/upload/engine/classes/sdopFields.js b/upload/engine/classes/sdopFields.js new file mode 100644 index 0000000..2221a86 --- /dev/null +++ b/upload/engine/classes/sdopFields.js @@ -0,0 +1,66 @@ +(function( $ ){ + + $.fn.dopField = function() { + + var inp = '\ + \ + '; + + return this.each(function() { + + var $this = $(this); + + var origInput = $this; + var vals = origInput.val().split(','); + + + origInput.wrap('') + + var wrapper = origInput.closest('.ins-holder'); + + $.each(vals, function(i, el){ + var input = $(inp); + $('.vals', input).val(el); + wrapper.append(input); + }); + + $(wrapper).on('click', '.add', function(){ + wrapper.append(inp); + recalc(); + }); + + $(wrapper).on('click', '.remove', function(){ + if (wrapper.find('.dop-fld').length > 1) { + $(this).closest('.dop-fld').remove(); + recalc(); + } + }); + + $(wrapper).on('blur', '.vals', function(){ + recalc(); + }); + + $(wrapper).on('keypress', '.vals', function(){ + recalc(); + }); + + var recalc = function(){ + var tmpValues = []; + $.each($('.vals', wrapper), function(){ + var valvalue = $(this).val(); + if (valvalue != '') tmpValues.push(valvalue); + }); + origInput.val(tmpValues.join(',')); + } + + origInput.prop('type', 'hidden'); + + }); + + }; +})( jQuery ); + + +$(function(){ + $('.sseries').dopField(); +}); \ No newline at end of file diff --git a/upload/engine/inc/tv_series.php b/upload/engine/inc/tv_series.php new file mode 100644 index 0000000..5b25918 --- /dev/null +++ b/upload/engine/inc/tv_series.php @@ -0,0 +1,638 @@ +db = $db; + $this->config = $config; + $this->cat_info = $cat_info; + $this->tv_series_config = $tv_series_config; + $this->module_url = $config['http_home_url'] . $config['admin_path'] . '?mod=' . $this->module_id; + $this->dle_login_hash = $dle_login_hash; + $this->member_id = $member_id; + } + + public function run() + { + $this->action = !empty($_REQUEST['action']) ? $_REQUEST['action'] : 'index'; + + switch ($this->action) { + case 'index': + $this->showPage($this->pageIndex()); + break; + case 'file_sharing': + $this->showPage($this->pageFileSharing()); + break; + case 'show': + $this->showPage($this->pageShow()); + break; + case 'add': + $this->showPage($this->pageAdd()); + break; + case 'edit': + $this->showPage($this->pageEdit()); + break; + default: + $this->pageHeader = 'Ошибка'; + $this->showPage('Раздел не найден'); + } + } + + private function showPage($content) + { + echoheader('TV Series', 'Сериалы в полной новости'); + echo << +HTML; + echo ' +
+
+
'.$this->pageHeader.'
'; + if ($this->pageHeaderToolbar) { + echo '
    '; + if (is_array($this->pageHeaderToolbar)) { + $toolbarHtml = ''; + } else { + $toolbarHtml = $this->pageHeaderToolbar; + } + echo $toolbarHtml; + echo '
'; + } + echo ' +
+ +
+ '.$content.' +
'; + + if ($content && $this->pageFooter) { + echo ''; + } + echo ' +
+ '; + + echofooter(); + } + + private function pageIndex() + { + $this->pageHeader = 'Список новостей'; + // Pagination + $cstart = (int)$_GET['cstart']; + if($cstart < 1) $cstart = 1; + $dbstart = ($cstart-1)* $this->pageLimit; + + $content = ''; + $this->db->query("SELECT SQL_CALC_FOUND_ROWS * FROM ".PREFIX."_post WHERE approve = 1 ORDER BY id DESC LIMIT ".$dbstart.", ". $this->pageLimit); + + if ($this->db->num_rows()) { + $content .= ''; + while ($row = $this->db->get_row()) { + $content .= ' + + + + '; + } + $content .= '
IDЗаголовокДействие
'.$row['id'].''. $this->getRealNewsTitle($row).'Редактировать
'; + + $count_rows = $this->db->super_query("SELECT FOUND_ROWS() as rows"); + $count_rows = $count_rows['rows']; + + if ($count_rows > $this->pageLimit) { + $countPages = ceil($count_rows / $this->pageLimit); + + + $nav = '
    '; + for($i=1; $i<=$countPages; $i++){ + $nav .= '
  • '.$i.'
  • '; + } + + $nav .= '
'; + $this->pageFooter = $nav; + } + } else { + $content = 'Новости не найдены'; + } + + $this->pageHeaderToolbar = array( + 'Файлообменники' + ); + return $content; + } + + private function pageShow() + { + $this->pageHeader = '<< Вернуться к списку новостей'; + $content = ''; + $news_id = (int)$_GET['news_id']; + + $news = $this->db->super_query("SELECT * FROM ".PREFIX."_post WHERE id = '".$news_id."'"); + + if (!$news) { + $content .= 'Новость не найдена'; + } else { + $this->pageHeader .= ' | Сериал: '. $this->getRealNewsTitle($news); + $this->pageHeaderToolbar = array( + ' Добавить серию' + ); + + // get series + + $this->db->query("SELECT * FROM ".PREFIX."_tv_series WHERE news_id = '{$news_id}' ORDER BY number ASC"); + + if ($this->db->num_rows()) { + $series = array(); + while ($row = $this->db->get_row()) { + $series[$row['id']] = $row; + } + + // get links for every series + foreach ($series as $seriesItem) { + $this->db->query("SELECT * FROM ".PREFIX."_tv_series_links WHERE series_id = '{$seriesItem['id']}' GROUP BY lang "); + + $langsForSeries[$seriesItem['id']] = array(); + while ($row = $this->db->get_row()) { + $langsForSeries[$seriesItem['id']][] = $row['lang']; + } + } + + // show series with langs + + $content .= '
'; + foreach ($series as $seriesItem) { + $content .= '
'; + foreach ($langsForSeries[$seriesItem['id']] as $sLang) { + $content .= ' '; + } + + $content .= '
'; + } + $content .= '
'; + + } else { + $content = '
Серии не найдены
'; + } + } + + return $content; + } + + private function pageAdd() + { + $content = ''; + $news_id = (int)$_GET['news_id']; + + + $news = $this->db->super_query("SELECT * FROM ".PREFIX."_post WHERE id = '".$news_id."'"); + + if (!$news) { + $content .= 'Новость не найдена'; + } else { + $content .= $this->form(); + + + $this->pageHeader .= ' | Добавление серии ('.$this->getRealNewsTitle($news).')'; + } + + return $content; + } + + private function pageEdit() + { + $content = ''; + $series_id = (int)$_REQUEST['series_id']; + + $series = $this->db->super_query("SELECT tvs.*, p.category, p.title FROM ".PREFIX."_tv_series tvs + LEFT JOIN ".PREFIX."_post p + ON p.id = tvs.news_id + WHERE tvs.id = '".$series_id."'"); + + if (!$series) { + $content = 'Сериал не найден'; + } else { + $content .= $this->form($series); + $this->pageHeader .= ' | Редактирование серии ('.$this->getRealNewsTitle($series).' » Серия '.$series['number'].')'; + $this->pageHeaderToolbar = array( + ' Добавить серию' + ); + } + + return $content; + } + + private function pageFileSharing() + { + $content = ''; + $actionResponse = $this->actionFileSharing(); + + if ($actionResponse != 'ok' && !empty($actionResponse)) { + $content .= $actionResponse; + } elseif ($actionResponse == 'ok') { + $content .= '
Успешно сохранено!
'; + } + + $content .= << + + + $(document).ready(function() { + $('body').on('click', '#tableFileSharing .remove', function() { + var tr = $(this).closest('tr'); + tr.remove(); + }); + $('#actionAddFileSharing').click(function(e) { + e.preventDefault(); + var html = '' + +''+ +''+ +''; + $('#tableFileSharing').append(html); + }); + }); + +HTML; + + + $this->pageHeader = 'Настройка файлообменников'; + $this->pageHeaderToolbar = array( + '« Вернуться к списку новостей', + ' Добавить файлообменник' + ); + $this->pageFooter = '
'; + + $this->db->query("SELECT * FROM ".PREFIX."_tv_series_file_sharing ORDER BY id ASC"); + + $content .= '
'; + if ($this->db->num_rows()) { + $fs = array(); + while ($row = $this->db->get_row()) { + $fs[$row['id']] = $row['icon']; + } + } + + if (isset($this->actionFS_fields) && is_array($this->actionFS_fields) && count($this->actionFS_fields)) { + if (!is_array($fs)) { + $fs = array(); + } + $fs = $fs + $this->actionFS_fields; + } + + + foreach ($fs as $fsKey => $fsValue) { + $content .= ' + + +'; + } + + if (!$this->db->num_rows()){ + $content .= ' + + +'; + } + $content .= '
Название (ID)Путь к иконкеДействие
'; + + return $content; + } + + public function actionFileSharing() + { + $content = ''; + $error = array(); + if (isset($_POST['id']) && isset($_POST['icon'])) { + foreach ($_POST['id'] as $key=>$value) { + if (isset($_POST['icon'][$key])) { + $name = strip_tags(trim($_POST['id'][$key])); + $icon = strip_tags(trim($_POST['icon'][$key])); + + if (!file_exists( ROOT_DIR . '/templates/' . $this->config['skin'] . '/images/' . $icon)) { + $error[] = 'Для файлообменника '. $name . ' не найдена иконка '. $icon . ''; + } + + $fs[$name] = $icon; + } + } + + $this->actionFS_fields = $fs; + + if (count($error)) { + $content = '
  • '.implode('
  • ', $error).'
'; + } elseif (count($fs)) { + $this->db->query("TRUNCATE TABLE ".PREFIX."_tv_series_file_sharing"); + + foreach ($fs as $fsKey=>$fsValue) { + $this->db->query("INSERT INTO ".PREFIX."_tv_series_file_sharing VALUES ('{$fsKey}', '{$fsValue}')"); + } + + $content = 'ok'; + } + } + + return $content; + } + + + /** + * ADD/EDIT series form + */ + private function form($data) + { + $content = ''; + + $news_id = (int)$_GET['news_id']; + + $processFormResponse = $this->processForm(); + + if ($processFormResponse == 'ok') { + header("Location: ". $this->module_url . '&action=show&news_id=' . $news_id); + die(); + } elseif (!empty($processFormResponse)) { + $content .= $processFormResponse; + } + + + $this->pageHeader = '<< Вернуться к сериалу'; + + if ($this->action == 'edit' && is_array($data)) { + // get links + $series_links = array(); + $this->db->query("SELECT * FROM ".PREFIX."_tv_series_links WHERE series_id = '{$data['id']}' "); + + while ($row = $this->db->get_row()) { + $series_links[$row['lang']][$row['file_sharing_id']][] = $row; + } + } + + + $translate = ''; + + $firstLang = reset($this->tv_series_config['langs']); + foreach ($this->tv_series_config['langs'] as $seriesLangId=>$seriesLang) { + $translate .= ''; + } + + $content .= << + .translates label.empty { + opacity: 0.5; + } + .translates label:hover { + opacity: 1; + } + + .translates label > input{ /* HIDE RADIO */ + visibility: hidden; /* Makes input not-clickable */ + position: absolute; /* Remove input from document flow */ +} +.translates label { +margin-right:5px; +} +.translates label > input + img{ /* IMAGE STYLES */ + cursor:pointer; + border:2px solid transparent; +} +.translates label > input:checked + img{ /* (RADIO CHECKED) IMAGE STYLES */ + border:2px solid #000; + border-radius: 2px; +} + +.ins-holder .dop-fld{ +display: block; +} +.ins-holder .dop-fld:not(:first-child) { +margin-bottom:10px; +} + + + +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ {$translate} +
+
+ +
+ +HTML; + + $this->db->query("SELECT * FROM ".PREFIX."_tv_series_file_sharing ORDER BY id ASC"); + + while ($row = $this->db->get_row()) { + $fs_array[] = $row; + } + + $firstLang = reset($this->tv_series_config['langs']); + foreach ($this->tv_series_config['langs'] as $tv_series_lang) { + $currentLangId = $tv_series_lang['id']; + $content .= ''; + } + + // action=edit + if ($this->action == 'edit') { + $content .= ''; + } + + $content .= ''; + + $content .= ' +
+ + '.($this->action == 'edit' ? ' ' : '').' +
+
+'; + + return $content; + } + + private function processForm() + { + $error = array(); + $content = ''; + + if (count($_POST)) { + if ($_POST['user_hash'] != $this->dle_login_hash) die('Hacker'); + + $news_id = (int)$_GET['news_id']; + $number = (int)$_POST['number']; + + // get news + $news = $this->db->super_query("SELECT * FROM ".PREFIX."_post WHERE id = '{$news_id}'"); + + if ($news && $number > 0) { + + if ($this->action == 'edit') { + $seriesId = (int)$_POST['series_id']; + $db_tv_series = $this->db->super_query("SELECT * FROM ".PREFIX."_tv_series WHERE id = '{$seriesId}' "); + + if (!$db_tv_series) { + $error[] = 'Серия не найдена'; + } + } + + + if (!count($error)) { + + if ($_POST['submit'] == 'save') { + // Check [news_id + series] ( unique ) + if (!$this->db->super_query("SELECT * + FROM ".PREFIX."_tv_series + WHERE news_id = '{$news_id}' + AND number = '{$number}' ". + (isset($db_tv_series) ? " AND number != '".$db_tv_series['number']."' " : '')." + ")) + { + $created_at = date('Y-m-d H:i:s'); + $user_id = $this->member_id['user_id']; + $release_date = strip_tags(trim($_POST['release_date'])); + $name = strip_tags(trim($_POST['name'])); + + // INSERT // UPDATE + if ($this->action == 'add') { + $this->db->query("INSERT INTO ".PREFIX."_tv_series (news_id, user_id, release_date, number, name, created_at) + VALUES ('{$news['id']}', '{$user_id}', '{$release_date}', '{$number}', '{$name}', '{$created_at}')"); + + $seriesId = $this->db->insert_id(); + } else { + $this->db->query("UPDATE ".PREFIX."_tv_series SET number = '{$number}', name = '{$name}', release_date = '{$release_date}' WHERE id = '{$seriesId}'"); + } + + $this->db->query("DELETE FROM ".PREFIX."_tv_series_links WHERE series_id = '{$seriesId}' "); + + + foreach ($_POST['links'] as $linksLang=>$links) { + if (is_array($links)) { + foreach ($links as $fsKey=>$link) { + if (!empty($link)) { + $link = strip_tags(trim($link)); + // split links + if (!empty($link)) { + $multiLinks = explode(',', $link); + } + + foreach ($multiLinks as $mLink) { + $this->db->query("INSERT INTO ".PREFIX."_tv_series_links (series_id, lang, file_sharing_id, url, created_at) + VALUES ('{$seriesId}', '{$linksLang}', '{$fsKey}', '{$mLink}', '{$created_at}')"); + } + } + } + } + } + } else { + $error[] = 'Такая серия уже присутствует в сериале'; + } + } elseif ($_POST['submit'] == 'delete') { + $this->db->query("DELETE FROM ".PREFIX."_tv_series WHERE id = '{$seriesId}' "); + $this->db->query("DELETE FROM ".PREFIX."_tv_series_links WHERE series_id = '{$seriesId}' "); + } + } + } else { + $error[] = 'Новость не найдена'; + } + + if (count($error)) { + $content = '
  • '.implode('
  • ', $error).'
'; + } else { + $content = 'ok'; + } + + } + + return $content; + } + + private function getRealNewsTitle($row) + { + return ''.$this->cat_info[(int)$row['category']]['name'] . ' » ' . $row['title']; + } +} + +$module = new TV_Series_Admin(); + +$module->run(); \ No newline at end of file diff --git a/upload/engine/modules/tv_series_last.php b/upload/engine/modules/tv_series_last.php new file mode 100644 index 0000000..49fbac4 --- /dev/null +++ b/upload/engine/modules/tv_series_last.php @@ -0,0 +1,85 @@ +super_query("SELECT DATE(release_date) as release_date FROM ".PREFIX."_tv_series GROUP BY DATE(release_date) ORDER BY release_date DESC LIMIT ".$countDays.",1"); + + // get 7 days (start from last date) + $db->query("SELECT s.*, p.title, p.category, p.alt_name as news_alt_name, p.date as news_date, lang +FROM ".PREFIX."_tv_series_links l +LEFT JOIN ".PREFIX."_tv_series s +ON s.id = l.series_id +LEFT JOIN ".PREFIX."_post p +ON p.id = s.news_id +WHERE DATE(s.release_date) <= CURRENT_DATE +".($start_date ? " AND DATE(s.release_date) > '".$start_date['release_date']."'" : '')." +GROUP BY l.lang, l.series_id +ORDER BY s.release_date DESC, s.created_at"); + + if($db->num_rows()) { + $series = array(); + while ($row = $db->get_row()) { + $series[date('d.m.Y', strtotime($row['release_date']))][] = $row; + } + + $tv_series_last = ''; + + foreach ($series as $seriesDate => $seriesArray) { + $dateText = $seriesDate; + + if ($dateText == date('d.m.Y')) { + $dateText = 'Сегодня'; + } + elseif ($dateText == date('d.m.Y', strtotime('-1 day'))) { + $dateText = 'Вчера'; + } + + $template = <<{$dateText} +
+HTML; + foreach ($seriesArray as $seriesI) { + $row = $seriesI; + if( $config['allow_alt_url'] ) { + if( $config['seo_type'] == 1 OR $config['seo_type'] == 2 ) { + if( $row['category'] and $config['seo_type'] == 2 ) { + $full_link = $config['http_home_url'] . get_url( $row['category'] ) . "/" . $row['news_id'] . "-" . $row['news_alt_name'] . ".html"; + } else { + $full_link = $config['http_home_url'] . $row['news_id'] . "-" . $row['news_alt_name'] . ".html"; + } + } else { + $full_link = $config['http_home_url'] . date( 'Y/m/d/', $row['news_date'] ) . $row['news_alt_name'] . ".html"; + } + } else { + $full_link = $config['http_home_url'] . "index.php?newsid=" . $row['news_id']; + } + + // add episode & lang + $full_link .= '#e'.$row['number'].'-' . $row['lang']; + + $template .= '
'.$cat_info[(int)$row['category']]['name'].''.$row['title'].' Серия '.$row['number'].'
'; + } + //'.$row['lang'].' + $template .= << +HTML; + + $tv_series_last .= $template; + } + + create_cache($cache_name, $tv_series_last); + } +} + +echo $tv_series_last; \ No newline at end of file diff --git a/upload/engine/skins/images/tv_series.png b/upload/engine/skins/images/tv_series.png new file mode 100644 index 0000000000000000000000000000000000000000..a5106fcc3855292bd552e4223aa3d7481e1037f9 GIT binary patch literal 18820 zcmeI4c|4Tu_s2&{MamkMamnCH9u_aseC`y(m zgh+)JvP8BBS&A(A4fWL2Q_pIi8;|6aU6!ixk@0> zI6I7lkE=UL4FD*r__!lc&KM%U9mWCcrUaa=t^@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D;6c#>B7Q9N*9xe$kfdH3~4?;K99Lh`%BGe&&(ww zIhFOamB;5c@@nQKu}RRkU`ETDaq+eXxht)ctW$hPy(>arj_M7@=jUgI#Z;nJJRDZK zgv$o{r3Kp#b4VCwD%HH{N_NoCiR8GEC;#8ZHk80J9BTy0laEedzN-tO>O?4BpnTXc$u1Q(EkCmOAf98 literal 0 HcmV?d00001 diff --git a/upload/templates/Default/js/tv_series.js b/upload/templates/Default/js/tv_series.js new file mode 100644 index 0000000..a05f264 --- /dev/null +++ b/upload/templates/Default/js/tv_series.js @@ -0,0 +1,109 @@ +Vue.component('tv-series', { + template: '#tv-series-template', + + data() { + return { + fileSharing: [], + + episodes: [], + languages: [], + links: [], + + selectedEpisode: false, + selectedLang: false, + selectedFileSharing: false, + }; + }, + + props: [ + 'news_id', + 'api_url', + 'templates_url' + ], + + created() { + this.init(); + }, + + methods: { + init: function () { + $.getJSON(this.api_url, {action: 'init', news_id: this.news_id}, function (r) { + if (r.status == 200) { + this.fileSharing = r.file_sharing; + this.episodes = r.series; + this.languages = r.langs; + this.links = r.links; + // *********** + + var series_selected = false; + + // if series in url hash + if(window.location.hash) { + var hash = window.location.hash.substr(1); + match = /e(\d+)-(.+)/ig.exec(hash); + + if (match != null && match.length == 3) { + // check exists series + var search_series = $.grep(this.episodes, function(e){ return e.number == match[1]; }); + if (search_series != null && search_series.length ) { + // load episode + this.getLinks(search_series[0], match[2]); + series_selected = true; + } + + } + } + + // select first episode + if (!series_selected) { + this.selectedEpisode = this.episodes[0]; + this.selectedLang = this.languages[0]; + this.selectedFileSharing = Object.keys(r.links)[0]; + } + } + }.bind(this)); + }, + + getLinks: function (episode, lang) { + $.getJSON(this.api_url, {action: 'getLinks', series_id: episode.id, lang: lang}, function (r) { + console.log(r); + if (r.status == 200) { + this.links = r.links; + this.languages = r.langs; + // ------------------- + this.selectedEpisode = episode; + // if action == selectLang + if (lang) { + this.selectedLang = lang; + } else { + // select first language + this.selectedLang = this.languages[0]; + } + this.selectedFileSharing = Object.keys(r.links)[0]; + } + }.bind(this)); + }, + + selectEpisode: function (episode) { + this.getLinks(episode); + }, + selectLang: function (lang) { + this.getLinks(this.selectedEpisode, lang); + }, + selectFileSharing: function (fs_id) { + this.selectedFileSharing = fs_id; + }, + + makeLangIconUrl: function (id) { + return this.templates_url + '/images/lang/' + id + '.png'; + }, + makeFileSharingIconUrl: function (id) { + return this.templates_url + '/images/'+ this.fileSharing[id].icon; + }, + } + +}); + +new Vue({ + el: 'body' +}); \ No newline at end of file diff --git a/upload/templates/Default/js/vue.min.js b/upload/templates/Default/js/vue.min.js new file mode 100644 index 0000000..2c9a8a0 --- /dev/null +++ b/upload/templates/Default/js/vue.min.js @@ -0,0 +1,9 @@ +/*! + * Vue.js v1.0.26 + * (c) 2016 Evan You + * Released under the MIT License. + */ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Vue=e()}(this,function(){"use strict";function t(e,n,r){if(i(e,n))return void(e[n]=r);if(e._isVue)return void t(e._data,n,r);var s=e.__ob__;if(!s)return void(e[n]=r);if(s.convert(n,r),s.dep.notify(),s.vms)for(var o=s.vms.length;o--;){var a=s.vms[o];a._proxy(n),a._digest()}return r}function e(t,e){if(i(t,e)){delete t[e];var n=t.__ob__;if(!n)return void(t._isVue&&(delete t._data[e],t._digest()));if(n.dep.notify(),n.vms)for(var r=n.vms.length;r--;){var s=n.vms[r];s._unproxy(e),s._digest()}}}function i(t,e){return Oi.call(t,e)}function n(t){return Ti.test(t)}function r(t){var e=(t+"").charCodeAt(0);return 36===e||95===e}function s(t){return null==t?"":t.toString()}function o(t){if("string"!=typeof t)return t;var e=Number(t);return isNaN(e)?t:e}function a(t){return"true"===t?!0:"false"===t?!1:t}function h(t){var e=t.charCodeAt(0),i=t.charCodeAt(t.length-1);return e!==i||34!==e&&39!==e?t:t.slice(1,-1)}function l(t){return t.replace(Ni,c)}function c(t,e){return e?e.toUpperCase():""}function u(t){return t.replace(ji,"$1-$2").toLowerCase()}function f(t){return t.replace(Ei,c)}function p(t,e){return function(i){var n=arguments.length;return n?n>1?t.apply(e,arguments):t.call(e,i):t.call(e)}}function d(t,e){e=e||0;for(var i=t.length-e,n=new Array(i);i--;)n[i]=t[i+e];return n}function v(t,e){for(var i=Object.keys(e),n=i.length;n--;)t[i[n]]=e[i[n]];return t}function m(t){return null!==t&&"object"==typeof t}function g(t){return Si.call(t)===Fi}function _(t,e,i,n){Object.defineProperty(t,e,{value:i,enumerable:!!n,writable:!0,configurable:!0})}function y(t,e){var i,n,r,s,o,a=function h(){var a=Date.now()-s;e>a&&a>=0?i=setTimeout(h,e-a):(i=null,o=t.apply(r,n),i||(r=n=null))};return function(){return r=this,n=arguments,s=Date.now(),i||(i=setTimeout(a,e)),o}}function b(t,e){for(var i=t.length;i--;)if(t[i]===e)return i;return-1}function w(t){var e=function i(){return i.cancelled?void 0:t.apply(this,arguments)};return e.cancel=function(){e.cancelled=!0},e}function C(t,e){return t==e||(m(t)&&m(e)?JSON.stringify(t)===JSON.stringify(e):!1)}function $(t){this.size=0,this.limit=t,this.head=this.tail=void 0,this._keymap=Object.create(null)}function k(){var t,e=en.slice(hn,on).trim();if(e){t={};var i=e.match(vn);t.name=i[0],i.length>1&&(t.args=i.slice(1).map(x))}t&&(nn.filters=nn.filters||[]).push(t),hn=on+1}function x(t){if(mn.test(t))return{value:o(t),dynamic:!1};var e=h(t),i=e===t;return{value:i?t:e,dynamic:i}}function A(t){var e=dn.get(t);if(e)return e;for(en=t,ln=cn=!1,un=fn=pn=0,hn=0,nn={},on=0,an=en.length;an>on;on++)if(sn=rn,rn=en.charCodeAt(on),ln)39===rn&&92!==sn&&(ln=!ln);else if(cn)34===rn&&92!==sn&&(cn=!cn);else if(124===rn&&124!==en.charCodeAt(on+1)&&124!==en.charCodeAt(on-1))null==nn.expression?(hn=on+1,nn.expression=en.slice(0,on).trim()):k();else switch(rn){case 34:cn=!0;break;case 39:ln=!0;break;case 40:pn++;break;case 41:pn--;break;case 91:fn++;break;case 93:fn--;break;case 123:un++;break;case 125:un--}return null==nn.expression?nn.expression=en.slice(0,on).trim():0!==hn&&k(),dn.put(t,nn),nn}function O(t){return t.replace(_n,"\\$&")}function T(){var t=O(An.delimiters[0]),e=O(An.delimiters[1]),i=O(An.unsafeDelimiters[0]),n=O(An.unsafeDelimiters[1]);bn=new RegExp(i+"((?:.|\\n)+?)"+n+"|"+t+"((?:.|\\n)+?)"+e,"g"),wn=new RegExp("^"+i+"((?:.|\\n)+?)"+n+"$"),yn=new $(1e3)}function N(t){yn||T();var e=yn.get(t);if(e)return e;if(!bn.test(t))return null;for(var i,n,r,s,o,a,h=[],l=bn.lastIndex=0;i=bn.exec(t);)n=i.index,n>l&&h.push({value:t.slice(l,n)}),r=wn.test(i[0]),s=r?i[1]:i[2],o=s.charCodeAt(0),a=42===o,s=a?s.slice(1):s,h.push({tag:!0,value:s.trim(),html:r,oneTime:a}),l=n+i[0].length;return l1?t.map(function(t){return E(t,e)}).join("+"):E(t[0],e,!0)}function E(t,e,i){return t.tag?t.oneTime&&e?'"'+e.$eval(t.value)+'"':S(t.value,i):'"'+t.value+'"'}function S(t,e){if(Cn.test(t)){var i=A(t);return i.filters?"this._applyFilters("+i.expression+",null,"+JSON.stringify(i.filters)+",false)":"("+t+")"}return e?t:"("+t+")"}function F(t,e,i,n){R(t,1,function(){e.appendChild(t)},i,n)}function D(t,e,i,n){R(t,1,function(){B(t,e)},i,n)}function P(t,e,i){R(t,-1,function(){z(t)},e,i)}function R(t,e,i,n,r){var s=t.__v_trans;if(!s||!s.hooks&&!qi||!n._isCompiled||n.$parent&&!n.$parent._isCompiled)return i(),void(r&&r());var o=e>0?"enter":"leave";s[o](i,r)}function L(t){if("string"==typeof t){t=document.querySelector(t)}return t}function H(t){if(!t)return!1;var e=t.ownerDocument.documentElement,i=t.parentNode;return e===t||e===i||!(!i||1!==i.nodeType||!e.contains(i))}function I(t,e){var i=t.getAttribute(e);return null!==i&&t.removeAttribute(e),i}function M(t,e){var i=I(t,":"+e);return null===i&&(i=I(t,"v-bind:"+e)),i}function V(t,e){return t.hasAttribute(e)||t.hasAttribute(":"+e)||t.hasAttribute("v-bind:"+e)}function B(t,e){e.parentNode.insertBefore(t,e)}function W(t,e){e.nextSibling?B(t,e.nextSibling):e.parentNode.appendChild(t)}function z(t){t.parentNode.removeChild(t)}function U(t,e){e.firstChild?B(t,e.firstChild):e.appendChild(t)}function J(t,e){var i=t.parentNode;i&&i.replaceChild(e,t)}function q(t,e,i,n){t.addEventListener(e,i,n)}function Q(t,e,i){t.removeEventListener(e,i)}function G(t){var e=t.className;return"object"==typeof e&&(e=e.baseVal||""),e}function Z(t,e){Mi&&!/svg$/.test(t.namespaceURI)?t.className=e:t.setAttribute("class",e)}function X(t,e){if(t.classList)t.classList.add(e);else{var i=" "+G(t)+" ";i.indexOf(" "+e+" ")<0&&Z(t,(i+e).trim())}}function Y(t,e){if(t.classList)t.classList.remove(e);else{for(var i=" "+G(t)+" ",n=" "+e+" ";i.indexOf(n)>=0;)i=i.replace(n," ");Z(t,i.trim())}t.className||t.removeAttribute("class")}function K(t,e){var i,n;if(it(t)&&at(t.content)&&(t=t.content),t.hasChildNodes())for(tt(t),n=e?document.createDocumentFragment():document.createElement("div");i=t.firstChild;)n.appendChild(i);return n}function tt(t){for(var e;e=t.firstChild,et(e);)t.removeChild(e);for(;e=t.lastChild,et(e);)t.removeChild(e)}function et(t){return t&&(3===t.nodeType&&!t.data.trim()||8===t.nodeType)}function it(t){return t.tagName&&"template"===t.tagName.toLowerCase()}function nt(t,e){var i=An.debug?document.createComment(t):document.createTextNode(e?" ":"");return i.__v_anchor=!0,i}function rt(t){if(t.hasAttributes())for(var e=t.attributes,i=0,n=e.length;n>i;i++){var r=e[i].name;if(Nn.test(r))return l(r.replace(Nn,""))}}function st(t,e,i){for(var n;t!==e;)n=t.nextSibling,i(t),t=n;i(e)}function ot(t,e,i,n,r){function s(){if(a++,o&&a>=h.length){for(var t=0;tr;r++){var o=n[r];jn.test(o)||En.test(o)||(e=i[o],g(e)&&(i[o]=wi.extend(e)))}}function dt(t){var e,i,n=t.props;if(Di(n))for(t.props={},e=n.length;e--;)i=n[e],"string"==typeof i?t.props[i]=null:i.name&&(t.props[i.name]=i);else if(g(n)){var r=Object.keys(n);for(e=r.length;e--;)i=n[r[e]],"function"==typeof i&&(n[r[e]]={type:i})}}function vt(t){if(Di(t)){for(var e,i={},n=t.length;n--;){e=t[n];var r="function"==typeof e?e.options&&e.options.name||e.id:e.name||e.id;r&&(i[r]=e)}return i}return t}function mt(t,e,n){function r(i){var r=Sn[i]||Fn;o[i]=r(t[i],e[i],n,i)}pt(e),dt(e);var s,o={};if(e["extends"]&&(t="function"==typeof e["extends"]?mt(t,e["extends"].options,n):mt(t,e["extends"],n)),e.mixins)for(var a=0,h=e.mixins.length;h>a;a++){var l=e.mixins[a],c=l.prototype instanceof wi?l.options:l;t=mt(t,c,n)}for(s in t)r(s);for(s in e)i(t,s)||r(s);return o}function gt(t,e,i,n){if("string"==typeof i){var r,s=t[e],o=s[i]||s[r=l(i)]||s[r.charAt(0).toUpperCase()+r.slice(1)];return o}}function _t(){this.id=Dn++,this.subs=[]}function yt(t){Hn=!1,t(),Hn=!0}function bt(t){if(this.value=t,this.dep=new _t,_(t,"__ob__",this),Di(t)){var e=Pi?wt:Ct;e(t,Rn,Ln),this.observeArray(t)}else this.walk(t)}function wt(t,e){t.__proto__=e}function Ct(t,e,i){for(var n=0,r=i.length;r>n;n++){var s=i[n];_(t,s,e[s])}}function $t(t,e){if(t&&"object"==typeof t){var n;return i(t,"__ob__")&&t.__ob__ instanceof bt?n=t.__ob__:Hn&&(Di(t)||g(t))&&Object.isExtensible(t)&&!t._isVue&&(n=new bt(t)),n&&e&&n.addVm(e),n}}function kt(t,e,i){var n=new _t,r=Object.getOwnPropertyDescriptor(t,e);if(!r||r.configurable!==!1){var s=r&&r.get,o=r&&r.set,a=$t(i);Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){var e=s?s.call(t):i;if(_t.target&&(n.depend(),a&&a.dep.depend(),Di(e)))for(var r,o=0,h=e.length;h>o;o++)r=e[o],r&&r.__ob__&&r.__ob__.dep.depend();return e},set:function(e){var r=s?s.call(t):i;e!==r&&(o?o.call(t,e):i=e,a=$t(e),n.notify())}})}}function xt(t){t.prototype._init=function(t){t=t||{},this.$el=null,this.$parent=t.parent,this.$root=this.$parent?this.$parent.$root:this,this.$children=[],this.$refs={},this.$els={},this._watchers=[],this._directives=[],this._uid=Mn++,this._isVue=!0,this._events={},this._eventsCount={},this._isFragment=!1,this._fragment=this._fragmentStart=this._fragmentEnd=null,this._isCompiled=this._isDestroyed=this._isReady=this._isAttached=this._isBeingDestroyed=this._vForRemoving=!1,this._unlinkFn=null,this._context=t._context||this.$parent,this._scope=t._scope,this._frag=t._frag,this._frag&&this._frag.children.push(this),this.$parent&&this.$parent.$children.push(this),t=this.$options=mt(this.constructor.options,t,this),this._updateRef(),this._data={},this._callHook("init"),this._initState(),this._initEvents(),this._callHook("created"),t.el&&this.$mount(t.el)}}function At(t){if(void 0===t)return"eof";var e=t.charCodeAt(0);switch(e){case 91:case 93:case 46:case 34:case 39:case 48:return t;case 95:case 36:return"ident";case 32:case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"ws"}return e>=97&&122>=e||e>=65&&90>=e?"ident":e>=49&&57>=e?"number":"else"}function Ot(t){var e=t.trim();return"0"===t.charAt(0)&&isNaN(t)?!1:n(e)?h(e):"*"+e}function Tt(t){function e(){var e=t[c+1];return u===Xn&&"'"===e||u===Yn&&'"'===e?(c++,n="\\"+e,p[Bn](),!0):void 0}var i,n,r,s,o,a,h,l=[],c=-1,u=Jn,f=0,p=[];for(p[Wn]=function(){void 0!==r&&(l.push(r),r=void 0)},p[Bn]=function(){void 0===r?r=n:r+=n},p[zn]=function(){p[Bn](),f++},p[Un]=function(){if(f>0)f--,u=Zn,p[Bn]();else{if(f=0,r=Ot(r),r===!1)return!1;p[Wn]()}};null!=u;)if(c++,i=t[c],"\\"!==i||!e()){if(s=At(i),h=er[u],o=h[s]||h["else"]||tr,o===tr)return;if(u=o[0],a=p[o[1]],a&&(n=o[2],n=void 0===n?i:n,a()===!1))return;if(u===Kn)return l.raw=t,l}}function Nt(t){var e=Vn.get(t);return e||(e=Tt(t),e&&Vn.put(t,e)),e}function jt(t,e){return It(e).get(t)}function Et(e,i,n){var r=e;if("string"==typeof i&&(i=Tt(i)),!i||!m(e))return!1;for(var s,o,a=0,h=i.length;h>a;a++)s=e,o=i[a],"*"===o.charAt(0)&&(o=It(o.slice(1)).get.call(r,r)),h-1>a?(e=e[o],m(e)||(e={},t(s,o,e))):Di(e)?e.$set(o,n):o in e?e[o]=n:t(e,o,n);return!0}function St(){}function Ft(t,e){var i=vr.length;return vr[i]=e?t.replace(lr,"\\n"):t,'"'+i+'"'}function Dt(t){var e=t.charAt(0),i=t.slice(1);return sr.test(i)?t:(i=i.indexOf('"')>-1?i.replace(ur,Pt):i,e+"scope."+i)}function Pt(t,e){return vr[e]}function Rt(t){ar.test(t),vr.length=0;var e=t.replace(cr,Ft).replace(hr,"");return e=(" "+e).replace(pr,Dt).replace(ur,Pt),Lt(e)}function Lt(t){try{return new Function("scope","return "+t+";")}catch(e){return St}}function Ht(t){var e=Nt(t);return e?function(t,i){Et(t,e,i)}:void 0}function It(t,e){t=t.trim();var i=nr.get(t);if(i)return e&&!i.set&&(i.set=Ht(i.exp)),i;var n={exp:t};return n.get=Mt(t)&&t.indexOf("[")<0?Lt("scope."+t):Rt(t),e&&(n.set=Ht(t)),nr.put(t,n),n}function Mt(t){return fr.test(t)&&!dr.test(t)&&"Math."!==t.slice(0,5)}function Vt(){gr.length=0,_r.length=0,yr={},br={},wr=!1}function Bt(){for(var t=!0;t;)t=!1,Wt(gr),Wt(_r),gr.length?t=!0:(Li&&An.devtools&&Li.emit("flush"),Vt())}function Wt(t){for(var e=0;e0){var o=s+(n?e:ht(e));r=Pr.get(o),r||(r=De(i,t.$options,!0),Pr.put(o,r))}else r=De(i,t.$options,!0);this.linker=r}function oe(t,e,i){var n=t.node.previousSibling;if(n){for(t=n.__v_frag;!(t&&t.forId===i&&t.inserted||n===e);){if(n=n.previousSibling,!n)return;t=n.__v_frag}return t}}function ae(t){var e=t.node;if(t.end)for(;!e.__vue__&&e!==t.end&&e.nextSibling;)e=e.nextSibling;return e.__vue__}function he(t){for(var e=-1,i=new Array(Math.floor(t));++ea;a++)if(n=t.options[a],s=i?n.hasAttribute("selected"):n.selected){if(r=n.hasOwnProperty("_value")?n._value:n.value,!e)return r;o.push(r)}return o}function ue(t,e){for(var i=t.length;i--;)if(C(t[i],e))return i;return-1}function fe(t,e){var i=e.map(function(t){var e=t.charCodeAt(0);return e>47&&58>e?parseInt(t,10):1===t.length&&(e=t.toUpperCase().charCodeAt(0),e>64&&91>e)?e:is[t]});return i=[].concat.apply([],i),function(e){return i.indexOf(e.keyCode)>-1?t.call(this,e):void 0}}function pe(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function de(t){return function(e){return e.preventDefault(),t.call(this,e)}}function ve(t){return function(e){return e.target===e.currentTarget?t.call(this,e):void 0}}function me(t){if(as[t])return as[t];var e=ge(t);return as[t]=as[e]=e,e}function ge(t){t=u(t);var e=l(t),i=e.charAt(0).toUpperCase()+e.slice(1);hs||(hs=document.createElement("div"));var n,r=rs.length;if("filter"!==e&&e in hs.style)return{kebab:t,camel:e};for(;r--;)if(n=ss[r]+i,n in hs.style)return{kebab:rs[r]+t,camel:n}}function _e(t){var e=[];if(Di(t))for(var i=0,n=t.length;n>i;i++){var r=t[i];if(r)if("string"==typeof r)e.push(r);else for(var s in r)r[s]&&e.push(s)}else if(m(t))for(var o in t)t[o]&&e.push(o);return e}function ye(t,e,i){if(e=e.trim(),-1===e.indexOf(" "))return void i(t,e);for(var n=e.split(/\s+/),r=0,s=n.length;s>r;r++)i(t,n[r])}function be(t,e,i){function n(){++s>=r?i():t[s].call(e,n)}var r=t.length,s=0;t[0].call(e,n)}function we(t,e,i){for(var r,s,o,a,h,c,f,p=[],d=Object.keys(e),v=d.length;v--;)s=d[v],r=e[s]||ks,h=l(s),xs.test(h)&&(f={name:s,path:h,options:r,mode:$s.ONE_WAY,raw:null},o=u(s),null===(a=M(t,o))&&(null!==(a=M(t,o+".sync"))?f.mode=$s.TWO_WAY:null!==(a=M(t,o+".once"))&&(f.mode=$s.ONE_TIME)),null!==a?(f.raw=a,c=A(a),a=c.expression,f.filters=c.filters,n(a)&&!c.filters?f.optimizedLiteral=!0:f.dynamic=!0,f.parentPath=a):null!==(a=I(t,o))&&(f.raw=a),p.push(f));return Ce(p)}function Ce(t){return function(e,n){e._props={};for(var r,s,l,c,f,p=e.$options.propsData,d=t.length;d--;)if(r=t[d],f=r.raw,s=r.path,l=r.options,e._props[s]=r,p&&i(p,s)&&ke(e,r,p[s]),null===f)ke(e,r,void 0);else if(r.dynamic)r.mode===$s.ONE_TIME?(c=(n||e._context||e).$get(r.parentPath),ke(e,r,c)):e._context?e._bindDir({name:"prop",def:Os,prop:r},null,null,n):ke(e,r,e.$get(r.parentPath));else if(r.optimizedLiteral){var v=h(f);c=v===f?a(o(f)):v,ke(e,r,c)}else c=l.type!==Boolean||""!==f&&f!==u(r.name)?f:!0,ke(e,r,c)}}function $e(t,e,i,n){var r=e.dynamic&&Mt(e.parentPath),s=i;void 0===s&&(s=Ae(t,e)),s=Te(e,s,t);var o=s!==i;Oe(e,s,t)||(s=void 0),r&&!o?yt(function(){n(s)}):n(s)}function ke(t,e,i){$e(t,e,i,function(i){kt(t,e.path,i)})}function xe(t,e,i){$e(t,e,i,function(i){t[e.path]=i})}function Ae(t,e){var n=e.options;if(!i(n,"default"))return n.type===Boolean?!1:void 0;var r=n["default"];return m(r),"function"==typeof r&&n.type!==Function?r.call(t):r}function Oe(t,e,i){if(!t.options.required&&(null===t.raw||null==e))return!0;var n=t.options,r=n.type,s=!r,o=[];if(r){Di(r)||(r=[r]);for(var a=0;ar;r++)n[r]._bind();return n}function Re(t,e){return t=t.descriptor.def.priority||zs,e=e.descriptor.def.priority||zs,t>e?-1:t===e?0:1}function Le(t,e,i,n){function r(r){He(t,e,r),i&&n&&He(i,n)}return r.dirs=e,r}function He(t,e,i){for(var n=e.length;n--;)e[n]._teardown()}function Ie(t,e,i,n){var r=we(e,i,t),s=Pe(function(){r(t,n)},t);return Le(t,s)}function Me(t,e,i){var n,r,s=e._containerAttrs,o=e._replacerAttrs;return 11!==t.nodeType&&(e._asComponent?(s&&i&&(n=ti(s,i)),o&&(r=ti(o,e))):r=ti(t.attributes,e)),e._containerAttrs=e._replacerAttrs=null,function(t,e,i){var s,o=t._context;o&&n&&(s=Pe(function(){n(o,e,null,i)},o));var a=Pe(function(){r&&r(t,e)},t);return Le(t,a,o,s)}}function Ve(t,e){var i=t.nodeType;return 1!==i||ri(t)?3===i&&t.data.trim()?We(t,e):null:Be(t,e)}function Be(t,e){if("TEXTAREA"===t.tagName){var i=N(t.value);i&&(t.setAttribute(":value",j(i)),t.value="")}var n,r=t.hasAttributes(),s=r&&d(t.attributes);return r&&(n=Xe(t,s,e)),n||(n=Ge(t,e)),n||(n=Ze(t,e)),!n&&r&&(n=ti(s,e)),n}function We(t,e){if(t._skip)return ze;var i=N(t.wholeText);if(!i)return null;for(var n=t.nextSibling;n&&3===n.nodeType;)n._skip=!0,n=n.nextSibling;for(var r,s,o=document.createDocumentFragment(),a=0,h=i.length;h>a;a++)s=i[a],r=s.tag?Ue(s,e):document.createTextNode(s.value),o.appendChild(r);return Je(i,o,e)}function ze(t,e){z(e)}function Ue(t,e){function i(e){if(!t.descriptor){var i=A(t.value);t.descriptor={name:e,def:bs[e],expression:i.expression,filters:i.filters}}}var n;return t.oneTime?n=document.createTextNode(t.value):t.html?(n=document.createComment("v-html"),i("html")):(n=document.createTextNode(" "),i("text")),n}function Je(t,e){return function(i,n,r,o){for(var a,h,l,c=e.cloneNode(!0),u=d(c.childNodes),f=0,p=t.length;p>f;f++)a=t[f],h=a.value,a.tag&&(l=u[f],a.oneTime?(h=(o||i).$eval(h),a.html?J(l,Xt(h,!0)):l.data=s(h)):i._bindDir(a.descriptor,l,r,o));J(n,c)}}function qe(t,e){for(var i,n,r,s=[],o=0,a=t.length;a>o;o++)r=t[o],i=Ve(r,e),n=i&&i.terminal||"SCRIPT"===r.tagName||!r.hasChildNodes()?null:qe(r.childNodes,e),s.push(i,n);return s.length?Qe(s):null}function Qe(t){return function(e,i,n,r,s){for(var o,a,h,l=0,c=0,u=t.length;u>l;c++){o=i[c],a=t[l++],h=t[l++];var f=d(o.childNodes);a&&a(e,o,n,r,s),h&&h(e,f,n,r,s)}}}function Ge(t,e){var i=t.tagName.toLowerCase();if(!jn.test(i)){var n=gt(e,"elementDirectives",i);return n?Ke(t,i,"",e,n):void 0}}function Ze(t,e){var i=lt(t,e);if(i){var n=rt(t),r={name:"component",ref:n,expression:i.id,def:Hs.component,modifiers:{literal:!i.dynamic}},s=function(t,e,i,s,o){n&&kt((s||t).$refs,n,null),t._bindDir(r,e,i,s,o)};return s.terminal=!0,s}}function Xe(t,e,i){if(null!==I(t,"v-pre"))return Ye;if(t.hasAttribute("v-else")){var n=t.previousElementSibling;if(n&&n.hasAttribute("v-if"))return Ye}for(var r,s,o,a,h,l,c,u,f,p,d=0,v=e.length;v>d;d++)r=e[d],s=r.name.replace(Bs,""),(h=s.match(Vs))&&(f=gt(i,"directives",h[1]),f&&f.terminal&&(!p||(f.priority||Us)>p.priority)&&(p=f,c=r.name,a=ei(r.name),o=r.value,l=h[1],u=h[2]));return p?Ke(t,l,o,i,p,c,u,a):void 0}function Ye(){}function Ke(t,e,i,n,r,s,o,a){var h=A(i),l={name:e,arg:o,expression:h.expression,filters:h.filters,raw:i,attr:s,modifiers:a,def:r};"for"!==e&&"router-view"!==e||(l.ref=rt(t));var c=function(t,e,i,n,r){l.ref&&kt((n||t).$refs,l.ref,null),t._bindDir(l,e,i,n,r)};return c.terminal=!0,c}function ti(t,e){function i(t,e,i){var n=i&&ni(i),r=!n&&A(s);v.push({name:t,attr:o,raw:a,def:e,arg:l,modifiers:c,expression:r&&r.expression,filters:r&&r.filters,interp:i,hasOneTime:n})}for(var n,r,s,o,a,h,l,c,u,f,p,d=t.length,v=[];d--;)if(n=t[d],r=o=n.name,s=a=n.value,f=N(s),l=null,c=ei(r),r=r.replace(Bs,""),f)s=j(f),l=r,i("bind",bs.bind,f);else if(Ws.test(r))c.literal=!Is.test(r),i("transition",Hs.transition);else if(Ms.test(r))l=r.replace(Ms,""),i("on",bs.on);else if(Is.test(r))h=r.replace(Is,""),"style"===h||"class"===h?i(h,Hs[h]):(l=h,i("bind",bs.bind));else if(p=r.match(Vs)){if(h=p[1],l=p[2],"else"===h)continue;u=gt(e,"directives",h,!0),u&&i(h,u)}return v.length?ii(v):void 0}function ei(t){var e=Object.create(null),i=t.match(Bs);if(i)for(var n=i.length;n--;)e[i[n].slice(1)]=!0;return e}function ii(t){return function(e,i,n,r,s){for(var o=t.length;o--;)e._bindDir(t[o],i,n,r,s)}}function ni(t){for(var e=t.length;e--;)if(t[e].oneTime)return!0}function ri(t){return"SCRIPT"===t.tagName&&(!t.hasAttribute("type")||"text/javascript"===t.getAttribute("type"))}function si(t,e){return e&&(e._containerAttrs=ai(t)),it(t)&&(t=Xt(t)),e&&(e._asComponent&&!e.template&&(e.template=""),e.template&&(e._content=K(t),t=oi(t,e))),at(t)&&(U(nt("v-start",!0),t),t.appendChild(nt("v-end",!0))),t}function oi(t,e){var i=e.template,n=Xt(i,!0);if(n){var r=n.firstChild,s=r.tagName&&r.tagName.toLowerCase();return e.replace?(t===document.body,n.childNodes.length>1||1!==r.nodeType||"component"===s||gt(e,"components",s)||V(r,"is")||gt(e,"elementDirectives",s)||r.hasAttribute("v-for")||r.hasAttribute("v-if")?n:(e._replacerAttrs=ai(r),hi(t,r),r)):(t.appendChild(n),t)}}function ai(t){return 1===t.nodeType&&t.hasAttributes()?d(t.attributes):void 0}function hi(t,e){for(var i,n,r=t.attributes,s=r.length;s--;)i=r[s].name,n=r[s].value,e.hasAttribute(i)||Js.test(i)?"class"===i&&!N(n)&&(n=n.trim())&&n.split(/\s+/).forEach(function(t){X(e,t)}):e.setAttribute(i,n)}function li(t,e){if(e){for(var i,n,r=t._slotContents=Object.create(null),s=0,o=e.children.length;o>s;s++)i=e.children[s],(n=i.getAttribute("slot"))&&(r[n]||(r[n]=[])).push(i);for(n in r)r[n]=ci(r[n],e);if(e.hasChildNodes()){var a=e.childNodes;if(1===a.length&&3===a[0].nodeType&&!a[0].data.trim())return;r["default"]=ci(e.childNodes,e)}}}function ci(t,e){var i=document.createDocumentFragment();t=d(t);for(var n=0,r=t.length;r>n;n++){var s=t[n];!it(s)||s.hasAttribute("v-if")||s.hasAttribute("v-for")||(e.removeChild(s),s=Xt(s,!0)),i.appendChild(s)}return i}function ui(t){function e(){}function n(t,e){var i=new Ut(e,t,null,{lazy:!0});return function(){return i.dirty&&i.evaluate(),_t.target&&i.depend(),i.value}}Object.defineProperty(t.prototype,"$data",{get:function(){return this._data},set:function(t){t!==this._data&&this._setData(t)}}),t.prototype._initState=function(){this._initProps(),this._initMeta(),this._initMethods(),this._initData(),this._initComputed()},t.prototype._initProps=function(){var t=this.$options,e=t.el,i=t.props;e=t.el=L(e),this._propsUnlinkFn=e&&1===e.nodeType&&i?Ie(this,e,i,this._scope):null},t.prototype._initData=function(){var t=this.$options.data,e=this._data=t?t():{};g(e)||(e={});var n,r,s=this._props,o=Object.keys(e);for(n=o.length;n--;)r=o[n],s&&i(s,r)||this._proxy(r);$t(e,this)},t.prototype._setData=function(t){t=t||{};var e=this._data;this._data=t;var n,r,s;for(n=Object.keys(e),s=n.length;s--;)r=n[s],r in t||this._unproxy(r);for(n=Object.keys(t),s=n.length;s--;)r=n[s],i(this,r)||this._proxy(r);e.__ob__.removeVm(this),$t(t,this),this._digest()},t.prototype._proxy=function(t){if(!r(t)){var e=this;Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){return e._data[t]},set:function(i){e._data[t]=i}})}},t.prototype._unproxy=function(t){r(t)||delete this[t]},t.prototype._digest=function(){for(var t=0,e=this._watchers.length;e>t;t++)this._watchers[t].update(!0)},t.prototype._initComputed=function(){var t=this.$options.computed;if(t)for(var i in t){var r=t[i],s={enumerable:!0,configurable:!0};"function"==typeof r?(s.get=n(r,this),s.set=e):(s.get=r.get?r.cache!==!1?n(r.get,this):p(r.get,this):e,s.set=r.set?p(r.set,this):e),Object.defineProperty(this,i,s)}},t.prototype._initMethods=function(){var t=this.$options.methods;if(t)for(var e in t)this[e]=p(t[e],this)},t.prototype._initMeta=function(){var t=this.$options._meta;if(t)for(var e in t)kt(this,e,t[e])}}function fi(t){function e(t,e){for(var i,n,r,s=e.attributes,o=0,a=s.length;a>o;o++)i=s[o].name,Qs.test(i)&&(i=i.replace(Qs,""),n=s[o].value,Mt(n)&&(n+=".apply(this, $arguments)"),r=(t._scope||t._context).$eval(n,!0),r._fromParent=!0,t.$on(i.replace(Qs),r))}function i(t,e,i){if(i){var r,s,o,a;for(s in i)if(r=i[s],Di(r))for(o=0,a=r.length;a>o;o++)n(t,e,s,r[o]);else n(t,e,s,r)}}function n(t,e,i,r,s){var o=typeof r;if("function"===o)t[e](i,r,s);else if("string"===o){var a=t.$options.methods,h=a&&a[r];h&&t[e](i,h,s)}else r&&"object"===o&&n(t,e,i,r.handler,r)}function r(){this._isAttached||(this._isAttached=!0,this.$children.forEach(s))}function s(t){!t._isAttached&&H(t.$el)&&t._callHook("attached")}function o(){this._isAttached&&(this._isAttached=!1,this.$children.forEach(a))}function a(t){t._isAttached&&!H(t.$el)&&t._callHook("detached")}t.prototype._initEvents=function(){var t=this.$options;t._asComponent&&e(this,t.el),i(this,"$on",t.events),i(this,"$watch",t.watch)},t.prototype._initDOMHooks=function(){this.$on("hook:attached",r),this.$on("hook:detached",o)},t.prototype._callHook=function(t){this.$emit("pre-hook:"+t);var e=this.$options[t];if(e)for(var i=0,n=e.length;n>i;i++)e[i].call(this);this.$emit("hook:"+t)}}function pi(){}function di(t,e,i,n,r,s){this.vm=e,this.el=i,this.descriptor=t,this.name=t.name,this.expression=t.expression,this.arg=t.arg,this.modifiers=t.modifiers,this.filters=t.filters,this.literal=this.modifiers&&this.modifiers.literal,this._locked=!1,this._bound=!1,this._listeners=null,this._host=n,this._scope=r,this._frag=s}function vi(t){t.prototype._updateRef=function(t){var e=this.$options._ref;if(e){var i=(this._scope||this._context).$refs;t?i[e]===this&&(i[e]=null):i[e]=this}},t.prototype._compile=function(t){var e=this.$options,i=t;if(t=si(t,e),this._initElement(t),1!==t.nodeType||null===I(t,"v-pre")){var n=this._context&&this._context.$options,r=Me(t,e,n);li(this,e._content);var s,o=this.constructor;e._linkerCachable&&(s=o.linker,s||(s=o.linker=De(t,e)));var a=r(this,t,this._scope),h=s?s(this,t):De(t,e)(this,t);this._unlinkFn=function(){a(),h(!0)},e.replace&&J(i,t),this._isCompiled=!0,this._callHook("compiled")}},t.prototype._initElement=function(t){at(t)?(this._isFragment=!0,this.$el=this._fragmentStart=t.firstChild,this._fragmentEnd=t.lastChild,3===this._fragmentStart.nodeType&&(this._fragmentStart.data=this._fragmentEnd.data=""),this._fragment=t):this.$el=t,this.$el.__vue__=this,this._callHook("beforeCompile")},t.prototype._bindDir=function(t,e,i,n,r){this._directives.push(new di(t,this,e,i,n,r))},t.prototype._destroy=function(t,e){if(this._isBeingDestroyed)return void(e||this._cleanup());var i,n,r=this,s=function(){!i||n||e||r._cleanup()};t&&this.$el&&(n=!0,this.$remove(function(){ +n=!1,s()})),this._callHook("beforeDestroy"),this._isBeingDestroyed=!0;var o,a=this.$parent;for(a&&!a._isBeingDestroyed&&(a.$children.$remove(this),this._updateRef(!0)),o=this.$children.length;o--;)this.$children[o].$destroy();for(this._propsUnlinkFn&&this._propsUnlinkFn(),this._unlinkFn&&this._unlinkFn(),o=this._watchers.length;o--;)this._watchers[o].teardown();this.$el&&(this.$el.__vue__=null),i=!0,s()},t.prototype._cleanup=function(){this._isDestroyed||(this._frag&&this._frag.children.$remove(this),this._data&&this._data.__ob__&&this._data.__ob__.removeVm(this),this.$el=this.$parent=this.$root=this.$children=this._watchers=this._context=this._scope=this._directives=null,this._isDestroyed=!0,this._callHook("destroyed"),this.$off())}}function mi(t){t.prototype._applyFilters=function(t,e,i,n){var r,s,o,a,h,l,c,u,f;for(l=0,c=i.length;c>l;l++)if(r=i[n?c-l-1:l],s=gt(this.$options,"filters",r.name,!0),s&&(s=n?s.write:s.read||s,"function"==typeof s)){if(o=n?[t,e]:[t],h=n?2:1,r.args)for(u=0,f=r.args.length;f>u;u++)a=r.args[u],o[u+h]=a.dynamic?this.$get(a.value):a.value;t=s.apply(this,o)}return t},t.prototype._resolveComponent=function(e,i){var n;if(n="function"==typeof e?e:gt(this.$options,"components",e,!0))if(n.options)i(n);else if(n.resolved)i(n.resolved);else if(n.requested)n.pendingCallbacks.push(i);else{n.requested=!0;var r=n.pendingCallbacks=[i];n.call(this,function(e){g(e)&&(e=t.extend(e)),n.resolved=e;for(var i=0,s=r.length;s>i;i++)r[i](e)},function(t){})}}}function gi(t){function i(t){return JSON.parse(JSON.stringify(t))}t.prototype.$get=function(t,e){var i=It(t);if(i){if(e){var n=this;return function(){n.$arguments=d(arguments);var t=i.get.call(n,n);return n.$arguments=null,t}}try{return i.get.call(this,this)}catch(r){}}},t.prototype.$set=function(t,e){var i=It(t,!0);i&&i.set&&i.set.call(this,this,e)},t.prototype.$delete=function(t){e(this._data,t)},t.prototype.$watch=function(t,e,i){var n,r=this;"string"==typeof t&&(n=A(t),t=n.expression);var s=new Ut(r,t,e,{deep:i&&i.deep,sync:i&&i.sync,filters:n&&n.filters,user:!i||i.user!==!1});return i&&i.immediate&&e.call(r,s.value),function(){s.teardown()}},t.prototype.$eval=function(t,e){if(Gs.test(t)){var i=A(t),n=this.$get(i.expression,e);return i.filters?this._applyFilters(n,null,i.filters):n}return this.$get(t,e)},t.prototype.$interpolate=function(t){var e=N(t),i=this;return e?1===e.length?i.$eval(e[0].value)+"":e.map(function(t){return t.tag?i.$eval(t.value):t.value}).join(""):t},t.prototype.$log=function(t){var e=t?jt(this._data,t):this._data;if(e&&(e=i(e)),!t){var n;for(n in this.$options.computed)e[n]=i(this[n]);if(this._props)for(n in this._props)e[n]=i(this[n])}console.log(e)}}function _i(t){function e(t,e,n,r,s,o){e=i(e);var a=!H(e),h=r===!1||a?s:o,l=!a&&!t._isAttached&&!H(t.$el);return t._isFragment?(st(t._fragmentStart,t._fragmentEnd,function(i){h(i,e,t)}),n&&n()):h(t.$el,e,t,n),l&&t._callHook("attached"),t}function i(t){return"string"==typeof t?document.querySelector(t):t}function n(t,e,i,n){e.appendChild(t),n&&n()}function r(t,e,i,n){B(t,e),n&&n()}function s(t,e,i){z(t),i&&i()}t.prototype.$nextTick=function(t){Yi(t,this)},t.prototype.$appendTo=function(t,i,r){return e(this,t,i,r,n,F)},t.prototype.$prependTo=function(t,e,n){return t=i(t),t.hasChildNodes()?this.$before(t.firstChild,e,n):this.$appendTo(t,e,n),this},t.prototype.$before=function(t,i,n){return e(this,t,i,n,r,D)},t.prototype.$after=function(t,e,n){return t=i(t),t.nextSibling?this.$before(t.nextSibling,e,n):this.$appendTo(t.parentNode,e,n),this},t.prototype.$remove=function(t,e){if(!this.$el.parentNode)return t&&t();var i=this._isAttached&&H(this.$el);i||(e=!1);var n=this,r=function(){i&&n._callHook("detached"),t&&t()};if(this._isFragment)ot(this._fragmentStart,this._fragmentEnd,this,this._fragment,r);else{var o=e===!1?s:P;o(this.$el,this,r)}return this}}function yi(t){function e(t,e,n){var r=t.$parent;if(r&&n&&!i.test(e))for(;r;)r._eventsCount[e]=(r._eventsCount[e]||0)+n,r=r.$parent}t.prototype.$on=function(t,i){return(this._events[t]||(this._events[t]=[])).push(i),e(this,t,1),this},t.prototype.$once=function(t,e){function i(){n.$off(t,i),e.apply(this,arguments)}var n=this;return i.fn=e,this.$on(t,i),this},t.prototype.$off=function(t,i){var n;if(!arguments.length){if(this.$parent)for(t in this._events)n=this._events[t],n&&e(this,t,-n.length);return this._events={},this}if(n=this._events[t],!n)return this;if(1===arguments.length)return e(this,t,-n.length),this._events[t]=null,this;for(var r,s=n.length;s--;)if(r=n[s],r===i||r.fn===i){e(this,t,-1),n.splice(s,1);break}return this},t.prototype.$emit=function(t){var e="string"==typeof t;t=e?t:t.name;var i=this._events[t],n=e||!i;if(i){i=i.length>1?d(i):i;var r=e&&i.some(function(t){return t._fromParent});r&&(n=!1);for(var s=d(arguments,1),o=0,a=i.length;a>o;o++){var h=i[o],l=h.apply(this,s);l!==!0||r&&!h._fromParent||(n=!0)}}return n},t.prototype.$broadcast=function(t){var e="string"==typeof t;if(t=e?t:t.name,this._eventsCount[t]){var i=this.$children,n=d(arguments);e&&(n[0]={name:t,source:this});for(var r=0,s=i.length;s>r;r++){var o=i[r],a=o.$emit.apply(o,n);a&&o.$broadcast.apply(o,n)}return this}},t.prototype.$dispatch=function(t){var e=this.$emit.apply(this,arguments);if(e){var i=this.$parent,n=d(arguments);for(n[0]={name:t,source:this};i;)e=i.$emit.apply(i,n),i=e?i.$parent:null;return this}};var i=/^hook:/}function bi(t){function e(){this._isAttached=!0,this._isReady=!0,this._callHook("ready")}t.prototype.$mount=function(t){return this._isCompiled?void 0:(t=L(t),t||(t=document.createElement("div")),this._compile(t),this._initDOMHooks(),H(this.$el)?(this._callHook("attached"),e.call(this)):this.$once("hook:attached",e),this)},t.prototype.$destroy=function(t,e){this._destroy(t,e)},t.prototype.$compile=function(t,e,i,n){return De(t,this.$options,!0)(this,t,e,i,n)}}function wi(t){this._init(t)}function Ci(t,e,i){return i=i?parseInt(i,10):0,e=o(e),"number"==typeof e?t.slice(i,i+e):t}function $i(t,e,i){if(t=Ks(t),null==e)return t;if("function"==typeof e)return t.filter(e);e=(""+e).toLowerCase();for(var n,r,s,o,a="in"===i?3:2,h=Array.prototype.concat.apply([],d(arguments,a)),l=[],c=0,u=t.length;u>c;c++)if(n=t[c],s=n&&n.$value||n,o=h.length){for(;o--;)if(r=h[o],"$key"===r&&xi(n.$key,e)||xi(jt(s,r),e)){l.push(n);break}}else xi(n,e)&&l.push(n);return l}function ki(t){function e(t,e,i){var r=n[i];return r&&("$key"!==r&&(m(t)&&"$value"in t&&(t=t.$value),m(e)&&"$value"in e&&(e=e.$value)),t=m(t)?jt(t,r):t,e=m(e)?jt(e,r):e),t===e?0:t>e?s:-s}var i=null,n=void 0;t=Ks(t);var r=d(arguments,1),s=r[r.length-1];"number"==typeof s?(s=0>s?-1:1,r=r.length>1?r.slice(0,-1):r):s=1;var o=r[0];return o?("function"==typeof o?i=function(t,e){return o(t,e)*s}:(n=Array.prototype.concat.apply([],r),i=function(t,r,s){return s=s||0,s>=n.length-1?e(t,r,s):e(t,r,s)||i(t,r,s+1)}),t.slice().sort(i)):t}function xi(t,e){var i;if(g(t)){var n=Object.keys(t);for(i=n.length;i--;)if(xi(t[n[i]],e))return!0}else if(Di(t)){for(i=t.length;i--;)if(xi(t[i],e))return!0}else if(null!=t)return t.toString().toLowerCase().indexOf(e)>-1}function Ai(i){function n(t){return new Function("return function "+f(t)+" (options) { this._init(options) }")()}i.options={directives:bs,elementDirectives:Ys,filters:eo,transitions:{},components:{},partials:{},replace:!0},i.util=In,i.config=An,i.set=t,i["delete"]=e,i.nextTick=Yi,i.compiler=qs,i.FragmentFactory=se,i.internalDirectives=Hs,i.parsers={path:ir,text:$n,template:Fr,directive:gn,expression:mr},i.cid=0;var r=1;i.extend=function(t){t=t||{};var e=this,i=0===e.cid;if(i&&t._Ctor)return t._Ctor;var s=t.name||e.options.name,o=n(s||"VueComponent");return o.prototype=Object.create(e.prototype),o.prototype.constructor=o,o.cid=r++,o.options=mt(e.options,t),o["super"]=e,o.extend=e.extend,An._assetTypes.forEach(function(t){o[t]=e[t]}),s&&(o.options.components[s]=o),i&&(t._Ctor=o),o},i.use=function(t){if(!t.installed){var e=d(arguments,1);return e.unshift(this),"function"==typeof t.install?t.install.apply(t,e):t.apply(null,e),t.installed=!0,this}},i.mixin=function(t){i.options=mt(i.options,t)},An._assetTypes.forEach(function(t){i[t]=function(e,n){return n?("component"===t&&g(n)&&(n.name||(n.name=e),n=i.extend(n)),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}}),v(i.transition,Tn)}var Oi=Object.prototype.hasOwnProperty,Ti=/^\s?(true|false|-?[\d\.]+|'[^']*'|"[^"]*")\s?$/,Ni=/-(\w)/g,ji=/([a-z\d])([A-Z])/g,Ei=/(?:^|[-_\/])(\w)/g,Si=Object.prototype.toString,Fi="[object Object]",Di=Array.isArray,Pi="__proto__"in{},Ri="undefined"!=typeof window&&"[object Object]"!==Object.prototype.toString.call(window),Li=Ri&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,Hi=Ri&&window.navigator.userAgent.toLowerCase(),Ii=Hi&&Hi.indexOf("trident")>0,Mi=Hi&&Hi.indexOf("msie 9.0")>0,Vi=Hi&&Hi.indexOf("android")>0,Bi=Hi&&/(iphone|ipad|ipod|ios)/i.test(Hi),Wi=Bi&&Hi.match(/os ([\d_]+)/),zi=Wi&&Wi[1].split("_"),Ui=zi&&Number(zi[0])>=9&&Number(zi[1])>=3&&!window.indexedDB,Ji=void 0,qi=void 0,Qi=void 0,Gi=void 0;if(Ri&&!Mi){var Zi=void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend,Xi=void 0===window.onanimationend&&void 0!==window.onwebkitanimationend;Ji=Zi?"WebkitTransition":"transition",qi=Zi?"webkitTransitionEnd":"transitionend",Qi=Xi?"WebkitAnimation":"animation",Gi=Xi?"webkitAnimationEnd":"animationend"}var Yi=function(){function t(){n=!1;var t=i.slice(0);i=[];for(var e=0;ee;e++)t[e].update()};var Pn=Array.prototype,Rn=Object.create(Pn);["push","pop","shift","unshift","splice","sort","reverse"].forEach(function(t){var e=Pn[t];_(Rn,t,function(){for(var i=arguments.length,n=new Array(i);i--;)n[i]=arguments[i];var r,s=e.apply(this,n),o=this.__ob__;switch(t){case"push":r=n;break;case"unshift":r=n;break;case"splice":r=n.slice(2)}return r&&o.observeArray(r),o.dep.notify(),s})}),_(Pn,"$set",function(t,e){return t>=this.length&&(this.length=Number(t)+1),this.splice(t,1,e)[0]}),_(Pn,"$remove",function(t){if(this.length){var e=b(this,t);return e>-1?this.splice(e,1):void 0}});var Ln=Object.getOwnPropertyNames(Rn),Hn=!0;bt.prototype.walk=function(t){for(var e=Object.keys(t),i=0,n=e.length;n>i;i++)this.convert(e[i],t[e[i]])},bt.prototype.observeArray=function(t){for(var e=0,i=t.length;i>e;e++)$t(t[e])},bt.prototype.convert=function(t,e){kt(this.value,t,e)},bt.prototype.addVm=function(t){(this.vms||(this.vms=[])).push(t)},bt.prototype.removeVm=function(t){this.vms.$remove(t)};var In=Object.freeze({defineReactive:kt,set:t,del:e,hasOwn:i,isLiteral:n,isReserved:r,_toString:s,toNumber:o,toBoolean:a,stripQuotes:h,camelize:l,hyphenate:u,classify:f,bind:p,toArray:d,extend:v,isObject:m,isPlainObject:g,def:_,debounce:y,indexOf:b,cancellable:w,looseEqual:C,isArray:Di,hasProto:Pi,inBrowser:Ri,devtools:Li,isIE:Ii,isIE9:Mi,isAndroid:Vi,isIos:Bi,iosVersionMatch:Wi,iosVersion:zi,hasMutationObserverBug:Ui,get transitionProp(){return Ji},get transitionEndEvent(){return qi},get animationProp(){return Qi},get animationEndEvent(){return Gi},nextTick:Yi,get _Set(){return Ki},query:L,inDoc:H,getAttr:I,getBindAttr:M,hasBindAttr:V,before:B,after:W,remove:z,prepend:U,replace:J,on:q,off:Q,setClass:Z,addClass:X,removeClass:Y,extractContent:K,trimNode:tt,isTemplate:it,createAnchor:nt,findRef:rt,mapNodeRange:st,removeNodeRange:ot,isFragment:at,getOuterHTML:ht,mergeOptions:mt,resolveAsset:gt,checkComponentAttr:lt,commonTagRE:jn,reservedTagRE:En,warn:On}),Mn=0,Vn=new $(1e3),Bn=0,Wn=1,zn=2,Un=3,Jn=0,qn=1,Qn=2,Gn=3,Zn=4,Xn=5,Yn=6,Kn=7,tr=8,er=[];er[Jn]={ws:[Jn],ident:[Gn,Bn],"[":[Zn],eof:[Kn]},er[qn]={ws:[qn],".":[Qn],"[":[Zn],eof:[Kn]},er[Qn]={ws:[Qn],ident:[Gn,Bn]},er[Gn]={ident:[Gn,Bn],0:[Gn,Bn],number:[Gn,Bn],ws:[qn,Wn],".":[Qn,Wn],"[":[Zn,Wn],eof:[Kn,Wn]},er[Zn]={"'":[Xn,Bn],'"':[Yn,Bn],"[":[Zn,zn],"]":[qn,Un],eof:tr,"else":[Zn,Bn]},er[Xn]={"'":[Zn,Bn],eof:tr,"else":[Xn,Bn]},er[Yn]={'"':[Zn,Bn],eof:tr,"else":[Yn,Bn]};var ir=Object.freeze({parsePath:Nt,getPath:jt,setPath:Et}),nr=new $(1e3),rr="Math,Date,this,true,false,null,undefined,Infinity,NaN,isNaN,isFinite,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,parseInt,parseFloat",sr=new RegExp("^("+rr.replace(/,/g,"\\b|")+"\\b)"),or="break,case,class,catch,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,in,instanceof,let,return,super,switch,throw,try,var,while,with,yield,enum,await,implements,package,protected,static,interface,private,public",ar=new RegExp("^("+or.replace(/,/g,"\\b|")+"\\b)"),hr=/\s/g,lr=/\n/g,cr=/[\{,]\s*[\w\$_]+\s*:|('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`)|new |typeof |void /g,ur=/"(\d+)"/g,fr=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['.*?'\]|\[".*?"\]|\[\d+\]|\[[A-Za-z_$][\w$]*\])*$/,pr=/[^\w$\.](?:[A-Za-z_$][\w$]*)/g,dr=/^(?:true|false|null|undefined|Infinity|NaN)$/,vr=[],mr=Object.freeze({parseExpression:It,isSimplePath:Mt}),gr=[],_r=[],yr={},br={},wr=!1,Cr=0;Ut.prototype.get=function(){this.beforeGet();var t,e=this.scope||this.vm;try{t=this.getter.call(e,e)}catch(i){}return this.deep&&Jt(t),this.preProcess&&(t=this.preProcess(t)),this.filters&&(t=e._applyFilters(t,null,this.filters,!1)),this.postProcess&&(t=this.postProcess(t)),this.afterGet(),t},Ut.prototype.set=function(t){var e=this.scope||this.vm;this.filters&&(t=e._applyFilters(t,this.value,this.filters,!0));try{this.setter.call(e,e,t)}catch(i){}var n=e.$forContext;if(n&&n.alias===this.expression){if(n.filters)return;n._withLock(function(){e.$key?n.rawValue[e.$key]=t:n.rawValue.$set(e.$index,t)})}},Ut.prototype.beforeGet=function(){_t.target=this},Ut.prototype.addDep=function(t){var e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))},Ut.prototype.afterGet=function(){_t.target=null;for(var t=this.deps.length;t--;){var e=this.deps[t];this.newDepIds.has(e.id)||e.removeSub(this)}var i=this.depIds;this.depIds=this.newDepIds,this.newDepIds=i,this.newDepIds.clear(),i=this.deps,this.deps=this.newDeps,this.newDeps=i,this.newDeps.length=0},Ut.prototype.update=function(t){this.lazy?this.dirty=!0:this.sync||!An.async?this.run():(this.shallow=this.queued?t?this.shallow:!1:!!t,this.queued=!0,zt(this))},Ut.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||(m(t)||this.deep)&&!this.shallow){var e=this.value;this.value=t;this.prevError;this.cb.call(this.vm,t,e)}this.queued=this.shallow=!1}},Ut.prototype.evaluate=function(){var t=_t.target;this.value=this.get(),this.dirty=!1,_t.target=t},Ut.prototype.depend=function(){for(var t=this.deps.length;t--;)this.deps[t].depend()},Ut.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||this.vm._vForRemoving||this.vm._watchers.$remove(this);for(var t=this.deps.length;t--;)this.deps[t].removeSub(this);this.active=!1,this.vm=this.cb=this.value=null}};var $r=new Ki,kr={bind:function(){this.attr=3===this.el.nodeType?"data":"textContent"},update:function(t){this.el[this.attr]=s(t)}},xr=new $(1e3),Ar=new $(1e3),Or={efault:[0,"",""],legend:[1,"
","
"],tr:[2,"","
"],col:[2,"","
"]};Or.td=Or.th=[3,"","
"],Or.option=Or.optgroup=[1,'"],Or.thead=Or.tbody=Or.colgroup=Or.caption=Or.tfoot=[1,"","
"],Or.g=Or.defs=Or.symbol=Or.use=Or.image=Or.text=Or.circle=Or.ellipse=Or.line=Or.path=Or.polygon=Or.polyline=Or.rect=[1,'',""];var Tr=/<([\w:-]+)/,Nr=/&#?\w+?;/,jr=/