From 00f8c05a65d66bf2702d218d3586158efb8462d8 Mon Sep 17 00:00:00 2001 From: metowolf Date: Mon, 12 Mar 2018 18:35:22 +0800 Subject: [PATCH] =?UTF-8?q?:tada:=20=E6=94=AF=E6=8C=81=20APlayer=201.7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 升级 MetingJS 1.1.1 - 增强接口安全性 - 修复虾米音乐 HTTPS --- Action.php | 20 ++++++----- Plugin.php | 26 ++++++++------ README.md | 69 ++++++++++++++++++++++++-------------- assets/APlayer.min.css | 2 ++ assets/APlayer.min.css.map | 1 + assets/APlayer.min.js | 3 +- assets/APlayer.min.js.map | 1 + assets/Meting.min.js | 2 +- shasum.txt | 13 ++++--- 9 files changed, 86 insertions(+), 51 deletions(-) create mode 100644 assets/APlayer.min.css create mode 100644 assets/APlayer.min.css.map create mode 100644 assets/APlayer.min.js.map diff --git a/Action.php b/Action.php index d90109d..12c666c 100644 --- a/Action.php +++ b/Action.php @@ -71,11 +71,11 @@ private function api() } // auth 验证 - $EID = $server.'/'.$type.'/'.$id; + $EID = $server.$type.$id; $salt = Typecho_Widget::widget('Widget_Options')->plugin('Meting')->salt; - if (!empty($salt) && in_array($type, array('lrc','pic','url'))) { - $auth1 = md5($salt.$type.$id.$salt); + if (!empty($salt)) { + $auth1 = md5($salt.$EID.$salt); $auth2 = $this->request->get('auth'); if (strcmp($auth1, $auth2)) { http_response_code(403); @@ -129,6 +129,10 @@ private function api() $url = str_replace('http://m10.', 'https://m10.', $url); } + if ($server == 'xiami') { + $url = str_replace('http://', 'https://', $url); + } + if ($server == 'baidu') { $url = str_replace('http://zhangmenshiting.qianqian.com', 'https://gss3.baidu.com/y0s1hSulBw92lNKgpU_Z2jR7b2w6buu', $url); } @@ -155,11 +159,11 @@ private function api() $music = array(); foreach ($data as $vo) { $music[] = array( - 'title' => $vo['name'], - 'author' => implode(' / ', $vo['artist']), - 'url' => $url.'?server='.$vo['source'].'&type=url&id='.$vo['url_id'].'&auth='.md5($salt.'url'.$vo['url_id'].$salt), - 'pic' => $url.'?server='.$vo['source'].'&type=pic&id='.$vo['pic_id'].'&auth='.md5($salt.'pic'.$vo['pic_id'].$salt), - 'lrc' => $url.'?server='.$vo['source'].'&type=lrc&id='.$vo['lyric_id'].'&auth='.md5($salt.'lrc'.$vo['lyric_id'].$salt), + 'name' => $vo['name'], + 'artist' => implode(' / ', $vo['artist']), + 'url' => $url.'?server='.$vo['source'].'&type=url&id='.$vo['url_id'].'&auth='.md5($salt.$vo['source'].'url'.$vo['url_id'].$salt), + 'cover' => $url.'?server='.$vo['source'].'&type=pic&id='.$vo['pic_id'].'&auth='.md5($salt.$vo['source'].'pic'.$vo['pic_id'].$salt), + 'lrc' => $url.'?server='.$vo['source'].'&type=lrc&id='.$vo['lyric_id'].'&auth='.md5($salt.$vo['source'].'lrc'.$vo['lyric_id'].$salt), ); } header("Content-Type: application/javascript"); diff --git a/Plugin.php b/Plugin.php index e6e100f..7ffb01f 100644 --- a/Plugin.php +++ b/Plugin.php @@ -8,13 +8,13 @@ * * @package APlayer for Typecho | Meting * @author METO - * @version 2.1.1 + * @version 2.1.2 * @dependence 14.10.10-* * @link https://github.com/MoePlayer/APlayer-Typecho * */ -define('METING_VERSION', '2.1.1'); +define('METING_VERSION', '2.1.2'); class Meting_Plugin extends Typecho_Widget implements Typecho_Plugin_Interface { @@ -84,9 +84,9 @@ public static function config(Typecho_Widget_Helper_Form $form) ); $form->addInput($t); $t = new Typecho_Widget_Helper_Form_Element_Radio( - 'mode', - array('circulation' => _t('循环'),'single' => _t('单曲'),'order' => _t('列表'),'random' => _t('随机')), - 'circulation', + 'order', + array('list' => _t('列表'), 'random' => _t('随机')), + 'list', _t('全局播放模式'), _t('') ); @@ -143,7 +143,7 @@ public static function config(Typecho_Widget_Helper_Form $form) $t = new Typecho_Widget_Helper_Form_Element_Text( 'api', null, - Typecho_Common::url('action/metingapi', Helper::options()->index)."?server=:server&type=:type&id=:id&r=:r", + Typecho_Common::url('action/metingapi', Helper::options()->index)."?server=:server&type=:type&id=:id&auth=:auth&r=:r", _t('* 云解析地址'), _t('示例:https://api.i-meto.com/meting/api?server=:server&type=:type&id=:id&r=:r') ); @@ -177,7 +177,7 @@ public static function configHandle($config, $is_init) { if (!$is_init) { if (empty($config['api'])) { - $config['api'] = Typecho_Common::url('action/metingapi', Helper::options()->index)."?server=:server&type=:type&id=:id&r=:r"; + $config['api'] = Typecho_Common::url('action/metingapi', Helper::options()->index)."?server=:server&type=:type&id=:id&auth=:auth&r=:r"; } if ($config['cachetype'] != 'none') { require_once 'driver/cache.interface.php'; @@ -215,6 +215,7 @@ public static function header() $api = Typecho_Widget::widget('Widget_Options')->plugin('Meting')->api; $dir = Helper::options()->pluginUrl.'/Meting/assets'; $ver = METING_VERSION; + echo "\n"; echo "\n"; echo ""; } @@ -258,8 +259,8 @@ public static function parseMusic($matches, $setting) 'theme' => Typecho_Widget::widget('Widget_Options')->plugin('Meting')->theme?:'red', 'preload' => Typecho_Widget::widget('Widget_Options')->plugin('Meting')->preload?:'auto', 'autoplay' => Typecho_Widget::widget('Widget_Options')->plugin('Meting')->autoplay?:'false', - 'listmaxheight' => Typecho_Widget::widget('Widget_Options')->plugin('Meting')->height?:'340px', - 'mode' => Typecho_Widget::widget('Widget_Options')->plugin('Meting')->mode?:'circulation', + 'listMaxHeight' => Typecho_Widget::widget('Widget_Options')->plugin('Meting')->height?:'340px', + 'order' => Typecho_Widget::widget('Widget_Options')->plugin('Meting')->order?:'list', ); if (isset($t['server'])) { if (!in_array($t['server'], array('netease','tencent','xiami','baidu','kugou'))) { @@ -270,7 +271,10 @@ public static function parseMusic($matches, $setting) } $data = $t; - $str .= "
plugin('Meting')->salt; + $auth = md5($salt.$data['server'].$data['type'].$data['id'].$salt); + + $str .= "
$vo) { $player[$key] = $vo; @@ -283,7 +287,7 @@ public static function parseMusic($matches, $setting) } else { $data = $t; - $str .= "
$vo) { $player[$key] = $vo; diff --git a/README.md b/README.md index 93e7f3a..3fb75ec 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ 2. 简单快捷,复制音乐详情页面网址,后台自动生成播放代码 3. 前端 APlayer,后端 Meting 及时更新,保证兼容性及 API 高可用性 4. 支持 MySql、SQLite 数据库 - 5. **支持 Redis 缓存** + 5. **支持 Redis, Memcached 缓存** 6. 支持自定义歌曲播放 7. **自定义 API 支持** @@ -36,32 +36,37 @@ - 榜单 http://music.163.com/#/discover/toplist?id=60198 QQ 音乐 https://y.qq.com -- 单曲 https://y.qq.com/n/yqq/song/000jDQWP4JiB3y.html -- 专辑 https://y.qq.com/n/yqq/album/003rytri2FHG3V.html -- 歌手 https://y.qq.com/n/yqq/singer/003Nz2So3XXYek.html -- 歌单 https://y.qq.com/n/yqq/playlist/1144188779.html + - 单曲 https://y.qq.com/n/yqq/song/000jDQWP4JiB3y.html + - 专辑 https://y.qq.com/n/yqq/album/003rytri2FHG3V.html + - 歌手 https://y.qq.com/n/yqq/singer/003Nz2So3XXYek.html + - 歌单 https://y.qq.com/n/yqq/playlist/1144188779.html 虾米音乐 http://www.xiami.com or http://h.xiami.com -- 单曲 http://www.xiami.com/song/bf08DNT3035f -- 专辑 http://www.xiami.com/album/ddOZW6a10eb -- 歌手 http://www.xiami.com/artist/be6yda0f8 -- 歌单 http://www.xiami.com/collect/254478782 + - 单曲 http://www.xiami.com/song/bf08DNT3035f + - 专辑 http://www.xiami.com/album/ddOZW6a10eb + - 歌手 http://www.xiami.com/artist/be6yda0f8 + - 歌单 http://www.xiami.com/collect/254478782 酷狗音乐 http://www.kugou.com -- 单曲 http://www.kugou.com/song/#hash=09E8DE70A24C97B92A29F6A19F3528A2 -- 专辑 http://www.kugou.com/yy/album/single/1645030.html -- 歌手 http://www.kugou.com/yy/singer/home/3520.html -- 歌单 http://www.kugou.com/yy/special/single/119859.html + - 单曲 http://www.kugou.com/song/#hash=09E8DE70A24C97B92A29F6A19F3528A2 + - 专辑 http://www.kugou.com/yy/album/single/1645030.html + - 歌手 http://www.kugou.com/yy/singer/home/3520.html + - 歌单 http://www.kugou.com/yy/special/single/119859.html 百度音乐 http://music.baidu.com/ -- 单曲 http://music.baidu.com/song/268275324 -- 专辑 http://music.baidu.com/album/268275533 -- 歌手 http://music.baidu.com/artist/1219 -- 歌单 http://music.baidu.com/songlist/364201689 + - 单曲 http://music.baidu.com/song/268275324 + - 专辑 http://music.baidu.com/album/268275533 + - 歌手 http://music.baidu.com/artist/1219 + - 歌单 http://music.baidu.com/songlist/364201689 ## FAQ -Q: pjax 页面切换无法停止播放? -A: 需要另外在主题的回调函数中添加 + +
PJAX 页面切换问题?
+ +需要视情况在主题设置中添加回调函数 + +### 停止播放 + ``` if (typeof aplayers !== 'undefined'){ for (var i = 0; i < aplayers.length; i++) { @@ -70,14 +75,28 @@ if (typeof aplayers !== 'undefined'){ } ``` -Q: 不支持混合歌单? -A: 由于 2.0 版本重写了实现方式,旧的混合歌单将不再支持,建议通过各音乐平台创建歌单的方式添加。 +### 重载播放器 + +``` +loadMeting(); +``` + +
+ + +
不支持混合歌单?
+ +由于 2.x 版本重写了实现方式,旧的混合歌单将不再支持,建议通过各音乐平台创建歌单的方式添加。 + +
+ + +
升级问题?
+ +目前插件支持在设置页面差量升级,但由于某些版本做了较大调整,可能造成插件无法使用,可以禁用插件再启用修复。 -Q: 部分歌曲失效? -A: 可能 API 失效导致的,可以尝试点击插件升级按钮升级到最新,或填写 cookie 信息。 +
-Q: PJAX 中播放器不加载? -A: 需要在主题回调函数中添加 `loadMeting();` 更多问题可以通过 issue 页面提交,或者通过 Telegram、邮件向我反馈 diff --git a/assets/APlayer.min.css b/assets/APlayer.min.css new file mode 100644 index 0000000..5dde4ee --- /dev/null +++ b/assets/APlayer.min.css @@ -0,0 +1,2 @@ +.aplayer-narrow{width:66px}.aplayer-narrow .aplayer-info{display:none}.aplayer-withlrc.aplayer-narrow{width:90px}.aplayer-withlrc.aplayer .aplayer-pic{height:90px;width:90px}.aplayer-withlrc.aplayer .aplayer-info{margin-left:90px;height:90px}.aplayer-withlrc.aplayer .aplayer-lrc{display:block}.aplayer-withlrc.aplayer .aplayer-info{padding:10px 7px 0}.aplayer-withlist.aplayer .aplayer-info{border-bottom:1px solid #e9e9e9}.aplayer-withlist.aplayer .aplayer-list{display:block}.aplayer-withlist.aplayer .aplayer-icon-menu{display:inline!important}.aplayer{background:#fff;font-family:Arial,Helvetica,sans-serif;margin:5px;-webkit-box-shadow:0 2px 2px 0 rgba(0,0,0,.07),0 1px 5px 0 rgba(0,0,0,.1);box-shadow:0 2px 2px 0 rgba(0,0,0,.07),0 1px 5px 0 rgba(0,0,0,.1);border-radius:2px;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;line-height:normal}.aplayer *{-webkit-box-sizing:content-box;box-sizing:content-box}.aplayer svg{width:100%;height:100%}.aplayer svg circle,.aplayer svg path{fill:#fff}.aplayer.aplayer-arrow .aplayer-icon-loop,.aplayer.aplayer-arrow .aplayer-icon-order,.aplayer.aplayer-mobile .aplayer-icon-volume-down{display:none}.aplayer.aplayer-loading .aplayer-info .aplayer-controller .aplayer-loading-icon{display:block}.aplayer.aplayer-loading .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played .aplayer-thumb{-webkit-transform:scale(1);transform:scale(1)}.aplayer .aplayer-icon{width:15px;height:15px;border:none;background-color:transparent;outline:none;cursor:pointer;opacity:.8;vertical-align:middle;padding:0;font-size:12px;margin:0;display:inline}.aplayer .aplayer-icon path{-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.aplayer .aplayer-lrc-content{display:none}.aplayer .aplayer-pic{position:relative;float:left;height:66px;width:66px;background-image:url(data:image/jpeg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAAeAAD/4QMfaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjYtYzA2NyA3OS4xNTc3NDcsIDIwMTUvMDMvMzAtMjM6NDA6NDIgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjE2NjQ3NUZBM0Y4RDExRTY4NzJCRDdCNkZCQTQ0MjNBIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjE2NjQ3NUY5M0Y4RDExRTY4NzJCRDdCNkZCQTQ0MjNBIiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE1IE1hY2ludG9zaCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSI5OENEMEFFRjM0NTI1NjE0NEREQkU4RjkxRjAwNjM3NiIgc3RSZWY6ZG9jdW1lbnRJRD0iOThDRDBBRUYzNDUyNTYxNDREREJFOEY5MUYwMDYzNzYiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7/7gAOQWRvYmUAZMAAAAAB/9sAhAAQCwsLDAsQDAwQFw8NDxcbFBAQFBsfFxcXFxcfHhcaGhoaFx4eIyUnJSMeLy8zMy8vQEBAQEBAQEBAQEBAQEBAAREPDxETERUSEhUUERQRFBoUFhYUGiYaGhwaGiYwIx4eHh4jMCsuJycnLis1NTAwNTVAQD9AQEBAQEBAQEBAQED/wAARCABkAGQDASIAAhEBAxEB/8QAgwAAAgIDAQAAAAAAAAAAAAAAAAYBBQIDBAcBAQEBAAAAAAAAAAAAAAAAAAABAhAAAQIEBAEJBgMHBQAAAAAAAQIDABEEBSExEgZBUWFxgaGxIhMUkTJCUmIVI0MWwdHh8XKSsvCCojNzEQEBAQEBAQEBAAAAAAAAAAAAAREhMVFBYf/aAAwDAQACEQMRAD8AaJ8vCJEYTjIZxtlIicc40VFZS0idVS6lpP1HE9Aind3dSrWWbdTPVruXgSQn98Awd0SBC+mp3fVYtUjFGk5F5U1S6Me6Mvtu6ncXbo01zNtzl2CJovwZxML/ANl3DwvZn/5fxiPt+72sWbkw/Lg4jTP/AImGhhiYWlXXdlD4q23IqWh7zlOZ/wCGrujpt+7bTWKDTijSvEy0O4CfJqy9sNMXmWMTECRExjzxMUEEEEBxLcbbQXHVBCEialKMgBFBU7jqax/0dmbU64fzJYy+aZwSOcxT7kvdPXVJpU6jTU5IC0HBauKucDhF7tS3ejolVJK51UlJQrCSRkeuJqppdspcV593dNU8cS0kkNjpPvKi8ZaZp2w3TtpabGSUAJHZEgzjXUVdPStebUOBpE5AnieQDieiKjeYyELVVva3ML0IZddI44IHaZxtod52upcDbqV0ylGSVLkUTP1JyibDDBOJxzjTUF8UzqqdIVUBtRZByK9J09seb1lzuKawuIqngRLSorUDMZ6k8DPMSwhaSPTwSDFbd7Bb7s2rzkBupl4KlIksH6vmHTE2GucuNqp6p3/tIKXCOKknST1xYgZDlihPsNxrLTXItFevXTuLU02omZadQZFP9Jw9ohxjz2tfF03GhFKdQXV6kqHINCJ/2tTj0KYJiQow6oIJY5QRR5hYLM5cK9KHkFNO1JbxIImOCeuPREyAAAkAJARyW63s26n8hlSnATqUtZmonnlKOucokhQtxDTa3XTpbbSVrVyJSNRhFq6usvNyap0K0v1JA5mG1YhtPJJOKzxOENG5HS3Yq1ScyhKSOZS0pPZCts8+ZfQtWK/LcUOk/wA4X3FhwoLJbKBgMtMIWZeN1xKVqWecqB9kJm7aKlo7wpulQGm3G0OKbT7qVKmDIcAZTh/LiW0KW4oJQgFS1HAAJEyTHnb6ndxX5XlAgVCwlH0MoEpnoSJwpD5ZFrXZ6JThOtTKJk9GHZCxvZmn9YHkJSh1KGw6QAC4p0uEauUhKIcmW0NNIaQJIbSEp5kpEhHntyqV3q7hlkzFQ/4T9ODSPYhM+uFI7rbZ9zU1EzXWuoGl5Ic9Pq0nH6XPAZ9MY1+6r2hh+3VjKGKojQtwApWlKhjhMjEcYZrzcW7JavMaA1pAZpUn5pSB6EgThT2xaTeLi5U1ZLjLJ8x4qzccUZhJ7zE/g6dlrtNO+t+pfSisUNDKF+EJScyFHCZh5BEpgzB4xR3TaVqr0lTKBR1BEw42JIJ+tvL2ShaZuN62xWejqZuMiRLKjqQtB+JpXD/U4vh69BxnKCK/73Qfa/uus+m0z+rVl5cvmnhBFRsHLyxIkrolGIMhKJSchAcl4pzVWmsYAmtbSijnUjxp7UwibdrEUd4pnlnS2olCycgFjTjHo4VHm9/paeku1QxTKCmtWrSPyyrFTf8AtiX6sW+5dwmtV9st5K2SoJdWnEuqnghP0z9sXe2rCLXTl18A1rwGvj5afkH7YoNov2aneW7WLCK2cmVOYISn6Tlq6Yaau+2mkaLjlU2ogYNtkLWo8JBMJ9GndFzFBanEpMqipmy1ygKHjV1J74odkW4u1blwWPw6ceW0eVxYx9ie+K+oeuG57sA0iXwtozSy1P3lHvh+t1AzbqNqkY9xsYq4qUcVKPSYe0/C9vxp9VPRvAEstqWlZGSVLCdM+mRjn2Xd6KkS9R1K0sqcUFtuKwSrCRSTDg42262pp1CXGljStChqSoHlBigqdk2h5RUyt2mn8CSFo6tePbDO6Ll67W1hOtyrZSn+sHsGMJW6r3S3Z9hukQS3T6gHSJFZXLBIzlhFs3sO3pV+JVPLHIEoR2+KLm32C024hdMwPNGTrh1r6irLqh2pwvfp+4fpPydJ9T5vqfT/ABaJadMvmljKCHLjxnBDDXDPGXGJmTkcogETMshjyxlPhFGqqfVT0b9QMSy2twDnSkkdsJtoomK7cC2KoB1plKtSVfmKT4ST0qUVQ7KbQ62th3xNuJUhY46VDSewwhvqrdvXsPrTqUMZ/C82fCVJP1dhiVYvKjY9vcVqpqhxgH8tQDgHQZpMRT7EokkF+qccHyISlufX4oubddKG5shymWCvNbRwWk84jtBMgeSGRNaKOgo7eyWaNoNIPvEYqUfqUcTHVOMRIxOKscooyBxg5eSIM5T48IkY/vgJOPVBOXOIBM80aKqspaNvzap1LaRlM4noGZgOjVBC5+sqX1ejyj6aUp6vxf6tGUuac4ImwxbAkKlEzBywjHGUgermiRPLhFGYJ48Y01tDSXBg09Y2HG5+E5KSZZoUMo2AgZRkDiBLDiIBQq9n3ClcL9pf80JxSkny3k9fuqjBvcu4bYfLuDBWBh+MgoV/eMDDoMyZ4RIM0kETT8pxETPi6WmN9UKhJ+ncQTnpIUP2R1p3jZCMVOJ5igxYu2q1vmbtGwvn0JB7JRznbthOJoW8eQqHcqHU40K3nZAMFOKllJB/bHI9vuiTMU9M44o/MQkdk4tUbdsaDMUTXXNXeY6maChp5eTTNI5ClCQe6HThWN+3Rc/Bb6UtIV8SUH/NeEZ02zrhWOefdqognNKT5izzajgIbpz7gIkfzhhqs/TFk9J6b0w05+ZM+ZPl1wRay9kEUV4y+qXZGachyc8EEBKeMAnLCf8ACCCAzE5d8ZHMS64IIA7oy+HDqgggIEpYdUZJnpE84IICeScSJYwQQE8IIIID/9k=);background-size:cover;-webkit-transition:all .3s ease;transition:all .3s ease;cursor:pointer}.aplayer .aplayer-pic:hover .aplayer-button{opacity:1}.aplayer .aplayer-pic .aplayer-button{position:absolute;border-radius:50%;opacity:.8;text-shadow:0 1px 1px rgba(0,0,0,.2);-webkit-box-shadow:0 1px 1px rgba(0,0,0,.2);box-shadow:0 1px 1px rgba(0,0,0,.2);background:rgba(0,0,0,.2);-webkit-transition:all .1s ease;transition:all .1s ease}.aplayer .aplayer-pic .aplayer-button path{fill:#fff}.aplayer .aplayer-pic .aplayer-hide{display:none}.aplayer .aplayer-pic .aplayer-play{width:26px;height:26px;border:2px solid #fff;bottom:50%;right:50%;margin:0 -15px -15px 0}.aplayer .aplayer-pic .aplayer-play svg{position:absolute;top:3px;left:4px;height:20px;width:20px}.aplayer .aplayer-pic .aplayer-pause{width:16px;height:16px;border:2px solid #fff;bottom:4px;right:4px}.aplayer .aplayer-pic .aplayer-pause svg{position:absolute;top:2px;left:2px;height:12px;width:12px}.aplayer .aplayer-info{margin-left:66px;padding:14px 7px 0 10px;height:66px;-webkit-box-sizing:border-box;box-sizing:border-box}.aplayer .aplayer-info .aplayer-music{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0 0 13px 5px;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;cursor:default;padding-bottom:2px}.aplayer .aplayer-info .aplayer-music .aplayer-title{font-size:14px}.aplayer .aplayer-info .aplayer-music .aplayer-author{font-size:12px;color:#666}.aplayer .aplayer-info .aplayer-controller{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap{margin:0 0 0 5px;padding:4px 0;cursor:pointer!important;-webkit-box-flex:1;-ms-flex:1;flex:1}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap:hover .aplayer-bar .aplayer-played .aplayer-thumb{-webkit-transform:scale(1);transform:scale(1)}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar{position:relative;height:2px;width:100%;background:#cdcdcd}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-loaded{position:absolute;left:0;top:0;bottom:0;background:#aaa;height:2px;-webkit-transition:all .5s ease;transition:all .5s ease}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played{position:absolute;left:0;top:0;bottom:0;height:2px}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played .aplayer-thumb{position:absolute;top:0;right:5px;margin-top:-4px;margin-right:-10px;height:10px;width:10px;border-radius:50%;cursor:pointer;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;-webkit-transform:scale(0);transform:scale(0)}.aplayer .aplayer-info .aplayer-controller .aplayer-time{position:relative;right:0;bottom:4px;height:17px;color:#999;font-size:11px;padding-left:7px}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-time-inner{vertical-align:middle}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon{cursor:pointer;-webkit-transition:all .2s ease;transition:all .2s ease}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon path{fill:#666}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon.aplayer-icon-loop{margin-right:2px}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon:hover path{fill:#000}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon.aplayer-icon-menu,.aplayer .aplayer-info .aplayer-controller .aplayer-time.aplayer-time-narrow .aplayer-icon-menu,.aplayer .aplayer-info .aplayer-controller .aplayer-time.aplayer-time-narrow .aplayer-icon-mode{display:none}.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap{position:relative;display:inline-block;margin-left:3px;cursor:pointer!important}.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap:hover .aplayer-volume-bar-wrap{height:40px}.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap{position:absolute;bottom:15px;right:-3px;width:25px;height:0;z-index:99;overflow:hidden;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap.aplayer-volume-bar-wrap-active{height:40px}.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap .aplayer-volume-bar{position:absolute;bottom:0;right:10px;width:5px;height:35px;background:#aaa;border-radius:2.5px;overflow:hidden}.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap .aplayer-volume-bar .aplayer-volume{position:absolute;bottom:0;right:0;width:5px;-webkit-transition:all .1s ease;transition:all .1s ease}.aplayer .aplayer-info .aplayer-controller .aplayer-loading-icon{display:none}.aplayer .aplayer-info .aplayer-controller .aplayer-loading-icon svg{position:absolute;-webkit-animation:rotate 1s linear infinite;animation:rotate 1s linear infinite}.aplayer .aplayer-lrc{display:none;position:relative;height:30px;text-align:center;overflow:hidden;margin:-10px 0 7px}.aplayer .aplayer-lrc:before{top:0;height:10%;background:-webkit-gradient(linear,left top,left bottom,from(#fff),to(hsla(0,0%,100%,0)));background:linear-gradient(180deg,#fff 0,hsla(0,0%,100%,0));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffffff",endColorstr="#00ffffff",GradientType=0)}.aplayer .aplayer-lrc:after,.aplayer .aplayer-lrc:before{position:absolute;z-index:1;display:block;overflow:hidden;width:100%;content:" "}.aplayer .aplayer-lrc:after{bottom:0;height:33%;background:-webkit-gradient(linear,left top,left bottom,from(hsla(0,0%,100%,0)),to(hsla(0,0%,100%,.8)));background:linear-gradient(180deg,hsla(0,0%,100%,0) 0,hsla(0,0%,100%,.8));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#00ffffff",endColorstr="#ccffffff",GradientType=0)}.aplayer .aplayer-lrc p{font-size:12px;color:#666;line-height:16px!important;height:16px!important;padding:0!important;margin:0!important;-webkit-transition:all .5s ease-out;transition:all .5s ease-out;opacity:.4;overflow:hidden}.aplayer .aplayer-lrc p.aplayer-lrc-current{opacity:1;overflow:visible;height:auto!important}.aplayer .aplayer-lrc .aplayer-lrc-contents{width:100%;-webkit-transition:all .5s ease-out;transition:all .5s ease-out;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;cursor:default}.aplayer .aplayer-list{overflow:auto;-webkit-transition:all .5s ease;transition:all .5s ease;will-change:height;display:none}.aplayer .aplayer-list.aplayer-list-hide{height:0!important}.aplayer .aplayer-list::-webkit-scrollbar{width:5px}.aplayer .aplayer-list::-webkit-scrollbar-track{background-color:#f9f9f9}.aplayer .aplayer-list::-webkit-scrollbar-thumb{border-radius:3px;background-color:#eee}.aplayer .aplayer-list::-webkit-scrollbar-thumb:hover{background-color:#ccc}.aplayer .aplayer-list ol{list-style-type:none;margin:0;padding:0}.aplayer .aplayer-list ol li{position:relative;height:32px;line-height:32px;padding:0 15px;font-size:12px;border-top:1px solid #e9e9e9;cursor:pointer;-webkit-transition:all .2s ease;transition:all .2s ease;overflow:hidden;margin:0}.aplayer .aplayer-list ol li:first-child{border-top:none}.aplayer .aplayer-list ol li:hover{background:#efefef}.aplayer .aplayer-list ol li.aplayer-list-light{background:#e9e9e9}.aplayer .aplayer-list ol li.aplayer-list-light .aplayer-list-cur{display:inline-block}.aplayer .aplayer-list ol li .aplayer-list-cur{display:none;width:3px;height:22px;position:absolute;left:0;top:5px;cursor:pointer}.aplayer .aplayer-list ol li .aplayer-list-index{color:#666;margin-right:12px;cursor:pointer}.aplayer .aplayer-list ol li .aplayer-list-author{color:#666;float:right;cursor:pointer}@-webkit-keyframes aplayer-roll{0%{left:0}to{left:-100%}}@keyframes aplayer-roll{0%{left:0}to{left:-100%}}@-webkit-keyframes rotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes rotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}} +/*# sourceMappingURL=APlayer.min.css.map*/ diff --git a/assets/APlayer.min.css.map b/assets/APlayer.min.css.map new file mode 100644 index 0000000..0c057e5 --- /dev/null +++ b/assets/APlayer.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///./src/css/index.scss"],"names":[],"mappings":"AAAA,gBACE,UAAY,CACZ,8BACE,YAAc,CAElB,gCACE,UAAY,CAEd,sCACE,YACA,UAAY,CAEd,uCACE,iBACA,WAAa,CAEf,sCACE,aAAe,CAEjB,uCACE,kBAAwB,CAE1B,wCACE,+BAAiC,CAEnC,wCACE,aAAe,CAEjB,6CACE,wBAA2B,CAE7B,SACE,gBACA,uCACA,WACA,0EACQ,kEACR,kBACA,gBACA,yBACG,sBACC,qBACI,iBACR,kBAAqB,CACrB,WACE,+BACQ,sBAAwB,CAClC,aACE,WACA,WAAa,CACb,sCAEE,SAAW,CAGf,uIAEE,YAAc,CAChB,iFACE,aAAe,CACjB,yHACE,2BACQ,kBAAoB,CAC9B,uBACE,WACA,YACA,YACA,6BACA,aACA,eACA,WACA,sBACA,UACA,eACA,SACA,cAAgB,CAChB,4BACE,uCACA,8BAAgC,CACpC,8BACE,YAAc,CAChB,sBACE,kBACA,WACA,YACA,WACA,8tIACA,sBACA,gCACA,wBACA,cAAgB,CAChB,4CACE,SAAW,CACb,sCACE,kBACA,kBACA,WACA,qCACA,4CACQ,oCACR,0BACA,gCACA,uBAA0B,CAC1B,2CACE,SAAW,CACf,oCACE,YAAc,CAChB,oCACE,WACA,YACA,sBACA,WACA,UACA,sBAAwB,CACxB,wCACE,kBACA,QACA,SACA,YACA,UAAY,CAChB,qCACE,WACA,YACA,sBACA,WACA,SAAW,CACX,yCACE,kBACA,QACA,SACA,YACA,UAAY,CAClB,uBACE,iBACA,wBACA,YACA,8BACQ,qBAAuB,CAC/B,sCACE,gBACA,mBACA,uBACA,oBACA,yBACG,sBACC,qBACI,iBACR,eACA,kBAAoB,CACpB,qDACE,cAAgB,CAClB,sDACE,eACA,UAAY,CAChB,2CACE,kBACA,oBACA,oBACA,YAAc,CACd,6DACE,iBACA,cACA,yBACA,mBACI,WACI,MAAQ,CAChB,+GACE,2BACQ,kBAAoB,CAC9B,0EACE,kBACA,WACA,WACA,kBAAoB,CACpB,0FACE,kBACA,OACA,MACA,SACA,gBACA,WACA,gCACA,uBAA0B,CAC5B,0FACE,kBACA,OACA,MACA,SACA,UAAY,CACZ,yGACE,kBACA,MACA,UACA,gBACA,mBACA,YACA,WACA,kBACA,eACA,uCACA,+BACA,2BACQ,kBAAoB,CACpC,yDACE,kBACA,QACA,WACA,YACA,WACA,eACA,gBAAkB,CAClB,6EACE,qBAAuB,CACzB,uEACE,eACA,gCACA,uBAA0B,CAC1B,4EACE,SAAW,CACb,yFACE,gBAAkB,CACpB,kFACE,SAAW,CAKf,yRACE,YAAc,CAClB,gEACE,kBACA,qBACA,gBACA,wBAA2B,CAC3B,+FACE,WAAa,CACf,yFACE,kBACA,YACA,WACA,WACA,SACA,WACA,gBACA,uCACA,8BAAgC,CAChC,wHACE,WAAa,CACf,6GACE,kBACA,SACA,WACA,UACA,YACA,gBACA,oBACA,eAAiB,CACjB,6HACE,kBACA,SACA,QACA,UACA,gCACA,uBAA0B,CAClC,iEACE,YAAc,CACd,qEACE,kBACA,4CACQ,mCAAqC,CACrD,sBACE,aACA,kBACA,YACA,kBACA,gBACA,kBAAoB,CACpB,6BAEE,MAKA,WAEA,0FACA,4DACA,iHAAsH,CACxH,yDAXE,kBAEA,UACA,cACA,gBACA,WAEA,WAAa,CAe6G,4BAT1H,SAKA,WAEA,wGACA,0EACA,mHAAwH,CAC1H,wBACE,eACA,WACA,2BACA,sBACA,oBACA,mBACA,oCACA,4BACA,WACA,eAAiB,CACjB,4CACE,UACA,iBACA,qBAA2B,CAC/B,4CACE,WACA,oCACA,4BACA,yBACG,sBACC,qBACI,iBACR,cAAgB,CACpB,uBACE,cACA,gCACA,wBACA,mBACA,YAAc,CACd,yCACE,kBAAqB,CACvB,0CACE,SAAW,CACb,gDACE,wBAA0B,CAC5B,gDACE,kBACA,qBAAuB,CACzB,sDACE,qBAAuB,CACzB,0BACE,qBACA,SACA,SAAW,CACX,6BACE,kBACA,YACA,iBACA,eACA,eACA,6BACA,eACA,gCACA,wBACA,gBACA,QAAU,CACV,yCACE,eAAiB,CACnB,mCACE,kBAAoB,CACtB,gDACE,kBAAoB,CACpB,kEACE,oBAAsB,CAC1B,+CACE,aACA,UACA,YACA,kBACA,OACA,QACA,cAAgB,CAClB,iDACE,WACA,kBACA,cAAgB,CAClB,kDACE,WACA,YACA,cAAgB,CAE1B,gCACE,GACE,MAAQ,CACV,GACE,UAAY,CAAE,CAElB,wBACE,GACE,MAAQ,CACV,GACE,UAAY,CAAE,CAElB,0BACE,GACE,4BACQ,mBAAqB,CAC/B,GACE,gCACQ,uBAA0B,CAAE,CAExC,kBACE,GACE,4BACQ,mBAAqB,CAC/B,GACE,gCACQ,uBAA0B,CAAE","file":"APlayer.min.css","sourcesContent":[".aplayer-narrow {\n width: 66px; }\n .aplayer-narrow .aplayer-info {\n display: none; }\n\n.aplayer-withlrc.aplayer-narrow {\n width: 90px; }\n\n.aplayer-withlrc.aplayer .aplayer-pic {\n height: 90px;\n width: 90px; }\n\n.aplayer-withlrc.aplayer .aplayer-info {\n margin-left: 90px;\n height: 90px; }\n\n.aplayer-withlrc.aplayer .aplayer-lrc {\n display: block; }\n\n.aplayer-withlrc.aplayer .aplayer-info {\n padding: 10px 7px 0 7px; }\n\n.aplayer-withlist.aplayer .aplayer-info {\n border-bottom: 1px solid #e9e9e9; }\n\n.aplayer-withlist.aplayer .aplayer-list {\n display: block; }\n\n.aplayer-withlist.aplayer .aplayer-icon-menu {\n display: inline !important; }\n\n.aplayer {\n background: #fff;\n font-family: Arial, Helvetica, sans-serif;\n margin: 5px;\n -webkit-box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.07), 0 1px 5px 0 rgba(0, 0, 0, 0.1);\n box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.07), 0 1px 5px 0 rgba(0, 0, 0, 0.1);\n border-radius: 2px;\n overflow: hidden;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n line-height: initial; }\n .aplayer * {\n -webkit-box-sizing: content-box;\n box-sizing: content-box; }\n .aplayer svg {\n width: 100%;\n height: 100%; }\n .aplayer svg path,\n .aplayer svg circle {\n fill: #fff; }\n .aplayer.aplayer-mobile .aplayer-icon-volume-down {\n display: none; }\n .aplayer.aplayer-arrow .aplayer-icon-order,\n .aplayer.aplayer-arrow .aplayer-icon-loop {\n display: none; }\n .aplayer.aplayer-loading .aplayer-info .aplayer-controller .aplayer-loading-icon {\n display: block; }\n .aplayer.aplayer-loading .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played .aplayer-thumb {\n -webkit-transform: scale(1);\n transform: scale(1); }\n .aplayer .aplayer-icon {\n width: 15px;\n height: 15px;\n border: none;\n background-color: transparent;\n outline: none;\n cursor: pointer;\n opacity: .8;\n vertical-align: middle;\n padding: 0;\n font-size: 12px;\n margin: 0;\n display: inline; }\n .aplayer .aplayer-icon path {\n -webkit-transition: all .2s ease-in-out;\n transition: all .2s ease-in-out; }\n .aplayer .aplayer-lrc-content {\n display: none; }\n .aplayer .aplayer-pic {\n position: relative;\n float: left;\n height: 66px;\n width: 66px;\n background-image: url(data:image/jpeg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAAeAAD/4QMfaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjYtYzA2NyA3OS4xNTc3NDcsIDIwMTUvMDMvMzAtMjM6NDA6NDIgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjE2NjQ3NUZBM0Y4RDExRTY4NzJCRDdCNkZCQTQ0MjNBIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjE2NjQ3NUY5M0Y4RDExRTY4NzJCRDdCNkZCQTQ0MjNBIiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE1IE1hY2ludG9zaCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSI5OENEMEFFRjM0NTI1NjE0NEREQkU4RjkxRjAwNjM3NiIgc3RSZWY6ZG9jdW1lbnRJRD0iOThDRDBBRUYzNDUyNTYxNDREREJFOEY5MUYwMDYzNzYiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7/7gAOQWRvYmUAZMAAAAAB/9sAhAAQCwsLDAsQDAwQFw8NDxcbFBAQFBsfFxcXFxcfHhcaGhoaFx4eIyUnJSMeLy8zMy8vQEBAQEBAQEBAQEBAQEBAAREPDxETERUSEhUUERQRFBoUFhYUGiYaGhwaGiYwIx4eHh4jMCsuJycnLis1NTAwNTVAQD9AQEBAQEBAQEBAQED/wAARCABkAGQDASIAAhEBAxEB/8QAgwAAAgIDAQAAAAAAAAAAAAAAAAYBBQIDBAcBAQEBAAAAAAAAAAAAAAAAAAABAhAAAQIEBAEJBgMHBQAAAAAAAQIDABEEBSExEgZBUWFxgaGxIhMUkTJCUmIVI0MWwdHh8XKSsvCCojNzEQEBAQEBAQEBAAAAAAAAAAAAAREhMVFBYf/aAAwDAQACEQMRAD8AaJ8vCJEYTjIZxtlIicc40VFZS0idVS6lpP1HE9Aind3dSrWWbdTPVruXgSQn98Awd0SBC+mp3fVYtUjFGk5F5U1S6Me6Mvtu6ncXbo01zNtzl2CJovwZxML/ANl3DwvZn/5fxiPt+72sWbkw/Lg4jTP/AImGhhiYWlXXdlD4q23IqWh7zlOZ/wCGrujpt+7bTWKDTijSvEy0O4CfJqy9sNMXmWMTECRExjzxMUEEEEBxLcbbQXHVBCEialKMgBFBU7jqax/0dmbU64fzJYy+aZwSOcxT7kvdPXVJpU6jTU5IC0HBauKucDhF7tS3ejolVJK51UlJQrCSRkeuJqppdspcV593dNU8cS0kkNjpPvKi8ZaZp2w3TtpabGSUAJHZEgzjXUVdPStebUOBpE5AnieQDieiKjeYyELVVva3ML0IZddI44IHaZxtod52upcDbqV0ylGSVLkUTP1JyibDDBOJxzjTUF8UzqqdIVUBtRZByK9J09seb1lzuKawuIqngRLSorUDMZ6k8DPMSwhaSPTwSDFbd7Bb7s2rzkBupl4KlIksH6vmHTE2GucuNqp6p3/tIKXCOKknST1xYgZDlihPsNxrLTXItFevXTuLU02omZadQZFP9Jw9ohxjz2tfF03GhFKdQXV6kqHINCJ/2tTj0KYJiQow6oIJY5QRR5hYLM5cK9KHkFNO1JbxIImOCeuPREyAAAkAJARyW63s26n8hlSnATqUtZmonnlKOucokhQtxDTa3XTpbbSVrVyJSNRhFq6usvNyap0K0v1JA5mG1YhtPJJOKzxOENG5HS3Yq1ScyhKSOZS0pPZCts8+ZfQtWK/LcUOk/wA4X3FhwoLJbKBgMtMIWZeN1xKVqWecqB9kJm7aKlo7wpulQGm3G0OKbT7qVKmDIcAZTh/LiW0KW4oJQgFS1HAAJEyTHnb6ndxX5XlAgVCwlH0MoEpnoSJwpD5ZFrXZ6JThOtTKJk9GHZCxvZmn9YHkJSh1KGw6QAC4p0uEauUhKIcmW0NNIaQJIbSEp5kpEhHntyqV3q7hlkzFQ/4T9ODSPYhM+uFI7rbZ9zU1EzXWuoGl5Ic9Pq0nH6XPAZ9MY1+6r2hh+3VjKGKojQtwApWlKhjhMjEcYZrzcW7JavMaA1pAZpUn5pSB6EgThT2xaTeLi5U1ZLjLJ8x4qzccUZhJ7zE/g6dlrtNO+t+pfSisUNDKF+EJScyFHCZh5BEpgzB4xR3TaVqr0lTKBR1BEw42JIJ+tvL2ShaZuN62xWejqZuMiRLKjqQtB+JpXD/U4vh69BxnKCK/73Qfa/uus+m0z+rVl5cvmnhBFRsHLyxIkrolGIMhKJSchAcl4pzVWmsYAmtbSijnUjxp7UwibdrEUd4pnlnS2olCycgFjTjHo4VHm9/paeku1QxTKCmtWrSPyyrFTf8AtiX6sW+5dwmtV9st5K2SoJdWnEuqnghP0z9sXe2rCLXTl18A1rwGvj5afkH7YoNov2aneW7WLCK2cmVOYISn6Tlq6Yaau+2mkaLjlU2ogYNtkLWo8JBMJ9GndFzFBanEpMqipmy1ygKHjV1J74odkW4u1blwWPw6ceW0eVxYx9ie+K+oeuG57sA0iXwtozSy1P3lHvh+t1AzbqNqkY9xsYq4qUcVKPSYe0/C9vxp9VPRvAEstqWlZGSVLCdM+mRjn2Xd6KkS9R1K0sqcUFtuKwSrCRSTDg42262pp1CXGljStChqSoHlBigqdk2h5RUyt2mn8CSFo6tePbDO6Ll67W1hOtyrZSn+sHsGMJW6r3S3Z9hukQS3T6gHSJFZXLBIzlhFs3sO3pV+JVPLHIEoR2+KLm32C024hdMwPNGTrh1r6irLqh2pwvfp+4fpPydJ9T5vqfT/ABaJadMvmljKCHLjxnBDDXDPGXGJmTkcogETMshjyxlPhFGqqfVT0b9QMSy2twDnSkkdsJtoomK7cC2KoB1plKtSVfmKT4ST0qUVQ7KbQ62th3xNuJUhY46VDSewwhvqrdvXsPrTqUMZ/C82fCVJP1dhiVYvKjY9vcVqpqhxgH8tQDgHQZpMRT7EokkF+qccHyISlufX4oubddKG5shymWCvNbRwWk84jtBMgeSGRNaKOgo7eyWaNoNIPvEYqUfqUcTHVOMRIxOKscooyBxg5eSIM5T48IkY/vgJOPVBOXOIBM80aKqspaNvzap1LaRlM4noGZgOjVBC5+sqX1ejyj6aUp6vxf6tGUuac4ImwxbAkKlEzBywjHGUgermiRPLhFGYJ48Y01tDSXBg09Y2HG5+E5KSZZoUMo2AgZRkDiBLDiIBQq9n3ClcL9pf80JxSkny3k9fuqjBvcu4bYfLuDBWBh+MgoV/eMDDoMyZ4RIM0kETT8pxETPi6WmN9UKhJ+ncQTnpIUP2R1p3jZCMVOJ5igxYu2q1vmbtGwvn0JB7JRznbthOJoW8eQqHcqHU40K3nZAMFOKllJB/bHI9vuiTMU9M44o/MQkdk4tUbdsaDMUTXXNXeY6maChp5eTTNI5ClCQe6HThWN+3Rc/Bb6UtIV8SUH/NeEZ02zrhWOefdqognNKT5izzajgIbpz7gIkfzhhqs/TFk9J6b0w05+ZM+ZPl1wRay9kEUV4y+qXZGachyc8EEBKeMAnLCf8ACCCAzE5d8ZHMS64IIA7oy+HDqgggIEpYdUZJnpE84IICeScSJYwQQE8IIIID/9k=);\n background-size: cover;\n -webkit-transition: all 0.3s ease;\n transition: all 0.3s ease;\n cursor: pointer; }\n .aplayer .aplayer-pic:hover .aplayer-button {\n opacity: 1; }\n .aplayer .aplayer-pic .aplayer-button {\n position: absolute;\n border-radius: 50%;\n opacity: 0.8;\n text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);\n -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);\n box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);\n background: rgba(0, 0, 0, 0.2);\n -webkit-transition: all 0.1s ease;\n transition: all 0.1s ease; }\n .aplayer .aplayer-pic .aplayer-button path {\n fill: #fff; }\n .aplayer .aplayer-pic .aplayer-hide {\n display: none; }\n .aplayer .aplayer-pic .aplayer-play {\n width: 26px;\n height: 26px;\n border: 2px solid #fff;\n bottom: 50%;\n right: 50%;\n margin: 0 -15px -15px 0; }\n .aplayer .aplayer-pic .aplayer-play svg {\n position: absolute;\n top: 3px;\n left: 4px;\n height: 20px;\n width: 20px; }\n .aplayer .aplayer-pic .aplayer-pause {\n width: 16px;\n height: 16px;\n border: 2px solid #fff;\n bottom: 4px;\n right: 4px; }\n .aplayer .aplayer-pic .aplayer-pause svg {\n position: absolute;\n top: 2px;\n left: 2px;\n height: 12px;\n width: 12px; }\n .aplayer .aplayer-info {\n margin-left: 66px;\n padding: 14px 7px 0 10px;\n height: 66px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box; }\n .aplayer .aplayer-info .aplayer-music {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n margin: 0 0 13px 5px;\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n user-select: text;\n cursor: default;\n padding-bottom: 2px; }\n .aplayer .aplayer-info .aplayer-music .aplayer-title {\n font-size: 14px; }\n .aplayer .aplayer-info .aplayer-music .aplayer-author {\n font-size: 12px;\n color: #666; }\n .aplayer .aplayer-info .aplayer-controller {\n position: relative;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap {\n margin: 0 0 0 5px;\n padding: 4px 0;\n cursor: pointer !important;\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap:hover .aplayer-bar .aplayer-played .aplayer-thumb {\n -webkit-transform: scale(1);\n transform: scale(1); }\n .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar {\n position: relative;\n height: 2px;\n width: 100%;\n background: #cdcdcd; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-loaded {\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n background: #aaa;\n height: 2px;\n -webkit-transition: all 0.5s ease;\n transition: all 0.5s ease; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played {\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n height: 2px; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played .aplayer-thumb {\n position: absolute;\n top: 0;\n right: 5px;\n margin-top: -4px;\n margin-right: -10px;\n height: 10px;\n width: 10px;\n border-radius: 50%;\n cursor: pointer;\n -webkit-transition: all .3s ease-in-out;\n transition: all .3s ease-in-out;\n -webkit-transform: scale(0);\n transform: scale(0); }\n .aplayer .aplayer-info .aplayer-controller .aplayer-time {\n position: relative;\n right: 0;\n bottom: 4px;\n height: 17px;\n color: #999;\n font-size: 11px;\n padding-left: 7px; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-time-inner {\n vertical-align: middle; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon {\n cursor: pointer;\n -webkit-transition: all 0.2s ease;\n transition: all 0.2s ease; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon path {\n fill: #666; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon.aplayer-icon-loop {\n margin-right: 2px; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon:hover path {\n fill: #000; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon.aplayer-icon-menu {\n display: none; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-time.aplayer-time-narrow .aplayer-icon-mode {\n display: none; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-time.aplayer-time-narrow .aplayer-icon-menu {\n display: none; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap {\n position: relative;\n display: inline-block;\n margin-left: 3px;\n cursor: pointer !important; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap:hover .aplayer-volume-bar-wrap {\n height: 40px; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap {\n position: absolute;\n bottom: 15px;\n right: -3px;\n width: 25px;\n height: 0;\n z-index: 99;\n overflow: hidden;\n -webkit-transition: all .2s ease-in-out;\n transition: all .2s ease-in-out; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap.aplayer-volume-bar-wrap-active {\n height: 40px; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap .aplayer-volume-bar {\n position: absolute;\n bottom: 0;\n right: 10px;\n width: 5px;\n height: 35px;\n background: #aaa;\n border-radius: 2.5px;\n overflow: hidden; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap .aplayer-volume-bar .aplayer-volume {\n position: absolute;\n bottom: 0;\n right: 0;\n width: 5px;\n -webkit-transition: all 0.1s ease;\n transition: all 0.1s ease; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-loading-icon {\n display: none; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-loading-icon svg {\n position: absolute;\n -webkit-animation: rotate 1s linear infinite;\n animation: rotate 1s linear infinite; }\n .aplayer .aplayer-lrc {\n display: none;\n position: relative;\n height: 30px;\n text-align: center;\n overflow: hidden;\n margin: -10px 0 7px; }\n .aplayer .aplayer-lrc:before {\n position: absolute;\n top: 0;\n z-index: 1;\n display: block;\n overflow: hidden;\n width: 100%;\n height: 10%;\n content: ' ';\n background: -webkit-gradient(linear, left top, left bottom, from(white), to(rgba(255, 255, 255, 0)));\n background: linear-gradient(to bottom, white 0%, rgba(255, 255, 255, 0) 100%);\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#00ffffff',GradientType=0 ); }\n .aplayer .aplayer-lrc:after {\n position: absolute;\n bottom: 0;\n z-index: 1;\n display: block;\n overflow: hidden;\n width: 100%;\n height: 33%;\n content: ' ';\n background: -webkit-gradient(linear, left top, left bottom, from(rgba(255, 255, 255, 0)), to(rgba(255, 255, 255, 0.8)));\n background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.8) 100%);\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00ffffff', endColorstr='#ccffffff',GradientType=0 ); }\n .aplayer .aplayer-lrc p {\n font-size: 12px;\n color: #666;\n line-height: 16px !important;\n height: 16px !important;\n padding: 0 !important;\n margin: 0 !important;\n -webkit-transition: all 0.5s ease-out;\n transition: all 0.5s ease-out;\n opacity: 0.4;\n overflow: hidden; }\n .aplayer .aplayer-lrc p.aplayer-lrc-current {\n opacity: 1;\n overflow: visible;\n height: initial !important; }\n .aplayer .aplayer-lrc .aplayer-lrc-contents {\n width: 100%;\n -webkit-transition: all 0.5s ease-out;\n transition: all 0.5s ease-out;\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n user-select: text;\n cursor: default; }\n .aplayer .aplayer-list {\n overflow: auto;\n -webkit-transition: all 0.5s ease;\n transition: all 0.5s ease;\n will-change: height;\n display: none; }\n .aplayer .aplayer-list.aplayer-list-hide {\n height: 0 !important; }\n .aplayer .aplayer-list::-webkit-scrollbar {\n width: 5px; }\n .aplayer .aplayer-list::-webkit-scrollbar-track {\n background-color: #f9f9f9; }\n .aplayer .aplayer-list::-webkit-scrollbar-thumb {\n border-radius: 3px;\n background-color: #eee; }\n .aplayer .aplayer-list::-webkit-scrollbar-thumb:hover {\n background-color: #ccc; }\n .aplayer .aplayer-list ol {\n list-style-type: none;\n margin: 0;\n padding: 0; }\n .aplayer .aplayer-list ol li {\n position: relative;\n height: 32px;\n line-height: 32px;\n padding: 0 15px;\n font-size: 12px;\n border-top: 1px solid #e9e9e9;\n cursor: pointer;\n -webkit-transition: all 0.2s ease;\n transition: all 0.2s ease;\n overflow: hidden;\n margin: 0; }\n .aplayer .aplayer-list ol li:first-child {\n border-top: none; }\n .aplayer .aplayer-list ol li:hover {\n background: #efefef; }\n .aplayer .aplayer-list ol li.aplayer-list-light {\n background: #e9e9e9; }\n .aplayer .aplayer-list ol li.aplayer-list-light .aplayer-list-cur {\n display: inline-block; }\n .aplayer .aplayer-list ol li .aplayer-list-cur {\n display: none;\n width: 3px;\n height: 22px;\n position: absolute;\n left: 0;\n top: 5px;\n cursor: pointer; }\n .aplayer .aplayer-list ol li .aplayer-list-index {\n color: #666;\n margin-right: 12px;\n cursor: pointer; }\n .aplayer .aplayer-list ol li .aplayer-list-author {\n color: #666;\n float: right;\n cursor: pointer; }\n\n@-webkit-keyframes aplayer-roll {\n 0% {\n left: 0; }\n 100% {\n left: -100%; } }\n\n@keyframes aplayer-roll {\n 0% {\n left: 0; }\n 100% {\n left: -100%; } }\n\n@-webkit-keyframes rotate {\n 0% {\n -webkit-transform: rotate(0);\n transform: rotate(0); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n@keyframes rotate {\n 0% {\n -webkit-transform: rotate(0);\n transform: rotate(0); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n\n\n// WEBPACK FOOTER //\n// ./src/css/index.scss"],"sourceRoot":""} diff --git a/assets/APlayer.min.js b/assets/APlayer.min.js index a64f448..1e3f5a0 100644 --- a/assets/APlayer.min.js +++ b/assets/APlayer.min.js @@ -1 +1,2 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("APlayer",[],t):"object"==typeof exports?exports.APlayer=t():e.APlayer=t()}(this,function(){return function(e){function t(n){if(a[n])return a[n].exports;var r=a[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var a={};return t.m=e,t.c=a,t.i=function(e){return e},t.d=function(e,a,n){t.o(e,a)||Object.defineProperty(e,a,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(a,"a",a),a},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=1)}([function(e,t,a){var n=a(2);"string"==typeof n&&(n=[[e.i,n,""]]);var r={};r.transform=void 0;a(4)(n,r);n.locals&&(e.exports=n.locals)},function(e,t,a){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,a=Array(e.length);t\n \n \n \n '},this.isMobile=/mobile/i.test(window.navigator.userAgent),this.isMobile&&(t.autoplay=!1);var s={element:document.getElementsByClassName("aplayer")[0],narrow:!1,autoplay:!1,mutex:!0,showlrc:0,theme:"#b7daff",mode:"circulation"};for(var p in s)s.hasOwnProperty(p)&&!t.hasOwnProperty(p)&&(t[p]=s[p]);if(this.option=t,this.audios=[],this.mode=t.mode,this.secondToTime=function(e){if(isNaN(e))return"00:00";var t=function(e){return e<10?"0"+e:""+e},a=parseInt(e/60),n=parseInt(e-60*a),r=parseInt(a/60),i=parseInt(e/60-60*parseInt(e/60/60));return e>=3600?t(r)+":"+t(i)+":"+t(n):t(a)+":"+t(n)},this.element=this.option.element,2===this.option.showlrc||!0===this.option.showlrc){this.savelrc=[];for(var c=0;c0?t:0,t=t<1?t:1,m[e+"Bar"].style[a]=100*t+"%"},this.updateLrc=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.audio.currentTime;if(i.lrcIndex>i.lrc.length-1||e=i.lrc[i.lrcIndex+1][0])for(var t=0;t=i.lrc[t][0]&&(!i.lrc[t+1]||e1&&this.element.classList.add("aplayer-withlist"),this.multiple||"circulation"===this.mode||"order"===this.mode||(this.mode="circulation"),this.getRandomOrder();for(var y='\n
\n
\n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n \n - 00:00 / 00:00\n \n
\n \n
\n
\n
\n
\n
\n
\n \n \n
\n
\n
\n
\n
    ",h=0;h\n \n '+(h+1)+'\n '+this.option.music[h].title+'\n '+this.option.music[h].author+"\n ";y+="\n
\n
",this.element.innerHTML=y,this.element.offsetWidth<300&&(this.element.getElementsByClassName("aplayer-icon-mode")[0].style.display="none"),this.ptime=this.element.getElementsByClassName("aplayer-ptime")[0],this.element.getElementsByClassName("aplayer-info")[0].offsetWidth<200&&this.element.getElementsByClassName("aplayer-time")[0].classList.add("aplayer-time-narrow");var m={};m.barWrap=this.element.getElementsByClassName("aplayer-bar-wrap")[0],this.option.narrow&&this.element.classList.add("aplayer-narrow"),this.button=this.element.getElementsByClassName("aplayer-button")[0],this.button.addEventListener("click",function(e){i.toggle()});var f=this.element.getElementsByClassName("aplayer-list")[0];f.addEventListener("click",function(e){var t=void 0;t="LI"===e.target.tagName.toUpperCase()?e.target:e.target.parentElement;var a=parseInt(t.getElementsByClassName("aplayer-list-index")[0].innerHTML)-1;a!==i.playIndex?(i.setMusic(a),i.play()):i.toggle()}),m.playedBar=this.element.getElementsByClassName("aplayer-played")[0],m.loadedBar=this.element.getElementsByClassName("aplayer-loaded")[0];var v=this.element.getElementsByClassName("aplayer-thumb")[0],g=void 0;m.barWrap.addEventListener("click",function(e){var t=e||window.event;g=m.barWrap.clientWidth;var n=(t.clientX-a(m.barWrap))/g;isNaN(i.audio.duration)?i.updateBar("played",0,"width"):(i.updateBar("played",n,"width"),i.element.getElementsByClassName("aplayer-ptime")[0].innerHTML=i.secondToTime(n*i.audio.duration),i.audio.currentTime=parseFloat(m.playedBar.style.width)/100*i.audio.duration)}),v.addEventListener("mouseover",function(){v.style.background=i.option.theme}),v.addEventListener("mouseout",function(){v.style.background="#fff"});var b=function(e){var t=e||window.event,n=(t.clientX-a(m.barWrap))/g;n=n>0?n:0,n=n<1?n:1,i.updateBar("played",n,"width"),i.option.showlrc&&i.updateLrc(parseFloat(m.playedBar.style.width)/100*i.audio.duration),i.element.getElementsByClassName("aplayer-ptime")[0].innerHTML=i.secondToTime(n*i.audio.duration)},x=function e(){document.removeEventListener("mouseup",e),document.removeEventListener("mousemove",b),isNaN(i.audio.duration)?i.updateBar("played",0,"width"):(i.audio.currentTime=parseFloat(m.playedBar.style.width)/100*i.audio.duration,i.playedTime=setInterval(function(){i.updateBar("played",i.audio.currentTime/i.audio.duration,"width"),i.option.showlrc&&i.updateLrc(),i.element.getElementsByClassName("aplayer-ptime")[0].innerHTML=i.secondToTime(i.audio.currentTime),i.trigger("playing")},100))};v.addEventListener("mousedown",function(){g=m.barWrap.clientWidth,clearInterval(i.playedTime),document.addEventListener("mousemove",b),document.addEventListener("mouseup",x)}),m.volumeBar=this.element.getElementsByClassName("aplayer-volume")[0];var w=this.element.getElementsByClassName("aplayer-volume-bar")[0];this.volumeicon=this.element.getElementsByClassName("aplayer-time")[0].getElementsByTagName("button")[0];this.element.getElementsByClassName("aplayer-volume-bar-wrap")[0].addEventListener("click",function(e){var t=e||window.event,a=(35-t.clientY+n(w))/35;a=a>0?a:0,a=a<1?a:1,i.volume(a)}),this.volumeicon.addEventListener("click",function(){i.audio.muted?(i.audio.muted=!1,i.volumeicon.className=1===i.audio.volume?"aplayer-icon aplayer-icon-volume-up":"aplayer-icon aplayer-icon-volume-down",1===i.audio.volume?(i.volumeicon.className="aplayer-icon aplayer-icon-volume-up",i.volumeicon.innerHTML=i.getSVG("volume-up")):(i.volumeicon.className="aplayer-icon aplayer-icon-volume-down",i.volumeicon.innerHTML=i.getSVG("volume-down")),i.updateBar("volume",i.audio.volume,"height")):(i.audio.muted=!0,i.volumeicon.className="aplayer-icon aplayer-icon-volume-off",i.volumeicon.innerHTML=i.getSVG("volume-off"),i.updateBar("volume",0,"height"))});var A=this.element.getElementsByClassName("aplayer-icon-mode")[0];A.addEventListener("click",function(){i.multiple?"random"===i.mode?i.mode="single":"single"===i.mode?i.mode="order":"order"===i.mode?i.mode="circulation":"circulation"===i.mode&&(i.mode="random"):"circulation"===i.mode?i.mode="order":i.mode="circulation",A.innerHTML=i.getSVG(i.mode),i.audio.loop=!(i.multiple||"order"===i.mode)}),f.style.height=f.offsetHeight+"px",this.element.getElementsByClassName("aplayer-icon-menu")[0].addEventListener("click",function(){f.classList.contains("aplayer-list-hide")?f.classList.remove("aplayer-list-hide"):f.classList.add("aplayer-list-hide")}),"random"===this.mode?this.setMusic(this.randomOrder[0]):this.setMusic(0),l.push(this)}return i(e,[{key:"setMusic",value:function(e){var t=this;void 0!==e&&(this.playIndex=e);var a=this.playIndex;this.music=this.option.music[a],this.music.pic&&(this.element.getElementsByClassName("aplayer-pic")[0].style.backgroundImage="url('"+this.music.pic+"')"),this.element.getElementsByClassName("aplayer-title")[0].innerHTML=this.music.title,this.element.getElementsByClassName("aplayer-author")[0].innerHTML=" - "+this.music.author,this.element.getElementsByClassName("aplayer-list-light")[0]&&this.element.getElementsByClassName("aplayer-list-light")[0].classList.remove("aplayer-list-light"),this.element.getElementsByClassName("aplayer-list")[0].getElementsByTagName("li")[a].classList.add("aplayer-list-light"),!this.isMobile&&this.audio&&(this.pause(),this.audio.currentTime=0),this.element.getElementsByClassName("aplayer-list")[0].scrollTop=33*a,this.isMobile&&this.audio?(this.audio.src=this.music.url,this.play()):!this.isMobile&&this.audios[a]?(this.audio=this.audios[a],this.audio.volume=parseInt(this.element.getElementsByClassName("aplayer-volume")[0].style.height)/100,this.audio.currentTime=0):(this.audio=document.createElement("audio"),this.audio.src=this.music.url,this.audio.preload=this.option.preload?this.option.preload:"auto",this.audio.addEventListener("play",function(){if(t.button.classList.contains("aplayer-play")){if(t.button.classList.remove("aplayer-play"),t.button.classList.add("aplayer-pause"),t.button.innerHTML="",setTimeout(function(){t.button.innerHTML='\n "},100),t.option.mutex)for(var e=0;e'+t.getSVG("play")+" "},100),clearInterval(t.playedTime),t.trigger("pause"))}),this.audio.addEventListener("durationchange",function(){1!==t.audio.duration&&(t.element.getElementsByClassName("aplayer-dtime")[0].innerHTML=t.secondToTime(t.audio.duration))}),this.audio.addEventListener("progress",function(){var e=t.audio.buffered.length?t.audio.buffered.end(t.audio.buffered.length-1)/t.audio.duration:0;t.updateBar("loaded",e,"width")}),this.audio.addEventListener("error",function(){t.element.getElementsByClassName("aplayer-author")[0].innerHTML=" - Error happens ╥﹏╥",t.trigger("pause")}),this.audio.addEventListener("canplay",function(){t.trigger("canplay")}),this.ended=!1,this.audio.addEventListener("ended",function(){t.multiple?0!==t.audio.currentTime&&("random"===t.mode?t.setMusic(t.nextRandomNum()):"single"===t.mode?t.setMusic(t.playIndex):"order"===t.mode?t.playIndex=200&&o.status<300||304===o.status?(i=o.responseText,t.lrcs[r]=n(i)):(console.log("Request was unsuccessful: "+o.status),t.lrcs[r]=[["00:00","Not available"]]),t.lrc=t.lrcs[r];var e="";t.lrcContents=t.element.getElementsByClassName("aplayer-lrc-contents")[0];for(var a=0;a"+t.lrc[a][1]+"

";t.lrcContents.innerHTML=e,t.lrcIndex||(t.lrcIndex=0),t.lrcContents.getElementsByTagName("p")[0].classList.add("aplayer-lrc-current"),t.lrcContents.style.transform="translateY(0px)",t.lrcContents.style.webkitTransform="translateY(0px)"}};var s=void 0;s=this.option.music[r].lrc,o.open("get",s,!0),o.send(null)}i?this.lrcs[r]=n(i):3===this.option.showlrc?this.lrcs[r]=[["00:00","Loading"]]:this.lrcs[r]=[["00:00","Not available"]]}this.lrc=this.lrcs[r];var p="";this.lrcContents=this.element.getElementsByClassName("aplayer-lrc-contents")[0];for(var c=0;c"+this.lrc[c][1]+"

";this.lrcContents.innerHTML=p,this.lrcIndex||(this.lrcIndex=0),this.lrcContents.getElementsByTagName("p")[0].classList.add("aplayer-lrc-current"),this.lrcContents.style.transform="translateY(0px)",this.lrcContents.style.webkitTransform="translateY(0px)"}1!==this.audio.duration&&(this.element.getElementsByClassName("aplayer-dtime")[0].innerHTML=this.audio.duration?this.secondToTime(this.audio.duration):"00:00"),this.option.autoplay&&!this.isMobile&&this.play(),this.option.autoplay=!0}},{key:"play",value:function(e){"[object Number]"===Object.prototype.toString.call(e)&&(this.audio.currentTime=e),this.audio.paused&&this.audio.play()}},{key:"pause",value:function(){this.audio.paused||this.audio.pause()}},{key:"volume",value:function(e){this.updateBar("volume",e,"height"),this.audio.volume=e,this.audio.muted&&(this.audio.muted=!1),1===e?(this.volumeicon.className="aplayer-icon aplayer-icon-volume-up",this.volumeicon.innerHTML=this.getSVG("volume-up")):(this.volumeicon.className="aplayer-icon aplayer-icon-volume-down",this.volumeicon.innerHTML=this.getSVG("volume-down"))}},{key:"on",value:function(e,t){"function"==typeof t&&this.event[e].push(t)}},{key:"toggle",value:function(){this.button.classList.contains("aplayer-play")?this.play():this.button.classList.contains("aplayer-pause")&&this.pause()}},{key:"getRandomOrder",value:function(){function e(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))}this.multiple&&(this.randomOrder=function(t){for(var a,n=t.length,r=new Array(n),i=0;i\n \n '+(this.option.music.length-e.length+r+1)+'\n '+e[r].title+'\n '+e[r].author+"\n ";a.innerHTML+=n,this.multiple||(this.multiple=!0,this.element.classList.add("aplayer-withlist"),this.audio.loop=!1),t.style.height="auto",t.style.height=t.offsetHeight+"px",this.getRandomOrder()}}]),e}();e.exports=o},function(e,t,a){t=e.exports=a(3)(void 0),t.push([e.i,".aplayer-narrow {\n width: 66px; }\n .aplayer-narrow .aplayer-info {\n display: none; }\n\n.aplayer-withlrc.aplayer-narrow {\n width: 90px; }\n\n.aplayer-withlrc.aplayer .aplayer-pic {\n height: 90px;\n width: 90px; }\n\n.aplayer-withlrc.aplayer .aplayer-info {\n margin-left: 90px;\n height: 90px; }\n\n.aplayer-withlrc.aplayer .aplayer-lrc {\n display: block; }\n\n.aplayer-withlrc.aplayer .aplayer-info {\n padding: 10px 7px 0 7px; }\n\n.aplayer-withlist.aplayer .aplayer-info {\n border-bottom: 1px solid #e9e9e9; }\n\n.aplayer-withlist.aplayer .aplayer-list {\n display: block; }\n\n.aplayer-withlist.aplayer .aplayer-icon-menu {\n display: inline !important; }\n\n.aplayer {\n font-family: Arial, Helvetica, sans-serif;\n margin: 5px;\n -webkit-box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12);\n box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12);\n border-radius: 2px;\n overflow: hidden;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n line-height: initial; }\n .aplayer * {\n -webkit-box-sizing: content-box;\n box-sizing: content-box; }\n .aplayer .aplayer-icon {\n width: 15px;\n height: 15px;\n border: none;\n background-color: transparent;\n outline: none;\n cursor: pointer;\n opacity: .8;\n vertical-align: middle;\n padding: 0;\n font-size: 12px;\n margin: 0;\n display: inline; }\n .aplayer .aplayer-icon .aplayer-fill {\n -webkit-transition: all .2s ease-in-out;\n transition: all .2s ease-in-out; }\n .aplayer .aplayer-lrc-content {\n display: none; }\n .aplayer .aplayer-pic {\n position: relative;\n float: left;\n height: 66px;\n width: 66px;\n background-image: url("+a(6)+");\n background-size: 100%;\n -webkit-transition: all 0.3s ease;\n transition: all 0.3s ease; }\n .aplayer .aplayer-pic .aplayer-button {\n position: absolute;\n border-radius: 50%;\n opacity: 0.8;\n cursor: pointer;\n text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);\n -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);\n box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);\n background: rgba(0, 0, 0, 0.2);\n -webkit-transition: all 0.1s ease;\n transition: all 0.1s ease; }\n .aplayer .aplayer-pic .aplayer-button:hover {\n opacity: 1; }\n .aplayer .aplayer-pic .aplayer-button .aplayer-fill {\n fill: #fff; }\n .aplayer .aplayer-pic .aplayer-hide {\n display: none; }\n .aplayer .aplayer-pic .aplayer-play {\n width: 26px;\n height: 26px;\n border: 2px solid #fff;\n bottom: 50%;\n right: 50%;\n margin: 0 -15px -15px 0; }\n .aplayer .aplayer-pic .aplayer-play .aplayer-icon-play {\n position: absolute;\n top: 3px;\n left: 4px;\n height: 20px;\n width: 20px; }\n .aplayer .aplayer-pic .aplayer-pause {\n width: 16px;\n height: 16px;\n border: 2px solid #fff;\n bottom: 4px;\n right: 4px; }\n .aplayer .aplayer-pic .aplayer-pause .aplayer-icon-pause {\n position: absolute;\n top: 2px;\n left: 2px;\n height: 12px;\n width: 12px; }\n .aplayer .aplayer-info {\n margin-left: 66px;\n padding: 14px 7px 0 10px;\n height: 66px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box; }\n .aplayer .aplayer-info .aplayer-music {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n margin: 0 0 13px 5px;\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n user-select: text;\n cursor: default;\n padding-bottom: 2px; }\n .aplayer .aplayer-info .aplayer-music .aplayer-title {\n font-size: 14px; }\n .aplayer .aplayer-info .aplayer-music .aplayer-author {\n font-size: 12px;\n color: #666; }\n .aplayer .aplayer-info .aplayer-controller {\n position: relative;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap {\n margin: 0 0 0 5px;\n padding: 4px 0;\n cursor: pointer !important;\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar {\n position: relative;\n height: 2px;\n width: 100%;\n background: #cdcdcd; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-loaded {\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n background: #aaa;\n height: 2px;\n -webkit-transition: all 0.5s ease;\n transition: all 0.5s ease; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played {\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n height: 2px; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played .aplayer-thumb {\n position: absolute;\n top: 0;\n right: 5px;\n margin-top: -4px;\n margin-right: -10px;\n height: 8px;\n width: 8px;\n border-radius: 50%;\n background: #fff;\n cursor: pointer !important; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-time {\n position: relative;\n right: 0;\n bottom: 3px;\n height: 17px;\n color: #999;\n font-size: 11px;\n padding-left: 7px; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-time-inner {\n vertical-align: middle; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon {\n cursor: pointer;\n -webkit-transition: all 0.2s ease;\n transition: all 0.2s ease; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon .aplayer-fill {\n fill: #666; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon.aplayer-icon-mode {\n margin-right: 4px; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon:hover .aplayer-fill {\n fill: #000; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon.aplayer-icon-menu {\n display: none; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-time.aplayer-time-narrow .aplayer-icon-mode {\n display: none; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-time.aplayer-time-narrow .aplayer-icon-menu {\n display: none; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap {\n position: relative;\n display: inline-block;\n margin-left: 3px;\n cursor: pointer !important; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap:hover .aplayer-volume-bar-wrap {\n display: block; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap {\n display: none;\n position: absolute;\n bottom: 15px;\n right: -3px;\n width: 25px;\n height: 40px;\n z-index: 99; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap .aplayer-volume-bar {\n position: absolute;\n bottom: 0;\n right: 10px;\n width: 5px;\n height: 35px;\n background: #aaa; }\n .aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap .aplayer-volume-bar .aplayer-volume {\n position: absolute;\n bottom: 0;\n right: 0;\n width: 5px;\n -webkit-transition: all 0.1s ease;\n transition: all 0.1s ease; }\n .aplayer .aplayer-lrc {\n display: none;\n position: relative;\n height: 30px;\n text-align: center;\n overflow: hidden;\n margin: -10px 0 7px; }\n .aplayer .aplayer-lrc:before {\n position: absolute;\n top: 0;\n z-index: 1;\n display: block;\n overflow: hidden;\n width: 100%;\n height: 10%;\n content: ' ';\n background: -webkit-gradient(linear, left top, left bottom, from(white), to(rgba(255, 255, 255, 0)));\n background: linear-gradient(to bottom, white 0%, rgba(255, 255, 255, 0) 100%);\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#00ffffff',GradientType=0 ); }\n .aplayer .aplayer-lrc:after {\n position: absolute;\n bottom: 0;\n z-index: 1;\n display: block;\n overflow: hidden;\n width: 100%;\n height: 33%;\n content: ' ';\n background: -webkit-gradient(linear, left top, left bottom, from(rgba(255, 255, 255, 0)), to(rgba(255, 255, 255, 0.8)));\n background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.8) 100%);\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00ffffff', endColorstr='#ccffffff',GradientType=0 ); }\n .aplayer .aplayer-lrc p {\n font-size: 12px;\n color: #666;\n line-height: 16px !important;\n height: 16px !important;\n padding: 0 !important;\n margin: 0 !important;\n -webkit-transition: all 0.5s ease-out;\n transition: all 0.5s ease-out;\n opacity: 0.4;\n overflow: hidden; }\n .aplayer .aplayer-lrc p.aplayer-lrc-current {\n opacity: 1;\n overflow: visible;\n height: initial !important; }\n .aplayer .aplayer-lrc .aplayer-lrc-contents {\n width: 100%;\n -webkit-transition: all 0.5s ease-out;\n transition: all 0.5s ease-out;\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n user-select: text;\n cursor: default; }\n .aplayer .aplayer-list {\n overflow: auto;\n -webkit-transition: all 0.5s ease;\n transition: all 0.5s ease;\n will-change: height;\n display: none; }\n .aplayer .aplayer-list.aplayer-list-hide {\n height: 0 !important; }\n .aplayer .aplayer-list::-webkit-scrollbar {\n width: 5px; }\n .aplayer .aplayer-list::-webkit-scrollbar-track {\n background-color: #f9f9f9; }\n .aplayer .aplayer-list::-webkit-scrollbar-thumb {\n border-radius: 3px;\n background-color: #eee; }\n .aplayer .aplayer-list::-webkit-scrollbar-thumb:hover {\n background-color: #ccc; }\n .aplayer .aplayer-list ol {\n list-style-type: none;\n margin: 0;\n padding: 0; }\n .aplayer .aplayer-list ol li {\n position: relative;\n height: 32px;\n line-height: 32px;\n padding: 0 15px;\n font-size: 12px;\n border-top: 1px solid #e9e9e9;\n cursor: pointer;\n -webkit-transition: all 0.2s ease;\n transition: all 0.2s ease;\n overflow: hidden; }\n .aplayer .aplayer-list ol li:first-child {\n border-top: none; }\n .aplayer .aplayer-list ol li:hover {\n background: #efefef; }\n .aplayer .aplayer-list ol li.aplayer-list-light {\n background: #e9e9e9; }\n .aplayer .aplayer-list ol li.aplayer-list-light .aplayer-list-cur {\n display: inline-block; }\n .aplayer .aplayer-list ol li .aplayer-list-cur {\n display: none;\n width: 3px;\n height: 22px;\n position: absolute;\n left: 0;\n top: 5px;\n cursor: pointer; }\n .aplayer .aplayer-list ol li .aplayer-list-index {\n color: #666;\n margin-right: 12px;\n cursor: pointer; }\n .aplayer .aplayer-list ol li .aplayer-list-author {\n color: #666;\n float: right;\n cursor: pointer; }\n\n@-webkit-keyframes aplayer-roll {\n 0% {\n left: 0; }\n 100% {\n left: -100%; } }\n\n@keyframes aplayer-roll {\n 0% {\n left: 0; }\n 100% {\n left: -100%; } }\n",""])},function(e,t){function a(e,t){var a=e[1]||"",r=e[3];if(!r)return a;if(t&&"function"==typeof btoa){var i=n(r);return[a].concat(r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"})).concat([i]).join("\n")}return[a].join("\n")}function n(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=a(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,a){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},r=0;r=0&&b.splice(t,1)}function o(e){var t=document.createElement("style");return e.attrs.type="text/css",p(t,e.attrs),i(e,t),t}function s(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",p(t,e.attrs),i(e,t),t}function p(e,t){Object.keys(t).forEach(function(a){e.setAttribute(a,t[a])})}function c(e,t){var a,n,r,i;if(t.transform&&e.css){if(!(i=t.transform(e.css)))return function(){};e.css=i}if(t.singleton){var p=g++;a=v||(v=o(t)),n=u.bind(null,a,p,!1),r=u.bind(null,a,p,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(a=s(t),n=y.bind(null,a,t),r=function(){l(a),a.href&&URL.revokeObjectURL(a.href)}):(a=o(t),n=d.bind(null,a),r=function(){l(a)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else r()}}function u(e,t,a,n){var r=a?"":n.css;if(e.styleSheet)e.styleSheet.cssText=w(t,r);else{var i=document.createTextNode(r),l=e.childNodes;l[t]&&e.removeChild(l[t]),l.length?e.insertBefore(i,l[t]):e.appendChild(i)}}function d(e,t){var a=t.css,n=t.media;if(n&&e.setAttribute("media",n),e.styleSheet)e.styleSheet.cssText=a;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(a))}}function y(e,t,a){var n=a.css,r=a.sourceMap,i=void 0===t.convertToAbsoluteUrls&&r;(t.convertToAbsoluteUrls||i)&&(n=x(n)),r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var l=new Blob([n],{type:"text/css"}),o=e.href;e.href=URL.createObjectURL(l),o&&URL.revokeObjectURL(o)}var h={},m=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}}(function(){return window&&document&&document.all&&!window.atob}),f=function(e){var t={};return function(a){return void 0===t[a]&&(t[a]=e.call(this,a)),t[a]}}(function(e){return document.querySelector(e)}),v=null,g=0,b=[],x=a(5);e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");t=t||{},t.attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||(t.singleton=m()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var a=r(e,t);return n(a,t),function(e){for(var i=[],l=0;l0?[n,a,i]:[a,i]).map(t).join(":")},getElementViewLeft:function(e){var t=e.offsetLeft,n=e.offsetParent,a=document.body.scrollLeft+document.documentElement.scrollLeft;if(document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement)for(;null!==n&&n!==e;)t+=n.offsetLeft,n=n.offsetParent;else for(;null!==n;)t+=n.offsetLeft,n=n.offsetParent;return t-a},getElementViewTop:function(e){for(var t=e.offsetTop,n=e.offsetParent,a=0;null!==n;)t+=n.offsetTop,n=n.offsetParent;return a=document.body.scrollTop+document.documentElement.scrollTop,t-a},isMobile:i,storage:{set:function(e,t){localStorage.setItem(e,t)},get:function(e){return localStorage.getItem(e)}},nameMap:{dragStart:i?"touchstart":"mousedown",dragMove:i?"touchmove":"mousemove",dragEnd:i?"touchend":"mouseup"},randomOrder:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(void 0).options.audio.length;return function(e){for(var t=e.length-1;t>=0;t--){var n=Math.floor(Math.random()*(t+1)),a=e[n];e[n]=e[t],e[t]=a}return e}([].concat(a(Array(e))).map(function(e,t){return t}))}};t.default=o},function(e,t,n){"use strict";var a,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};a=function(){return this}();try{a=a||Function("return this")()||(0,eval)("this")}catch(e){"object"===("undefined"==typeof window?"undefined":i(window))&&(a=window)}e.exports=a},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(11),o=a(i),r=n(12),s=a(r),l=n(13),u=a(l),c=n(14),p=a(c),d=n(15),h=a(d),f=n(16),y=a(f),v=n(17),m=a(v),g=n(18),w=a(g),b=n(19),M=a(b),x=n(20),T=a(x),k=n(21),L=a(k),_=n(22),q=a(_),E={play:o.default,pause:s.default,volumeUp:u.default,volumeDown:p.default,volumeOff:h.default,orderRandom:y.default,orderList:m.default,menu:w.default,loopAll:M.default,loopOne:T.default,loopNone:L.default,loading:q.default};t.default=E},function(e,t,n){"use strict";e.exports=n(26)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(5);var a=n(6),i=function(e){return e&&e.__esModule?e:{default:e}}(a);console.log("\n %c APlayer v1.7.0 375c0f7 %c http://aplayer.js.org \n\n","color: #fadfa3; background: #030307; padding:5px 0;","background: #fadfa3; padding:5px 0;"),t.default=i.default},function(e,t){},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n1&&this.container.classList.add("aplayer-withlist"),u.default.isMobile&&this.container.classList.add("aplayer-mobile"),this.arrow=this.container.offsetWidth<=300,this.arrow&&this.container.classList.add("aplayer-arrow"),this.options.mini&&this.container.classList.add("aplayer-narrow"),this.container=this.options.container,2===this.options.lrc||!0===this.options.lrc)for(var n=this.container.getElementsByClassName("aplayer-lrc-content"),a=0;a=.95?this.template.volumeButton.innerHTML=p.default.volumeUp:this.volume()>0?this.template.volumeButton.innerHTML=p.default.volumeDown:this.template.volumeButton.innerHTML=p.default.volumeOff}},{key:"volume",value:function(e,t){return e=parseFloat(e),isNaN(e)||(e=Math.max(e,0),e=Math.min(e,1),this.bar.set("volume",e,"height"),t||this.user.set("volume",e),this.audio.volume=e,this.audio.muted&&(this.audio.muted=!1),this.switchVolumeIcon()),this.audio.muted?0:this.audio.volume}},{key:"on",value:function(e,t){this.events.on(e,t)}},{key:"toggle",value:function(){this.template.button.classList.contains("aplayer-play")?this.play():this.template.button.classList.contains("aplayer-pause")&&this.pause()}},{key:"isMultiple",value:function(){return this.options.audio.length>1}},{key:"nextRandomNum",value:function(){if(this.isMultiple()){var e=this.randomOrder.indexOf(this.playIndex);return e===this.randomOrder.length-1?this.randomOrder[0]:this.randomOrder[e+1]}return 0}},{key:"addAudio",value:function(e){this.events.trigger("addaudio",e);var t=!this.isMultiple();this.options.audio=this.options.audio.concat(e);for(var n="",a=0;a'+(this.options.audio.length-e.length+a+1)+''+e[a].name+''+e[a].artist+"";this.template.listOl.innerHTML+=n,t&&this.isMultiple()&&(this.container.classList.add("aplayer-withlist"),this.audio.loop=!1);var i=this.container.querySelectorAll(".aplayer-list li").length;this.template.list.style.height=33*i-1+"px",this.randomOrder=u.default.randomOrder(this.options.audio.length)}},{key:"removeAudio",value:function(e){if(this.events.trigger("removeaudio",e),this.options.audio[e]&&this.options.audio.length>1){var t=this.container.querySelectorAll(".aplayer-list li");this.options.audio.splice(e,1),e===this.playIndex&&(this.options.audio[e+1]?this.switchAudio(e):this.switchAudio(e-1)),this.playIndex>e&&this.playIndex--,t[e].remove();for(var n=e;n=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(9),t.setImmediate=setImmediate,t.clearImmediate=clearImmediate},function(e,t,n){"use strict";(function(e,t){!function(e,n){function a(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n1)for(var n=1;n\n
',t+=o.play,t+='
\n
\n
\n
\n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n ',t+=o.loading,t+='\n \n
\n
\n
\n
\n \n - 00:00 / 00:00\n \n
\n \n
\n
\n
\n
\n
\n
\n ',r.audio.length>1&&(t+='\n \n "),t+='\n \n \n
\n
\n
\n
\n
    \n ",s(r.audio,function(e,n){t+='\n
  1. \n \n ',t+=i(n+1),t+='\n ',t+=i(e.name),t+='\n ',t+=i(e.artist),t+="\n
  2. \n "}),t+="\n
\n
"}},function(e,t,n){"use strict";(function(t){function a(e){return"string"!=typeof e&&(e=void 0===e||null===e?"":"function"==typeof e?a(e.call(e)):JSON.stringify(e)),e}function i(e){var t=""+e,n=s.exec(t);if(!n)return e;var a="",i=void 0,o=void 0,r=void 0;for(i=n.index,o=0;i]/;r.$escape=function(e){return i(a(e))},r.$each=function(e,t){if(Array.isArray(e))for(var n=0,a=e.length;n0&&void 0!==arguments[0]?arguments[0]:this.player.audio.currentTime;if(this.index>this.current.length-1||e=this.current[this.index+1][0])for(var t=0;t=this.current[t][0]&&(!this.current[t+1]||e=200&&n.status<300||304===n.status?t.parsed[e]=t.parse(n.responseText):(console.log("Request was unsuccessful: "+n.status),t.parsed[e]=[["00:00","Not available"]]),t.container.innerHTML=(0,r.default)({lyrics:t.parsed[e]}),t.update(0),t.current=t.parsed[e])};var a=this.content[e];n.open("get",a,!0),n.send(null)}else this.content[e]?this.parsed[e]=this.parse(this.content[e]):this.parsed[e]=[["00:00","Not available"]];this.container.innerHTML=(0,r.default)({lyrics:this.parsed[e]}),this.update(0),this.current=this.parsed[e]}},{key:"parse",value:function(e){if(e){e=e.replace(/([^\]^\n])\[/g,function(e,t){return t+"\n["});for(var t=e.split("\n"),n=[],a=t.length,i=0;i/g,"").replace(/^\s+|\s+$/g,"");if(o)for(var s=o.length,l=0;l\n"}),t}},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;nt&&!e.player.audio.paused&&(e.player.container.classList.remove("aplayer-loading"),a=!1),t=n)},100)}},{key:"enable",value:function(e){this["enable"+e+"Checker"]=!0,"fps"===e&&this.initfpsChecker()}},{key:"disable",value:function(e){this["enable"+e+"Checker"]=!1}},{key:"destroy",value:function(){var e=this;this.types.map(function(t){return e["enable"+t+"Checker"]=!1,e[t+"Checker"]&&clearInterval(e[t+"Checker"]),t})}}]),e}();t.default=s},function(e,t,n){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n 0 ? [\n hour,\n min,\n sec\n ] : [\n min,\n sec\n ]).map(add0).join(':');\n },\n getElementViewLeft: function getElementViewLeft(element) {\n var actualLeft = element.offsetLeft;\n var current = element.offsetParent;\n var elementScrollLeft = document.body.scrollLeft + document.documentElement.scrollLeft;\n if (!document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement) {\n while (current !== null) {\n actualLeft += current.offsetLeft;\n current = current.offsetParent;\n }\n } else {\n while (current !== null && current !== element) {\n actualLeft += current.offsetLeft;\n current = current.offsetParent;\n }\n }\n return actualLeft - elementScrollLeft;\n },\n getElementViewTop: function getElementViewTop(element) {\n var actualTop = element.offsetTop;\n var current = element.offsetParent;\n var elementScrollTop = 0;\n while (current !== null) {\n actualTop += current.offsetTop;\n current = current.offsetParent;\n }\n elementScrollTop = document.body.scrollTop + document.documentElement.scrollTop;\n return actualTop - elementScrollTop;\n },\n isMobile: isMobile,\n storage: {\n set: function set(key, value) {\n localStorage.setItem(key, value);\n },\n get: function get(key) {\n return localStorage.getItem(key);\n }\n },\n nameMap: {\n dragStart: isMobile ? 'touchstart' : 'mousedown',\n dragMove: isMobile ? 'touchmove' : 'mousemove',\n dragEnd: isMobile ? 'touchend' : 'mouseup'\n },\n randomOrder: function randomOrder() {\n var length = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined.options.audio.length;\n function shuffle(arr) {\n for (var i = arr.length - 1; i >= 0; i--) {\n var randomIndex = Math.floor(Math.random() * (i + 1));\n var itemAtIndex = arr[randomIndex];\n arr[randomIndex] = arr[i];\n arr[i] = itemAtIndex;\n }\n return arr;\n }\n return shuffle([].concat(_toConsumableArray(Array(length))).map(function (item, i) {\n return i;\n }));\n }\n};\nexports.default = utils;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;\n};\nvar g;\ng = function () {\n return this;\n}();\ntry {\n g = g || Function('return this')() || (1, eval)('this');\n} catch (e) {\n if ((typeof window === 'undefined' ? 'undefined' : _typeof(window)) === 'object')\n g = window;\n}\nmodule.exports = g;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, '__esModule', { value: true });\nvar _play = __webpack_require__(11);\nvar _play2 = _interopRequireDefault(_play);\nvar _pause = __webpack_require__(12);\nvar _pause2 = _interopRequireDefault(_pause);\nvar _volumeUp = __webpack_require__(13);\nvar _volumeUp2 = _interopRequireDefault(_volumeUp);\nvar _volumeDown = __webpack_require__(14);\nvar _volumeDown2 = _interopRequireDefault(_volumeDown);\nvar _volumeOff = __webpack_require__(15);\nvar _volumeOff2 = _interopRequireDefault(_volumeOff);\nvar _orderRandom = __webpack_require__(16);\nvar _orderRandom2 = _interopRequireDefault(_orderRandom);\nvar _orderList = __webpack_require__(17);\nvar _orderList2 = _interopRequireDefault(_orderList);\nvar _menu = __webpack_require__(18);\nvar _menu2 = _interopRequireDefault(_menu);\nvar _loopAll = __webpack_require__(19);\nvar _loopAll2 = _interopRequireDefault(_loopAll);\nvar _loopOne = __webpack_require__(20);\nvar _loopOne2 = _interopRequireDefault(_loopOne);\nvar _loopNone = __webpack_require__(21);\nvar _loopNone2 = _interopRequireDefault(_loopNone);\nvar _loading = __webpack_require__(22);\nvar _loading2 = _interopRequireDefault(_loading);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\nvar Icons = {\n play: _play2.default,\n pause: _pause2.default,\n volumeUp: _volumeUp2.default,\n volumeDown: _volumeDown2.default,\n volumeOff: _volumeOff2.default,\n orderRandom: _orderRandom2.default,\n orderList: _orderList2.default,\n menu: _menu2.default,\n loopAll: _loopAll2.default,\n loopOne: _loopOne2.default,\n loopNone: _loopNone2.default,\n loading: _loading2.default\n};\nexports.default = Icons;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nmodule.exports = __webpack_require__(26);\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, '__esModule', { value: true });\n__webpack_require__(5);\nvar _player = __webpack_require__(6);\nvar _player2 = _interopRequireDefault(_player);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\nconsole.log('\\n' + ' %c APlayer v' + \"1.7.0\" + ' ' + \"375c0f7\" + ' %c http://aplayer.js.org ' + '\\n' + '\\n', 'color: #fadfa3; background: #030307; padding:5px 0;', 'background: #fadfa3; padding:5px 0;');\nexports.default = _player2.default;\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, '__esModule', { value: true });\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nvar _promisePolyfill = __webpack_require__(7);\nvar _promisePolyfill2 = _interopRequireDefault(_promisePolyfill);\nvar _utils = __webpack_require__(0);\nvar _utils2 = _interopRequireDefault(_utils);\nvar _icons = __webpack_require__(2);\nvar _icons2 = _interopRequireDefault(_icons);\nvar _options = __webpack_require__(23);\nvar _options2 = _interopRequireDefault(_options);\nvar _template = __webpack_require__(24);\nvar _template2 = _interopRequireDefault(_template);\nvar _bar = __webpack_require__(28);\nvar _bar2 = _interopRequireDefault(_bar);\nvar _user = __webpack_require__(29);\nvar _user2 = _interopRequireDefault(_user);\nvar _lrc = __webpack_require__(30);\nvar _lrc2 = _interopRequireDefault(_lrc);\nvar _controller = __webpack_require__(32);\nvar _controller2 = _interopRequireDefault(_controller);\nvar _timer = __webpack_require__(33);\nvar _timer2 = _interopRequireDefault(_timer);\nvar _events = __webpack_require__(34);\nvar _events2 = _interopRequireDefault(_events);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar instances = [];\nvar APlayer = function () {\n function APlayer(options) {\n _classCallCheck(this, APlayer);\n this.options = (0, _options2.default)(options);\n this.container = this.options.container;\n this.playIndex = 0;\n this.paused = true;\n this.playedPromise = _promisePolyfill2.default.resolve();\n this.randomOrder = _utils2.default.randomOrder(this.options.audio.length);\n this.container.classList.add('aplayer');\n if (this.options.lrc) {\n this.container.classList.add('aplayer-withlrc');\n }\n if (this.options.audio.length > 1) {\n this.container.classList.add('aplayer-withlist');\n }\n if (_utils2.default.isMobile) {\n this.container.classList.add('aplayer-mobile');\n }\n this.arrow = this.container.offsetWidth <= 300;\n if (this.arrow) {\n this.container.classList.add('aplayer-arrow');\n }\n if (this.options.mini) {\n this.container.classList.add('aplayer-narrow');\n }\n this.container = this.options.container;\n if (this.options.lrc === 2 || this.options.lrc === true) {\n var lrcEle = this.container.getElementsByClassName('aplayer-lrc-content');\n for (var i = 0; i < lrcEle.length; i++) {\n if (this.options.audio[i]) {\n this.options.audio[i].lrc = lrcEle[i].innerHTML;\n }\n }\n }\n this.template = new _template2.default({\n container: this.container,\n options: this.options,\n randomOrder: this.randomOrder\n });\n if (this.template.info.offsetWidth < 200) {\n this.template.time.classList.add('aplayer-time-narrow');\n }\n if (this.options.lrc) {\n this.lrc = new _lrc2.default({\n container: this.template.lrc,\n async: this.options.lrc === 3,\n content: this.options.audio.map(function (item) {\n return item.lrc;\n }),\n player: this\n });\n }\n this.events = new _events2.default();\n this.user = new _user2.default(this);\n this.bar = new _bar2.default(this.template);\n this.controller = new _controller2.default(this);\n this.timer = new _timer2.default(this);\n this.initAudio();\n if (this.options.order === 'random') {\n this.switchAudio(this.randomOrder[0]);\n } else {\n this.switchAudio(0);\n }\n if (this.options.autoplay) {\n this.play();\n }\n instances.push(this);\n }\n _createClass(APlayer, [\n {\n key: 'initAudio',\n value: function initAudio() {\n var _this = this;\n this.audio = document.createElement('audio');\n this.audio.preload = this.options.preload;\n var _loop = function _loop(i) {\n _this.audio.addEventListener(_this.events.audioEvents[i], function () {\n _this.events.trigger(_this.events.audioEvents[i]);\n });\n };\n for (var i = 0; i < this.events.audioEvents.length; i++) {\n _loop(i);\n }\n this.on('play', function () {\n if (_this.paused) {\n _this.play();\n }\n });\n this.on('pause', function () {\n if (!_this.paused) {\n _this.pause();\n }\n });\n this.on('durationchange', function () {\n if (_this.audio.duration !== 1) {\n _this.template.dtime.innerHTML = _utils2.default.secondToTime(_this.audio.duration);\n }\n });\n this.on('progress', function () {\n var percentage = _this.audio.buffered.length ? _this.audio.buffered.end(_this.audio.buffered.length - 1) / _this.audio.duration : 0;\n _this.bar.set('loaded', percentage, 'width');\n });\n this.on('error', function () {\n _this.template.author.innerHTML = ' - Error happens \\u2565﹏\\u2565';\n });\n this.on('ended', function () {\n if (_this.options.loop === 'none') {\n if (_this.options.order === 'list') {\n if (_this.playIndex < _this.options.audio.length - 1) {\n _this.switchAudio((_this.playIndex + 1) % _this.options.audio.length);\n _this.play();\n } else {\n _this.switchAudio((_this.playIndex + 1) % _this.options.audio.length);\n _this.pause();\n }\n } else if (_this.options.order === 'random') {\n if (_this.randomOrder.indexOf(_this.playIndex) < _this.randomOrder.length - 1) {\n _this.switchAudio(_this.nextRandomNum());\n _this.play();\n } else {\n _this.switchAudio(_this.nextRandomNum());\n _this.pause();\n }\n }\n } else if (_this.options.loop === 'one') {\n _this.switchAudio(_this.playIndex);\n _this.play();\n } else if (_this.options.loop === 'all') {\n if (_this.options.order === 'list') {\n _this.switchAudio((_this.playIndex + 1) % _this.options.audio.length);\n } else if (_this.options.order === 'random') {\n _this.switchAudio(_this.nextRandomNum());\n }\n _this.play();\n }\n });\n this.volume(this.user.get('volume'), true);\n }\n },\n {\n key: 'switchAudio',\n value: function switchAudio(index) {\n var _this2 = this;\n this.handlePlayPromise(function () {\n _this2.events.trigger('switchaudio', index);\n if (typeof index !== 'undefined') {\n _this2.playIndex = index;\n }\n if (_this2.options.audio[_this2.playIndex].cover) {\n _this2.template.pic.style.backgroundImage = 'url(\\'' + _this2.options.audio[_this2.playIndex].cover + '\\')';\n } else {\n _this2.template.pic.style.backgroundImage = '';\n }\n _this2.template.title.innerHTML = _this2.options.audio[_this2.playIndex].name;\n _this2.template.author.innerHTML = _this2.options.audio[_this2.playIndex].artist ? ' - ' + _this2.options.audio[_this2.playIndex].artist : '';\n var light = _this2.container.getElementsByClassName('aplayer-list-light')[0];\n if (light) {\n light.classList.remove('aplayer-list-light');\n }\n _this2.container.querySelectorAll('.aplayer-list li')[_this2.playIndex].classList.add('aplayer-list-light');\n _this2.template.list.scrollTop = _this2.playIndex * 33;\n _this2.audio.src = _this2.options.audio[_this2.playIndex].url;\n _this2.seek(0);\n var playPromise = void 0;\n if (!_this2.paused) {\n playPromise = _promisePolyfill2.default.resolve(_this2.audio.play()).catch(function (err) {\n console.error(err);\n _this2.pause();\n });\n }\n _this2.lrc && _this2.lrc.switch(_this2.playIndex);\n if (_this2.audio.duration !== 1) {\n _this2.template.dtime.innerHTML = _this2.audio.duration ? _utils2.default.secondToTime(_this2.audio.duration) : '00:00';\n }\n return playPromise;\n });\n }\n },\n {\n key: 'seek',\n value: function seek(time) {\n time = Math.max(time, 0);\n if (this.audio.duration) {\n time = Math.min(time, this.audio.duration);\n }\n this.audio.currentTime = time;\n if (isNaN(this.audio.duration)) {\n this.bar.set('played', 0, 'width');\n } else {\n this.bar.set('played', time / this.audio.duration, 'width');\n }\n this.template.ptime.innerHTML = _utils2.default.secondToTime(time);\n }\n },\n {\n key: 'play',\n value: function play() {\n var _this3 = this;\n this.handlePlayPromise(function () {\n if (_this3.paused) {\n _this3.paused = false;\n _this3.template.button.classList.remove('aplayer-play');\n _this3.template.button.classList.add('aplayer-pause');\n _this3.template.button.innerHTML = '';\n setTimeout(function () {\n _this3.template.button.innerHTML = _icons2.default.pause;\n }, 100);\n }\n var playPromise = _promisePolyfill2.default.resolve(_this3.audio.play()).catch(function (err) {\n console.error(err);\n _this3.pause();\n });\n _this3.timer.enable('loading');\n _this3.timer.enable('progress');\n if (_this3.options.mutex) {\n for (var i = 0; i < instances.length; i++) {\n if (_this3 !== instances[i]) {\n instances[i].pause();\n }\n }\n }\n return playPromise;\n });\n }\n },\n {\n key: 'pause',\n value: function pause() {\n var _this4 = this;\n this.handlePlayPromise(function () {\n if (!_this4.paused) {\n _this4.paused = true;\n _this4.template.button.classList.remove('aplayer-pause');\n _this4.template.button.classList.add('aplayer-play');\n _this4.template.button.innerHTML = '';\n setTimeout(function () {\n _this4.template.button.innerHTML = _icons2.default.play;\n }, 100);\n }\n _this4.audio.pause();\n _this4.timer.disable('loading');\n _this4.timer.disable('progress');\n });\n }\n },\n {\n key: 'switchVolumeIcon',\n value: function switchVolumeIcon() {\n if (this.volume() >= 0.95) {\n this.template.volumeButton.innerHTML = _icons2.default.volumeUp;\n } else if (this.volume() > 0) {\n this.template.volumeButton.innerHTML = _icons2.default.volumeDown;\n } else {\n this.template.volumeButton.innerHTML = _icons2.default.volumeOff;\n }\n }\n },\n {\n key: 'volume',\n value: function volume(percentage, nostorage) {\n percentage = parseFloat(percentage);\n if (!isNaN(percentage)) {\n percentage = Math.max(percentage, 0);\n percentage = Math.min(percentage, 1);\n this.bar.set('volume', percentage, 'height');\n if (!nostorage) {\n this.user.set('volume', percentage);\n }\n this.audio.volume = percentage;\n if (this.audio.muted) {\n this.audio.muted = false;\n }\n this.switchVolumeIcon();\n }\n return this.audio.muted ? 0 : this.audio.volume;\n }\n },\n {\n key: 'on',\n value: function on(name, callback) {\n this.events.on(name, callback);\n }\n },\n {\n key: 'toggle',\n value: function toggle() {\n if (this.template.button.classList.contains('aplayer-play')) {\n this.play();\n } else if (this.template.button.classList.contains('aplayer-pause')) {\n this.pause();\n }\n }\n },\n {\n key: 'isMultiple',\n value: function isMultiple() {\n return this.options.audio.length > 1;\n }\n },\n {\n key: 'nextRandomNum',\n value: function nextRandomNum() {\n if (this.isMultiple()) {\n var index = this.randomOrder.indexOf(this.playIndex);\n if (index === this.randomOrder.length - 1) {\n return this.randomOrder[0];\n } else {\n return this.randomOrder[index + 1];\n }\n } else {\n return 0;\n }\n }\n },\n {\n key: 'addAudio',\n value: function addAudio(newMusic) {\n this.events.trigger('addaudio', newMusic);\n var wasSingle = !this.isMultiple();\n this.options.audio = this.options.audio.concat(newMusic);\n var newItemHTML = '';\n for (var i = 0; i < newMusic.length; i++) {\n newItemHTML += '
  • ' + (this.options.audio.length - newMusic.length + i + 1) + '' + newMusic[i].name + '' + newMusic[i].artist + '
  • ';\n }\n this.template.listOl.innerHTML += newItemHTML;\n if (wasSingle && this.isMultiple()) {\n this.container.classList.add('aplayer-withlist');\n this.audio.loop = false;\n }\n var songListLength = this.container.querySelectorAll('.aplayer-list li').length;\n this.template.list.style.height = songListLength * 33 - 1 + 'px';\n this.randomOrder = _utils2.default.randomOrder(this.options.audio.length);\n }\n },\n {\n key: 'removeAudio',\n value: function removeAudio(index) {\n this.events.trigger('removeaudio', index);\n if (this.options.audio[index] && this.options.audio.length > 1) {\n var list = this.container.querySelectorAll('.aplayer-list li');\n this.options.audio.splice(index, 1);\n if (index === this.playIndex) {\n if (this.options.audio[index + 1]) {\n this.switchAudio(index);\n } else {\n this.switchAudio(index - 1);\n }\n }\n if (this.playIndex > index) {\n this.playIndex--;\n }\n list[index].remove();\n for (var i = index; i < list.length; i++) {\n list[i].getElementsByClassName('aplayer-list-index')[0].textContent = i;\n }\n if (this.options.audio.length === 1) {\n this.container.classList.remove('aplayer-withlist');\n }\n this.template.list.style.height = parseInt(this.template.list.style.height, 10) - 33 + 'px';\n }\n }\n },\n {\n key: 'destroy',\n value: function destroy() {\n instances.splice(instances.indexOf(this), 1);\n this.pause();\n this.container.innerHTML = '';\n this.audio.src = '';\n this.timer.destroy();\n this.events.trigger('destroy');\n }\n },\n {\n key: 'handlePlayPromise',\n value: function handlePlayPromise(callback) {\n this.playedPromise = this.playedPromise.then(callback).catch(function (err) {\n console.error(err);\n });\n }\n }\n ]);\n return APlayer;\n}();\nexports.default = APlayer;\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(setImmediate) {\nvar _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;\n};\nvar setTimeoutFunc = setTimeout;\nfunction noop() {\n}\nfunction bind(fn, thisArg) {\n return function () {\n fn.apply(thisArg, arguments);\n };\n}\nfunction Promise(fn) {\n if (!(this instanceof Promise))\n throw new TypeError('Promises must be constructed via new');\n if (typeof fn !== 'function')\n throw new TypeError('not a function');\n this._state = 0;\n this._handled = false;\n this._value = undefined;\n this._deferreds = [];\n doResolve(fn, this);\n}\nfunction handle(self, deferred) {\n while (self._state === 3) {\n self = self._value;\n }\n if (self._state === 0) {\n self._deferreds.push(deferred);\n return;\n }\n self._handled = true;\n Promise._immediateFn(function () {\n var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n (self._state === 1 ? resolve : reject)(deferred.promise, self._value);\n return;\n }\n var ret;\n try {\n ret = cb(self._value);\n } catch (e) {\n reject(deferred.promise, e);\n return;\n }\n resolve(deferred.promise, ret);\n });\n}\nfunction resolve(self, newValue) {\n try {\n if (newValue === self)\n throw new TypeError('A promise cannot be resolved with itself.');\n if (newValue && ((typeof newValue === 'undefined' ? 'undefined' : _typeof(newValue)) === 'object' || typeof newValue === 'function')) {\n var then = newValue.then;\n if (newValue instanceof Promise) {\n self._state = 3;\n self._value = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(bind(then, newValue), self);\n return;\n }\n }\n self._state = 1;\n self._value = newValue;\n finale(self);\n } catch (e) {\n reject(self, e);\n }\n}\nfunction reject(self, newValue) {\n self._state = 2;\n self._value = newValue;\n finale(self);\n}\nfunction finale(self) {\n if (self._state === 2 && self._deferreds.length === 0) {\n Promise._immediateFn(function () {\n if (!self._handled) {\n Promise._unhandledRejectionFn(self._value);\n }\n });\n }\n for (var i = 0, len = self._deferreds.length; i < len; i++) {\n handle(self, self._deferreds[i]);\n }\n self._deferreds = null;\n}\nfunction Handler(onFulfilled, onRejected, promise) {\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n}\nfunction doResolve(fn, self) {\n var done = false;\n try {\n fn(function (value) {\n if (done)\n return;\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done)\n return;\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done)\n return;\n done = true;\n reject(self, ex);\n }\n}\nPromise.prototype['catch'] = function (onRejected) {\n return this.then(null, onRejected);\n};\nPromise.prototype.then = function (onFulfilled, onRejected) {\n var prom = new this.constructor(noop);\n handle(this, new Handler(onFulfilled, onRejected, prom));\n return prom;\n};\nPromise.prototype['finally'] = function (callback) {\n var constructor = this.constructor;\n return this.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n return constructor.reject(reason);\n });\n });\n};\nPromise.all = function (arr) {\n return new Promise(function (resolve, reject) {\n if (!arr || typeof arr.length === 'undefined')\n throw new TypeError('Promise.all accepts an array');\n var args = Array.prototype.slice.call(arr);\n if (args.length === 0)\n return resolve([]);\n var remaining = args.length;\n function res(i, val) {\n try {\n if (val && ((typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object' || typeof val === 'function')) {\n var then = val.then;\n if (typeof then === 'function') {\n then.call(val, function (val) {\n res(i, val);\n }, reject);\n return;\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n } catch (ex) {\n reject(ex);\n }\n }\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n};\nPromise.resolve = function (value) {\n if (value && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.constructor === Promise) {\n return value;\n }\n return new Promise(function (resolve) {\n resolve(value);\n });\n};\nPromise.reject = function (value) {\n return new Promise(function (resolve, reject) {\n reject(value);\n });\n};\nPromise.race = function (values) {\n return new Promise(function (resolve, reject) {\n for (var i = 0, len = values.length; i < len; i++) {\n values[i].then(resolve, reject);\n }\n });\n};\nPromise._immediateFn = typeof setImmediate === 'function' && function (fn) {\n setImmediate(fn);\n} || function (fn) {\n setTimeoutFunc(fn, 0);\n};\nPromise._unhandledRejectionFn = function _unhandledRejectionFn(err) {\n if (typeof console !== 'undefined' && console) {\n console.warn('Possible Unhandled Promise Rejection:', err);\n }\n};\nmodule.exports = Promise;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8).setImmediate))\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar apply = Function.prototype.apply;\nexports.setTimeout = function () {\n return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout);\n};\nexports.setInterval = function () {\n return new Timeout(apply.call(setInterval, window, arguments), clearInterval);\n};\nexports.clearTimeout = exports.clearInterval = function (timeout) {\n if (timeout) {\n timeout.close();\n }\n};\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function () {\n};\nTimeout.prototype.close = function () {\n this._clearFn.call(window, this._id);\n};\nexports.enroll = function (item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\nexports.unenroll = function (item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\nexports._unrefActive = exports.active = function (item) {\n clearTimeout(item._idleTimeoutId);\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\n__webpack_require__(9);\nexports.setImmediate = setImmediate;\nexports.clearImmediate = clearImmediate;\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(global, process) {\n(function (global, undefined) {\n 'use strict';\n if (global.setImmediate) {\n return;\n }\n var nextHandle = 1;\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n function setImmediate(callback) {\n if (typeof callback !== 'function') {\n callback = new Function('' + callback);\n }\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n var task = {\n callback: callback,\n args: args\n };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n function runIfPresent(handle) {\n if (currentlyRunningATask) {\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n function installNextTickImplementation() {\n registerImmediate = function registerImmediate(handle) {\n process.nextTick(function () {\n runIfPresent(handle);\n });\n };\n }\n function canUsePostMessage() {\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function () {\n postMessageIsAsynchronous = false;\n };\n global.postMessage('', '*');\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n function installPostMessageImplementation() {\n var messagePrefix = 'setImmediate$' + Math.random() + '$';\n var onGlobalMessage = function onGlobalMessage(event) {\n if (event.source === global && typeof event.data === 'string' && event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n if (global.addEventListener) {\n global.addEventListener('message', onGlobalMessage, false);\n } else {\n global.attachEvent('onmessage', onGlobalMessage);\n }\n registerImmediate = function registerImmediate(handle) {\n global.postMessage(messagePrefix + handle, '*');\n };\n }\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function (event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n registerImmediate = function registerImmediate(handle) {\n channel.port2.postMessage(handle);\n };\n }\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function registerImmediate(handle) {\n var script = doc.createElement('script');\n script.onreadystatechange = function () {\n runIfPresent(handle);\n script.onreadystatechange = null;\n html.removeChild(script);\n script = null;\n };\n html.appendChild(script);\n };\n }\n function installSetTimeoutImplementation() {\n registerImmediate = function registerImmediate(handle) {\n setTimeout(runIfPresent, 0, handle);\n };\n }\n var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);\n attachTo = attachTo && attachTo.setTimeout ? attachTo : global;\n if ({}.toString.call(global.process) === '[object process]') {\n installNextTickImplementation();\n } else if (canUsePostMessage()) {\n installPostMessageImplementation();\n } else if (global.MessageChannel) {\n installMessageChannelImplementation();\n } else if (doc && 'onreadystatechange' in doc.createElement('script')) {\n installReadyStateChangeImplementation();\n } else {\n installSetTimeoutImplementation();\n }\n attachTo.setImmediate = setImmediate;\n attachTo.clearImmediate = clearImmediate;\n}(typeof self === 'undefined' ? typeof global === 'undefined' ? undefined : global : self));\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(10)))\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar process = module.exports = {};\nvar cachedSetTimeout;\nvar cachedClearTimeout;\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout() {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n}());\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n return setTimeout(fun, 0);\n }\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n return cachedSetTimeout(fun, 0);\n } catch (e) {\n try {\n return cachedSetTimeout.call(null, fun, 0);\n } catch (e) {\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n return clearTimeout(marker);\n }\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n return cachedClearTimeout(marker);\n } catch (e) {\n try {\n return cachedClearTimeout.call(null, marker);\n } catch (e) {\n return cachedClearTimeout.call(this, marker);\n }\n }\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n var len = queue.length;\n while (len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = '';\nprocess.versions = {};\nfunction noop() {\n}\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\nprocess.listeners = function (name) {\n return [];\n};\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\nprocess.cwd = function () {\n return '/';\n};\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function () {\n return 0;\n};\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"\"\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"\"\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"\"\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"\"\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"\"\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"\"\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"\"\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"\"\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"\"\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"\"\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"\"\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"\"\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, '__esModule', { value: true });\nexports.default = function (options) {\n var defaultOption = {\n container: options.element || document.getElementsByClassName('aplayer')[0],\n mini: options.narrow || false,\n autoplay: false,\n mutex: true,\n lrc: options.showlrc || 0,\n preload: 'auto',\n theme: '#b7daff',\n loop: 'all',\n order: 'list',\n volume: 0.7,\n listFolded: false,\n listMaxHeight: options.listmaxheight,\n audio: options.music\n };\n for (var defaultKey in defaultOption) {\n if (defaultOption.hasOwnProperty(defaultKey) && !options.hasOwnProperty(defaultKey)) {\n options[defaultKey] = defaultOption[defaultKey];\n }\n }\n if (Object.prototype.toString.call(options.audio) !== '[object Array]') {\n options.audio = [options.audio];\n }\n options.audio.map(function (item) {\n item.name = item.name || item.title;\n item.artist = item.artist || item.author;\n item.cover = item.cover || item.pic;\n return item;\n });\n if (options.audio.length <= 1 && options.loop === 'one') {\n options.loop = 'all';\n }\n return options;\n};\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, '__esModule', { value: true });\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nvar _icons = __webpack_require__(2);\nvar _icons2 = _interopRequireDefault(_icons);\nvar _player = __webpack_require__(25);\nvar _player2 = _interopRequireDefault(_player);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Template = function () {\n function Template(options) {\n _classCallCheck(this, Template);\n this.container = options.container;\n this.options = options.options;\n this.randomOrder = options.randomOrder;\n this.init();\n }\n _createClass(Template, [{\n key: 'init',\n value: function init() {\n var cover = void 0;\n if (this.options.order === 'random') {\n cover = this.options.audio[this.randomOrder[0]].cover;\n } else {\n cover = this.options.audio[0].cover;\n }\n this.container.innerHTML = (0, _player2.default)({\n options: this.options,\n icons: _icons2.default,\n cover: cover\n });\n this.lrc = this.container.querySelector('.aplayer-lrc-contents');\n this.ptime = this.container.querySelector('.aplayer-ptime');\n this.info = this.container.querySelector('.aplayer-info');\n this.time = this.container.querySelector('.aplayer-time');\n this.barWrap = this.container.querySelector('.aplayer-bar-wrap');\n this.button = this.container.querySelector('.aplayer-button');\n this.list = this.container.querySelector('.aplayer-list');\n this.listOl = this.container.querySelector('.aplayer-list ol');\n this.played = this.container.querySelector('.aplayer-played');\n this.loaded = this.container.querySelector('.aplayer-loaded');\n this.thumb = this.container.querySelector('.aplayer-thumb');\n this.volume = this.container.querySelector('.aplayer-volume');\n this.volumeBar = this.container.querySelector('.aplayer-volume-bar');\n this.volumeButton = this.container.querySelector('.aplayer-time button');\n this.volumeBarWrap = this.container.querySelector('.aplayer-volume-bar-wrap');\n this.loop = this.container.querySelector('.aplayer-icon-loop');\n this.order = this.container.querySelector('.aplayer-icon-order');\n this.menu = this.container.querySelector('.aplayer-icon-menu');\n this.pic = this.container.querySelector('.aplayer-pic');\n this.title = this.container.querySelector('.aplayer-title');\n this.author = this.container.querySelector('.aplayer-author');\n this.dtime = this.container.querySelector('.aplayer-dtime');\n }\n }]);\n return Template;\n}();\nexports.default = Template;\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar $imports = __webpack_require__(3);\nmodule.exports = function ($data) {\n 'use strict';\n $data = $data || {};\n var $$out = '', cover = $data.cover, $escape = $imports.$escape, icons = $data.icons, options = $data.options, $each = $imports.$each, $value = $data.$value, $index = $data.$index;\n $$out += '
    1) {\n $$out += '\\n \\n ';\n }\n $$out += '\\n \\n \\n
    \\n
    \\n
    \\n
    ]/;\nruntime.$escape = function (content) {\n return xmlEscape(toString(content));\n};\nruntime.$each = function (data, callback) {\n if (Array.isArray(data)) {\n for (var i = 0, len = data.length; i < len; i++) {\n callback(data[i], i);\n }\n } else {\n for (var _i in data) {\n callback(data[_i], _i);\n }\n }\n};\nfunction toString(value) {\n if (typeof value !== 'string') {\n if (value === undefined || value === null) {\n value = '';\n } else if (typeof value === 'function') {\n value = toString(value.call(value));\n } else {\n value = JSON.stringify(value);\n }\n }\n return value;\n}\n;\nfunction xmlEscape(content) {\n var html = '' + content;\n var regexResult = ESCAPE_REG.exec(html);\n if (!regexResult) {\n return content;\n }\n var result = '';\n var i = void 0, lastIndex = void 0, char = void 0;\n for (i = regexResult.index, lastIndex = 0; i < html.length; i++) {\n switch (html.charCodeAt(i)) {\n case 34:\n char = '"';\n break;\n case 38:\n char = '&';\n break;\n case 39:\n char = ''';\n break;\n case 60:\n char = '<';\n break;\n case 62:\n char = '>';\n break;\n default:\n continue;\n }\n if (lastIndex !== i) {\n result += html.substring(lastIndex, i);\n }\n lastIndex = i + 1;\n result += char;\n }\n if (lastIndex !== i) {\n return result + html.substring(lastIndex, i);\n } else {\n return result;\n }\n}\n;\nmodule.exports = runtime;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(global) {\nmodule.exports = false;\ntry {\n module.exports = Object.prototype.toString.call(global.process) === '[object process]';\n} catch (e) {\n}\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, '__esModule', { value: true });\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Bar = function () {\n function Bar(template) {\n _classCallCheck(this, Bar);\n this.elements = {};\n this.elements.volume = template.volume;\n this.elements.played = template.played;\n this.elements.loaded = template.loaded;\n }\n _createClass(Bar, [\n {\n key: 'set',\n value: function set(type, percentage, direction) {\n percentage = Math.max(percentage, 0);\n percentage = Math.min(percentage, 1);\n this.elements[type].style[direction] = percentage * 100 + '%';\n }\n },\n {\n key: 'get',\n value: function get(type, direction) {\n return parseFloat(this.elements[type].style[direction]) / 100;\n }\n }\n ]);\n return Bar;\n}();\nexports.default = Bar;\n\n/***/ }),\n/* 29 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, '__esModule', { value: true });\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nvar _utils = __webpack_require__(0);\nvar _utils2 = _interopRequireDefault(_utils);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar User = function () {\n function User(player) {\n _classCallCheck(this, User);\n this.storageName = { volume: 'aplayer-volume' };\n this.default = { volume: player.options.volume || 0.7 };\n this.data = {};\n this.init();\n }\n _createClass(User, [\n {\n key: 'init',\n value: function init() {\n for (var item in this.storageName) {\n var name = this.storageName[item];\n this.data[item] = parseFloat(_utils2.default.storage.get(name) || this.default[item]);\n }\n }\n },\n {\n key: 'get',\n value: function get(key) {\n return this.data[key];\n }\n },\n {\n key: 'set',\n value: function set(key, value) {\n this.data[key] = value;\n _utils2.default.storage.set(this.storageName[key], value);\n }\n }\n ]);\n return User;\n}();\nexports.default = User;\n\n/***/ }),\n/* 30 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, '__esModule', { value: true });\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nvar _lrc = __webpack_require__(31);\nvar _lrc2 = _interopRequireDefault(_lrc);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Lrc = function () {\n function Lrc(options) {\n _classCallCheck(this, Lrc);\n this.container = options.container;\n this.async = options.async;\n this.player = options.player;\n this.content = options.content;\n this.parsed = [];\n this.index = 0;\n this.current = [];\n }\n _createClass(Lrc, [\n {\n key: 'update',\n value: function update() {\n var currentTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.player.audio.currentTime;\n if (this.index > this.current.length - 1 || currentTime < this.current[this.index][0] || !this.current[this.index + 1] || currentTime >= this.current[this.index + 1][0]) {\n for (var i = 0; i < this.current.length; i++) {\n if (currentTime >= this.current[i][0] && (!this.current[i + 1] || currentTime < this.current[i + 1][0])) {\n this.index = i;\n this.container.style.transform = 'translateY(' + -this.index * 16 + 'px)';\n this.container.style.webkitTransform = 'translateY(' + -this.index * 16 + 'px)';\n this.container.getElementsByClassName('aplayer-lrc-current')[0].classList.remove('aplayer-lrc-current');\n this.container.getElementsByTagName('p')[i].classList.add('aplayer-lrc-current');\n }\n }\n }\n }\n },\n {\n key: 'switch',\n value: function _switch(index) {\n var _this = this;\n if (!this.parsed[index]) {\n if (!this.async) {\n if (this.content[index]) {\n this.parsed[index] = this.parse(this.content[index]);\n } else {\n this.parsed[index] = [[\n '00:00',\n 'Not available'\n ]];\n }\n } else {\n this.parsed[index] = [[\n '00:00',\n 'Loading'\n ]];\n var xhr = new XMLHttpRequest();\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n if (xhr.status >= 200 && xhr.status < 300 || xhr.status === 304) {\n _this.parsed[index] = _this.parse(xhr.responseText);\n } else {\n console.log('Request was unsuccessful: ' + xhr.status);\n _this.parsed[index] = [[\n '00:00',\n 'Not available'\n ]];\n }\n _this.container.innerHTML = (0, _lrc2.default)({ lyrics: _this.parsed[index] });\n _this.update(0);\n _this.current = _this.parsed[index];\n }\n };\n var apiurl = this.content[index];\n xhr.open('get', apiurl, true);\n xhr.send(null);\n }\n }\n this.container.innerHTML = (0, _lrc2.default)({ lyrics: this.parsed[index] });\n this.update(0);\n this.current = this.parsed[index];\n }\n },\n {\n key: 'parse',\n value: function parse(lrc_s) {\n if (lrc_s) {\n lrc_s = lrc_s.replace(/([^\\]^\\n])\\[/g, function (match, p1) {\n return p1 + '\\n[';\n });\n var lyric = lrc_s.split('\\n');\n var lrc = [];\n var lyricLen = lyric.length;\n for (var i = 0; i < lyricLen; i++) {\n var lrcTimes = lyric[i].match(/\\[(\\d{2}):(\\d{2})(\\.(\\d{2,3}))?]/g);\n var lrcText = lyric[i].replace(/.*\\[(\\d{2}):(\\d{2})(\\.(\\d{2,3}))?]/g, '').replace(/<(\\d{2}):(\\d{2})(\\.(\\d{2,3}))?>/g, '').replace(/^\\s+|\\s+$/g, '');\n if (lrcTimes) {\n var timeLen = lrcTimes.length;\n for (var j = 0; j < timeLen; j++) {\n var oneTime = /\\[(\\d{2}):(\\d{2})(\\.(\\d{2,3}))?]/.exec(lrcTimes[j]);\n var min2sec = oneTime[1] * 60;\n var sec2sec = parseInt(oneTime[2]);\n var msec2sec = oneTime[4] ? parseInt(oneTime[4]) / ((oneTime[4] + '').length === 2 ? 100 : 1000) : 0;\n var lrcTime = min2sec + sec2sec + msec2sec;\n lrc.push([\n lrcTime,\n lrcText\n ]);\n }\n }\n }\n lrc.sort(function (a, b) {\n return a[0] - b[0];\n });\n return lrc;\n } else {\n return [];\n }\n }\n }\n ]);\n return Lrc;\n}();\nexports.default = Lrc;\n\n/***/ }),\n/* 31 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar $imports = __webpack_require__(3);\nmodule.exports = function ($data) {\n 'use strict';\n $data = $data || {};\n var $$out = '', $each = $imports.$each, lyrics = $data.lyrics, $value = $data.$value, $index = $data.$index, $escape = $imports.$escape;\n $each(lyrics, function ($value, $index) {\n $$out += '\\n lastPlayPos && !_this3.player.audio.paused) {\n _this3.player.container.classList.remove('aplayer-loading');\n bufferingDetected = false;\n }\n lastPlayPos = currentPlayPos;\n }\n }, 100);\n }\n },\n {\n key: 'enable',\n value: function enable(type) {\n this['enable' + type + 'Checker'] = true;\n if (type === 'fps') {\n this.initfpsChecker();\n }\n }\n },\n {\n key: 'disable',\n value: function disable(type) {\n this['enable' + type + 'Checker'] = false;\n }\n },\n {\n key: 'destroy',\n value: function destroy() {\n var _this4 = this;\n this.types.map(function (item) {\n _this4['enable' + item + 'Checker'] = false;\n _this4[item + 'Checker'] && clearInterval(_this4[item + 'Checker']);\n return item;\n });\n }\n }\n ]);\n return Timer;\n}();\nexports.default = Timer;\n\n/***/ }),\n/* 34 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, '__esModule', { value: true });\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Events = function () {\n function Events() {\n _classCallCheck(this, Events);\n this.events = {};\n this.audioEvents = [\n 'abort',\n 'canplay',\n 'canplaythrough',\n 'durationchange',\n 'emptied',\n 'ended',\n 'error',\n 'loadeddata',\n 'loadedmetadata',\n 'loadstart',\n 'mozaudioavailable',\n 'pause',\n 'play',\n 'playing',\n 'progress',\n 'ratechange',\n 'seeked',\n 'seeking',\n 'stalled',\n 'suspend',\n 'timeupdate',\n 'volumechange',\n 'waiting'\n ];\n this.playerEvents = [\n 'destroy',\n 'switchaudio',\n 'addaudio',\n 'removeaudio'\n ];\n }\n _createClass(Events, [\n {\n key: 'on',\n value: function on(name, callback) {\n if (this.type(name) && typeof callback === 'function') {\n if (!this.events[name]) {\n this.events[name] = [];\n }\n this.events[name].push(callback);\n }\n }\n },\n {\n key: 'trigger',\n value: function trigger(name, info) {\n if (this.events[name] && this.events[name].length) {\n for (var i = 0; i < this.events[name].length; i++) {\n this.events[name][i](info);\n }\n }\n }\n },\n {\n key: 'type',\n value: function type(name) {\n if (this.playerEvents.indexOf(name) !== -1) {\n return 'player';\n } else if (this.audioEvents.indexOf(name) !== -1) {\n return 'audio';\n }\n console.error('Unknown event name: ' + name);\n return null;\n }\n }\n ]);\n return Events;\n}();\nexports.default = Events;\n\n/***/ })\n/******/ ])[\"default\"];\n});\n\n\n// WEBPACK FOOTER //\n// APlayer.min.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 \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\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.l = 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// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 4);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap e40d0520cf9b07d68ca4","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nfunction _toConsumableArray(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n return arr2;\n } else {\n return Array.from(arr);\n }\n}\nvar isMobile = /mobile/i.test(window.navigator.userAgent);\nvar utils = {\n secondToTime: function secondToTime(second) {\n var add0 = function add0(num) {\n return num < 10 ? '0' + num : '' + num;\n };\n var hour = Math.floor(second / 3600);\n var min = Math.floor((second - hour * 3600) / 60);\n var sec = Math.floor(second - hour * 3600 - min * 60);\n return (hour > 0 ? [\n hour,\n min,\n sec\n ] : [\n min,\n sec\n ]).map(add0).join(':');\n },\n getElementViewLeft: function getElementViewLeft(element) {\n var actualLeft = element.offsetLeft;\n var current = element.offsetParent;\n var elementScrollLeft = document.body.scrollLeft + document.documentElement.scrollLeft;\n if (!document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement) {\n while (current !== null) {\n actualLeft += current.offsetLeft;\n current = current.offsetParent;\n }\n } else {\n while (current !== null && current !== element) {\n actualLeft += current.offsetLeft;\n current = current.offsetParent;\n }\n }\n return actualLeft - elementScrollLeft;\n },\n getElementViewTop: function getElementViewTop(element) {\n var actualTop = element.offsetTop;\n var current = element.offsetParent;\n var elementScrollTop = 0;\n while (current !== null) {\n actualTop += current.offsetTop;\n current = current.offsetParent;\n }\n elementScrollTop = document.body.scrollTop + document.documentElement.scrollTop;\n return actualTop - elementScrollTop;\n },\n isMobile: isMobile,\n storage: {\n set: function set(key, value) {\n localStorage.setItem(key, value);\n },\n get: function get(key) {\n return localStorage.getItem(key);\n }\n },\n nameMap: {\n dragStart: isMobile ? 'touchstart' : 'mousedown',\n dragMove: isMobile ? 'touchmove' : 'mousemove',\n dragEnd: isMobile ? 'touchend' : 'mouseup'\n },\n randomOrder: function randomOrder() {\n var length = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined.options.audio.length;\n function shuffle(arr) {\n for (var i = arr.length - 1; i >= 0; i--) {\n var randomIndex = Math.floor(Math.random() * (i + 1));\n var itemAtIndex = arr[randomIndex];\n arr[randomIndex] = arr[i];\n arr[i] = itemAtIndex;\n }\n return arr;\n }\n return shuffle([].concat(_toConsumableArray(Array(length))).map(function (item, i) {\n return i;\n }));\n }\n};\nexports.default = utils;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/js/utils.js\n// module id = 0\n// module chunks = 0","'use strict';\nvar _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;\n};\nvar g;\ng = function () {\n return this;\n}();\ntry {\n g = g || Function('return this')() || (1, eval)('this');\n} catch (e) {\n if ((typeof window === 'undefined' ? 'undefined' : _typeof(window)) === 'object')\n g = window;\n}\nmodule.exports = g;\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/global.js\n// module id = 1\n// module chunks = 0","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar _play = require('../assets/play.svg');\nvar _play2 = _interopRequireDefault(_play);\nvar _pause = require('../assets/pause.svg');\nvar _pause2 = _interopRequireDefault(_pause);\nvar _volumeUp = require('../assets/volume-up.svg');\nvar _volumeUp2 = _interopRequireDefault(_volumeUp);\nvar _volumeDown = require('../assets/volume-down.svg');\nvar _volumeDown2 = _interopRequireDefault(_volumeDown);\nvar _volumeOff = require('../assets/volume-off.svg');\nvar _volumeOff2 = _interopRequireDefault(_volumeOff);\nvar _orderRandom = require('../assets/order-random.svg');\nvar _orderRandom2 = _interopRequireDefault(_orderRandom);\nvar _orderList = require('../assets/order-list.svg');\nvar _orderList2 = _interopRequireDefault(_orderList);\nvar _menu = require('../assets/menu.svg');\nvar _menu2 = _interopRequireDefault(_menu);\nvar _loopAll = require('../assets/loop-all.svg');\nvar _loopAll2 = _interopRequireDefault(_loopAll);\nvar _loopOne = require('../assets/loop-one.svg');\nvar _loopOne2 = _interopRequireDefault(_loopOne);\nvar _loopNone = require('../assets/loop-none.svg');\nvar _loopNone2 = _interopRequireDefault(_loopNone);\nvar _loading = require('../assets/loading.svg');\nvar _loading2 = _interopRequireDefault(_loading);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\nvar Icons = {\n play: _play2.default,\n pause: _pause2.default,\n volumeUp: _volumeUp2.default,\n volumeDown: _volumeDown2.default,\n volumeOff: _volumeOff2.default,\n orderRandom: _orderRandom2.default,\n orderList: _orderList2.default,\n menu: _menu2.default,\n loopAll: _loopAll2.default,\n loopOne: _loopOne2.default,\n loopNone: _loopNone2.default,\n loading: _loading2.default\n};\nexports.default = Icons;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/js/icons.js\n// module id = 2\n// module chunks = 0","'use strict';\nmodule.exports = require('./compile/runtime');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/art-template/lib/runtime.js\n// module id = 3\n// module chunks = 0","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nrequire('../css/index.scss');\nvar _player = require('./player');\nvar _player2 = _interopRequireDefault(_player);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\nconsole.log('\\n' + ' %c APlayer v' + APLAYER_VERSION + ' ' + GIT_HASH + ' %c http://aplayer.js.org ' + '\\n' + '\\n', 'color: #fadfa3; background: #030307; padding:5px 0;', 'background: #fadfa3; padding:5px 0;');\nexports.default = _player2.default;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/js/index.js\n// module id = 4\n// module chunks = 0","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nvar _promisePolyfill = require('promise-polyfill');\nvar _promisePolyfill2 = _interopRequireDefault(_promisePolyfill);\nvar _utils = require('./utils');\nvar _utils2 = _interopRequireDefault(_utils);\nvar _icons = require('./icons');\nvar _icons2 = _interopRequireDefault(_icons);\nvar _options = require('./options');\nvar _options2 = _interopRequireDefault(_options);\nvar _template = require('./template');\nvar _template2 = _interopRequireDefault(_template);\nvar _bar = require('./bar');\nvar _bar2 = _interopRequireDefault(_bar);\nvar _user = require('./user');\nvar _user2 = _interopRequireDefault(_user);\nvar _lrc = require('./lrc');\nvar _lrc2 = _interopRequireDefault(_lrc);\nvar _controller = require('./controller');\nvar _controller2 = _interopRequireDefault(_controller);\nvar _timer = require('./timer');\nvar _timer2 = _interopRequireDefault(_timer);\nvar _events = require('./events');\nvar _events2 = _interopRequireDefault(_events);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar instances = [];\nvar APlayer = function () {\n function APlayer(options) {\n _classCallCheck(this, APlayer);\n this.options = (0, _options2.default)(options);\n this.container = this.options.container;\n this.playIndex = 0;\n this.paused = true;\n this.playedPromise = _promisePolyfill2.default.resolve();\n this.randomOrder = _utils2.default.randomOrder(this.options.audio.length);\n this.container.classList.add('aplayer');\n if (this.options.lrc) {\n this.container.classList.add('aplayer-withlrc');\n }\n if (this.options.audio.length > 1) {\n this.container.classList.add('aplayer-withlist');\n }\n if (_utils2.default.isMobile) {\n this.container.classList.add('aplayer-mobile');\n }\n this.arrow = this.container.offsetWidth <= 300;\n if (this.arrow) {\n this.container.classList.add('aplayer-arrow');\n }\n if (this.options.mini) {\n this.container.classList.add('aplayer-narrow');\n }\n this.container = this.options.container;\n if (this.options.lrc === 2 || this.options.lrc === true) {\n var lrcEle = this.container.getElementsByClassName('aplayer-lrc-content');\n for (var i = 0; i < lrcEle.length; i++) {\n if (this.options.audio[i]) {\n this.options.audio[i].lrc = lrcEle[i].innerHTML;\n }\n }\n }\n this.template = new _template2.default({\n container: this.container,\n options: this.options,\n randomOrder: this.randomOrder\n });\n if (this.template.info.offsetWidth < 200) {\n this.template.time.classList.add('aplayer-time-narrow');\n }\n if (this.options.lrc) {\n this.lrc = new _lrc2.default({\n container: this.template.lrc,\n async: this.options.lrc === 3,\n content: this.options.audio.map(function (item) {\n return item.lrc;\n }),\n player: this\n });\n }\n this.events = new _events2.default();\n this.user = new _user2.default(this);\n this.bar = new _bar2.default(this.template);\n this.controller = new _controller2.default(this);\n this.timer = new _timer2.default(this);\n this.initAudio();\n if (this.options.order === 'random') {\n this.switchAudio(this.randomOrder[0]);\n } else {\n this.switchAudio(0);\n }\n if (this.options.autoplay) {\n this.play();\n }\n instances.push(this);\n }\n _createClass(APlayer, [\n {\n key: 'initAudio',\n value: function initAudio() {\n var _this = this;\n this.audio = document.createElement('audio');\n this.audio.preload = this.options.preload;\n var _loop = function _loop(i) {\n _this.audio.addEventListener(_this.events.audioEvents[i], function () {\n _this.events.trigger(_this.events.audioEvents[i]);\n });\n };\n for (var i = 0; i < this.events.audioEvents.length; i++) {\n _loop(i);\n }\n this.on('play', function () {\n if (_this.paused) {\n _this.play();\n }\n });\n this.on('pause', function () {\n if (!_this.paused) {\n _this.pause();\n }\n });\n this.on('durationchange', function () {\n if (_this.audio.duration !== 1) {\n _this.template.dtime.innerHTML = _utils2.default.secondToTime(_this.audio.duration);\n }\n });\n this.on('progress', function () {\n var percentage = _this.audio.buffered.length ? _this.audio.buffered.end(_this.audio.buffered.length - 1) / _this.audio.duration : 0;\n _this.bar.set('loaded', percentage, 'width');\n });\n this.on('error', function () {\n _this.template.author.innerHTML = ' - Error happens \\u2565﹏\\u2565';\n });\n this.on('ended', function () {\n if (_this.options.loop === 'none') {\n if (_this.options.order === 'list') {\n if (_this.playIndex < _this.options.audio.length - 1) {\n _this.switchAudio((_this.playIndex + 1) % _this.options.audio.length);\n _this.play();\n } else {\n _this.switchAudio((_this.playIndex + 1) % _this.options.audio.length);\n _this.pause();\n }\n } else if (_this.options.order === 'random') {\n if (_this.randomOrder.indexOf(_this.playIndex) < _this.randomOrder.length - 1) {\n _this.switchAudio(_this.nextRandomNum());\n _this.play();\n } else {\n _this.switchAudio(_this.nextRandomNum());\n _this.pause();\n }\n }\n } else if (_this.options.loop === 'one') {\n _this.switchAudio(_this.playIndex);\n _this.play();\n } else if (_this.options.loop === 'all') {\n if (_this.options.order === 'list') {\n _this.switchAudio((_this.playIndex + 1) % _this.options.audio.length);\n } else if (_this.options.order === 'random') {\n _this.switchAudio(_this.nextRandomNum());\n }\n _this.play();\n }\n });\n this.volume(this.user.get('volume'), true);\n }\n },\n {\n key: 'switchAudio',\n value: function switchAudio(index) {\n var _this2 = this;\n this.handlePlayPromise(function () {\n _this2.events.trigger('switchaudio', index);\n if (typeof index !== 'undefined') {\n _this2.playIndex = index;\n }\n if (_this2.options.audio[_this2.playIndex].cover) {\n _this2.template.pic.style.backgroundImage = 'url(\\'' + _this2.options.audio[_this2.playIndex].cover + '\\')';\n } else {\n _this2.template.pic.style.backgroundImage = '';\n }\n _this2.template.title.innerHTML = _this2.options.audio[_this2.playIndex].name;\n _this2.template.author.innerHTML = _this2.options.audio[_this2.playIndex].artist ? ' - ' + _this2.options.audio[_this2.playIndex].artist : '';\n var light = _this2.container.getElementsByClassName('aplayer-list-light')[0];\n if (light) {\n light.classList.remove('aplayer-list-light');\n }\n _this2.container.querySelectorAll('.aplayer-list li')[_this2.playIndex].classList.add('aplayer-list-light');\n _this2.template.list.scrollTop = _this2.playIndex * 33;\n _this2.audio.src = _this2.options.audio[_this2.playIndex].url;\n _this2.seek(0);\n var playPromise = void 0;\n if (!_this2.paused) {\n playPromise = _promisePolyfill2.default.resolve(_this2.audio.play()).catch(function (err) {\n console.error(err);\n _this2.pause();\n });\n }\n _this2.lrc && _this2.lrc.switch(_this2.playIndex);\n if (_this2.audio.duration !== 1) {\n _this2.template.dtime.innerHTML = _this2.audio.duration ? _utils2.default.secondToTime(_this2.audio.duration) : '00:00';\n }\n return playPromise;\n });\n }\n },\n {\n key: 'seek',\n value: function seek(time) {\n time = Math.max(time, 0);\n if (this.audio.duration) {\n time = Math.min(time, this.audio.duration);\n }\n this.audio.currentTime = time;\n if (isNaN(this.audio.duration)) {\n this.bar.set('played', 0, 'width');\n } else {\n this.bar.set('played', time / this.audio.duration, 'width');\n }\n this.template.ptime.innerHTML = _utils2.default.secondToTime(time);\n }\n },\n {\n key: 'play',\n value: function play() {\n var _this3 = this;\n this.handlePlayPromise(function () {\n if (_this3.paused) {\n _this3.paused = false;\n _this3.template.button.classList.remove('aplayer-play');\n _this3.template.button.classList.add('aplayer-pause');\n _this3.template.button.innerHTML = '';\n setTimeout(function () {\n _this3.template.button.innerHTML = _icons2.default.pause;\n }, 100);\n }\n var playPromise = _promisePolyfill2.default.resolve(_this3.audio.play()).catch(function (err) {\n console.error(err);\n _this3.pause();\n });\n _this3.timer.enable('loading');\n _this3.timer.enable('progress');\n if (_this3.options.mutex) {\n for (var i = 0; i < instances.length; i++) {\n if (_this3 !== instances[i]) {\n instances[i].pause();\n }\n }\n }\n return playPromise;\n });\n }\n },\n {\n key: 'pause',\n value: function pause() {\n var _this4 = this;\n this.handlePlayPromise(function () {\n if (!_this4.paused) {\n _this4.paused = true;\n _this4.template.button.classList.remove('aplayer-pause');\n _this4.template.button.classList.add('aplayer-play');\n _this4.template.button.innerHTML = '';\n setTimeout(function () {\n _this4.template.button.innerHTML = _icons2.default.play;\n }, 100);\n }\n _this4.audio.pause();\n _this4.timer.disable('loading');\n _this4.timer.disable('progress');\n });\n }\n },\n {\n key: 'switchVolumeIcon',\n value: function switchVolumeIcon() {\n if (this.volume() >= 0.95) {\n this.template.volumeButton.innerHTML = _icons2.default.volumeUp;\n } else if (this.volume() > 0) {\n this.template.volumeButton.innerHTML = _icons2.default.volumeDown;\n } else {\n this.template.volumeButton.innerHTML = _icons2.default.volumeOff;\n }\n }\n },\n {\n key: 'volume',\n value: function volume(percentage, nostorage) {\n percentage = parseFloat(percentage);\n if (!isNaN(percentage)) {\n percentage = Math.max(percentage, 0);\n percentage = Math.min(percentage, 1);\n this.bar.set('volume', percentage, 'height');\n if (!nostorage) {\n this.user.set('volume', percentage);\n }\n this.audio.volume = percentage;\n if (this.audio.muted) {\n this.audio.muted = false;\n }\n this.switchVolumeIcon();\n }\n return this.audio.muted ? 0 : this.audio.volume;\n }\n },\n {\n key: 'on',\n value: function on(name, callback) {\n this.events.on(name, callback);\n }\n },\n {\n key: 'toggle',\n value: function toggle() {\n if (this.template.button.classList.contains('aplayer-play')) {\n this.play();\n } else if (this.template.button.classList.contains('aplayer-pause')) {\n this.pause();\n }\n }\n },\n {\n key: 'isMultiple',\n value: function isMultiple() {\n return this.options.audio.length > 1;\n }\n },\n {\n key: 'nextRandomNum',\n value: function nextRandomNum() {\n if (this.isMultiple()) {\n var index = this.randomOrder.indexOf(this.playIndex);\n if (index === this.randomOrder.length - 1) {\n return this.randomOrder[0];\n } else {\n return this.randomOrder[index + 1];\n }\n } else {\n return 0;\n }\n }\n },\n {\n key: 'addAudio',\n value: function addAudio(newMusic) {\n this.events.trigger('addaudio', newMusic);\n var wasSingle = !this.isMultiple();\n this.options.audio = this.options.audio.concat(newMusic);\n var newItemHTML = '';\n for (var i = 0; i < newMusic.length; i++) {\n newItemHTML += '
  • ' + (this.options.audio.length - newMusic.length + i + 1) + '' + newMusic[i].name + '' + newMusic[i].artist + '
  • ';\n }\n this.template.listOl.innerHTML += newItemHTML;\n if (wasSingle && this.isMultiple()) {\n this.container.classList.add('aplayer-withlist');\n this.audio.loop = false;\n }\n var songListLength = this.container.querySelectorAll('.aplayer-list li').length;\n this.template.list.style.height = songListLength * 33 - 1 + 'px';\n this.randomOrder = _utils2.default.randomOrder(this.options.audio.length);\n }\n },\n {\n key: 'removeAudio',\n value: function removeAudio(index) {\n this.events.trigger('removeaudio', index);\n if (this.options.audio[index] && this.options.audio.length > 1) {\n var list = this.container.querySelectorAll('.aplayer-list li');\n this.options.audio.splice(index, 1);\n if (index === this.playIndex) {\n if (this.options.audio[index + 1]) {\n this.switchAudio(index);\n } else {\n this.switchAudio(index - 1);\n }\n }\n if (this.playIndex > index) {\n this.playIndex--;\n }\n list[index].remove();\n for (var i = index; i < list.length; i++) {\n list[i].getElementsByClassName('aplayer-list-index')[0].textContent = i;\n }\n if (this.options.audio.length === 1) {\n this.container.classList.remove('aplayer-withlist');\n }\n this.template.list.style.height = parseInt(this.template.list.style.height, 10) - 33 + 'px';\n }\n }\n },\n {\n key: 'destroy',\n value: function destroy() {\n instances.splice(instances.indexOf(this), 1);\n this.pause();\n this.container.innerHTML = '';\n this.audio.src = '';\n this.timer.destroy();\n this.events.trigger('destroy');\n }\n },\n {\n key: 'handlePlayPromise',\n value: function handlePlayPromise(callback) {\n this.playedPromise = this.playedPromise.then(callback).catch(function (err) {\n console.error(err);\n });\n }\n }\n ]);\n return APlayer;\n}();\nexports.default = APlayer;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/js/player.js\n// module id = 6\n// module chunks = 0","'use strict';\nvar _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;\n};\nvar setTimeoutFunc = setTimeout;\nfunction noop() {\n}\nfunction bind(fn, thisArg) {\n return function () {\n fn.apply(thisArg, arguments);\n };\n}\nfunction Promise(fn) {\n if (!(this instanceof Promise))\n throw new TypeError('Promises must be constructed via new');\n if (typeof fn !== 'function')\n throw new TypeError('not a function');\n this._state = 0;\n this._handled = false;\n this._value = undefined;\n this._deferreds = [];\n doResolve(fn, this);\n}\nfunction handle(self, deferred) {\n while (self._state === 3) {\n self = self._value;\n }\n if (self._state === 0) {\n self._deferreds.push(deferred);\n return;\n }\n self._handled = true;\n Promise._immediateFn(function () {\n var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n (self._state === 1 ? resolve : reject)(deferred.promise, self._value);\n return;\n }\n var ret;\n try {\n ret = cb(self._value);\n } catch (e) {\n reject(deferred.promise, e);\n return;\n }\n resolve(deferred.promise, ret);\n });\n}\nfunction resolve(self, newValue) {\n try {\n if (newValue === self)\n throw new TypeError('A promise cannot be resolved with itself.');\n if (newValue && ((typeof newValue === 'undefined' ? 'undefined' : _typeof(newValue)) === 'object' || typeof newValue === 'function')) {\n var then = newValue.then;\n if (newValue instanceof Promise) {\n self._state = 3;\n self._value = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(bind(then, newValue), self);\n return;\n }\n }\n self._state = 1;\n self._value = newValue;\n finale(self);\n } catch (e) {\n reject(self, e);\n }\n}\nfunction reject(self, newValue) {\n self._state = 2;\n self._value = newValue;\n finale(self);\n}\nfunction finale(self) {\n if (self._state === 2 && self._deferreds.length === 0) {\n Promise._immediateFn(function () {\n if (!self._handled) {\n Promise._unhandledRejectionFn(self._value);\n }\n });\n }\n for (var i = 0, len = self._deferreds.length; i < len; i++) {\n handle(self, self._deferreds[i]);\n }\n self._deferreds = null;\n}\nfunction Handler(onFulfilled, onRejected, promise) {\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n}\nfunction doResolve(fn, self) {\n var done = false;\n try {\n fn(function (value) {\n if (done)\n return;\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done)\n return;\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done)\n return;\n done = true;\n reject(self, ex);\n }\n}\nPromise.prototype['catch'] = function (onRejected) {\n return this.then(null, onRejected);\n};\nPromise.prototype.then = function (onFulfilled, onRejected) {\n var prom = new this.constructor(noop);\n handle(this, new Handler(onFulfilled, onRejected, prom));\n return prom;\n};\nPromise.prototype['finally'] = function (callback) {\n var constructor = this.constructor;\n return this.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n return constructor.reject(reason);\n });\n });\n};\nPromise.all = function (arr) {\n return new Promise(function (resolve, reject) {\n if (!arr || typeof arr.length === 'undefined')\n throw new TypeError('Promise.all accepts an array');\n var args = Array.prototype.slice.call(arr);\n if (args.length === 0)\n return resolve([]);\n var remaining = args.length;\n function res(i, val) {\n try {\n if (val && ((typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object' || typeof val === 'function')) {\n var then = val.then;\n if (typeof then === 'function') {\n then.call(val, function (val) {\n res(i, val);\n }, reject);\n return;\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n } catch (ex) {\n reject(ex);\n }\n }\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n};\nPromise.resolve = function (value) {\n if (value && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.constructor === Promise) {\n return value;\n }\n return new Promise(function (resolve) {\n resolve(value);\n });\n};\nPromise.reject = function (value) {\n return new Promise(function (resolve, reject) {\n reject(value);\n });\n};\nPromise.race = function (values) {\n return new Promise(function (resolve, reject) {\n for (var i = 0, len = values.length; i < len; i++) {\n values[i].then(resolve, reject);\n }\n });\n};\nPromise._immediateFn = typeof setImmediate === 'function' && function (fn) {\n setImmediate(fn);\n} || function (fn) {\n setTimeoutFunc(fn, 0);\n};\nPromise._unhandledRejectionFn = function _unhandledRejectionFn(err) {\n if (typeof console !== 'undefined' && console) {\n console.warn('Possible Unhandled Promise Rejection:', err);\n }\n};\nmodule.exports = Promise;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/promise-polyfill/lib/index.js\n// module id = 7\n// module chunks = 0","'use strict';\nvar apply = Function.prototype.apply;\nexports.setTimeout = function () {\n return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout);\n};\nexports.setInterval = function () {\n return new Timeout(apply.call(setInterval, window, arguments), clearInterval);\n};\nexports.clearTimeout = exports.clearInterval = function (timeout) {\n if (timeout) {\n timeout.close();\n }\n};\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function () {\n};\nTimeout.prototype.close = function () {\n this._clearFn.call(window, this._id);\n};\nexports.enroll = function (item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\nexports.unenroll = function (item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\nexports._unrefActive = exports.active = function (item) {\n clearTimeout(item._idleTimeoutId);\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\nrequire('setimmediate');\nexports.setImmediate = setImmediate;\nexports.clearImmediate = clearImmediate;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/timers-browserify/main.js\n// module id = 8\n// module chunks = 0","'use strict';\n(function (global, undefined) {\n 'use strict';\n if (global.setImmediate) {\n return;\n }\n var nextHandle = 1;\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n function setImmediate(callback) {\n if (typeof callback !== 'function') {\n callback = new Function('' + callback);\n }\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n var task = {\n callback: callback,\n args: args\n };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n function runIfPresent(handle) {\n if (currentlyRunningATask) {\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n function installNextTickImplementation() {\n registerImmediate = function registerImmediate(handle) {\n process.nextTick(function () {\n runIfPresent(handle);\n });\n };\n }\n function canUsePostMessage() {\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function () {\n postMessageIsAsynchronous = false;\n };\n global.postMessage('', '*');\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n function installPostMessageImplementation() {\n var messagePrefix = 'setImmediate$' + Math.random() + '$';\n var onGlobalMessage = function onGlobalMessage(event) {\n if (event.source === global && typeof event.data === 'string' && event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n if (global.addEventListener) {\n global.addEventListener('message', onGlobalMessage, false);\n } else {\n global.attachEvent('onmessage', onGlobalMessage);\n }\n registerImmediate = function registerImmediate(handle) {\n global.postMessage(messagePrefix + handle, '*');\n };\n }\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function (event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n registerImmediate = function registerImmediate(handle) {\n channel.port2.postMessage(handle);\n };\n }\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function registerImmediate(handle) {\n var script = doc.createElement('script');\n script.onreadystatechange = function () {\n runIfPresent(handle);\n script.onreadystatechange = null;\n html.removeChild(script);\n script = null;\n };\n html.appendChild(script);\n };\n }\n function installSetTimeoutImplementation() {\n registerImmediate = function registerImmediate(handle) {\n setTimeout(runIfPresent, 0, handle);\n };\n }\n var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);\n attachTo = attachTo && attachTo.setTimeout ? attachTo : global;\n if ({}.toString.call(global.process) === '[object process]') {\n installNextTickImplementation();\n } else if (canUsePostMessage()) {\n installPostMessageImplementation();\n } else if (global.MessageChannel) {\n installMessageChannelImplementation();\n } else if (doc && 'onreadystatechange' in doc.createElement('script')) {\n installReadyStateChangeImplementation();\n } else {\n installSetTimeoutImplementation();\n }\n attachTo.setImmediate = setImmediate;\n attachTo.clearImmediate = clearImmediate;\n}(typeof self === 'undefined' ? typeof global === 'undefined' ? undefined : global : self));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/setimmediate/setImmediate.js\n// module id = 9\n// module chunks = 0","'use strict';\nvar process = module.exports = {};\nvar cachedSetTimeout;\nvar cachedClearTimeout;\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout() {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n}());\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n return setTimeout(fun, 0);\n }\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n return cachedSetTimeout(fun, 0);\n } catch (e) {\n try {\n return cachedSetTimeout.call(null, fun, 0);\n } catch (e) {\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n return clearTimeout(marker);\n }\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n return cachedClearTimeout(marker);\n } catch (e) {\n try {\n return cachedClearTimeout.call(null, marker);\n } catch (e) {\n return cachedClearTimeout.call(this, marker);\n }\n }\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n var len = queue.length;\n while (len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = '';\nprocess.versions = {};\nfunction noop() {\n}\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\nprocess.listeners = function (name) {\n return [];\n};\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\nprocess.cwd = function () {\n return '/';\n};\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function () {\n return 0;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/process/browser.js\n// module id = 10\n// module chunks = 0","module.exports = \"\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/assets/play.svg\n// module id = 11\n// module chunks = 0","module.exports = \"\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/assets/pause.svg\n// module id = 12\n// module chunks = 0","module.exports = \"\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/assets/volume-up.svg\n// module id = 13\n// module chunks = 0","module.exports = \"\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/assets/volume-down.svg\n// module id = 14\n// module chunks = 0","module.exports = \"\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/assets/volume-off.svg\n// module id = 15\n// module chunks = 0","module.exports = \"\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/assets/order-random.svg\n// module id = 16\n// module chunks = 0","module.exports = \"\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/assets/order-list.svg\n// module id = 17\n// module chunks = 0","module.exports = \"\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/assets/menu.svg\n// module id = 18\n// module chunks = 0","module.exports = \"\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/assets/loop-all.svg\n// module id = 19\n// module chunks = 0","module.exports = \"\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/assets/loop-one.svg\n// module id = 20\n// module chunks = 0","module.exports = \"\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/assets/loop-none.svg\n// module id = 21\n// module chunks = 0","module.exports = \"\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/assets/loading.svg\n// module id = 22\n// module chunks = 0","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nexports.default = function (options) {\n var defaultOption = {\n container: options.element || document.getElementsByClassName('aplayer')[0],\n mini: options.narrow || false,\n autoplay: false,\n mutex: true,\n lrc: options.showlrc || 0,\n preload: 'auto',\n theme: '#b7daff',\n loop: 'all',\n order: 'list',\n volume: 0.7,\n listFolded: false,\n listMaxHeight: options.listmaxheight,\n audio: options.music\n };\n for (var defaultKey in defaultOption) {\n if (defaultOption.hasOwnProperty(defaultKey) && !options.hasOwnProperty(defaultKey)) {\n options[defaultKey] = defaultOption[defaultKey];\n }\n }\n if (Object.prototype.toString.call(options.audio) !== '[object Array]') {\n options.audio = [options.audio];\n }\n options.audio.map(function (item) {\n item.name = item.name || item.title;\n item.artist = item.artist || item.author;\n item.cover = item.cover || item.pic;\n return item;\n });\n if (options.audio.length <= 1 && options.loop === 'one') {\n options.loop = 'all';\n }\n return options;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/js/options.js\n// module id = 23\n// module chunks = 0","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nvar _icons = require('./icons');\nvar _icons2 = _interopRequireDefault(_icons);\nvar _player = require('../template/player.art');\nvar _player2 = _interopRequireDefault(_player);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Template = function () {\n function Template(options) {\n _classCallCheck(this, Template);\n this.container = options.container;\n this.options = options.options;\n this.randomOrder = options.randomOrder;\n this.init();\n }\n _createClass(Template, [{\n key: 'init',\n value: function init() {\n var cover = void 0;\n if (this.options.order === 'random') {\n cover = this.options.audio[this.randomOrder[0]].cover;\n } else {\n cover = this.options.audio[0].cover;\n }\n this.container.innerHTML = (0, _player2.default)({\n options: this.options,\n icons: _icons2.default,\n cover: cover\n });\n this.lrc = this.container.querySelector('.aplayer-lrc-contents');\n this.ptime = this.container.querySelector('.aplayer-ptime');\n this.info = this.container.querySelector('.aplayer-info');\n this.time = this.container.querySelector('.aplayer-time');\n this.barWrap = this.container.querySelector('.aplayer-bar-wrap');\n this.button = this.container.querySelector('.aplayer-button');\n this.list = this.container.querySelector('.aplayer-list');\n this.listOl = this.container.querySelector('.aplayer-list ol');\n this.played = this.container.querySelector('.aplayer-played');\n this.loaded = this.container.querySelector('.aplayer-loaded');\n this.thumb = this.container.querySelector('.aplayer-thumb');\n this.volume = this.container.querySelector('.aplayer-volume');\n this.volumeBar = this.container.querySelector('.aplayer-volume-bar');\n this.volumeButton = this.container.querySelector('.aplayer-time button');\n this.volumeBarWrap = this.container.querySelector('.aplayer-volume-bar-wrap');\n this.loop = this.container.querySelector('.aplayer-icon-loop');\n this.order = this.container.querySelector('.aplayer-icon-order');\n this.menu = this.container.querySelector('.aplayer-icon-menu');\n this.pic = this.container.querySelector('.aplayer-pic');\n this.title = this.container.querySelector('.aplayer-title');\n this.author = this.container.querySelector('.aplayer-author');\n this.dtime = this.container.querySelector('.aplayer-dtime');\n }\n }]);\n return Template;\n}();\nexports.default = Template;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/js/template.js\n// module id = 24\n// module chunks = 0","
    \n
    {{@ icons.play }}
    \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n {{@ icons.loading }}\n \n
    \n
    \n
    \n
    \n \n - 00:00 / 00:00\n \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n {{ if options.audio.length > 1 }}\n \n {{ /if }}\n \n \n
    \n
    \n
    \n
    \n
      \n {{each options.audio}}\n
    1. \n \n {{ $index + 1 }}\n {{ $value.name }}\n {{ $value.artist }}\n
    2. \n {{/each}}\n
    \n
    \n\n\n// WEBPACK FOOTER //\n// ./src/template/player.art","'use strict';\nvar detectNode = require('detect-node');\nvar runtime = Object.create(detectNode ? global : window);\nvar ESCAPE_REG = /[\"&'<>]/;\nruntime.$escape = function (content) {\n return xmlEscape(toString(content));\n};\nruntime.$each = function (data, callback) {\n if (Array.isArray(data)) {\n for (var i = 0, len = data.length; i < len; i++) {\n callback(data[i], i);\n }\n } else {\n for (var _i in data) {\n callback(data[_i], _i);\n }\n }\n};\nfunction toString(value) {\n if (typeof value !== 'string') {\n if (value === undefined || value === null) {\n value = '';\n } else if (typeof value === 'function') {\n value = toString(value.call(value));\n } else {\n value = JSON.stringify(value);\n }\n }\n return value;\n}\n;\nfunction xmlEscape(content) {\n var html = '' + content;\n var regexResult = ESCAPE_REG.exec(html);\n if (!regexResult) {\n return content;\n }\n var result = '';\n var i = void 0, lastIndex = void 0, char = void 0;\n for (i = regexResult.index, lastIndex = 0; i < html.length; i++) {\n switch (html.charCodeAt(i)) {\n case 34:\n char = '"';\n break;\n case 38:\n char = '&';\n break;\n case 39:\n char = ''';\n break;\n case 60:\n char = '<';\n break;\n case 62:\n char = '>';\n break;\n default:\n continue;\n }\n if (lastIndex !== i) {\n result += html.substring(lastIndex, i);\n }\n lastIndex = i + 1;\n result += char;\n }\n if (lastIndex !== i) {\n return result + html.substring(lastIndex, i);\n } else {\n return result;\n }\n}\n;\nmodule.exports = runtime;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/art-template/lib/compile/runtime.js\n// module id = 26\n// module chunks = 0","'use strict';\nmodule.exports = false;\ntry {\n module.exports = Object.prototype.toString.call(global.process) === '[object process]';\n} catch (e) {\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/detect-node/index.js\n// module id = 27\n// module chunks = 0","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Bar = function () {\n function Bar(template) {\n _classCallCheck(this, Bar);\n this.elements = {};\n this.elements.volume = template.volume;\n this.elements.played = template.played;\n this.elements.loaded = template.loaded;\n }\n _createClass(Bar, [\n {\n key: 'set',\n value: function set(type, percentage, direction) {\n percentage = Math.max(percentage, 0);\n percentage = Math.min(percentage, 1);\n this.elements[type].style[direction] = percentage * 100 + '%';\n }\n },\n {\n key: 'get',\n value: function get(type, direction) {\n return parseFloat(this.elements[type].style[direction]) / 100;\n }\n }\n ]);\n return Bar;\n}();\nexports.default = Bar;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/js/bar.js\n// module id = 28\n// module chunks = 0","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nvar _utils = require('./utils');\nvar _utils2 = _interopRequireDefault(_utils);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar User = function () {\n function User(player) {\n _classCallCheck(this, User);\n this.storageName = { volume: 'aplayer-volume' };\n this.default = { volume: player.options.volume || 0.7 };\n this.data = {};\n this.init();\n }\n _createClass(User, [\n {\n key: 'init',\n value: function init() {\n for (var item in this.storageName) {\n var name = this.storageName[item];\n this.data[item] = parseFloat(_utils2.default.storage.get(name) || this.default[item]);\n }\n }\n },\n {\n key: 'get',\n value: function get(key) {\n return this.data[key];\n }\n },\n {\n key: 'set',\n value: function set(key, value) {\n this.data[key] = value;\n _utils2.default.storage.set(this.storageName[key], value);\n }\n }\n ]);\n return User;\n}();\nexports.default = User;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/js/user.js\n// module id = 29\n// module chunks = 0","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nvar _lrc = require('../template/lrc.art');\nvar _lrc2 = _interopRequireDefault(_lrc);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Lrc = function () {\n function Lrc(options) {\n _classCallCheck(this, Lrc);\n this.container = options.container;\n this.async = options.async;\n this.player = options.player;\n this.content = options.content;\n this.parsed = [];\n this.index = 0;\n this.current = [];\n }\n _createClass(Lrc, [\n {\n key: 'update',\n value: function update() {\n var currentTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.player.audio.currentTime;\n if (this.index > this.current.length - 1 || currentTime < this.current[this.index][0] || !this.current[this.index + 1] || currentTime >= this.current[this.index + 1][0]) {\n for (var i = 0; i < this.current.length; i++) {\n if (currentTime >= this.current[i][0] && (!this.current[i + 1] || currentTime < this.current[i + 1][0])) {\n this.index = i;\n this.container.style.transform = 'translateY(' + -this.index * 16 + 'px)';\n this.container.style.webkitTransform = 'translateY(' + -this.index * 16 + 'px)';\n this.container.getElementsByClassName('aplayer-lrc-current')[0].classList.remove('aplayer-lrc-current');\n this.container.getElementsByTagName('p')[i].classList.add('aplayer-lrc-current');\n }\n }\n }\n }\n },\n {\n key: 'switch',\n value: function _switch(index) {\n var _this = this;\n if (!this.parsed[index]) {\n if (!this.async) {\n if (this.content[index]) {\n this.parsed[index] = this.parse(this.content[index]);\n } else {\n this.parsed[index] = [[\n '00:00',\n 'Not available'\n ]];\n }\n } else {\n this.parsed[index] = [[\n '00:00',\n 'Loading'\n ]];\n var xhr = new XMLHttpRequest();\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n if (xhr.status >= 200 && xhr.status < 300 || xhr.status === 304) {\n _this.parsed[index] = _this.parse(xhr.responseText);\n } else {\n console.log('Request was unsuccessful: ' + xhr.status);\n _this.parsed[index] = [[\n '00:00',\n 'Not available'\n ]];\n }\n _this.container.innerHTML = (0, _lrc2.default)({ lyrics: _this.parsed[index] });\n _this.update(0);\n _this.current = _this.parsed[index];\n }\n };\n var apiurl = this.content[index];\n xhr.open('get', apiurl, true);\n xhr.send(null);\n }\n }\n this.container.innerHTML = (0, _lrc2.default)({ lyrics: this.parsed[index] });\n this.update(0);\n this.current = this.parsed[index];\n }\n },\n {\n key: 'parse',\n value: function parse(lrc_s) {\n if (lrc_s) {\n lrc_s = lrc_s.replace(/([^\\]^\\n])\\[/g, function (match, p1) {\n return p1 + '\\n[';\n });\n var lyric = lrc_s.split('\\n');\n var lrc = [];\n var lyricLen = lyric.length;\n for (var i = 0; i < lyricLen; i++) {\n var lrcTimes = lyric[i].match(/\\[(\\d{2}):(\\d{2})(\\.(\\d{2,3}))?]/g);\n var lrcText = lyric[i].replace(/.*\\[(\\d{2}):(\\d{2})(\\.(\\d{2,3}))?]/g, '').replace(/<(\\d{2}):(\\d{2})(\\.(\\d{2,3}))?>/g, '').replace(/^\\s+|\\s+$/g, '');\n if (lrcTimes) {\n var timeLen = lrcTimes.length;\n for (var j = 0; j < timeLen; j++) {\n var oneTime = /\\[(\\d{2}):(\\d{2})(\\.(\\d{2,3}))?]/.exec(lrcTimes[j]);\n var min2sec = oneTime[1] * 60;\n var sec2sec = parseInt(oneTime[2]);\n var msec2sec = oneTime[4] ? parseInt(oneTime[4]) / ((oneTime[4] + '').length === 2 ? 100 : 1000) : 0;\n var lrcTime = min2sec + sec2sec + msec2sec;\n lrc.push([\n lrcTime,\n lrcText\n ]);\n }\n }\n }\n lrc.sort(function (a, b) {\n return a[0] - b[0];\n });\n return lrc;\n } else {\n return [];\n }\n }\n }\n ]);\n return Lrc;\n}();\nexports.default = Lrc;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/js/lrc.js\n// module id = 30\n// module chunks = 0","{{each lyrics}}\n {{$value[1]}}

    \n{{/each}}\n\n\n// WEBPACK FOOTER //\n// ./src/template/lrc.art","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nvar _utils = require('./utils');\nvar _utils2 = _interopRequireDefault(_utils);\nvar _icons = require('./icons');\nvar _icons2 = _interopRequireDefault(_icons);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Controller = function () {\n function Controller(player) {\n _classCallCheck(this, Controller);\n this.player = player;\n this.initPlayButton();\n this.initList();\n this.initPlayBar();\n if (this.player.isMultiple()) {\n this.initOrderButton();\n }\n this.initLoopButton();\n this.initMenuButton();\n if (!_utils2.default.isMobile) {\n this.initVolumeButton();\n }\n }\n _createClass(Controller, [\n {\n key: 'initPlayButton',\n value: function initPlayButton() {\n var _this = this;\n this.player.template.pic.addEventListener('click', function () {\n _this.player.toggle();\n });\n }\n },\n {\n key: 'initList',\n value: function initList() {\n var _this2 = this;\n this.player.template.list.addEventListener('click', function (e) {\n var target = void 0;\n if (e.target.tagName.toUpperCase() === 'LI') {\n target = e.target;\n } else {\n target = e.target.parentElement;\n }\n var audioIndex = parseInt(target.getElementsByClassName('aplayer-list-index')[0].innerHTML) - 1;\n if (audioIndex !== _this2.player.playIndex) {\n _this2.player.switchAudio(audioIndex);\n _this2.player.play();\n } else {\n _this2.player.toggle();\n }\n });\n }\n },\n {\n key: 'initPlayBar',\n value: function initPlayBar() {\n var _this3 = this;\n var thumbMove = function thumbMove(e) {\n var percentage = ((e.clientX || e.changedTouches[0].clientX) - _utils2.default.getElementViewLeft(_this3.player.template.barWrap)) / _this3.player.template.barWrap.clientWidth;\n percentage = Math.max(percentage, 0);\n percentage = Math.min(percentage, 1);\n _this3.player.bar.set('played', percentage, 'width');\n _this3.player.lrc && _this3.player.lrc.update(percentage * _this3.player.audio.duration);\n _this3.player.template.ptime.innerHTML = _utils2.default.secondToTime(percentage * _this3.player.audio.duration);\n };\n var thumbUp = function thumbUp(e) {\n document.removeEventListener(_utils2.default.nameMap.dragEnd, thumbUp);\n document.removeEventListener(_utils2.default.nameMap.dragMove, thumbMove);\n var percentage = ((e.clientX || e.changedTouches[0].clientX) - _utils2.default.getElementViewLeft(_this3.player.template.barWrap)) / _this3.player.template.barWrap.clientWidth;\n percentage = Math.max(percentage, 0);\n percentage = Math.min(percentage, 1);\n _this3.player.bar.set('played', percentage, 'width');\n _this3.player.seek(_this3.player.bar.get('played', 'width') * _this3.player.audio.duration);\n _this3.player.timer.enable('progress');\n };\n this.player.template.barWrap.addEventListener(_utils2.default.nameMap.dragStart, function () {\n _this3.player.timer.disable('progress');\n document.addEventListener(_utils2.default.nameMap.dragMove, thumbMove);\n document.addEventListener(_utils2.default.nameMap.dragEnd, thumbUp);\n });\n }\n },\n {\n key: 'initVolumeButton',\n value: function initVolumeButton() {\n var _this4 = this;\n this.player.template.volumeButton.addEventListener('click', function () {\n if (_this4.player.audio.muted) {\n _this4.player.audio.muted = false;\n _this4.player.switchVolumeIcon();\n _this4.player.bar.set('volume', _this4.player.volume(), 'height');\n } else {\n _this4.player.audio.muted = true;\n _this4.player.switchVolumeIcon();\n _this4.player.bar.set('volume', 0, 'height');\n }\n });\n var thumbMove = function thumbMove(e) {\n var percentage = 1 - ((e.clientY || e.changedTouches[0].clientY) - _utils2.default.getElementViewTop(_this4.player.template.volumeBar)) / _this4.player.template.volumeBar.clientHeight;\n percentage = Math.max(percentage, 0);\n percentage = Math.min(percentage, 1);\n _this4.player.volume(percentage);\n };\n var thumbUp = function thumbUp(e) {\n _this4.player.template.volumeBarWrap.classList.remove('aplayer-volume-bar-wrap-active');\n document.removeEventListener(_utils2.default.nameMap.dragEnd, thumbUp);\n document.removeEventListener(_utils2.default.nameMap.dragMove, thumbMove);\n var percentage = 1 - ((e.clientY || e.changedTouches[0].clientY) - _utils2.default.getElementViewTop(_this4.player.template.volumeBar)) / _this4.player.template.volumeBar.clientHeight;\n percentage = Math.max(percentage, 0);\n percentage = Math.min(percentage, 1);\n _this4.player.volume(percentage);\n };\n this.player.template.volumeBarWrap.addEventListener(_utils2.default.nameMap.dragStart, function () {\n _this4.player.template.volumeBarWrap.classList.add('aplayer-volume-bar-wrap-active');\n document.addEventListener(_utils2.default.nameMap.dragMove, thumbMove);\n document.addEventListener(_utils2.default.nameMap.dragEnd, thumbUp);\n });\n }\n },\n {\n key: 'initOrderButton',\n value: function initOrderButton() {\n var _this5 = this;\n this.player.template.order.addEventListener('click', function () {\n if (_this5.player.options.order === 'list') {\n _this5.player.options.order = 'random';\n _this5.player.template.order.innerHTML = _icons2.default.orderRandom;\n } else if (_this5.player.options.order === 'random') {\n _this5.player.options.order = 'list';\n _this5.player.template.order.innerHTML = _icons2.default.orderList;\n }\n });\n }\n },\n {\n key: 'initLoopButton',\n value: function initLoopButton() {\n var _this6 = this;\n this.player.template.loop.addEventListener('click', function () {\n if (_this6.player.isMultiple()) {\n if (_this6.player.options.loop === 'one') {\n _this6.player.options.loop = 'none';\n _this6.player.template.loop.innerHTML = _icons2.default.loopNone;\n } else if (_this6.player.options.loop === 'none') {\n _this6.player.options.loop = 'all';\n _this6.player.template.loop.innerHTML = _icons2.default.loopAll;\n } else if (_this6.player.options.loop === 'all') {\n _this6.player.options.loop = 'one';\n _this6.player.template.loop.innerHTML = _icons2.default.loopOne;\n }\n } else {\n if (_this6.player.options.loop === 'one' || _this6.player.options.loop === 'all') {\n _this6.player.options.loop = 'none';\n _this6.player.template.loop.innerHTML = _icons2.default.loopNone;\n } else if (_this6.player.options.loop === 'none') {\n _this6.player.options.loop = 'all';\n _this6.player.template.loop.innerHTML = _icons2.default.loopAll;\n }\n }\n });\n }\n },\n {\n key: 'initMenuButton',\n value: function initMenuButton() {\n var _this7 = this;\n this.player.template.list.style.height = 33 * this.player.options.audio.length - 1 + 'px';\n this.player.template.menu.addEventListener('click', function () {\n if (!_this7.player.template.list.classList.contains('aplayer-list-hide')) {\n _this7.player.template.list.classList.add('aplayer-list-hide');\n } else {\n _this7.player.template.list.classList.remove('aplayer-list-hide');\n }\n });\n }\n }\n ]);\n return Controller;\n}();\nexports.default = Controller;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/js/controller.js\n// module id = 32\n// module chunks = 0","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nvar _utils = require('./utils');\nvar _utils2 = _interopRequireDefault(_utils);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Timer = function () {\n function Timer(player) {\n _classCallCheck(this, Timer);\n this.player = player;\n window.requestAnimationFrame = function () {\n return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (callback) {\n window.setTimeout(callback, 1000 / 60);\n };\n }();\n this.types = [\n 'loading',\n 'progress'\n ];\n this.init();\n }\n _createClass(Timer, [\n {\n key: 'init',\n value: function init() {\n var _this = this;\n this.types.map(function (item) {\n _this['init' + item + 'Checker']();\n return item;\n });\n }\n },\n {\n key: 'initprogressChecker',\n value: function initprogressChecker() {\n var _this2 = this;\n this.progressChecker = setInterval(function () {\n if (_this2.enableprogressChecker) {\n _this2.player.bar.set('played', _this2.player.audio.currentTime / _this2.player.audio.duration, 'width');\n _this2.player.lrc && _this2.player.lrc.update();\n var currentTime = _utils2.default.secondToTime(_this2.player.audio.currentTime);\n if (_this2.player.template.ptime.innerHTML !== currentTime) {\n _this2.player.template.ptime.innerHTML = currentTime;\n }\n }\n }, 100);\n }\n },\n {\n key: 'initloadingChecker',\n value: function initloadingChecker() {\n var _this3 = this;\n var lastPlayPos = 0;\n var currentPlayPos = 0;\n var bufferingDetected = false;\n this.loadingChecker = setInterval(function () {\n if (_this3.enableloadingChecker) {\n currentPlayPos = _this3.player.audio.currentTime;\n if (!bufferingDetected && currentPlayPos === lastPlayPos && !_this3.player.audio.paused) {\n _this3.player.container.classList.add('aplayer-loading');\n bufferingDetected = true;\n }\n if (bufferingDetected && currentPlayPos > lastPlayPos && !_this3.player.audio.paused) {\n _this3.player.container.classList.remove('aplayer-loading');\n bufferingDetected = false;\n }\n lastPlayPos = currentPlayPos;\n }\n }, 100);\n }\n },\n {\n key: 'enable',\n value: function enable(type) {\n this['enable' + type + 'Checker'] = true;\n if (type === 'fps') {\n this.initfpsChecker();\n }\n }\n },\n {\n key: 'disable',\n value: function disable(type) {\n this['enable' + type + 'Checker'] = false;\n }\n },\n {\n key: 'destroy',\n value: function destroy() {\n var _this4 = this;\n this.types.map(function (item) {\n _this4['enable' + item + 'Checker'] = false;\n _this4[item + 'Checker'] && clearInterval(_this4[item + 'Checker']);\n return item;\n });\n }\n }\n ]);\n return Timer;\n}();\nexports.default = Timer;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/js/timer.js\n// module id = 33\n// module chunks = 0","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Events = function () {\n function Events() {\n _classCallCheck(this, Events);\n this.events = {};\n this.audioEvents = [\n 'abort',\n 'canplay',\n 'canplaythrough',\n 'durationchange',\n 'emptied',\n 'ended',\n 'error',\n 'loadeddata',\n 'loadedmetadata',\n 'loadstart',\n 'mozaudioavailable',\n 'pause',\n 'play',\n 'playing',\n 'progress',\n 'ratechange',\n 'seeked',\n 'seeking',\n 'stalled',\n 'suspend',\n 'timeupdate',\n 'volumechange',\n 'waiting'\n ];\n this.playerEvents = [\n 'destroy',\n 'switchaudio',\n 'addaudio',\n 'removeaudio'\n ];\n }\n _createClass(Events, [\n {\n key: 'on',\n value: function on(name, callback) {\n if (this.type(name) && typeof callback === 'function') {\n if (!this.events[name]) {\n this.events[name] = [];\n }\n this.events[name].push(callback);\n }\n }\n },\n {\n key: 'trigger',\n value: function trigger(name, info) {\n if (this.events[name] && this.events[name].length) {\n for (var i = 0; i < this.events[name].length; i++) {\n this.events[name][i](info);\n }\n }\n }\n },\n {\n key: 'type',\n value: function type(name) {\n if (this.playerEvents.indexOf(name) !== -1) {\n return 'player';\n } else if (this.audioEvents.indexOf(name) !== -1) {\n return 'audio';\n }\n console.error('Unknown event name: ' + name);\n return null;\n }\n }\n ]);\n return Events;\n}();\nexports.default = Events;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/js/events.js\n// module id = 34\n// module chunks = 0"],"sourceRoot":""} diff --git a/assets/Meting.min.js b/assets/Meting.min.js index e6b9984..9405db6 100644 --- a/assets/Meting.min.js +++ b/assets/Meting.min.js @@ -1 +1 @@ -"use strict";console.log("\n %c MetingJS 1.0.1 %c https://github.com/metowolf/MetingJS \n\n","color: #fff; background-image: linear-gradient(90deg, rgb(47, 172, 178) 0%, rgb(45, 190, 96) 100%); padding:5px 1px;","background-image: linear-gradient(90deg, rgb(45, 190, 96) 0%, rgb(255, 255, 255) 100%); padding:5px 0;");var aplayers=[];function loadMeting(){function a(a,b){var c=[],d=a.dataset;c.element=a,c.music=b,c.showlrc=c.music[0].lrc?3:0,c.narrow="true"===d.narrow,c.autoplay="true"===d.autoplay,c.mutex="false"!==d.mutex,c.mode=d.mode||"circulation",c.preload=d.preload||"auto",c.listmaxheight=d.listmaxheight||"340px",c.theme=d.theme||"#ad7a86",aplayers.push(new APlayer(c))}var b="https://api.i-meto.com/meting/api?server=:server&type=:type&id=:id&r=:r";"undefined"!=typeof meting_api&&(b=meting_api);var c=document.querySelectorAll(".aplayer"),d=!0,e=!1,f=void 0;try{for(var g,h=function(){var c=g.value,d=c.dataset.id;if(d){var e=b;e=e.replace(":server",c.dataset.server),e=e.replace(":type",c.dataset.type),e=e.replace(":id",c.dataset.id),e=e.replace(":r",Math.random());var f=new XMLHttpRequest;f.onreadystatechange=function(){if(4===f.readyState&&(200<=f.status&&300>f.status||304===f.status)){var b=JSON.parse(f.responseText);a(c,b)}},f.open("get",e,!0),f.send(null)}else{var h=[{title:c.dataset.title,author:c.dataset.author,url:c.dataset.url,pic:c.dataset.pic,lrc:c.dataset.lrc}];a(c,h)}},i=c[Symbol.iterator]();!(d=(g=i.next()).done);d=!0)h()}catch(a){e=!0,f=a}finally{try{!d&&i.return&&i.return()}finally{if(e)throw f}}}document.addEventListener("DOMContentLoaded",loadMeting,!1); \ No newline at end of file +'use strict';console.log('\n %c MetingJS 1.1.1 %c https://github.com/metowolf/MetingJS \n\n','color: #fadfa3; background: #030307; padding:5px 0;','background: #fadfa3; padding:5px 0;');var aplayers=[],loadMeting=function(){function a(a,b){var c={container:a,audio:b,mini:!1,autoplay:!1,mutex:!0,lrc:3,preload:'auto',theme:'#2980b9',loop:'all',order:'list',volume:0.7,listFolded:!1,listMaxHeight:'340px'};for(var d in c)c.hasOwnProperty(d)&&a.dataset.hasOwnProperty(d)&&(c[d]=a.dataset[d],('true'===c[d]||'false'===c[d])&&(c[d]='true'==c[d]));b.length&&(!0===c.mini&&(c.lrc=0,c.listFolded=!0),aplayers.push(new APlayer(c)))}var b='https://api.i-meto.com/meting/api?server=:server&type=:type&id=:id&r=:r';'undefined'!=typeof meting_api&&(b=meting_api);for(var f=0;fh.status||304===h.status)){var b=JSON.parse(h.responseText);a(e,b)}},h.open('get',g,!0),h.send(null)}else if(e.dataset.url){var i=[{name:e.dataset.name||e.dataset.title,artist:e.dataset.artist||e.dataset.author,url:e.dataset.url,cover:e.dataset.cover||e.dataset.pic,lrc:e.dataset.lrc}];a(e,i)}},e=0;e