@exezt-/webamp 1.5.0-0x718 → 1.5.0-0x719
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/built/webamp.bundle.js +428 -429
- package/built/webamp.bundle.min.js +5 -5
- package/built/webamp.lazy-bundle.js +186 -187
- package/built/webamp.lazy-bundle.min.js +3 -3
- package/package.json +1 -1
package/built/webamp.bundle.js
CHANGED
|
@@ -1759,7 +1759,7 @@ formatters.j = function (v) {
|
|
|
1759
1759
|
}
|
|
1760
1760
|
};
|
|
1761
1761
|
|
|
1762
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(
|
|
1762
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(32)))
|
|
1763
1763
|
|
|
1764
1764
|
/***/ }),
|
|
1765
1765
|
/* 11 */
|
|
@@ -4056,7 +4056,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4056
4056
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineReducers", function() { return combineReducers; });
|
|
4057
4057
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compose", function() { return compose; });
|
|
4058
4058
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createStore", function() { return createStore; });
|
|
4059
|
-
/* harmony import */ var symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
4059
|
+
/* harmony import */ var symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30);
|
|
4060
4060
|
|
|
4061
4061
|
|
|
4062
4062
|
/**
|
|
@@ -6787,430 +6787,143 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) {
|
|
|
6787
6787
|
|
|
6788
6788
|
/***/ }),
|
|
6789
6789
|
/* 26 */
|
|
6790
|
-
/***/ (function(module,
|
|
6790
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
6791
6791
|
|
|
6792
6792
|
"use strict";
|
|
6793
|
-
|
|
6794
|
-
|
|
6795
|
-
|
|
6796
|
-
|
|
6793
|
+
// Copyright Joyent, Inc. and other Node contributors.
|
|
6794
|
+
//
|
|
6795
|
+
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
6796
|
+
// copy of this software and associated documentation files (the
|
|
6797
|
+
// "Software"), to deal in the Software without restriction, including
|
|
6798
|
+
// without limitation the rights to use, copy, modify, merge, publish,
|
|
6799
|
+
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
6800
|
+
// persons to whom the Software is furnished to do so, subject to the
|
|
6801
|
+
// following conditions:
|
|
6802
|
+
//
|
|
6803
|
+
// The above copyright notice and this permission notice shall be included
|
|
6804
|
+
// in all copies or substantial portions of the Software.
|
|
6805
|
+
//
|
|
6806
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
6807
|
+
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
6808
|
+
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
6809
|
+
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
6810
|
+
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
6811
|
+
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
6812
|
+
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
6797
6813
|
|
|
6814
|
+
// a duplex stream is just a stream that is both readable and writable.
|
|
6815
|
+
// Since JS doesn't have multiple prototypal inheritance, this class
|
|
6816
|
+
// prototypally inherits from Readable, and then parasitically from
|
|
6817
|
+
// Writable.
|
|
6798
6818
|
|
|
6799
|
-
class WinampTelegramCustomHandler {
|
|
6800
|
-
constructor(emit, options) {
|
|
6801
|
-
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "webamp", void 0);
|
|
6802
6819
|
|
|
6803
|
-
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "maxFileSize", 0x1400000);
|
|
6804
6820
|
|
|
6805
|
-
|
|
6821
|
+
/*<replacement>*/
|
|
6806
6822
|
|
|
6807
|
-
|
|
6823
|
+
var pna = __webpack_require__(47);
|
|
6824
|
+
/*</replacement>*/
|
|
6808
6825
|
|
|
6809
|
-
|
|
6810
|
-
|
|
6826
|
+
/*<replacement>*/
|
|
6827
|
+
var objectKeys = Object.keys || function (obj) {
|
|
6828
|
+
var keys = [];
|
|
6829
|
+
for (var key in obj) {
|
|
6830
|
+
keys.push(key);
|
|
6831
|
+
}return keys;
|
|
6832
|
+
};
|
|
6833
|
+
/*</replacement>*/
|
|
6811
6834
|
|
|
6812
|
-
|
|
6813
|
-
});
|
|
6835
|
+
module.exports = Duplex;
|
|
6814
6836
|
|
|
6815
|
-
|
|
6816
|
-
|
|
6817
|
-
|
|
6837
|
+
/*<replacement>*/
|
|
6838
|
+
var util = Object.create(__webpack_require__(37));
|
|
6839
|
+
util.inherits = __webpack_require__(33);
|
|
6840
|
+
/*</replacement>*/
|
|
6818
6841
|
|
|
6819
|
-
|
|
6820
|
-
|
|
6821
|
-
method: "GET",
|
|
6822
|
-
headers: {
|
|
6823
|
-
Accept: "application/json",
|
|
6824
|
-
"Content-Type": "application/json"
|
|
6825
|
-
}
|
|
6826
|
-
}).then(async response => {
|
|
6827
|
-
if (response.status === 200) {
|
|
6828
|
-
return response.text();
|
|
6829
|
-
} else {
|
|
6830
|
-
return null;
|
|
6831
|
-
}
|
|
6832
|
-
}).then(async response => {
|
|
6833
|
-
if (response !== null) {
|
|
6834
|
-
var _JSON$parse;
|
|
6842
|
+
var Readable = __webpack_require__(110);
|
|
6843
|
+
var Writable = __webpack_require__(56);
|
|
6835
6844
|
|
|
6836
|
-
|
|
6837
|
-
let i = 0;
|
|
6838
|
-
this.saveLastPlaylist(playlistLink);
|
|
6845
|
+
util.inherits(Duplex, Readable);
|
|
6839
6846
|
|
|
6840
|
-
|
|
6841
|
-
|
|
6842
|
-
|
|
6843
|
-
|
|
6844
|
-
|
|
6845
|
-
|
|
6846
|
-
|
|
6847
|
-
|
|
6848
|
-
defaultName: item.name,
|
|
6849
|
-
url: `${item.file}&public_key=${item.public_key}`
|
|
6850
|
-
}]);
|
|
6851
|
-
}
|
|
6847
|
+
{
|
|
6848
|
+
// avoid scope creep, the keys array can then be collected
|
|
6849
|
+
var keys = objectKeys(Writable.prototype);
|
|
6850
|
+
for (var v = 0; v < keys.length; v++) {
|
|
6851
|
+
var method = keys[v];
|
|
6852
|
+
if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
|
|
6853
|
+
}
|
|
6854
|
+
}
|
|
6852
6855
|
|
|
6853
|
-
|
|
6854
|
-
|
|
6855
|
-
}
|
|
6856
|
-
});
|
|
6857
|
-
});
|
|
6856
|
+
function Duplex(options) {
|
|
6857
|
+
if (!(this instanceof Duplex)) return new Duplex(options);
|
|
6858
6858
|
|
|
6859
|
-
|
|
6860
|
-
|
|
6861
|
-
await fetch(track.url, {
|
|
6862
|
-
method: "GET"
|
|
6863
|
-
}).then(response => response).then(resp => fetch(resp.url)).then(async response => {
|
|
6864
|
-
if (response.status === 302) {
|
|
6865
|
-
return await fetch(`${response.headers.get("Location")}&public_key=${public_key}`);
|
|
6866
|
-
} else {
|
|
6867
|
-
return response;
|
|
6868
|
-
}
|
|
6869
|
-
}).then(res => {
|
|
6870
|
-
var _res$body;
|
|
6859
|
+
Readable.call(this, options);
|
|
6860
|
+
Writable.call(this, options);
|
|
6871
6861
|
|
|
6872
|
-
|
|
6873
|
-
const read = (_res$body = res.body) === null || _res$body === void 0 ? void 0 : _res$body.getReader();
|
|
6874
|
-
return new ReadableStream({
|
|
6875
|
-
start(controller) {
|
|
6876
|
-
// @ts-ignore
|
|
6877
|
-
function pump() {
|
|
6878
|
-
// @ts-ignore
|
|
6879
|
-
return read === null || read === void 0 ? void 0 : read.read().then(({
|
|
6880
|
-
done,
|
|
6881
|
-
value
|
|
6882
|
-
}) => {
|
|
6883
|
-
if (done) {
|
|
6884
|
-
controller.close();
|
|
6885
|
-
return;
|
|
6886
|
-
}
|
|
6862
|
+
if (options && options.readable === false) this.readable = false;
|
|
6887
6863
|
|
|
6888
|
-
|
|
6889
|
-
return pump();
|
|
6890
|
-
});
|
|
6891
|
-
}
|
|
6864
|
+
if (options && options.writable === false) this.writable = false;
|
|
6892
6865
|
|
|
6893
|
-
|
|
6894
|
-
|
|
6866
|
+
this.allowHalfOpen = true;
|
|
6867
|
+
if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
|
|
6895
6868
|
|
|
6896
|
-
|
|
6897
|
-
|
|
6898
|
-
let tracks = this.getAllTracks();
|
|
6899
|
-
this.replaceTrack(track, tracks);
|
|
6900
|
-
}).catch(err => err);
|
|
6901
|
-
});
|
|
6869
|
+
this.once('end', onend);
|
|
6870
|
+
}
|
|
6902
6871
|
|
|
6903
|
-
|
|
6904
|
-
|
|
6905
|
-
|
|
6906
|
-
|
|
6872
|
+
Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
|
|
6873
|
+
// making it explicit this property is not enumerable
|
|
6874
|
+
// because otherwise some prototype manipulation in
|
|
6875
|
+
// userland will fail
|
|
6876
|
+
enumerable: false,
|
|
6877
|
+
get: function () {
|
|
6878
|
+
return this._writableState.highWaterMark;
|
|
6879
|
+
}
|
|
6880
|
+
});
|
|
6907
6881
|
|
|
6908
|
-
|
|
6909
|
-
|
|
6910
|
-
|
|
6882
|
+
// the no-half-open enforcer
|
|
6883
|
+
function onend() {
|
|
6884
|
+
// if we allow half-open state, or if the writable side ended,
|
|
6885
|
+
// then we're ok.
|
|
6886
|
+
if (this.allowHalfOpen || this._writableState.ended) return;
|
|
6911
6887
|
|
|
6912
|
-
|
|
6913
|
-
|
|
6914
|
-
|
|
6915
|
-
|
|
6916
|
-
a.push(track);
|
|
6917
|
-
} else {
|
|
6918
|
-
a.push(value);
|
|
6919
|
-
}
|
|
6920
|
-
});
|
|
6921
|
-
this.webamp.setTracksToPlay(a);
|
|
6922
|
-
});
|
|
6888
|
+
// no more data can be written.
|
|
6889
|
+
// But allow more writes to happen in this tick.
|
|
6890
|
+
pna.nextTick(onEndNT, this);
|
|
6891
|
+
}
|
|
6923
6892
|
|
|
6924
|
-
|
|
6925
|
-
|
|
6926
|
-
|
|
6893
|
+
function onEndNT(self) {
|
|
6894
|
+
self.end();
|
|
6895
|
+
}
|
|
6927
6896
|
|
|
6928
|
-
|
|
6929
|
-
|
|
6930
|
-
|
|
6897
|
+
Object.defineProperty(Duplex.prototype, 'destroyed', {
|
|
6898
|
+
get: function () {
|
|
6899
|
+
if (this._readableState === undefined || this._writableState === undefined) {
|
|
6900
|
+
return false;
|
|
6901
|
+
}
|
|
6902
|
+
return this._readableState.destroyed && this._writableState.destroyed;
|
|
6903
|
+
},
|
|
6904
|
+
set: function (value) {
|
|
6905
|
+
// we ignore the value if the stream
|
|
6906
|
+
// has not been initialized yet
|
|
6907
|
+
if (this._readableState === undefined || this._writableState === undefined) {
|
|
6908
|
+
return;
|
|
6909
|
+
}
|
|
6931
6910
|
|
|
6932
|
-
|
|
6933
|
-
|
|
6934
|
-
|
|
6935
|
-
|
|
6911
|
+
// backward compatibility, the user is explicitly
|
|
6912
|
+
// managing destroyed
|
|
6913
|
+
this._readableState.destroyed = value;
|
|
6914
|
+
this._writableState.destroyed = value;
|
|
6915
|
+
}
|
|
6916
|
+
});
|
|
6936
6917
|
|
|
6937
|
-
|
|
6938
|
-
|
|
6939
|
-
|
|
6940
|
-
|
|
6941
|
-
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "loadOptions2", opts => {
|
|
6942
|
-
let i = 0;
|
|
6943
|
-
let vol = opts.media.volume;
|
|
6944
|
-
let balance = opts.media.balance;
|
|
6945
|
-
let eq1 = opts.equalizer.sliders.preamp;
|
|
6946
|
-
let eq2 = opts.equalizer.sliders["60"];
|
|
6947
|
-
let eq3 = opts.equalizer.sliders["170"];
|
|
6948
|
-
let eq4 = opts.equalizer.sliders["310"];
|
|
6949
|
-
let eq5 = opts.equalizer.sliders["600"];
|
|
6950
|
-
let eq6 = opts.equalizer.sliders["1000"];
|
|
6951
|
-
let eq7 = opts.equalizer.sliders["3000"];
|
|
6952
|
-
let eq8 = opts.equalizer.sliders["6000"];
|
|
6953
|
-
let eq9 = opts.equalizer.sliders["12000"];
|
|
6954
|
-
let eq10 = opts.equalizer.sliders["14000"];
|
|
6955
|
-
let eq11 = opts.equalizer.sliders["16000"];
|
|
6956
|
-
let equal = [eq1, eq2, eq3, eq4, eq5, eq6, eq7, eq8, eq9, eq10, eq11];
|
|
6957
|
-
let bands = [60, 170, 310, 600, 1000, 3000, 6000, 12000, 14000, 16000];
|
|
6958
|
-
this.webamp.store.dispatch({
|
|
6959
|
-
type: "SET_VOLUME",
|
|
6960
|
-
volume: Object(_utils__WEBPACK_IMPORTED_MODULE_1__[/* clamp */ "d"])(vol, 0, 100)
|
|
6961
|
-
});
|
|
6962
|
-
this.webamp.store.dispatch({
|
|
6963
|
-
type: "SET_BALANCE",
|
|
6964
|
-
balance: balance
|
|
6965
|
-
});
|
|
6966
|
-
this.webamp.store.dispatch({
|
|
6967
|
-
type: "SET_BAND_VALUE",
|
|
6968
|
-
band: "preamp",
|
|
6969
|
-
value: opts.equalizer.sliders.preamp
|
|
6970
|
-
});
|
|
6971
|
-
|
|
6972
|
-
for (const band of bands) {
|
|
6973
|
-
this.webamp.store.dispatch({
|
|
6974
|
-
type: "SET_BAND_VALUE",
|
|
6975
|
-
band: band,
|
|
6976
|
-
value: equal[i]
|
|
6977
|
-
});
|
|
6978
|
-
i++;
|
|
6979
|
-
}
|
|
6980
|
-
|
|
6981
|
-
if (window.__webamp.store.getState().media.shuffle !== opts.media.shuffle) {
|
|
6982
|
-
this.webamp.store.dispatch({
|
|
6983
|
-
type: "TOGGLE_SHUFFLE"
|
|
6984
|
-
});
|
|
6985
|
-
}
|
|
6986
|
-
|
|
6987
|
-
if (window.__webamp.store.getState().media.repeat !== opts.media.repeat) {
|
|
6988
|
-
this.webamp.store.dispatch({
|
|
6989
|
-
type: "TOGGLE_REPEAT"
|
|
6990
|
-
});
|
|
6991
|
-
}
|
|
6992
|
-
});
|
|
6993
|
-
|
|
6994
|
-
this.options = options;
|
|
6995
|
-
setTimeout(() => {
|
|
6996
|
-
if (!window.__webamp) {
|
|
6997
|
-
throw new Error("Webamp __webamp is undefined!!");
|
|
6998
|
-
} else {
|
|
6999
|
-
this.webamp = window.__webamp;
|
|
7000
|
-
}
|
|
7001
|
-
|
|
7002
|
-
if (typeof localStorage.getItem('app-state') !== "undefined") {
|
|
7003
|
-
this.loadOptions(JSON.parse(localStorage.getItem('app-state')));
|
|
7004
|
-
} // emit
|
|
7005
|
-
|
|
7006
|
-
|
|
7007
|
-
if (emit !== false) {
|
|
7008
|
-
var _window, _window$Telegram;
|
|
7009
|
-
|
|
7010
|
-
const lastList = this.getCookie('lastlist');
|
|
7011
|
-
|
|
7012
|
-
if (typeof lastList !== "undefined") {
|
|
7013
|
-
this.getTrackListFromYandexDisk(lastList);
|
|
7014
|
-
} // @ts-ignore | because no global var telegram avail in project types
|
|
7015
|
-
|
|
7016
|
-
|
|
7017
|
-
if (!((_window = window) !== null && _window !== void 0 && (_window$Telegram = _window.Telegram) !== null && _window$Telegram !== void 0 && _window$Telegram.WebApp)) {
|
|
7018
|
-
console.error("Telegram is undefined!! Skipping Telegram.WebApp event handler...");
|
|
7019
|
-
} else {
|
|
7020
|
-
var _window2, _window2$Telegram;
|
|
7021
|
-
|
|
7022
|
-
// @ts-ignore | because no global var telegram avail in project types
|
|
7023
|
-
this.telegram = (_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$Telegram = _window2.Telegram) === null || _window2$Telegram === void 0 ? void 0 : _window2$Telegram.WebApp;
|
|
7024
|
-
this.initializeTelegramWebAppEvents();
|
|
7025
|
-
}
|
|
7026
|
-
|
|
7027
|
-
this.initializeApplicationHandlers();
|
|
7028
|
-
}
|
|
7029
|
-
}, 1000);
|
|
7030
|
-
}
|
|
7031
|
-
|
|
7032
|
-
initializeTelegramWebAppEvents() {
|
|
7033
|
-
this.telegram.offEvent("deactivated", () => {
|
|
7034
|
-
this.updateAppState();
|
|
7035
|
-
});
|
|
7036
|
-
}
|
|
7037
|
-
|
|
7038
|
-
initializeApplicationHandlers() {
|
|
7039
|
-
const window_handlers = ['unload', 'beforeunload', 'pagehide'];
|
|
7040
|
-
window_handlers.forEach(handler => {
|
|
7041
|
-
window.addEventListener(handler, () => {
|
|
7042
|
-
this.updateAppState();
|
|
7043
|
-
});
|
|
7044
|
-
});
|
|
7045
|
-
this.webamp.onTrackDidChange(() => {
|
|
7046
|
-
console.log(this.webamp.store.getState());
|
|
7047
|
-
this.updateAppState();
|
|
7048
|
-
});
|
|
7049
|
-
this.webamp.onWillClose(() => {
|
|
7050
|
-
this.updateAppState();
|
|
7051
|
-
});
|
|
7052
|
-
this.webamp.onClose(() => {
|
|
7053
|
-
this.updateAppState();
|
|
7054
|
-
});
|
|
7055
|
-
this.webamp.onMinimize(() => {
|
|
7056
|
-
this.updateAppState();
|
|
7057
|
-
});
|
|
7058
|
-
this.webamp.store.dispatch({
|
|
7059
|
-
type: "ENABLE_MILKDROP",
|
|
7060
|
-
open: false
|
|
7061
|
-
});
|
|
7062
|
-
const ev = ['ended', 'playing', 'timeupdate', 'fileLoaded', 'waiting', 'stopWaiting'];
|
|
7063
|
-
|
|
7064
|
-
this.webamp.__onStateChange(() => {
|
|
7065
|
-
this.updateAppState();
|
|
7066
|
-
});
|
|
7067
|
-
|
|
7068
|
-
ev.forEach(ev => this.webamp.media.on(ev, () => {
|
|
7069
|
-
this.updateAppState();
|
|
7070
|
-
}));
|
|
7071
|
-
}
|
|
7072
|
-
|
|
7073
|
-
}
|
|
7074
|
-
|
|
7075
|
-
/***/ }),
|
|
7076
|
-
/* 27 */
|
|
7077
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
7078
|
-
|
|
7079
|
-
"use strict";
|
|
7080
|
-
// Copyright Joyent, Inc. and other Node contributors.
|
|
7081
|
-
//
|
|
7082
|
-
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
7083
|
-
// copy of this software and associated documentation files (the
|
|
7084
|
-
// "Software"), to deal in the Software without restriction, including
|
|
7085
|
-
// without limitation the rights to use, copy, modify, merge, publish,
|
|
7086
|
-
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
7087
|
-
// persons to whom the Software is furnished to do so, subject to the
|
|
7088
|
-
// following conditions:
|
|
7089
|
-
//
|
|
7090
|
-
// The above copyright notice and this permission notice shall be included
|
|
7091
|
-
// in all copies or substantial portions of the Software.
|
|
7092
|
-
//
|
|
7093
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
7094
|
-
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
7095
|
-
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
7096
|
-
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
7097
|
-
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
7098
|
-
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
7099
|
-
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
7100
|
-
|
|
7101
|
-
// a duplex stream is just a stream that is both readable and writable.
|
|
7102
|
-
// Since JS doesn't have multiple prototypal inheritance, this class
|
|
7103
|
-
// prototypally inherits from Readable, and then parasitically from
|
|
7104
|
-
// Writable.
|
|
7105
|
-
|
|
7106
|
-
|
|
7107
|
-
|
|
7108
|
-
/*<replacement>*/
|
|
7109
|
-
|
|
7110
|
-
var pna = __webpack_require__(47);
|
|
7111
|
-
/*</replacement>*/
|
|
7112
|
-
|
|
7113
|
-
/*<replacement>*/
|
|
7114
|
-
var objectKeys = Object.keys || function (obj) {
|
|
7115
|
-
var keys = [];
|
|
7116
|
-
for (var key in obj) {
|
|
7117
|
-
keys.push(key);
|
|
7118
|
-
}return keys;
|
|
7119
|
-
};
|
|
7120
|
-
/*</replacement>*/
|
|
7121
|
-
|
|
7122
|
-
module.exports = Duplex;
|
|
7123
|
-
|
|
7124
|
-
/*<replacement>*/
|
|
7125
|
-
var util = Object.create(__webpack_require__(37));
|
|
7126
|
-
util.inherits = __webpack_require__(34);
|
|
7127
|
-
/*</replacement>*/
|
|
7128
|
-
|
|
7129
|
-
var Readable = __webpack_require__(110);
|
|
7130
|
-
var Writable = __webpack_require__(56);
|
|
7131
|
-
|
|
7132
|
-
util.inherits(Duplex, Readable);
|
|
7133
|
-
|
|
7134
|
-
{
|
|
7135
|
-
// avoid scope creep, the keys array can then be collected
|
|
7136
|
-
var keys = objectKeys(Writable.prototype);
|
|
7137
|
-
for (var v = 0; v < keys.length; v++) {
|
|
7138
|
-
var method = keys[v];
|
|
7139
|
-
if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
|
|
7140
|
-
}
|
|
7141
|
-
}
|
|
7142
|
-
|
|
7143
|
-
function Duplex(options) {
|
|
7144
|
-
if (!(this instanceof Duplex)) return new Duplex(options);
|
|
7145
|
-
|
|
7146
|
-
Readable.call(this, options);
|
|
7147
|
-
Writable.call(this, options);
|
|
7148
|
-
|
|
7149
|
-
if (options && options.readable === false) this.readable = false;
|
|
7150
|
-
|
|
7151
|
-
if (options && options.writable === false) this.writable = false;
|
|
7152
|
-
|
|
7153
|
-
this.allowHalfOpen = true;
|
|
7154
|
-
if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
|
|
7155
|
-
|
|
7156
|
-
this.once('end', onend);
|
|
7157
|
-
}
|
|
7158
|
-
|
|
7159
|
-
Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
|
|
7160
|
-
// making it explicit this property is not enumerable
|
|
7161
|
-
// because otherwise some prototype manipulation in
|
|
7162
|
-
// userland will fail
|
|
7163
|
-
enumerable: false,
|
|
7164
|
-
get: function () {
|
|
7165
|
-
return this._writableState.highWaterMark;
|
|
7166
|
-
}
|
|
7167
|
-
});
|
|
7168
|
-
|
|
7169
|
-
// the no-half-open enforcer
|
|
7170
|
-
function onend() {
|
|
7171
|
-
// if we allow half-open state, or if the writable side ended,
|
|
7172
|
-
// then we're ok.
|
|
7173
|
-
if (this.allowHalfOpen || this._writableState.ended) return;
|
|
7174
|
-
|
|
7175
|
-
// no more data can be written.
|
|
7176
|
-
// But allow more writes to happen in this tick.
|
|
7177
|
-
pna.nextTick(onEndNT, this);
|
|
7178
|
-
}
|
|
7179
|
-
|
|
7180
|
-
function onEndNT(self) {
|
|
7181
|
-
self.end();
|
|
7182
|
-
}
|
|
7183
|
-
|
|
7184
|
-
Object.defineProperty(Duplex.prototype, 'destroyed', {
|
|
7185
|
-
get: function () {
|
|
7186
|
-
if (this._readableState === undefined || this._writableState === undefined) {
|
|
7187
|
-
return false;
|
|
7188
|
-
}
|
|
7189
|
-
return this._readableState.destroyed && this._writableState.destroyed;
|
|
7190
|
-
},
|
|
7191
|
-
set: function (value) {
|
|
7192
|
-
// we ignore the value if the stream
|
|
7193
|
-
// has not been initialized yet
|
|
7194
|
-
if (this._readableState === undefined || this._writableState === undefined) {
|
|
7195
|
-
return;
|
|
7196
|
-
}
|
|
7197
|
-
|
|
7198
|
-
// backward compatibility, the user is explicitly
|
|
7199
|
-
// managing destroyed
|
|
7200
|
-
this._readableState.destroyed = value;
|
|
7201
|
-
this._writableState.destroyed = value;
|
|
7202
|
-
}
|
|
7203
|
-
});
|
|
7204
|
-
|
|
7205
|
-
Duplex.prototype._destroy = function (err, cb) {
|
|
7206
|
-
this.push(null);
|
|
7207
|
-
this.end();
|
|
6918
|
+
Duplex.prototype._destroy = function (err, cb) {
|
|
6919
|
+
this.push(null);
|
|
6920
|
+
this.end();
|
|
7208
6921
|
|
|
7209
6922
|
pna.nextTick(cb, err);
|
|
7210
6923
|
};
|
|
7211
6924
|
|
|
7212
6925
|
/***/ }),
|
|
7213
|
-
/*
|
|
6926
|
+
/* 27 */
|
|
7214
6927
|
/***/ (function(module, exports, __webpack_require__) {
|
|
7215
6928
|
|
|
7216
6929
|
var root = __webpack_require__(82);
|
|
@@ -7222,7 +6935,7 @@ module.exports = Symbol;
|
|
|
7222
6935
|
|
|
7223
6936
|
|
|
7224
6937
|
/***/ }),
|
|
7225
|
-
/*
|
|
6938
|
+
/* 28 */
|
|
7226
6939
|
/***/ (function(module, exports, __webpack_require__) {
|
|
7227
6940
|
|
|
7228
6941
|
"use strict";
|
|
@@ -7234,13 +6947,13 @@ if (true) {
|
|
|
7234
6947
|
|
|
7235
6948
|
|
|
7236
6949
|
/***/ }),
|
|
7237
|
-
/*
|
|
6950
|
+
/* 29 */
|
|
7238
6951
|
/***/ (function(module, exports, __webpack_require__) {
|
|
7239
6952
|
|
|
7240
6953
|
"use strict";
|
|
7241
6954
|
|
|
7242
6955
|
|
|
7243
|
-
var reactIs = __webpack_require__(
|
|
6956
|
+
var reactIs = __webpack_require__(28);
|
|
7244
6957
|
|
|
7245
6958
|
/**
|
|
7246
6959
|
* Copyright 2015, Yahoo! Inc.
|
|
@@ -7344,7 +7057,7 @@ module.exports = hoistNonReactStatics;
|
|
|
7344
7057
|
|
|
7345
7058
|
|
|
7346
7059
|
/***/ }),
|
|
7347
|
-
/*
|
|
7060
|
+
/* 30 */
|
|
7348
7061
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
7349
7062
|
|
|
7350
7063
|
"use strict";
|
|
@@ -7370,7 +7083,7 @@ var result = Object(_ponyfill_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]
|
|
|
7370
7083
|
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(19), __webpack_require__(67)(module)))
|
|
7371
7084
|
|
|
7372
7085
|
/***/ }),
|
|
7373
|
-
/*
|
|
7086
|
+
/* 31 */
|
|
7374
7087
|
/***/ (function(module, exports, __webpack_require__) {
|
|
7375
7088
|
|
|
7376
7089
|
var parser = __webpack_require__(69);
|
|
@@ -7383,7 +7096,7 @@ module.exports = {
|
|
|
7383
7096
|
};
|
|
7384
7097
|
|
|
7385
7098
|
/***/ }),
|
|
7386
|
-
/*
|
|
7099
|
+
/* 32 */
|
|
7387
7100
|
/***/ (function(module, exports) {
|
|
7388
7101
|
|
|
7389
7102
|
// shim for using process in browser
|
|
@@ -7573,7 +7286,7 @@ process.umask = function() { return 0; };
|
|
|
7573
7286
|
|
|
7574
7287
|
|
|
7575
7288
|
/***/ }),
|
|
7576
|
-
/*
|
|
7289
|
+
/* 33 */
|
|
7577
7290
|
/***/ (function(module, exports) {
|
|
7578
7291
|
|
|
7579
7292
|
if (typeof Object.create === 'function') {
|
|
@@ -7605,6 +7318,293 @@ if (typeof Object.create === 'function') {
|
|
|
7605
7318
|
}
|
|
7606
7319
|
|
|
7607
7320
|
|
|
7321
|
+
/***/ }),
|
|
7322
|
+
/* 34 */
|
|
7323
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
7324
|
+
|
|
7325
|
+
"use strict";
|
|
7326
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return WinampTelegramCustomHandler; });
|
|
7327
|
+
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
|
|
7328
|
+
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
|
|
7329
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
|
|
7330
|
+
|
|
7331
|
+
|
|
7332
|
+
class WinampTelegramCustomHandler {
|
|
7333
|
+
constructor(emit, options) {
|
|
7334
|
+
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "webamp", void 0);
|
|
7335
|
+
|
|
7336
|
+
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "maxFileSize", 0x1400000);
|
|
7337
|
+
|
|
7338
|
+
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "telegram", void 0);
|
|
7339
|
+
|
|
7340
|
+
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "options", void 0);
|
|
7341
|
+
|
|
7342
|
+
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "loadCustomTracks", tracks => {
|
|
7343
|
+
var _this$webamp;
|
|
7344
|
+
|
|
7345
|
+
((_this$webamp = this.webamp) !== null && _this$webamp !== void 0 ? _this$webamp : window.__webamp).setTracksToPlay(tracks);
|
|
7346
|
+
});
|
|
7347
|
+
|
|
7348
|
+
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "updateAppState", () => {
|
|
7349
|
+
localStorage.setItem("appState", JSON.stringify(this.webamp.__getSerializedState()));
|
|
7350
|
+
});
|
|
7351
|
+
|
|
7352
|
+
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "getTrackListFromYandexDisk", async playlistLink => {
|
|
7353
|
+
fetch(`https://cloud-api.yandex.net/v1/disk/public/resources?public_key=${encodeURIComponent(playlistLink)}`, {
|
|
7354
|
+
method: "GET",
|
|
7355
|
+
headers: {
|
|
7356
|
+
Accept: "application/json",
|
|
7357
|
+
"Content-Type": "application/json"
|
|
7358
|
+
}
|
|
7359
|
+
}).then(async response => {
|
|
7360
|
+
if (response.status === 200) {
|
|
7361
|
+
return response.text();
|
|
7362
|
+
} else {
|
|
7363
|
+
return null;
|
|
7364
|
+
}
|
|
7365
|
+
}).then(async response => {
|
|
7366
|
+
if (response !== null) {
|
|
7367
|
+
var _JSON$parse;
|
|
7368
|
+
|
|
7369
|
+
const data = (_JSON$parse = JSON.parse(response)) === null || _JSON$parse === void 0 ? void 0 : _JSON$parse._embedded.items;
|
|
7370
|
+
let i = 0;
|
|
7371
|
+
this.saveLastPlaylist(playlistLink);
|
|
7372
|
+
|
|
7373
|
+
for (const item of data) {
|
|
7374
|
+
if (i === 0) {
|
|
7375
|
+
this.webamp.setTracksToPlay([{
|
|
7376
|
+
defaultName: item.name,
|
|
7377
|
+
url: `${item.file}&public_key=${item.public_key}`
|
|
7378
|
+
}]);
|
|
7379
|
+
} else {
|
|
7380
|
+
this.webamp.appendTracks([{
|
|
7381
|
+
defaultName: item.name,
|
|
7382
|
+
url: `${item.file}&public_key=${item.public_key}`
|
|
7383
|
+
}]);
|
|
7384
|
+
}
|
|
7385
|
+
|
|
7386
|
+
i++;
|
|
7387
|
+
}
|
|
7388
|
+
}
|
|
7389
|
+
});
|
|
7390
|
+
});
|
|
7391
|
+
|
|
7392
|
+
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "loadTrackFromYandexDisk", async track => {
|
|
7393
|
+
let public_key = new URL(track.url).searchParams.get("public_key");
|
|
7394
|
+
await fetch(track.url, {
|
|
7395
|
+
method: "GET"
|
|
7396
|
+
}).then(response => response).then(resp => fetch(resp.url)).then(async response => {
|
|
7397
|
+
if (response.status === 302) {
|
|
7398
|
+
return await fetch(`${response.headers.get("Location")}&public_key=${public_key}`);
|
|
7399
|
+
} else {
|
|
7400
|
+
return response;
|
|
7401
|
+
}
|
|
7402
|
+
}).then(res => {
|
|
7403
|
+
var _res$body;
|
|
7404
|
+
|
|
7405
|
+
console.log(res);
|
|
7406
|
+
const read = (_res$body = res.body) === null || _res$body === void 0 ? void 0 : _res$body.getReader();
|
|
7407
|
+
return new ReadableStream({
|
|
7408
|
+
start(controller) {
|
|
7409
|
+
// @ts-ignore
|
|
7410
|
+
function pump() {
|
|
7411
|
+
// @ts-ignore
|
|
7412
|
+
return read === null || read === void 0 ? void 0 : read.read().then(({
|
|
7413
|
+
done,
|
|
7414
|
+
value
|
|
7415
|
+
}) => {
|
|
7416
|
+
if (done) {
|
|
7417
|
+
controller.close();
|
|
7418
|
+
return;
|
|
7419
|
+
}
|
|
7420
|
+
|
|
7421
|
+
controller.enqueue(value);
|
|
7422
|
+
return pump();
|
|
7423
|
+
});
|
|
7424
|
+
}
|
|
7425
|
+
|
|
7426
|
+
return pump();
|
|
7427
|
+
}
|
|
7428
|
+
|
|
7429
|
+
});
|
|
7430
|
+
}).then(stream => new Response(stream)).then(response => response.blob()).then(blob => URL.createObjectURL(blob)).then(uri => {
|
|
7431
|
+
let tracks = this.getAllTracks();
|
|
7432
|
+
this.replaceTrack(track, tracks);
|
|
7433
|
+
}).catch(err => err);
|
|
7434
|
+
});
|
|
7435
|
+
|
|
7436
|
+
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "getCurrentTrack", () => {
|
|
7437
|
+
let trackId = this.webamp.store.getState().playlist.currentTrack;
|
|
7438
|
+
return this.webamp.store.getState().tracks[trackId];
|
|
7439
|
+
});
|
|
7440
|
+
|
|
7441
|
+
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "getAllTracks", () => {
|
|
7442
|
+
return this.webamp.store.getState().tracks;
|
|
7443
|
+
});
|
|
7444
|
+
|
|
7445
|
+
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "replaceTrack", (track, tracks) => {
|
|
7446
|
+
let a = [];
|
|
7447
|
+
Object.entries(tracks).forEach(([_key, value]) => {
|
|
7448
|
+
if (value.id === track.id) {
|
|
7449
|
+
a.push(track);
|
|
7450
|
+
} else {
|
|
7451
|
+
a.push(value);
|
|
7452
|
+
}
|
|
7453
|
+
});
|
|
7454
|
+
this.webamp.setTracksToPlay(a);
|
|
7455
|
+
});
|
|
7456
|
+
|
|
7457
|
+
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "saveLastPlaylist", playlistLink => {
|
|
7458
|
+
document.cookie = `lastlist=${playlistLink}; path=/;`;
|
|
7459
|
+
});
|
|
7460
|
+
|
|
7461
|
+
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "getCookie", name => {
|
|
7462
|
+
const regex = new RegExp(`(^| )${name}=([^;]+)`);
|
|
7463
|
+
const match = document.cookie.match(regex);
|
|
7464
|
+
|
|
7465
|
+
if (match) {
|
|
7466
|
+
return match[2];
|
|
7467
|
+
}
|
|
7468
|
+
});
|
|
7469
|
+
|
|
7470
|
+
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "loadOptions", opts => {
|
|
7471
|
+
this.webamp.__loadSerializedState(opts);
|
|
7472
|
+
});
|
|
7473
|
+
|
|
7474
|
+
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "loadOptions2", opts => {
|
|
7475
|
+
let i = 0;
|
|
7476
|
+
let vol = opts.media.volume;
|
|
7477
|
+
let balance = opts.media.balance;
|
|
7478
|
+
let eq1 = opts.equalizer.sliders.preamp;
|
|
7479
|
+
let eq2 = opts.equalizer.sliders["60"];
|
|
7480
|
+
let eq3 = opts.equalizer.sliders["170"];
|
|
7481
|
+
let eq4 = opts.equalizer.sliders["310"];
|
|
7482
|
+
let eq5 = opts.equalizer.sliders["600"];
|
|
7483
|
+
let eq6 = opts.equalizer.sliders["1000"];
|
|
7484
|
+
let eq7 = opts.equalizer.sliders["3000"];
|
|
7485
|
+
let eq8 = opts.equalizer.sliders["6000"];
|
|
7486
|
+
let eq9 = opts.equalizer.sliders["12000"];
|
|
7487
|
+
let eq10 = opts.equalizer.sliders["14000"];
|
|
7488
|
+
let eq11 = opts.equalizer.sliders["16000"];
|
|
7489
|
+
let equal = [eq1, eq2, eq3, eq4, eq5, eq6, eq7, eq8, eq9, eq10, eq11];
|
|
7490
|
+
let bands = [60, 170, 310, 600, 1000, 3000, 6000, 12000, 14000, 16000];
|
|
7491
|
+
this.webamp.store.dispatch({
|
|
7492
|
+
type: "SET_VOLUME",
|
|
7493
|
+
volume: Object(_utils__WEBPACK_IMPORTED_MODULE_1__[/* clamp */ "d"])(vol, 0, 100)
|
|
7494
|
+
});
|
|
7495
|
+
this.webamp.store.dispatch({
|
|
7496
|
+
type: "SET_BALANCE",
|
|
7497
|
+
balance: balance
|
|
7498
|
+
});
|
|
7499
|
+
this.webamp.store.dispatch({
|
|
7500
|
+
type: "SET_BAND_VALUE",
|
|
7501
|
+
band: "preamp",
|
|
7502
|
+
value: opts.equalizer.sliders.preamp
|
|
7503
|
+
});
|
|
7504
|
+
|
|
7505
|
+
for (const band of bands) {
|
|
7506
|
+
this.webamp.store.dispatch({
|
|
7507
|
+
type: "SET_BAND_VALUE",
|
|
7508
|
+
band: band,
|
|
7509
|
+
value: equal[i]
|
|
7510
|
+
});
|
|
7511
|
+
i++;
|
|
7512
|
+
}
|
|
7513
|
+
|
|
7514
|
+
if (window.__webamp.store.getState().media.shuffle !== opts.media.shuffle) {
|
|
7515
|
+
this.webamp.store.dispatch({
|
|
7516
|
+
type: "TOGGLE_SHUFFLE"
|
|
7517
|
+
});
|
|
7518
|
+
}
|
|
7519
|
+
|
|
7520
|
+
if (window.__webamp.store.getState().media.repeat !== opts.media.repeat) {
|
|
7521
|
+
this.webamp.store.dispatch({
|
|
7522
|
+
type: "TOGGLE_REPEAT"
|
|
7523
|
+
});
|
|
7524
|
+
}
|
|
7525
|
+
});
|
|
7526
|
+
|
|
7527
|
+
this.options = options;
|
|
7528
|
+
setTimeout(() => {
|
|
7529
|
+
if (!window.__webamp) {
|
|
7530
|
+
throw new Error("Webamp __webamp is undefined!!");
|
|
7531
|
+
} else {
|
|
7532
|
+
this.webamp = window.__webamp;
|
|
7533
|
+
}
|
|
7534
|
+
|
|
7535
|
+
if (typeof localStorage.getItem('app-state') !== "undefined") {
|
|
7536
|
+
this.loadOptions(JSON.parse(localStorage.getItem('app-state')));
|
|
7537
|
+
} // emit
|
|
7538
|
+
|
|
7539
|
+
|
|
7540
|
+
if (emit !== false) {
|
|
7541
|
+
var _window, _window$Telegram;
|
|
7542
|
+
|
|
7543
|
+
const lastList = this.getCookie('lastlist');
|
|
7544
|
+
|
|
7545
|
+
if (typeof lastList !== "undefined") {
|
|
7546
|
+
this.getTrackListFromYandexDisk(lastList);
|
|
7547
|
+
} // @ts-ignore | because no global var telegram avail in project types
|
|
7548
|
+
|
|
7549
|
+
|
|
7550
|
+
if (!((_window = window) !== null && _window !== void 0 && (_window$Telegram = _window.Telegram) !== null && _window$Telegram !== void 0 && _window$Telegram.WebApp)) {
|
|
7551
|
+
console.error("Telegram is undefined!! Skipping Telegram.WebApp event handler...");
|
|
7552
|
+
} else {
|
|
7553
|
+
var _window2, _window2$Telegram;
|
|
7554
|
+
|
|
7555
|
+
// @ts-ignore | because no global var telegram avail in project types
|
|
7556
|
+
this.telegram = (_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$Telegram = _window2.Telegram) === null || _window2$Telegram === void 0 ? void 0 : _window2$Telegram.WebApp;
|
|
7557
|
+
this.initializeTelegramWebAppEvents();
|
|
7558
|
+
}
|
|
7559
|
+
|
|
7560
|
+
this.initializeApplicationHandlers();
|
|
7561
|
+
}
|
|
7562
|
+
}, 1000);
|
|
7563
|
+
}
|
|
7564
|
+
|
|
7565
|
+
initializeTelegramWebAppEvents() {
|
|
7566
|
+
this.telegram.offEvent("deactivated", () => {
|
|
7567
|
+
this.updateAppState();
|
|
7568
|
+
});
|
|
7569
|
+
}
|
|
7570
|
+
|
|
7571
|
+
initializeApplicationHandlers() {
|
|
7572
|
+
const window_handlers = ['unload', 'beforeunload', 'pagehide'];
|
|
7573
|
+
window_handlers.forEach(handler => {
|
|
7574
|
+
window.addEventListener(handler, () => {
|
|
7575
|
+
this.updateAppState();
|
|
7576
|
+
});
|
|
7577
|
+
});
|
|
7578
|
+
this.webamp.onTrackDidChange(() => {
|
|
7579
|
+
console.log(this.webamp.store.getState());
|
|
7580
|
+
this.updateAppState();
|
|
7581
|
+
});
|
|
7582
|
+
this.webamp.onWillClose(() => {
|
|
7583
|
+
this.updateAppState();
|
|
7584
|
+
});
|
|
7585
|
+
this.webamp.onClose(() => {
|
|
7586
|
+
this.updateAppState();
|
|
7587
|
+
});
|
|
7588
|
+
this.webamp.onMinimize(() => {
|
|
7589
|
+
this.updateAppState();
|
|
7590
|
+
});
|
|
7591
|
+
this.webamp.store.dispatch({
|
|
7592
|
+
type: "ENABLE_MILKDROP",
|
|
7593
|
+
open: false
|
|
7594
|
+
});
|
|
7595
|
+
const ev = ['ended', 'playing', 'timeupdate', 'fileLoaded', 'waiting', 'stopWaiting'];
|
|
7596
|
+
|
|
7597
|
+
this.webamp.__onStateChange(() => {
|
|
7598
|
+
this.updateAppState();
|
|
7599
|
+
});
|
|
7600
|
+
|
|
7601
|
+
ev.forEach(ev => this.webamp.media.on(ev, () => {
|
|
7602
|
+
this.updateAppState();
|
|
7603
|
+
}));
|
|
7604
|
+
}
|
|
7605
|
+
|
|
7606
|
+
}
|
|
7607
|
+
|
|
7608
7608
|
/***/ }),
|
|
7609
7609
|
/* 35 */
|
|
7610
7610
|
/***/ (function(module, exports, __webpack_require__) {
|
|
@@ -8427,7 +8427,7 @@ function nextTick(fn, arg1, arg2, arg3) {
|
|
|
8427
8427
|
}
|
|
8428
8428
|
|
|
8429
8429
|
|
|
8430
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(
|
|
8430
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(32)))
|
|
8431
8431
|
|
|
8432
8432
|
/***/ }),
|
|
8433
8433
|
/* 48 */
|
|
@@ -8988,11 +8988,11 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
8988
8988
|
return target;
|
|
8989
8989
|
}
|
|
8990
8990
|
// EXTERNAL MODULE: /home/exezt-/Projects/webamp/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js
|
|
8991
|
-
var hoist_non_react_statics_cjs = __webpack_require__(
|
|
8991
|
+
var hoist_non_react_statics_cjs = __webpack_require__(29);
|
|
8992
8992
|
var hoist_non_react_statics_cjs_default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics_cjs);
|
|
8993
8993
|
|
|
8994
8994
|
// EXTERNAL MODULE: /home/exezt-/Projects/webamp/node_modules/react-is/index.js
|
|
8995
|
-
var react_is = __webpack_require__(
|
|
8995
|
+
var react_is = __webpack_require__(28);
|
|
8996
8996
|
|
|
8997
8997
|
// CONCATENATED MODULE: /home/exezt-/Projects/webamp/node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js
|
|
8998
8998
|
// React currently throws a warning when using useLayoutEffect on the server.
|
|
@@ -13009,7 +13009,7 @@ function toggleEqAuto() {
|
|
|
13009
13009
|
};
|
|
13010
13010
|
}
|
|
13011
13011
|
// EXTERNAL MODULE: ../winamp-eqf/index.js
|
|
13012
|
-
var winamp_eqf = __webpack_require__(
|
|
13012
|
+
var winamp_eqf = __webpack_require__(31);
|
|
13013
13013
|
|
|
13014
13014
|
// CONCATENATED MODULE: ./js/skinSprites.ts
|
|
13015
13015
|
|
|
@@ -15143,7 +15143,7 @@ function selectAll() {
|
|
|
15143
15143
|
};
|
|
15144
15144
|
}
|
|
15145
15145
|
// EXTERNAL MODULE: ./js/lib/webamp-telegram-handler.ts
|
|
15146
|
-
var webamp_telegram_handler = __webpack_require__(
|
|
15146
|
+
var webamp_telegram_handler = __webpack_require__(34);
|
|
15147
15147
|
|
|
15148
15148
|
// CONCATENATED MODULE: ./js/actionCreators/files.ts
|
|
15149
15149
|
|
|
@@ -15569,8 +15569,7 @@ function files_addFilesFromUrl(atIndex = 0) {
|
|
|
15569
15569
|
// }
|
|
15570
15570
|
// };
|
|
15571
15571
|
}
|
|
15572
|
-
function files_addFilesFromList() {
|
|
15573
|
-
new webamp_telegram_handler["a" /* default */](false).loadCustomTracks(); // return async (dispatch, getState, { handleLoadListEvent }) => {
|
|
15572
|
+
function files_addFilesFromList() {// return async (dispatch, getState, { handleLoadListEvent }) => {
|
|
15574
15573
|
// if (handleLoadListEvent) {
|
|
15575
15574
|
// const tracks = await handleLoadListEvent();
|
|
15576
15575
|
//
|
|
@@ -23090,7 +23089,7 @@ exports = module.exports = __webpack_require__(110);
|
|
|
23090
23089
|
exports.Stream = exports;
|
|
23091
23090
|
exports.Readable = exports;
|
|
23092
23091
|
exports.Writable = __webpack_require__(56);
|
|
23093
|
-
exports.Duplex = __webpack_require__(
|
|
23092
|
+
exports.Duplex = __webpack_require__(26);
|
|
23094
23093
|
exports.Transform = __webpack_require__(114);
|
|
23095
23094
|
exports.PassThrough = __webpack_require__(156);
|
|
23096
23095
|
|
|
@@ -23167,7 +23166,7 @@ Writable.WritableState = WritableState;
|
|
|
23167
23166
|
|
|
23168
23167
|
/*<replacement>*/
|
|
23169
23168
|
var util = Object.create(__webpack_require__(37));
|
|
23170
|
-
util.inherits = __webpack_require__(
|
|
23169
|
+
util.inherits = __webpack_require__(33);
|
|
23171
23170
|
/*</replacement>*/
|
|
23172
23171
|
|
|
23173
23172
|
/*<replacement>*/
|
|
@@ -23200,7 +23199,7 @@ util.inherits(Writable, Stream);
|
|
|
23200
23199
|
function nop() {}
|
|
23201
23200
|
|
|
23202
23201
|
function WritableState(options, stream) {
|
|
23203
|
-
Duplex = Duplex || __webpack_require__(
|
|
23202
|
+
Duplex = Duplex || __webpack_require__(26);
|
|
23204
23203
|
|
|
23205
23204
|
options = options || {};
|
|
23206
23205
|
|
|
@@ -23350,7 +23349,7 @@ if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.protot
|
|
|
23350
23349
|
}
|
|
23351
23350
|
|
|
23352
23351
|
function Writable(options) {
|
|
23353
|
-
Duplex = Duplex || __webpack_require__(
|
|
23352
|
+
Duplex = Duplex || __webpack_require__(26);
|
|
23354
23353
|
|
|
23355
23354
|
// Writable ctor is applied to Duplexes, too.
|
|
23356
23355
|
// `realHasInstance` is necessary because using plain `instanceof`
|
|
@@ -23787,7 +23786,7 @@ Writable.prototype._destroy = function (err, cb) {
|
|
|
23787
23786
|
this.end();
|
|
23788
23787
|
cb(err);
|
|
23789
23788
|
};
|
|
23790
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(
|
|
23789
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(32), __webpack_require__(107).setImmediate, __webpack_require__(19)))
|
|
23791
23790
|
|
|
23792
23791
|
/***/ }),
|
|
23793
23792
|
/* 57 */
|
|
@@ -24934,7 +24933,7 @@ module.exports = toString;
|
|
|
24934
24933
|
/* 81 */
|
|
24935
24934
|
/***/ (function(module, exports, __webpack_require__) {
|
|
24936
24935
|
|
|
24937
|
-
var Symbol = __webpack_require__(
|
|
24936
|
+
var Symbol = __webpack_require__(27),
|
|
24938
24937
|
arrayMap = __webpack_require__(84),
|
|
24939
24938
|
isArray = __webpack_require__(85),
|
|
24940
24939
|
isSymbol = __webpack_require__(86);
|
|
@@ -25097,7 +25096,7 @@ module.exports = isSymbol;
|
|
|
25097
25096
|
/* 87 */
|
|
25098
25097
|
/***/ (function(module, exports, __webpack_require__) {
|
|
25099
25098
|
|
|
25100
|
-
var Symbol = __webpack_require__(
|
|
25099
|
+
var Symbol = __webpack_require__(27),
|
|
25101
25100
|
getRawTag = __webpack_require__(88),
|
|
25102
25101
|
objectToString = __webpack_require__(89);
|
|
25103
25102
|
|
|
@@ -25131,7 +25130,7 @@ module.exports = baseGetTag;
|
|
|
25131
25130
|
/* 88 */
|
|
25132
25131
|
/***/ (function(module, exports, __webpack_require__) {
|
|
25133
25132
|
|
|
25134
|
-
var Symbol = __webpack_require__(
|
|
25133
|
+
var Symbol = __webpack_require__(27);
|
|
25135
25134
|
|
|
25136
25135
|
/** Used for built-in method references. */
|
|
25137
25136
|
var objectProto = Object.prototype;
|
|
@@ -27004,7 +27003,7 @@ fileType.stream = readableStream => new Promise((resolve, reject) => {
|
|
|
27004
27003
|
module.exports = Stream;
|
|
27005
27004
|
|
|
27006
27005
|
var EE = __webpack_require__(54).EventEmitter;
|
|
27007
|
-
var inherits = __webpack_require__(
|
|
27006
|
+
var inherits = __webpack_require__(33);
|
|
27008
27007
|
|
|
27009
27008
|
inherits(Stream, EE);
|
|
27010
27009
|
Stream.Readable = __webpack_require__(55);
|
|
@@ -27181,7 +27180,7 @@ function _isUint8Array(obj) {
|
|
|
27181
27180
|
|
|
27182
27181
|
/*<replacement>*/
|
|
27183
27182
|
var util = Object.create(__webpack_require__(37));
|
|
27184
|
-
util.inherits = __webpack_require__(
|
|
27183
|
+
util.inherits = __webpack_require__(33);
|
|
27185
27184
|
/*</replacement>*/
|
|
27186
27185
|
|
|
27187
27186
|
/*<replacement>*/
|
|
@@ -27215,7 +27214,7 @@ function prependListener(emitter, event, fn) {
|
|
|
27215
27214
|
}
|
|
27216
27215
|
|
|
27217
27216
|
function ReadableState(options, stream) {
|
|
27218
|
-
Duplex = Duplex || __webpack_require__(
|
|
27217
|
+
Duplex = Duplex || __webpack_require__(26);
|
|
27219
27218
|
|
|
27220
27219
|
options = options || {};
|
|
27221
27220
|
|
|
@@ -27292,7 +27291,7 @@ function ReadableState(options, stream) {
|
|
|
27292
27291
|
}
|
|
27293
27292
|
|
|
27294
27293
|
function Readable(options) {
|
|
27295
|
-
Duplex = Duplex || __webpack_require__(
|
|
27294
|
+
Duplex = Duplex || __webpack_require__(26);
|
|
27296
27295
|
|
|
27297
27296
|
if (!(this instanceof Readable)) return new Readable(options);
|
|
27298
27297
|
|
|
@@ -28133,7 +28132,7 @@ function indexOf(xs, x) {
|
|
|
28133
28132
|
}
|
|
28134
28133
|
return -1;
|
|
28135
28134
|
}
|
|
28136
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(19), __webpack_require__(
|
|
28135
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(19), __webpack_require__(32)))
|
|
28137
28136
|
|
|
28138
28137
|
/***/ }),
|
|
28139
28138
|
/* 111 */
|
|
@@ -28596,11 +28595,11 @@ function simpleEnd(buf) {
|
|
|
28596
28595
|
|
|
28597
28596
|
module.exports = Transform;
|
|
28598
28597
|
|
|
28599
|
-
var Duplex = __webpack_require__(
|
|
28598
|
+
var Duplex = __webpack_require__(26);
|
|
28600
28599
|
|
|
28601
28600
|
/*<replacement>*/
|
|
28602
28601
|
var util = Object.create(__webpack_require__(37));
|
|
28603
|
-
util.inherits = __webpack_require__(
|
|
28602
|
+
util.inherits = __webpack_require__(33);
|
|
28604
28603
|
/*</replacement>*/
|
|
28605
28604
|
|
|
28606
28605
|
util.inherits(Transform, Duplex);
|
|
@@ -29375,7 +29374,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
29375
29374
|
/* harmony import */ var music_metadata_browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(119);
|
|
29376
29375
|
/* harmony import */ var music_metadata_browser__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(music_metadata_browser__WEBPACK_IMPORTED_MODULE_2__);
|
|
29377
29376
|
/* harmony import */ var _webampLazy__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(51);
|
|
29378
|
-
/* harmony import */ var _lib_webamp_telegram_handler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
29377
|
+
/* harmony import */ var _lib_webamp_telegram_handler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(34);
|
|
29379
29378
|
|
|
29380
29379
|
|
|
29381
29380
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -29746,7 +29745,7 @@ function fromByteArray (uint8) {
|
|
|
29746
29745
|
attachTo.clearImmediate = clearImmediate;
|
|
29747
29746
|
}(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self));
|
|
29748
29747
|
|
|
29749
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(19), __webpack_require__(
|
|
29748
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(19), __webpack_require__(32)))
|
|
29750
29749
|
|
|
29751
29750
|
/***/ }),
|
|
29752
29751
|
/* 123 */
|
|
@@ -31306,7 +31305,7 @@ function callbackify(original) {
|
|
|
31306
31305
|
}
|
|
31307
31306
|
exports.callbackify = callbackify;
|
|
31308
31307
|
|
|
31309
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(
|
|
31308
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(32)))
|
|
31310
31309
|
|
|
31311
31310
|
/***/ }),
|
|
31312
31311
|
/* 130 */
|
|
@@ -33868,7 +33867,7 @@ var Transform = __webpack_require__(114);
|
|
|
33868
33867
|
|
|
33869
33868
|
/*<replacement>*/
|
|
33870
33869
|
var util = Object.create(__webpack_require__(37));
|
|
33871
|
-
util.inherits = __webpack_require__(
|
|
33870
|
+
util.inherits = __webpack_require__(33);
|
|
33872
33871
|
/*</replacement>*/
|
|
33873
33872
|
|
|
33874
33873
|
util.inherits(PassThrough, Transform);
|
|
@@ -33894,7 +33893,7 @@ module.exports = __webpack_require__(56);
|
|
|
33894
33893
|
/* 158 */
|
|
33895
33894
|
/***/ (function(module, exports, __webpack_require__) {
|
|
33896
33895
|
|
|
33897
|
-
module.exports = __webpack_require__(
|
|
33896
|
+
module.exports = __webpack_require__(26);
|
|
33898
33897
|
|
|
33899
33898
|
|
|
33900
33899
|
/***/ }),
|