q78kgblog 0.0.0-1734158082146 → 0.0.0-1734172620426
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/404.html +1 -933
- package/about/index.html +1 -1085
- package/archives/2023/02/index.html +1 -933
- package/archives/2023/04/index.html +1 -933
- package/archives/2023/05/index.html +1 -933
- package/archives/2023/08/index.html +1 -933
- package/archives/2023/09/index.html +1 -933
- package/archives/2023/index.html +1 -933
- package/archives/2024/01/index.html +1 -933
- package/archives/2024/02/index.html +1 -933
- package/archives/2024/11/index.html +1 -933
- package/archives/2024/index.html +1 -933
- package/archives/index.html +1 -933
- package/archives/page/2/index.html +1 -933
- package/assets/css/APlayer.min.css +1 -3
- package/assets/js/APlayer.min.js +154 -2
- package/assets/js/Meting.min.js +3 -1
- package/atom.xml +12 -12
- package/baidusitemap.xml +4 -4
- package/bangumis/index.html +1 -1055
- package/bigpie/index.html +1 -705
- package/categories/Hexo/index.html +1 -945
- package/categories/index.html +1 -701
- package/categories//345/271/264/347/273/210/346/200/273/347/273/223/index.html +1 -945
- package/categories//346/212/200/346/234/257/345/210/206/344/272/253/index.html +1 -945
- package/categories//347/264/240/346/235/220/index.html +1 -945
- package/categories//351/227/262/350/201/212/346/235/202/350/260/210/index.html +1 -945
- package/content.json +1 -1
- package/css/swiper.min.css +1 -703
- package/fcircle/index.html +1 -724
- package/fontawesome/index.html +1 -707
- package/index.html +1 -1085
- package/js/aplayersave.js +1 -1
- package/js/baiduhistory.js +1 -1
- package/js/browser.js +1 -1
- package/js/calendar.js +1 -1
- package/js/cate.js +1 -1
- package/js/commentBarrage.js +13 -13
- package/js/commentsCount.js +1 -1
- package/js/copy.js +1 -1
- package/js/countup.js +1 -1
- package/js/cursor.js +1 -1
- package/js/day.js +2 -2
- package/js/dianzan.js +1 -1
- package/js/dis.js +3 -3
- package/js/fixbugpjax.js +1 -1
- package/js/fixed_card_widget.js +1 -1
- package/js/fps.js +1 -1
- package/js/gitalker.js +1 -1
- package/js/gsap.min.js +1 -4
- package/js/heimu.js +1 -1
- package/js/hide.show.js +1 -1
- package/js/languages.js +1 -1
- package/js/latest.js +1 -1
- package/js/local-search.js +2 -2
- package/js/lunar.js +1 -1
- package/js/lyxTalk.js +1 -1
- package/js/main.js +2 -2
- package/js/nav.js +1 -1
- package/js/noie.js +1 -1
- package/js/owo.js +1 -1
- package/js/people.js +2 -2
- package/js/pikaday.js +1 -109
- package/js/random.js +1 -1
- package/js/randomFriend.js +1 -1
- package/js/resizeTop.js +1 -1
- package/js/rightmenu.js +3 -3
- package/js/sakura.js +1 -1
- package/js/search/algolia.js +4 -4
- package/js/search/local-search.js +1 -1
- package/js/settings.js +3 -3
- package/js/sitetime.js +1 -1
- package/js/smooth-scrolling.js +1 -1
- package/js/sw-toolbox.js +1 -1
- package/js/swiperinit.js +1 -1
- package/js/tw_cn.js +1 -1
- package/js/utils.js +1 -1
- package/js/welcome.js +1 -1
- package/js/welcomeconsole.js +1 -1
- package/links/index.html +1 -932
- package/live2d-widget/autoload.js +19 -63
- package/live2d-widget/demo/demo.html +1 -34
- package/live2d-widget/demo/login.html +1 -271
- package/live2d-widget/live2d.min.js +45 -1
- package/live2d-widget/rollup.config.js +2 -35
- package/live2d-widget/src/index.js +4 -175
- package/live2d-widget/src/message.js +1 -22
- package/live2d-widget/src/model.js +1 -75
- package/live2d-widget/src/tools.js +1 -78
- package/live2d-widget/src/utils.js +1 -5
- package/live2d-widget/src/waifu-tips.js +1 -3
- package/live2d-widget/waifu-tips.js +7 -2
- package/live2d-widget/waifu.css +1 -310
- package/noie.html +1 -69
- package/othersite/index.html +1 -770
- package/package.json +1 -1
- package/people.html +1 -24
- package/posts/164ef646/index.html +1 -1018
- package/posts/1ee472c8/index.html +1 -1006
- package/posts/228c2ef8/index.html +1 -1005
- package/posts/2b89093e/index.html +1 -1003
- package/posts/a9a6c1fb/index.html +1 -1032
- package/posts/ad884987/index.html +1 -1005
- package/posts/c262e439/index.html +1 -993
- package/posts/c81531cf/index.html +1 -1071
- package/posts/ce5471fd/index.html +1 -993
- package/posts/de1f83f4/index.html +1 -1061
- package/posts/e54f7476/index.html +1 -1053
- package/random.html +1 -30
- package/sitemap.txt +7 -7
- package/sitemap.xml +20 -20
- package/sw.js +2 -2
- package/swReg.js +1 -1
- package/tags/AI/index.html +1 -946
- package/tags/Abbrlink/index.html +1 -946
- package/tags/Butterfly/index.html +1 -946
- package/tags/Cloudflare/index.html +1 -946
- package/tags/DiffSinger/index.html +1 -946
- package/tags/Hexo/index.html +1 -946
- package/tags/Markdown/index.html +1 -946
- package/tags/Next/index.html +1 -946
- package/tags/Obsidian/index.html +1 -946
- package/tags/RAID/index.html +1 -946
- package/tags/Vercel/index.html +1 -946
- package/tags/Workers/index.html +1 -946
- package/tags/index.html +1 -701
- package/tags//344/270/273/351/242/230/index.html +1 -946
- package/tags//345/206/231/344/275/234/index.html +1 -946
- package/tags//345/245/263/346/200/247/346/204/217/350/257/206/index.html +1 -946
- package/tags//345/255/246/344/271/240/index.html +1 -946
- package/tags//345/256/266/351/207/214/344/272/221/index.html +1 -946
- package/tags//345/271/264/347/273/210/346/200/273/347/273/223/index.html +1 -946
- package/tags//346/212/230/350/205/276/index.html +1 -946
- package/tags//346/227/245/345/270/270/index.html +1 -946
- package/tags//346/234/215/345/212/241/345/231/250/index.html +1 -946
- package/tags//346/260/270/344/271/205/351/223/276/346/216/245/index.html +1 -946
- package/tags//346/265/252/346/275/256/index.html +1 -946
- package/tags//347/237/255/351/223/276/346/216/245/index.html +1 -946
- package/tags//347/256/200/347/210/261/index.html +1 -946
- package/tags//347/274/226/350/276/221/345/231/250/index.html +1 -946
- package/tags//350/207/252/345/212/250/346/240/207/346/263/250/index.html +1 -946
- package/tags//350/256/272/346/226/207/index.html +1 -946
- package/tags//350/260/267/346/255/214/347/277/273/350/257/221/index.html +1 -946
- package/tags//350/264/237/350/275/275/345/235/207/350/241/241/index.html +1 -946
- package/tags//351/207/221/345/217/245/index.html +1 -946
- package/tags//351/255/224/346/224/271/index.html +1 -946
@@ -1,3 +1 @@
|
|
1
|
-
.aplayer{background:#fff;font-family:Arial,Helvetica,sans-serif;margin:5px;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;position:relative}.aplayer *{box-sizing:content-box}.aplayer svg{width:100%;height:100%}.aplayer svg circle,.aplayer svg path{fill:#fff}.aplayer.aplayer-withlist .aplayer-info{border-bottom:1px solid #e9e9e9}.aplayer.aplayer-withlist .aplayer-list{display:block}.aplayer.aplayer-withlist .aplayer-icon-order,.aplayer.aplayer-withlist .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon.aplayer-icon-menu{display:inline}.aplayer.aplayer-withlrc .aplayer-pic{height:90px;width:90px}.aplayer.aplayer-withlrc .aplayer-info{margin-left:90px;height:90px;padding:10px 7px 0}.aplayer.aplayer-withlrc .aplayer-lrc{display:block}.aplayer.aplayer-narrow{width:66px}.aplayer.aplayer-narrow .aplayer-info,.aplayer.aplayer-narrow .aplayer-list{display:none}.aplayer.aplayer-narrow .aplayer-body,.aplayer.aplayer-narrow .aplayer-pic{height:66px;width:66px}.aplayer.aplayer-fixed{position:fixed;bottom:0;left:0;right:0;margin:0;z-index:99;overflow:visible;max-width:400px;box-shadow:none}.aplayer.aplayer-fixed .aplayer-list{margin-bottom:65px;border:1px solid #eee;border-bottom:none}.aplayer.aplayer-fixed .aplayer-body{position:fixed;bottom:0;left:0;right:0;margin:0;z-index:99;background:#fff;padding-right:18px;transition:all .3s ease;max-width:400px}.aplayer.aplayer-fixed .aplayer-lrc{display:block;position:fixed;bottom:10px;left:0;right:0;margin:0;z-index:98;pointer-events:none;text-shadow:-1px -1px 0 #fff}.aplayer.aplayer-fixed .aplayer-lrc:after,.aplayer.aplayer-fixed .aplayer-lrc:before{display:none}.aplayer.aplayer-fixed .aplayer-info{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transform-origin:0 0;transform-origin:0 0;transition:all .3s ease;border-bottom:none;border-top:1px solid #e9e9e9}.aplayer.aplayer-fixed .aplayer-info .aplayer-music{width:calc(100% - 105px)}.aplayer.aplayer-fixed .aplayer-miniswitcher{display:block}.aplayer.aplayer-fixed.aplayer-narrow .aplayer-info{display:block;-webkit-transform:scaleX(0);transform:scaleX(0)}.aplayer.aplayer-fixed.aplayer-narrow .aplayer-body{width:66px!important}.aplayer.aplayer-fixed.aplayer-narrow .aplayer-miniswitcher .aplayer-icon{-webkit-transform:rotateY(0);transform:rotateY(0)}.aplayer.aplayer-fixed .aplayer-icon-back,.aplayer.aplayer-fixed .aplayer-icon-forward,.aplayer.aplayer-fixed .aplayer-icon-lrc,.aplayer.aplayer-fixed .aplayer-icon-play{display:inline-block}.aplayer.aplayer-fixed .aplayer-icon-back,.aplayer.aplayer-fixed .aplayer-icon-forward,.aplayer.aplayer-fixed .aplayer-icon-menu,.aplayer.aplayer-fixed .aplayer-icon-play{position:absolute;bottom:27px;width:20px;height:20px}.aplayer.aplayer-fixed .aplayer-icon-back{right:75px}.aplayer.aplayer-fixed .aplayer-icon-play{right:50px}.aplayer.aplayer-fixed .aplayer-icon-forward{right:25px}.aplayer.aplayer-fixed .aplayer-icon-menu{right:0}.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-body{position:relative}.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-block}.aplayer .aplayer-icon path{transition:all .2s ease-in-out}.aplayer .aplayer-icon-back,.aplayer .aplayer-icon-forward,.aplayer .aplayer-icon-lrc,.aplayer .aplayer-icon-order,.aplayer .aplayer-icon-play{display:none}.aplayer .aplayer-icon-lrc-inactivity svg{opacity:.4}.aplayer .aplayer-icon-forward{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.aplayer .aplayer-lrc-content{display:none}.aplayer .aplayer-pic{position:relative;float:left;height:66px;width:66px;background-size:cover;background-position:50%;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);box-shadow:0 1px 1px rgba(0,0,0,.2);background:rgba(0,0,0,.2);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;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;height:20px}.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:flex}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap{margin:0 0 0 5px;padding:4px 0;cursor:pointer!important;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;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;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;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;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;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: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: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;transition:all .5s ease-out;opacity:.4;overflow:hidden}.aplayer .aplayer-lrc p.aplayer-lrc-current{opacity:1;overflow:visible;height:auto!important;min-height:16px}.aplayer .aplayer-lrc.aplayer-lrc-hide{display:none}.aplayer .aplayer-lrc .aplayer-lrc-contents{width:100%;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;transition:all .5s ease;will-change:height;display:none;overflow:hidden}.aplayer .aplayer-list.aplayer-list-hide{max-height:0!important}.aplayer .aplayer-list ol{list-style-type:none;margin:0;padding:0;overflow-y:auto}.aplayer .aplayer-list ol::-webkit-scrollbar{width:5px}.aplayer .aplayer-list ol::-webkit-scrollbar-thumb{border-radius:3px;background-color:#eee}.aplayer .aplayer-list ol::-webkit-scrollbar-thumb:hover{background-color:#ccc}.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;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}.aplayer .aplayer-notice{opacity:0;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);font-size:12px;border-radius:4px;padding:5px 10px;transition:all .3s ease-in-out;overflow:hidden;color:#fff;pointer-events:none;background-color:#f4f4f5;color:#909399}.aplayer .aplayer-miniswitcher{display:none;position:absolute;top:0;right:0;bottom:0;height:100%;background:#e6e6e6;width:18px;border-radius:0 2px 2px 0}.aplayer .aplayer-miniswitcher .aplayer-icon{height:100%;width:100%;-webkit-transform:rotateY(180deg);transform:rotateY(180deg);transition:all .3s ease}.aplayer .aplayer-miniswitcher .aplayer-icon path{fill:#666}.aplayer .aplayer-miniswitcher .aplayer-icon:hover path{fill:#000}@-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)}}
|
2
|
-
|
3
|
-
/*# sourceMappingURL=APlayer.min.css.map*/
|
1
|
+
.aplayer{background:#fff;font-family:Arial,Helvetica,sans-serif;margin:5px;box-shadow:0 2px 2px #00000012,0 1px 5px #0000001a;border-radius:2px;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;line-height:normal;position:relative}.aplayer *{box-sizing:content-box}.aplayer svg{width:100%;height:100%}.aplayer svg circle,.aplayer svg path{fill:#fff}.aplayer.aplayer-withlist .aplayer-info{border-bottom:1px solid #e9e9e9}.aplayer.aplayer-withlist .aplayer-list{display:block}.aplayer.aplayer-withlist .aplayer-icon-order,.aplayer.aplayer-withlist .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon.aplayer-icon-menu{display:inline}.aplayer.aplayer-withlrc .aplayer-pic{height:90px;width:90px}.aplayer.aplayer-withlrc .aplayer-info{margin-left:90px;height:90px;padding:10px 7px 0}.aplayer.aplayer-withlrc .aplayer-lrc{display:block}.aplayer.aplayer-narrow{width:66px}.aplayer.aplayer-narrow .aplayer-info,.aplayer.aplayer-narrow .aplayer-list{display:none}.aplayer.aplayer-narrow .aplayer-body,.aplayer.aplayer-narrow .aplayer-pic{height:66px;width:66px}.aplayer.aplayer-fixed{position:fixed;bottom:0;left:0;right:0;margin:0;z-index:99;overflow:visible;max-width:400px;box-shadow:none}.aplayer.aplayer-fixed .aplayer-list{margin-bottom:65px;border:1px solid #eee;border-bottom:none}.aplayer.aplayer-fixed .aplayer-body{position:fixed;bottom:0;left:0;right:0;margin:0;z-index:99;background:#fff;padding-right:18px;transition:all .3s ease;max-width:400px}.aplayer.aplayer-fixed .aplayer-lrc{display:block;position:fixed;bottom:10px;left:0;right:0;margin:0;z-index:98;pointer-events:none;text-shadow:-1px -1px 0 #fff}.aplayer.aplayer-fixed .aplayer-lrc:after,.aplayer.aplayer-fixed .aplayer-lrc:before{display:none}.aplayer.aplayer-fixed .aplayer-info{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transform-origin:0 0;transform-origin:0 0;transition:all .3s ease;border-bottom:none;border-top:1px solid #e9e9e9}.aplayer.aplayer-fixed .aplayer-info .aplayer-music{width:calc(100% - 105px)}.aplayer.aplayer-fixed .aplayer-miniswitcher{display:block}.aplayer.aplayer-fixed.aplayer-narrow .aplayer-info{display:block;-webkit-transform:scaleX(0);transform:scaleX(0)}.aplayer.aplayer-fixed.aplayer-narrow .aplayer-body{width:66px!important}.aplayer.aplayer-fixed.aplayer-narrow .aplayer-miniswitcher .aplayer-icon{-webkit-transform:rotateY(0);transform:rotateY(0)}.aplayer.aplayer-fixed .aplayer-icon-back,.aplayer.aplayer-fixed .aplayer-icon-forward,.aplayer.aplayer-fixed .aplayer-icon-lrc,.aplayer.aplayer-fixed .aplayer-icon-play{display:inline-block}.aplayer.aplayer-fixed .aplayer-icon-back,.aplayer.aplayer-fixed .aplayer-icon-forward,.aplayer.aplayer-fixed .aplayer-icon-menu,.aplayer.aplayer-fixed .aplayer-icon-play{position:absolute;bottom:27px;width:20px;height:20px}.aplayer.aplayer-fixed .aplayer-icon-back{right:75px}.aplayer.aplayer-fixed .aplayer-icon-play{right:50px}.aplayer.aplayer-fixed .aplayer-icon-forward{right:25px}.aplayer.aplayer-fixed .aplayer-icon-menu{right:0}.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-body{position:relative}.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-block}.aplayer .aplayer-icon path{transition:all .2s ease-in-out}.aplayer .aplayer-icon-back,.aplayer .aplayer-icon-forward,.aplayer .aplayer-icon-lrc,.aplayer .aplayer-icon-order,.aplayer .aplayer-icon-play{display:none}.aplayer .aplayer-icon-lrc-inactivity svg{opacity:.4}.aplayer .aplayer-icon-forward{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.aplayer .aplayer-lrc-content{display:none}.aplayer .aplayer-pic{position:relative;float:left;height:66px;width:66px;background-size:cover;background-position:50%;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);box-shadow:0 1px 1px #0003;background:#0003;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;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;height:20px}.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:flex}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap{margin:0 0 0 5px;padding:4px 0;cursor:pointer!important;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;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;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;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;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;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:linear-gradient(180deg,#fff 0,#fff0);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:linear-gradient(180deg,#fff0 0,#fffc);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;transition:all .5s ease-out;opacity:.4;overflow:hidden}.aplayer .aplayer-lrc p.aplayer-lrc-current{opacity:1;overflow:visible;height:auto!important;min-height:16px}.aplayer .aplayer-lrc.aplayer-lrc-hide{display:none}.aplayer .aplayer-lrc .aplayer-lrc-contents{width:100%;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;transition:all .5s ease;will-change:height;display:none;overflow:hidden}.aplayer .aplayer-list.aplayer-list-hide{max-height:0!important}.aplayer .aplayer-list ol{list-style-type:none;margin:0;padding:0;overflow-y:auto}.aplayer .aplayer-list ol::-webkit-scrollbar{width:5px}.aplayer .aplayer-list ol::-webkit-scrollbar-thumb{border-radius:3px;background-color:#eee}.aplayer .aplayer-list ol::-webkit-scrollbar-thumb:hover{background-color:#ccc}.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;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}.aplayer .aplayer-notice{opacity:0;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);font-size:12px;border-radius:4px;padding:5px 10px;transition:all .3s ease-in-out;overflow:hidden;color:#fff;pointer-events:none;background-color:#f4f4f5;color:#909399}.aplayer .aplayer-miniswitcher{display:none;position:absolute;top:0;right:0;bottom:0;height:100%;background:#e6e6e6;width:18px;border-radius:0 2px 2px 0}.aplayer .aplayer-miniswitcher .aplayer-icon{height:100%;width:100%;-webkit-transform:rotateY(180deg);transform:rotateY(180deg);transition:all .3s ease}.aplayer .aplayer-miniswitcher .aplayer-icon path{fill:#666}.aplayer .aplayer-miniswitcher .aplayer-icon:hover path{fill:#000}@-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)}}
|
package/assets/js/APlayer.min.js
CHANGED
@@ -1,2 +1,154 @@
|
|
1
|
-
!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()}(window,function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var a=t[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=41)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=/mobile/i.test(window.navigator.userAgent),a={secondToTime:function(e){var t=Math.floor(e/3600),n=Math.floor((e-3600*t)/60),i=Math.floor(e-3600*t-60*n);return(t>0?[t,n,i]:[n,i]).map(function(e){return e<10?"0"+e:""+e}).join(":")},getElementViewLeft:function(e){var t=e.offsetLeft,n=e.offsetParent,i=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-i},getElementViewTop:function(e,t){for(var n,i=e.offsetTop,a=e.offsetParent;null!==a;)i+=a.offsetTop,a=a.offsetParent;return n=document.body.scrollTop+document.documentElement.scrollTop,t?i:i-n},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(e){return function(e){for(var t=e.length-1;t>=0;t--){var n=Math.floor(Math.random()*(t+1)),i=e[n];e[n]=e[t],e[t]=i}return e}([].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(Array(e))).map(function(e,t){return t}))}};t.default=a},function(e,t,n){var i=n(2);e.exports=function(e){"use strict";e=e||{};var t="",n=i.$each,a=e.audio,r=(e.$value,e.$index,i.$escape),o=e.theme,s=e.index;return n(a,function(e,n){t+='\n<li>\n <span class="aplayer-list-cur" style="background-color: ',t+=r(e.theme||o),t+=';"></span>\n <span class="aplayer-list-index">',t+=r(n+s),t+='</span>\n <span class="aplayer-list-title">',t+=r(e.name),t+='</span>\n <span class="aplayer-list-author">',t+=r(e.artist),t+="</span>\n</li>\n"}),t}},function(e,t,n){"use strict";e.exports=n(15)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=g(n(33)),a=g(n(32)),r=g(n(31)),o=g(n(30)),s=g(n(29)),l=g(n(28)),u=g(n(27)),c=g(n(26)),p=g(n(25)),d=g(n(24)),h=g(n(23)),y=g(n(22)),f=g(n(21)),v=g(n(20)),m=g(n(19));function g(e){return e&&e.__esModule?e:{default:e}}var w={play:i.default,pause:a.default,volumeUp:r.default,volumeDown:o.default,volumeOff:s.default,orderRandom:l.default,orderList:u.default,menu:c.default,loopAll:p.default,loopOne:d.default,loopNone:h.default,loading:y.default,right:f.default,skip:v.default,lrc:m.default};t.default=w},function(e,t,n){"use strict";var i,a="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};i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(e){"object"===("undefined"==typeof window?"undefined":a(window))&&(i=window)}e.exports=i},function(e,t,n){"use strict";var i,a,r="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};void 0===(a="function"==typeof(i=function(){if("object"===("undefined"==typeof window?"undefined":r(window))&&void 0!==document.querySelectorAll&&void 0!==window.pageYOffset&&void 0!==history.pushState){var e=function(e,t,n,i){return n>i?t:e+(t-e)*((a=n/i)<.5?4*a*a*a:(a-1)*(2*a-2)*(2*a-2)+1);var a},t=function(t,n,i,a){n=n||500;var r=(a=a||window).scrollTop||window.pageYOffset;if("number"==typeof t)var o=parseInt(t);else var o=function(e,t){return"HTML"===e.nodeName?-t:e.getBoundingClientRect().top+t}(t,r);var s=Date.now(),l=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){window.setTimeout(e,15)};!function u(){var c=Date.now()-s;a!==window?a.scrollTop=e(r,o,c,n):window.scroll(0,e(r,o,c,n)),c>n?"function"==typeof i&&i(t):l(u)}()},n=function(e){if(!e.defaultPrevented){e.preventDefault(),location.hash!==this.hash&&window.history.pushState(null,null,this.hash);var n=document.getElementById(this.hash.substring(1));if(!n)return;t(n,500,function(e){location.replace("#"+e.id)})}};return document.addEventListener("DOMContentLoaded",function(){for(var e,t=document.querySelectorAll('a[href^="#"]:not([href="#"])'),i=t.length;e=t[--i];)e.addEventListener("click",n,!1)}),t}})?i.call(t,n,t,e):i)||(e.exports=a)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=s(n(1)),r=s(n(0)),o=s(n(5));function s(e){return e&&e.__esModule?e:{default:e}}var l=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.player=t,this.index=0,this.audios=this.player.options.audio,this.bindEvents()}return i(e,[{key:"bindEvents",value:function(){var e=this;this.player.template.list.addEventListener("click",function(t){var n=void 0;n="LI"===t.target.tagName.toUpperCase()?t.target:t.target.parentElement;var i=parseInt(n.getElementsByClassName("aplayer-list-index")[0].innerHTML)-1;i!==e.index?(e.switch(i),e.player.play()):e.player.toggle()})}},{key:"show",value:function(){this.player.events.trigger("listshow"),this.player.template.list.classList.remove("aplayer-list-hide"),this.player.template.listOl.scrollTop=33*this.index}},{key:"hide",value:function(){this.player.events.trigger("listhide"),this.player.template.list.classList.add("aplayer-list-hide")}},{key:"toggle",value:function(){this.player.template.list.classList.contains("aplayer-list-hide")?this.show():this.hide()}},{key:"add",value:function(e){this.player.events.trigger("listadd",{audios:e}),"[object Array]"!==Object.prototype.toString.call(e)&&(e=[e]),e.map(function(e){return e.name=e.name||e.title||"Audio name",e.artist=e.artist||e.author||"Audio artist",e.cover=e.cover||e.pic,e.type=e.type||"normal",e});var t=!(this.audios.length>1),n=0===this.audios.length;this.player.template.listOl.innerHTML+=(0,a.default)({theme:this.player.options.theme,audio:e,index:this.audios.length+1}),this.audios=this.audios.concat(e),t&&this.audios.length>1&&this.player.container.classList.add("aplayer-withlist"),this.player.randomOrder=r.default.randomOrder(this.audios.length),this.player.template.listCurs=this.player.container.querySelectorAll(".aplayer-list-cur"),this.player.template.listCurs[this.audios.length-1].style.backgroundColor=e.theme||this.player.options.theme,n&&("random"===this.player.options.order?this.switch(this.player.randomOrder[0]):this.switch(0))}},{key:"remove",value:function(e){if(this.player.events.trigger("listremove",{index:e}),this.audios[e])if(this.audios.length>1){var t=this.player.container.querySelectorAll(".aplayer-list li");t[e].remove(),this.audios.splice(e,1),this.player.lrc&&this.player.lrc.remove(e),e===this.index&&(this.audios[e]?this.switch(e):this.switch(e-1)),this.index>e&&this.index--;for(var n=e;n<t.length;n++)t[n].getElementsByClassName("aplayer-list-index")[0].textContent=n;1===this.audios.length&&this.player.container.classList.remove("aplayer-withlist"),this.player.template.listCurs=this.player.container.querySelectorAll(".aplayer-list-cur")}else this.clear()}},{key:"switch",value:function(e){if(this.player.events.trigger("listswitch",{index:e}),void 0!==e&&this.audios[e]){this.index=e;var t=this.audios[this.index];this.player.template.pic.style.backgroundImage=t.cover?"url('"+t.cover+"')":"",this.player.theme(this.audios[this.index].theme||this.player.options.theme,this.index,!1),this.player.template.title.innerHTML=t.name,this.player.template.author.innerHTML=t.artist?" - "+t.artist:"";var n=this.player.container.getElementsByClassName("aplayer-list-light")[0];n&&n.classList.remove("aplayer-list-light"),this.player.container.querySelectorAll(".aplayer-list li")[this.index].classList.add("aplayer-list-light"),(0,o.default)(33*this.index,500,null,this.player.template.listOl),this.player.setAudio(t),this.player.lrc&&this.player.lrc.switch(this.index),this.player.lrc&&this.player.lrc.update(0),1!==this.player.duration&&(this.player.template.dtime.innerHTML=r.default.secondToTime(this.player.duration))}}},{key:"clear",value:function(){this.player.events.trigger("listclear"),this.index=0,this.player.container.classList.remove("aplayer-withlist"),this.player.pause(),this.audios=[],this.player.lrc&&this.player.lrc.clear(),this.player.audio.src="",this.player.template.listOl.innerHTML="",this.player.template.pic.style.backgroundImage="",this.player.theme(this.player.options.theme,this.index,!1),this.player.template.title.innerHTML="No audio",this.player.template.author.innerHTML="",this.player.bar.set("loaded",0,"width"),this.player.template.dtime.innerHTML=r.default.secondToTime(0)}}]),e}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.events={},this.audioEvents=["abort","canplay","canplaythrough","durationchange","emptied","ended","error","loadeddata","loadedmetadata","loadstart","mozaudioavailable","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],this.playerEvents=["destroy","listshow","listhide","listadd","listremove","listswitch","listclear","noticeshow","noticehide","lrcshow","lrchide"]}return i(e,[{key:"on",value:function(e,t){this.type(e)&&"function"==typeof t&&(this.events[e]||(this.events[e]=[]),this.events[e].push(t))}},{key:"trigger",value:function(e,t){if(this.events[e]&&this.events[e].length)for(var n=0;n<this.events[e].length;n++)this.events[e][n](t)}},{key:"type",value:function(e){return-1!==this.playerEvents.indexOf(e)?"player":-1!==this.audioEvents.indexOf(e)?"audio":(console.error("Unknown event name: "+e),null)}}]),e}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.player=t,window.requestAnimationFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)},this.types=["loading"],this.init()}return i(e,[{key:"init",value:function(){var e=this;this.types.forEach(function(t){e["init"+t+"Checker"]()})}},{key:"initloadingChecker",value:function(){var e=this,t=0,n=0,i=!1;this.loadingChecker=setInterval(function(){e.enableloadingChecker&&(n=e.player.audio.currentTime,i||n!==t||e.player.audio.paused||(e.player.container.classList.add("aplayer-loading"),i=!0),i&&n>t&&!e.player.audio.paused&&(e.player.container.classList.remove("aplayer-loading"),i=!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.forEach(function(t){e["enable"+t+"Checker"]=!1,e[t+"Checker"]&&clearInterval(e[t+"Checker"])})}}]),e}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=o(n(0)),r=o(n(3));function o(e){return e&&e.__esModule?e:{default:e}}var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.player=t,this.initPlayButton(),this.initPlayBar(),this.initOrderButton(),this.initLoopButton(),this.initMenuButton(),a.default.isMobile||this.initVolumeButton(),this.initMiniSwitcher(),this.initSkipButton(),this.initLrcButton()}return i(e,[{key:"initPlayButton",value:function(){var e=this;this.player.template.pic.addEventListener("click",function(){e.player.toggle()})}},{key:"initPlayBar",value:function(){var e=this,t=function(t){var n=((t.clientX||t.changedTouches[0].clientX)-a.default.getElementViewLeft(e.player.template.barWrap))/e.player.template.barWrap.clientWidth;n=Math.max(n,0),n=Math.min(n,1),e.player.bar.set("played",n,"width"),e.player.lrc&&e.player.lrc.update(n*e.player.duration),e.player.template.ptime.innerHTML=a.default.secondToTime(n*e.player.duration)},n=function n(i){document.removeEventListener(a.default.nameMap.dragEnd,n),document.removeEventListener(a.default.nameMap.dragMove,t);var r=((i.clientX||i.changedTouches[0].clientX)-a.default.getElementViewLeft(e.player.template.barWrap))/e.player.template.barWrap.clientWidth;r=Math.max(r,0),r=Math.min(r,1),e.player.bar.set("played",r,"width"),e.player.seek(e.player.bar.get("played","width")*e.player.duration),e.player.disableTimeupdate=!1};this.player.template.barWrap.addEventListener(a.default.nameMap.dragStart,function(){e.player.disableTimeupdate=!0,document.addEventListener(a.default.nameMap.dragMove,t),document.addEventListener(a.default.nameMap.dragEnd,n)})}},{key:"initVolumeButton",value:function(){var e=this;this.player.template.volumeButton.addEventListener("click",function(){e.player.audio.muted?(e.player.audio.muted=!1,e.player.switchVolumeIcon(),e.player.bar.set("volume",e.player.volume(),"height")):(e.player.audio.muted=!0,e.player.switchVolumeIcon(),e.player.bar.set("volume",0,"height"))});var t=function(t){var n=1-((t.clientY||t.changedTouches[0].clientY)-a.default.getElementViewTop(e.player.template.volumeBar,e.player.options.fixed))/e.player.template.volumeBar.clientHeight;n=Math.max(n,0),n=Math.min(n,1),e.player.volume(n)},n=function n(i){e.player.template.volumeBarWrap.classList.remove("aplayer-volume-bar-wrap-active"),document.removeEventListener(a.default.nameMap.dragEnd,n),document.removeEventListener(a.default.nameMap.dragMove,t);var r=1-((i.clientY||i.changedTouches[0].clientY)-a.default.getElementViewTop(e.player.template.volumeBar,e.player.options.fixed))/e.player.template.volumeBar.clientHeight;r=Math.max(r,0),r=Math.min(r,1),e.player.volume(r)};this.player.template.volumeBarWrap.addEventListener(a.default.nameMap.dragStart,function(){e.player.template.volumeBarWrap.classList.add("aplayer-volume-bar-wrap-active"),document.addEventListener(a.default.nameMap.dragMove,t),document.addEventListener(a.default.nameMap.dragEnd,n)})}},{key:"initOrderButton",value:function(){var e=this;this.player.template.order.addEventListener("click",function(){"list"===e.player.options.order?(e.player.options.order="random",e.player.template.order.innerHTML=r.default.orderRandom):"random"===e.player.options.order&&(e.player.options.order="list",e.player.template.order.innerHTML=r.default.orderList)})}},{key:"initLoopButton",value:function(){var e=this;this.player.template.loop.addEventListener("click",function(){e.player.list.audios.length>1?"one"===e.player.options.loop?(e.player.options.loop="none",e.player.template.loop.innerHTML=r.default.loopNone):"none"===e.player.options.loop?(e.player.options.loop="all",e.player.template.loop.innerHTML=r.default.loopAll):"all"===e.player.options.loop&&(e.player.options.loop="one",e.player.template.loop.innerHTML=r.default.loopOne):"one"===e.player.options.loop||"all"===e.player.options.loop?(e.player.options.loop="none",e.player.template.loop.innerHTML=r.default.loopNone):"none"===e.player.options.loop&&(e.player.options.loop="all",e.player.template.loop.innerHTML=r.default.loopAll)})}},{key:"initMenuButton",value:function(){var e=this;this.player.template.menu.addEventListener("click",function(){e.player.list.toggle()})}},{key:"initMiniSwitcher",value:function(){var e=this;this.player.template.miniSwitcher.addEventListener("click",function(){e.player.setMode("mini"===e.player.mode?"normal":"mini")})}},{key:"initSkipButton",value:function(){var e=this;this.player.template.skipBackButton.addEventListener("click",function(){e.player.skipBack()}),this.player.template.skipForwardButton.addEventListener("click",function(){e.player.skipForward()}),this.player.template.skipPlayButton.addEventListener("click",function(){e.player.toggle()})}},{key:"initLrcButton",value:function(){var e=this;this.player.template.lrcButton.addEventListener("click",function(){e.player.template.lrcButton.classList.contains("aplayer-icon-lrc-inactivity")?(e.player.template.lrcButton.classList.remove("aplayer-icon-lrc-inactivity"),e.player.lrc&&e.player.lrc.show()):(e.player.template.lrcButton.classList.add("aplayer-icon-lrc-inactivity"),e.player.lrc&&e.player.lrc.hide())})}}]),e}();t.default=s},function(e,t,n){var i=n(2);e.exports=function(e){"use strict";e=e||{};var t="",n=i.$each,a=e.lyrics,r=(e.$value,e.$index,i.$escape);return n(a,function(e,n){t+="\n <p",0===n&&(t+=' class="aplayer-lrc-current"'),t+=">",t+=r(e[1]),t+="</p>\n"}),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=n(10),o=(i=r)&&i.__esModule?i:{default:i};var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.container=t.container,this.async=t.async,this.player=t.player,this.parsed=[],this.index=0,this.current=[]}return a(e,[{key:"show",value:function(){this.player.events.trigger("lrcshow"),this.player.template.lrcWrap.classList.remove("aplayer-lrc-hide")}},{key:"hide",value:function(){this.player.events.trigger("lrchide"),this.player.template.lrcWrap.classList.add("aplayer-lrc-hide")}},{key:"toggle",value:function(){this.player.template.lrcWrap.classList.contains("aplayer-lrc-hide")?this.show():this.hide()}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.player.audio.currentTime;if(this.index>this.current.length-1||e<this.current[this.index][0]||!this.current[this.index+1]||e>=this.current[this.index+1][0])for(var t=0;t<this.current.length;t++)e>=this.current[t][0]&&(!this.current[t+1]||e<this.current[t+1][0])&&(this.index=t,this.container.style.transform="translateY("+16*-this.index+"px)",this.container.style.webkitTransform="translateY("+16*-this.index+"px)",this.container.getElementsByClassName("aplayer-lrc-current")[0].classList.remove("aplayer-lrc-current"),this.container.getElementsByTagName("p")[t].classList.add("aplayer-lrc-current"))}},{key:"switch",value:function(e){var t=this;if(!this.parsed[e])if(this.async){this.parsed[e]=[["00:00","Loading"]];var n=new XMLHttpRequest;n.onreadystatechange=function(){e===t.player.list.index&&4===n.readyState&&(n.status>=200&&n.status<300||304===n.status?t.parsed[e]=t.parse(n.responseText):(t.player.notice("LRC file request fails: status "+n.status),t.parsed[e]=[["00:00","Not available"]]),t.container.innerHTML=(0,o.default)({lyrics:t.parsed[e]}),t.update(0),t.current=t.parsed[e])};var i=this.player.list.audios[e].lrc;n.open("get",i,!0),n.send(null)}else this.player.list.audios[e].lrc?this.parsed[e]=this.parse(this.player.list.audios[e].lrc):this.parsed[e]=[["00:00","Not available"]];this.container.innerHTML=(0,o.default)({lyrics:this.parsed[e]}),this.update(0),this.current=this.parsed[e]}},{key:"parse",value:function(e){if(e){for(var t=(e=e.replace(/([^\]^\n])\[/g,function(e,t){return t+"\n["})).split("\n"),n=[],i=t.length,a=0;a<i;a++){var r=t[a].match(/\[(\d{2}):(\d{2})(\.(\d{2,3}))?]/g),o=t[a].replace(/.*\[(\d{2}):(\d{2})(\.(\d{2,3}))?]/g,"").replace(/<(\d{2}):(\d{2})(\.(\d{2,3}))?>/g,"").replace(/^\s+|\s+$/g,"");if(r)for(var s=r.length,l=0;l<s;l++){var u=/\[(\d{2}):(\d{2})(\.(\d{2,3}))?]/.exec(r[l]),c=60*u[1]+parseInt(u[2])+(u[4]?parseInt(u[4])/(2===(u[4]+"").length?100:1e3):0);n.push([c,o])}}return(n=n.filter(function(e){return e[1]})).sort(function(e,t){return e[0]-t[0]}),n}return[]}},{key:"remove",value:function(e){this.parsed.splice(e,1)}},{key:"clear",value:function(){this.parsed=[],this.container.innerHTML=""}}]),e}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=n(0),o=(i=r)&&i.__esModule?i:{default:i};var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.storageName=t.options.storageName,this.data=JSON.parse(o.default.storage.get(this.storageName)),this.data||(this.data={}),this.data.volume=this.data.volume||t.options.volume}return a(e,[{key:"get",value:function(e){return this.data[e]}},{key:"set",value:function(e,t){this.data[e]=t,o.default.storage.set(this.storageName,JSON.stringify(this.data))}}]),e}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.elements={},this.elements.volume=t.volume,this.elements.played=t.played,this.elements.loaded=t.loaded}return i(e,[{key:"set",value:function(e,t,n){t=Math.max(t,0),t=Math.min(t,1),this.elements[e].style[n]=100*t+"%"}},{key:"get",value:function(e,t){return parseFloat(this.elements[e].style[t])/100}}]),e}();t.default=a},function(e,t,n){"use strict";(function(t){e.exports=!1;try{e.exports="[object process]"===Object.prototype.toString.call(t.process)}catch(e){}}).call(this,n(4))},function(e,t,n){"use strict";(function(t){var i=n(14),a=Object.create(i?t:window),r=/["&'<>]/;a.$escape=function(e){return function(e){var t=""+e,n=r.exec(t);if(!n)return e;var i="",a=void 0,o=void 0,s=void 0;for(a=n.index,o=0;a<t.length;a++){switch(t.charCodeAt(a)){case 34:s=""";break;case 38:s="&";break;case 39:s="'";break;case 60:s="<";break;case 62:s=">";break;default:continue}o!==a&&(i+=t.substring(o,a)),o=a+1,i+=s}return o!==a?i+t.substring(o,a):i}(function e(t){"string"!=typeof t&&(t=void 0===t||null===t?"":"function"==typeof t?e(t.call(t)):JSON.stringify(t));return t}(e))},a.$each=function(e,t){if(Array.isArray(e))for(var n=0,i=e.length;n<i;n++)t(e[n],n);else for(var a in e)t(e[a],a)},e.exports=a}).call(this,n(4))},function(e,t,n){var i=n(2);e.exports=function(e){"use strict";var t="",a=(e=e||{}).options,r=e.cover,o=i.$escape,s=e.icons,l=(arguments[1],function(e){return t+=e}),u=e.getObject;e.theme,e.audio,e.index;return a.fixed?(t+='\n<div class="aplayer-list',a.listFolded&&(t+=" aplayer-list-hide"),t+='"',a.listMaxHeight&&(t+=' style="max-height: ',t+=o(a.listMaxHeight),t+='"'),t+=">\n <ol",a.listMaxHeight&&(t+=' style="max-height: ',t+=o(a.listMaxHeight),t+='"'),t+=">\n ",l(n(1)(u({theme:a.theme,audio:a.audio,index:1}))),t+='\n </ol>\n</div>\n<div class="aplayer-body">\n <div class="aplayer-pic" style="',r&&(t+="background-image: url("",t+=o(r),t+="");"),t+="background-color: ",t+=o(a.theme),t+=';">\n <div class="aplayer-button aplayer-play">',t+=s.play,t+='</div>\n </div>\n <div class="aplayer-info" style="display: none;">\n <div class="aplayer-music">\n <span class="aplayer-title">No audio</span>\n <span class="aplayer-author"></span>\n </div>\n <div class="aplayer-controller">\n <div class="aplayer-bar-wrap">\n <div class="aplayer-bar">\n <div class="aplayer-loaded" style="width: 0"></div>\n <div class="aplayer-played" style="width: 0; background: ',t+=o(a.theme),t+=';">\n <span class="aplayer-thumb" style="background: ',t+=o(a.theme),t+=';">\n <span class="aplayer-loading-icon">',t+=s.loading,t+='</span>\n </span>\n </div>\n </div>\n </div>\n <div class="aplayer-time">\n <span class="aplayer-time-inner">\n <span class="aplayer-ptime">00:00</span> / <span class="aplayer-dtime">00:00</span>\n </span>\n <span class="aplayer-icon aplayer-icon-back">\n ',t+=s.skip,t+='\n </span>\n <span class="aplayer-icon aplayer-icon-play">\n ',t+=s.play,t+='\n </span>\n <span class="aplayer-icon aplayer-icon-forward">\n ',t+=s.skip,t+='\n </span>\n <div class="aplayer-volume-wrap">\n <button type="button" class="aplayer-icon aplayer-icon-volume-down">\n ',t+=s.volumeDown,t+='\n </button>\n <div class="aplayer-volume-bar-wrap">\n <div class="aplayer-volume-bar">\n <div class="aplayer-volume" style="height: 80%; background: ',t+=o(a.theme),t+=';"></div>\n </div>\n </div>\n </div>\n <button type="button" class="aplayer-icon aplayer-icon-order">\n ',"list"===a.order?t+=s.orderList:"random"===a.order&&(t+=s.orderRandom),t+='\n </button>\n <button type="button" class="aplayer-icon aplayer-icon-loop">\n ',"one"===a.loop?t+=s.loopOne:"all"===a.loop?t+=s.loopAll:"none"===a.loop&&(t+=s.loopNone),t+='\n </button>\n <button type="button" class="aplayer-icon aplayer-icon-menu">\n ',t+=s.menu,t+='\n </button>\n <button type="button" class="aplayer-icon aplayer-icon-lrc">\n ',t+=s.lrc,t+='\n </button>\n </div>\n </div>\n </div>\n <div class="aplayer-notice"></div>\n <div class="aplayer-miniswitcher"><button class="aplayer-icon">',t+=s.right,t+='</button></div>\n</div>\n<div class="aplayer-lrc">\n <div class="aplayer-lrc-contents" style="transform: translateY(0); -webkit-transform: translateY(0);"></div>\n</div>\n'):(t+='\n<div class="aplayer-body">\n <div class="aplayer-pic" style="',r&&(t+="background-image: url("",t+=o(r),t+="");"),t+="background-color: ",t+=o(a.theme),t+=';">\n <div class="aplayer-button aplayer-play">',t+=s.play,t+='</div>\n </div>\n <div class="aplayer-info">\n <div class="aplayer-music">\n <span class="aplayer-title">No audio</span>\n <span class="aplayer-author"></span>\n </div>\n <div class="aplayer-lrc">\n <div class="aplayer-lrc-contents" style="transform: translateY(0); -webkit-transform: translateY(0);"></div>\n </div>\n <div class="aplayer-controller">\n <div class="aplayer-bar-wrap">\n <div class="aplayer-bar">\n <div class="aplayer-loaded" style="width: 0"></div>\n <div class="aplayer-played" style="width: 0; background: ',t+=o(a.theme),t+=';">\n <span class="aplayer-thumb" style="background: ',t+=o(a.theme),t+=';">\n <span class="aplayer-loading-icon">',t+=s.loading,t+='</span>\n </span>\n </div>\n </div>\n </div>\n <div class="aplayer-time">\n <span class="aplayer-time-inner">\n <span class="aplayer-ptime">00:00</span> / <span class="aplayer-dtime">00:00</span>\n </span>\n <span class="aplayer-icon aplayer-icon-back">\n ',t+=s.skip,t+='\n </span>\n <span class="aplayer-icon aplayer-icon-play">\n ',t+=s.play,t+='\n </span>\n <span class="aplayer-icon aplayer-icon-forward">\n ',t+=s.skip,t+='\n </span>\n <div class="aplayer-volume-wrap">\n <button type="button" class="aplayer-icon aplayer-icon-volume-down">\n ',t+=s.volumeDown,t+='\n </button>\n <div class="aplayer-volume-bar-wrap">\n <div class="aplayer-volume-bar">\n <div class="aplayer-volume" style="height: 80%; background: ',t+=o(a.theme),t+=';"></div>\n </div>\n </div>\n </div>\n <button type="button" class="aplayer-icon aplayer-icon-order">\n ',"list"===a.order?t+=s.orderList:"random"===a.order&&(t+=s.orderRandom),t+='\n </button>\n <button type="button" class="aplayer-icon aplayer-icon-loop">\n ',"one"===a.loop?t+=s.loopOne:"all"===a.loop?t+=s.loopAll:"none"===a.loop&&(t+=s.loopNone),t+='\n </button>\n <button type="button" class="aplayer-icon aplayer-icon-menu">\n ',t+=s.menu,t+='\n </button>\n <button type="button" class="aplayer-icon aplayer-icon-lrc">\n ',t+=s.lrc,t+='\n </button>\n </div>\n </div>\n </div>\n <div class="aplayer-notice"></div>\n <div class="aplayer-miniswitcher"><button class="aplayer-icon">',t+=s.right,t+='</button></div>\n</div>\n<div class="aplayer-list',a.listFolded&&(t+=" aplayer-list-hide"),t+='"',a.listMaxHeight&&(t+=' style="max-height: ',t+=o(a.listMaxHeight),t+='"'),t+=">\n <ol",a.listMaxHeight&&(t+=' style="max-height: ',t+=o(a.listMaxHeight),t+='"'),t+=">\n ",l(n(1)(u({theme:a.theme,audio:a.audio,index:1}))),t+="\n </ol>\n</div>\n"),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=o(n(3)),r=o(n(16));function o(e){return e&&e.__esModule?e:{default:e}}var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.container=t.container,this.options=t.options,this.randomOrder=t.randomOrder,this.init()}return i(e,[{key:"init",value:function(){var e="";this.options.audio.length&&(e="random"===this.options.order?this.options.audio[this.randomOrder[0]].cover:this.options.audio[0].cover),this.container.innerHTML=(0,r.default)({options:this.options,icons:a.default,cover:e,getObject:function(e){return e}}),this.lrc=this.container.querySelector(".aplayer-lrc-contents"),this.lrcWrap=this.container.querySelector(".aplayer-lrc"),this.ptime=this.container.querySelector(".aplayer-ptime"),this.info=this.container.querySelector(".aplayer-info"),this.time=this.container.querySelector(".aplayer-time"),this.barWrap=this.container.querySelector(".aplayer-bar-wrap"),this.button=this.container.querySelector(".aplayer-button"),this.body=this.container.querySelector(".aplayer-body"),this.list=this.container.querySelector(".aplayer-list"),this.listOl=this.container.querySelector(".aplayer-list ol"),this.listCurs=this.container.querySelectorAll(".aplayer-list-cur"),this.played=this.container.querySelector(".aplayer-played"),this.loaded=this.container.querySelector(".aplayer-loaded"),this.thumb=this.container.querySelector(".aplayer-thumb"),this.volume=this.container.querySelector(".aplayer-volume"),this.volumeBar=this.container.querySelector(".aplayer-volume-bar"),this.volumeButton=this.container.querySelector(".aplayer-time button"),this.volumeBarWrap=this.container.querySelector(".aplayer-volume-bar-wrap"),this.loop=this.container.querySelector(".aplayer-icon-loop"),this.order=this.container.querySelector(".aplayer-icon-order"),this.menu=this.container.querySelector(".aplayer-icon-menu"),this.pic=this.container.querySelector(".aplayer-pic"),this.title=this.container.querySelector(".aplayer-title"),this.author=this.container.querySelector(".aplayer-author"),this.dtime=this.container.querySelector(".aplayer-dtime"),this.notice=this.container.querySelector(".aplayer-notice"),this.miniSwitcher=this.container.querySelector(".aplayer-miniswitcher"),this.skipBackButton=this.container.querySelector(".aplayer-icon-back"),this.skipForwardButton=this.container.querySelector(".aplayer-icon-forward"),this.skipPlayButton=this.container.querySelector(".aplayer-icon-play"),this.lrcButton=this.container.querySelector(".aplayer-icon-lrc")}}]),e}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t={container:e.element||document.getElementsByClassName("aplayer")[0],mini:e.narrow||e.fixed||!1,fixed:!1,autoplay:!1,mutex:!0,lrcType:e.showlrc||e.lrc||0,preload:"auto",theme:"#b7daff",loop:"all",order:"list",volume:.7,listFolded:e.fixed,listMaxHeight:e.listmaxheight||"250px",audio:e.music||[],storageName:"aplayer-setting"};for(var n in t)t.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&(e[n]=t[n]);return"[object Array]"!==Object.prototype.toString.call(e.audio)&&(e.audio=[e.audio]),e.audio.map(function(e){return e.name=e.name||e.title||"Audio name",e.artist=e.artist||e.author||"Audio artist",e.cover=e.cover||e.pic,e.type=e.type||"normal",e}),e.audio.length<=1&&"one"===e.loop&&(e.loop="all"),e}},function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><path d="M26.667 5.333h-21.333c-0 0-0.001 0-0.001 0-1.472 0-2.666 1.194-2.666 2.666 0 0 0 0.001 0 0.001v-0 16c0 0 0 0.001 0 0.001 0 1.472 1.194 2.666 2.666 2.666 0 0 0.001 0 0.001 0h21.333c0 0 0.001 0 0.001 0 1.472 0 2.666-1.194 2.666-2.666 0-0 0-0.001 0-0.001v0-16c0-0 0-0.001 0-0.001 0-1.472-1.194-2.666-2.666-2.666-0 0-0.001 0-0.001 0h0zM5.333 16h5.333v2.667h-5.333v-2.667zM18.667 24h-13.333v-2.667h13.333v2.667zM26.667 24h-5.333v-2.667h5.333v2.667zM26.667 18.667h-13.333v-2.667h13.333v2.667z"></path></svg>'},function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><path d="M25.468 6.947c-0.326-0.172-0.724-0.151-1.030 0.057l-6.438 4.38v-3.553c0-0.371-0.205-0.71-0.532-0.884-0.326-0.172-0.724-0.151-1.030 0.057l-12 8.164c-0.274 0.186-0.438 0.496-0.438 0.827s0.164 0.641 0.438 0.827l12 8.168c0.169 0.115 0.365 0.174 0.562 0.174 0.16 0 0.321-0.038 0.468-0.116 0.327-0.173 0.532-0.514 0.532-0.884v-3.556l6.438 4.382c0.169 0.115 0.365 0.174 0.562 0.174 0.16 0 0.321-0.038 0.468-0.116 0.327-0.173 0.532-0.514 0.532-0.884v-16.333c0-0.371-0.205-0.71-0.532-0.884z"></path></svg>'},function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><path d="M22 16l-10.105-10.6-1.895 1.987 8.211 8.613-8.211 8.612 1.895 1.988 8.211-8.613z"></path></svg>'},function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><path d="M4 16c0-6.6 5.4-12 12-12s12 5.4 12 12c0 1.2-0.8 2-2 2s-2-0.8-2-2c0-4.4-3.6-8-8-8s-8 3.6-8 8 3.6 8 8 8c1.2 0 2 0.8 2 2s-0.8 2-2 2c-6.6 0-12-5.4-12-12z"></path></svg>'},function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 29 32"><path d="M2.667 7.027l1.707-1.693 22.293 22.293-1.693 1.707-4-4h-11.64v4l-5.333-5.333 5.333-5.333v4h8.973l-8.973-8.973v0.973h-2.667v-3.64l-4-4zM22.667 17.333h2.667v5.573l-2.667-2.667v-2.907zM22.667 6.667v-4l5.333 5.333-5.333 5.333v-4h-10.907l-2.667-2.667h13.573z"></path></svg>'},function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 33 32"><path d="M9.333 9.333h13.333v4l5.333-5.333-5.333-5.333v4h-16v8h2.667v-5.333zM22.667 22.667h-13.333v-4l-5.333 5.333 5.333 5.333v-4h16v-8h-2.667v5.333zM17.333 20v-8h-1.333l-2.667 1.333v1.333h2v5.333h2z"></path></svg>'},function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 29 32"><path d="M9.333 9.333h13.333v4l5.333-5.333-5.333-5.333v4h-16v8h2.667v-5.333zM22.667 22.667h-13.333v-4l-5.333 5.333 5.333 5.333v-4h16v-8h-2.667v5.333z"></path></svg>'},function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 22 32"><path d="M20.8 14.4q0.704 0 1.152 0.48t0.448 1.12-0.48 1.12-1.12 0.48h-19.2q-0.64 0-1.12-0.48t-0.48-1.12 0.448-1.12 1.152-0.48h19.2zM1.6 11.2q-0.64 0-1.12-0.48t-0.48-1.12 0.448-1.12 1.152-0.48h19.2q0.704 0 1.152 0.48t0.448 1.12-0.48 1.12-1.12 0.48h-19.2zM20.8 20.8q0.704 0 1.152 0.48t0.448 1.12-0.48 1.12-1.12 0.48h-19.2q-0.64 0-1.12-0.48t-0.48-1.12 0.448-1.12 1.152-0.48h19.2z"></path></svg>'},function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><path d="M0.622 18.334h19.54v7.55l11.052-9.412-11.052-9.413v7.549h-19.54v3.725z"></path></svg>'},function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><path d="M22.667 4l7 6-7 6 7 6-7 6v-4h-3.653l-3.76-3.76 2.827-2.827 2.587 2.587h2v-8h-2l-12 12h-6v-4h4.347l12-12h3.653v-4zM2.667 8h6l3.76 3.76-2.827 2.827-2.587-2.587h-4.347v-4z"></path></svg>'},function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 28 32"><path d="M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8z"></path></svg>'},function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 28 32"><path d="M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8zM20.576 16q0 1.344-0.768 2.528t-2.016 1.664q-0.16 0.096-0.448 0.096-0.448 0-0.8-0.32t-0.32-0.832q0-0.384 0.192-0.64t0.544-0.448 0.608-0.384 0.512-0.64 0.192-1.024-0.192-1.024-0.512-0.64-0.608-0.384-0.544-0.448-0.192-0.64q0-0.48 0.32-0.832t0.8-0.32q0.288 0 0.448 0.096 1.248 0.48 2.016 1.664t0.768 2.528z"></path></svg>'},function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 28 32"><path d="M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8zM20.576 16q0 1.344-0.768 2.528t-2.016 1.664q-0.16 0.096-0.448 0.096-0.448 0-0.8-0.32t-0.32-0.832q0-0.384 0.192-0.64t0.544-0.448 0.608-0.384 0.512-0.64 0.192-1.024-0.192-1.024-0.512-0.64-0.608-0.384-0.544-0.448-0.192-0.64q0-0.48 0.32-0.832t0.8-0.32q0.288 0 0.448 0.096 1.248 0.48 2.016 1.664t0.768 2.528zM25.152 16q0 2.72-1.536 5.056t-4 3.36q-0.256 0.096-0.448 0.096-0.48 0-0.832-0.352t-0.32-0.8q0-0.704 0.672-1.056 1.024-0.512 1.376-0.8 1.312-0.96 2.048-2.4t0.736-3.104-0.736-3.104-2.048-2.4q-0.352-0.288-1.376-0.8-0.672-0.352-0.672-1.056 0-0.448 0.32-0.8t0.8-0.352q0.224 0 0.48 0.096 2.496 1.056 4 3.36t1.536 5.056zM29.728 16q0 4.096-2.272 7.552t-6.048 5.056q-0.224 0.096-0.448 0.096-0.48 0-0.832-0.352t-0.32-0.8q0-0.64 0.704-1.056 0.128-0.064 0.384-0.192t0.416-0.192q0.8-0.448 1.44-0.896 2.208-1.632 3.456-4.064t1.216-5.152-1.216-5.152-3.456-4.064q-0.64-0.448-1.44-0.896-0.128-0.096-0.416-0.192t-0.384-0.192q-0.704-0.416-0.704-1.056 0-0.448 0.32-0.8t0.832-0.352q0.224 0 0.448 0.096 3.776 1.632 6.048 5.056t2.272 7.552z"></path></svg>'},function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 17 32"><path d="M14.080 4.8q2.88 0 2.88 2.048v18.24q0 2.112-2.88 2.112t-2.88-2.112v-18.24q0-2.048 2.88-2.048zM2.88 4.8q2.88 0 2.88 2.048v18.24q0 2.112-2.88 2.112t-2.88-2.112v-18.24q0-2.048 2.88-2.048z"></path></svg>'},function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 16 31"><path d="M15.552 15.168q0.448 0.32 0.448 0.832 0 0.448-0.448 0.768l-13.696 8.512q-0.768 0.512-1.312 0.192t-0.544-1.28v-16.448q0-0.96 0.544-1.28t1.312 0.192z"></path></svg>'},function(e,t,n){"use strict";var i,a,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function l(e){if(i===setTimeout)return setTimeout(e,0);if((i===o||!i)&&setTimeout)return i=setTimeout,setTimeout(e,0);try{return i(e,0)}catch(t){try{return i.call(null,e,0)}catch(t){return i.call(this,e,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:o}catch(e){i=o}try{a="function"==typeof clearTimeout?clearTimeout:s}catch(e){a=s}}();var u,c=[],p=!1,d=-1;function h(){p&&u&&(p=!1,u.length?c=u.concat(c):d=-1,c.length&&y())}function y(){if(!p){var e=l(h);p=!0;for(var t=c.length;t;){for(u=c,c=[];++d<t;)u&&u[d].run();d=-1,t=c.length}u=null,p=!1,function(e){if(a===clearTimeout)return clearTimeout(e);if((a===s||!a)&&clearTimeout)return a=clearTimeout,clearTimeout(e);try{a(e)}catch(t){try{return a.call(null,e)}catch(t){return a.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function v(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new f(e,t)),1!==c.length||p||l(y)},f.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=v,r.addListener=v,r.once=v,r.off=v,r.removeListener=v,r.removeAllListeners=v,r.emit=v,r.prependListener=v,r.prependOnceListener=v,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t,n){"use strict";(function(e,t){!function(e,n){if(!e.setImmediate){var i,a,r,o,s,l=1,u={},c=!1,p=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?i=function(e){t.nextTick(function(){y(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((r=new MessageChannel).port1.onmessage=function(e){y(e.data)},i=function(e){r.port2.postMessage(e)}):p&&"onreadystatechange"in p.createElement("script")?(a=p.documentElement,i=function(e){var t=p.createElement("script");t.onreadystatechange=function(){y(e),t.onreadystatechange=null,a.removeChild(t),t=null},a.appendChild(t)}):i=function(e){setTimeout(y,0,e)}:(o="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&y(+t.data.slice(o.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),i=function(t){e.postMessage(o+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var a={callback:e,args:t};return u[l]=a,i(l),l++},d.clearImmediate=h}function h(e){delete u[e]}function y(e){if(c)setTimeout(y,0,e);else{var t=u[e];if(t){c=!0;try{!function(e){var t=e.callback,i=e.args;switch(i.length){case 0:t();break;case 1:t(i[0]);break;case 2:t(i[0],i[1]);break;case 3:t(i[0],i[1],i[2]);break;default:t.apply(n,i)}}(t)}finally{h(e),c=!1}}}}}("undefined"==typeof self?void 0===e?void 0:e:self)}).call(this,n(4),n(34))},function(e,t,n){"use strict";var i=Function.prototype.apply;function a(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new a(i.call(setTimeout,window,arguments),clearTimeout)},t.setInterval=function(){return new a(i.call(setInterval,window,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(window,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(35),t.setImmediate=setImmediate,t.clearImmediate=clearImmediate},function(e,t,n){"use strict";(function(t){var n="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},i=setTimeout;function a(){}function r(e){if(!(this instanceof r))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],c(e,this)}function o(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,r._immediateFn(function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var i;try{i=n(e._value)}catch(e){return void l(t.promise,e)}s(t.promise,i)}else(1===e._state?s:l)(t.promise,e._value)})):e._deferreds.push(t)}function s(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"===(void 0===t?"undefined":n(t))||"function"==typeof t)){var i=t.then;if(t instanceof r)return e._state=3,e._value=t,void u(e);if("function"==typeof i)return void c((a=i,o=t,function(){a.apply(o,arguments)}),e)}e._state=1,e._value=t,u(e)}catch(t){l(e,t)}var a,o}function l(e,t){e._state=2,e._value=t,u(e)}function u(e){2===e._state&&0===e._deferreds.length&&r._immediateFn(function(){e._handled||r._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t<n;t++)o(e,e._deferreds[t]);e._deferreds=null}function c(e,t){var n=!1;try{e(function(e){n||(n=!0,s(t,e))},function(e){n||(n=!0,l(t,e))})}catch(e){if(n)return;n=!0,l(t,e)}}r.prototype.catch=function(e){return this.then(null,e)},r.prototype.then=function(e,t){var n=new this.constructor(a);return o(this,new function(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}(e,t,n)),n},r.prototype.finally=function(e){var t=this.constructor;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){return t.reject(n)})})},r.all=function(e){return new r(function(t,i){if(!e||void 0===e.length)throw new TypeError("Promise.all accepts an array");var a=Array.prototype.slice.call(e);if(0===a.length)return t([]);var r=a.length;function o(e,s){try{if(s&&("object"===(void 0===s?"undefined":n(s))||"function"==typeof s)){var l=s.then;if("function"==typeof l)return void l.call(s,function(t){o(e,t)},i)}a[e]=s,0==--r&&t(a)}catch(e){i(e)}}for(var s=0;s<a.length;s++)o(s,a[s])})},r.resolve=function(e){return e&&"object"===(void 0===e?"undefined":n(e))&&e.constructor===r?e:new r(function(t){t(e)})},r.reject=function(e){return new r(function(t,n){n(e)})},r.race=function(e){return new r(function(t,n){for(var i=0,a=e.length;i<a;i++)e[i].then(t,n)})},r._immediateFn="function"==typeof t&&function(e){t(e)}||function(e){i(e,0)},r._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)},e.exports=r}).call(this,n(36).setImmediate)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=v(n(37)),r=v(n(0)),o=v(n(3)),s=v(n(18)),l=v(n(17)),u=v(n(13)),c=v(n(12)),p=v(n(11)),d=v(n(9)),h=v(n(8)),y=v(n(7)),f=v(n(6));function v(e){return e&&e.__esModule?e:{default:e}}var m=[],g=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=(0,s.default)(t),this.container=this.options.container,this.paused=!0,this.playedPromise=a.default.resolve(),this.mode="normal",this.randomOrder=r.default.randomOrder(this.options.audio.length),this.container.classList.add("aplayer"),this.options.lrcType&&!this.options.fixed&&this.container.classList.add("aplayer-withlrc"),this.options.audio.length>1&&this.container.classList.add("aplayer-withlist"),r.default.isMobile&&this.container.classList.add("aplayer-mobile"),this.arrow=this.container.offsetWidth<=300,this.arrow&&this.container.classList.add("aplayer-arrow"),this.container=this.options.container,2===this.options.lrcType||!0===this.options.lrcType)for(var n=this.container.getElementsByClassName("aplayer-lrc-content"),i=0;i<n.length;i++)this.options.audio[i]&&(this.options.audio[i].lrc=n[i].innerHTML);this.template=new l.default({container:this.container,options:this.options,randomOrder:this.randomOrder}),this.options.fixed&&(this.container.classList.add("aplayer-fixed"),this.template.body.style.width=this.template.body.offsetWidth-18+"px"),this.options.mini&&(this.setMode("mini"),this.template.info.style.display="block"),this.template.info.offsetWidth<200&&this.template.time.classList.add("aplayer-time-narrow"),this.options.lrcType&&(this.lrc=new p.default({container:this.template.lrc,async:3===this.options.lrcType,player:this})),this.events=new y.default,this.storage=new c.default(this),this.bar=new u.default(this.template),this.controller=new d.default(this),this.timer=new h.default(this),this.list=new f.default(this),this.initAudio(),this.bindEvents(),"random"===this.options.order?this.list.switch(this.randomOrder[0]):this.list.switch(0),this.options.autoplay&&this.play(),m.push(this)}return i(e,[{key:"initAudio",value:function(){var e=this;this.audio=document.createElement("audio"),this.audio.preload=this.options.preload;for(var t=function(t){e.audio.addEventListener(e.events.audioEvents[t],function(n){e.events.trigger(e.events.audioEvents[t],n)})},n=0;n<this.events.audioEvents.length;n++)t(n);this.volume(this.storage.get("volume"),!0)}},{key:"bindEvents",value:function(){var e=this;this.on("play",function(){e.paused&&e.setUIPlaying()}),this.on("pause",function(){e.paused||e.setUIPaused()}),this.on("timeupdate",function(){if(!e.disableTimeupdate){e.bar.set("played",e.audio.currentTime/e.duration,"width"),e.lrc&&e.lrc.update();var t=r.default.secondToTime(e.audio.currentTime);e.template.ptime.innerHTML!==t&&(e.template.ptime.innerHTML=t)}}),this.on("durationchange",function(){1!==e.duration&&(e.template.dtime.innerHTML=r.default.secondToTime(e.duration))}),this.on("progress",function(){var t=e.audio.buffered.length?e.audio.buffered.end(e.audio.buffered.length-1)/e.duration:0;e.bar.set("loaded",t,"width")});var t=void 0;this.on("error",function(){e.list.audios.length>1?(e.notice("An audio error has occurred, player will skip forward in 2 seconds."),t=setTimeout(function(){e.skipForward(),e.paused||e.play()},2e3)):1===e.list.audios.length&&e.notice("An audio error has occurred.")}),this.events.on("listswitch",function(){t&&clearTimeout(t)}),this.on("ended",function(){"none"===e.options.loop?"list"===e.options.order?e.list.index<e.list.audios.length-1?(e.list.switch((e.list.index+1)%e.list.audios.length),e.play()):(e.list.switch((e.list.index+1)%e.list.audios.length),e.pause()):"random"===e.options.order&&(e.randomOrder.indexOf(e.list.index)<e.randomOrder.length-1?(e.list.switch(e.nextIndex()),e.play()):(e.list.switch(e.nextIndex()),e.pause())):"one"===e.options.loop?(e.list.switch(e.list.index),e.play()):"all"===e.options.loop&&(e.skipForward(),e.play())})}},{key:"setAudio",value:function(e){this.hls&&(this.hls.destroy(),this.hls=null);var t=e.type;this.options.customAudioType&&this.options.customAudioType[t]?"[object Function]"===Object.prototype.toString.call(this.options.customAudioType[t])?this.options.customAudioType[t](this.audio,e,this):console.error("Illegal customType: "+t):(t&&"auto"!==t||(t=/m3u8(#|\?|$)/i.exec(e.url)?"hls":"normal"),"hls"===t?Hls.isSupported()?(this.hls=new Hls,this.hls.loadSource(e.url),this.hls.attachMedia(this.audio)):this.audio.canPlayType("application/x-mpegURL")||this.audio.canPlayType("application/vnd.apple.mpegURL")?this.audio.src=e.url:this.notice("Error: HLS is not supported."):"normal"===t&&(this.audio.src=e.url)),this.seek(0),this.paused||this.audio.play()}},{key:"theme",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.list.audios[this.list.index].theme||this.options.theme,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.list.index;(!(arguments.length>2&&void 0!==arguments[2])||arguments[2])&&this.list.audios[t]&&(this.list.audios[t].theme=e),this.template.listCurs[t]&&(this.template.listCurs[t].style.backgroundColor=e),t===this.list.index&&(this.template.pic.style.backgroundColor=e,this.template.played.style.background=e,this.template.thumb.style.background=e,this.template.volume.style.background=e)}},{key:"seek",value:function(e){e=Math.max(e,0),e=Math.min(e,this.duration),this.audio.currentTime=e,this.bar.set("played",e/this.duration,"width"),this.template.ptime.innerHTML=r.default.secondToTime(e)}},{key:"setUIPlaying",value:function(){var e=this;if(this.paused&&(this.paused=!1,this.template.button.classList.remove("aplayer-play"),this.template.button.classList.add("aplayer-pause"),this.template.button.innerHTML="",setTimeout(function(){e.template.button.innerHTML=o.default.pause},100),this.template.skipPlayButton.innerHTML=o.default.pause),this.timer.enable("loading"),this.options.mutex)for(var t=0;t<m.length;t++)this!==m[t]&&m[t].pause()}},{key:"play",value:function(){var e=this;this.setUIPlaying();var t=this.audio.play();t&&t.catch(function(t){console.warn(t),"NotAllowedError"===t.name&&e.setUIPaused()})}},{key:"setUIPaused",value:function(){var e=this;this.paused||(this.paused=!0,this.template.button.classList.remove("aplayer-pause"),this.template.button.classList.add("aplayer-play"),this.template.button.innerHTML="",setTimeout(function(){e.template.button.innerHTML=o.default.play},100),this.template.skipPlayButton.innerHTML=o.default.play),this.container.classList.remove("aplayer-loading"),this.timer.disable("loading")}},{key:"pause",value:function(){this.setUIPaused(),this.audio.pause()}},{key:"switchVolumeIcon",value:function(){this.volume()>=.95?this.template.volumeButton.innerHTML=o.default.volumeUp:this.volume()>0?this.template.volumeButton.innerHTML=o.default.volumeDown:this.template.volumeButton.innerHTML=o.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.storage.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:"switchAudio",value:function(e){this.list.switch(e)}},{key:"addAudio",value:function(e){this.list.add(e)}},{key:"removeAudio",value:function(e){this.list.remove(e)}},{key:"destroy",value:function(){m.splice(m.indexOf(this),1),this.pause(),this.container.innerHTML="",this.audio.src="",this.timer.destroy(),this.events.trigger("destroy")}},{key:"setMode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"normal";this.mode=e,"mini"===e?this.container.classList.add("aplayer-narrow"):"normal"===e&&this.container.classList.remove("aplayer-narrow")}},{key:"notice",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2e3,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.8;this.template.notice.innerHTML=e,this.template.notice.style.opacity=i,this.noticeTime&&clearTimeout(this.noticeTime),this.events.trigger("noticeshow",{text:e}),n&&(this.noticeTime=setTimeout(function(){t.template.notice.style.opacity=0,t.events.trigger("noticehide")},n))}},{key:"prevIndex",value:function(){if(!(this.list.audios.length>1))return 0;if("list"===this.options.order)return this.list.index-1<0?this.list.audios.length-1:this.list.index-1;if("random"===this.options.order){var e=this.randomOrder.indexOf(this.list.index);return 0===e?this.randomOrder[this.randomOrder.length-1]:this.randomOrder[e-1]}}},{key:"nextIndex",value:function(){if(!(this.list.audios.length>1))return 0;if("list"===this.options.order)return(this.list.index+1)%this.list.audios.length;if("random"===this.options.order){var e=this.randomOrder.indexOf(this.list.index);return e===this.randomOrder.length-1?this.randomOrder[0]:this.randomOrder[e+1]}}},{key:"skipBack",value:function(){this.list.switch(this.prevIndex())}},{key:"skipForward",value:function(){this.list.switch(this.nextIndex())}},{key:"duration",get:function(){return isNaN(this.audio.duration)?0:this.audio.duration}}],[{key:"version",get:function(){return"1.10.1"}}]),e}();t.default=g},,function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(40);var i,a=n(38),r=(i=a)&&i.__esModule?i:{default:i};console.log("\n %c APlayer v1.10.1 af84efb %c http://aplayer.js.org \n","color: #fadfa3; background: #030307; padding:5px 0;","background: #fadfa3; padding:5px 0;"),t.default=r.default}]).default});
|
2
|
-
|
1
|
+
(function(L,M){typeof module=="object"&&typeof module.exports=="object"?M():typeof define=="function"&&define.amd?define([],M):(L=typeof globalThis<"u"?globalThis:L||self)&&M()})(this,function(){function L(y,h){return h!=null&&typeof Symbol<"u"&&h[Symbol.hasInstance]?!!h[Symbol.hasInstance](y):y instanceof h}function M(y){"@swc/helpers - typeof";return y&&typeof Symbol<"u"&&y.constructor===Symbol?"symbol":typeof y}(function(y,h){(typeof exports>"u"?"undefined":M(exports))=="object"&&(typeof module>"u"?"undefined":M(module))=="object"?module.exports=h():typeof define=="function"&&define.amd?define("APlayer",[],h):(typeof exports>"u"?"undefined":M(exports))=="object"?exports.APlayer=h():y.APlayer=h()})(window,function(){return function(y){var h={};function f(d){if(h[d])return h[d].exports;var p=h[d]={i:d,l:!1,exports:{}};return y[d].call(p.exports,p,p.exports,f),p.l=!0,p.exports}return f.m=y,f.c=h,f.d=function(d,p,e){f.o(d,p)||Object.defineProperty(d,p,{configurable:!1,enumerable:!0,get:e})},f.r=function(d){Object.defineProperty(d,"__esModule",{value:!0})},f.n=function(d){var p=d&&d.__esModule?function(){return d.default}:function(){return d};return f.d(p,"a",p),p},f.o=function(d,p){return Object.prototype.hasOwnProperty.call(d,p)},f.p="/",f(f.s=41)}([function(y,h,f){"use strict";Object.defineProperty(h,"__esModule",{value:!0});var d=/mobile/i.test(window.navigator.userAgent),p={secondToTime:function(o){var i=Math.floor(o/3600),a=Math.floor((o-3600*i)/60),n=Math.floor(o-3600*i-60*a);return(i>0?[i,a,n]:[a,n]).map(function(t){return t<10?"0"+t:""+t}).join(":")},getElementViewLeft:function(o){var i=o.offsetLeft,a=o.offsetParent,n=document.body.scrollLeft+document.documentElement.scrollLeft;if(document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement)for(;a!==null&&a!==o;)i+=a.offsetLeft,a=a.offsetParent;else for(;a!==null;)i+=a.offsetLeft,a=a.offsetParent;return i-n},getElementViewTop:function(o,i){for(var a,n=o.offsetTop,t=o.offsetParent;t!==null;)n+=t.offsetTop,t=t.offsetParent;return a=document.body.scrollTop+document.documentElement.scrollTop,i?n:n-a},isMobile:d,storage:{set:function(o,i){localStorage.setItem(o,i)},get:function(o){return localStorage.getItem(o)}},nameMap:{dragStart:d?"touchstart":"mousedown",dragMove:d?"touchmove":"mousemove",dragEnd:d?"touchend":"mouseup"},randomOrder:function(o){return function(i){for(var a=i.length-1;a>=0;a--){var n=Math.floor(Math.random()*(a+1)),t=i[n];i[n]=i[a],i[a]=t}return i}([].concat(function(i){if(Array.isArray(i)){for(var a=0,n=Array(i.length);a<i.length;a++)n[a]=i[a];return n}return Array.from(i)}(Array(o))).map(function(i,a){return a}))}};h.default=p},function(y,h,f){var d=f(2);y.exports=function(p){"use strict";p=p||{};var e="",o=d.$each,i=p.audio,a=(p.$value,p.$index,d.$escape),n=p.theme,t=p.index;return o(i,function(s,u){e+=`
|
2
|
+
<li>
|
3
|
+
<span class="aplayer-list-cur" style="background-color: `,e+=a(s.theme||n),e+=`;"></span>
|
4
|
+
<span class="aplayer-list-index">`,e+=a(u+t),e+=`</span>
|
5
|
+
<span class="aplayer-list-title">`,e+=a(s.name),e+=`</span>
|
6
|
+
<span class="aplayer-list-author">`,e+=a(s.artist),e+=`</span>
|
7
|
+
</li>
|
8
|
+
`}),e}},function(y,h,f){"use strict";y.exports=f(15)},function(y,h,f){"use strict";Object.defineProperty(h,"__esModule",{value:!0});var d=x(f(33)),p=x(f(32)),e=x(f(31)),o=x(f(30)),i=x(f(29)),a=x(f(28)),n=x(f(27)),t=x(f(26)),s=x(f(25)),u=x(f(24)),l=x(f(23)),c=x(f(22)),b=x(f(21)),w=x(f(20)),k=x(f(19));function x(v){return v&&v.__esModule?v:{default:v}}var m={play:d.default,pause:p.default,volumeUp:e.default,volumeDown:o.default,volumeOff:i.default,orderRandom:a.default,orderList:n.default,menu:t.default,loopAll:s.default,loopOne:u.default,loopNone:l.default,loading:c.default,right:b.default,skip:w.default,lrc:k.default};h.default=m},function(y,h,f){"use strict";var d,p=typeof Symbol=="function"&&M(Symbol.iterator)=="symbol"?function(o){return typeof o>"u"?"undefined":M(o)}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e>"u"?"undefined":M(e)};d=function(){return this}();try{d=d||Function("return this")()||(0,eval)("this")}catch{(typeof window>"u"?"undefined":p(window))==="object"&&(d=window)}y.exports=d},function(y,h,f){"use strict";var d,p,e=typeof Symbol=="function"&&M(Symbol.iterator)=="symbol"?function(i){return typeof i>"u"?"undefined":M(i)}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o>"u"?"undefined":M(o)};(p=typeof(d=function(){if((typeof window>"u"?"undefined":e(window))==="object"&&document.querySelectorAll!==void 0&&window.pageYOffset!==void 0&&history.pushState!==void 0){var i=function(t,s,u,l){return u>l?s:t+(s-t)*((c=u/l)<.5?4*c*c*c:(c-1)*(2*c-2)*(2*c-2)+1);var c},a=function(t,s,u,l){s=s||500;var c=(l=l||window).scrollTop||window.pageYOffset;if(typeof t=="number")var b=parseInt(t);else var b=function(x,m){return x.nodeName==="HTML"?-m:x.getBoundingClientRect().top+m}(t,c);var w=Date.now(),k=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(x){window.setTimeout(x,15)};(function x(){var m=Date.now()-w;l!==window?l.scrollTop=i(c,b,m,s):window.scroll(0,i(c,b,m,s)),m>s?typeof u=="function"&&u(t):k(x)})()},n=function(s){if(!s.defaultPrevented){s.preventDefault(),location.hash!==this.hash&&window.history.pushState(null,null,this.hash);var u=document.getElementById(this.hash.substring(1));if(!u)return;a(u,500,function(l){location.replace("#"+l.id)})}};return document.addEventListener("DOMContentLoaded",function(){for(var t,s=document.querySelectorAll('a[href^="#"]:not([href="#"])'),u=s.length;t=s[--u];)t.addEventListener("click",n,!1)}),a}})=="function"?d.call(h,f,h,y):d)===void 0||(y.exports=p)},function(y,h,f){"use strict";Object.defineProperty(h,"__esModule",{value:!0});var d=function(){function n(t,s){for(var u=0;u<s.length;u++){var l=s[u];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(t,l.key,l)}}return function(t,s,u){return s&&n(t.prototype,s),u&&n(t,u),t}}(),p=i(f(1)),e=i(f(0)),o=i(f(5));function i(n){return n&&n.__esModule?n:{default:n}}var a=function(){function n(t){(function(s,u){if(!L(s,u))throw new TypeError("Cannot call a class as a function")})(this,n),this.player=t,this.index=0,this.audios=this.player.options.audio,this.bindEvents()}return d(n,[{key:"bindEvents",value:function(){var s=this;this.player.template.list.addEventListener("click",function(u){var l=void 0;l=u.target.tagName.toUpperCase()==="LI"?u.target:u.target.parentElement;var c=parseInt(l.getElementsByClassName("aplayer-list-index")[0].innerHTML)-1;c!==s.index?(s.switch(c),s.player.play()):s.player.toggle()})}},{key:"show",value:function(){this.player.events.trigger("listshow"),this.player.template.list.classList.remove("aplayer-list-hide"),this.player.template.listOl.scrollTop=33*this.index}},{key:"hide",value:function(){this.player.events.trigger("listhide"),this.player.template.list.classList.add("aplayer-list-hide")}},{key:"toggle",value:function(){this.player.template.list.classList.contains("aplayer-list-hide")?this.show():this.hide()}},{key:"add",value:function(s){this.player.events.trigger("listadd",{audios:s}),Object.prototype.toString.call(s)!=="[object Array]"&&(s=[s]),s.map(function(c){return c.name=c.name||c.title||"Audio name",c.artist=c.artist||c.author||"Audio artist",c.cover=c.cover||c.pic,c.type=c.type||"normal",c});var u=!(this.audios.length>1),l=this.audios.length===0;this.player.template.listOl.innerHTML+=(0,p.default)({theme:this.player.options.theme,audio:s,index:this.audios.length+1}),this.audios=this.audios.concat(s),u&&this.audios.length>1&&this.player.container.classList.add("aplayer-withlist"),this.player.randomOrder=e.default.randomOrder(this.audios.length),this.player.template.listCurs=this.player.container.querySelectorAll(".aplayer-list-cur"),this.player.template.listCurs[this.audios.length-1].style.backgroundColor=s.theme||this.player.options.theme,l&&(this.player.options.order==="random"?this.switch(this.player.randomOrder[0]):this.switch(0))}},{key:"remove",value:function(s){if(this.player.events.trigger("listremove",{index:s}),this.audios[s])if(this.audios.length>1){var u=this.player.container.querySelectorAll(".aplayer-list li");u[s].remove(),this.audios.splice(s,1),this.player.lrc&&this.player.lrc.remove(s),s===this.index&&(this.audios[s]?this.switch(s):this.switch(s-1)),this.index>s&&this.index--;for(var l=s;l<u.length;l++)u[l].getElementsByClassName("aplayer-list-index")[0].textContent=l;this.audios.length===1&&this.player.container.classList.remove("aplayer-withlist"),this.player.template.listCurs=this.player.container.querySelectorAll(".aplayer-list-cur")}else this.clear()}},{key:"switch",value:function(s){if(this.player.events.trigger("listswitch",{index:s}),s!==void 0&&this.audios[s]){this.index=s;var u=this.audios[this.index];this.player.template.pic.style.backgroundImage=u.cover?"url('"+u.cover+"')":"",this.player.theme(this.audios[this.index].theme||this.player.options.theme,this.index,!1),this.player.template.title.innerHTML=u.name,this.player.template.author.innerHTML=u.artist?" - "+u.artist:"";var l=this.player.container.getElementsByClassName("aplayer-list-light")[0];l&&l.classList.remove("aplayer-list-light"),this.player.container.querySelectorAll(".aplayer-list li")[this.index].classList.add("aplayer-list-light"),(0,o.default)(33*this.index,500,null,this.player.template.listOl),this.player.setAudio(u),this.player.lrc&&this.player.lrc.switch(this.index),this.player.lrc&&this.player.lrc.update(0),this.player.duration!==1&&(this.player.template.dtime.innerHTML=e.default.secondToTime(this.player.duration))}}},{key:"clear",value:function(){this.player.events.trigger("listclear"),this.index=0,this.player.container.classList.remove("aplayer-withlist"),this.player.pause(),this.audios=[],this.player.lrc&&this.player.lrc.clear(),this.player.audio.src="",this.player.template.listOl.innerHTML="",this.player.template.pic.style.backgroundImage="",this.player.theme(this.player.options.theme,this.index,!1),this.player.template.title.innerHTML="No audio",this.player.template.author.innerHTML="",this.player.bar.set("loaded",0,"width"),this.player.template.dtime.innerHTML=e.default.secondToTime(0)}}]),n}();h.default=a},function(y,h,f){"use strict";Object.defineProperty(h,"__esModule",{value:!0});var d=function(){function e(o,i){for(var a=0;a<i.length;a++){var n=i[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(o,n.key,n)}}return function(o,i,a){return i&&e(o.prototype,i),a&&e(o,a),o}}(),p=function(){function e(){(function(o,i){if(!L(o,i))throw new TypeError("Cannot call a class as a function")})(this,e),this.events={},this.audioEvents=["abort","canplay","canplaythrough","durationchange","emptied","ended","error","loadeddata","loadedmetadata","loadstart","mozaudioavailable","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],this.playerEvents=["destroy","listshow","listhide","listadd","listremove","listswitch","listclear","noticeshow","noticehide","lrcshow","lrchide"]}return d(e,[{key:"on",value:function(i,a){this.type(i)&&typeof a=="function"&&(this.events[i]||(this.events[i]=[]),this.events[i].push(a))}},{key:"trigger",value:function(i,a){if(this.events[i]&&this.events[i].length)for(var n=0;n<this.events[i].length;n++)this.events[i][n](a)}},{key:"type",value:function(i){return this.playerEvents.indexOf(i)!==-1?"player":this.audioEvents.indexOf(i)!==-1?"audio":(console.error("Unknown event name: "+i),null)}}]),e}();h.default=p},function(y,h,f){"use strict";Object.defineProperty(h,"__esModule",{value:!0});var d=function(){function e(o,i){for(var a=0;a<i.length;a++){var n=i[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(o,n.key,n)}}return function(o,i,a){return i&&e(o.prototype,i),a&&e(o,a),o}}(),p=function(){function e(o){(function(i,a){if(!L(i,a))throw new TypeError("Cannot call a class as a function")})(this,e),this.player=o,window.requestAnimationFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(i){window.setTimeout(i,1e3/60)},this.types=["loading"],this.init()}return d(e,[{key:"init",value:function(){var i=this;this.types.forEach(function(a){i["init"+a+"Checker"]()})}},{key:"initloadingChecker",value:function(){var i=this,a=0,n=0,t=!1;this.loadingChecker=setInterval(function(){i.enableloadingChecker&&(n=i.player.audio.currentTime,t||n!==a||i.player.audio.paused||(i.player.container.classList.add("aplayer-loading"),t=!0),t&&n>a&&!i.player.audio.paused&&(i.player.container.classList.remove("aplayer-loading"),t=!1),a=n)},100)}},{key:"enable",value:function(i){this["enable"+i+"Checker"]=!0,i==="fps"&&this.initfpsChecker()}},{key:"disable",value:function(i){this["enable"+i+"Checker"]=!1}},{key:"destroy",value:function(){var i=this;this.types.forEach(function(a){i["enable"+a+"Checker"]=!1,i[a+"Checker"]&&clearInterval(i[a+"Checker"])})}}]),e}();h.default=p},function(y,h,f){"use strict";Object.defineProperty(h,"__esModule",{value:!0});var d=function(){function a(n,t){for(var s=0;s<t.length;s++){var u=t[s];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(n,u.key,u)}}return function(n,t,s){return t&&a(n.prototype,t),s&&a(n,s),n}}(),p=o(f(0)),e=o(f(3));function o(a){return a&&a.__esModule?a:{default:a}}var i=function(){function a(n){(function(t,s){if(!L(t,s))throw new TypeError("Cannot call a class as a function")})(this,a),this.player=n,this.initPlayButton(),this.initPlayBar(),this.initOrderButton(),this.initLoopButton(),this.initMenuButton(),p.default.isMobile||this.initVolumeButton(),this.initMiniSwitcher(),this.initSkipButton(),this.initLrcButton()}return d(a,[{key:"initPlayButton",value:function(){var t=this;this.player.template.pic.addEventListener("click",function(){t.player.toggle()})}},{key:"initPlayBar",value:function(){var t=this,s=function(l){var c=((l.clientX||l.changedTouches[0].clientX)-p.default.getElementViewLeft(t.player.template.barWrap))/t.player.template.barWrap.clientWidth;c=Math.max(c,0),c=Math.min(c,1),t.player.bar.set("played",c,"width"),t.player.lrc&&t.player.lrc.update(c*t.player.duration),t.player.template.ptime.innerHTML=p.default.secondToTime(c*t.player.duration)},u=function l(c){document.removeEventListener(p.default.nameMap.dragEnd,l),document.removeEventListener(p.default.nameMap.dragMove,s);var b=((c.clientX||c.changedTouches[0].clientX)-p.default.getElementViewLeft(t.player.template.barWrap))/t.player.template.barWrap.clientWidth;b=Math.max(b,0),b=Math.min(b,1),t.player.bar.set("played",b,"width"),t.player.seek(t.player.bar.get("played","width")*t.player.duration),t.player.disableTimeupdate=!1};this.player.template.barWrap.addEventListener(p.default.nameMap.dragStart,function(){t.player.disableTimeupdate=!0,document.addEventListener(p.default.nameMap.dragMove,s),document.addEventListener(p.default.nameMap.dragEnd,u)})}},{key:"initVolumeButton",value:function(){var t=this;this.player.template.volumeButton.addEventListener("click",function(){t.player.audio.muted?(t.player.audio.muted=!1,t.player.switchVolumeIcon(),t.player.bar.set("volume",t.player.volume(),"height")):(t.player.audio.muted=!0,t.player.switchVolumeIcon(),t.player.bar.set("volume",0,"height"))});var s=function(l){var c=1-((l.clientY||l.changedTouches[0].clientY)-p.default.getElementViewTop(t.player.template.volumeBar,t.player.options.fixed))/t.player.template.volumeBar.clientHeight;c=Math.max(c,0),c=Math.min(c,1),t.player.volume(c)},u=function l(c){t.player.template.volumeBarWrap.classList.remove("aplayer-volume-bar-wrap-active"),document.removeEventListener(p.default.nameMap.dragEnd,l),document.removeEventListener(p.default.nameMap.dragMove,s);var b=1-((c.clientY||c.changedTouches[0].clientY)-p.default.getElementViewTop(t.player.template.volumeBar,t.player.options.fixed))/t.player.template.volumeBar.clientHeight;b=Math.max(b,0),b=Math.min(b,1),t.player.volume(b)};this.player.template.volumeBarWrap.addEventListener(p.default.nameMap.dragStart,function(){t.player.template.volumeBarWrap.classList.add("aplayer-volume-bar-wrap-active"),document.addEventListener(p.default.nameMap.dragMove,s),document.addEventListener(p.default.nameMap.dragEnd,u)})}},{key:"initOrderButton",value:function(){var t=this;this.player.template.order.addEventListener("click",function(){t.player.options.order==="list"?(t.player.options.order="random",t.player.template.order.innerHTML=e.default.orderRandom):t.player.options.order==="random"&&(t.player.options.order="list",t.player.template.order.innerHTML=e.default.orderList)})}},{key:"initLoopButton",value:function(){var t=this;this.player.template.loop.addEventListener("click",function(){t.player.list.audios.length>1?t.player.options.loop==="one"?(t.player.options.loop="none",t.player.template.loop.innerHTML=e.default.loopNone):t.player.options.loop==="none"?(t.player.options.loop="all",t.player.template.loop.innerHTML=e.default.loopAll):t.player.options.loop==="all"&&(t.player.options.loop="one",t.player.template.loop.innerHTML=e.default.loopOne):t.player.options.loop==="one"||t.player.options.loop==="all"?(t.player.options.loop="none",t.player.template.loop.innerHTML=e.default.loopNone):t.player.options.loop==="none"&&(t.player.options.loop="all",t.player.template.loop.innerHTML=e.default.loopAll)})}},{key:"initMenuButton",value:function(){var t=this;this.player.template.menu.addEventListener("click",function(){t.player.list.toggle()})}},{key:"initMiniSwitcher",value:function(){var t=this;this.player.template.miniSwitcher.addEventListener("click",function(){t.player.setMode(t.player.mode==="mini"?"normal":"mini")})}},{key:"initSkipButton",value:function(){var t=this;this.player.template.skipBackButton.addEventListener("click",function(){t.player.skipBack()}),this.player.template.skipForwardButton.addEventListener("click",function(){t.player.skipForward()}),this.player.template.skipPlayButton.addEventListener("click",function(){t.player.toggle()})}},{key:"initLrcButton",value:function(){var t=this;this.player.template.lrcButton.addEventListener("click",function(){t.player.template.lrcButton.classList.contains("aplayer-icon-lrc-inactivity")?(t.player.template.lrcButton.classList.remove("aplayer-icon-lrc-inactivity"),t.player.lrc&&t.player.lrc.show()):(t.player.template.lrcButton.classList.add("aplayer-icon-lrc-inactivity"),t.player.lrc&&t.player.lrc.hide())})}}]),a}();h.default=i},function(y,h,f){var d=f(2);y.exports=function(p){"use strict";p=p||{};var e="",o=d.$each,i=p.lyrics,a=(p.$value,p.$index,d.$escape);return o(i,function(n,t){e+=`
|
9
|
+
<p`,t===0&&(e+=' class="aplayer-lrc-current"'),e+=">",e+=a(n[1]),e+=`</p>
|
10
|
+
`}),e}},function(y,h,f){"use strict";Object.defineProperty(h,"__esModule",{value:!0});var d,p=function(){function a(n,t){for(var s=0;s<t.length;s++){var u=t[s];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(n,u.key,u)}}return function(n,t,s){return t&&a(n.prototype,t),s&&a(n,s),n}}(),e=f(10),o=(d=e)&&d.__esModule?d:{default:d},i=function(){function a(n){(function(t,s){if(!L(t,s))throw new TypeError("Cannot call a class as a function")})(this,a),this.container=n.container,this.async=n.async,this.player=n.player,this.parsed=[],this.index=0,this.current=[]}return p(a,[{key:"show",value:function(){this.player.events.trigger("lrcshow"),this.player.template.lrcWrap.classList.remove("aplayer-lrc-hide")}},{key:"hide",value:function(){this.player.events.trigger("lrchide"),this.player.template.lrcWrap.classList.add("aplayer-lrc-hide")}},{key:"toggle",value:function(){this.player.template.lrcWrap.classList.contains("aplayer-lrc-hide")?this.show():this.hide()}},{key:"update",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.player.audio.currentTime;if(this.index>this.current.length-1||t<this.current[this.index][0]||!this.current[this.index+1]||t>=this.current[this.index+1][0])for(var s=0;s<this.current.length;s++)t>=this.current[s][0]&&(!this.current[s+1]||t<this.current[s+1][0])&&(this.index=s,this.container.style.transform="translateY("+16*-this.index+"px)",this.container.style.webkitTransform="translateY("+16*-this.index+"px)",this.container.getElementsByClassName("aplayer-lrc-current")[0].classList.remove("aplayer-lrc-current"),this.container.getElementsByTagName("p")[s].classList.add("aplayer-lrc-current"))}},{key:"switch",value:function(t){var s=this;if(!this.parsed[t])if(this.async){this.parsed[t]=[["00:00","Loading"]];var u=new XMLHttpRequest;u.onreadystatechange=function(){t===s.player.list.index&&u.readyState===4&&(u.status>=200&&u.status<300||u.status===304?s.parsed[t]=s.parse(u.responseText):(s.player.notice("LRC file request fails: status "+u.status),s.parsed[t]=[["00:00","Not available"]]),s.container.innerHTML=(0,o.default)({lyrics:s.parsed[t]}),s.update(0),s.current=s.parsed[t])};var l=this.player.list.audios[t].lrc;u.open("get",l,!0),u.send(null)}else this.player.list.audios[t].lrc?this.parsed[t]=this.parse(this.player.list.audios[t].lrc):this.parsed[t]=[["00:00","Not available"]];this.container.innerHTML=(0,o.default)({lyrics:this.parsed[t]}),this.update(0),this.current=this.parsed[t]}},{key:"parse",value:function(t){if(t){for(var s=(t=t.replace(/([^\]^\n])\[/g,function(r,g){return g+`
|
11
|
+
[`})).split(`
|
12
|
+
`),u=[],l=s.length,c=0;c<l;c++){var b=s[c].match(/\[(\d{2}):(\d{2})(\.(\d{2,3}))?]/g),w=s[c].replace(/.*\[(\d{2}):(\d{2})(\.(\d{2,3}))?]/g,"").replace(/<(\d{2}):(\d{2})(\.(\d{2,3}))?>/g,"").replace(/^\s+|\s+$/g,"");if(b)for(var k=b.length,x=0;x<k;x++){var m=/\[(\d{2}):(\d{2})(\.(\d{2,3}))?]/.exec(b[x]),v=60*m[1]+parseInt(m[2])+(m[4]?parseInt(m[4])/((m[4]+"").length===2?100:1e3):0);u.push([v,w])}}return(u=u.filter(function(r){return r[1]})).sort(function(r,g){return r[0]-g[0]}),u}return[]}},{key:"remove",value:function(t){this.parsed.splice(t,1)}},{key:"clear",value:function(){this.parsed=[],this.container.innerHTML=""}}]),a}();h.default=i},function(y,h,f){"use strict";Object.defineProperty(h,"__esModule",{value:!0});var d,p=function(){function a(n,t){for(var s=0;s<t.length;s++){var u=t[s];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(n,u.key,u)}}return function(n,t,s){return t&&a(n.prototype,t),s&&a(n,s),n}}(),e=f(0),o=(d=e)&&d.__esModule?d:{default:d},i=function(){function a(n){(function(t,s){if(!L(t,s))throw new TypeError("Cannot call a class as a function")})(this,a),this.storageName=n.options.storageName,this.data=JSON.parse(o.default.storage.get(this.storageName)),this.data||(this.data={}),this.data.volume=this.data.volume||n.options.volume}return p(a,[{key:"get",value:function(t){return this.data[t]}},{key:"set",value:function(t,s){this.data[t]=s,o.default.storage.set(this.storageName,JSON.stringify(this.data))}}]),a}();h.default=i},function(y,h,f){"use strict";Object.defineProperty(h,"__esModule",{value:!0});var d=function(){function e(o,i){for(var a=0;a<i.length;a++){var n=i[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(o,n.key,n)}}return function(o,i,a){return i&&e(o.prototype,i),a&&e(o,a),o}}(),p=function(){function e(o){(function(i,a){if(!L(i,a))throw new TypeError("Cannot call a class as a function")})(this,e),this.elements={},this.elements.volume=o.volume,this.elements.played=o.played,this.elements.loaded=o.loaded}return d(e,[{key:"set",value:function(i,a,n){a=Math.max(a,0),a=Math.min(a,1),this.elements[i].style[n]=100*a+"%"}},{key:"get",value:function(i,a){return parseFloat(this.elements[i].style[a])/100}}]),e}();h.default=p},function(y,h,f){"use strict";(function(d){y.exports=!1;try{y.exports=Object.prototype.toString.call(d.process)==="[object process]"}catch{}}).call(this,f(4))},function(y,h,f){"use strict";(function(d){var p=f(14),e=Object.create(p?d:window),o=/["&'<>]/;e.$escape=function(i){return function(a){var n=""+a,t=o.exec(n);if(!t)return a;var s="",u=void 0,l=void 0,c=void 0;for(u=t.index,l=0;u<n.length;u++){switch(n.charCodeAt(u)){case 34:c=""";break;case 38:c="&";break;case 39:c="'";break;case 60:c="<";break;case 62:c=">";break;default:continue}l!==u&&(s+=n.substring(l,u)),l=u+1,s+=c}return l!==u?s+n.substring(l,u):s}(function a(n){return typeof n!="string"&&(n=n==null?"":typeof n=="function"?a(n.call(n)):JSON.stringify(n)),n}(i))},e.$each=function(i,a){if(Array.isArray(i))for(var n=0,t=i.length;n<t;n++)a(i[n],n);else for(var s in i)a(i[s],s)},y.exports=e}).call(this,f(4))},function(y,h,f){var d=f(2);y.exports=function(p){"use strict";var e="",o=(p=p||{}).options,i=p.cover,a=d.$escape,n=p.icons,t=(arguments[1],function(l){return e+=l}),s=p.getObject;return p.theme,p.audio,p.index,o.fixed?(e+=`
|
13
|
+
<div class="aplayer-list`,o.listFolded&&(e+=" aplayer-list-hide"),e+='"',o.listMaxHeight&&(e+=' style="max-height: ',e+=a(o.listMaxHeight),e+='"'),e+=`>
|
14
|
+
<ol`,o.listMaxHeight&&(e+=' style="max-height: ',e+=a(o.listMaxHeight),e+='"'),e+=`>
|
15
|
+
`,t(f(1)(s({theme:o.theme,audio:o.audio,index:1}))),e+=`
|
16
|
+
</ol>
|
17
|
+
</div>
|
18
|
+
<div class="aplayer-body">
|
19
|
+
<div class="aplayer-pic" style="`,i&&(e+="background-image: url("",e+=a(i),e+="");"),e+="background-color: ",e+=a(o.theme),e+=`;">
|
20
|
+
<div class="aplayer-button aplayer-play">`,e+=n.play,e+=`</div>
|
21
|
+
</div>
|
22
|
+
<div class="aplayer-info" style="display: none;">
|
23
|
+
<div class="aplayer-music">
|
24
|
+
<span class="aplayer-title">No audio</span>
|
25
|
+
<span class="aplayer-author"></span>
|
26
|
+
</div>
|
27
|
+
<div class="aplayer-controller">
|
28
|
+
<div class="aplayer-bar-wrap">
|
29
|
+
<div class="aplayer-bar">
|
30
|
+
<div class="aplayer-loaded" style="width: 0"></div>
|
31
|
+
<div class="aplayer-played" style="width: 0; background: `,e+=a(o.theme),e+=`;">
|
32
|
+
<span class="aplayer-thumb" style="background: `,e+=a(o.theme),e+=`;">
|
33
|
+
<span class="aplayer-loading-icon">`,e+=n.loading,e+=`</span>
|
34
|
+
</span>
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
<div class="aplayer-time">
|
39
|
+
<span class="aplayer-time-inner">
|
40
|
+
<span class="aplayer-ptime">00:00</span> / <span class="aplayer-dtime">00:00</span>
|
41
|
+
</span>
|
42
|
+
<span class="aplayer-icon aplayer-icon-back">
|
43
|
+
`,e+=n.skip,e+=`
|
44
|
+
</span>
|
45
|
+
<span class="aplayer-icon aplayer-icon-play">
|
46
|
+
`,e+=n.play,e+=`
|
47
|
+
</span>
|
48
|
+
<span class="aplayer-icon aplayer-icon-forward">
|
49
|
+
`,e+=n.skip,e+=`
|
50
|
+
</span>
|
51
|
+
<div class="aplayer-volume-wrap">
|
52
|
+
<button type="button" class="aplayer-icon aplayer-icon-volume-down">
|
53
|
+
`,e+=n.volumeDown,e+=`
|
54
|
+
</button>
|
55
|
+
<div class="aplayer-volume-bar-wrap">
|
56
|
+
<div class="aplayer-volume-bar">
|
57
|
+
<div class="aplayer-volume" style="height: 80%; background: `,e+=a(o.theme),e+=`;"></div>
|
58
|
+
</div>
|
59
|
+
</div>
|
60
|
+
</div>
|
61
|
+
<button type="button" class="aplayer-icon aplayer-icon-order">
|
62
|
+
`,o.order==="list"?e+=n.orderList:o.order==="random"&&(e+=n.orderRandom),e+=`
|
63
|
+
</button>
|
64
|
+
<button type="button" class="aplayer-icon aplayer-icon-loop">
|
65
|
+
`,o.loop==="one"?e+=n.loopOne:o.loop==="all"?e+=n.loopAll:o.loop==="none"&&(e+=n.loopNone),e+=`
|
66
|
+
</button>
|
67
|
+
<button type="button" class="aplayer-icon aplayer-icon-menu">
|
68
|
+
`,e+=n.menu,e+=`
|
69
|
+
</button>
|
70
|
+
<button type="button" class="aplayer-icon aplayer-icon-lrc">
|
71
|
+
`,e+=n.lrc,e+=`
|
72
|
+
</button>
|
73
|
+
</div>
|
74
|
+
</div>
|
75
|
+
</div>
|
76
|
+
<div class="aplayer-notice"></div>
|
77
|
+
<div class="aplayer-miniswitcher"><button class="aplayer-icon">`,e+=n.right,e+=`</button></div>
|
78
|
+
</div>
|
79
|
+
<div class="aplayer-lrc">
|
80
|
+
<div class="aplayer-lrc-contents" style="transform: translateY(0); -webkit-transform: translateY(0);"></div>
|
81
|
+
</div>
|
82
|
+
`):(e+=`
|
83
|
+
<div class="aplayer-body">
|
84
|
+
<div class="aplayer-pic" style="`,i&&(e+="background-image: url("",e+=a(i),e+="");"),e+="background-color: ",e+=a(o.theme),e+=`;">
|
85
|
+
<div class="aplayer-button aplayer-play">`,e+=n.play,e+=`</div>
|
86
|
+
</div>
|
87
|
+
<div class="aplayer-info">
|
88
|
+
<div class="aplayer-music">
|
89
|
+
<span class="aplayer-title">No audio</span>
|
90
|
+
<span class="aplayer-author"></span>
|
91
|
+
</div>
|
92
|
+
<div class="aplayer-lrc">
|
93
|
+
<div class="aplayer-lrc-contents" style="transform: translateY(0); -webkit-transform: translateY(0);"></div>
|
94
|
+
</div>
|
95
|
+
<div class="aplayer-controller">
|
96
|
+
<div class="aplayer-bar-wrap">
|
97
|
+
<div class="aplayer-bar">
|
98
|
+
<div class="aplayer-loaded" style="width: 0"></div>
|
99
|
+
<div class="aplayer-played" style="width: 0; background: `,e+=a(o.theme),e+=`;">
|
100
|
+
<span class="aplayer-thumb" style="background: `,e+=a(o.theme),e+=`;">
|
101
|
+
<span class="aplayer-loading-icon">`,e+=n.loading,e+=`</span>
|
102
|
+
</span>
|
103
|
+
</div>
|
104
|
+
</div>
|
105
|
+
</div>
|
106
|
+
<div class="aplayer-time">
|
107
|
+
<span class="aplayer-time-inner">
|
108
|
+
<span class="aplayer-ptime">00:00</span> / <span class="aplayer-dtime">00:00</span>
|
109
|
+
</span>
|
110
|
+
<span class="aplayer-icon aplayer-icon-back">
|
111
|
+
`,e+=n.skip,e+=`
|
112
|
+
</span>
|
113
|
+
<span class="aplayer-icon aplayer-icon-play">
|
114
|
+
`,e+=n.play,e+=`
|
115
|
+
</span>
|
116
|
+
<span class="aplayer-icon aplayer-icon-forward">
|
117
|
+
`,e+=n.skip,e+=`
|
118
|
+
</span>
|
119
|
+
<div class="aplayer-volume-wrap">
|
120
|
+
<button type="button" class="aplayer-icon aplayer-icon-volume-down">
|
121
|
+
`,e+=n.volumeDown,e+=`
|
122
|
+
</button>
|
123
|
+
<div class="aplayer-volume-bar-wrap">
|
124
|
+
<div class="aplayer-volume-bar">
|
125
|
+
<div class="aplayer-volume" style="height: 80%; background: `,e+=a(o.theme),e+=`;"></div>
|
126
|
+
</div>
|
127
|
+
</div>
|
128
|
+
</div>
|
129
|
+
<button type="button" class="aplayer-icon aplayer-icon-order">
|
130
|
+
`,o.order==="list"?e+=n.orderList:o.order==="random"&&(e+=n.orderRandom),e+=`
|
131
|
+
</button>
|
132
|
+
<button type="button" class="aplayer-icon aplayer-icon-loop">
|
133
|
+
`,o.loop==="one"?e+=n.loopOne:o.loop==="all"?e+=n.loopAll:o.loop==="none"&&(e+=n.loopNone),e+=`
|
134
|
+
</button>
|
135
|
+
<button type="button" class="aplayer-icon aplayer-icon-menu">
|
136
|
+
`,e+=n.menu,e+=`
|
137
|
+
</button>
|
138
|
+
<button type="button" class="aplayer-icon aplayer-icon-lrc">
|
139
|
+
`,e+=n.lrc,e+=`
|
140
|
+
</button>
|
141
|
+
</div>
|
142
|
+
</div>
|
143
|
+
</div>
|
144
|
+
<div class="aplayer-notice"></div>
|
145
|
+
<div class="aplayer-miniswitcher"><button class="aplayer-icon">`,e+=n.right,e+=`</button></div>
|
146
|
+
</div>
|
147
|
+
<div class="aplayer-list`,o.listFolded&&(e+=" aplayer-list-hide"),e+='"',o.listMaxHeight&&(e+=' style="max-height: ',e+=a(o.listMaxHeight),e+='"'),e+=`>
|
148
|
+
<ol`,o.listMaxHeight&&(e+=' style="max-height: ',e+=a(o.listMaxHeight),e+='"'),e+=`>
|
149
|
+
`,t(f(1)(s({theme:o.theme,audio:o.audio,index:1}))),e+=`
|
150
|
+
</ol>
|
151
|
+
</div>
|
152
|
+
`),e}},function(y,h,f){"use strict";Object.defineProperty(h,"__esModule",{value:!0});var d=function(){function a(n,t){for(var s=0;s<t.length;s++){var u=t[s];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(n,u.key,u)}}return function(n,t,s){return t&&a(n.prototype,t),s&&a(n,s),n}}(),p=o(f(3)),e=o(f(16));function o(a){return a&&a.__esModule?a:{default:a}}var i=function(){function a(n){(function(t,s){if(!L(t,s))throw new TypeError("Cannot call a class as a function")})(this,a),this.container=n.container,this.options=n.options,this.randomOrder=n.randomOrder,this.init()}return d(a,[{key:"init",value:function(){var t="";this.options.audio.length&&(t=this.options.order==="random"?this.options.audio[this.randomOrder[0]].cover:this.options.audio[0].cover),this.container.innerHTML=(0,e.default)({options:this.options,icons:p.default,cover:t,getObject:function(u){return u}}),this.lrc=this.container.querySelector(".aplayer-lrc-contents"),this.lrcWrap=this.container.querySelector(".aplayer-lrc"),this.ptime=this.container.querySelector(".aplayer-ptime"),this.info=this.container.querySelector(".aplayer-info"),this.time=this.container.querySelector(".aplayer-time"),this.barWrap=this.container.querySelector(".aplayer-bar-wrap"),this.button=this.container.querySelector(".aplayer-button"),this.body=this.container.querySelector(".aplayer-body"),this.list=this.container.querySelector(".aplayer-list"),this.listOl=this.container.querySelector(".aplayer-list ol"),this.listCurs=this.container.querySelectorAll(".aplayer-list-cur"),this.played=this.container.querySelector(".aplayer-played"),this.loaded=this.container.querySelector(".aplayer-loaded"),this.thumb=this.container.querySelector(".aplayer-thumb"),this.volume=this.container.querySelector(".aplayer-volume"),this.volumeBar=this.container.querySelector(".aplayer-volume-bar"),this.volumeButton=this.container.querySelector(".aplayer-time button"),this.volumeBarWrap=this.container.querySelector(".aplayer-volume-bar-wrap"),this.loop=this.container.querySelector(".aplayer-icon-loop"),this.order=this.container.querySelector(".aplayer-icon-order"),this.menu=this.container.querySelector(".aplayer-icon-menu"),this.pic=this.container.querySelector(".aplayer-pic"),this.title=this.container.querySelector(".aplayer-title"),this.author=this.container.querySelector(".aplayer-author"),this.dtime=this.container.querySelector(".aplayer-dtime"),this.notice=this.container.querySelector(".aplayer-notice"),this.miniSwitcher=this.container.querySelector(".aplayer-miniswitcher"),this.skipBackButton=this.container.querySelector(".aplayer-icon-back"),this.skipForwardButton=this.container.querySelector(".aplayer-icon-forward"),this.skipPlayButton=this.container.querySelector(".aplayer-icon-play"),this.lrcButton=this.container.querySelector(".aplayer-icon-lrc")}}]),a}();h.default=i},function(y,h,f){"use strict";Object.defineProperty(h,"__esModule",{value:!0}),h.default=function(d){var p={container:d.element||document.getElementsByClassName("aplayer")[0],mini:d.narrow||d.fixed||!1,fixed:!1,autoplay:!1,mutex:!0,lrcType:d.showlrc||d.lrc||0,preload:"auto",theme:"#b7daff",loop:"all",order:"list",volume:.7,listFolded:d.fixed,listMaxHeight:d.listmaxheight||"250px",audio:d.music||[],storageName:"aplayer-setting"};for(var e in p)p.hasOwnProperty(e)&&!d.hasOwnProperty(e)&&(d[e]=p[e]);return Object.prototype.toString.call(d.audio)!=="[object Array]"&&(d.audio=[d.audio]),d.audio.map(function(o){return o.name=o.name||o.title||"Audio name",o.artist=o.artist||o.author||"Audio artist",o.cover=o.cover||o.pic,o.type=o.type||"normal",o}),d.audio.length<=1&&d.loop==="one"&&(d.loop="all"),d}},function(y,h){y.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><path d="M26.667 5.333h-21.333c-0 0-0.001 0-0.001 0-1.472 0-2.666 1.194-2.666 2.666 0 0 0 0.001 0 0.001v-0 16c0 0 0 0.001 0 0.001 0 1.472 1.194 2.666 2.666 2.666 0 0 0.001 0 0.001 0h21.333c0 0 0.001 0 0.001 0 1.472 0 2.666-1.194 2.666-2.666 0-0 0-0.001 0-0.001v0-16c0-0 0-0.001 0-0.001 0-1.472-1.194-2.666-2.666-2.666-0 0-0.001 0-0.001 0h0zM5.333 16h5.333v2.667h-5.333v-2.667zM18.667 24h-13.333v-2.667h13.333v2.667zM26.667 24h-5.333v-2.667h5.333v2.667zM26.667 18.667h-13.333v-2.667h13.333v2.667z"></path></svg>'},function(y,h){y.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><path d="M25.468 6.947c-0.326-0.172-0.724-0.151-1.030 0.057l-6.438 4.38v-3.553c0-0.371-0.205-0.71-0.532-0.884-0.326-0.172-0.724-0.151-1.030 0.057l-12 8.164c-0.274 0.186-0.438 0.496-0.438 0.827s0.164 0.641 0.438 0.827l12 8.168c0.169 0.115 0.365 0.174 0.562 0.174 0.16 0 0.321-0.038 0.468-0.116 0.327-0.173 0.532-0.514 0.532-0.884v-3.556l6.438 4.382c0.169 0.115 0.365 0.174 0.562 0.174 0.16 0 0.321-0.038 0.468-0.116 0.327-0.173 0.532-0.514 0.532-0.884v-16.333c0-0.371-0.205-0.71-0.532-0.884z"></path></svg>'},function(y,h){y.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><path d="M22 16l-10.105-10.6-1.895 1.987 8.211 8.613-8.211 8.612 1.895 1.988 8.211-8.613z"></path></svg>'},function(y,h){y.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><path d="M4 16c0-6.6 5.4-12 12-12s12 5.4 12 12c0 1.2-0.8 2-2 2s-2-0.8-2-2c0-4.4-3.6-8-8-8s-8 3.6-8 8 3.6 8 8 8c1.2 0 2 0.8 2 2s-0.8 2-2 2c-6.6 0-12-5.4-12-12z"></path></svg>'},function(y,h){y.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 29 32"><path d="M2.667 7.027l1.707-1.693 22.293 22.293-1.693 1.707-4-4h-11.64v4l-5.333-5.333 5.333-5.333v4h8.973l-8.973-8.973v0.973h-2.667v-3.64l-4-4zM22.667 17.333h2.667v5.573l-2.667-2.667v-2.907zM22.667 6.667v-4l5.333 5.333-5.333 5.333v-4h-10.907l-2.667-2.667h13.573z"></path></svg>'},function(y,h){y.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 33 32"><path d="M9.333 9.333h13.333v4l5.333-5.333-5.333-5.333v4h-16v8h2.667v-5.333zM22.667 22.667h-13.333v-4l-5.333 5.333 5.333 5.333v-4h16v-8h-2.667v5.333zM17.333 20v-8h-1.333l-2.667 1.333v1.333h2v5.333h2z"></path></svg>'},function(y,h){y.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 29 32"><path d="M9.333 9.333h13.333v4l5.333-5.333-5.333-5.333v4h-16v8h2.667v-5.333zM22.667 22.667h-13.333v-4l-5.333 5.333 5.333 5.333v-4h16v-8h-2.667v5.333z"></path></svg>'},function(y,h){y.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 22 32"><path d="M20.8 14.4q0.704 0 1.152 0.48t0.448 1.12-0.48 1.12-1.12 0.48h-19.2q-0.64 0-1.12-0.48t-0.48-1.12 0.448-1.12 1.152-0.48h19.2zM1.6 11.2q-0.64 0-1.12-0.48t-0.48-1.12 0.448-1.12 1.152-0.48h19.2q0.704 0 1.152 0.48t0.448 1.12-0.48 1.12-1.12 0.48h-19.2zM20.8 20.8q0.704 0 1.152 0.48t0.448 1.12-0.48 1.12-1.12 0.48h-19.2q-0.64 0-1.12-0.48t-0.48-1.12 0.448-1.12 1.152-0.48h19.2z"></path></svg>'},function(y,h){y.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><path d="M0.622 18.334h19.54v7.55l11.052-9.412-11.052-9.413v7.549h-19.54v3.725z"></path></svg>'},function(y,h){y.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><path d="M22.667 4l7 6-7 6 7 6-7 6v-4h-3.653l-3.76-3.76 2.827-2.827 2.587 2.587h2v-8h-2l-12 12h-6v-4h4.347l12-12h3.653v-4zM2.667 8h6l3.76 3.76-2.827 2.827-2.587-2.587h-4.347v-4z"></path></svg>'},function(y,h){y.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 28 32"><path d="M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8z"></path></svg>'},function(y,h){y.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 28 32"><path d="M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8zM20.576 16q0 1.344-0.768 2.528t-2.016 1.664q-0.16 0.096-0.448 0.096-0.448 0-0.8-0.32t-0.32-0.832q0-0.384 0.192-0.64t0.544-0.448 0.608-0.384 0.512-0.64 0.192-1.024-0.192-1.024-0.512-0.64-0.608-0.384-0.544-0.448-0.192-0.64q0-0.48 0.32-0.832t0.8-0.32q0.288 0 0.448 0.096 1.248 0.48 2.016 1.664t0.768 2.528z"></path></svg>'},function(y,h){y.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 28 32"><path d="M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8zM20.576 16q0 1.344-0.768 2.528t-2.016 1.664q-0.16 0.096-0.448 0.096-0.448 0-0.8-0.32t-0.32-0.832q0-0.384 0.192-0.64t0.544-0.448 0.608-0.384 0.512-0.64 0.192-1.024-0.192-1.024-0.512-0.64-0.608-0.384-0.544-0.448-0.192-0.64q0-0.48 0.32-0.832t0.8-0.32q0.288 0 0.448 0.096 1.248 0.48 2.016 1.664t0.768 2.528zM25.152 16q0 2.72-1.536 5.056t-4 3.36q-0.256 0.096-0.448 0.096-0.48 0-0.832-0.352t-0.32-0.8q0-0.704 0.672-1.056 1.024-0.512 1.376-0.8 1.312-0.96 2.048-2.4t0.736-3.104-0.736-3.104-2.048-2.4q-0.352-0.288-1.376-0.8-0.672-0.352-0.672-1.056 0-0.448 0.32-0.8t0.8-0.352q0.224 0 0.48 0.096 2.496 1.056 4 3.36t1.536 5.056zM29.728 16q0 4.096-2.272 7.552t-6.048 5.056q-0.224 0.096-0.448 0.096-0.48 0-0.832-0.352t-0.32-0.8q0-0.64 0.704-1.056 0.128-0.064 0.384-0.192t0.416-0.192q0.8-0.448 1.44-0.896 2.208-1.632 3.456-4.064t1.216-5.152-1.216-5.152-3.456-4.064q-0.64-0.448-1.44-0.896-0.128-0.096-0.416-0.192t-0.384-0.192q-0.704-0.416-0.704-1.056 0-0.448 0.32-0.8t0.832-0.352q0.224 0 0.448 0.096 3.776 1.632 6.048 5.056t2.272 7.552z"></path></svg>'},function(y,h){y.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 17 32"><path d="M14.080 4.8q2.88 0 2.88 2.048v18.24q0 2.112-2.88 2.112t-2.88-2.112v-18.24q0-2.048 2.88-2.048zM2.88 4.8q2.88 0 2.88 2.048v18.24q0 2.112-2.88 2.112t-2.88-2.112v-18.24q0-2.048 2.88-2.048z"></path></svg>'},function(y,h){y.exports='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 16 31"><path d="M15.552 15.168q0.448 0.32 0.448 0.832 0 0.448-0.448 0.768l-13.696 8.512q-0.768 0.512-1.312 0.192t-0.544-1.28v-16.448q0-0.96 0.544-1.28t1.312 0.192z"></path></svg>'},function(y,h,f){"use strict";var d,p,e=y.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(k){if(d===setTimeout)return setTimeout(k,0);if((d===o||!d)&&setTimeout)return d=setTimeout,setTimeout(k,0);try{return d(k,0)}catch{try{return d.call(null,k,0)}catch{return d.call(this,k,0)}}}(function(){try{d=typeof setTimeout=="function"?setTimeout:o}catch{d=o}try{p=typeof clearTimeout=="function"?clearTimeout:i}catch{p=i}})();var n,t=[],s=!1,u=-1;function l(){s&&n&&(s=!1,n.length?t=n.concat(t):u=-1,t.length&&c())}function c(){if(!s){var k=a(l);s=!0;for(var x=t.length;x;){for(n=t,t=[];++u<x;)n&&n[u].run();u=-1,x=t.length}n=null,s=!1,function(m){if(p===clearTimeout)return clearTimeout(m);if((p===i||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(m);try{p(m)}catch{try{return p.call(null,m)}catch{return p.call(this,m)}}}(k)}}function b(k,x){this.fun=k,this.array=x}function w(){}e.nextTick=function(k){var x=new Array(arguments.length-1);if(arguments.length>1)for(var m=1;m<arguments.length;m++)x[m-1]=arguments[m];t.push(new b(k,x)),t.length!==1||s||a(c)},b.prototype.run=function(){this.fun.apply(null,this.array)},e.title="browser",e.browser=!0,e.env={},e.argv=[],e.version="",e.versions={},e.on=w,e.addListener=w,e.once=w,e.off=w,e.removeListener=w,e.removeAllListeners=w,e.emit=w,e.prependListener=w,e.prependOnceListener=w,e.listeners=function(k){return[]},e.binding=function(k){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(k){throw new Error("process.chdir is not supported")},e.umask=function(){return 0}},function(y,h,f){"use strict";(function(d,p){(function(e,o){if(!e.setImmediate){var i,a,n,t,s,u=1,l={},c=!1,b=e.document,w=Object.getPrototypeOf&&Object.getPrototypeOf(e);w=w&&w.setTimeout?w:e,{}.toString.call(e.process)==="[object process]"?i=function(v){p.nextTick(function(){x(v)})}:function(){if(e.postMessage&&!e.importScripts){var m=!0,v=e.onmessage;return e.onmessage=function(){m=!1},e.postMessage("","*"),e.onmessage=v,m}}()?(t="setImmediate$"+Math.random()+"$",s=function(v){v.source===e&&typeof v.data=="string"&&v.data.indexOf(t)===0&&x(+v.data.slice(t.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),i=function(v){e.postMessage(t+v,"*")}):e.MessageChannel?((n=new MessageChannel).port1.onmessage=function(m){x(m.data)},i=function(v){n.port2.postMessage(v)}):b&&"onreadystatechange"in b.createElement("script")?(a=b.documentElement,i=function(v){var r=b.createElement("script");r.onreadystatechange=function(){x(v),r.onreadystatechange=null,a.removeChild(r),r=null},a.appendChild(r)}):i=function(v){setTimeout(x,0,v)},w.setImmediate=function(m){typeof m!="function"&&(m=new Function(""+m));for(var v=new Array(arguments.length-1),r=0;r<v.length;r++)v[r]=arguments[r+1];var g={callback:m,args:v};return l[u]=g,i(u),u++},w.clearImmediate=k}function k(m){delete l[m]}function x(m){if(c)setTimeout(x,0,m);else{var v=l[m];if(v){c=!0;try{(function(r){var g=r.callback,T=r.args;switch(T.length){case 0:g();break;case 1:g(T[0]);break;case 2:g(T[0],T[1]);break;case 3:g(T[0],T[1],T[2]);break;default:g.apply(o,T)}})(v)}finally{k(m),c=!1}}}}})(typeof self>"u"?d===void 0?void 0:d:self)}).call(this,f(4),f(34))},function(y,h,f){"use strict";var d=Function.prototype.apply;function p(e,o){this._id=e,this._clearFn=o}h.setTimeout=function(){return new p(d.call(setTimeout,window,arguments),clearTimeout)},h.setInterval=function(){return new p(d.call(setInterval,window,arguments),clearInterval)},h.clearTimeout=h.clearInterval=function(e){e&&e.close()},p.prototype.unref=p.prototype.ref=function(){},p.prototype.close=function(){this._clearFn.call(window,this._id)},h.enroll=function(e,o){clearTimeout(e._idleTimeoutId),e._idleTimeout=o},h.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},h._unrefActive=h.active=function(e){clearTimeout(e._idleTimeoutId);var o=e._idleTimeout;o>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},o))},f(35),h.setImmediate=setImmediate,h.clearImmediate=clearImmediate},function(y,h,f){"use strict";(function(d){var p=typeof Symbol=="function"&&M(Symbol.iterator)=="symbol"?function(c){return typeof c>"u"?"undefined":M(c)}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l>"u"?"undefined":M(l)},e=setTimeout;function o(){}function i(l){if(!L(this,i))throw new TypeError("Promises must be constructed via new");if(typeof l!="function")throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],u(l,this)}function a(l,c){for(;l._state===3;)l=l._value;l._state!==0?(l._handled=!0,i._immediateFn(function(){var b=l._state===1?c.onFulfilled:c.onRejected;if(b!==null){var w;try{w=b(l._value)}catch(k){return void t(c.promise,k)}n(c.promise,w)}else(l._state===1?n:t)(c.promise,l._value)})):l._deferreds.push(c)}function n(l,c){try{if(c===l)throw new TypeError("A promise cannot be resolved with itself.");if(c&&((c===void 0?"undefined":p(c))==="object"||typeof c=="function")){var b=c.then;if(L(c,i))return l._state=3,l._value=c,void s(l);if(typeof b=="function")return void u((w=b,k=c,function(){w.apply(k,arguments)}),l)}l._state=1,l._value=c,s(l)}catch(x){t(l,x)}var w,k}function t(l,c){l._state=2,l._value=c,s(l)}function s(l){l._state===2&&l._deferreds.length===0&&i._immediateFn(function(){l._handled||i._unhandledRejectionFn(l._value)});for(var c=0,b=l._deferreds.length;c<b;c++)a(l,l._deferreds[c]);l._deferreds=null}function u(l,c){var b=!1;try{l(function(w){b||(b=!0,n(c,w))},function(w){b||(b=!0,t(c,w))})}catch(w){if(b)return;b=!0,t(c,w)}}i.prototype.catch=function(l){return this.then(null,l)},i.prototype.then=function(l,c){var b=new this.constructor(o);return a(this,new function(w,k,x){this.onFulfilled=typeof w=="function"?w:null,this.onRejected=typeof k=="function"?k:null,this.promise=x}(l,c,b)),b},i.prototype.finally=function(l){var c=this.constructor;return this.then(function(b){return c.resolve(l()).then(function(){return b})},function(b){return c.resolve(l()).then(function(){return c.reject(b)})})},i.all=function(l){return new i(function(c,b){if(!l||l.length===void 0)throw new TypeError("Promise.all accepts an array");var w=Array.prototype.slice.call(l);if(w.length===0)return c([]);var k=w.length;function x(v,r){try{if(r&&((r===void 0?"undefined":p(r))==="object"||typeof r=="function")){var g=r.then;if(typeof g=="function")return void g.call(r,function(T){x(v,T)},b)}w[v]=r,--k==0&&c(w)}catch(T){b(T)}}for(var m=0;m<w.length;m++)x(m,w[m])})},i.resolve=function(l){return l&&(l===void 0?"undefined":p(l))==="object"&&l.constructor===i?l:new i(function(c){c(l)})},i.reject=function(l){return new i(function(c,b){b(l)})},i.race=function(l){return new i(function(c,b){for(var w=0,k=l.length;w<k;w++)l[w].then(c,b)})},i._immediateFn=typeof d=="function"&&function(l){d(l)}||function(l){e(l,0)},i._unhandledRejectionFn=function(l){typeof console<"u"&&console&&console.warn("Possible Unhandled Promise Rejection:",l)},y.exports=i}).call(this,f(36).setImmediate)},function(y,h,f){"use strict";Object.defineProperty(h,"__esModule",{value:!0});var d=function(){function m(v,r){for(var g=0;g<r.length;g++){var T=r[g];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(v,T.key,T)}}return function(v,r,g){return r&&m(v.prototype,r),g&&m(v,g),v}}(),p=w(f(37)),e=w(f(0)),o=w(f(3)),i=w(f(18)),a=w(f(17)),n=w(f(13)),t=w(f(12)),s=w(f(11)),u=w(f(9)),l=w(f(8)),c=w(f(7)),b=w(f(6));function w(m){return m&&m.__esModule?m:{default:m}}var k=[],x=function(){function m(v){if(function(T,q){if(!L(T,q))throw new TypeError("Cannot call a class as a function")}(this,m),this.options=(0,i.default)(v),this.container=this.options.container,this.paused=!0,this.playedPromise=p.default.resolve(),this.mode="normal",this.randomOrder=e.default.randomOrder(this.options.audio.length),this.container.classList.add("aplayer"),this.options.lrcType&&!this.options.fixed&&this.container.classList.add("aplayer-withlrc"),this.options.audio.length>1&&this.container.classList.add("aplayer-withlist"),e.default.isMobile&&this.container.classList.add("aplayer-mobile"),this.arrow=this.container.offsetWidth<=300,this.arrow&&this.container.classList.add("aplayer-arrow"),this.container=this.options.container,this.options.lrcType===2||this.options.lrcType===!0)for(var r=this.container.getElementsByClassName("aplayer-lrc-content"),g=0;g<r.length;g++)this.options.audio[g]&&(this.options.audio[g].lrc=r[g].innerHTML);this.template=new a.default({container:this.container,options:this.options,randomOrder:this.randomOrder}),this.options.fixed&&(this.container.classList.add("aplayer-fixed"),this.template.body.style.width=this.template.body.offsetWidth-18+"px"),this.options.mini&&(this.setMode("mini"),this.template.info.style.display="block"),this.template.info.offsetWidth<200&&this.template.time.classList.add("aplayer-time-narrow"),this.options.lrcType&&(this.lrc=new s.default({container:this.template.lrc,async:this.options.lrcType===3,player:this})),this.events=new c.default,this.storage=new t.default(this),this.bar=new n.default(this.template),this.controller=new u.default(this),this.timer=new l.default(this),this.list=new b.default(this),this.initAudio(),this.bindEvents(),this.options.order==="random"?this.list.switch(this.randomOrder[0]):this.list.switch(0),this.options.autoplay&&this.play(),k.push(this)}return d(m,[{key:"initAudio",value:function(){var r=this;this.audio=document.createElement("audio"),this.audio.preload=this.options.preload;for(var g=function(q){r.audio.addEventListener(r.events.audioEvents[q],function(E){r.events.trigger(r.events.audioEvents[q],E)})},T=0;T<this.events.audioEvents.length;T++)g(T);this.volume(this.storage.get("volume"),!0)}},{key:"bindEvents",value:function(){var r=this;this.on("play",function(){r.paused&&r.setUIPlaying()}),this.on("pause",function(){r.paused||r.setUIPaused()}),this.on("timeupdate",function(){if(!r.disableTimeupdate){r.bar.set("played",r.audio.currentTime/r.duration,"width"),r.lrc&&r.lrc.update();var T=e.default.secondToTime(r.audio.currentTime);r.template.ptime.innerHTML!==T&&(r.template.ptime.innerHTML=T)}}),this.on("durationchange",function(){r.duration!==1&&(r.template.dtime.innerHTML=e.default.secondToTime(r.duration))}),this.on("progress",function(){var T=r.audio.buffered.length?r.audio.buffered.end(r.audio.buffered.length-1)/r.duration:0;r.bar.set("loaded",T,"width")});var g=void 0;this.on("error",function(){r.list.audios.length>1?(r.notice("An audio error has occurred, player will skip forward in 2 seconds."),g=setTimeout(function(){r.skipForward(),r.paused||r.play()},2e3)):r.list.audios.length===1&&r.notice("An audio error has occurred.")}),this.events.on("listswitch",function(){g&&clearTimeout(g)}),this.on("ended",function(){r.options.loop==="none"?r.options.order==="list"?r.list.index<r.list.audios.length-1?(r.list.switch((r.list.index+1)%r.list.audios.length),r.play()):(r.list.switch((r.list.index+1)%r.list.audios.length),r.pause()):r.options.order==="random"&&(r.randomOrder.indexOf(r.list.index)<r.randomOrder.length-1?(r.list.switch(r.nextIndex()),r.play()):(r.list.switch(r.nextIndex()),r.pause())):r.options.loop==="one"?(r.list.switch(r.list.index),r.play()):r.options.loop==="all"&&(r.skipForward(),r.play())})}},{key:"setAudio",value:function(r){this.hls&&(this.hls.destroy(),this.hls=null);var g=r.type;this.options.customAudioType&&this.options.customAudioType[g]?Object.prototype.toString.call(this.options.customAudioType[g])==="[object Function]"?this.options.customAudioType[g](this.audio,r,this):console.error("Illegal customType: "+g):(g&&g!=="auto"||(g=/m3u8(#|\?|$)/i.exec(r.url)?"hls":"normal"),g==="hls"?Hls.isSupported()?(this.hls=new Hls,this.hls.loadSource(r.url),this.hls.attachMedia(this.audio)):this.audio.canPlayType("application/x-mpegURL")||this.audio.canPlayType("application/vnd.apple.mpegURL")?this.audio.src=r.url:this.notice("Error: HLS is not supported."):g==="normal"&&(this.audio.src=r.url)),this.seek(0),this.paused||this.audio.play()}},{key:"theme",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.list.audios[this.list.index].theme||this.options.theme,g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.list.index;(!(arguments.length>2&&arguments[2]!==void 0)||arguments[2])&&this.list.audios[g]&&(this.list.audios[g].theme=r),this.template.listCurs[g]&&(this.template.listCurs[g].style.backgroundColor=r),g===this.list.index&&(this.template.pic.style.backgroundColor=r,this.template.played.style.background=r,this.template.thumb.style.background=r,this.template.volume.style.background=r)}},{key:"seek",value:function(r){r=Math.max(r,0),r=Math.min(r,this.duration),this.audio.currentTime=r,this.bar.set("played",r/this.duration,"width"),this.template.ptime.innerHTML=e.default.secondToTime(r)}},{key:"setUIPlaying",value:function(){var r=this;if(this.paused&&(this.paused=!1,this.template.button.classList.remove("aplayer-play"),this.template.button.classList.add("aplayer-pause"),this.template.button.innerHTML="",setTimeout(function(){r.template.button.innerHTML=o.default.pause},100),this.template.skipPlayButton.innerHTML=o.default.pause),this.timer.enable("loading"),this.options.mutex)for(var g=0;g<k.length;g++)this!==k[g]&&k[g].pause()}},{key:"play",value:function(){var r=this;this.setUIPlaying();var g=this.audio.play();g&&g.catch(function(T){console.warn(T),T.name==="NotAllowedError"&&r.setUIPaused()})}},{key:"setUIPaused",value:function(){var r=this;this.paused||(this.paused=!0,this.template.button.classList.remove("aplayer-pause"),this.template.button.classList.add("aplayer-play"),this.template.button.innerHTML="",setTimeout(function(){r.template.button.innerHTML=o.default.play},100),this.template.skipPlayButton.innerHTML=o.default.play),this.container.classList.remove("aplayer-loading"),this.timer.disable("loading")}},{key:"pause",value:function(){this.setUIPaused(),this.audio.pause()}},{key:"switchVolumeIcon",value:function(){this.volume()>=.95?this.template.volumeButton.innerHTML=o.default.volumeUp:this.volume()>0?this.template.volumeButton.innerHTML=o.default.volumeDown:this.template.volumeButton.innerHTML=o.default.volumeOff}},{key:"volume",value:function(r,g){return r=parseFloat(r),isNaN(r)||(r=Math.max(r,0),r=Math.min(r,1),this.bar.set("volume",r,"height"),g||this.storage.set("volume",r),this.audio.volume=r,this.audio.muted&&(this.audio.muted=!1),this.switchVolumeIcon()),this.audio.muted?0:this.audio.volume}},{key:"on",value:function(r,g){this.events.on(r,g)}},{key:"toggle",value:function(){this.template.button.classList.contains("aplayer-play")?this.play():this.template.button.classList.contains("aplayer-pause")&&this.pause()}},{key:"switchAudio",value:function(r){this.list.switch(r)}},{key:"addAudio",value:function(r){this.list.add(r)}},{key:"removeAudio",value:function(r){this.list.remove(r)}},{key:"destroy",value:function(){k.splice(k.indexOf(this),1),this.pause(),this.container.innerHTML="",this.audio.src="",this.timer.destroy(),this.events.trigger("destroy")}},{key:"setMode",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"normal";this.mode=r,r==="mini"?this.container.classList.add("aplayer-narrow"):r==="normal"&&this.container.classList.remove("aplayer-narrow")}},{key:"notice",value:function(r){var g=this,T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2e3,q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:.8;this.template.notice.innerHTML=r,this.template.notice.style.opacity=q,this.noticeTime&&clearTimeout(this.noticeTime),this.events.trigger("noticeshow",{text:r}),T&&(this.noticeTime=setTimeout(function(){g.template.notice.style.opacity=0,g.events.trigger("noticehide")},T))}},{key:"prevIndex",value:function(){if(!(this.list.audios.length>1))return 0;if(this.options.order==="list")return this.list.index-1<0?this.list.audios.length-1:this.list.index-1;if(this.options.order==="random"){var r=this.randomOrder.indexOf(this.list.index);return r===0?this.randomOrder[this.randomOrder.length-1]:this.randomOrder[r-1]}}},{key:"nextIndex",value:function(){if(!(this.list.audios.length>1))return 0;if(this.options.order==="list")return(this.list.index+1)%this.list.audios.length;if(this.options.order==="random"){var r=this.randomOrder.indexOf(this.list.index);return r===this.randomOrder.length-1?this.randomOrder[0]:this.randomOrder[r+1]}}},{key:"skipBack",value:function(){this.list.switch(this.prevIndex())}},{key:"skipForward",value:function(){this.list.switch(this.nextIndex())}},{key:"duration",get:function(){return isNaN(this.audio.duration)?0:this.audio.duration}}],[{key:"version",get:function(){return"1.10.1"}}]),m}();h.default=x},,function(y,h,f){},function(y,h,f){"use strict";Object.defineProperty(h,"__esModule",{value:!0}),f(40);var d,p=f(38),e=(d=p)&&d.__esModule?d:{default:d};console.log(`
|
153
|
+
%c APlayer v1.10.1 af84efb %c http://aplayer.js.org
|
154
|
+
`,"color: #fadfa3; background: #030307; padding:5px 0;","background: #fadfa3; padding:5px 0;"),h.default=e.default}]).default})});
|
package/assets/js/Meting.min.js
CHANGED
@@ -1 +1,3 @@
|
|
1
|
-
|
1
|
+
(function(n,s){typeof module=="object"&&typeof module.exports=="object"?s():typeof define=="function"&&define.amd?define([],s):(n=typeof globalThis<"u"?globalThis:n||self)&&s()})(this,function(){"use strict";console.log(`
|
2
|
+
%c MetingJS v1.2.0 %c https://github.com/metowolf/MetingJS
|
3
|
+
`,"color: #fadfa3; background: #030307; padding:5px 0;","background: #fadfa3; padding:5px 0;");var n=[],s=function(){function u(r,e){var o={container:r,audio:e,mini:null,fixed:null,autoplay:!1,mutex:!0,lrcType:3,listFolded:!1,preload:"auto",theme:"#2980b9",loop:"all",order:"list",volume:null,listMaxHeight:null,customAudioType:null,storageName:"metingjs"};if(e.length){e[0].lrc||(o.lrcType=0);var a={};for(var t in o){var i=t.toLowerCase();(r.dataset.hasOwnProperty(i)||r.dataset.hasOwnProperty(t)||o[t]!==null)&&(a[t]=r.dataset[i]||r.dataset[t]||o[t],(a[t]==="true"||a[t]==="false")&&(a[t]=a[t]=="true"))}n.push(new APlayer(a))}}var p="https://api.i-meto.com/meting/api?server=:server&type=:type&id=:id&r=:r";typeof meting_api<"u"&&(p=meting_api);for(var l=0;l<n.length;l++)try{n[l].destroy()}catch(r){console.log(r)}n=[];for(var c=document.querySelectorAll(".aplayer"),f=function(){var e=c[d],o=e.dataset.id;if(o){var a=e.dataset.api||p;a=a.replace(":server",e.dataset.server),a=a.replace(":type",e.dataset.type),a=a.replace(":id",e.dataset.id),a=a.replace(":auth",e.dataset.auth),a=a.replace(":r",Math.random());var t=new XMLHttpRequest;t.onreadystatechange=function(){if(t.readyState===4&&(200<=t.status&&300>t.status||t.status===304)){var m=JSON.parse(t.responseText);u(e,m)}},t.open("get",a,!0),t.send(null)}else if(e.dataset.url){var i=[{name:e.dataset.name||e.dataset.title||"Audio name",artist:e.dataset.artist||e.dataset.author||"Audio artist",url:e.dataset.url,cover:e.dataset.cover||e.dataset.pic,lrc:e.dataset.lrc,type:e.dataset.type||"auto"}];u(e,i)}},d=0;d<c.length;d++)f()};document.addEventListener("DOMContentLoaded",s,!1)});
|