@exezt-/webamp 1.5.0-0x710 → 1.5.0-0x715

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.
@@ -1759,7 +1759,7 @@ formatters.j = function (v) {
1759
1759
  }
1760
1760
  };
1761
1761
 
1762
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(32)))
1762
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(33)))
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__(30);
4059
+ /* harmony import */ var symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(31);
4060
4060
 
4061
4061
 
4062
4062
  /**
@@ -6787,144 +6787,430 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) {
6787
6787
 
6788
6788
  /***/ }),
6789
6789
  /* 26 */
6790
- /***/ (function(module, exports, __webpack_require__) {
6790
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
6791
6791
 
6792
6792
  "use strict";
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.
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.
6818
-
6793
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return WinampTelegramCustomHandler; });
6794
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
6795
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
6796
+ /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
6819
6797
 
6820
6798
 
6821
- /*<replacement>*/
6799
+ class WinampTelegramCustomHandler {
6800
+ constructor(emit, options) {
6801
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "webamp", void 0);
6822
6802
 
6823
- var pna = __webpack_require__(47);
6824
- /*</replacement>*/
6803
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "maxFileSize", 0x1400000);
6825
6804
 
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>*/
6805
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "telegram", void 0);
6834
6806
 
6835
- module.exports = Duplex;
6807
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "options", void 0);
6836
6808
 
6837
- /*<replacement>*/
6838
- var util = Object.create(__webpack_require__(37));
6839
- util.inherits = __webpack_require__(33);
6840
- /*</replacement>*/
6809
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "loadCustomTracks", () => {
6810
+ if (!this.webamp.options.initialTracks) return;
6811
+ this.webamp.setTracksToPlay(this.webamp.options.initialTracks);
6812
+ });
6841
6813
 
6842
- var Readable = __webpack_require__(110);
6843
- var Writable = __webpack_require__(56);
6814
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "updateAppState", () => {
6815
+ localStorage.setItem("appState", JSON.stringify(this.webamp.__getSerializedState()));
6816
+ });
6844
6817
 
6845
- util.inherits(Duplex, Readable);
6818
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "getTrackListFromYandexDisk", async playlistLink => {
6819
+ fetch(`https://cloud-api.yandex.net/v1/disk/public/resources?public_key=${encodeURIComponent(playlistLink)}`, {
6820
+ method: "GET",
6821
+ headers: {
6822
+ Accept: "application/json",
6823
+ "Content-Type": "application/json"
6824
+ }
6825
+ }).then(async response => {
6826
+ if (response.status === 200) {
6827
+ return response.text();
6828
+ } else {
6829
+ return null;
6830
+ }
6831
+ }).then(async response => {
6832
+ if (response !== null) {
6833
+ var _JSON$parse;
6846
6834
 
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
- }
6835
+ const data = (_JSON$parse = JSON.parse(response)) === null || _JSON$parse === void 0 ? void 0 : _JSON$parse._embedded.items;
6836
+ let i = 0;
6837
+ this.saveLastPlaylist(playlistLink);
6855
6838
 
6856
- function Duplex(options) {
6857
- if (!(this instanceof Duplex)) return new Duplex(options);
6839
+ for (const item of data) {
6840
+ if (i === 0) {
6841
+ this.webamp.setTracksToPlay([{
6842
+ defaultName: item.name,
6843
+ url: `${item.file}&public_key=${item.public_key}`
6844
+ }]);
6845
+ } else {
6846
+ this.webamp.appendTracks([{
6847
+ defaultName: item.name,
6848
+ url: `${item.file}&public_key=${item.public_key}`
6849
+ }]);
6850
+ }
6858
6851
 
6859
- Readable.call(this, options);
6860
- Writable.call(this, options);
6852
+ i++;
6853
+ }
6854
+ }
6855
+ });
6856
+ });
6861
6857
 
6862
- if (options && options.readable === false) this.readable = false;
6858
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "loadTrackFromYandexDisk", async track => {
6859
+ let public_key = new URL(track.url).searchParams.get("public_key");
6860
+ await fetch(track.url, {
6861
+ method: "GET"
6862
+ }).then(response => response).then(resp => fetch(resp.url)).then(async response => {
6863
+ if (response.status === 302) {
6864
+ return await fetch(`${response.headers.get("Location")}&public_key=${public_key}`);
6865
+ } else {
6866
+ return response;
6867
+ }
6868
+ }).then(res => {
6869
+ var _res$body;
6863
6870
 
6864
- if (options && options.writable === false) this.writable = false;
6871
+ console.log(res);
6872
+ const read = (_res$body = res.body) === null || _res$body === void 0 ? void 0 : _res$body.getReader();
6873
+ return new ReadableStream({
6874
+ start(controller) {
6875
+ // @ts-ignore
6876
+ function pump() {
6877
+ // @ts-ignore
6878
+ return read === null || read === void 0 ? void 0 : read.read().then(({
6879
+ done,
6880
+ value
6881
+ }) => {
6882
+ if (done) {
6883
+ controller.close();
6884
+ return;
6885
+ }
6865
6886
 
6866
- this.allowHalfOpen = true;
6867
- if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
6887
+ controller.enqueue(value);
6888
+ return pump();
6889
+ });
6890
+ }
6868
6891
 
6869
- this.once('end', onend);
6870
- }
6892
+ return pump();
6893
+ }
6871
6894
 
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
- });
6895
+ });
6896
+ }).then(stream => new Response(stream)).then(response => response.blob()).then(blob => URL.createObjectURL(blob)).then(uri => {
6897
+ let tracks = this.getAllTracks();
6898
+ this.replaceTrack(track, tracks);
6899
+ }).catch(err => err);
6900
+ });
6881
6901
 
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;
6902
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "getCurrentTrack", () => {
6903
+ let trackId = this.webamp.store.getState().playlist.currentTrack;
6904
+ return this.webamp.store.getState().tracks[trackId];
6905
+ });
6887
6906
 
6888
- // no more data can be written.
6889
- // But allow more writes to happen in this tick.
6890
- pna.nextTick(onEndNT, this);
6891
- }
6907
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "getAllTracks", () => {
6908
+ return this.webamp.store.getState().tracks;
6909
+ });
6892
6910
 
6893
- function onEndNT(self) {
6894
- self.end();
6895
- }
6911
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "replaceTrack", (track, tracks) => {
6912
+ let a = [];
6913
+ Object.entries(tracks).forEach(([_key, value]) => {
6914
+ if (value.id === track.id) {
6915
+ a.push(track);
6916
+ } else {
6917
+ a.push(value);
6918
+ }
6919
+ });
6920
+ this.webamp.setTracksToPlay(a);
6921
+ });
6896
6922
 
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
- }
6923
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "saveLastPlaylist", playlistLink => {
6924
+ document.cookie = `lastlist=${playlistLink}; path=/;`;
6925
+ });
6910
6926
 
6911
- // backward compatibility, the user is explicitly
6912
- // managing destroyed
6913
- this._readableState.destroyed = value;
6914
- this._writableState.destroyed = value;
6915
- }
6916
- });
6927
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "getCookie", name => {
6928
+ const regex = new RegExp(`(^| )${name}=([^;]+)`);
6929
+ const match = document.cookie.match(regex);
6917
6930
 
6918
- Duplex.prototype._destroy = function (err, cb) {
6919
- this.push(null);
6920
- this.end();
6931
+ if (match) {
6932
+ return match[2];
6933
+ }
6934
+ });
6921
6935
 
6922
- pna.nextTick(cb, err);
6923
- };
6936
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "loadOptions", opts => {
6937
+ this.webamp.__loadSerializedState(opts);
6938
+ });
6924
6939
 
6925
- /***/ }),
6926
- /* 27 */
6927
- /***/ (function(module, exports, __webpack_require__) {
6940
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "loadOptions2", opts => {
6941
+ let i = 0;
6942
+ let vol = opts.media.volume;
6943
+ let balance = opts.media.balance;
6944
+ let eq1 = opts.equalizer.sliders.preamp;
6945
+ let eq2 = opts.equalizer.sliders["60"];
6946
+ let eq3 = opts.equalizer.sliders["170"];
6947
+ let eq4 = opts.equalizer.sliders["310"];
6948
+ let eq5 = opts.equalizer.sliders["600"];
6949
+ let eq6 = opts.equalizer.sliders["1000"];
6950
+ let eq7 = opts.equalizer.sliders["3000"];
6951
+ let eq8 = opts.equalizer.sliders["6000"];
6952
+ let eq9 = opts.equalizer.sliders["12000"];
6953
+ let eq10 = opts.equalizer.sliders["14000"];
6954
+ let eq11 = opts.equalizer.sliders["16000"];
6955
+ let equal = [eq1, eq2, eq3, eq4, eq5, eq6, eq7, eq8, eq9, eq10, eq11];
6956
+ let bands = [60, 170, 310, 600, 1000, 3000, 6000, 12000, 14000, 16000];
6957
+ this.webamp.store.dispatch({
6958
+ type: "SET_VOLUME",
6959
+ volume: Object(_utils__WEBPACK_IMPORTED_MODULE_1__[/* clamp */ "d"])(vol, 0, 100)
6960
+ });
6961
+ this.webamp.store.dispatch({
6962
+ type: "SET_BALANCE",
6963
+ balance: balance
6964
+ });
6965
+ this.webamp.store.dispatch({
6966
+ type: "SET_BAND_VALUE",
6967
+ band: "preamp",
6968
+ value: opts.equalizer.sliders.preamp
6969
+ });
6970
+
6971
+ for (const band of bands) {
6972
+ this.webamp.store.dispatch({
6973
+ type: "SET_BAND_VALUE",
6974
+ band: band,
6975
+ value: equal[i]
6976
+ });
6977
+ i++;
6978
+ }
6979
+
6980
+ if (window.__webamp.store.getState().media.shuffle !== opts.media.shuffle) {
6981
+ this.webamp.store.dispatch({
6982
+ type: "TOGGLE_SHUFFLE"
6983
+ });
6984
+ }
6985
+
6986
+ if (window.__webamp.store.getState().media.repeat !== opts.media.repeat) {
6987
+ this.webamp.store.dispatch({
6988
+ type: "TOGGLE_REPEAT"
6989
+ });
6990
+ }
6991
+ });
6992
+
6993
+ this.options = options;
6994
+ setTimeout(() => {
6995
+ if (!window.__webamp) {
6996
+ throw new Error("Webamp __webamp is undefined!!");
6997
+ } else {
6998
+ this.webamp = window.__webamp;
6999
+ }
7000
+
7001
+ if (typeof localStorage.getItem('app-state') !== "undefined") {
7002
+ this.loadOptions(JSON.parse(localStorage.getItem('app-state')));
7003
+ } // emit
7004
+
7005
+
7006
+ if (emit !== false) {
7007
+ var _window, _window$Telegram;
7008
+
7009
+ const lastList = this.getCookie('lastlist');
7010
+
7011
+ if (typeof lastList !== "undefined") {
7012
+ this.getTrackListFromYandexDisk(lastList);
7013
+ } // @ts-ignore | because no global var telegram avail in project types
7014
+
7015
+
7016
+ if (!((_window = window) !== null && _window !== void 0 && (_window$Telegram = _window.Telegram) !== null && _window$Telegram !== void 0 && _window$Telegram.WebApp)) {
7017
+ console.error("Telegram is undefined!! Skipping Telegram.WebApp event handler...");
7018
+ } else {
7019
+ var _window2, _window2$Telegram;
7020
+
7021
+ // @ts-ignore | because no global var telegram avail in project types
7022
+ this.telegram = (_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$Telegram = _window2.Telegram) === null || _window2$Telegram === void 0 ? void 0 : _window2$Telegram.WebApp;
7023
+ this.initializeTelegramWebAppEvents();
7024
+ }
7025
+
7026
+ this.initializeApplicationHandlers();
7027
+ }
7028
+ }, 1000);
7029
+ }
7030
+
7031
+ initializeTelegramWebAppEvents() {
7032
+ this.telegram.offEvent("deactivated", () => {
7033
+ this.updateAppState();
7034
+ });
7035
+ }
7036
+
7037
+ initializeApplicationHandlers() {
7038
+ const window_handlers = ['unload', 'beforeunload', 'pagehide'];
7039
+ window_handlers.forEach(handler => {
7040
+ window.addEventListener(handler, () => {
7041
+ this.updateAppState();
7042
+ });
7043
+ });
7044
+ this.webamp.onTrackDidChange(() => {
7045
+ console.log(this.webamp.store.getState());
7046
+ this.updateAppState();
7047
+ });
7048
+ this.webamp.onWillClose(() => {
7049
+ this.updateAppState();
7050
+ });
7051
+ this.webamp.onClose(() => {
7052
+ this.updateAppState();
7053
+ });
7054
+ this.webamp.onMinimize(() => {
7055
+ this.updateAppState();
7056
+ });
7057
+ this.webamp.store.dispatch({
7058
+ type: "ENABLE_MILKDROP",
7059
+ open: false
7060
+ });
7061
+ const ev = ['ended', 'playing', 'timeupdate', 'fileLoaded', 'waiting', 'stopWaiting'];
7062
+
7063
+ this.webamp.__onStateChange(() => {
7064
+ this.updateAppState();
7065
+ });
7066
+
7067
+ ev.forEach(ev => this.webamp.media.on(ev, () => {
7068
+ this.updateAppState();
7069
+ }));
7070
+ }
7071
+
7072
+ }
7073
+
7074
+ /***/ }),
7075
+ /* 27 */
7076
+ /***/ (function(module, exports, __webpack_require__) {
7077
+
7078
+ "use strict";
7079
+ // Copyright Joyent, Inc. and other Node contributors.
7080
+ //
7081
+ // Permission is hereby granted, free of charge, to any person obtaining a
7082
+ // copy of this software and associated documentation files (the
7083
+ // "Software"), to deal in the Software without restriction, including
7084
+ // without limitation the rights to use, copy, modify, merge, publish,
7085
+ // distribute, sublicense, and/or sell copies of the Software, and to permit
7086
+ // persons to whom the Software is furnished to do so, subject to the
7087
+ // following conditions:
7088
+ //
7089
+ // The above copyright notice and this permission notice shall be included
7090
+ // in all copies or substantial portions of the Software.
7091
+ //
7092
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
7093
+ // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
7094
+ // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
7095
+ // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
7096
+ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
7097
+ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
7098
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
7099
+
7100
+ // a duplex stream is just a stream that is both readable and writable.
7101
+ // Since JS doesn't have multiple prototypal inheritance, this class
7102
+ // prototypally inherits from Readable, and then parasitically from
7103
+ // Writable.
7104
+
7105
+
7106
+
7107
+ /*<replacement>*/
7108
+
7109
+ var pna = __webpack_require__(47);
7110
+ /*</replacement>*/
7111
+
7112
+ /*<replacement>*/
7113
+ var objectKeys = Object.keys || function (obj) {
7114
+ var keys = [];
7115
+ for (var key in obj) {
7116
+ keys.push(key);
7117
+ }return keys;
7118
+ };
7119
+ /*</replacement>*/
7120
+
7121
+ module.exports = Duplex;
7122
+
7123
+ /*<replacement>*/
7124
+ var util = Object.create(__webpack_require__(37));
7125
+ util.inherits = __webpack_require__(34);
7126
+ /*</replacement>*/
7127
+
7128
+ var Readable = __webpack_require__(110);
7129
+ var Writable = __webpack_require__(56);
7130
+
7131
+ util.inherits(Duplex, Readable);
7132
+
7133
+ {
7134
+ // avoid scope creep, the keys array can then be collected
7135
+ var keys = objectKeys(Writable.prototype);
7136
+ for (var v = 0; v < keys.length; v++) {
7137
+ var method = keys[v];
7138
+ if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
7139
+ }
7140
+ }
7141
+
7142
+ function Duplex(options) {
7143
+ if (!(this instanceof Duplex)) return new Duplex(options);
7144
+
7145
+ Readable.call(this, options);
7146
+ Writable.call(this, options);
7147
+
7148
+ if (options && options.readable === false) this.readable = false;
7149
+
7150
+ if (options && options.writable === false) this.writable = false;
7151
+
7152
+ this.allowHalfOpen = true;
7153
+ if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
7154
+
7155
+ this.once('end', onend);
7156
+ }
7157
+
7158
+ Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
7159
+ // making it explicit this property is not enumerable
7160
+ // because otherwise some prototype manipulation in
7161
+ // userland will fail
7162
+ enumerable: false,
7163
+ get: function () {
7164
+ return this._writableState.highWaterMark;
7165
+ }
7166
+ });
7167
+
7168
+ // the no-half-open enforcer
7169
+ function onend() {
7170
+ // if we allow half-open state, or if the writable side ended,
7171
+ // then we're ok.
7172
+ if (this.allowHalfOpen || this._writableState.ended) return;
7173
+
7174
+ // no more data can be written.
7175
+ // But allow more writes to happen in this tick.
7176
+ pna.nextTick(onEndNT, this);
7177
+ }
7178
+
7179
+ function onEndNT(self) {
7180
+ self.end();
7181
+ }
7182
+
7183
+ Object.defineProperty(Duplex.prototype, 'destroyed', {
7184
+ get: function () {
7185
+ if (this._readableState === undefined || this._writableState === undefined) {
7186
+ return false;
7187
+ }
7188
+ return this._readableState.destroyed && this._writableState.destroyed;
7189
+ },
7190
+ set: function (value) {
7191
+ // we ignore the value if the stream
7192
+ // has not been initialized yet
7193
+ if (this._readableState === undefined || this._writableState === undefined) {
7194
+ return;
7195
+ }
7196
+
7197
+ // backward compatibility, the user is explicitly
7198
+ // managing destroyed
7199
+ this._readableState.destroyed = value;
7200
+ this._writableState.destroyed = value;
7201
+ }
7202
+ });
7203
+
7204
+ Duplex.prototype._destroy = function (err, cb) {
7205
+ this.push(null);
7206
+ this.end();
7207
+
7208
+ pna.nextTick(cb, err);
7209
+ };
7210
+
7211
+ /***/ }),
7212
+ /* 28 */
7213
+ /***/ (function(module, exports, __webpack_require__) {
6928
7214
 
6929
7215
  var root = __webpack_require__(82);
6930
7216
 
@@ -6935,7 +7221,7 @@ module.exports = Symbol;
6935
7221
 
6936
7222
 
6937
7223
  /***/ }),
6938
- /* 28 */
7224
+ /* 29 */
6939
7225
  /***/ (function(module, exports, __webpack_require__) {
6940
7226
 
6941
7227
  "use strict";
@@ -6947,13 +7233,13 @@ if (true) {
6947
7233
 
6948
7234
 
6949
7235
  /***/ }),
6950
- /* 29 */
7236
+ /* 30 */
6951
7237
  /***/ (function(module, exports, __webpack_require__) {
6952
7238
 
6953
7239
  "use strict";
6954
7240
 
6955
7241
 
6956
- var reactIs = __webpack_require__(28);
7242
+ var reactIs = __webpack_require__(29);
6957
7243
 
6958
7244
  /**
6959
7245
  * Copyright 2015, Yahoo! Inc.
@@ -7022,666 +7308,302 @@ function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
7022
7308
  if (objectPrototype) {
7023
7309
  var inheritedComponent = getPrototypeOf(sourceComponent);
7024
7310
 
7025
- if (inheritedComponent && inheritedComponent !== objectPrototype) {
7026
- hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
7027
- }
7028
- }
7029
-
7030
- var keys = getOwnPropertyNames(sourceComponent);
7031
-
7032
- if (getOwnPropertySymbols) {
7033
- keys = keys.concat(getOwnPropertySymbols(sourceComponent));
7034
- }
7035
-
7036
- var targetStatics = getStatics(targetComponent);
7037
- var sourceStatics = getStatics(sourceComponent);
7038
-
7039
- for (var i = 0; i < keys.length; ++i) {
7040
- var key = keys[i];
7041
-
7042
- if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
7043
- var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
7044
-
7045
- try {
7046
- // Avoid failures from read-only properties
7047
- defineProperty(targetComponent, key, descriptor);
7048
- } catch (e) {}
7049
- }
7050
- }
7051
- }
7052
-
7053
- return targetComponent;
7054
- }
7055
-
7056
- module.exports = hoistNonReactStatics;
7057
-
7058
-
7059
- /***/ }),
7060
- /* 30 */
7061
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
7062
-
7063
- "use strict";
7064
- /* WEBPACK VAR INJECTION */(function(global, module) {/* harmony import */ var _ponyfill_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39);
7065
- /* global window */
7066
-
7067
-
7068
- var root;
7069
-
7070
- if (typeof self !== 'undefined') {
7071
- root = self;
7072
- } else if (typeof window !== 'undefined') {
7073
- root = window;
7074
- } else if (typeof global !== 'undefined') {
7075
- root = global;
7076
- } else if (true) {
7077
- root = module;
7078
- } else {}
7079
-
7080
- var result = Object(_ponyfill_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(root);
7081
- /* harmony default export */ __webpack_exports__["a"] = (result);
7082
-
7083
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(19), __webpack_require__(67)(module)))
7084
-
7085
- /***/ }),
7086
- /* 31 */
7087
- /***/ (function(module, exports, __webpack_require__) {
7088
-
7089
- var parser = __webpack_require__(69);
7090
-
7091
- var creator = __webpack_require__(70);
7092
-
7093
- module.exports = {
7094
- parser: parser,
7095
- creator: creator
7096
- };
7097
-
7098
- /***/ }),
7099
- /* 32 */
7100
- /***/ (function(module, exports) {
7101
-
7102
- // shim for using process in browser
7103
- var process = module.exports = {};
7104
-
7105
- // cached from whatever global is present so that test runners that stub it
7106
- // don't break things. But we need to wrap it in a try catch in case it is
7107
- // wrapped in strict mode code which doesn't define any globals. It's inside a
7108
- // function because try/catches deoptimize in certain engines.
7109
-
7110
- var cachedSetTimeout;
7111
- var cachedClearTimeout;
7112
-
7113
- function defaultSetTimout() {
7114
- throw new Error('setTimeout has not been defined');
7115
- }
7116
- function defaultClearTimeout () {
7117
- throw new Error('clearTimeout has not been defined');
7118
- }
7119
- (function () {
7120
- try {
7121
- if (typeof setTimeout === 'function') {
7122
- cachedSetTimeout = setTimeout;
7123
- } else {
7124
- cachedSetTimeout = defaultSetTimout;
7125
- }
7126
- } catch (e) {
7127
- cachedSetTimeout = defaultSetTimout;
7128
- }
7129
- try {
7130
- if (typeof clearTimeout === 'function') {
7131
- cachedClearTimeout = clearTimeout;
7132
- } else {
7133
- cachedClearTimeout = defaultClearTimeout;
7134
- }
7135
- } catch (e) {
7136
- cachedClearTimeout = defaultClearTimeout;
7137
- }
7138
- } ())
7139
- function runTimeout(fun) {
7140
- if (cachedSetTimeout === setTimeout) {
7141
- //normal enviroments in sane situations
7142
- return setTimeout(fun, 0);
7143
- }
7144
- // if setTimeout wasn't available but was latter defined
7145
- if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
7146
- cachedSetTimeout = setTimeout;
7147
- return setTimeout(fun, 0);
7148
- }
7149
- try {
7150
- // when when somebody has screwed with setTimeout but no I.E. maddness
7151
- return cachedSetTimeout(fun, 0);
7152
- } catch(e){
7153
- try {
7154
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
7155
- return cachedSetTimeout.call(null, fun, 0);
7156
- } catch(e){
7157
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
7158
- return cachedSetTimeout.call(this, fun, 0);
7159
- }
7160
- }
7161
-
7162
-
7163
- }
7164
- function runClearTimeout(marker) {
7165
- if (cachedClearTimeout === clearTimeout) {
7166
- //normal enviroments in sane situations
7167
- return clearTimeout(marker);
7168
- }
7169
- // if clearTimeout wasn't available but was latter defined
7170
- if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
7171
- cachedClearTimeout = clearTimeout;
7172
- return clearTimeout(marker);
7173
- }
7174
- try {
7175
- // when when somebody has screwed with setTimeout but no I.E. maddness
7176
- return cachedClearTimeout(marker);
7177
- } catch (e){
7178
- try {
7179
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
7180
- return cachedClearTimeout.call(null, marker);
7181
- } catch (e){
7182
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
7183
- // Some versions of I.E. have different rules for clearTimeout vs setTimeout
7184
- return cachedClearTimeout.call(this, marker);
7185
- }
7186
- }
7187
-
7188
-
7189
-
7190
- }
7191
- var queue = [];
7192
- var draining = false;
7193
- var currentQueue;
7194
- var queueIndex = -1;
7195
-
7196
- function cleanUpNextTick() {
7197
- if (!draining || !currentQueue) {
7198
- return;
7199
- }
7200
- draining = false;
7201
- if (currentQueue.length) {
7202
- queue = currentQueue.concat(queue);
7203
- } else {
7204
- queueIndex = -1;
7205
- }
7206
- if (queue.length) {
7207
- drainQueue();
7208
- }
7209
- }
7210
-
7211
- function drainQueue() {
7212
- if (draining) {
7213
- return;
7214
- }
7215
- var timeout = runTimeout(cleanUpNextTick);
7216
- draining = true;
7217
-
7218
- var len = queue.length;
7219
- while(len) {
7220
- currentQueue = queue;
7221
- queue = [];
7222
- while (++queueIndex < len) {
7223
- if (currentQueue) {
7224
- currentQueue[queueIndex].run();
7225
- }
7226
- }
7227
- queueIndex = -1;
7228
- len = queue.length;
7229
- }
7230
- currentQueue = null;
7231
- draining = false;
7232
- runClearTimeout(timeout);
7233
- }
7234
-
7235
- process.nextTick = function (fun) {
7236
- var args = new Array(arguments.length - 1);
7237
- if (arguments.length > 1) {
7238
- for (var i = 1; i < arguments.length; i++) {
7239
- args[i - 1] = arguments[i];
7240
- }
7241
- }
7242
- queue.push(new Item(fun, args));
7243
- if (queue.length === 1 && !draining) {
7244
- runTimeout(drainQueue);
7245
- }
7246
- };
7247
-
7248
- // v8 likes predictible objects
7249
- function Item(fun, array) {
7250
- this.fun = fun;
7251
- this.array = array;
7252
- }
7253
- Item.prototype.run = function () {
7254
- this.fun.apply(null, this.array);
7255
- };
7256
- process.title = 'browser';
7257
- process.browser = true;
7258
- process.env = {};
7259
- process.argv = [];
7260
- process.version = ''; // empty string to avoid regexp issues
7261
- process.versions = {};
7262
-
7263
- function noop() {}
7264
-
7265
- process.on = noop;
7266
- process.addListener = noop;
7267
- process.once = noop;
7268
- process.off = noop;
7269
- process.removeListener = noop;
7270
- process.removeAllListeners = noop;
7271
- process.emit = noop;
7272
- process.prependListener = noop;
7273
- process.prependOnceListener = noop;
7274
-
7275
- process.listeners = function (name) { return [] }
7276
-
7277
- process.binding = function (name) {
7278
- throw new Error('process.binding is not supported');
7279
- };
7280
-
7281
- process.cwd = function () { return '/' };
7282
- process.chdir = function (dir) {
7283
- throw new Error('process.chdir is not supported');
7284
- };
7285
- process.umask = function() { return 0; };
7286
-
7287
-
7288
- /***/ }),
7289
- /* 33 */
7290
- /***/ (function(module, exports) {
7291
-
7292
- if (typeof Object.create === 'function') {
7293
- // implementation from standard node.js 'util' module
7294
- module.exports = function inherits(ctor, superCtor) {
7295
- if (superCtor) {
7296
- ctor.super_ = superCtor
7297
- ctor.prototype = Object.create(superCtor.prototype, {
7298
- constructor: {
7299
- value: ctor,
7300
- enumerable: false,
7301
- writable: true,
7302
- configurable: true
7303
- }
7304
- })
7305
- }
7306
- };
7307
- } else {
7308
- // old school shim for old browsers
7309
- module.exports = function inherits(ctor, superCtor) {
7310
- if (superCtor) {
7311
- ctor.super_ = superCtor
7312
- var TempCtor = function () {}
7313
- TempCtor.prototype = superCtor.prototype
7314
- ctor.prototype = new TempCtor()
7315
- ctor.prototype.constructor = ctor
7316
- }
7317
- }
7318
- }
7319
-
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
- // @ts-ignore
7311
+ if (inheritedComponent && inheritedComponent !== objectPrototype) {
7312
+ hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
7313
+ }
7314
+ }
7332
7315
 
7333
- class WinampTelegramCustomHandler {
7334
- constructor(emit) {
7335
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "webamp", void 0);
7316
+ var keys = getOwnPropertyNames(sourceComponent);
7336
7317
 
7337
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "maxFileSize", 0x1400000);
7318
+ if (getOwnPropertySymbols) {
7319
+ keys = keys.concat(getOwnPropertySymbols(sourceComponent));
7320
+ }
7338
7321
 
7339
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "telegram", void 0);
7322
+ var targetStatics = getStatics(targetComponent);
7323
+ var sourceStatics = getStatics(sourceComponent);
7340
7324
 
7341
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "updateAppState", () => {
7342
- localStorage.setItem("appState", JSON.stringify(this.webamp.__getSerializedState()));
7343
- });
7325
+ for (var i = 0; i < keys.length; ++i) {
7326
+ var key = keys[i];
7344
7327
 
7345
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "getFiles", async ln => {
7346
- const x = new XMLHttpRequest();
7347
- const link = encodeURIComponent(ln);
7348
- x.open('get', `https://cloud-api.yandex.net/v1/disk/public/resources?public_key=${link}`, true);
7349
- x.setRequestHeader('Accept', 'application/json');
7350
- x.setRequestHeader('Content-Type', 'application/json');
7351
- x.setRequestHeader('Authorization', 'OAuth 0dc7925ebcf047a1b001c07d6bd5ac49');
7352
- x.send();
7353
-
7354
- x.onload = async () => {
7355
- if (x.status === 200) {
7356
- var _JSON$parse;
7328
+ if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
7329
+ var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
7357
7330
 
7358
- const data = (_JSON$parse = JSON.parse(x.responseText)) === null || _JSON$parse === void 0 ? void 0 : _JSON$parse._embedded.items;
7359
- let i = 0;
7360
- this.saveLastPlaylist(ln);
7331
+ try {
7332
+ // Avoid failures from read-only properties
7333
+ defineProperty(targetComponent, key, descriptor);
7334
+ } catch (e) {}
7335
+ }
7336
+ }
7337
+ }
7361
7338
 
7362
- for (const item of data) {
7363
- if (item.size > this.maxFileSize) {
7364
- console.info(`File ${item.name} can't be loaded due oversize`);
7365
- } else {
7366
- await fetch(`${item.file}&public_key=${item.public_key}`, {
7367
- method: "GET"
7368
- }).then(response => response).then(resp => fetch(resp.url)).then(async response => {
7369
- if (response.status === 302) {
7370
- return await fetch(`${response.headers.get("Location")}&public_key=${item.public_key}`);
7371
- } else {
7372
- return response;
7373
- }
7374
- }).then(res => {
7375
- var _res$body;
7376
-
7377
- console.log(res);
7378
- const read = (_res$body = res.body) === null || _res$body === void 0 ? void 0 : _res$body.getReader();
7379
- return new ReadableStream({
7380
- start(controller) {
7381
- // @ts-ignore
7382
- function pump() {
7383
- // @ts-ignore
7384
- return read === null || read === void 0 ? void 0 : read.read().then(({
7385
- done,
7386
- value
7387
- }) => {
7388
- if (done) {
7389
- controller.close();
7390
- return;
7391
- }
7339
+ return targetComponent;
7340
+ }
7392
7341
 
7393
- controller.enqueue(value);
7394
- return pump();
7395
- });
7396
- }
7342
+ module.exports = hoistNonReactStatics;
7397
7343
 
7398
- return pump();
7399
- }
7400
7344
 
7401
- });
7402
- }).then(stream => new Response(stream)).then(response => response.blob()).then(blob => URL.createObjectURL(blob)).then(uri => {
7403
- if (i === 0) {
7404
- this.webamp.setTracksToPlay([{
7405
- defaultName: item.name,
7406
- url: uri
7407
- }]);
7408
- } else {
7409
- this.webamp.appendTracks([{
7410
- defaultName: item.name,
7411
- url: uri
7412
- }]);
7413
- }
7345
+ /***/ }),
7346
+ /* 31 */
7347
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
7414
7348
 
7415
- i++; // yes, it should be here
7416
- }).catch(err => err);
7417
- }
7418
- }
7419
- }
7420
- };
7421
- });
7349
+ "use strict";
7350
+ /* WEBPACK VAR INJECTION */(function(global, module) {/* harmony import */ var _ponyfill_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39);
7351
+ /* global window */
7422
7352
 
7423
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "getTrackListFromYandexDisk", async playlistLink => {
7424
- fetch(`https://cloud-api.yandex.net/v1/disk/public/resources?public_key=${encodeURIComponent(playlistLink)}`, {
7425
- method: "GET",
7426
- headers: {
7427
- Accept: "application/json",
7428
- "Content-Type": "application/json"
7429
- }
7430
- }).then(async response => {
7431
- if (response.status === 200) {
7432
- return response.text();
7433
- } else {
7434
- return null;
7435
- }
7436
- }).then(async response => {
7437
- if (response !== null) {
7438
- var _JSON$parse2;
7439
7353
 
7440
- const data = (_JSON$parse2 = JSON.parse(response)) === null || _JSON$parse2 === void 0 ? void 0 : _JSON$parse2._embedded.items;
7441
- let i = 0;
7442
- this.saveLastPlaylist(playlistLink);
7354
+ var root;
7443
7355
 
7444
- for (const item of data) {
7445
- if (i === 0) {
7446
- this.webamp.setTracksToPlay([{
7447
- defaultName: item.name,
7448
- url: `${item.file}&public_key=${item.public_key}`
7449
- }]);
7450
- } else {
7451
- this.webamp.appendTracks([{
7452
- defaultName: item.name,
7453
- url: `${item.file}&public_key=${item.public_key}`
7454
- }]);
7455
- }
7456
- }
7457
- }
7458
- });
7459
- });
7356
+ if (typeof self !== 'undefined') {
7357
+ root = self;
7358
+ } else if (typeof window !== 'undefined') {
7359
+ root = window;
7360
+ } else if (typeof global !== 'undefined') {
7361
+ root = global;
7362
+ } else if (true) {
7363
+ root = module;
7364
+ } else {}
7460
7365
 
7461
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "loadTrackFromYandexDisk", async track => {
7462
- let public_key = new URL(track.url).searchParams.get("public_key");
7463
- await fetch(track.url, {
7464
- method: "GET"
7465
- }).then(response => response).then(resp => fetch(resp.url)).then(async response => {
7466
- if (response.status === 302) {
7467
- return await fetch(`${response.headers.get("Location")}&public_key=${public_key}`);
7468
- } else {
7469
- return response;
7470
- }
7471
- }).then(res => {
7472
- var _res$body2;
7366
+ var result = Object(_ponyfill_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(root);
7367
+ /* harmony default export */ __webpack_exports__["a"] = (result);
7473
7368
 
7474
- console.log(res);
7475
- const read = (_res$body2 = res.body) === null || _res$body2 === void 0 ? void 0 : _res$body2.getReader();
7476
- return new ReadableStream({
7477
- start(controller) {
7478
- // @ts-ignore
7479
- function pump() {
7480
- // @ts-ignore
7481
- return read === null || read === void 0 ? void 0 : read.read().then(({
7482
- done,
7483
- value
7484
- }) => {
7485
- if (done) {
7486
- controller.close();
7487
- return;
7488
- }
7369
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(19), __webpack_require__(67)(module)))
7489
7370
 
7490
- controller.enqueue(value);
7491
- return pump();
7492
- });
7493
- }
7371
+ /***/ }),
7372
+ /* 32 */
7373
+ /***/ (function(module, exports, __webpack_require__) {
7494
7374
 
7495
- return pump();
7496
- }
7375
+ var parser = __webpack_require__(69);
7497
7376
 
7498
- });
7499
- }).then(stream => new Response(stream)).then(response => response.blob()).then(blob => URL.createObjectURL(blob)).then(uri => {
7500
- let tracks = this.getAllTracks();
7501
- this.replaceTrack(track, tracks);
7502
- }).catch(err => err);
7503
- });
7377
+ var creator = __webpack_require__(70);
7504
7378
 
7505
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "onTrackNeedToLoad", () => {
7506
- let track = this.getCurrentTrack();
7379
+ module.exports = {
7380
+ parser: parser,
7381
+ creator: creator
7382
+ };
7507
7383
 
7508
- if (track.url.split('/').includes('downloader')) {
7509
- this.loadTrackFromYandexDisk(track);
7510
- }
7511
- });
7384
+ /***/ }),
7385
+ /* 33 */
7386
+ /***/ (function(module, exports) {
7512
7387
 
7513
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "getCurrentTrack", () => {
7514
- let trackId = this.webamp.store.getState().playlist.currentTrack;
7515
- return this.webamp.store.getState().tracks[trackId];
7516
- });
7388
+ // shim for using process in browser
7389
+ var process = module.exports = {};
7517
7390
 
7518
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "getAllTracks", () => {
7519
- return this.webamp.store.getState().tracks;
7520
- });
7391
+ // cached from whatever global is present so that test runners that stub it
7392
+ // don't break things. But we need to wrap it in a try catch in case it is
7393
+ // wrapped in strict mode code which doesn't define any globals. It's inside a
7394
+ // function because try/catches deoptimize in certain engines.
7521
7395
 
7522
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "replaceTrack", (track, tracks) => {
7523
- let a = [];
7524
- Object.entries(tracks).forEach(([_key, value]) => {
7525
- if (value.id === track.id) {
7526
- a.push(track);
7396
+ var cachedSetTimeout;
7397
+ var cachedClearTimeout;
7398
+
7399
+ function defaultSetTimout() {
7400
+ throw new Error('setTimeout has not been defined');
7401
+ }
7402
+ function defaultClearTimeout () {
7403
+ throw new Error('clearTimeout has not been defined');
7404
+ }
7405
+ (function () {
7406
+ try {
7407
+ if (typeof setTimeout === 'function') {
7408
+ cachedSetTimeout = setTimeout;
7527
7409
  } else {
7528
- a.push(value);
7410
+ cachedSetTimeout = defaultSetTimout;
7529
7411
  }
7530
- });
7531
- this.webamp.setTracksToPlay(a);
7532
- });
7533
-
7534
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "saveLastPlaylist", playlistLink => {
7535
- document.cookie = `lastlist=${playlistLink}; path=/;`;
7536
- });
7537
-
7538
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "getCookie", name => {
7539
- const regex = new RegExp(`(^| )${name}=([^;]+)`);
7540
- const match = document.cookie.match(regex);
7541
-
7542
- if (match) {
7543
- return match[2];
7544
- }
7545
- });
7546
-
7547
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "loadOptions2", opts => {
7548
- this.webamp.__loadSerializedState(opts);
7549
- });
7550
-
7551
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "loadOptions", opts => {
7552
- let i = 0;
7553
- let vol = opts.media.volume;
7554
- let balance = opts.media.balance;
7555
- let eq1 = opts.equalizer.sliders.preamp;
7556
- let eq2 = opts.equalizer.sliders["60"];
7557
- let eq3 = opts.equalizer.sliders["170"];
7558
- let eq4 = opts.equalizer.sliders["310"];
7559
- let eq5 = opts.equalizer.sliders["600"];
7560
- let eq6 = opts.equalizer.sliders["1000"];
7561
- let eq7 = opts.equalizer.sliders["3000"];
7562
- let eq8 = opts.equalizer.sliders["6000"];
7563
- let eq9 = opts.equalizer.sliders["12000"];
7564
- let eq10 = opts.equalizer.sliders["14000"];
7565
- let eq11 = opts.equalizer.sliders["16000"];
7566
- let equal = [eq1, eq2, eq3, eq4, eq5, eq6, eq7, eq8, eq9, eq10, eq11];
7567
- let bands = [60, 170, 310, 600, 1000, 3000, 6000, 12000, 14000, 16000];
7568
- this.webamp.store.dispatch({
7569
- type: "SET_VOLUME",
7570
- volume: Object(_utils__WEBPACK_IMPORTED_MODULE_1__[/* clamp */ "d"])(vol, 0, 100)
7571
- });
7572
- this.webamp.store.dispatch({
7573
- type: "SET_BALANCE",
7574
- balance: balance
7575
- });
7576
- this.webamp.store.dispatch({
7577
- type: "SET_BAND_VALUE",
7578
- band: "preamp",
7579
- value: opts.equalizer.sliders.preamp
7580
- });
7412
+ } catch (e) {
7413
+ cachedSetTimeout = defaultSetTimout;
7414
+ }
7415
+ try {
7416
+ if (typeof clearTimeout === 'function') {
7417
+ cachedClearTimeout = clearTimeout;
7418
+ } else {
7419
+ cachedClearTimeout = defaultClearTimeout;
7420
+ }
7421
+ } catch (e) {
7422
+ cachedClearTimeout = defaultClearTimeout;
7423
+ }
7424
+ } ())
7425
+ function runTimeout(fun) {
7426
+ if (cachedSetTimeout === setTimeout) {
7427
+ //normal enviroments in sane situations
7428
+ return setTimeout(fun, 0);
7429
+ }
7430
+ // if setTimeout wasn't available but was latter defined
7431
+ if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
7432
+ cachedSetTimeout = setTimeout;
7433
+ return setTimeout(fun, 0);
7434
+ }
7435
+ try {
7436
+ // when when somebody has screwed with setTimeout but no I.E. maddness
7437
+ return cachedSetTimeout(fun, 0);
7438
+ } catch(e){
7439
+ try {
7440
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
7441
+ return cachedSetTimeout.call(null, fun, 0);
7442
+ } catch(e){
7443
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
7444
+ return cachedSetTimeout.call(this, fun, 0);
7445
+ }
7446
+ }
7581
7447
 
7582
- for (const band of bands) {
7583
- this.webamp.store.dispatch({
7584
- type: "SET_BAND_VALUE",
7585
- band: band,
7586
- value: equal[i]
7587
- });
7588
- i++;
7589
- }
7590
7448
 
7591
- if (window.__webamp.store.getState().media.shuffle !== opts.media.shuffle) {
7592
- this.webamp.store.dispatch({
7593
- type: "TOGGLE_SHUFFLE"
7594
- });
7595
- }
7449
+ }
7450
+ function runClearTimeout(marker) {
7451
+ if (cachedClearTimeout === clearTimeout) {
7452
+ //normal enviroments in sane situations
7453
+ return clearTimeout(marker);
7454
+ }
7455
+ // if clearTimeout wasn't available but was latter defined
7456
+ if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
7457
+ cachedClearTimeout = clearTimeout;
7458
+ return clearTimeout(marker);
7459
+ }
7460
+ try {
7461
+ // when when somebody has screwed with setTimeout but no I.E. maddness
7462
+ return cachedClearTimeout(marker);
7463
+ } catch (e){
7464
+ try {
7465
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
7466
+ return cachedClearTimeout.call(null, marker);
7467
+ } catch (e){
7468
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
7469
+ // Some versions of I.E. have different rules for clearTimeout vs setTimeout
7470
+ return cachedClearTimeout.call(this, marker);
7471
+ }
7472
+ }
7596
7473
 
7597
- if (window.__webamp.store.getState().media.repeat !== opts.media.repeat) {
7598
- this.webamp.store.dispatch({
7599
- type: "TOGGLE_REPEAT"
7600
- });
7601
- }
7602
- });
7603
7474
 
7604
- setTimeout(() => {
7605
- if (!window.__webamp) {
7606
- throw new Error("Webamp __webamp is undefined!!");
7607
- } else {
7608
- this.webamp = window.__webamp;
7609
- }
7610
7475
 
7611
- if (typeof localStorage.getItem('app-state') !== "undefined") {
7612
- this.loadOptions2(JSON.parse(localStorage.getItem('app-state')));
7613
- } // emit
7476
+ }
7477
+ var queue = [];
7478
+ var draining = false;
7479
+ var currentQueue;
7480
+ var queueIndex = -1;
7614
7481
 
7482
+ function cleanUpNextTick() {
7483
+ if (!draining || !currentQueue) {
7484
+ return;
7485
+ }
7486
+ draining = false;
7487
+ if (currentQueue.length) {
7488
+ queue = currentQueue.concat(queue);
7489
+ } else {
7490
+ queueIndex = -1;
7491
+ }
7492
+ if (queue.length) {
7493
+ drainQueue();
7494
+ }
7495
+ }
7615
7496
 
7616
- if (emit !== false) {
7617
- var _window, _window$Telegram;
7497
+ function drainQueue() {
7498
+ if (draining) {
7499
+ return;
7500
+ }
7501
+ var timeout = runTimeout(cleanUpNextTick);
7502
+ draining = true;
7618
7503
 
7619
- const lastList = this.getCookie('lastlist');
7504
+ var len = queue.length;
7505
+ while(len) {
7506
+ currentQueue = queue;
7507
+ queue = [];
7508
+ while (++queueIndex < len) {
7509
+ if (currentQueue) {
7510
+ currentQueue[queueIndex].run();
7511
+ }
7512
+ }
7513
+ queueIndex = -1;
7514
+ len = queue.length;
7515
+ }
7516
+ currentQueue = null;
7517
+ draining = false;
7518
+ runClearTimeout(timeout);
7519
+ }
7620
7520
 
7621
- if (typeof lastList !== "undefined") {
7622
- this.getTrackListFromYandexDisk(lastList);
7623
- } // @ts-ignore | because no global var telegram avail in project types
7521
+ process.nextTick = function (fun) {
7522
+ var args = new Array(arguments.length - 1);
7523
+ if (arguments.length > 1) {
7524
+ for (var i = 1; i < arguments.length; i++) {
7525
+ args[i - 1] = arguments[i];
7526
+ }
7527
+ }
7528
+ queue.push(new Item(fun, args));
7529
+ if (queue.length === 1 && !draining) {
7530
+ runTimeout(drainQueue);
7531
+ }
7532
+ };
7533
+
7534
+ // v8 likes predictible objects
7535
+ function Item(fun, array) {
7536
+ this.fun = fun;
7537
+ this.array = array;
7538
+ }
7539
+ Item.prototype.run = function () {
7540
+ this.fun.apply(null, this.array);
7541
+ };
7542
+ process.title = 'browser';
7543
+ process.browser = true;
7544
+ process.env = {};
7545
+ process.argv = [];
7546
+ process.version = ''; // empty string to avoid regexp issues
7547
+ process.versions = {};
7624
7548
 
7549
+ function noop() {}
7625
7550
 
7626
- if (!((_window = window) !== null && _window !== void 0 && (_window$Telegram = _window.Telegram) !== null && _window$Telegram !== void 0 && _window$Telegram.WebApp)) {
7627
- console.error("Telegram is undefined!! Skipping Telegram.WebApp event handler...");
7628
- } else {
7629
- var _window2, _window2$Telegram;
7551
+ process.on = noop;
7552
+ process.addListener = noop;
7553
+ process.once = noop;
7554
+ process.off = noop;
7555
+ process.removeListener = noop;
7556
+ process.removeAllListeners = noop;
7557
+ process.emit = noop;
7558
+ process.prependListener = noop;
7559
+ process.prependOnceListener = noop;
7630
7560
 
7631
- // @ts-ignore | because no global var telegram avail in project types
7632
- this.telegram = (_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$Telegram = _window2.Telegram) === null || _window2$Telegram === void 0 ? void 0 : _window2$Telegram.WebApp;
7633
- this.initializeTelegramWebAppEvents();
7634
- }
7561
+ process.listeners = function (name) { return [] }
7635
7562
 
7636
- this.initializeApplicationHandlers();
7637
- }
7638
- }, 1000);
7639
- }
7563
+ process.binding = function (name) {
7564
+ throw new Error('process.binding is not supported');
7565
+ };
7640
7566
 
7641
- initializeTelegramWebAppEvents() {
7642
- this.telegram.offEvent("deactivated", () => {
7643
- this.updateAppState();
7644
- });
7645
- }
7567
+ process.cwd = function () { return '/' };
7568
+ process.chdir = function (dir) {
7569
+ throw new Error('process.chdir is not supported');
7570
+ };
7571
+ process.umask = function() { return 0; };
7646
7572
 
7647
- initializeApplicationHandlers() {
7648
- const window_handlers = ['unload', 'beforeunload', 'pagehide'];
7649
- window_handlers.forEach(handler => {
7650
- window.addEventListener(handler, () => {
7651
- this.updateAppState();
7652
- });
7653
- });
7654
- this.webamp.onTrackDidChange(() => {
7655
- console.log(this.webamp.store.getState());
7656
- this.updateAppState();
7657
- });
7658
- this.webamp.onWillClose(() => {
7659
- this.updateAppState();
7660
- });
7661
- this.webamp.onClose(() => {
7662
- this.updateAppState();
7663
- });
7664
- this.webamp.onMinimize(() => {
7665
- this.updateAppState();
7666
- });
7667
- this.webamp.store.dispatch({
7668
- type: "ENABLE_MILKDROP",
7669
- open: false
7670
- });
7671
- const ev = ['ended', 'playing', 'timeupdate', 'fileLoaded', 'waiting', 'stopWaiting'];
7672
7573
 
7673
- this.webamp.__onStateChange(() => {
7674
- this.onTrackNeedToLoad();
7675
- this.updateAppState();
7676
- });
7574
+ /***/ }),
7575
+ /* 34 */
7576
+ /***/ (function(module, exports) {
7677
7577
 
7678
- ev.forEach(ev => this.webamp.media.on(ev, () => {
7679
- this.updateAppState();
7680
- }));
7578
+ if (typeof Object.create === 'function') {
7579
+ // implementation from standard node.js 'util' module
7580
+ module.exports = function inherits(ctor, superCtor) {
7581
+ if (superCtor) {
7582
+ ctor.super_ = superCtor
7583
+ ctor.prototype = Object.create(superCtor.prototype, {
7584
+ constructor: {
7585
+ value: ctor,
7586
+ enumerable: false,
7587
+ writable: true,
7588
+ configurable: true
7589
+ }
7590
+ })
7591
+ }
7592
+ };
7593
+ } else {
7594
+ // old school shim for old browsers
7595
+ module.exports = function inherits(ctor, superCtor) {
7596
+ if (superCtor) {
7597
+ ctor.super_ = superCtor
7598
+ var TempCtor = function () {}
7599
+ TempCtor.prototype = superCtor.prototype
7600
+ ctor.prototype = new TempCtor()
7601
+ ctor.prototype.constructor = ctor
7602
+ }
7681
7603
  }
7682
-
7683
7604
  }
7684
7605
 
7606
+
7685
7607
  /***/ }),
7686
7608
  /* 35 */
7687
7609
  /***/ (function(module, exports, __webpack_require__) {
@@ -8504,7 +8426,7 @@ function nextTick(fn, arg1, arg2, arg3) {
8504
8426
  }
8505
8427
 
8506
8428
 
8507
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(32)))
8429
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(33)))
8508
8430
 
8509
8431
  /***/ }),
8510
8432
  /* 48 */
@@ -9065,11 +8987,11 @@ function _objectWithoutPropertiesLoose(source, excluded) {
9065
8987
  return target;
9066
8988
  }
9067
8989
  // EXTERNAL MODULE: /home/exezt-/Projects/webamp/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js
9068
- var hoist_non_react_statics_cjs = __webpack_require__(29);
8990
+ var hoist_non_react_statics_cjs = __webpack_require__(30);
9069
8991
  var hoist_non_react_statics_cjs_default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics_cjs);
9070
8992
 
9071
8993
  // EXTERNAL MODULE: /home/exezt-/Projects/webamp/node_modules/react-is/index.js
9072
- var react_is = __webpack_require__(28);
8994
+ var react_is = __webpack_require__(29);
9073
8995
 
9074
8996
  // CONCATENATED MODULE: /home/exezt-/Projects/webamp/node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js
9075
8997
  // React currently throws a warning when using useLayoutEffect on the server.
@@ -13086,7 +13008,7 @@ function toggleEqAuto() {
13086
13008
  };
13087
13009
  }
13088
13010
  // EXTERNAL MODULE: ../winamp-eqf/index.js
13089
- var winamp_eqf = __webpack_require__(31);
13011
+ var winamp_eqf = __webpack_require__(32);
13090
13012
 
13091
13013
  // CONCATENATED MODULE: ./js/skinSprites.ts
13092
13014
 
@@ -15220,7 +15142,7 @@ function selectAll() {
15220
15142
  };
15221
15143
  }
15222
15144
  // EXTERNAL MODULE: ./js/lib/webamp-telegram-handler.ts
15223
- var webamp_telegram_handler = __webpack_require__(34);
15145
+ var webamp_telegram_handler = __webpack_require__(26);
15224
15146
 
15225
15147
  // CONCATENATED MODULE: ./js/actionCreators/files.ts
15226
15148
 
@@ -15647,21 +15569,20 @@ function files_addFilesFromUrl(atIndex = 0) {
15647
15569
  // };
15648
15570
  }
15649
15571
  function files_addFilesFromList() {
15650
- return async (dispatch, getState, {
15651
- handleLoadListEvent
15652
- }) => {
15653
- if (handleLoadListEvent) {
15654
- const tracks = await handleLoadListEvent();
15655
-
15656
- if (tracks != null) {
15657
- dispatch(playlist_removeAllTracks());
15658
- dispatch(files_loadMediaFiles(tracks, constants["e" /* LOAD_STYLE */].NONE, 0));
15659
- return;
15660
- }
15661
- } else {
15662
- alert("Not supported in Webamp");
15663
- }
15664
- };
15572
+ new webamp_telegram_handler["a" /* default */](false).loadCustomTracks(); // return async (dispatch, getState, { handleLoadListEvent }) => {
15573
+ // if (handleLoadListEvent) {
15574
+ // const tracks = await handleLoadListEvent();
15575
+ //
15576
+ // if (tracks != null) {
15577
+ // dispatch(removeAllTracks());
15578
+ //
15579
+ // dispatch(loadMediaFiles(tracks, LOAD_STYLE.NONE, 0));
15580
+ // return;
15581
+ // }
15582
+ // } else {
15583
+ // alert("Not supported in Webamp");
15584
+ // }
15585
+ // };
15665
15586
  }
15666
15587
  function files_saveFilesToList() {
15667
15588
  return (dispatch, getState, {
@@ -23168,7 +23089,7 @@ exports = module.exports = __webpack_require__(110);
23168
23089
  exports.Stream = exports;
23169
23090
  exports.Readable = exports;
23170
23091
  exports.Writable = __webpack_require__(56);
23171
- exports.Duplex = __webpack_require__(26);
23092
+ exports.Duplex = __webpack_require__(27);
23172
23093
  exports.Transform = __webpack_require__(114);
23173
23094
  exports.PassThrough = __webpack_require__(156);
23174
23095
 
@@ -23245,7 +23166,7 @@ Writable.WritableState = WritableState;
23245
23166
 
23246
23167
  /*<replacement>*/
23247
23168
  var util = Object.create(__webpack_require__(37));
23248
- util.inherits = __webpack_require__(33);
23169
+ util.inherits = __webpack_require__(34);
23249
23170
  /*</replacement>*/
23250
23171
 
23251
23172
  /*<replacement>*/
@@ -23278,7 +23199,7 @@ util.inherits(Writable, Stream);
23278
23199
  function nop() {}
23279
23200
 
23280
23201
  function WritableState(options, stream) {
23281
- Duplex = Duplex || __webpack_require__(26);
23202
+ Duplex = Duplex || __webpack_require__(27);
23282
23203
 
23283
23204
  options = options || {};
23284
23205
 
@@ -23428,7 +23349,7 @@ if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.protot
23428
23349
  }
23429
23350
 
23430
23351
  function Writable(options) {
23431
- Duplex = Duplex || __webpack_require__(26);
23352
+ Duplex = Duplex || __webpack_require__(27);
23432
23353
 
23433
23354
  // Writable ctor is applied to Duplexes, too.
23434
23355
  // `realHasInstance` is necessary because using plain `instanceof`
@@ -23865,7 +23786,7 @@ Writable.prototype._destroy = function (err, cb) {
23865
23786
  this.end();
23866
23787
  cb(err);
23867
23788
  };
23868
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(32), __webpack_require__(107).setImmediate, __webpack_require__(19)))
23789
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(33), __webpack_require__(107).setImmediate, __webpack_require__(19)))
23869
23790
 
23870
23791
  /***/ }),
23871
23792
  /* 57 */
@@ -25012,7 +24933,7 @@ module.exports = toString;
25012
24933
  /* 81 */
25013
24934
  /***/ (function(module, exports, __webpack_require__) {
25014
24935
 
25015
- var Symbol = __webpack_require__(27),
24936
+ var Symbol = __webpack_require__(28),
25016
24937
  arrayMap = __webpack_require__(84),
25017
24938
  isArray = __webpack_require__(85),
25018
24939
  isSymbol = __webpack_require__(86);
@@ -25175,7 +25096,7 @@ module.exports = isSymbol;
25175
25096
  /* 87 */
25176
25097
  /***/ (function(module, exports, __webpack_require__) {
25177
25098
 
25178
- var Symbol = __webpack_require__(27),
25099
+ var Symbol = __webpack_require__(28),
25179
25100
  getRawTag = __webpack_require__(88),
25180
25101
  objectToString = __webpack_require__(89);
25181
25102
 
@@ -25209,7 +25130,7 @@ module.exports = baseGetTag;
25209
25130
  /* 88 */
25210
25131
  /***/ (function(module, exports, __webpack_require__) {
25211
25132
 
25212
- var Symbol = __webpack_require__(27);
25133
+ var Symbol = __webpack_require__(28);
25213
25134
 
25214
25135
  /** Used for built-in method references. */
25215
25136
  var objectProto = Object.prototype;
@@ -27082,7 +27003,7 @@ fileType.stream = readableStream => new Promise((resolve, reject) => {
27082
27003
  module.exports = Stream;
27083
27004
 
27084
27005
  var EE = __webpack_require__(54).EventEmitter;
27085
- var inherits = __webpack_require__(33);
27006
+ var inherits = __webpack_require__(34);
27086
27007
 
27087
27008
  inherits(Stream, EE);
27088
27009
  Stream.Readable = __webpack_require__(55);
@@ -27259,7 +27180,7 @@ function _isUint8Array(obj) {
27259
27180
 
27260
27181
  /*<replacement>*/
27261
27182
  var util = Object.create(__webpack_require__(37));
27262
- util.inherits = __webpack_require__(33);
27183
+ util.inherits = __webpack_require__(34);
27263
27184
  /*</replacement>*/
27264
27185
 
27265
27186
  /*<replacement>*/
@@ -27293,7 +27214,7 @@ function prependListener(emitter, event, fn) {
27293
27214
  }
27294
27215
 
27295
27216
  function ReadableState(options, stream) {
27296
- Duplex = Duplex || __webpack_require__(26);
27217
+ Duplex = Duplex || __webpack_require__(27);
27297
27218
 
27298
27219
  options = options || {};
27299
27220
 
@@ -27370,7 +27291,7 @@ function ReadableState(options, stream) {
27370
27291
  }
27371
27292
 
27372
27293
  function Readable(options) {
27373
- Duplex = Duplex || __webpack_require__(26);
27294
+ Duplex = Duplex || __webpack_require__(27);
27374
27295
 
27375
27296
  if (!(this instanceof Readable)) return new Readable(options);
27376
27297
 
@@ -28211,7 +28132,7 @@ function indexOf(xs, x) {
28211
28132
  }
28212
28133
  return -1;
28213
28134
  }
28214
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(19), __webpack_require__(32)))
28135
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(19), __webpack_require__(33)))
28215
28136
 
28216
28137
  /***/ }),
28217
28138
  /* 111 */
@@ -28674,11 +28595,11 @@ function simpleEnd(buf) {
28674
28595
 
28675
28596
  module.exports = Transform;
28676
28597
 
28677
- var Duplex = __webpack_require__(26);
28598
+ var Duplex = __webpack_require__(27);
28678
28599
 
28679
28600
  /*<replacement>*/
28680
28601
  var util = Object.create(__webpack_require__(37));
28681
- util.inherits = __webpack_require__(33);
28602
+ util.inherits = __webpack_require__(34);
28682
28603
  /*</replacement>*/
28683
28604
 
28684
28605
  util.inherits(Transform, Duplex);
@@ -29453,7 +29374,7 @@ __webpack_require__.r(__webpack_exports__);
29453
29374
  /* harmony import */ var music_metadata_browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(119);
29454
29375
  /* harmony import */ var music_metadata_browser__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(music_metadata_browser__WEBPACK_IMPORTED_MODULE_2__);
29455
29376
  /* harmony import */ var _webampLazy__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(51);
29456
- /* harmony import */ var _lib_webamp_telegram_handler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(34);
29377
+ /* harmony import */ var _lib_webamp_telegram_handler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(26);
29457
29378
 
29458
29379
 
29459
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; }
@@ -29824,7 +29745,7 @@ function fromByteArray (uint8) {
29824
29745
  attachTo.clearImmediate = clearImmediate;
29825
29746
  }(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self));
29826
29747
 
29827
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(19), __webpack_require__(32)))
29748
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(19), __webpack_require__(33)))
29828
29749
 
29829
29750
  /***/ }),
29830
29751
  /* 123 */
@@ -31384,7 +31305,7 @@ function callbackify(original) {
31384
31305
  }
31385
31306
  exports.callbackify = callbackify;
31386
31307
 
31387
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(32)))
31308
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(33)))
31388
31309
 
31389
31310
  /***/ }),
31390
31311
  /* 130 */
@@ -33946,7 +33867,7 @@ var Transform = __webpack_require__(114);
33946
33867
 
33947
33868
  /*<replacement>*/
33948
33869
  var util = Object.create(__webpack_require__(37));
33949
- util.inherits = __webpack_require__(33);
33870
+ util.inherits = __webpack_require__(34);
33950
33871
  /*</replacement>*/
33951
33872
 
33952
33873
  util.inherits(PassThrough, Transform);
@@ -33972,7 +33893,7 @@ module.exports = __webpack_require__(56);
33972
33893
  /* 158 */
33973
33894
  /***/ (function(module, exports, __webpack_require__) {
33974
33895
 
33975
- module.exports = __webpack_require__(26);
33896
+ module.exports = __webpack_require__(27);
33976
33897
 
33977
33898
 
33978
33899
  /***/ }),