From 3855fc64524e4c0821b06006c2e2f1fa3999c649 Mon Sep 17 00:00:00 2001 From: Roberto Tonino Date: Thu, 7 May 2020 21:34:28 +0200 Subject: [PATCH] added package.json, added rollup dependency to bundle js files --- COMPILE-UI.md | 53 + package-lock.json | 835 ++++++++ package.json | 23 + public/index.html | 4 +- public/js/bundle.js | 1854 +++++++++++++++++ public/js/bundle.js.map | 1 + rollup.config.js | 23 + {public => src}/js/app.js | 0 .../js/modules/components/artist-tab.js | 0 .../js/modules/components/charts-tab.js | 0 .../js/modules/components/favorites-tab.js | 0 .../js/modules/components/home-tab.js | 0 .../modules/components/link-analyzer-tab.js | 0 .../js/modules/components/main-search.js | 0 .../js/modules/components/settings-tab.js | 0 .../js/modules/components/tracklist-tab.js | 0 {public => src}/js/modules/downloads.js | 0 {public => src}/js/modules/quality-modal.js | 0 {public => src}/js/modules/search.js | 0 {public => src}/js/modules/socket.js | 0 {public => src}/js/modules/tabs.js | 0 {public => src}/js/modules/toasts.js | 0 {public => src}/js/modules/track-preview.js | 0 {public => src}/js/modules/utils.js | 0 24 files changed, 2791 insertions(+), 2 deletions(-) create mode 100644 COMPILE-UI.md create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 public/js/bundle.js create mode 100644 public/js/bundle.js.map create mode 100644 rollup.config.js rename {public => src}/js/app.js (100%) rename {public => src}/js/modules/components/artist-tab.js (100%) rename {public => src}/js/modules/components/charts-tab.js (100%) rename {public => src}/js/modules/components/favorites-tab.js (100%) rename {public => src}/js/modules/components/home-tab.js (100%) rename {public => src}/js/modules/components/link-analyzer-tab.js (100%) rename {public => src}/js/modules/components/main-search.js (100%) rename {public => src}/js/modules/components/settings-tab.js (100%) rename {public => src}/js/modules/components/tracklist-tab.js (100%) rename {public => src}/js/modules/downloads.js (100%) rename {public => src}/js/modules/quality-modal.js (100%) rename {public => src}/js/modules/search.js (100%) rename {public => src}/js/modules/socket.js (100%) rename {public => src}/js/modules/tabs.js (100%) rename {public => src}/js/modules/toasts.js (100%) rename {public => src}/js/modules/track-preview.js (100%) rename {public => src}/js/modules/utils.js (100%) diff --git a/COMPILE-UI.md b/COMPILE-UI.md new file mode 100644 index 0000000..02991a7 --- /dev/null +++ b/COMPILE-UI.md @@ -0,0 +1,53 @@ +This file explains how to compile files for the UI. + +# What you need to do just the first time + +1. Download and install the LTS version of Node.js, you can download it [here]([https://link](https://nodejs.org/it/download/)) (also installs npm) + +2. Once you have finished to install Node.js, check if everything is ok by running + +```console +$ node -v +``` +and then +```console +$ npm -v +``` + +If you will see the corresponding versions of node and npm, you are ready to code! + +3. Go to the root of this project, open your favorite prompt and run + +```console +$ npm install +``` + +# Scripts + +## Develpoment + +By simply running + +```console +$ npm run dev +``` + +you will have 2 tasks running at the same time: +- the python server +- the [rollup](https://rollupjs.org/guide/en/) watcher pointing to the configured `.js` file and ready to re-bundle + +**You can now go to http://127.0.0.1:33333 and see the app running.** + +You can edit `.css` and `.js` files and simply refresh the page to see your new and surely awesome code directly in the app 😉 + +If you need to edit the `index.html` file you will have to kill the terminal and re-run `npm run dev` to see your edits. + +## Building + +If you want to deploy your application, you have to run + +```console +$ npm run build +``` + +This is necessary to get a bundled `.js` file **minified**, helping ro drop your final application size. \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..6bddce1 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,835 @@ +{ + "name": "deemix", + "version": "0.1.0-alpha", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/code-frame": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", + "dev": true, + "requires": { + "@babel/highlight": "^7.8.3" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz", + "integrity": "sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g==", + "dev": true + }, + "@babel/highlight": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz", + "integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.9.0", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "@rollup/plugin-commonjs": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-11.1.0.tgz", + "integrity": "sha512-Ycr12N3ZPN96Fw2STurD21jMqzKwL9QuFhms3SD7KKRK7oaXUsBU9Zt0jL/rOPHiPYisI21/rXGO3jr9BnLHUA==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^3.0.8", + "commondir": "^1.0.1", + "estree-walker": "^1.0.1", + "glob": "^7.1.2", + "is-reference": "^1.1.2", + "magic-string": "^0.25.2", + "resolve": "^1.11.0" + } + }, + "@rollup/plugin-node-resolve": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-7.1.3.tgz", + "integrity": "sha512-RxtSL3XmdTAE2byxekYLnx+98kEUOrPHF/KRVjLH+DEIHy6kjIw7YINQzn+NXiH/NTrQLAwYs0GWB+csWygA9Q==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^3.0.8", + "@types/resolve": "0.0.8", + "builtin-modules": "^3.1.0", + "is-module": "^1.0.0", + "resolve": "^1.14.2" + } + }, + "@rollup/pluginutils": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.0.10.tgz", + "integrity": "sha512-d44M7t+PjmMrASHbhgpSbVgtL6EFyX7J4mYxwQ/c5eoaE6N2VgCgEcWVzNnwycIloti+/MpwFr8qfw+nRw00sw==", + "dev": true, + "requires": { + "@types/estree": "0.0.39", + "estree-walker": "^1.0.1", + "picomatch": "^2.2.2" + } + }, + "@types/estree": { + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", + "dev": true + }, + "@types/node": { + "version": "13.13.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.5.tgz", + "integrity": "sha512-3ySmiBYJPqgjiHA7oEaIo2Rzz0HrOZ7yrNO5HWyaE5q0lQ3BppDZ3N53Miz8bw2I7gh1/zir2MGVZBvpb1zq9g==", + "dev": true + }, + "@types/resolve": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz", + "integrity": "sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "acorn": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", + "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "builtin-modules": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.1.0.tgz", + "integrity": "sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw==", + "dev": true + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es-abstract": { + "version": "1.17.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", + "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.1.5", + "is-regex": "^1.0.5", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.0", + "string.prototype.trimleft": "^2.1.1", + "string.prototype.trimright": "^2.1.1" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "estree-walker": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", + "dev": true + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + }, + "hosted-git-info": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", + "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-callable": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", + "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", + "dev": true + }, + "is-date-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "dev": true + }, + "is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", + "dev": true + }, + "is-reference": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.1.4.tgz", + "integrity": "sha512-uJA/CDPO3Tao3GTrxYn6AwkM4nUPJiGGYu5+cB8qbC7WGFlrKZbiRo7SFKxUAEpFUfiHofWCXBUNhvYJMh+6zw==", + "dev": true, + "requires": { + "@types/estree": "0.0.39" + } + }, + "is-regex": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", + "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "jest-worker": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.9.0.tgz", + "integrity": "sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw==", + "dev": true, + "requires": { + "merge-stream": "^2.0.0", + "supports-color": "^6.1.0" + }, + "dependencies": { + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "magic-string": { + "version": "0.25.7", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", + "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", + "dev": true, + "requires": { + "sourcemap-codec": "^1.4.4" + } + }, + "memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=", + "dev": true + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "npm-run-all": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", + "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "chalk": "^2.4.1", + "cross-spawn": "^6.0.5", + "memorystream": "^0.3.1", + "minimatch": "^3.0.4", + "pidtree": "^0.3.0", + "read-pkg": "^3.0.0", + "shell-quote": "^1.6.1", + "string.prototype.padend": "^3.0.0" + } + }, + "object-inspect": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", + "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", + "dev": true + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "picomatch": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "dev": true + }, + "pidtree": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz", + "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==", + "dev": true + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "rollup": { + "version": "1.32.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.32.1.tgz", + "integrity": "sha512-/2HA0Ec70TvQnXdzynFffkjA6XN+1e2pEv/uKS5Ulca40g2L7KuOE3riasHoNVHOsFD5KKZgDsMk1CP3Tw9s+A==", + "dev": true, + "requires": { + "@types/estree": "*", + "@types/node": "*", + "acorn": "^7.1.0" + } + }, + "rollup-plugin-terser": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-5.3.0.tgz", + "integrity": "sha512-XGMJihTIO3eIBsVGq7jiNYOdDMb3pVxuzY0uhOE/FM4x/u9nQgr3+McsjzqBn3QfHIpNSZmFnpoKAwHBEcsT7g==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.5.5", + "jest-worker": "^24.9.0", + "rollup-pluginutils": "^2.8.2", + "serialize-javascript": "^2.1.2", + "terser": "^4.6.2" + } + }, + "rollup-pluginutils": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", + "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", + "dev": true, + "requires": { + "estree-walker": "^0.6.1" + }, + "dependencies": { + "estree-walker": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", + "dev": true + } + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "serialize-javascript": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.2.tgz", + "integrity": "sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "shell-quote": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz", + "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-support": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "sourcemap-codec": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", + "dev": true + }, + "spdx-correct": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", + "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", + "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", + "dev": true + }, + "string.prototype.padend": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.0.tgz", + "integrity": "sha512-3aIv8Ffdp8EZj8iLwREGpQaUZiPyrWrpzMBHvkiSW/bK/EGve9np07Vwy7IJ5waydpGXzQZu/F8Oze2/IWkBaA==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" + } + }, + "string.prototype.trimend": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", + "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "string.prototype.trimleft": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz", + "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5", + "string.prototype.trimstart": "^1.0.0" + } + }, + "string.prototype.trimright": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz", + "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5", + "string.prototype.trimend": "^1.0.0" + } + }, + "string.prototype.trimstart": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", + "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "terser": { + "version": "4.6.13", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.6.13.tgz", + "integrity": "sha512-wMvqukYgVpQlymbnNbabVZbtM6PN63AzqexpwJL8tbh/mRT9LE5o+ruVduAGL7D6Fpjl+Q+06U5I9Ul82odAhw==", + "dev": true, + "requires": { + "commander": "^2.20.0", + "source-map": "~0.6.1", + "source-map-support": "~0.5.12" + } + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..683fa2b --- /dev/null +++ b/package.json @@ -0,0 +1,23 @@ +{ + "name": "deemix", + "version": "0.1.0-alpha", + "homepage": "https://notabug.org/RemixDev/deemix/src/master/README.md", + "repository": { + "type": "git", + "url": "https://notabug.org/RemixDev/deemix" + }, + "devDependencies": { + "@rollup/plugin-commonjs": "^11.0.1", + "@rollup/plugin-node-resolve": "^7.0.0", + "npm-run-all": "^4.1.5", + "rollup": "^1.27.0", + "rollup-plugin-terser": "^5.0.0" + }, + "scripts": { + "build:js": "rollup -c", + "watch:js": "rollup -c -w", + "serve": "python server.py", + "dev": "npm-run-all --parallel watch:js serve", + "build": "npm-run-all build:js" + } +} diff --git a/public/index.html b/public/index.html index 8eff685..5aa1316 100644 --- a/public/index.html +++ b/public/index.html @@ -1100,6 +1100,6 @@

{{ metadata }} - + - + \ No newline at end of file diff --git a/public/js/bundle.js b/public/js/bundle.js new file mode 100644 index 0000000..0fadc83 --- /dev/null +++ b/public/js/bundle.js @@ -0,0 +1,1854 @@ +const socket = io.connect(window.location.href); + +socket.on('connect', () => { + document.getElementById('loading_overlay').classList.remove('active'); +}); + +let toastsWithId = {}; + +const toast = function (msg, icon = null, dismiss = true, id = null) { + if (toastsWithId[id]) { + let toastObj = toastsWithId[id]; + let toastDOM = $(`div.toastify[toast_id=${id}]`); + if (msg) { + toastDOM.find('.toast-message').html(msg); + } + if (icon) { + if (icon == 'loading') icon = `
`; + else icon = `${icon}`; + toastDOM.find('.toast-icon').html(icon); + } + if (dismiss !== null && dismiss) { + setTimeout(function () { + toastObj.hideToast(); + delete toastsWithId[id]; + }, 3000); + } + } else { + if (icon == null) icon = ''; + else if (icon == 'loading') icon = `
`; + else icon = `${icon}`; + let toastObj = Toastify({ + text: `${icon}${msg}`, + duration: dismiss ? 3000 : 0, + gravity: 'bottom', + position: 'left' + }).showToast(); + if (id) { + toastsWithId[id] = toastObj; + $(toastObj.toastElement).attr('toast_id', id); + } + } +}; + +socket.on('toast', data => { + toast(data.msg, data.icon || null, data.dismiss !== undefined ? data.dismiss : true, data.id || null); +}); + +/* ===== Locals ===== */ +const tabMinWidth = 250; +const tabMaxWidth = 500; + +let cachedTabWidth = parseInt(localStorage.getItem('downloadTabWidth')) || 300; +let queueList = {}; +let queue = []; +let queueComplete = []; +let tabContainerEl; +let listEl; +let dragHandlerEl; + +function init() { + // Find download DOM elements + tabContainerEl = document.getElementById('download_tab_container'); + listEl = document.getElementById('download_list'); + dragHandlerEl = document.getElementById('download_tab_drag_handler'); + + // Check if download tab should be open + if ('true' === localStorage.getItem('downloadTabOpen')) { + tabContainerEl.classList.remove('tab_hidden'); + + setTabWidth(cachedTabWidth); + } + + linkListeners(); +} + +function linkListeners() { + listEl.addEventListener('click', handleListClick); + document.getElementById('toggle_download_tab').addEventListener('click', toggleDownloadTab); + + // Queue buttons + document.getElementById('clean_queue').addEventListener('click', () => { + socket.emit('removeFinishedDownloads'); + }); + + document.getElementById('cancel_queue').addEventListener('click', () => { + socket.emit('cancelAllDownloads'); + }); + + dragHandlerEl.addEventListener('mousedown', event => { + event.preventDefault(); + + document.addEventListener('mousemove', handleDrag); + }); + + document.addEventListener('mouseup', () => { + document.removeEventListener('mousemove', handleDrag); + }); + + tabContainerEl.addEventListener('transitionend', () => { + tabContainerEl.style.transition = ''; + }); + + window.addEventListener('beforeunload', () => { + localStorage.setItem('downloadTabWidth', cachedTabWidth); + }); +} + +function setTabWidth(newWidth) { + if (undefined === newWidth) { + tabContainerEl.style.width = ''; + listEl.style.width = ''; + } else { + tabContainerEl.style.width = newWidth + 'px'; + listEl.style.width = newWidth + 'px'; + } +} + +function handleDrag(event) { + let newWidth = window.innerWidth - event.pageX + 2; + + if (newWidth < tabMinWidth) { + newWidth = tabMinWidth; + } else if (newWidth > tabMaxWidth) { + newWidth = tabMaxWidth; + } + + cachedTabWidth = newWidth; + + setTabWidth(newWidth); +} + +function sendAddToQueue(url, bitrate = null) { + if (url.indexOf(';') !== -1) { + let urls = url.split(';'); + urls.forEach(url => { + socket.emit('addToQueue', { url: url, bitrate: bitrate }); + }); + } else if (url != '') { + socket.emit('addToQueue', { url: url, bitrate: bitrate }); + } +} + +function addToQueue(queueItem, current = false) { + queueList[queueItem.uuid] = queueItem; + if (queueItem.downloaded + queueItem.failed == queueItem.size) { + queueComplete.push(queueItem.uuid); + } else { + queue.push(queueItem.uuid); + } + $(listEl).append( + `
+
+ Cover ${queueItem.title} +
+ ${queueItem.title} - + ${queueItem.artist} +
+
+ ${queueItem.downloaded + queueItem.failed}/${ + queueItem.size + } +
+
+
+
+ remove +
+
` + ); + if (queueItem.progress > 0 || current) { + $('#bar_' + queueItem.uuid) + .removeClass('indeterminate') + .addClass('determinate'); + } + $('#bar_' + queueItem.uuid).css('width', queueItem.progress + '%'); + if (queueItem.failed >= 1) { + $('#download_' + queueItem.uuid + ' .download_info_status').append( + `(${queueItem.failed}error_outline)` + ); + } + if (queueItem.downloaded + queueItem.failed == queueItem.size) { + let result_icon = $('#download_' + queueItem.uuid).find('.queue_icon'); + if (queueItem.failed == 0) { + result_icon.text('done'); + } else if (queueItem.failed == queueItem.size) { + result_icon.text('error'); + } else { + result_icon.text('warning'); + } + } +} + +function initQueue(data) { + if (data.queueComplete.length) { + data.queueComplete.forEach(item => { + addToQueue(data.queueList[item]); + }); + } + if (data.currentItem) { + addToQueue(data['queueList'][data.currentItem], true); + } + data.queue.forEach(item => { + addToQueue(data.queueList[item]); + }); +} + +function startDownload(uuid) { + $('#bar_' + uuid) + .removeClass('indeterminate') + .addClass('determinate'); +} + +socket.on('startDownload', startDownload); + +function handleListClick(event) { + if (!event.target.matches('.queue_icon[data-uuid]')) { + return + } + + let icon = event.target.innerText; + let uuid = $(event.target).data('uuid'); + + switch (icon) { + case 'remove': + socket.emit('removeFromQueue', uuid); + break + } +} + +// Show/Hide Download Tab +function toggleDownloadTab(ev) { + ev.preventDefault(); + + setTabWidth(); + + tabContainerEl.style.transition = 'all 250ms ease-in-out'; + + // Toggle returns a Boolean based on the action it performed + let isHidden = tabContainerEl.classList.toggle('tab_hidden'); + + if (!isHidden) { + setTabWidth(cachedTabWidth); + } + + localStorage.setItem('downloadTabOpen', !isHidden); +} + +socket.on('init_downloadQueue', initQueue); +socket.on('addedToQueue', addToQueue); + +function removeFromQueue(uuid) { + let index = queue.indexOf(uuid); + if (index > -1) { + queue.splice(index, 1); + $(`#download_${queueList[uuid].uuid}`).remove(); + delete queueList[uuid]; + } +} + +socket.on('removedFromQueue', removeFromQueue); + +function finishDownload(uuid) { + if (queue.indexOf(uuid) > -1) { + toast(`${queueList[uuid].title} finished downloading.`, 'done'); + $('#bar_' + uuid).css('width', '100%'); + let result_icon = $('#download_' + uuid).find('.queue_icon'); + if (queueList[uuid].failed == 0) { + result_icon.text('done'); + } else if (queueList[uuid].failed >= queueList[uuid].size) { + result_icon.text('error'); + } else { + result_icon.text('warning'); + } + let index = queue.indexOf(uuid); + if (index > -1) { + queue.splice(index, 1); + queueComplete.push(uuid); + } + if (queue.length <= 0) { + toast('All downloads completed!', 'done_all'); + } + } +} + +socket.on('finishDownload', finishDownload); + +function removeAllDownloads(currentItem) { + queueComplete = []; + if (currentItem == '') { + queue = []; + queueList = {}; + $(listEl).html(''); + } else { + queue = [currentItem]; + let tempQueueItem = queueList[currentItem]; + queueList = {}; + queueList[currentItem] = tempQueueItem; + $('.download_object').each(function (index) { + if ($(this).attr('id') != 'download_' + currentItem) $(this).remove(); + }); + } +} + +socket.on('removedAllDownloads', removeAllDownloads); + +function removedFinishedDownloads() { + queueComplete.forEach(item => { + $('#download_' + item).remove(); + }); + queueComplete = []; +} + +socket.on('removedFinishedDownloads', removedFinishedDownloads); + +function updateQueue(update) { + if (update.uuid && queue.indexOf(update.uuid) > -1) { + if (update.downloaded) { + queueList[update.uuid].downloaded++; + $('#download_' + update.uuid + ' .queue_downloaded').text( + queueList[update.uuid].downloaded + queueList[update.uuid].failed + ); + } + if (update.failed) { + queueList[update.uuid].failed++; + $('#download_' + update.uuid + ' .queue_downloaded').text( + queueList[update.uuid].downloaded + queueList[update.uuid].failed + ); + if (queueList[update.uuid].failed == 1) { + $('#download_' + update.uuid + ' .download_info_status').append( + `(1 error_outline)` + ); + } else { + $('#download_' + update.uuid + ' .queue_failed').text(queueList[update.uuid].failed); + } + } + if (update.progress) { + queueList[update.uuid].progress = update.progress; + $('#bar_' + update.uuid).css('width', update.progress + '%'); + } + } +} + +socket.on('updateQueue', updateQueue); + +var Downloads = { + init, + sendAddToQueue, + addToQueue +}; + +const QualityModal = { + // Defaults + open: false, + url: '' +}; + +function init$1() { + QualityModal.element = document.getElementById('modal_quality'); + + linkListeners$1(); +} + +function open(link) { + QualityModal.url = link; + QualityModal.element.style.display = 'block'; + QualityModal.element.classList.add('animated', 'fadeIn'); +} + +function linkListeners$1() { + QualityModal.element.addEventListener('click', handleClick); + QualityModal.element.addEventListener('webkitAnimationEnd', handleAnimationEnd); +} + +function handleClick(event) { + QualityModal.element.classList.add('animated', 'fadeOut'); + + if (!event.target.matches('.quality-button')) { + return + } + + let bitrate = event.target.dataset.qualityValue; + + Downloads.sendAddToQueue(QualityModal.url, bitrate); +} + +function handleAnimationEnd() { + QualityModal.element.classList.remove('animated', QualityModal.open ? 'fadeOut' : 'fadeIn'); + QualityModal.element.style.display = QualityModal.open ? 'none' : 'block'; + QualityModal.open = !QualityModal.open; +} + +var QualityModal$1 = { + init: init$1, + open +}; + +const ArtistTab = new Vue({ + data() { + return { + currentTab: '', + sortKey: 'release_date', + sortOrder: 'desc', + title: '', + image: '', + type: '', + link: '', + head: null, + body: null + } + }, + methods: { + albumView, + reset() { + this.title = 'Loading...'; + this.image = ''; + this.type = ''; + this.currentTab = ''; + this.sortKey = 'release_date'; + this.sortOrder = 'desc'; + this.link = ''; + this.head = []; + this.body = null; + }, + addToQueue(e) { + e.stopPropagation(); + Downloads.sendAddToQueue(e.currentTarget.dataset.link); + }, + openQualityModal(e) { + QualityModal$1.open(e.currentTarget.dataset.link); + }, + sortBy(key) { + if (key == this.sortKey) { + this.sortOrder = this.sortOrder == 'asc' ? 'desc' : 'asc'; + } else { + this.sortKey = key; + this.sortOrder = 'asc'; + } + }, + changeTab(tab) { + this.currentTab = tab; + }, + checkNewRelease(date) { + let g1 = new Date(); + let g2 = new Date(date); + g2.setDate(g2.getDate() + 3); + g1.setHours(0, 0, 0, 0); + + return g1.getTime() <= g2.getTime() + }, + showArtist(data) { + this.title = data.name; + this.image = data.picture_xl; + this.type = 'Artist'; + this.link = `https://www.deezer.com/artist/${data.id}`; + this.currentTab = Object.keys(data.releases)[0]; + this.sortKey = 'release_date'; + this.sortOrder = 'desc'; + this.head = [ + { title: 'Title', sortKey: 'title' }, + { title: 'Release Date', sortKey: 'release_date' }, + { title: '', width: '32px' } + ]; + if (_.isEmpty(data.releases)) { + this.body = null; + } else { + this.body = data.releases; + } + } + }, + computed: { + showTable() { + if (this.body) return _.orderBy(this.body[this.currentTab], this.sortKey, this.sortOrder) + else return [] + } + }, + mounted() { + socket.on('show_artist', this.showArtist); + } +}).$mount('#artist_tab'); + +/* ===== Globals ====== */ +window.preview_max_volume = 1; + +/* ===== Locals ===== */ +let preview_track = document.getElementById('preview-track'); +let preview_stopped = true; + +// init stuff +function init$2() { + preview_track.volume = 1; + /*preview_max_volume = parseFloat(localStorage.getItem("previewVolume")) + if (preview_max_volume === null){ + preview_max_volume = 0.8 + localStorage.setItem("previewVolume", preview_max_volume) + }*/ + + // start playing when track loaded + preview_track.addEventListener('canplay', function () { + preview_track.play(); + preview_stopped = false; + $(preview_track).animate({ volume: preview_max_volume }, 500); + }); + + // auto fadeout when at the end of the song + preview_track.addEventListener('timeupdate', function () { + if (preview_track.currentTime > preview_track.duration - 1) { + $(preview_track).animate({ volume: 0 }, 800); + preview_stopped = true; + $('a[playing] > .preview_controls').css({ opacity: 0 }); + $('*').removeAttr('playing'); + $('.preview_controls').text('play_arrow'); + $('.preview_playlist_controls').text('play_arrow'); + } + }); +} + +// on modal closing +function stopStackedTabsPreview() { + if ( + $('.preview_playlist_controls').filter(function () { + return $(this).attr('playing') + }).length > 0 + ) { + $(preview_track).animate({ volume: 0 }, 800); + preview_stopped = true; + $('.preview_playlist_controls').removeAttr('playing'); + $('.preview_playlist_controls').text('play_arrow'); + } +} + +// on hover event +function previewMouseEnter(e) { + $(e.currentTarget).css({ opacity: 1 }); +} + +function previewMouseLeave(e) { + let obj = e.currentTarget; + if (($(obj).parent().attr('playing') && preview_stopped) || !$(obj).parent().attr('playing')) { + $(obj).css({ opacity: 0 }, 200); + } +} + +// on click event +function playPausePreview(e) { + e.preventDefault(); + let obj = e.currentTarget; + var icon = obj.tagName == 'I' ? $(obj) : $(obj).children('i'); + if ($(obj).attr('playing')) { + if (preview_track.paused) { + preview_track.play(); + preview_stopped = false; + icon.text('pause'); + $(preview_track).animate({ volume: preview_max_volume }, 500); + } else { + preview_stopped = true; + icon.text('play_arrow'); + $(preview_track).animate({ volume: 0 }, 250, 'swing', () => { + preview_track.pause(); + }); + } + } else { + $('*').removeAttr('playing'); + $(obj).attr('playing', true); + $('.preview_controls').text('play_arrow'); + $('.preview_playlist_controls').text('play_arrow'); + $('.preview_controls').css({ opacity: 0 }); + icon.text('pause'); + icon.css({ opacity: 1 }); + preview_stopped = false; + $(preview_track).animate({ volume: 0 }, 250, 'swing', () => { + preview_track.pause(); + $('#preview-track_source').prop('src', $(obj).data('preview')); + preview_track.load(); + }); + } +} + +var TrackPreview = { + init: init$2, + stopStackedTabsPreview, + previewMouseEnter, + previewMouseLeave, + playPausePreview +}; + +const TracklistTab = new Vue({ + data: () => ({ + title: '', + metadata: '', + release_date: '', + label: '', + explicit: false, + image: '', + type: '', + link: '', + head: null, + body: [] + }), + methods: { + artistView, + albumView, + playPausePreview: TrackPreview.playPausePreview, + reset() { + this.title = 'Loading...'; + this.image = ''; + this.metadata = ''; + this.label = ''; + this.release_date = ''; + this.explicit = false; + this.type = ''; + this.head = []; + this.body = []; + }, + addToQueue(e) { + e.stopPropagation(); + Downloads.sendAddToQueue(e.currentTarget.dataset.link); + }, + openQualityModal(e) { + QualityModal$1.open(e.currentTarget.dataset.link); + }, + toggleAll(e) { + this.body.forEach(item => { + if (item.type == 'track') { + item.selected = e.currentTarget.checked; + } + }); + }, + selectedLinks() { + var selected = []; + if (this.body) { + this.body.forEach(item => { + if (item.type == 'track' && item.selected) selected.push(this.type == "Spotify Playlist" ? item.uri : item.link); + }); + } + return selected.join(';') + }, + convertDuration(duration) { + //convert from seconds only to mm:ss format + let mm, ss; + mm = Math.floor(duration / 60); + ss = duration - mm * 60; + //add leading zero if ss < 0 + if (ss < 10) { + ss = '0' + ss; + } + return mm + ':' + ss + }, + showAlbum(data) { + this.type = 'Album'; + this.link = `https://www.deezer.com/album/${data.id}`; + this.title = data.title; + this.explicit = data.explicit_lyrics; + this.label = data.label; + this.metadata = `${data.artist.name} • ${data.tracks.length} songs`; + this.release_date = data.release_date.substring(0, 10); + this.image = data.cover_xl; + this.head = [ + { title: 'music_note', width: '24px' }, + { title: '#' }, + { title: 'Song' }, + { title: 'Artist' }, + { title: 'timer', width: '40px' } + ]; + if (_.isEmpty(data.tracks)) { + console.log('show e lodash ok'); + + this.body = null; + } else { + this.body = data.tracks; + } + }, + showPlaylist(data) { + this.type = 'Playlist'; + this.link = `https://www.deezer.com/playlist/${data.id}`; + this.title = data.title; + this.image = data.picture_xl; + this.release_date = data.creation_date.substring(0, 10); + this.metadata = `by ${data.creator.name} • ${data.tracks.length} songs`; + this.head = [ + { title: 'music_note', width: '24px' }, + { title: '#' }, + { title: 'Song' }, + { title: 'Artist' }, + { title: 'Album' }, + { title: 'timer', width: '40px' } + ]; + if (_.isEmpty(data.tracks)) { + this.body = null; + } else { + this.body = data.tracks; + } + }, + showSpotifyPlaylist(data) { + this.type = 'Spotify Playlist'; + this.link = data.uri; + this.title = data.name; + this.image = data.images.length ? data.images[0].url : "https://e-cdns-images.dzcdn.net/images/cover/d41d8cd98f00b204e9800998ecf8427e/1000x1000-000000-80-0-0.jpg"; + this.release_date = ""; + this.metadata = `by ${data.owner.display_name} • ${data.tracks.length} songs`; + this.head = [ + { title: 'music_note', width: '24px' }, + { title: '#' }, + { title: 'Song' }, + { title: 'Artist' }, + { title: 'Album' }, + { title: 'timer', width: '40px' } + ]; + if (_.isEmpty(data.tracks)) { + this.body = null; + } else { + this.body = data.tracks; + } + } + }, + mounted() { + socket.on('show_album', this.showAlbum); + socket.on('show_playlist', this.showPlaylist); + socket.on('show_spotifyplaylist', this.showSpotifyPlaylist); + } +}).$mount('#tracklist_tab'); + +function isValidURL(text) { + let lowerCaseText = text.toLowerCase(); + + if (lowerCaseText.startsWith('http')) { + if (lowerCaseText.indexOf('deezer.com') >= 0 || lowerCaseText.indexOf('open.spotify.com') >= 0) { + return true + } + } else if (lowerCaseText.startsWith('spotify:')) { + return true + } + return false +} + +function convertDuration(duration) { + // convert from seconds only to mm:ss format + let mm, ss; + mm = Math.floor(duration / 60); + ss = duration - mm * 60; + //add leading zero if ss < 0 + if (ss < 10) { + ss = '0' + ss; + } + return mm + ':' + ss +} + +function convertDurationSeparated(duration) { + let hh, mm, ss; + mm = Math.floor(duration / 60); + hh = Math.floor(mm / 60); + ss = duration - mm * 60; + mm -= hh * 60; + return [hh, mm, ss] +} + +function numberWithDots(x) { + return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.') +} + +// On scroll event, returns currentTarget = null +// Probably on other events too +function debounce(func, wait, immediate) { + var timeout; + return function () { + var context = this; + var args = arguments; + var later = function () { + timeout = null; + if (!immediate) func.apply(context, args); + }; + var callNow = immediate && !timeout; + clearTimeout(timeout); + timeout = setTimeout(later, wait); + if (callNow) func.apply(context, args); + } +} + +const COUNTRIES = { + AF: 'Afghanistan', + AX: '\u00c5land Islands', + AL: 'Albania', + DZ: 'Algeria', + AS: 'American Samoa', + AD: 'Andorra', + AO: 'Angola', + AI: 'Anguilla', + AQ: 'Antarctica', + AG: 'Antigua and Barbuda', + AR: 'Argentina', + AM: 'Armenia', + AW: 'Aruba', + AU: 'Australia', + AT: 'Austria', + AZ: 'Azerbaijan', + BS: 'Bahamas', + BH: 'Bahrain', + BD: 'Bangladesh', + BB: 'Barbados', + BY: 'Belarus', + BE: 'Belgium', + BZ: 'Belize', + BJ: 'Benin', + BM: 'Bermuda', + BT: 'Bhutan', + BO: 'Bolivia, Plurinational State of', + BQ: 'Bonaire, Sint Eustatius and Saba', + BA: 'Bosnia and Herzegovina', + BW: 'Botswana', + BV: 'Bouvet Island', + BR: 'Brazil', + IO: 'British Indian Ocean Territory', + BN: 'Brunei Darussalam', + BG: 'Bulgaria', + BF: 'Burkina Faso', + BI: 'Burundi', + KH: 'Cambodia', + CM: 'Cameroon', + CA: 'Canada', + CV: 'Cape Verde', + KY: 'Cayman Islands', + CF: 'Central African Republic', + TD: 'Chad', + CL: 'Chile', + CN: 'China', + CX: 'Christmas Island', + CC: 'Cocos (Keeling) Islands', + CO: 'Colombia', + KM: 'Comoros', + CG: 'Congo', + CD: 'Congo, the Democratic Republic of the', + CK: 'Cook Islands', + CR: 'Costa Rica', + CI: "C\u00f4te d'Ivoire", + HR: 'Croatia', + CU: 'Cuba', + CW: 'Cura\u00e7ao', + CY: 'Cyprus', + CZ: 'Czech Republic', + DK: 'Denmark', + DJ: 'Djibouti', + DM: 'Dominica', + DO: 'Dominican Republic', + EC: 'Ecuador', + EG: 'Egypt', + SV: 'El Salvador', + GQ: 'Equatorial Guinea', + ER: 'Eritrea', + EE: 'Estonia', + ET: 'Ethiopia', + FK: 'Falkland Islands (Malvinas)', + FO: 'Faroe Islands', + FJ: 'Fiji', + FI: 'Finland', + FR: 'France', + GF: 'French Guiana', + PF: 'French Polynesia', + TF: 'French Southern Territories', + GA: 'Gabon', + GM: 'Gambia', + GE: 'Georgia', + DE: 'Germany', + GH: 'Ghana', + GI: 'Gibraltar', + GR: 'Greece', + GL: 'Greenland', + GD: 'Grenada', + GP: 'Guadeloupe', + GU: 'Guam', + GT: 'Guatemala', + GG: 'Guernsey', + GN: 'Guinea', + GW: 'Guinea-Bissau', + GY: 'Guyana', + HT: 'Haiti', + HM: 'Heard Island and McDonald Islands', + VA: 'Holy See (Vatican City State)', + HN: 'Honduras', + HK: 'Hong Kong', + HU: 'Hungary', + IS: 'Iceland', + IN: 'India', + ID: 'Indonesia', + IR: 'Iran, Islamic Republic of', + IQ: 'Iraq', + IE: 'Ireland', + IM: 'Isle of Man', + IL: 'Israel', + IT: 'Italy', + JM: 'Jamaica', + JP: 'Japan', + JE: 'Jersey', + JO: 'Jordan', + KZ: 'Kazakhstan', + KE: 'Kenya', + KI: 'Kiribati', + KP: "Korea, Democratic People's Republic of", + KR: 'Korea, Republic of', + KW: 'Kuwait', + KG: 'Kyrgyzstan', + LA: "Lao People's Democratic Republic", + LV: 'Latvia', + LB: 'Lebanon', + LS: 'Lesotho', + LR: 'Liberia', + LY: 'Libya', + LI: 'Liechtenstein', + LT: 'Lithuania', + LU: 'Luxembourg', + MO: 'Macao', + MK: 'Macedonia, the Former Yugoslav Republic of', + MG: 'Madagascar', + MW: 'Malawi', + MY: 'Malaysia', + MV: 'Maldives', + ML: 'Mali', + MT: 'Malta', + MH: 'Marshall Islands', + MQ: 'Martinique', + MR: 'Mauritania', + MU: 'Mauritius', + YT: 'Mayotte', + MX: 'Mexico', + FM: 'Micronesia, Federated States of', + MD: 'Moldova, Republic of', + MC: 'Monaco', + MN: 'Mongolia', + ME: 'Montenegro', + MS: 'Montserrat', + MA: 'Morocco', + MZ: 'Mozambique', + MM: 'Myanmar', + NA: 'Namibia', + NR: 'Nauru', + NP: 'Nepal', + NL: 'Netherlands', + NC: 'New Caledonia', + NZ: 'New Zealand', + NI: 'Nicaragua', + NE: 'Niger', + NG: 'Nigeria', + NU: 'Niue', + NF: 'Norfolk Island', + MP: 'Northern Mariana Islands', + NO: 'Norway', + OM: 'Oman', + PK: 'Pakistan', + PW: 'Palau', + PS: 'Palestine, State of', + PA: 'Panama', + PG: 'Papua New Guinea', + PY: 'Paraguay', + PE: 'Peru', + PH: 'Philippines', + PN: 'Pitcairn', + PL: 'Poland', + PT: 'Portugal', + PR: 'Puerto Rico', + QA: 'Qatar', + RE: 'R\u00e9union', + RO: 'Romania', + RU: 'Russian Federation', + RW: 'Rwanda', + BL: 'Saint Barth\u00e9lemy', + SH: 'Saint Helena, Ascension and Tristan da Cunha', + KN: 'Saint Kitts and Nevis', + LC: 'Saint Lucia', + MF: 'Saint Martin (French part)', + PM: 'Saint Pierre and Miquelon', + VC: 'Saint Vincent and the Grenadines', + WS: 'Samoa', + SM: 'San Marino', + ST: 'Sao Tome and Principe', + SA: 'Saudi Arabia', + SN: 'Senegal', + RS: 'Serbia', + SC: 'Seychelles', + SL: 'Sierra Leone', + SG: 'Singapore', + SX: 'Sint Maarten (Dutch part)', + SK: 'Slovakia', + SI: 'Slovenia', + SB: 'Solomon Islands', + SO: 'Somalia', + ZA: 'South Africa', + GS: 'South Georgia and the South Sandwich Islands', + SS: 'South Sudan', + ES: 'Spain', + LK: 'Sri Lanka', + SD: 'Sudan', + SR: 'Suriname', + SJ: 'Svalbard and Jan Mayen', + SZ: 'Swaziland', + SE: 'Sweden', + CH: 'Switzerland', + SY: 'Syrian Arab Republic', + TW: 'Taiwan, Province of China', + TJ: 'Tajikistan', + TZ: 'Tanzania, United Republic of', + TH: 'Thailand', + TL: 'Timor-Leste', + TG: 'Togo', + TK: 'Tokelau', + TO: 'Tonga', + TT: 'Trinidad and Tobago', + TN: 'Tunisia', + TR: 'Turkey', + TM: 'Turkmenistan', + TC: 'Turks and Caicos Islands', + TV: 'Tuvalu', + UG: 'Uganda', + UA: 'Ukraine', + AE: 'United Arab Emirates', + GB: 'United Kingdom', + US: 'United States', + UM: 'United States Minor Outlying Islands', + UY: 'Uruguay', + UZ: 'Uzbekistan', + VU: 'Vanuatu', + VE: 'Venezuela, Bolivarian Republic of', + VN: 'Viet Nam', + VG: 'Virgin Islands, British', + VI: 'Virgin Islands, U.S.', + WF: 'Wallis and Futuna', + EH: 'Western Sahara', + YE: 'Yemen', + ZM: 'Zambia', + ZW: 'Zimbabwe' +}; + +var Utils = { + isValidURL, + convertDuration, + convertDurationSeparated, + numberWithDots, + debounce, + COUNTRIES +}; + +const LinkAnalyzerTab = new Vue({ + data() { + return { + title: '', + subtitle: '', + image: '', + data: {}, + type: '', + link: '', + countries: [] + } + }, + methods: { + albumView, + convertDuration: Utils.convertDuration, + reset() { + this.title = 'Loading...'; + this.subtitle = ''; + this.image = ''; + this.data = {}; + this.type = ''; + this.link = ''; + this.countries = []; + }, + showTrack(data) { + this.title = + data.title + + (data.title_version && data.title.indexOf(data.title_version) == -1 ? ' ' + data.title_version : ''); + this.subtitle = `by ${data.artist.name}\nin ${data.album.title}`; + this.image = data.album.cover_xl; + this.type = 'track'; + this.link = data.link; + data.available_countries.forEach(cc => { + let temp = []; + let chars = [...cc].map(c => c.charCodeAt() + 127397); + temp.push(String.fromCodePoint(...chars)); + temp.push(Utils.COUNTRIES[cc]); + this.countries.push(temp); + }); + this.data = data; + }, + showAlbum(data) { + console.log(data); + this.title = data.title; + this.subtitle = `by ${data.artist.name}\n${data.nb_tracks} tracks`; + this.image = data.cover_xl; + this.type = 'album'; + this.link = data.link; + this.data = data; + } + }, + mounted() { + socket.on('analyze_track', this.showTrack); + socket.on('analyze_album', this.showAlbum); + } +}).$mount('#analyzer_tab'); + +const HomeTab = new Vue({ + data() { + return { + tracks: [], + albums: [], + artists: [], + playlists: [] + } + }, + methods: { + artistView, + albumView, + playlistView, + playPausePreview: TrackPreview.playPausePreview, + previewMouseEnter: TrackPreview.previewMouseEnter, + previewMouseLeave: TrackPreview.previewMouseLeave, + numberWithDots: Utils.numberWithDots, + convertDuration: Utils.convertDuration, + addToQueue(e) { + e.stopPropagation(); + Downloads.sendAddToQueue(e.currentTarget.dataset.link); + }, + openQualityModal(e) { + QualityModal$1.open(e.currentTarget.dataset.link); + }, + initHome(data) { + this.tracks = data.tracks.data; + this.albums = data.albums.data; + this.artists = data.artists.data; + this.playlists = data.playlists.data; + } + }, + mounted() { + socket.on('init_home', this.initHome); + } +}).$mount('#home_tab'); + +const ChartsTab = new Vue({ + data() { + return { + country: '', + id: 0, + countries: [], + chart: [] + } + }, + methods: { + artistView, + albumView, + playPausePreview: TrackPreview.playPausePreview, + previewMouseEnter: TrackPreview.previewMouseEnter, + previewMouseLeave: TrackPreview.previewMouseLeave, + convertDuration: Utils.convertDuration, + addToQueue(e) { + e.stopPropagation(); + Downloads.sendAddToQueue(e.currentTarget.dataset.link); + }, + openQualityModal(e) { + QualityModal$1.open(e.currentTarget.dataset.link); + }, + getTrackList(e){ + this.country = e.currentTarget.dataset.title; + localStorage.setItem('chart', this.country); + this.id = e.currentTarget.dataset.id; + socket.emit('getChartTracks', this.id); + }, + setTracklist(data){ + this.chart = data; + }, + changeCountry(){ + this.country = ''; + this.id = 0; + }, + initCharts(data) { + this.countries = data; + this.country = localStorage.getItem('chart') || ''; + if (this.country){ + let i = 0; + for (i; i < this.countries.length; i++) if (this.countries[i].title == this.country) break + if (i != this.countries.length){ + this.id = this.countries[i].id; + socket.emit('getChartTracks', this.id); + }else { + this.country = ''; + localStorage.setItem('chart', this.country); + } + } + } + }, + mounted() { + socket.on('init_charts', this.initCharts); + socket.on('setChartTracks', this.setTracklist); + } +}).$mount('#charts_tab'); + +const FavoritesTab = new Vue({ + data() { + return { + tracks: [], + albums: [], + artists: [], + playlists: [], + spotifyPlaylists: [] + } + }, + methods: { + playlistView, + artistView, + albumView, + spotifyPlaylistView, + playPausePreview: TrackPreview.playPausePreview, + previewMouseEnter: TrackPreview.previewMouseEnter, + previewMouseLeave: TrackPreview.previewMouseLeave, + convertDuration: Utils.convertDuration, + addToQueue(e) { + e.stopPropagation(); + Downloads.sendAddToQueue(e.currentTarget.dataset.link); + }, + openQualityModal(e) { + QualityModal$1.open(e.currentTarget.dataset.link); + }, + updated_userSpotifyPlaylists(data){this.spotifyPlaylists = data;}, + updated_userPlaylists(data){this.playlists = data;}, + updated_userAlbums(data){this.albums = data;}, + updated_userArtist(data){this.artists = data;}, + updated_userTracks(data){this.tracks = data;}, + initFavorites(data) { + this.tracks = data.tracks; + this.albums = data.albums; + this.artists = data.artists; + this.playlists = data.playlists; + document.getElementById('favorites_playlist_tab').click(); + } + }, + mounted() { + socket.on('init_favorites', this.initFavorites); + socket.on('updated_userSpotifyPlaylists', this.updated_userSpotifyPlaylists); + socket.on('updated_userPlaylists', this.updated_userPlaylists); + socket.on('updated_userAlbums', this.updated_userAlbums); + socket.on('updated_userArtist', this.updated_userArtist); + socket.on('updated_userTracks', this.updated_userTracks); + } +}).$mount('#favorites_tab'); + +const SettingsTab = new Vue({ + data: () => ({ + settings: { tags: {} }, + lastSettings: {}, + spotifyFeatures: {}, + lastCredentials: {}, + defaultSettings: {}, + lastUser: '', + spotifyUser: '', + darkMode: false, + slimDownloads: false + }), + computed: { + changeDarkMode: { + get() { + return this.darkMode + }, + set(wantDarkMode) { + this.darkMode = wantDarkMode; + document.documentElement.setAttribute('data-theme', wantDarkMode ? 'dark' : 'default'); + localStorage.setItem('darkMode', wantDarkMode); + } + }, + changeSlimDownloads: { + get() { + return this.slimDownloads + }, + set(wantSlimDownloads) { + this.slimDownloads = wantSlimDownloads; + document.getElementById('download_list').classList.toggle('slim', wantSlimDownloads); + localStorage.setItem('slimDownloads', wantSlimDownloads); + } + } + }, + methods: { + copyARLtoClipboard() { + let copyText = this.$refs.loginInput; + + copyText.setAttribute('type', 'text'); + copyText.select(); + copyText.setSelectionRange(0, 99999); + document.execCommand('copy'); + copyText.setAttribute('type', 'password'); + + toast('ARL copied to clipboard', 'assignment'); + }, + saveSettings() { + this.lastSettings = { ...this.settings }; + this.lastCredentials = { ...this.spotifyFeatures }; + let changed = false; + if (this.lastUser != this.spotifyUser) { + // force cloning without linking + this.lastUser = (' ' + this.spotifyUser).slice(1); + localStorage.setItem('spotifyUser', this.lastUser); + changed = true; + } + + socket.emit('saveSettings', this.lastSettings, this.lastCredentials, changed ? this.lastUser : false); + console.log(this.darkMode); + }, + loadSettings(settings, spotifyCredentials, defaults = null) { + if (defaults) { + this.defaultSettings = { ...defaults }; + } + + this.lastSettings = { ...settings }; + this.lastCredentials = { ...spotifyCredentials }; + this.settings = settings; + this.spotifyFeatures = spotifyCredentials; + }, + login() { + let arl = this.$refs.loginInput.value; + if (arl != '' && arl != localStorage.getItem('arl')) { + socket.emit('login', arl, true); + } + }, + logout() { + socket.emit('logout'); + }, + initSettings(settings, credentials, defaults) { + this.loadSettings(settings, credentials, defaults); + toast('Settings loaded!', 'settings'); + }, + updateSettings(settings, credentials) { + this.loadSettings(settings, credentials); + toast('Settings updated!', 'settings'); + }, + resetSettings() { + this.settings = { ...this.defaultSettings }; + } + }, + mounted() { + socket.on('init_settings', this.initSettings); + socket.on('updateSettings', this.updateSettings); + + let spotyUser = localStorage.getItem('spotifyUser'); + + if ('' !== spotyUser) { + this.lastUser = spotyUser; + this.spotifyUser = spotyUser; + } + + this.changeDarkMode = 'true' === localStorage.getItem('darkMode'); + this.changeSlimDownloads = 'true' === localStorage.getItem('slimDownloads'); + } +}).$mount('#settings_tab'); + +const MainSearch = new Vue({ + data: { + names: { + TOP_RESULT: 'Top Result', + TRACK: 'Tracks', + ARTIST: 'Artists', + ALBUM: 'Albums', + PLAYLIST: 'Playlists' + }, + results: { + query: '', + allTab: { + ORDER: [], + TOP_RESULT: [], + ALBUM: {}, + ARTIST: {}, + TRACK: {}, + PLAYLIST: {} + }, + trackTab: { + data: [], + next: 0, + total: 0, + loaded: false + }, + albumTab: { + data: [], + next: 0, + total: 0, + loaded: false + }, + artistTab: { + data: [], + next: 0, + total: 0, + loaded: false + }, + playlistTab: { + data: [], + next: 0, + total: 0, + loaded: false + } + } + }, + methods: { + artistView, + albumView, + playlistView, + playPausePreview: TrackPreview.playPausePreview, + previewMouseEnter: TrackPreview.previewMouseEnter, + previewMouseLeave: TrackPreview.previewMouseLeave, + handleClickTopResult(event) { + let topResultType = this.results.allTab.TOP_RESULT[0].type; + + switch (topResultType) { + case 'artist': + this.artistView(event); + break + case 'album': + this.albumView(event); + break + case 'playlist': + this.playlistView(event); + break + } + }, + changeSearchTab(section) { + if (section != 'TOP_RESULT') { + document.getElementById(`search_${section.toLowerCase()}_tab`).click(); + } + }, + addToQueue: function (e) { + Downloads.sendAddToQueue(e.currentTarget.dataset.link); + }, + openQualityModal: function (e) { + QualityModal$1.open(e.currentTarget.dataset.link); + }, + numberWithDots: Utils.numberWithDots, + convertDuration: Utils.convertDuration, + search(type) { + socket.emit('search', { + term: this.results.query, + type: type, + start: this.results[type + 'Tab'].next, + nb: 30 + }); + }, + scrolledSearch(type) { + if (this.results[type + 'Tab'].next < this.results[type + 'Tab'].total) { + socket.emit('search', { + term: this.results.query, + type: type, + start: this.results[type + 'Tab'].next, + nb: 30 + }); + } + }, + handleMainSearch(result) { + let resetObj = { data: [], next: 0, total: 0, loaded: false }; + this.results.allTab = result; + this.results.query = result.QUERY; + this.results.trackTab = { ...resetObj }; + this.results.albumTab = { ...resetObj }; + this.results.artistTab = { ...resetObj }; + this.results.playlistTab = { ...resetObj }; + document.getElementById('search_all_tab').click(); + document.getElementById('search_tab_content').style.display = 'block'; + document.getElementById('main_search_tablink').click(); + }, + handleSearch(result) { + let next = 0; + + if (result.next) { + next = parseInt(result.next.match(/index=(\d*)/)[1]); + } else { + next = result.total; + } + + if (this.results[result.type + 'Tab'].total != result.total) { + this.results[result.type + 'Tab'].total = result.total; + } + + if (this.results[result.type + 'Tab'].next != next) { + this.results[result.type + 'Tab'].next = next; + this.results[result.type + 'Tab'].data = this.results[result.type + 'Tab'].data.concat(result.data); + } + this.results[result.type + 'Tab'].loaded = true; + } + }, + mounted() { + socket.on('mainSearch', this.handleMainSearch); + socket.on('search', this.handleSearch); + } +}).$mount('#search_tab'); + +/* ===== Globals ====== */ +window.search_selected = ''; +window.main_selected = ''; +window.windows_stack = []; + +/* ===== Locals ===== */ +let currentStack = {}; + +// Exporting this function out of the default export +// because it's used in components that are needed +// in this file too +function artistView(ev) { + let id = ev.currentTarget.dataset.id; + ArtistTab.reset(); + socket.emit('getTracklist', { type: 'artist', id: id }); + showTab('artist', id); +} + +// Exporting this function out of the default export +// because it's used in components that are needed +// in this file too +function albumView(ev) { + let id = ev.currentTarget.dataset.id; + TracklistTab.reset(); + socket.emit('getTracklist', { type: 'album', id: id }); + showTab('album', id); +} + +// Exporting this function out of the default export +// because it's used in components that are needed +// in this file too +function playlistView(ev) { + let id = ev.currentTarget.dataset.id; + TracklistTab.reset(); + socket.emit('getTracklist', { type: 'playlist', id: id }); + showTab('playlist', id); +} + +function spotifyPlaylistView(ev) { + let id = ev.currentTarget.dataset.id; + TracklistTab.reset(); + socket.emit('getTracklist', { type: 'spotifyplaylist', id: id }); + showTab('spotifyplaylist', id); +} + +function analyzeLink(link) { + console.log('Analyzing: ' + link); + LinkAnalyzerTab.reset(); + socket.emit('analyzeLink', link); +} + +function linkListeners$2() { + document.getElementById('search_tab').addEventListener('click', handleSearchTabClick); + document.getElementById('favorites_tab').addEventListener('click', handleFavoritesTabClick); + document.getElementById('sidebar').addEventListener('click', handleSidebarClick); + + const backButtons = Array.from(document.getElementsByClassName('back-button')); + + backButtons.forEach(button => { + button.addEventListener('click', backTab); + }); +} + +/** + * Handles click Event on the sidebar and changes tab + * according to clicked icon. + * Uses event delegation + * @param {Event} event + * @since 0.1.0 + */ +function handleSidebarClick(event) { + if (!(event.target.matches('.main_tablinks') || event.target.parentElement.matches('.main_tablinks'))) { + return + } + + let sidebarEl = event.target.matches('.main_tablinks') ? event.target : event.target.parentElement; + let targetID = sidebarEl.getAttribute('id'); + + switch (targetID) { + case 'main_search_tablink': + changeTab(sidebarEl, 'main', 'search_tab'); + break + case 'main_home_tablink': + changeTab(sidebarEl, 'main', 'home_tab'); + break + case 'main_charts_tablink': + changeTab(sidebarEl, 'main', 'charts_tab'); + break + case 'main_favorites_tablink': + changeTab(sidebarEl, 'main', 'favorites_tab'); + break + case 'main_analyzer_tablink': + changeTab(sidebarEl, 'main', 'analyzer_tab'); + break + case 'main_settings_tablink': + changeTab(sidebarEl, 'main', 'settings_tab'); + break + case 'main_about_tablink': + changeTab(sidebarEl, 'main', 'about_tab'); + break + } +} + +function handleSearchTabClick(event) { + let targetID = event.target.id; + + switch (targetID) { + case 'search_all_tab': + changeTab(event.target, 'search', 'main_search'); + break + case 'search_track_tab': + changeTab(event.target, 'search', 'track_search'); + break + case 'search_album_tab': + changeTab(event.target, 'search', 'album_search'); + break + case 'search_artist_tab': + changeTab(event.target, 'search', 'artist_search'); + break + case 'search_playlist_tab': + changeTab(event.target, 'search', 'playlist_search'); + break + } +} + +function handleFavoritesTabClick(event) { + let targetID = event.target.id; + + switch (targetID) { + case 'favorites_playlist_tab': + changeTab(event.target, 'favorites', 'playlist_favorites'); + break + case 'favorites_album_tab': + changeTab(event.target, 'favorites', 'album_favorites'); + break + case 'favorites_artist_tab': + changeTab(event.target, 'favorites', 'artist_favorites'); + break + case 'favorites_track_tab': + changeTab(event.target, 'favorites', 'track_favorites'); + break + } +} + +function changeTab(sidebarEl, section, tabName) { + windows_stack = []; + currentStack = {}; + var i, tabcontent, tablinks; + tabcontent = document.getElementsByClassName(section + '_tabcontent'); + for (i = 0; i < tabcontent.length; i++) { + tabcontent[i].style.display = 'none'; + } + tablinks = document.getElementsByClassName(section + '_tablinks'); + for (i = 0; i < tablinks.length; i++) { + tablinks[i].classList.remove('active'); + } + if (tabName == 'settings_tab' && main_selected != 'settings_tab') { + SettingsTab.settings = { ...SettingsTab.lastSettings }; + SettingsTab.spotifyCredentials = { ...SettingsTab.lastCredentials }; + SettingsTab.spotifyUser = (' ' + SettingsTab.lastUser).slice(1); + } + + document.getElementById(tabName).style.display = 'block'; + + if ('main' === section) { + main_selected = tabName; + } else if ('search' === section) { + search_selected = tabName; + } + + // Not choosing .currentTarget beacuse the event + // is delegated + sidebarEl.classList.add('active'); + + // Check if you need to load more content in the search tab + if ( + main_selected == 'search_tab' && + ['track_search', 'album_search', 'artist_search', 'playlist_search'].indexOf(search_selected) != -1 && + MainSearch.results[search_selected.split('_')[0] + 'Tab'].data.length == 0 + ) { + MainSearch.search(search_selected.split('_')[0]); + } +} + +function showTab(type, id, back = false) { + if (windows_stack.length == 0) { + windows_stack.push({ tab: main_selected }); + } else if (!back) { + windows_stack.push(currentStack); + } + + window.tab = type == 'artist' ? 'artist_tab' : 'tracklist_tab'; + + currentStack = { type: type, id: id }; + let tabcontent = document.getElementsByClassName('main_tabcontent'); + + for (let i = 0; i < tabcontent.length; i++) { + tabcontent[i].style.display = 'none'; + } + document.getElementById(tab).style.display = 'block'; + TrackPreview.stopStackedTabsPreview(); +} + +function backTab() { + if (windows_stack.length == 1) { + document.getElementById(`main_${main_selected}link`).click(); + } else { + let tabObj = windows_stack.pop(); + if (tabObj.type == 'artist') { + ArtistTab.reset(); + } else { + TracklistTab.reset(); + } + socket.emit('getTracklist', { type: tabObj.type, id: tabObj.id }); + showTab(tabObj.type, tabObj.id, true); + } + TrackPreview.stopStackedTabsPreview(); +} + +var Tabs = { + linkListeners: linkListeners$2, + artistView, + albumView, + playlistView, + analyzeLink +}; + +function linkListeners$3() { + document.getElementById('content').addEventListener('scroll', Utils.debounce(handleContentScroll, 100)); + document.getElementById('searchbar').addEventListener('keyup', handleSearchBarKeyup); +} + +// Load more content when the search page is at the end +function handleContentScroll(event) { + let contentElement = event.target; + + if (contentElement.scrollTop + contentElement.clientHeight >= contentElement.scrollHeight) { + if ( + main_selected === 'search_tab' && + ['track_search', 'album_search', 'artist_search', 'playlist_search'].indexOf(search_selected) != -1 + ) { + MainSearch.scrolledSearch(search_selected.split('_')[0]); + } + } +} + +function handleSearchBarKeyup(e) { + if (e.keyCode == 13) { + let term = this.value; + if (Utils.isValidURL(term)) { + if (e.ctrlKey) { + QualityModal$1.open(term); + } else { + if (window.main_selected == 'analyzer_tab') { + Tabs.analyzeLink(term); + } else { + Downloads.sendAddToQueue(term); + } + } + } else { + if (term != MainSearch.query || main_selected == 'search_tab') { + document.getElementById('search_tab_content').style.display = 'none'; + socket.emit('mainSearch', { term: term }); + } else { + document.getElementById('search_all_tab').click(); + document.getElementById('search_tab_content').style.display = 'block'; + document.getElementById('main_search_tablink').click(); + } + } + } +} + +var Search = { + linkListeners: linkListeners$3 +}; + +/* ===== Socketio listeners ===== */ + +// Debug messages for socketio +socket.on('message', function (msg) { + console.log(msg); +}); + +socket.on('logging_in', function () { + toast('Logging in', 'loading', false, 'login-toast'); +}); + +socket.on('logged_in', function (data) { + switch (data.status) { + case 1: + case 3: + toast('Logged in', 'done', true, 'login-toast'); + if (data.arl) { + localStorage.setItem('arl', data.arl); + $('#login_input_arl').val(data.arl); + } + $('#open_login_prompt').hide(); + if (data.user) { + $('#settings_username').text(data.user.name); + $('#settings_picture').attr( + 'src', + `https://e-cdns-images.dzcdn.net/images/user/${data.user.picture}/125x125-000000-80-0-0.jpg` + ); + // $('#logged_in_info').show() + document.getElementById('logged_in_info').classList.remove('hide'); + } + break + case 2: + toast('Already logged in', 'done', true, 'login-toast'); + if (data.user) { + $('#settings_username').text(data.user.name); + $('#settings_picture').attr( + 'src', + `https://e-cdns-images.dzcdn.net/images/user/${data.user.picture}/125x125-000000-80-0-0.jpg` + ); + // $('#logged_in_info').show() + document.getElementById('logged_in_info').classList.remove('hide'); + } + break + case 0: + toast("Couldn't log in", 'close', true, 'login-toast'); + localStorage.removeItem('arl'); + $('#login_input_arl').val(''); + $('#open_login_prompt').show(); + document.getElementById('logged_in_info').classList.add('hide'); + // $('#logged_in_info').hide() + $('#settings_username').text('Not Logged'); + $('#settings_picture').attr('src', `https://e-cdns-images.dzcdn.net/images/user/125x125-000000-80-0-0.jpg`); + break + } +}); + +socket.on('logged_out', function () { + toast('Logged out', 'done', true, 'login-toast'); + localStorage.removeItem('arl'); + $('#login_input_arl').val(''); + $('#open_login_prompt').show(); + document.getElementById('logged_in_info').classList.add('hide'); + // $('#logged_in_info').hide() + $('#settings_username').text('Not Logged'); + $('#settings_picture').attr('src', `https://e-cdns-images.dzcdn.net/images/user/125x125-000000-80-0-0.jpg`); +}); + +/* ===== App initialization ===== */ +function startApp() { + Downloads.init(); + QualityModal$1.init(); + Tabs.linkListeners(); + Search.linkListeners(); + TrackPreview.init(); + + document.getElementById('logged_in_info').classList.add('hide'); + + if (localStorage.getItem('arl')) { + let arl = localStorage.getItem('arl'); + + socket.emit('login', arl); + $('#login_input_arl').val(arl); + } + if ('true' === localStorage.getItem('slimDownloads')) { + document.getElementById('download_list').classList.add('slim'); + } + let spotifyUser = localStorage.getItem('spotifyUser'); + if (spotifyUser != '') { + socket.emit('update_userSpotifyPlaylists', spotifyUser); + } + // Open default tab + document.getElementById('main_home_tablink').click(); +} + +document.addEventListener('DOMContentLoaded', startApp); +//# sourceMappingURL=bundle.js.map diff --git a/public/js/bundle.js.map b/public/js/bundle.js.map new file mode 100644 index 0000000..7e59234 --- /dev/null +++ b/public/js/bundle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bundle.js","sources":["../../src/js/modules/socket.js","../../src/js/modules/toasts.js","../../src/js/modules/downloads.js","../../src/js/modules/quality-modal.js","../../src/js/modules/components/artist-tab.js","../../src/js/modules/track-preview.js","../../src/js/modules/components/tracklist-tab.js","../../src/js/modules/utils.js","../../src/js/modules/components/link-analyzer-tab.js","../../src/js/modules/components/home-tab.js","../../src/js/modules/components/charts-tab.js","../../src/js/modules/components/favorites-tab.js","../../src/js/modules/components/settings-tab.js","../../src/js/modules/components/main-search.js","../../src/js/modules/tabs.js","../../src/js/modules/search.js","../../src/js/app.js"],"sourcesContent":["export const socket = io.connect(window.location.href)\r\n\r\nsocket.on('connect', () => {\r\n\tdocument.getElementById('loading_overlay').classList.remove('active')\r\n})\r\n","import { socket } from './socket.js'\r\n\r\nlet toastsWithId = {}\r\n\r\nexport const toast = function (msg, icon = null, dismiss = true, id = null) {\r\n\tif (toastsWithId[id]) {\r\n\t\tlet toastObj = toastsWithId[id]\r\n\t\tlet toastDOM = $(`div.toastify[toast_id=${id}]`)\r\n\t\tif (msg) {\r\n\t\t\ttoastDOM.find('.toast-message').html(msg)\r\n\t\t}\r\n\t\tif (icon) {\r\n\t\t\tif (icon == 'loading') icon = `
`\r\n\t\t\telse icon = `${icon}`\r\n\t\t\ttoastDOM.find('.toast-icon').html(icon)\r\n\t\t}\r\n\t\tif (dismiss !== null && dismiss) {\r\n\t\t\tsetTimeout(function () {\r\n\t\t\t\ttoastObj.hideToast()\r\n\t\t\t\tdelete toastsWithId[id]\r\n\t\t\t}, 3000)\r\n\t\t}\r\n\t} else {\r\n\t\tif (icon == null) icon = ''\r\n\t\telse if (icon == 'loading') icon = `
`\r\n\t\telse icon = `${icon}`\r\n\t\tlet toastObj = Toastify({\r\n\t\t\ttext: `${icon}${msg}`,\r\n\t\t\tduration: dismiss ? 3000 : 0,\r\n\t\t\tgravity: 'bottom',\r\n\t\t\tposition: 'left'\r\n\t\t}).showToast()\r\n\t\tif (id) {\r\n\t\t\ttoastsWithId[id] = toastObj\r\n\t\t\t$(toastObj.toastElement).attr('toast_id', id)\r\n\t\t}\r\n\t}\r\n}\r\n\r\nsocket.on('toast', data => {\r\n\ttoast(data.msg, data.icon || null, data.dismiss !== undefined ? data.dismiss : true, data.id || null)\r\n})\r\n","import { socket } from './socket.js'\r\nimport { toast } from './toasts.js'\r\n\r\n/* ===== Locals ===== */\r\nconst tabMinWidth = 250\r\nconst tabMaxWidth = 500\r\n\r\nlet cachedTabWidth = parseInt(localStorage.getItem('downloadTabWidth')) || 300\r\nlet queueList = {}\r\nlet queue = []\r\nlet queueComplete = []\r\nlet tabContainerEl\r\nlet listEl\r\nlet dragHandlerEl\r\n\r\nfunction init() {\r\n\t// Find download DOM elements\r\n\ttabContainerEl = document.getElementById('download_tab_container')\r\n\tlistEl = document.getElementById('download_list')\r\n\tdragHandlerEl = document.getElementById('download_tab_drag_handler')\r\n\r\n\t// Check if download tab should be open\r\n\tif ('true' === localStorage.getItem('downloadTabOpen')) {\r\n\t\ttabContainerEl.classList.remove('tab_hidden')\r\n\r\n\t\tsetTabWidth(cachedTabWidth)\r\n\t}\r\n\r\n\tlinkListeners()\r\n}\r\n\r\nfunction linkListeners() {\r\n\tlistEl.addEventListener('click', handleListClick)\r\n\tdocument.getElementById('toggle_download_tab').addEventListener('click', toggleDownloadTab)\r\n\r\n\t// Queue buttons\r\n\tdocument.getElementById('clean_queue').addEventListener('click', () => {\r\n\t\tsocket.emit('removeFinishedDownloads')\r\n\t})\r\n\r\n\tdocument.getElementById('cancel_queue').addEventListener('click', () => {\r\n\t\tsocket.emit('cancelAllDownloads')\r\n\t})\r\n\r\n\tdragHandlerEl.addEventListener('mousedown', event => {\r\n\t\tevent.preventDefault()\r\n\r\n\t\tdocument.addEventListener('mousemove', handleDrag)\r\n\t})\r\n\r\n\tdocument.addEventListener('mouseup', () => {\r\n\t\tdocument.removeEventListener('mousemove', handleDrag)\r\n\t})\r\n\r\n\ttabContainerEl.addEventListener('transitionend', () => {\r\n\t\ttabContainerEl.style.transition = ''\r\n\t})\r\n\r\n\twindow.addEventListener('beforeunload', () => {\r\n\t\tlocalStorage.setItem('downloadTabWidth', cachedTabWidth)\r\n\t})\r\n}\r\n\r\nfunction setTabWidth(newWidth) {\r\n\tif (undefined === newWidth) {\r\n\t\ttabContainerEl.style.width = ''\r\n\t\tlistEl.style.width = ''\r\n\t} else {\r\n\t\ttabContainerEl.style.width = newWidth + 'px'\r\n\t\tlistEl.style.width = newWidth + 'px'\r\n\t}\r\n}\r\n\r\nfunction handleDrag(event) {\r\n\tlet newWidth = window.innerWidth - event.pageX + 2\r\n\r\n\tif (newWidth < tabMinWidth) {\r\n\t\tnewWidth = tabMinWidth\r\n\t} else if (newWidth > tabMaxWidth) {\r\n\t\tnewWidth = tabMaxWidth\r\n\t}\r\n\r\n\tcachedTabWidth = newWidth\r\n\r\n\tsetTabWidth(newWidth)\r\n}\r\n\r\nfunction sendAddToQueue(url, bitrate = null) {\r\n\tif (url.indexOf(';') !== -1) {\r\n\t\tlet urls = url.split(';')\r\n\t\turls.forEach(url => {\r\n\t\t\tsocket.emit('addToQueue', { url: url, bitrate: bitrate })\r\n\t\t})\r\n\t} else if (url != '') {\r\n\t\tsocket.emit('addToQueue', { url: url, bitrate: bitrate })\r\n\t}\r\n}\r\n\r\nfunction addToQueue(queueItem, current = false) {\r\n\tqueueList[queueItem.uuid] = queueItem\r\n\tif (queueItem.downloaded + queueItem.failed == queueItem.size) {\r\n\t\tqueueComplete.push(queueItem.uuid)\r\n\t} else {\r\n\t\tqueue.push(queueItem.uuid)\r\n\t}\r\n\t$(listEl).append(\r\n\t\t`
\r\n\t\t
\r\n\t\t\t\"Cover\r\n\t\t\t
\r\n\t\t\t\t${queueItem.title} - \r\n\t\t\t\t${queueItem.artist}\r\n\t\t\t
\r\n\t\t\t
\r\n\t\t\t\t${queueItem.downloaded + queueItem.failed}/${\r\n\t\t\tqueueItem.size\r\n\t\t}\r\n\t\t\t
\r\n\t\t
\r\n\t\t
\r\n\t\t\t
\r\n\t\t\tremove\r\n\t\t
\r\n\t
`\r\n\t)\r\n\tif (queueItem.progress > 0 || current) {\r\n\t\t$('#bar_' + queueItem.uuid)\r\n\t\t\t.removeClass('indeterminate')\r\n\t\t\t.addClass('determinate')\r\n\t}\r\n\t$('#bar_' + queueItem.uuid).css('width', queueItem.progress + '%')\r\n\tif (queueItem.failed >= 1) {\r\n\t\t$('#download_' + queueItem.uuid + ' .download_info_status').append(\r\n\t\t\t`(${queueItem.failed}error_outline)`\r\n\t\t)\r\n\t}\r\n\tif (queueItem.downloaded + queueItem.failed == queueItem.size) {\r\n\t\tlet result_icon = $('#download_' + queueItem.uuid).find('.queue_icon')\r\n\t\tif (queueItem.failed == 0) {\r\n\t\t\tresult_icon.text('done')\r\n\t\t} else if (queueItem.failed == queueItem.size) {\r\n\t\t\tresult_icon.text('error')\r\n\t\t} else {\r\n\t\t\tresult_icon.text('warning')\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction initQueue(data) {\r\n\tif (data.queueComplete.length) {\r\n\t\tdata.queueComplete.forEach(item => {\r\n\t\t\taddToQueue(data.queueList[item])\r\n\t\t})\r\n\t}\r\n\tif (data.currentItem) {\r\n\t\taddToQueue(data['queueList'][data.currentItem], true)\r\n\t}\r\n\tdata.queue.forEach(item => {\r\n\t\taddToQueue(data.queueList[item])\r\n\t})\r\n}\r\n\r\nfunction startDownload(uuid) {\r\n\t$('#bar_' + uuid)\r\n\t\t.removeClass('indeterminate')\r\n\t\t.addClass('determinate')\r\n}\r\n\r\nsocket.on('startDownload', startDownload)\r\n\r\nfunction handleListClick(event) {\r\n\tif (!event.target.matches('.queue_icon[data-uuid]')) {\r\n\t\treturn\r\n\t}\r\n\r\n\tlet icon = event.target.innerText\r\n\tlet uuid = $(event.target).data('uuid')\r\n\r\n\tswitch (icon) {\r\n\t\tcase 'remove':\r\n\t\t\tsocket.emit('removeFromQueue', uuid)\r\n\t\t\tbreak\r\n\t\tdefault:\r\n\t}\r\n}\r\n\r\n// Show/Hide Download Tab\r\nfunction toggleDownloadTab(ev) {\r\n\tev.preventDefault()\r\n\r\n\tsetTabWidth()\r\n\r\n\ttabContainerEl.style.transition = 'all 250ms ease-in-out'\r\n\r\n\t// Toggle returns a Boolean based on the action it performed\r\n\tlet isHidden = tabContainerEl.classList.toggle('tab_hidden')\r\n\r\n\tif (!isHidden) {\r\n\t\tsetTabWidth(cachedTabWidth)\r\n\t}\r\n\r\n\tlocalStorage.setItem('downloadTabOpen', !isHidden)\r\n}\r\n\r\nsocket.on('init_downloadQueue', initQueue)\r\nsocket.on('addedToQueue', addToQueue)\r\n\r\nfunction removeFromQueue(uuid) {\r\n\tlet index = queue.indexOf(uuid)\r\n\tif (index > -1) {\r\n\t\tqueue.splice(index, 1)\r\n\t\t$(`#download_${queueList[uuid].uuid}`).remove()\r\n\t\tdelete queueList[uuid]\r\n\t}\r\n}\r\n\r\nsocket.on('removedFromQueue', removeFromQueue)\r\n\r\nfunction finishDownload(uuid) {\r\n\tif (queue.indexOf(uuid) > -1) {\r\n\t\ttoast(`${queueList[uuid].title} finished downloading.`, 'done')\r\n\t\t$('#bar_' + uuid).css('width', '100%')\r\n\t\tlet result_icon = $('#download_' + uuid).find('.queue_icon')\r\n\t\tif (queueList[uuid].failed == 0) {\r\n\t\t\tresult_icon.text('done')\r\n\t\t} else if (queueList[uuid].failed >= queueList[uuid].size) {\r\n\t\t\tresult_icon.text('error')\r\n\t\t} else {\r\n\t\t\tresult_icon.text('warning')\r\n\t\t}\r\n\t\tlet index = queue.indexOf(uuid)\r\n\t\tif (index > -1) {\r\n\t\t\tqueue.splice(index, 1)\r\n\t\t\tqueueComplete.push(uuid)\r\n\t\t}\r\n\t\tif (queue.length <= 0) {\r\n\t\t\ttoast('All downloads completed!', 'done_all')\r\n\t\t}\r\n\t}\r\n}\r\n\r\nsocket.on('finishDownload', finishDownload)\r\n\r\nfunction removeAllDownloads(currentItem) {\r\n\tqueueComplete = []\r\n\tif (currentItem == '') {\r\n\t\tqueue = []\r\n\t\tqueueList = {}\r\n\t\t$(listEl).html('')\r\n\t} else {\r\n\t\tqueue = [currentItem]\r\n\t\tlet tempQueueItem = queueList[currentItem]\r\n\t\tqueueList = {}\r\n\t\tqueueList[currentItem] = tempQueueItem\r\n\t\t$('.download_object').each(function (index) {\r\n\t\t\tif ($(this).attr('id') != 'download_' + currentItem) $(this).remove()\r\n\t\t})\r\n\t}\r\n}\r\n\r\nsocket.on('removedAllDownloads', removeAllDownloads)\r\n\r\nfunction removedFinishedDownloads() {\r\n\tqueueComplete.forEach(item => {\r\n\t\t$('#download_' + item).remove()\r\n\t})\r\n\tqueueComplete = []\r\n}\r\n\r\nsocket.on('removedFinishedDownloads', removedFinishedDownloads)\r\n\r\nfunction updateQueue(update) {\r\n\tif (update.uuid && queue.indexOf(update.uuid) > -1) {\r\n\t\tif (update.downloaded) {\r\n\t\t\tqueueList[update.uuid].downloaded++\r\n\t\t\t$('#download_' + update.uuid + ' .queue_downloaded').text(\r\n\t\t\t\tqueueList[update.uuid].downloaded + queueList[update.uuid].failed\r\n\t\t\t)\r\n\t\t}\r\n\t\tif (update.failed) {\r\n\t\t\tqueueList[update.uuid].failed++\r\n\t\t\t$('#download_' + update.uuid + ' .queue_downloaded').text(\r\n\t\t\t\tqueueList[update.uuid].downloaded + queueList[update.uuid].failed\r\n\t\t\t)\r\n\t\t\tif (queueList[update.uuid].failed == 1) {\r\n\t\t\t\t$('#download_' + update.uuid + ' .download_info_status').append(\r\n\t\t\t\t\t`(1 error_outline)`\r\n\t\t\t\t)\r\n\t\t\t} else {\r\n\t\t\t\t$('#download_' + update.uuid + ' .queue_failed').text(queueList[update.uuid].failed)\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (update.progress) {\r\n\t\t\tqueueList[update.uuid].progress = update.progress\r\n\t\t\t$('#bar_' + update.uuid).css('width', update.progress + '%')\r\n\t\t}\r\n\t}\r\n}\r\n\r\nsocket.on('updateQueue', updateQueue)\r\n\r\nexport default {\r\n\tinit,\r\n\tsendAddToQueue,\r\n\taddToQueue\r\n}\r\n","import Downloads from './downloads.js'\r\n\r\nconst QualityModal = {\r\n\t// Defaults\r\n\topen: false,\r\n\turl: ''\r\n}\r\n\r\nfunction init() {\r\n\tQualityModal.element = document.getElementById('modal_quality')\r\n\r\n\tlinkListeners()\r\n}\r\n\r\nfunction open(link) {\r\n\tQualityModal.url = link\r\n\tQualityModal.element.style.display = 'block'\r\n\tQualityModal.element.classList.add('animated', 'fadeIn')\r\n}\r\n\r\nfunction linkListeners() {\r\n\tQualityModal.element.addEventListener('click', handleClick)\r\n\tQualityModal.element.addEventListener('webkitAnimationEnd', handleAnimationEnd)\r\n}\r\n\r\nfunction handleClick(event) {\r\n\tQualityModal.element.classList.add('animated', 'fadeOut')\r\n\r\n\tif (!event.target.matches('.quality-button')) {\r\n\t\treturn\r\n\t}\r\n\r\n\tlet bitrate = event.target.dataset.qualityValue\r\n\r\n\tDownloads.sendAddToQueue(QualityModal.url, bitrate)\r\n}\r\n\r\nfunction handleAnimationEnd() {\r\n\tQualityModal.element.classList.remove('animated', QualityModal.open ? 'fadeOut' : 'fadeIn')\r\n\tQualityModal.element.style.display = QualityModal.open ? 'none' : 'block'\r\n\tQualityModal.open = !QualityModal.open\r\n}\r\n\r\nexport default {\r\n\tinit,\r\n\topen\r\n}\r\n","import { socket } from '../socket.js'\r\nimport Downloads from '../downloads.js'\r\nimport QualityModal from '../quality-modal.js'\r\nimport { albumView } from '../tabs.js'\r\n\r\nconst ArtistTab = new Vue({\r\n\tdata() {\r\n\t\treturn {\r\n\t\t\tcurrentTab: '',\r\n\t\t\tsortKey: 'release_date',\r\n\t\t\tsortOrder: 'desc',\r\n\t\t\ttitle: '',\r\n\t\t\timage: '',\r\n\t\t\ttype: '',\r\n\t\t\tlink: '',\r\n\t\t\thead: null,\r\n\t\t\tbody: null\r\n\t\t}\r\n\t},\r\n\tmethods: {\r\n\t\talbumView,\r\n\t\treset() {\r\n\t\t\tthis.title = 'Loading...'\r\n\t\t\tthis.image = ''\r\n\t\t\tthis.type = ''\r\n\t\t\tthis.currentTab = ''\r\n\t\t\tthis.sortKey = 'release_date'\r\n\t\t\tthis.sortOrder = 'desc'\r\n\t\t\tthis.link = ''\r\n\t\t\tthis.head = []\r\n\t\t\tthis.body = null\r\n\t\t},\r\n\t\taddToQueue(e) {\r\n\t\t\te.stopPropagation()\r\n\t\t\tDownloads.sendAddToQueue(e.currentTarget.dataset.link)\r\n\t\t},\r\n\t\topenQualityModal(e) {\r\n\t\t\tQualityModal.open(e.currentTarget.dataset.link)\r\n\t\t},\r\n\t\tsortBy(key) {\r\n\t\t\tif (key == this.sortKey) {\r\n\t\t\t\tthis.sortOrder = this.sortOrder == 'asc' ? 'desc' : 'asc'\r\n\t\t\t} else {\r\n\t\t\t\tthis.sortKey = key\r\n\t\t\t\tthis.sortOrder = 'asc'\r\n\t\t\t}\r\n\t\t},\r\n\t\tchangeTab(tab) {\r\n\t\t\tthis.currentTab = tab\r\n\t\t},\r\n\t\tcheckNewRelease(date) {\r\n\t\t\tlet g1 = new Date()\r\n\t\t\tlet g2 = new Date(date)\r\n\t\t\tg2.setDate(g2.getDate() + 3)\r\n\t\t\tg1.setHours(0, 0, 0, 0)\r\n\r\n\t\t\treturn g1.getTime() <= g2.getTime()\r\n\t\t},\r\n\t\tshowArtist(data) {\r\n\t\t\tthis.title = data.name\r\n\t\t\tthis.image = data.picture_xl\r\n\t\t\tthis.type = 'Artist'\r\n\t\t\tthis.link = `https://www.deezer.com/artist/${data.id}`\r\n\t\t\tthis.currentTab = Object.keys(data.releases)[0]\r\n\t\t\tthis.sortKey = 'release_date'\r\n\t\t\tthis.sortOrder = 'desc'\r\n\t\t\tthis.head = [\r\n\t\t\t\t{ title: 'Title', sortKey: 'title' },\r\n\t\t\t\t{ title: 'Release Date', sortKey: 'release_date' },\r\n\t\t\t\t{ title: '', width: '32px' }\r\n\t\t\t]\r\n\t\t\tif (_.isEmpty(data.releases)) {\r\n\t\t\t\tthis.body = null\r\n\t\t\t} else {\r\n\t\t\t\tthis.body = data.releases\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tcomputed: {\r\n\t\tshowTable() {\r\n\t\t\tif (this.body) return _.orderBy(this.body[this.currentTab], this.sortKey, this.sortOrder)\r\n\t\t\telse return []\r\n\t\t}\r\n\t},\r\n\tmounted() {\r\n\t\tsocket.on('show_artist', this.showArtist)\r\n\t}\r\n}).$mount('#artist_tab')\r\n\r\nexport default ArtistTab\r\n","/* ===== Globals ====== */\r\nwindow.preview_max_volume = 1\r\n\r\n/* ===== Locals ===== */\r\nlet preview_track = document.getElementById('preview-track')\r\nlet preview_stopped = true\r\n\r\n// init stuff\r\nfunction init() {\r\n\tpreview_track.volume = 1\r\n\t/*preview_max_volume = parseFloat(localStorage.getItem(\"previewVolume\"))\r\n if (preview_max_volume === null){\r\n preview_max_volume = 0.8\r\n localStorage.setItem(\"previewVolume\", preview_max_volume)\r\n }*/\r\n\r\n\t// start playing when track loaded\r\n\tpreview_track.addEventListener('canplay', function () {\r\n\t\tpreview_track.play()\r\n\t\tpreview_stopped = false\r\n\t\t$(preview_track).animate({ volume: preview_max_volume }, 500)\r\n\t})\r\n\r\n\t// auto fadeout when at the end of the song\r\n\tpreview_track.addEventListener('timeupdate', function () {\r\n\t\tif (preview_track.currentTime > preview_track.duration - 1) {\r\n\t\t\t$(preview_track).animate({ volume: 0 }, 800)\r\n\t\t\tpreview_stopped = true\r\n\t\t\t$('a[playing] > .preview_controls').css({ opacity: 0 })\r\n\t\t\t$('*').removeAttr('playing')\r\n\t\t\t$('.preview_controls').text('play_arrow')\r\n\t\t\t$('.preview_playlist_controls').text('play_arrow')\r\n\t\t}\r\n\t})\r\n}\r\n\r\n// on modal closing\r\nfunction stopStackedTabsPreview() {\r\n\tif (\r\n\t\t$('.preview_playlist_controls').filter(function () {\r\n\t\t\treturn $(this).attr('playing')\r\n\t\t}).length > 0\r\n\t) {\r\n\t\t$(preview_track).animate({ volume: 0 }, 800)\r\n\t\tpreview_stopped = true\r\n\t\t$('.preview_playlist_controls').removeAttr('playing')\r\n\t\t$('.preview_playlist_controls').text('play_arrow')\r\n\t}\r\n}\r\n\r\n// on hover event\r\nfunction previewMouseEnter(e) {\r\n\t$(e.currentTarget).css({ opacity: 1 })\r\n}\r\n\r\nfunction previewMouseLeave(e) {\r\n\tlet obj = e.currentTarget\r\n\tif (($(obj).parent().attr('playing') && preview_stopped) || !$(obj).parent().attr('playing')) {\r\n\t\t$(obj).css({ opacity: 0 }, 200)\r\n\t}\r\n}\r\n\r\n// on click event\r\nfunction playPausePreview(e) {\r\n\te.preventDefault()\r\n\tlet obj = e.currentTarget\r\n\tvar icon = obj.tagName == 'I' ? $(obj) : $(obj).children('i')\r\n\tif ($(obj).attr('playing')) {\r\n\t\tif (preview_track.paused) {\r\n\t\t\tpreview_track.play()\r\n\t\t\tpreview_stopped = false\r\n\t\t\ticon.text('pause')\r\n\t\t\t$(preview_track).animate({ volume: preview_max_volume }, 500)\r\n\t\t} else {\r\n\t\t\tpreview_stopped = true\r\n\t\t\ticon.text('play_arrow')\r\n\t\t\t$(preview_track).animate({ volume: 0 }, 250, 'swing', () => {\r\n\t\t\t\tpreview_track.pause()\r\n\t\t\t})\r\n\t\t}\r\n\t} else {\r\n\t\t$('*').removeAttr('playing')\r\n\t\t$(obj).attr('playing', true)\r\n\t\t$('.preview_controls').text('play_arrow')\r\n\t\t$('.preview_playlist_controls').text('play_arrow')\r\n\t\t$('.preview_controls').css({ opacity: 0 })\r\n\t\ticon.text('pause')\r\n\t\ticon.css({ opacity: 1 })\r\n\t\tpreview_stopped = false\r\n\t\t$(preview_track).animate({ volume: 0 }, 250, 'swing', () => {\r\n\t\t\tpreview_track.pause()\r\n\t\t\t$('#preview-track_source').prop('src', $(obj).data('preview'))\r\n\t\t\tpreview_track.load()\r\n\t\t})\r\n\t}\r\n}\r\n\r\nexport default {\r\n\tinit,\r\n\tstopStackedTabsPreview,\r\n\tpreviewMouseEnter,\r\n\tpreviewMouseLeave,\r\n\tplayPausePreview\r\n}\r\n","import { socket } from '../socket.js'\r\nimport { albumView, artistView } from '../tabs.js'\r\nimport Downloads from '../downloads.js'\r\nimport QualityModal from '../quality-modal.js'\r\nimport TrackPreview from '../track-preview.js'\r\n\r\nconst TracklistTab = new Vue({\r\n\tdata: () => ({\r\n\t\ttitle: '',\r\n\t\tmetadata: '',\r\n\t\trelease_date: '',\r\n\t\tlabel: '',\r\n\t\texplicit: false,\r\n\t\timage: '',\r\n\t\ttype: '',\r\n\t\tlink: '',\r\n\t\thead: null,\r\n\t\tbody: []\r\n\t}),\r\n\tmethods: {\r\n\t\tartistView,\r\n\t\talbumView,\r\n\t\tplayPausePreview: TrackPreview.playPausePreview,\r\n\t\treset() {\r\n\t\t\tthis.title = 'Loading...'\r\n\t\t\tthis.image = ''\r\n\t\t\tthis.metadata = ''\r\n\t\t\tthis.label = ''\r\n\t\t\tthis.release_date = ''\r\n\t\t\tthis.explicit = false\r\n\t\t\tthis.type = ''\r\n\t\t\tthis.head = []\r\n\t\t\tthis.body = []\r\n\t\t},\r\n\t\taddToQueue(e) {\r\n\t\t\te.stopPropagation()\r\n\t\t\tDownloads.sendAddToQueue(e.currentTarget.dataset.link)\r\n\t\t},\r\n\t\topenQualityModal(e) {\r\n\t\t\tQualityModal.open(e.currentTarget.dataset.link)\r\n\t\t},\r\n\t\ttoggleAll(e) {\r\n\t\t\tthis.body.forEach(item => {\r\n\t\t\t\tif (item.type == 'track') {\r\n\t\t\t\t\titem.selected = e.currentTarget.checked\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t},\r\n\t\tselectedLinks() {\r\n\t\t\tvar selected = []\r\n\t\t\tif (this.body) {\r\n\t\t\t\tthis.body.forEach(item => {\r\n\t\t\t\t\tif (item.type == 'track' && item.selected) selected.push(this.type == \"Spotify Playlist\" ? item.uri : item.link)\r\n\t\t\t\t})\r\n\t\t\t}\r\n\t\t\treturn selected.join(';')\r\n\t\t},\r\n\t\tconvertDuration(duration) {\r\n\t\t\t//convert from seconds only to mm:ss format\r\n\t\t\tlet mm, ss\r\n\t\t\tmm = Math.floor(duration / 60)\r\n\t\t\tss = duration - mm * 60\r\n\t\t\t//add leading zero if ss < 0\r\n\t\t\tif (ss < 10) {\r\n\t\t\t\tss = '0' + ss\r\n\t\t\t}\r\n\t\t\treturn mm + ':' + ss\r\n\t\t},\r\n\t\tshowAlbum(data) {\r\n\t\t\tthis.type = 'Album'\r\n\t\t\tthis.link = `https://www.deezer.com/album/${data.id}`\r\n\t\t\tthis.title = data.title\r\n\t\t\tthis.explicit = data.explicit_lyrics\r\n\t\t\tthis.label = data.label\r\n\t\t\tthis.metadata = `${data.artist.name} • ${data.tracks.length} songs`\r\n\t\t\tthis.release_date = data.release_date.substring(0, 10)\r\n\t\t\tthis.image = data.cover_xl\r\n\t\t\tthis.head = [\r\n\t\t\t\t{ title: 'music_note', width: '24px' },\r\n\t\t\t\t{ title: '#' },\r\n\t\t\t\t{ title: 'Song' },\r\n\t\t\t\t{ title: 'Artist' },\r\n\t\t\t\t{ title: 'timer', width: '40px' }\r\n\t\t\t]\r\n\t\t\tif (_.isEmpty(data.tracks)) {\r\n\t\t\t\tconsole.log('show e lodash ok')\r\n\r\n\t\t\t\tthis.body = null\r\n\t\t\t} else {\r\n\t\t\t\tthis.body = data.tracks\r\n\t\t\t}\r\n\t\t},\r\n\t\tshowPlaylist(data) {\r\n\t\t\tthis.type = 'Playlist'\r\n\t\t\tthis.link = `https://www.deezer.com/playlist/${data.id}`\r\n\t\t\tthis.title = data.title\r\n\t\t\tthis.image = data.picture_xl\r\n\t\t\tthis.release_date = data.creation_date.substring(0, 10)\r\n\t\t\tthis.metadata = `by ${data.creator.name} • ${data.tracks.length} songs`\r\n\t\t\tthis.head = [\r\n\t\t\t\t{ title: 'music_note', width: '24px' },\r\n\t\t\t\t{ title: '#' },\r\n\t\t\t\t{ title: 'Song' },\r\n\t\t\t\t{ title: 'Artist' },\r\n\t\t\t\t{ title: 'Album' },\r\n\t\t\t\t{ title: 'timer', width: '40px' }\r\n\t\t\t]\r\n\t\t\tif (_.isEmpty(data.tracks)) {\r\n\t\t\t\tthis.body = null\r\n\t\t\t} else {\r\n\t\t\t\tthis.body = data.tracks\r\n\t\t\t}\r\n\t\t},\r\n\t\tshowSpotifyPlaylist(data) {\r\n\t\t\tthis.type = 'Spotify Playlist'\r\n\t\t\tthis.link = data.uri\r\n\t\t\tthis.title = data.name\r\n\t\t\tthis.image = data.images.length ? data.images[0].url : \"https://e-cdns-images.dzcdn.net/images/cover/d41d8cd98f00b204e9800998ecf8427e/1000x1000-000000-80-0-0.jpg\"\r\n\t\t\tthis.release_date = \"\"\r\n\t\t\tthis.metadata = `by ${data.owner.display_name} • ${data.tracks.length} songs`\r\n\t\t\tthis.head = [\r\n\t\t\t\t{ title: 'music_note', width: '24px' },\r\n\t\t\t\t{ title: '#' },\r\n\t\t\t\t{ title: 'Song' },\r\n\t\t\t\t{ title: 'Artist' },\r\n\t\t\t\t{ title: 'Album' },\r\n\t\t\t\t{ title: 'timer', width: '40px' }\r\n\t\t\t]\r\n\t\t\tif (_.isEmpty(data.tracks)) {\r\n\t\t\t\tthis.body = null\r\n\t\t\t} else {\r\n\t\t\t\tthis.body = data.tracks\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tmounted() {\r\n\t\tsocket.on('show_album', this.showAlbum)\r\n\t\tsocket.on('show_playlist', this.showPlaylist)\r\n\t\tsocket.on('show_spotifyplaylist', this.showSpotifyPlaylist)\r\n\t}\r\n}).$mount('#tracklist_tab')\r\n\r\nexport default TracklistTab\r\n","function isValidURL(text) {\r\n\tlet lowerCaseText = text.toLowerCase()\r\n\r\n\tif (lowerCaseText.startsWith('http')) {\r\n\t\tif (lowerCaseText.indexOf('deezer.com') >= 0 || lowerCaseText.indexOf('open.spotify.com') >= 0) {\r\n\t\t\treturn true\r\n\t\t}\r\n\t} else if (lowerCaseText.startsWith('spotify:')) {\r\n\t\treturn true\r\n\t}\r\n\treturn false\r\n}\r\n\r\nfunction convertDuration(duration) {\r\n\t// convert from seconds only to mm:ss format\r\n\tlet mm, ss\r\n\tmm = Math.floor(duration / 60)\r\n\tss = duration - mm * 60\r\n\t//add leading zero if ss < 0\r\n\tif (ss < 10) {\r\n\t\tss = '0' + ss\r\n\t}\r\n\treturn mm + ':' + ss\r\n}\r\n\r\nfunction convertDurationSeparated(duration) {\r\n\tlet hh, mm, ss\r\n\tmm = Math.floor(duration / 60)\r\n\thh = Math.floor(mm / 60)\r\n\tss = duration - mm * 60\r\n\tmm -= hh * 60\r\n\treturn [hh, mm, ss]\r\n}\r\n\r\nfunction numberWithDots(x) {\r\n\treturn x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, '.')\r\n}\r\n\r\n// On scroll event, returns currentTarget = null\r\n// Probably on other events too\r\nfunction debounce(func, wait, immediate) {\r\n\tvar timeout\r\n\treturn function () {\r\n\t\tvar context = this\r\n\t\tvar args = arguments\r\n\t\tvar later = function () {\r\n\t\t\ttimeout = null\r\n\t\t\tif (!immediate) func.apply(context, args)\r\n\t\t}\r\n\t\tvar callNow = immediate && !timeout\r\n\t\tclearTimeout(timeout)\r\n\t\ttimeout = setTimeout(later, wait)\r\n\t\tif (callNow) func.apply(context, args)\r\n\t}\r\n}\r\n\r\nconst COUNTRIES = {\r\n\tAF: 'Afghanistan',\r\n\tAX: '\\u00c5land Islands',\r\n\tAL: 'Albania',\r\n\tDZ: 'Algeria',\r\n\tAS: 'American Samoa',\r\n\tAD: 'Andorra',\r\n\tAO: 'Angola',\r\n\tAI: 'Anguilla',\r\n\tAQ: 'Antarctica',\r\n\tAG: 'Antigua and Barbuda',\r\n\tAR: 'Argentina',\r\n\tAM: 'Armenia',\r\n\tAW: 'Aruba',\r\n\tAU: 'Australia',\r\n\tAT: 'Austria',\r\n\tAZ: 'Azerbaijan',\r\n\tBS: 'Bahamas',\r\n\tBH: 'Bahrain',\r\n\tBD: 'Bangladesh',\r\n\tBB: 'Barbados',\r\n\tBY: 'Belarus',\r\n\tBE: 'Belgium',\r\n\tBZ: 'Belize',\r\n\tBJ: 'Benin',\r\n\tBM: 'Bermuda',\r\n\tBT: 'Bhutan',\r\n\tBO: 'Bolivia, Plurinational State of',\r\n\tBQ: 'Bonaire, Sint Eustatius and Saba',\r\n\tBA: 'Bosnia and Herzegovina',\r\n\tBW: 'Botswana',\r\n\tBV: 'Bouvet Island',\r\n\tBR: 'Brazil',\r\n\tIO: 'British Indian Ocean Territory',\r\n\tBN: 'Brunei Darussalam',\r\n\tBG: 'Bulgaria',\r\n\tBF: 'Burkina Faso',\r\n\tBI: 'Burundi',\r\n\tKH: 'Cambodia',\r\n\tCM: 'Cameroon',\r\n\tCA: 'Canada',\r\n\tCV: 'Cape Verde',\r\n\tKY: 'Cayman Islands',\r\n\tCF: 'Central African Republic',\r\n\tTD: 'Chad',\r\n\tCL: 'Chile',\r\n\tCN: 'China',\r\n\tCX: 'Christmas Island',\r\n\tCC: 'Cocos (Keeling) Islands',\r\n\tCO: 'Colombia',\r\n\tKM: 'Comoros',\r\n\tCG: 'Congo',\r\n\tCD: 'Congo, the Democratic Republic of the',\r\n\tCK: 'Cook Islands',\r\n\tCR: 'Costa Rica',\r\n\tCI: \"C\\u00f4te d'Ivoire\",\r\n\tHR: 'Croatia',\r\n\tCU: 'Cuba',\r\n\tCW: 'Cura\\u00e7ao',\r\n\tCY: 'Cyprus',\r\n\tCZ: 'Czech Republic',\r\n\tDK: 'Denmark',\r\n\tDJ: 'Djibouti',\r\n\tDM: 'Dominica',\r\n\tDO: 'Dominican Republic',\r\n\tEC: 'Ecuador',\r\n\tEG: 'Egypt',\r\n\tSV: 'El Salvador',\r\n\tGQ: 'Equatorial Guinea',\r\n\tER: 'Eritrea',\r\n\tEE: 'Estonia',\r\n\tET: 'Ethiopia',\r\n\tFK: 'Falkland Islands (Malvinas)',\r\n\tFO: 'Faroe Islands',\r\n\tFJ: 'Fiji',\r\n\tFI: 'Finland',\r\n\tFR: 'France',\r\n\tGF: 'French Guiana',\r\n\tPF: 'French Polynesia',\r\n\tTF: 'French Southern Territories',\r\n\tGA: 'Gabon',\r\n\tGM: 'Gambia',\r\n\tGE: 'Georgia',\r\n\tDE: 'Germany',\r\n\tGH: 'Ghana',\r\n\tGI: 'Gibraltar',\r\n\tGR: 'Greece',\r\n\tGL: 'Greenland',\r\n\tGD: 'Grenada',\r\n\tGP: 'Guadeloupe',\r\n\tGU: 'Guam',\r\n\tGT: 'Guatemala',\r\n\tGG: 'Guernsey',\r\n\tGN: 'Guinea',\r\n\tGW: 'Guinea-Bissau',\r\n\tGY: 'Guyana',\r\n\tHT: 'Haiti',\r\n\tHM: 'Heard Island and McDonald Islands',\r\n\tVA: 'Holy See (Vatican City State)',\r\n\tHN: 'Honduras',\r\n\tHK: 'Hong Kong',\r\n\tHU: 'Hungary',\r\n\tIS: 'Iceland',\r\n\tIN: 'India',\r\n\tID: 'Indonesia',\r\n\tIR: 'Iran, Islamic Republic of',\r\n\tIQ: 'Iraq',\r\n\tIE: 'Ireland',\r\n\tIM: 'Isle of Man',\r\n\tIL: 'Israel',\r\n\tIT: 'Italy',\r\n\tJM: 'Jamaica',\r\n\tJP: 'Japan',\r\n\tJE: 'Jersey',\r\n\tJO: 'Jordan',\r\n\tKZ: 'Kazakhstan',\r\n\tKE: 'Kenya',\r\n\tKI: 'Kiribati',\r\n\tKP: \"Korea, Democratic People's Republic of\",\r\n\tKR: 'Korea, Republic of',\r\n\tKW: 'Kuwait',\r\n\tKG: 'Kyrgyzstan',\r\n\tLA: \"Lao People's Democratic Republic\",\r\n\tLV: 'Latvia',\r\n\tLB: 'Lebanon',\r\n\tLS: 'Lesotho',\r\n\tLR: 'Liberia',\r\n\tLY: 'Libya',\r\n\tLI: 'Liechtenstein',\r\n\tLT: 'Lithuania',\r\n\tLU: 'Luxembourg',\r\n\tMO: 'Macao',\r\n\tMK: 'Macedonia, the Former Yugoslav Republic of',\r\n\tMG: 'Madagascar',\r\n\tMW: 'Malawi',\r\n\tMY: 'Malaysia',\r\n\tMV: 'Maldives',\r\n\tML: 'Mali',\r\n\tMT: 'Malta',\r\n\tMH: 'Marshall Islands',\r\n\tMQ: 'Martinique',\r\n\tMR: 'Mauritania',\r\n\tMU: 'Mauritius',\r\n\tYT: 'Mayotte',\r\n\tMX: 'Mexico',\r\n\tFM: 'Micronesia, Federated States of',\r\n\tMD: 'Moldova, Republic of',\r\n\tMC: 'Monaco',\r\n\tMN: 'Mongolia',\r\n\tME: 'Montenegro',\r\n\tMS: 'Montserrat',\r\n\tMA: 'Morocco',\r\n\tMZ: 'Mozambique',\r\n\tMM: 'Myanmar',\r\n\tNA: 'Namibia',\r\n\tNR: 'Nauru',\r\n\tNP: 'Nepal',\r\n\tNL: 'Netherlands',\r\n\tNC: 'New Caledonia',\r\n\tNZ: 'New Zealand',\r\n\tNI: 'Nicaragua',\r\n\tNE: 'Niger',\r\n\tNG: 'Nigeria',\r\n\tNU: 'Niue',\r\n\tNF: 'Norfolk Island',\r\n\tMP: 'Northern Mariana Islands',\r\n\tNO: 'Norway',\r\n\tOM: 'Oman',\r\n\tPK: 'Pakistan',\r\n\tPW: 'Palau',\r\n\tPS: 'Palestine, State of',\r\n\tPA: 'Panama',\r\n\tPG: 'Papua New Guinea',\r\n\tPY: 'Paraguay',\r\n\tPE: 'Peru',\r\n\tPH: 'Philippines',\r\n\tPN: 'Pitcairn',\r\n\tPL: 'Poland',\r\n\tPT: 'Portugal',\r\n\tPR: 'Puerto Rico',\r\n\tQA: 'Qatar',\r\n\tRE: 'R\\u00e9union',\r\n\tRO: 'Romania',\r\n\tRU: 'Russian Federation',\r\n\tRW: 'Rwanda',\r\n\tBL: 'Saint Barth\\u00e9lemy',\r\n\tSH: 'Saint Helena, Ascension and Tristan da Cunha',\r\n\tKN: 'Saint Kitts and Nevis',\r\n\tLC: 'Saint Lucia',\r\n\tMF: 'Saint Martin (French part)',\r\n\tPM: 'Saint Pierre and Miquelon',\r\n\tVC: 'Saint Vincent and the Grenadines',\r\n\tWS: 'Samoa',\r\n\tSM: 'San Marino',\r\n\tST: 'Sao Tome and Principe',\r\n\tSA: 'Saudi Arabia',\r\n\tSN: 'Senegal',\r\n\tRS: 'Serbia',\r\n\tSC: 'Seychelles',\r\n\tSL: 'Sierra Leone',\r\n\tSG: 'Singapore',\r\n\tSX: 'Sint Maarten (Dutch part)',\r\n\tSK: 'Slovakia',\r\n\tSI: 'Slovenia',\r\n\tSB: 'Solomon Islands',\r\n\tSO: 'Somalia',\r\n\tZA: 'South Africa',\r\n\tGS: 'South Georgia and the South Sandwich Islands',\r\n\tSS: 'South Sudan',\r\n\tES: 'Spain',\r\n\tLK: 'Sri Lanka',\r\n\tSD: 'Sudan',\r\n\tSR: 'Suriname',\r\n\tSJ: 'Svalbard and Jan Mayen',\r\n\tSZ: 'Swaziland',\r\n\tSE: 'Sweden',\r\n\tCH: 'Switzerland',\r\n\tSY: 'Syrian Arab Republic',\r\n\tTW: 'Taiwan, Province of China',\r\n\tTJ: 'Tajikistan',\r\n\tTZ: 'Tanzania, United Republic of',\r\n\tTH: 'Thailand',\r\n\tTL: 'Timor-Leste',\r\n\tTG: 'Togo',\r\n\tTK: 'Tokelau',\r\n\tTO: 'Tonga',\r\n\tTT: 'Trinidad and Tobago',\r\n\tTN: 'Tunisia',\r\n\tTR: 'Turkey',\r\n\tTM: 'Turkmenistan',\r\n\tTC: 'Turks and Caicos Islands',\r\n\tTV: 'Tuvalu',\r\n\tUG: 'Uganda',\r\n\tUA: 'Ukraine',\r\n\tAE: 'United Arab Emirates',\r\n\tGB: 'United Kingdom',\r\n\tUS: 'United States',\r\n\tUM: 'United States Minor Outlying Islands',\r\n\tUY: 'Uruguay',\r\n\tUZ: 'Uzbekistan',\r\n\tVU: 'Vanuatu',\r\n\tVE: 'Venezuela, Bolivarian Republic of',\r\n\tVN: 'Viet Nam',\r\n\tVG: 'Virgin Islands, British',\r\n\tVI: 'Virgin Islands, U.S.',\r\n\tWF: 'Wallis and Futuna',\r\n\tEH: 'Western Sahara',\r\n\tYE: 'Yemen',\r\n\tZM: 'Zambia',\r\n\tZW: 'Zimbabwe'\r\n}\r\n\r\nexport default {\r\n\tisValidURL,\r\n\tconvertDuration,\r\n\tconvertDurationSeparated,\r\n\tnumberWithDots,\r\n\tdebounce,\r\n\tCOUNTRIES\r\n}\r\n","import { socket } from '../socket.js'\r\nimport { albumView } from '../tabs.js'\r\nimport Utils from '../utils.js'\r\n\r\nconst LinkAnalyzerTab = new Vue({\r\n\tdata() {\r\n\t\treturn {\r\n\t\t\ttitle: '',\r\n\t\t\tsubtitle: '',\r\n\t\t\timage: '',\r\n\t\t\tdata: {},\r\n\t\t\ttype: '',\r\n\t\t\tlink: '',\r\n\t\t\tcountries: []\r\n\t\t}\r\n\t},\r\n\tmethods: {\r\n\t\talbumView,\r\n\t\tconvertDuration: Utils.convertDuration,\r\n\t\treset() {\r\n\t\t\tthis.title = 'Loading...'\r\n\t\t\tthis.subtitle = ''\r\n\t\t\tthis.image = ''\r\n\t\t\tthis.data = {}\r\n\t\t\tthis.type = ''\r\n\t\t\tthis.link = ''\r\n\t\t\tthis.countries = []\r\n\t\t},\r\n\t\tshowTrack(data) {\r\n\t\t\tthis.title =\r\n\t\t\t\tdata.title +\r\n\t\t\t\t(data.title_version && data.title.indexOf(data.title_version) == -1 ? ' ' + data.title_version : '')\r\n\t\t\tthis.subtitle = `by ${data.artist.name}\\nin ${data.album.title}`\r\n\t\t\tthis.image = data.album.cover_xl\r\n\t\t\tthis.type = 'track'\r\n\t\t\tthis.link = data.link\r\n\t\t\tdata.available_countries.forEach(cc => {\r\n\t\t\t\tlet temp = []\r\n\t\t\t\tlet chars = [...cc].map(c => c.charCodeAt() + 127397)\r\n\t\t\t\ttemp.push(String.fromCodePoint(...chars))\r\n\t\t\t\ttemp.push(Utils.COUNTRIES[cc])\r\n\t\t\t\tthis.countries.push(temp)\r\n\t\t\t})\r\n\t\t\tthis.data = data\r\n\t\t},\r\n\t\tshowAlbum(data) {\r\n\t\t\tconsole.log(data)\r\n\t\t\tthis.title = data.title\r\n\t\t\tthis.subtitle = `by ${data.artist.name}\\n${data.nb_tracks} tracks`\r\n\t\t\tthis.image = data.cover_xl\r\n\t\t\tthis.type = 'album'\r\n\t\t\tthis.link = data.link\r\n\t\t\tthis.data = data\r\n\t\t}\r\n\t},\r\n\tmounted() {\r\n\t\tsocket.on('analyze_track', this.showTrack)\r\n\t\tsocket.on('analyze_album', this.showAlbum)\r\n\t}\r\n}).$mount('#analyzer_tab')\r\n\r\nexport default LinkAnalyzerTab\r\n","import { socket } from '../socket.js'\r\nimport { artistView, albumView, playlistView } from '../tabs.js'\r\nimport Downloads from '../downloads.js'\r\nimport QualityModal from '../quality-modal.js'\r\nimport TrackPreview from '../track-preview.js'\r\nimport Utils from '../utils.js'\r\n\r\nconst HomeTab = new Vue({\r\n\tdata() {\r\n\t\treturn {\r\n\t\t\ttracks: [],\r\n\t\t\talbums: [],\r\n\t\t\tartists: [],\r\n\t\t\tplaylists: []\r\n\t\t}\r\n\t},\r\n\tmethods: {\r\n\t\tartistView,\r\n\t\talbumView,\r\n\t\tplaylistView,\r\n\t\tplayPausePreview: TrackPreview.playPausePreview,\r\n\t\tpreviewMouseEnter: TrackPreview.previewMouseEnter,\r\n\t\tpreviewMouseLeave: TrackPreview.previewMouseLeave,\r\n\t\tnumberWithDots: Utils.numberWithDots,\r\n\t\tconvertDuration: Utils.convertDuration,\r\n\t\taddToQueue(e) {\r\n\t\t\te.stopPropagation()\r\n\t\t\tDownloads.sendAddToQueue(e.currentTarget.dataset.link)\r\n\t\t},\r\n\t\topenQualityModal(e) {\r\n\t\t\tQualityModal.open(e.currentTarget.dataset.link)\r\n\t\t},\r\n\t\tinitHome(data) {\r\n\t\t\tthis.tracks = data.tracks.data\r\n\t\t\tthis.albums = data.albums.data\r\n\t\t\tthis.artists = data.artists.data\r\n\t\t\tthis.playlists = data.playlists.data\r\n\t\t}\r\n\t},\r\n\tmounted() {\r\n\t\tsocket.on('init_home', this.initHome)\r\n\t}\r\n}).$mount('#home_tab')\r\n\r\nexport default HomeTab\r\n","import { socket } from '../socket.js'\r\nimport { artistView, albumView } from '../tabs.js'\r\nimport Downloads from '../downloads.js'\r\nimport QualityModal from '../quality-modal.js'\r\nimport TrackPreview from '../track-preview.js'\r\nimport Utils from '../utils.js'\r\n\r\nconst ChartsTab = new Vue({\r\n\tdata() {\r\n\t\treturn {\r\n\t\t\tcountry: '',\r\n id: 0,\r\n countries: [],\r\n chart: []\r\n\t\t}\r\n\t},\r\n\tmethods: {\r\n artistView,\r\n\t\talbumView,\r\n\t\tplayPausePreview: TrackPreview.playPausePreview,\r\n\t\tpreviewMouseEnter: TrackPreview.previewMouseEnter,\r\n\t\tpreviewMouseLeave: TrackPreview.previewMouseLeave,\r\n\t\tconvertDuration: Utils.convertDuration,\r\n\t\taddToQueue(e) {\r\n\t\t\te.stopPropagation()\r\n\t\t\tDownloads.sendAddToQueue(e.currentTarget.dataset.link)\r\n\t\t},\r\n\t\topenQualityModal(e) {\r\n\t\t\tQualityModal.open(e.currentTarget.dataset.link)\r\n\t\t},\r\n getTrackList(e){\r\n this.country = e.currentTarget.dataset.title\r\n localStorage.setItem('chart', this.country)\r\n this.id = e.currentTarget.dataset.id\r\n socket.emit('getChartTracks', this.id)\r\n },\r\n setTracklist(data){\r\n this.chart = data\r\n },\r\n changeCountry(){\r\n this.country = ''\r\n this.id = 0\r\n },\r\n\t\tinitCharts(data) {\r\n this.countries = data\r\n this.country = localStorage.getItem('chart') || ''\r\n if (this.country){\r\n let i = 0\r\n for (i; i < this.countries.length; i++) if (this.countries[i].title == this.country) break\r\n if (i != this.countries.length){\r\n this.id = this.countries[i].id\r\n socket.emit('getChartTracks', this.id)\r\n }else{\r\n this.country = ''\r\n localStorage.setItem('chart', this.country)\r\n }\r\n }\r\n\t\t}\r\n\t},\r\n\tmounted() {\r\n\t\tsocket.on('init_charts', this.initCharts)\r\n socket.on('setChartTracks', this.setTracklist)\r\n\t}\r\n}).$mount('#charts_tab')\r\n\r\nexport default ChartsTab\r\n","import { socket } from '../socket.js'\r\nimport { playlistView, artistView, albumView, spotifyPlaylistView } from '../tabs.js'\r\nimport Downloads from '../downloads.js'\r\nimport QualityModal from '../quality-modal.js'\r\nimport TrackPreview from '../track-preview.js'\r\nimport Utils from '../utils.js'\r\n\r\nconst FavoritesTab = new Vue({\r\n\tdata() {\r\n\t\treturn {\r\n\t\t\ttracks: [],\r\n\t\t\talbums: [],\r\n\t\t\tartists: [],\r\n\t\t\tplaylists: [],\r\n\t\t\tspotifyPlaylists: []\r\n\t\t}\r\n\t},\r\n\tmethods: {\r\n\t\tplaylistView,\r\n\t\tartistView,\r\n\t\talbumView,\r\n\t\tspotifyPlaylistView,\r\n\t\tplayPausePreview: TrackPreview.playPausePreview,\r\n\t\tpreviewMouseEnter: TrackPreview.previewMouseEnter,\r\n\t\tpreviewMouseLeave: TrackPreview.previewMouseLeave,\r\n\t\tconvertDuration: Utils.convertDuration,\r\n\t\taddToQueue(e) {\r\n\t\t\te.stopPropagation()\r\n\t\t\tDownloads.sendAddToQueue(e.currentTarget.dataset.link)\r\n\t\t},\r\n\t\topenQualityModal(e) {\r\n\t\t\tQualityModal.open(e.currentTarget.dataset.link)\r\n\t\t},\r\n\t\tupdated_userSpotifyPlaylists(data){this.spotifyPlaylists = data},\r\n\t\tupdated_userPlaylists(data){this.playlists = data},\r\n\t\tupdated_userAlbums(data){this.albums = data},\r\n\t\tupdated_userArtist(data){this.artists = data},\r\n\t\tupdated_userTracks(data){this.tracks = data},\r\n\t\tinitFavorites(data) {\r\n\t\t\tthis.tracks = data.tracks\r\n\t\t\tthis.albums = data.albums\r\n\t\t\tthis.artists = data.artists\r\n\t\t\tthis.playlists = data.playlists\r\n\t\t\tdocument.getElementById('favorites_playlist_tab').click()\r\n\t\t}\r\n\t},\r\n\tmounted() {\r\n\t\tsocket.on('init_favorites', this.initFavorites)\r\n\t\tsocket.on('updated_userSpotifyPlaylists', this.updated_userSpotifyPlaylists)\r\n\t\tsocket.on('updated_userPlaylists', this.updated_userPlaylists)\r\n\t\tsocket.on('updated_userAlbums', this.updated_userAlbums)\r\n\t\tsocket.on('updated_userArtist', this.updated_userArtist)\r\n\t\tsocket.on('updated_userTracks', this.updated_userTracks)\r\n\t}\r\n}).$mount('#favorites_tab')\r\n\r\nexport default FavoritesTab\r\n","import { toast } from '../toasts.js'\r\nimport { socket } from '../socket.js'\r\n\r\nconst SettingsTab = new Vue({\r\n\tdata: () => ({\r\n\t\tsettings: { tags: {} },\r\n\t\tlastSettings: {},\r\n\t\tspotifyFeatures: {},\r\n\t\tlastCredentials: {},\r\n\t\tdefaultSettings: {},\r\n\t\tlastUser: '',\r\n\t\tspotifyUser: '',\r\n\t\tdarkMode: false,\r\n\t\tslimDownloads: false\r\n\t}),\r\n\tcomputed: {\r\n\t\tchangeDarkMode: {\r\n\t\t\tget() {\r\n\t\t\t\treturn this.darkMode\r\n\t\t\t},\r\n\t\t\tset(wantDarkMode) {\r\n\t\t\t\tthis.darkMode = wantDarkMode\r\n\t\t\t\tdocument.documentElement.setAttribute('data-theme', wantDarkMode ? 'dark' : 'default')\r\n\t\t\t\tlocalStorage.setItem('darkMode', wantDarkMode)\r\n\t\t\t}\r\n\t\t},\r\n\t\tchangeSlimDownloads: {\r\n\t\t\tget() {\r\n\t\t\t\treturn this.slimDownloads\r\n\t\t\t},\r\n\t\t\tset(wantSlimDownloads) {\r\n\t\t\t\tthis.slimDownloads = wantSlimDownloads\r\n\t\t\t\tdocument.getElementById('download_list').classList.toggle('slim', wantSlimDownloads)\r\n\t\t\t\tlocalStorage.setItem('slimDownloads', wantSlimDownloads)\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tmethods: {\r\n\t\tcopyARLtoClipboard() {\r\n\t\t\tlet copyText = this.$refs.loginInput\r\n\r\n\t\t\tcopyText.setAttribute('type', 'text')\r\n\t\t\tcopyText.select()\r\n\t\t\tcopyText.setSelectionRange(0, 99999)\r\n\t\t\tdocument.execCommand('copy')\r\n\t\t\tcopyText.setAttribute('type', 'password')\r\n\r\n\t\t\ttoast('ARL copied to clipboard', 'assignment')\r\n\t\t},\r\n\t\tsaveSettings() {\r\n\t\t\tthis.lastSettings = { ...this.settings }\r\n\t\t\tthis.lastCredentials = { ...this.spotifyFeatures }\r\n\t\t\tlet changed = false\r\n\t\t\tif (this.lastUser != this.spotifyUser) {\r\n\t\t\t\t// force cloning without linking\r\n\t\t\t\tthis.lastUser = (' ' + this.spotifyUser).slice(1)\r\n\t\t\t\tlocalStorage.setItem('spotifyUser', this.lastUser)\r\n\t\t\t\tchanged = true\r\n\t\t\t}\r\n\r\n\t\t\tsocket.emit('saveSettings', this.lastSettings, this.lastCredentials, changed ? this.lastUser : false)\r\n\t\t\tconsole.log(this.darkMode)\r\n\t\t},\r\n\t\tloadSettings(settings, spotifyCredentials, defaults = null) {\r\n\t\t\tif (defaults) {\r\n\t\t\t\tthis.defaultSettings = { ...defaults }\r\n\t\t\t}\r\n\r\n\t\t\tthis.lastSettings = { ...settings }\r\n\t\t\tthis.lastCredentials = { ...spotifyCredentials }\r\n\t\t\tthis.settings = settings\r\n\t\t\tthis.spotifyFeatures = spotifyCredentials\r\n\t\t},\r\n\t\tlogin() {\r\n\t\t\tlet arl = this.$refs.loginInput.value\r\n\t\t\tif (arl != '' && arl != localStorage.getItem('arl')) {\r\n\t\t\t\tsocket.emit('login', arl, true)\r\n\t\t\t}\r\n\t\t},\r\n\t\tlogout() {\r\n\t\t\tsocket.emit('logout')\r\n\t\t},\r\n\t\tinitSettings(settings, credentials, defaults) {\r\n\t\t\tthis.loadSettings(settings, credentials, defaults)\r\n\t\t\ttoast('Settings loaded!', 'settings')\r\n\t\t},\r\n\t\tupdateSettings(settings, credentials) {\r\n\t\t\tthis.loadSettings(settings, credentials)\r\n\t\t\ttoast('Settings updated!', 'settings')\r\n\t\t},\r\n\t\tresetSettings() {\r\n\t\t\tthis.settings = { ...this.defaultSettings }\r\n\t\t}\r\n\t},\r\n\tmounted() {\r\n\t\tsocket.on('init_settings', this.initSettings)\r\n\t\tsocket.on('updateSettings', this.updateSettings)\r\n\r\n\t\tlet spotyUser = localStorage.getItem('spotifyUser')\r\n\r\n\t\tif ('' !== spotyUser) {\r\n\t\t\tthis.lastUser = spotyUser\r\n\t\t\tthis.spotifyUser = spotyUser\r\n\t\t}\r\n\r\n\t\tthis.changeDarkMode = 'true' === localStorage.getItem('darkMode')\r\n\t\tthis.changeSlimDownloads = 'true' === localStorage.getItem('slimDownloads')\r\n\t}\r\n}).$mount('#settings_tab')\r\n\r\nexport default SettingsTab\r\n","import { socket } from '../socket.js'\r\nimport { artistView, albumView, playlistView } from '../tabs.js'\r\nimport Downloads from '../downloads.js'\r\nimport QualityModal from '../quality-modal.js'\r\nimport TrackPreview from '../track-preview.js'\r\nimport Utils from '../utils.js'\r\n\r\nconst MainSearch = new Vue({\r\n\tdata: {\r\n\t\tnames: {\r\n\t\t\tTOP_RESULT: 'Top Result',\r\n\t\t\tTRACK: 'Tracks',\r\n\t\t\tARTIST: 'Artists',\r\n\t\t\tALBUM: 'Albums',\r\n\t\t\tPLAYLIST: 'Playlists'\r\n\t\t},\r\n\t\tresults: {\r\n\t\t\tquery: '',\r\n\t\t\tallTab: {\r\n\t\t\t\tORDER: [],\r\n\t\t\t\tTOP_RESULT: [],\r\n\t\t\t\tALBUM: {},\r\n\t\t\t\tARTIST: {},\r\n\t\t\t\tTRACK: {},\r\n\t\t\t\tPLAYLIST: {}\r\n\t\t\t},\r\n\t\t\ttrackTab: {\r\n\t\t\t\tdata: [],\r\n\t\t\t\tnext: 0,\r\n\t\t\t\ttotal: 0,\r\n\t\t\t\tloaded: false\r\n\t\t\t},\r\n\t\t\talbumTab: {\r\n\t\t\t\tdata: [],\r\n\t\t\t\tnext: 0,\r\n\t\t\t\ttotal: 0,\r\n\t\t\t\tloaded: false\r\n\t\t\t},\r\n\t\t\tartistTab: {\r\n\t\t\t\tdata: [],\r\n\t\t\t\tnext: 0,\r\n\t\t\t\ttotal: 0,\r\n\t\t\t\tloaded: false\r\n\t\t\t},\r\n\t\t\tplaylistTab: {\r\n\t\t\t\tdata: [],\r\n\t\t\t\tnext: 0,\r\n\t\t\t\ttotal: 0,\r\n\t\t\t\tloaded: false\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tmethods: {\r\n\t\tartistView,\r\n\t\talbumView,\r\n\t\tplaylistView,\r\n\t\tplayPausePreview: TrackPreview.playPausePreview,\r\n\t\tpreviewMouseEnter: TrackPreview.previewMouseEnter,\r\n\t\tpreviewMouseLeave: TrackPreview.previewMouseLeave,\r\n\t\thandleClickTopResult(event) {\r\n\t\t\tlet topResultType = this.results.allTab.TOP_RESULT[0].type\r\n\r\n\t\t\tswitch (topResultType) {\r\n\t\t\t\tcase 'artist':\r\n\t\t\t\t\tthis.artistView(event)\r\n\t\t\t\t\tbreak\r\n\t\t\t\tcase 'album':\r\n\t\t\t\t\tthis.albumView(event)\r\n\t\t\t\t\tbreak\r\n\t\t\t\tcase 'playlist':\r\n\t\t\t\t\tthis.playlistView(event)\r\n\t\t\t\t\tbreak\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak\r\n\t\t\t}\r\n\t\t},\r\n\t\tchangeSearchTab(section) {\r\n\t\t\tif (section != 'TOP_RESULT') {\r\n\t\t\t\tdocument.getElementById(`search_${section.toLowerCase()}_tab`).click()\r\n\t\t\t}\r\n\t\t},\r\n\t\taddToQueue: function (e) {\r\n\t\t\tDownloads.sendAddToQueue(e.currentTarget.dataset.link)\r\n\t\t},\r\n\t\topenQualityModal: function (e) {\r\n\t\t\tQualityModal.open(e.currentTarget.dataset.link)\r\n\t\t},\r\n\t\tnumberWithDots: Utils.numberWithDots,\r\n\t\tconvertDuration: Utils.convertDuration,\r\n\t\tsearch(type) {\r\n\t\t\tsocket.emit('search', {\r\n\t\t\t\tterm: this.results.query,\r\n\t\t\t\ttype: type,\r\n\t\t\t\tstart: this.results[type + 'Tab'].next,\r\n\t\t\t\tnb: 30\r\n\t\t\t})\r\n\t\t},\r\n\t\tscrolledSearch(type) {\r\n\t\t\tif (this.results[type + 'Tab'].next < this.results[type + 'Tab'].total) {\r\n\t\t\t\tsocket.emit('search', {\r\n\t\t\t\t\tterm: this.results.query,\r\n\t\t\t\t\ttype: type,\r\n\t\t\t\t\tstart: this.results[type + 'Tab'].next,\r\n\t\t\t\t\tnb: 30\r\n\t\t\t\t})\r\n\t\t\t}\r\n\t\t},\r\n\t\thandleMainSearch(result) {\r\n\t\t\tlet resetObj = { data: [], next: 0, total: 0, loaded: false }\r\n\t\t\tthis.results.allTab = result\r\n\t\t\tthis.results.query = result.QUERY\r\n\t\t\tthis.results.trackTab = { ...resetObj }\r\n\t\t\tthis.results.albumTab = { ...resetObj }\r\n\t\t\tthis.results.artistTab = { ...resetObj }\r\n\t\t\tthis.results.playlistTab = { ...resetObj }\r\n\t\t\tdocument.getElementById('search_all_tab').click()\r\n\t\t\tdocument.getElementById('search_tab_content').style.display = 'block'\r\n\t\t\tdocument.getElementById('main_search_tablink').click()\r\n\t\t},\r\n\t\thandleSearch(result) {\r\n\t\t\tlet next = 0\r\n\r\n\t\t\tif (result.next) {\r\n\t\t\t\tnext = parseInt(result.next.match(/index=(\\d*)/)[1])\r\n\t\t\t} else {\r\n\t\t\t\tnext = result.total\r\n\t\t\t}\r\n\r\n\t\t\tif (this.results[result.type + 'Tab'].total != result.total) {\r\n\t\t\t\tthis.results[result.type + 'Tab'].total = result.total\r\n\t\t\t}\r\n\r\n\t\t\tif (this.results[result.type + 'Tab'].next != next) {\r\n\t\t\t\tthis.results[result.type + 'Tab'].next = next\r\n\t\t\t\tthis.results[result.type + 'Tab'].data = this.results[result.type + 'Tab'].data.concat(result.data)\r\n\t\t\t}\r\n\t\t\tthis.results[result.type + 'Tab'].loaded = true\r\n\t\t}\r\n\t},\r\n\tmounted() {\r\n\t\tsocket.on('mainSearch', this.handleMainSearch)\r\n\t\tsocket.on('search', this.handleSearch)\r\n\t}\r\n}).$mount('#search_tab')\r\n\r\nexport default MainSearch\r\n","import ArtistTab from './components/artist-tab.js'\r\nimport TracklistTab from './components/tracklist-tab.js'\r\nimport LinkAnalyzerTab from './components/link-analyzer-tab.js'\r\nimport HomeTab from './components/home-tab.js'\r\nimport ChartsTab from './components/charts-tab.js'\r\nimport FavoritesTab from './components/favorites-tab.js'\r\nimport { socket } from './socket.js'\r\nimport SettingsTab from './components/settings-tab.js'\r\nimport MainSearch from './components/main-search.js'\r\nimport TrackPreview from './track-preview.js'\r\n\r\n/* ===== Globals ====== */\r\nwindow.search_selected = ''\r\nwindow.main_selected = ''\r\nwindow.windows_stack = []\r\n\r\n/* ===== Locals ===== */\r\nlet currentStack = {}\r\n\r\n// Exporting this function out of the default export\r\n// because it's used in components that are needed\r\n// in this file too\r\nexport function artistView(ev) {\r\n\tlet id = ev.currentTarget.dataset.id\r\n\tArtistTab.reset()\r\n\tsocket.emit('getTracklist', { type: 'artist', id: id })\r\n\tshowTab('artist', id)\r\n}\r\n\r\n// Exporting this function out of the default export\r\n// because it's used in components that are needed\r\n// in this file too\r\nexport function albumView(ev) {\r\n\tlet id = ev.currentTarget.dataset.id\r\n\tTracklistTab.reset()\r\n\tsocket.emit('getTracklist', { type: 'album', id: id })\r\n\tshowTab('album', id)\r\n}\r\n\r\n// Exporting this function out of the default export\r\n// because it's used in components that are needed\r\n// in this file too\r\nexport function playlistView(ev) {\r\n\tlet id = ev.currentTarget.dataset.id\r\n\tTracklistTab.reset()\r\n\tsocket.emit('getTracklist', { type: 'playlist', id: id })\r\n\tshowTab('playlist', id)\r\n}\r\n\r\nexport function spotifyPlaylistView(ev) {\r\n\tlet id = ev.currentTarget.dataset.id\r\n\tTracklistTab.reset()\r\n\tsocket.emit('getTracklist', { type: 'spotifyplaylist', id: id })\r\n\tshowTab('spotifyplaylist', id)\r\n}\r\n\r\nfunction analyzeLink(link) {\r\n\tconsole.log('Analyzing: ' + link)\r\n\tLinkAnalyzerTab.reset()\r\n\tsocket.emit('analyzeLink', link)\r\n}\r\n\r\nfunction linkListeners() {\r\n\tdocument.getElementById('search_tab').addEventListener('click', handleSearchTabClick)\r\n\tdocument.getElementById('favorites_tab').addEventListener('click', handleFavoritesTabClick)\r\n\tdocument.getElementById('sidebar').addEventListener('click', handleSidebarClick)\r\n\r\n\tconst backButtons = Array.from(document.getElementsByClassName('back-button'))\r\n\r\n\tbackButtons.forEach(button => {\r\n\t\tbutton.addEventListener('click', backTab)\r\n\t})\r\n}\r\n\r\n/**\r\n * Handles click Event on the sidebar and changes tab\r\n * according to clicked icon.\r\n * Uses event delegation\r\n * @param\t\t{Event}\t\tevent\r\n * @since\t\t0.1.0\r\n */\r\nfunction handleSidebarClick(event) {\r\n\tif (!(event.target.matches('.main_tablinks') || event.target.parentElement.matches('.main_tablinks'))) {\r\n\t\treturn\r\n\t}\r\n\r\n\tlet sidebarEl = event.target.matches('.main_tablinks') ? event.target : event.target.parentElement\r\n\tlet targetID = sidebarEl.getAttribute('id')\r\n\r\n\tswitch (targetID) {\r\n\t\tcase 'main_search_tablink':\r\n\t\t\tchangeTab(sidebarEl, 'main', 'search_tab')\r\n\t\t\tbreak\r\n\t\tcase 'main_home_tablink':\r\n\t\t\tchangeTab(sidebarEl, 'main', 'home_tab')\r\n\t\t\tbreak\r\n\t\tcase 'main_charts_tablink':\r\n\t\t\tchangeTab(sidebarEl, 'main', 'charts_tab')\r\n\t\t\tbreak\r\n\t\tcase 'main_favorites_tablink':\r\n\t\t\tchangeTab(sidebarEl, 'main', 'favorites_tab')\r\n\t\t\tbreak\r\n\t\tcase 'main_analyzer_tablink':\r\n\t\t\tchangeTab(sidebarEl, 'main', 'analyzer_tab')\r\n\t\t\tbreak\r\n\t\tcase 'main_settings_tablink':\r\n\t\t\tchangeTab(sidebarEl, 'main', 'settings_tab')\r\n\t\t\tbreak\r\n\t\tcase 'main_about_tablink':\r\n\t\t\tchangeTab(sidebarEl, 'main', 'about_tab')\r\n\t\t\tbreak\r\n\r\n\t\tdefault:\r\n\t\t\tbreak\r\n\t}\r\n}\r\n\r\nfunction handleSearchTabClick(event) {\r\n\tlet targetID = event.target.id\r\n\r\n\tswitch (targetID) {\r\n\t\tcase 'search_all_tab':\r\n\t\t\tchangeTab(event.target, 'search', 'main_search')\r\n\t\t\tbreak\r\n\t\tcase 'search_track_tab':\r\n\t\t\tchangeTab(event.target, 'search', 'track_search')\r\n\t\t\tbreak\r\n\t\tcase 'search_album_tab':\r\n\t\t\tchangeTab(event.target, 'search', 'album_search')\r\n\t\t\tbreak\r\n\t\tcase 'search_artist_tab':\r\n\t\t\tchangeTab(event.target, 'search', 'artist_search')\r\n\t\t\tbreak\r\n\t\tcase 'search_playlist_tab':\r\n\t\t\tchangeTab(event.target, 'search', 'playlist_search')\r\n\t\t\tbreak\r\n\r\n\t\tdefault:\r\n\t\t\tbreak\r\n\t}\r\n}\r\n\r\nfunction handleFavoritesTabClick(event) {\r\n\tlet targetID = event.target.id\r\n\r\n\tswitch (targetID) {\r\n\t\tcase 'favorites_playlist_tab':\r\n\t\t\tchangeTab(event.target, 'favorites', 'playlist_favorites')\r\n\t\t\tbreak\r\n\t\tcase 'favorites_album_tab':\r\n\t\t\tchangeTab(event.target, 'favorites', 'album_favorites')\r\n\t\t\tbreak\r\n\t\tcase 'favorites_artist_tab':\r\n\t\t\tchangeTab(event.target, 'favorites', 'artist_favorites')\r\n\t\t\tbreak\r\n\t\tcase 'favorites_track_tab':\r\n\t\t\tchangeTab(event.target, 'favorites', 'track_favorites')\r\n\t\t\tbreak\r\n\r\n\t\tdefault:\r\n\t\t\tbreak\r\n\t}\r\n}\r\n\r\nfunction changeTab(sidebarEl, section, tabName) {\r\n\twindows_stack = []\r\n\tcurrentStack = {}\r\n\tvar i, tabcontent, tablinks\r\n\ttabcontent = document.getElementsByClassName(section + '_tabcontent')\r\n\tfor (i = 0; i < tabcontent.length; i++) {\r\n\t\ttabcontent[i].style.display = 'none'\r\n\t}\r\n\ttablinks = document.getElementsByClassName(section + '_tablinks')\r\n\tfor (i = 0; i < tablinks.length; i++) {\r\n\t\ttablinks[i].classList.remove('active')\r\n\t}\r\n\tif (tabName == 'settings_tab' && main_selected != 'settings_tab') {\r\n\t\tSettingsTab.settings = { ...SettingsTab.lastSettings }\r\n\t\tSettingsTab.spotifyCredentials = { ...SettingsTab.lastCredentials }\r\n\t\tSettingsTab.spotifyUser = (' ' + SettingsTab.lastUser).slice(1)\r\n\t}\r\n\r\n\tdocument.getElementById(tabName).style.display = 'block'\r\n\r\n\tif ('main' === section) {\r\n\t\tmain_selected = tabName\r\n\t} else if ('search' === section) {\r\n\t\tsearch_selected = tabName\r\n\t}\r\n\r\n\t// Not choosing .currentTarget beacuse the event\r\n\t// is delegated\r\n\tsidebarEl.classList.add('active')\r\n\r\n\t// Check if you need to load more content in the search tab\r\n\tif (\r\n\t\tmain_selected == 'search_tab' &&\r\n\t\t['track_search', 'album_search', 'artist_search', 'playlist_search'].indexOf(search_selected) != -1 &&\r\n\t\tMainSearch.results[search_selected.split('_')[0] + 'Tab'].data.length == 0\r\n\t) {\r\n\t\tMainSearch.search(search_selected.split('_')[0])\r\n\t}\r\n}\r\n\r\nfunction showTab(type, id, back = false) {\r\n\tif (windows_stack.length == 0) {\r\n\t\twindows_stack.push({ tab: main_selected })\r\n\t} else if (!back) {\r\n\t\twindows_stack.push(currentStack)\r\n\t}\r\n\r\n\twindow.tab = type == 'artist' ? 'artist_tab' : 'tracklist_tab'\r\n\r\n\tcurrentStack = { type: type, id: id }\r\n\tlet tabcontent = document.getElementsByClassName('main_tabcontent')\r\n\r\n\tfor (let i = 0; i < tabcontent.length; i++) {\r\n\t\ttabcontent[i].style.display = 'none'\r\n\t}\r\n\tdocument.getElementById(tab).style.display = 'block'\r\n\tTrackPreview.stopStackedTabsPreview()\r\n}\r\n\r\nfunction backTab() {\r\n\tif (windows_stack.length == 1) {\r\n\t\tdocument.getElementById(`main_${main_selected}link`).click()\r\n\t} else {\r\n\t\tlet tabObj = windows_stack.pop()\r\n\t\tif (tabObj.type == 'artist') {\r\n\t\t\tArtistTab.reset()\r\n\t\t} else {\r\n\t\t\tTracklistTab.reset()\r\n\t\t}\r\n\t\tsocket.emit('getTracklist', { type: tabObj.type, id: tabObj.id })\r\n\t\tshowTab(tabObj.type, tabObj.id, true)\r\n\t}\r\n\tTrackPreview.stopStackedTabsPreview()\r\n}\r\n\r\nexport default {\r\n\tlinkListeners,\r\n\tartistView,\r\n\talbumView,\r\n\tplaylistView,\r\n\tanalyzeLink\r\n}\r\n","import MainSearch from './components/main-search.js'\r\nimport Utils from './utils.js'\r\nimport QualityModal from './quality-modal.js'\r\nimport Downloads from './downloads.js'\r\nimport { socket } from './socket.js'\r\nimport Tabs from './tabs.js'\r\n\r\nfunction linkListeners() {\r\n\tdocument.getElementById('content').addEventListener('scroll', Utils.debounce(handleContentScroll, 100))\r\n\tdocument.getElementById('searchbar').addEventListener('keyup', handleSearchBarKeyup)\r\n}\r\n\r\n// Load more content when the search page is at the end\r\nfunction handleContentScroll(event) {\r\n\tlet contentElement = event.target\r\n\r\n\tif (contentElement.scrollTop + contentElement.clientHeight >= contentElement.scrollHeight) {\r\n\t\tif (\r\n\t\t\tmain_selected === 'search_tab' &&\r\n\t\t\t['track_search', 'album_search', 'artist_search', 'playlist_search'].indexOf(search_selected) != -1\r\n\t\t) {\r\n\t\t\tMainSearch.scrolledSearch(search_selected.split('_')[0])\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction handleSearchBarKeyup(e) {\r\n\tif (e.keyCode == 13) {\r\n\t\tlet term = this.value\r\n\t\tif (Utils.isValidURL(term)) {\r\n\t\t\tif (e.ctrlKey) {\r\n\t\t\t\tQualityModal.open(term)\r\n\t\t\t} else {\r\n\t\t\t\tif (window.main_selected == 'analyzer_tab') {\r\n\t\t\t\t\tTabs.analyzeLink(term)\r\n\t\t\t\t} else {\r\n\t\t\t\t\tDownloads.sendAddToQueue(term)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (term != MainSearch.query || main_selected == 'search_tab') {\r\n\t\t\t\tdocument.getElementById('search_tab_content').style.display = 'none'\r\n\t\t\t\tsocket.emit('mainSearch', { term: term })\r\n\t\t\t} else {\r\n\t\t\t\tdocument.getElementById('search_all_tab').click()\r\n\t\t\t\tdocument.getElementById('search_tab_content').style.display = 'block'\r\n\t\t\t\tdocument.getElementById('main_search_tablink').click()\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nexport default {\r\n\tlinkListeners\r\n}\r\n","import { socket } from './modules/socket.js'\r\nimport { toast } from './modules/toasts.js'\r\nimport Downloads from './modules/downloads.js'\r\nimport QualityModal from './modules/quality-modal.js'\r\nimport Tabs from './modules/tabs.js'\r\nimport Search from './modules/search.js'\r\nimport TrackPreview from './modules/track-preview.js'\r\n\r\n/* ===== Socketio listeners ===== */\r\n\r\n// Debug messages for socketio\r\nsocket.on('message', function (msg) {\r\n\tconsole.log(msg)\r\n})\r\n\r\nsocket.on('logging_in', function () {\r\n\ttoast('Logging in', 'loading', false, 'login-toast')\r\n})\r\n\r\nsocket.on('logged_in', function (data) {\r\n\tswitch (data.status) {\r\n\t\tcase 1:\r\n\t\tcase 3:\r\n\t\t\ttoast('Logged in', 'done', true, 'login-toast')\r\n\t\t\tif (data.arl) {\r\n\t\t\t\tlocalStorage.setItem('arl', data.arl)\r\n\t\t\t\t$('#login_input_arl').val(data.arl)\r\n\t\t\t}\r\n\t\t\t$('#open_login_prompt').hide()\r\n\t\t\tif (data.user) {\r\n\t\t\t\t$('#settings_username').text(data.user.name)\r\n\t\t\t\t$('#settings_picture').attr(\r\n\t\t\t\t\t'src',\r\n\t\t\t\t\t`https://e-cdns-images.dzcdn.net/images/user/${data.user.picture}/125x125-000000-80-0-0.jpg`\r\n\t\t\t\t)\r\n\t\t\t\t// $('#logged_in_info').show()\r\n\t\t\t\tdocument.getElementById('logged_in_info').classList.remove('hide')\r\n\t\t\t}\r\n\t\t\tbreak\r\n\t\tcase 2:\r\n\t\t\ttoast('Already logged in', 'done', true, 'login-toast')\r\n\t\t\tif (data.user) {\r\n\t\t\t\t$('#settings_username').text(data.user.name)\r\n\t\t\t\t$('#settings_picture').attr(\r\n\t\t\t\t\t'src',\r\n\t\t\t\t\t`https://e-cdns-images.dzcdn.net/images/user/${data.user.picture}/125x125-000000-80-0-0.jpg`\r\n\t\t\t\t)\r\n\t\t\t\t// $('#logged_in_info').show()\r\n\t\t\t\tdocument.getElementById('logged_in_info').classList.remove('hide')\r\n\t\t\t}\r\n\t\t\tbreak\r\n\t\tcase 0:\r\n\t\t\ttoast(\"Couldn't log in\", 'close', true, 'login-toast')\r\n\t\t\tlocalStorage.removeItem('arl')\r\n\t\t\t$('#login_input_arl').val('')\r\n\t\t\t$('#open_login_prompt').show()\r\n\t\t\tdocument.getElementById('logged_in_info').classList.add('hide')\r\n\t\t\t// $('#logged_in_info').hide()\r\n\t\t\t$('#settings_username').text('Not Logged')\r\n\t\t\t$('#settings_picture').attr('src', `https://e-cdns-images.dzcdn.net/images/user/125x125-000000-80-0-0.jpg`)\r\n\t\t\tbreak\r\n\t}\r\n})\r\n\r\nsocket.on('logged_out', function () {\r\n\ttoast('Logged out', 'done', true, 'login-toast')\r\n\tlocalStorage.removeItem('arl')\r\n\t$('#login_input_arl').val('')\r\n\t$('#open_login_prompt').show()\r\n\tdocument.getElementById('logged_in_info').classList.add('hide')\r\n\t// $('#logged_in_info').hide()\r\n\t$('#settings_username').text('Not Logged')\r\n\t$('#settings_picture').attr('src', `https://e-cdns-images.dzcdn.net/images/user/125x125-000000-80-0-0.jpg`)\r\n})\r\n\r\n/* ===== App initialization ===== */\r\nfunction startApp() {\r\n\tDownloads.init()\r\n\tQualityModal.init()\r\n\tTabs.linkListeners()\r\n\tSearch.linkListeners()\r\n\tTrackPreview.init()\r\n\r\n\tdocument.getElementById('logged_in_info').classList.add('hide')\r\n\r\n\tif (localStorage.getItem('arl')) {\r\n\t\tlet arl = localStorage.getItem('arl')\r\n\r\n\t\tsocket.emit('login', arl)\r\n\t\t$('#login_input_arl').val(arl)\r\n\t}\r\n\tif ('true' === localStorage.getItem('slimDownloads')) {\r\n\t\tdocument.getElementById('download_list').classList.add('slim')\r\n\t}\r\n\tlet spotifyUser = localStorage.getItem('spotifyUser')\r\n\tif (spotifyUser != '') {\r\n\t\tsocket.emit('update_userSpotifyPlaylists', spotifyUser)\r\n\t}\r\n\t// Open default tab\r\n\tdocument.getElementById('main_home_tablink').click()\r\n}\r\n\r\ndocument.addEventListener('DOMContentLoaded', startApp)\r\n"],"names":["init","linkListeners","QualityModal"],"mappings":"AAAO,MAAM,MAAM,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAC;AACtD;AACA,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM;AAC3B,CAAC,QAA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AAM,CAAC,IAAI,CAAC,6BAA6B,EAAE,WAAW,EAAC;AACzD,EAAE;AACF;AACA,CAAC,QAAQ,CAAC,cAAc,CAAC,mBAAmB,CAAC,CAAC,KAAK,GAAE;AACrD,CAAC;AACD;AACA,QAAQ,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,QAAQ,CAAC"} \ No newline at end of file diff --git a/rollup.config.js b/rollup.config.js new file mode 100644 index 0000000..87da750 --- /dev/null +++ b/rollup.config.js @@ -0,0 +1,23 @@ +import resolve from '@rollup/plugin-node-resolve' +import commonjs from '@rollup/plugin-commonjs' +import { terser } from 'rollup-plugin-terser' + +// `npm run watch:js` -> `production` is false +// `npm run build:js` -> `production` is true +const production = !process.env.ROLLUP_WATCH + +export default { + input: 'src/js/app.js', + output: [ + { + file: 'public/js/bundle.js', + format: 'module', + sourcemap: true + } + ], + plugins: [ + resolve(), // Tells Rollup how to find imported modules in node_modules + commonjs(), // Converts imported modules to ES modules, if necessary + production && terser() // Minify, but only in production + ] +} diff --git a/public/js/app.js b/src/js/app.js similarity index 100% rename from public/js/app.js rename to src/js/app.js diff --git a/public/js/modules/components/artist-tab.js b/src/js/modules/components/artist-tab.js similarity index 100% rename from public/js/modules/components/artist-tab.js rename to src/js/modules/components/artist-tab.js diff --git a/public/js/modules/components/charts-tab.js b/src/js/modules/components/charts-tab.js similarity index 100% rename from public/js/modules/components/charts-tab.js rename to src/js/modules/components/charts-tab.js diff --git a/public/js/modules/components/favorites-tab.js b/src/js/modules/components/favorites-tab.js similarity index 100% rename from public/js/modules/components/favorites-tab.js rename to src/js/modules/components/favorites-tab.js diff --git a/public/js/modules/components/home-tab.js b/src/js/modules/components/home-tab.js similarity index 100% rename from public/js/modules/components/home-tab.js rename to src/js/modules/components/home-tab.js diff --git a/public/js/modules/components/link-analyzer-tab.js b/src/js/modules/components/link-analyzer-tab.js similarity index 100% rename from public/js/modules/components/link-analyzer-tab.js rename to src/js/modules/components/link-analyzer-tab.js diff --git a/public/js/modules/components/main-search.js b/src/js/modules/components/main-search.js similarity index 100% rename from public/js/modules/components/main-search.js rename to src/js/modules/components/main-search.js diff --git a/public/js/modules/components/settings-tab.js b/src/js/modules/components/settings-tab.js similarity index 100% rename from public/js/modules/components/settings-tab.js rename to src/js/modules/components/settings-tab.js diff --git a/public/js/modules/components/tracklist-tab.js b/src/js/modules/components/tracklist-tab.js similarity index 100% rename from public/js/modules/components/tracklist-tab.js rename to src/js/modules/components/tracklist-tab.js diff --git a/public/js/modules/downloads.js b/src/js/modules/downloads.js similarity index 100% rename from public/js/modules/downloads.js rename to src/js/modules/downloads.js diff --git a/public/js/modules/quality-modal.js b/src/js/modules/quality-modal.js similarity index 100% rename from public/js/modules/quality-modal.js rename to src/js/modules/quality-modal.js diff --git a/public/js/modules/search.js b/src/js/modules/search.js similarity index 100% rename from public/js/modules/search.js rename to src/js/modules/search.js diff --git a/public/js/modules/socket.js b/src/js/modules/socket.js similarity index 100% rename from public/js/modules/socket.js rename to src/js/modules/socket.js diff --git a/public/js/modules/tabs.js b/src/js/modules/tabs.js similarity index 100% rename from public/js/modules/tabs.js rename to src/js/modules/tabs.js diff --git a/public/js/modules/toasts.js b/src/js/modules/toasts.js similarity index 100% rename from public/js/modules/toasts.js rename to src/js/modules/toasts.js diff --git a/public/js/modules/track-preview.js b/src/js/modules/track-preview.js similarity index 100% rename from public/js/modules/track-preview.js rename to src/js/modules/track-preview.js diff --git a/public/js/modules/utils.js b/src/js/modules/utils.js similarity index 100% rename from public/js/modules/utils.js rename to src/js/modules/utils.js