artalk 2.4.3 → 2.4.4

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.
@@ -1277,6 +1277,9 @@ function GetLayerWrap(ctx) {
1277
1277
  _defineProperties(Constructor.prototype, protoProps);
1278
1278
  if (staticProps)
1279
1279
  _defineProperties(Constructor, staticProps);
1280
+ Object.defineProperty(Constructor, "prototype", {
1281
+ writable: false
1282
+ });
1280
1283
  return Constructor;
1281
1284
  }
1282
1285
  function _inherits(subClass, superClass) {
@@ -1290,17 +1293,20 @@ function GetLayerWrap(ctx) {
1290
1293
  configurable: true
1291
1294
  }
1292
1295
  });
1296
+ Object.defineProperty(subClass, "prototype", {
1297
+ writable: false
1298
+ });
1293
1299
  if (superClass)
1294
1300
  _setPrototypeOf(subClass, superClass);
1295
1301
  }
1296
1302
  function _getPrototypeOf(o) {
1297
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf2(o2) {
1303
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf2(o2) {
1298
1304
  return o2.__proto__ || Object.getPrototypeOf(o2);
1299
1305
  };
1300
1306
  return _getPrototypeOf(o);
1301
1307
  }
1302
1308
  function _setPrototypeOf(o, p) {
1303
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf2(o2, p2) {
1309
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) {
1304
1310
  o2.__proto__ = p2;
1305
1311
  return o2;
1306
1312
  };
@@ -1330,6 +1336,8 @@ function GetLayerWrap(ctx) {
1330
1336
  function _possibleConstructorReturn(self2, call) {
1331
1337
  if (call && (typeof call === "object" || typeof call === "function")) {
1332
1338
  return call;
1339
+ } else if (call !== void 0) {
1340
+ throw new TypeError("Derived constructors may only return object or undefined");
1333
1341
  }
1334
1342
  return _assertThisInitialized(self2);
1335
1343
  }
@@ -1354,22 +1362,22 @@ function GetLayerWrap(ctx) {
1354
1362
  }
1355
1363
  return object;
1356
1364
  }
1357
- function _get(target, property, receiver) {
1365
+ function _get() {
1358
1366
  if (typeof Reflect !== "undefined" && Reflect.get) {
1359
- _get = Reflect.get;
1367
+ _get = Reflect.get.bind();
1360
1368
  } else {
1361
- _get = function _get2(target2, property2, receiver2) {
1362
- var base = _superPropBase(target2, property2);
1369
+ _get = function _get2(target, property, receiver) {
1370
+ var base = _superPropBase(target, property);
1363
1371
  if (!base)
1364
1372
  return;
1365
- var desc = Object.getOwnPropertyDescriptor(base, property2);
1373
+ var desc = Object.getOwnPropertyDescriptor(base, property);
1366
1374
  if (desc.get) {
1367
- return desc.get.call(receiver2);
1375
+ return desc.get.call(arguments.length < 3 ? target : receiver);
1368
1376
  }
1369
1377
  return desc.value;
1370
1378
  };
1371
1379
  }
1372
- return _get(target, property, receiver || target);
1380
+ return _get.apply(this, arguments);
1373
1381
  }
1374
1382
  var Emitter = /* @__PURE__ */ function() {
1375
1383
  function Emitter2() {
@@ -1451,6 +1459,11 @@ function GetLayerWrap(ctx) {
1451
1459
  writable: true,
1452
1460
  configurable: true
1453
1461
  });
1462
+ Object.defineProperty(_assertThisInitialized(_this), "reason", {
1463
+ value: void 0,
1464
+ writable: true,
1465
+ configurable: true
1466
+ });
1454
1467
  return _this;
1455
1468
  }
1456
1469
  _createClass(AbortSignal2, [{
@@ -1483,7 +1496,7 @@ function GetLayerWrap(ctx) {
1483
1496
  }
1484
1497
  _createClass(AbortController3, [{
1485
1498
  key: "abort",
1486
- value: function abort() {
1499
+ value: function abort(reason) {
1487
1500
  var event;
1488
1501
  try {
1489
1502
  event = new Event("abort");
@@ -1504,6 +1517,21 @@ function GetLayerWrap(ctx) {
1504
1517
  };
1505
1518
  }
1506
1519
  }
1520
+ var signalReason = reason;
1521
+ if (signalReason === void 0) {
1522
+ if (typeof document === "undefined") {
1523
+ signalReason = new Error("This operation was aborted");
1524
+ signalReason.name = "AbortError";
1525
+ } else {
1526
+ try {
1527
+ signalReason = new DOMException("signal is aborted without reason");
1528
+ } catch (err) {
1529
+ signalReason = new Error("This operation was aborted");
1530
+ signalReason.name = "AbortError";
1531
+ }
1532
+ }
1533
+ }
1534
+ this.signal.reason = signalReason;
1507
1535
  this.signal.dispatchEvent(event);
1508
1536
  }
1509
1537
  }, {
@@ -2133,7 +2161,7 @@ class Api {
2133
2161
  return `${this.ctx.conf.server}/api`;
2134
2162
  }
2135
2163
  }
2136
- const version = "2.4.3";
2164
+ const version = "2.4.4";
2137
2165
  const backendMinVersion = "2.3.0";
2138
2166
  const ListHTML = '<div class="atk-list">\n <div class="atk-list-header">\n <div class="atk-comment-count">\n <div class="atk-text"></div>\n </div>\n <div class="atk-right-action">\n <span data-action="admin-close-comment" class="atk-hide" atk-only-admin-show></span>\n <span data-action="open-sidebar" class="atk-hide atk-on">\n <span class="atk-unread-badge" style="display: none;"></span>\n <div class="atk-text"></div>\n </span>\n </div>\n </div>\n <div class="atk-list-body"></div>\n <div class="atk-list-footer">\n <div class="atk-copyright"></div>\n </div>\n</div>\n';
2139
2167
  const win = window || {};
@@ -4037,8 +4065,6 @@ class Context {
4037
4065
  return getI18n(this.conf.locale, key, args);
4038
4066
  }
4039
4067
  setDarkMode(darkMode) {
4040
- if (this.conf.darkMode === darkMode)
4041
- return;
4042
4068
  const darkModeClassName = "atk-dark-mode";
4043
4069
  this.conf.darkMode = darkMode;
4044
4070
  if (darkMode)
@@ -5157,6 +5183,8 @@ class Editor extends Component {
5157
5183
  this.openedPlugName = null;
5158
5184
  this.$plugBtnWrap.innerHTML = "";
5159
5185
  const disabledPlugs = [];
5186
+ if (!this.conf.imgUpload)
5187
+ disabledPlugs.push("upload");
5160
5188
  if (!this.conf.emoticons)
5161
5189
  disabledPlugs.push("emoticons");
5162
5190
  if (!this.conf.preview)