@inpageedit/core 0.17.0 → 0.17.1
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/dist/InPageEdit.js +1 -1
- package/dist/{PluginImagesUsed-CD7t5kqv.js → PluginImagesUsed-D5O8t694.js} +2 -2
- package/dist/{PluginImagesUsed-CD7t5kqv.js.map → PluginImagesUsed-D5O8t694.js.map} +1 -1
- package/dist/{PluginPrefSync-DgKVDgiK.js → PluginPrefSync-C8tb5SJJ.js} +2 -2
- package/dist/{PluginPrefSync-DgKVDgiK.js.map → PluginPrefSync-C8tb5SJJ.js.map} +1 -1
- package/dist/{PluginStoreApp-BwiAYQMA.js → PluginStoreApp-CeKtXL3p.js} +2 -2
- package/dist/{PluginStoreApp-BwiAYQMA.js.map → PluginStoreApp-CeKtXL3p.js.map} +1 -1
- package/dist/{PluginTemplatesUsed-CmYn48Wd.js → PluginTemplatesUsed-DYv_lbHw.js} +2 -2
- package/dist/{PluginTemplatesUsed-CmYn48Wd.js.map → PluginTemplatesUsed-DYv_lbHw.js.map} +1 -1
- package/dist/core.js +2 -2
- package/dist/{index-C4ncbyR6.js → index--IhZKYnh.js} +3 -3
- package/dist/index--IhZKYnh.js.map +1 -0
- package/dist/{index-BMd6Bo6r.js → index-Bf6ewNGZ.js} +2 -2
- package/dist/{index-BMd6Bo6r.js.map → index-Bf6ewNGZ.js.map} +1 -1
- package/dist/{index-BTLjDVvD.js → index-BuSA1t5R.js} +2 -2
- package/dist/{index-BTLjDVvD.js.map → index-BuSA1t5R.js.map} +1 -1
- package/dist/{index-BfW7ObKf.js → index-CaTtMzfu.js} +112 -101
- package/dist/index-CaTtMzfu.js.map +1 -0
- package/dist/{index-CZ56EKIK.js → index-CxjH0_fO.js} +2 -2
- package/dist/{index-CZ56EKIK.js.map → index-CxjH0_fO.js.map} +1 -1
- package/dist/{index-Cjyf3z1w.js → index-DSh05RaI.js} +3 -3
- package/dist/{index-Cjyf3z1w.js.map → index-DSh05RaI.js.map} +1 -1
- package/dist/{index-BvHXETfl.js → index-Dp_n8QEV.js} +2 -2
- package/dist/{index-BvHXETfl.js.map → index-Dp_n8QEV.js.map} +1 -1
- package/dist/{index-Dfp9Vp36.js → index-Mi3qr9J0.js} +2 -2
- package/dist/{index-Dfp9Vp36.js.map → index-Mi3qr9J0.js.map} +1 -1
- package/dist/{index-C2_G8gLW.js → index-QtXlz9l0.js} +3 -3
- package/dist/{index-C2_G8gLW.js.map → index-QtXlz9l0.js.map} +1 -1
- package/dist/{index-5DLUhCA3.js → index-_Sydb5MZ.js} +391 -356
- package/dist/index-_Sydb5MZ.js.map +1 -0
- package/dist/{index-B5UcAL5E.js → index-fa8d4Dv_.js} +2 -2
- package/dist/{index-B5UcAL5E.js.map → index-fa8d4Dv_.js.map} +1 -1
- package/dist/{index-s7aFr-gn.js → index-h57rl1RH.js} +11 -11
- package/dist/index-h57rl1RH.js.map +1 -0
- package/dist/{index-siZBRSp0.js → index-qbW7-LUD.js} +3 -3
- package/dist/index-qbW7-LUD.js.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2 -2
- package/dist/plugins/index.js +12 -12
- package/dist/services/index.js +1 -1
- package/lib/index.umd.js +15 -15
- package/lib/index.umd.js.map +1 -1
- package/package.json +2 -2
- package/dist/index-5DLUhCA3.js.map +0 -1
- package/dist/index-BfW7ObKf.js.map +0 -1
- package/dist/index-C4ncbyR6.js.map +0 -1
- package/dist/index-s7aFr-gn.js.map +0 -1
- package/dist/index-siZBRSp0.js.map +0 -1
|
@@ -48,14 +48,14 @@ function ji(i, e) {
|
|
|
48
48
|
return e.every((t) => i.includes(t));
|
|
49
49
|
}
|
|
50
50
|
S(ji, "contain");
|
|
51
|
-
function
|
|
51
|
+
function Ti(i, e) {
|
|
52
52
|
return i.filter((t) => e.includes(t));
|
|
53
53
|
}
|
|
54
|
-
S(
|
|
55
|
-
function
|
|
54
|
+
S(Ti, "intersection");
|
|
55
|
+
function Di(i, e) {
|
|
56
56
|
return i.filter((t) => !e.includes(t));
|
|
57
57
|
}
|
|
58
|
-
S(
|
|
58
|
+
S(Di, "difference");
|
|
59
59
|
function Ni(i, e) {
|
|
60
60
|
return Array.from(/* @__PURE__ */ new Set([...i, ...e]));
|
|
61
61
|
}
|
|
@@ -394,7 +394,7 @@ function Oe(i, e, t) {
|
|
|
394
394
|
return j(r, "name", i), Object.setPrototypeOf(r, e);
|
|
395
395
|
}
|
|
396
396
|
k(Oe, "createCallable");
|
|
397
|
-
var Yi = class
|
|
397
|
+
var Yi = class X {
|
|
398
398
|
constructor(e) {
|
|
399
399
|
this.ctx = e, j(this, b.tracker, {
|
|
400
400
|
associate: "reflect",
|
|
@@ -422,18 +422,18 @@ var Yi = class Q {
|
|
|
422
422
|
if (typeof t != "string") return Reflect.get(e, t, r);
|
|
423
423
|
if (Reflect.has(e, t))
|
|
424
424
|
return U(r, Reflect.get(e, t, r), !0);
|
|
425
|
-
const [n, s] =
|
|
426
|
-
return s ? s.type === "accessor" ? s.get.call(r, r[b.receiver]) : (s.builtin ||
|
|
425
|
+
const [n, s] = X.resolveInject(e, t), o = new Error(`property ${n} is not registered, declare it as \`inject\` to suppress this warning`);
|
|
426
|
+
return s ? s.type === "accessor" ? s.get.call(r, r[b.receiver]) : (s.builtin || X.checkInject(r, n, o), r.reflect.get(n)) : (X.checkInject(r, n, o), Reflect.get(e, n, r));
|
|
427
427
|
}, "get"),
|
|
428
428
|
set: /* @__PURE__ */ k((e, t, r, n) => {
|
|
429
429
|
if (typeof t != "string") return Reflect.set(e, t, r, n);
|
|
430
|
-
const [s, o] =
|
|
430
|
+
const [s, o] = X.resolveInject(e, t);
|
|
431
431
|
return o ? o.type === "accessor" ? o.set ? o.set.call(n, r, n[b.receiver]) : !1 : (n.reflect.set(s, r), !0) : Reflect.set(e, s, r, n);
|
|
432
432
|
}, "set"),
|
|
433
433
|
has: /* @__PURE__ */ k((e, t) => {
|
|
434
434
|
if (typeof t != "string") return Reflect.has(e, t);
|
|
435
435
|
if (Reflect.has(e, t)) return !0;
|
|
436
|
-
const [, r] =
|
|
436
|
+
const [, r] = X.resolveInject(e, t);
|
|
437
437
|
return !!r;
|
|
438
438
|
}, "has")
|
|
439
439
|
};
|
|
@@ -625,7 +625,7 @@ var Ji = class {
|
|
|
625
625
|
async stop() {
|
|
626
626
|
this.isActive = !1, this.ctx.scope.reset();
|
|
627
627
|
}
|
|
628
|
-
},
|
|
628
|
+
}, Qi = Ji, Xi = /* @__PURE__ */ ((i) => (i[i.PENDING = 0] = "PENDING", i[i.LOADING = 1] = "LOADING", i[i.ACTIVE = 2] = "ACTIVE", i[i.FAILED = 3] = "FAILED", i[i.DISPOSED = 4] = "DISPOSED", i))(Xi || {}), Le = class Ct extends Error {
|
|
629
629
|
constructor(e, t) {
|
|
630
630
|
super(t ?? Ct.Code[e]), this.code = e;
|
|
631
631
|
}
|
|
@@ -977,7 +977,7 @@ var er = class {
|
|
|
977
977
|
constructor(e) {
|
|
978
978
|
e = oe(this.constructor, e), this[b.store] = /* @__PURE__ */ Object.create(null), this[b.isolate] = /* @__PURE__ */ Object.create(null), this[b.internal] = /* @__PURE__ */ Object.create(null), this[b.intercept] = /* @__PURE__ */ Object.create(null);
|
|
979
979
|
const t = new Proxy(this, Pe.handler);
|
|
980
|
-
t.root = t, t.reflect = new Pe(t), t.registry = new tr(t, e), t.lifecycle = new
|
|
980
|
+
t.root = t, t.reflect = new Pe(t), t.registry = new tr(t, e), t.lifecycle = new Qi(t);
|
|
981
981
|
const r = /* @__PURE__ */ k((n) => {
|
|
982
982
|
if (n) {
|
|
983
983
|
r(Object.getPrototypeOf(n));
|
|
@@ -1652,7 +1652,7 @@ function cr(i) {
|
|
|
1652
1652
|
function lr(i) {
|
|
1653
1653
|
return new Ke(i);
|
|
1654
1654
|
}
|
|
1655
|
-
class
|
|
1655
|
+
class Te extends _i {
|
|
1656
1656
|
async clientLogin(e, t, r) {
|
|
1657
1657
|
r ||= {}, !r.logincontinue && !r.loginreturnurl && (r.loginreturnurl = location?.origin);
|
|
1658
1658
|
const n = await this.postWithToken(
|
|
@@ -1676,7 +1676,7 @@ class De extends _i {
|
|
|
1676
1676
|
);
|
|
1677
1677
|
}
|
|
1678
1678
|
}
|
|
1679
|
-
class hr extends
|
|
1679
|
+
class hr extends Te {
|
|
1680
1680
|
constructor(e, t, r) {
|
|
1681
1681
|
const n = Si(
|
|
1682
1682
|
e,
|
|
@@ -1696,7 +1696,7 @@ class hr extends De {
|
|
|
1696
1696
|
class ur {
|
|
1697
1697
|
constructor(e, t = {}) {
|
|
1698
1698
|
this.ctx = e, this.options = t, this._apiClients = /* @__PURE__ */ new Map(), location?.href && t?.baseURL?.toString()?.startsWith("/") && (t.baseURL = new URL(t.baseURL, location.origin));
|
|
1699
|
-
const r = this.api = new
|
|
1699
|
+
const r = this.api = new Te({
|
|
1700
1700
|
baseURL: t.baseURL.toString(),
|
|
1701
1701
|
fexiosConfigs: {
|
|
1702
1702
|
headers: {
|
|
@@ -1717,7 +1717,7 @@ class ur {
|
|
|
1717
1717
|
const n = t.origin === location.origin, s = {
|
|
1718
1718
|
baseURL: t.toString(),
|
|
1719
1719
|
throwOnApiError: !0
|
|
1720
|
-
}, o = n ? new
|
|
1720
|
+
}, o = n ? new Te(s) : new hr(s);
|
|
1721
1721
|
o.request.on("beforeRequest", (a) => {
|
|
1722
1722
|
a.headers = o.request.mergeHeaders(a.headers, {
|
|
1723
1723
|
"x-api-user-agent": null,
|
|
@@ -1731,17 +1731,17 @@ class ur {
|
|
|
1731
1731
|
const pt = (i, e = document) => e.querySelector(i), vs = (i, e = document) => e.querySelectorAll(i);
|
|
1732
1732
|
var fr = Object.create, qe = Object.defineProperty, dr = Object.getOwnPropertyDescriptor, Rt = (i, e) => (e = Symbol[i]) ? e : /* @__PURE__ */ Symbol.for("Symbol." + i), jt = (i) => {
|
|
1733
1733
|
throw TypeError(i);
|
|
1734
|
-
}, pr = (i, e, t) => e in i ? qe(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, gr = (i, e) => qe(i, "name", { value: e, configurable: !0 }), mr = (i) => [, , , fr(i?.[Rt("metadata")] ?? null)], yr = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"],
|
|
1734
|
+
}, pr = (i, e, t) => e in i ? qe(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, gr = (i, e) => qe(i, "name", { value: e, configurable: !0 }), mr = (i) => [, , , fr(i?.[Rt("metadata")] ?? null)], yr = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], Tt = (i) => i !== void 0 && typeof i != "function" ? jt("Function expected") : i, wr = (i, e, t, r, n) => ({ kind: yr[i], name: e, metadata: r, addInitializer: (s) => t._ ? jt("Already initialized") : n.push(Tt(s || null)) }), br = (i, e) => pr(e, Rt("metadata"), i[3]), vr = (i, e, t, r) => {
|
|
1735
1735
|
for (var n = 0, s = i[e >> 1], o = s && s.length; n < o; n++) s[n].call(t);
|
|
1736
1736
|
return r;
|
|
1737
1737
|
}, _r = (i, e, t, r, n, s) => {
|
|
1738
1738
|
var o, a, f, u = e & 7, p = !1, y = 0, _ = i[y] || (i[y] = []), g = u && (n = n.prototype, u < 5 && (u > 3 || !p) && dr(n, t));
|
|
1739
1739
|
gr(n, t);
|
|
1740
1740
|
for (var w = r.length - 1; w >= 0; w--)
|
|
1741
|
-
f = wr(u, t, a = {}, i[3], _), o = (0, r[w])(n, f), a._ = 1,
|
|
1741
|
+
f = wr(u, t, a = {}, i[3], _), o = (0, r[w])(n, f), a._ = 1, Tt(o) && (n = o);
|
|
1742
1742
|
return br(i, n), g && qe(n, t, g), p ? u ^ 4 ? s : g : n;
|
|
1743
|
-
},
|
|
1744
|
-
|
|
1743
|
+
}, Dt, We, Nt;
|
|
1744
|
+
Dt = [F(["wiki", "wikiTitle"])];
|
|
1745
1745
|
let de = class Z extends (Nt = z) {
|
|
1746
1746
|
constructor(e) {
|
|
1747
1747
|
super(e, "currentPage", !1), this.ctx = e, this.#e = this.#r.bind(this), this.url = new URL(window.location.href), this.isMainPage = void 0, this.wikiTitle = void 0;
|
|
@@ -1815,7 +1815,7 @@ let de = class Z extends (Nt = z) {
|
|
|
1815
1815
|
}
|
|
1816
1816
|
};
|
|
1817
1817
|
We = mr(Nt);
|
|
1818
|
-
de = _r(We, 0, "CurrentPageService",
|
|
1818
|
+
de = _r(We, 0, "CurrentPageService", Dt, de);
|
|
1819
1819
|
vr(We, 1, de);
|
|
1820
1820
|
let xr = de;
|
|
1821
1821
|
class kr extends z {
|
|
@@ -1892,7 +1892,7 @@ function Er(i) {
|
|
|
1892
1892
|
function Ar(i) {
|
|
1893
1893
|
return J(i) && typeof i.length == "number" && typeof i.nodeType != "number";
|
|
1894
1894
|
}
|
|
1895
|
-
function
|
|
1895
|
+
function De(i, e) {
|
|
1896
1896
|
if (i)
|
|
1897
1897
|
for (const t of xe(i))
|
|
1898
1898
|
e(i[t], t);
|
|
@@ -1961,14 +1961,14 @@ var Bt = /* @__PURE__ */ (function(i) {
|
|
|
1961
1961
|
function Lr(i) {
|
|
1962
1962
|
return i != null && i[Ir] === Bt.ShadowRoot;
|
|
1963
1963
|
}
|
|
1964
|
-
const Rr = "http://www.w3.org/2000/svg", jr = "http://www.w3.org/1999/xlink",
|
|
1964
|
+
const Rr = "http://www.w3.org/2000/svg", jr = "http://www.w3.org/1999/xlink", Tr = "http://www.w3.org/XML/1998/namespace";
|
|
1965
1965
|
function Ut(i) {
|
|
1966
1966
|
return !Sr(i) && i != null;
|
|
1967
1967
|
}
|
|
1968
1968
|
function Me(i) {
|
|
1969
1969
|
return Array.isArray(i) ? i.map(Me).filter(Boolean).join(" ") : J(i) ? Symbol.iterator in i ? Me(Array.from(i)) : xe(i).filter((e) => i[e]).join(" ") : Ut(i) ? "" + i : "";
|
|
1970
1970
|
}
|
|
1971
|
-
const
|
|
1971
|
+
const Dr = {
|
|
1972
1972
|
animate: 0,
|
|
1973
1973
|
circle: 0,
|
|
1974
1974
|
clipPath: 0,
|
|
@@ -2038,7 +2038,7 @@ function Br(i, e, t) {
|
|
|
2038
2038
|
}
|
|
2039
2039
|
function P(i, e) {
|
|
2040
2040
|
let { children: t, ...r } = e;
|
|
2041
|
-
!r.namespaceURI &&
|
|
2041
|
+
!r.namespaceURI && Dr[i] === 0 && (r = {
|
|
2042
2042
|
...r,
|
|
2043
2043
|
namespaceURI: Rr
|
|
2044
2044
|
});
|
|
@@ -2094,7 +2094,7 @@ function le(i, e) {
|
|
|
2094
2094
|
return i.replace(/[A-Z]/g, (t) => e + t.toLowerCase());
|
|
2095
2095
|
}
|
|
2096
2096
|
function Ft(i, e) {
|
|
2097
|
-
e == null || e === !1 || (Array.isArray(e) ? e.forEach((t) => Ft(i, t)) : Ge(e) ? i.setAttribute("style", e) : J(e) &&
|
|
2097
|
+
e == null || e === !1 || (Array.isArray(e) ? e.forEach((t) => Ft(i, t)) : Ge(e) ? i.setAttribute("style", e) : J(e) && De(e, (t, r) => {
|
|
2098
2098
|
r.indexOf("-") === 0 ? i.style.setProperty(r, t) : Mt(t) && Ne[r] !== 0 ? i.style[r] = t + "px" : i.style[r] = t;
|
|
2099
2099
|
}));
|
|
2100
2100
|
}
|
|
@@ -2110,20 +2110,20 @@ function Fr(i, e, t) {
|
|
|
2110
2110
|
gt(t, jr, le(i, ":"), e);
|
|
2111
2111
|
return;
|
|
2112
2112
|
case "xmlnsXlink":
|
|
2113
|
-
|
|
2113
|
+
Q(t, le(i, ":"), e);
|
|
2114
2114
|
return;
|
|
2115
2115
|
case "xmlBase":
|
|
2116
2116
|
case "xmlLang":
|
|
2117
2117
|
case "xmlSpace":
|
|
2118
|
-
gt(t,
|
|
2118
|
+
gt(t, Tr, le(i, ":"), e);
|
|
2119
2119
|
return;
|
|
2120
2120
|
}
|
|
2121
2121
|
switch (i) {
|
|
2122
2122
|
case "htmlFor":
|
|
2123
|
-
|
|
2123
|
+
Q(t, "for", e);
|
|
2124
2124
|
return;
|
|
2125
2125
|
case "dataset":
|
|
2126
|
-
|
|
2126
|
+
De(e, (r, n) => {
|
|
2127
2127
|
r != null && (t.dataset[n] = r);
|
|
2128
2128
|
});
|
|
2129
2129
|
return;
|
|
@@ -2148,7 +2148,7 @@ function Fr(i, e, t) {
|
|
|
2148
2148
|
return;
|
|
2149
2149
|
case "class":
|
|
2150
2150
|
case "className":
|
|
2151
|
-
ne(e) ? e(t) :
|
|
2151
|
+
ne(e) ? e(t) : Q(t, "class", Me(e));
|
|
2152
2152
|
return;
|
|
2153
2153
|
case "ref":
|
|
2154
2154
|
case "namespaceURI":
|
|
@@ -2158,7 +2158,7 @@ function Fr(i, e, t) {
|
|
|
2158
2158
|
return;
|
|
2159
2159
|
case "on":
|
|
2160
2160
|
case "onCapture":
|
|
2161
|
-
|
|
2161
|
+
De(e, (r, n) => {
|
|
2162
2162
|
t.addEventListener(n, r, i === "onCapture");
|
|
2163
2163
|
});
|
|
2164
2164
|
return;
|
|
@@ -2180,9 +2180,9 @@ function Fr(i, e, t) {
|
|
|
2180
2180
|
r in window ? s = r.substring(2) : s = r[2] + i.slice(3), t.addEventListener(s, e);
|
|
2181
2181
|
}
|
|
2182
2182
|
}
|
|
2183
|
-
} else J(e) ? t[i] = e : e === !0 ?
|
|
2183
|
+
} else J(e) ? t[i] = e : e === !0 ? Q(t, i, "") : e !== !1 && e != null && (t instanceof SVGElement && !Nr.test(i) ? Q(t, le(i, "-"), e) : Q(t, i, e));
|
|
2184
2184
|
}
|
|
2185
|
-
function
|
|
2185
|
+
function Q(i, e, t) {
|
|
2186
2186
|
i.setAttribute(e, t);
|
|
2187
2187
|
}
|
|
2188
2188
|
function gt(i, e, t, r) {
|
|
@@ -2216,7 +2216,7 @@ function yt(i) {
|
|
|
2216
2216
|
(t) => !!(t.offsetWidth || t.offsetHeight || t.getClientRects().length)
|
|
2217
2217
|
);
|
|
2218
2218
|
}
|
|
2219
|
-
function
|
|
2219
|
+
function T(i, e = {}) {
|
|
2220
2220
|
const t = document.createElement(i);
|
|
2221
2221
|
if (e.className && (t.className = e.className), e.html != null && (t.innerHTML = e.html), e.text != null && (t.textContent = e.text), e.attrs)
|
|
2222
2222
|
for (const [r, n] of Object.entries(e.attrs)) t.setAttribute(r, n);
|
|
@@ -2298,7 +2298,7 @@ class Gr {
|
|
|
2298
2298
|
document.body.classList.remove("ipe-modal-no-scroll");
|
|
2299
2299
|
}
|
|
2300
2300
|
}
|
|
2301
|
-
const
|
|
2301
|
+
const D = new Gr();
|
|
2302
2302
|
class pe {
|
|
2303
2303
|
constructor(e = {}) {
|
|
2304
2304
|
this.backdropId = mt("ipe-modal-backdrop"), this.modalId = mt("ipe-modal"), this.numberId = this.modalId.split("-")[1], this._isDestroyed = !1, this.pluginName = "normalModal", this.buttonElsLeft = [], this.buttonElsRight = [], this.keyMap = /* @__PURE__ */ new Map(), this.isOpen = !1, this.isToast = !1, this.isDragging = !1, this.dragStartX = 0, this.dragStartY = 0, this.modalStartX = 0, this.modalStartY = 0, this.Event = Ye, this._hooks = [], this.startCloseTimer = (t) => {
|
|
@@ -2351,11 +2351,11 @@ class pe {
|
|
|
2351
2351
|
if (this.$modal) return this;
|
|
2352
2352
|
const e = this.options.backdrop !== !1;
|
|
2353
2353
|
let t;
|
|
2354
|
-
e && (t =
|
|
2354
|
+
e && (t = T("div", {
|
|
2355
2355
|
className: "ipe-modal-backdrop",
|
|
2356
2356
|
attrs: { id: this.backdropId, "data-modal-id": this.modalId }
|
|
2357
2357
|
}));
|
|
2358
|
-
const r =
|
|
2358
|
+
const r = T("div", {
|
|
2359
2359
|
className: "ipe-modal-modal",
|
|
2360
2360
|
attrs: { id: this.modalId, role: "dialog", "aria-modal": "true", tabindex: "-1" }
|
|
2361
2361
|
});
|
|
@@ -2366,18 +2366,18 @@ class pe {
|
|
|
2366
2366
|
r.style.left = `${w + O / 2 - r.offsetWidth / 2}px`;
|
|
2367
2367
|
});
|
|
2368
2368
|
}
|
|
2369
|
-
const n =
|
|
2369
|
+
const n = T("div", {
|
|
2370
2370
|
className: `ipe-modal-modal__window size--${this.options.sizeClass || "auto"} plugin--${this.pluginName}`
|
|
2371
2371
|
});
|
|
2372
2372
|
n.modal = this;
|
|
2373
|
-
const s =
|
|
2373
|
+
const s = T("div", { className: "ipe-modal-modal__header" }), o = `${this.modalId}-title`, a = T("h2", {
|
|
2374
2374
|
className: "ipe-modal-modal__title",
|
|
2375
2375
|
attrs: { id: o, role: "heading", "aria-level": "2" }
|
|
2376
2376
|
});
|
|
2377
2377
|
r.setAttribute("aria-labelledby", o);
|
|
2378
|
-
const f =
|
|
2378
|
+
const f = T("div", { className: "ipe-modal-modal__icons" });
|
|
2379
2379
|
if (this.options.closeIcon) {
|
|
2380
|
-
const g =
|
|
2380
|
+
const g = T("button", {
|
|
2381
2381
|
className: "ipe-modal-modal__close",
|
|
2382
2382
|
attrs: { type: "button", "aria-label": "Close" },
|
|
2383
2383
|
html: "×"
|
|
@@ -2388,9 +2388,9 @@ class pe {
|
|
|
2388
2388
|
}), f.appendChild(g);
|
|
2389
2389
|
}
|
|
2390
2390
|
s.append(a, f), this.options.draggable && e && (this.options.draggable = !1), this.options.draggable && (s.style.cursor = "move", s.style.userSelect = "none", s.addEventListener("pointerdown", this.onDragStart.bind(this)), r.classList.add("is-draggable"));
|
|
2391
|
-
const u =
|
|
2391
|
+
const u = T("div", { className: "ipe-modal-modal__content" }), p = T("div", { className: "ipe-modal-modal__footer" }), y = T("div", {
|
|
2392
2392
|
className: "ipe-modal-modal__buttons ipe-modal-modal__buttons--left"
|
|
2393
|
-
}), _ =
|
|
2393
|
+
}), _ = T("div", {
|
|
2394
2394
|
className: "ipe-modal-modal__buttons ipe-modal-modal__buttons--right"
|
|
2395
2395
|
});
|
|
2396
2396
|
return p.append(y, _), n.append(s, u, p), r.appendChild(n), this.$backdrop = t, this.$modal = r, this.$window = n, this.$header = s, this.$title = a, this.$icons = f, this.$content = u, this.$footer = p, this.$buttonsLeft = y, this.$buttonsRight = _, this.options.title && this.setTitle(this.options.title), this.options.content && this.setContent(this.options.content), this.options.buttons?.length ? this.setButtons(this.options.buttons) : p.style.display = "none", this.options.center && this.$modal.classList.add("is-centered"), this.options.fitScreen && this.$modal.classList.add("is-fullscreen"), this.options.iconButtons && this.$header.classList.add("has-icon-buttons"), this.options.className && this.$window.classList.add(...this.options.className.split(/[\s\.#+]+/g).filter(Boolean)), typeof this.options.fixedHeight == "number" ? this.$window.style.height = `${Math.max(0, this.options.fixedHeight)}px` : this.options.fixedHeight === !0 && this.$window.classList.add("is-fixed-height"), t && t.addEventListener("pointerup", (g) => {
|
|
@@ -2409,9 +2409,9 @@ class pe {
|
|
|
2409
2409
|
const r = this.emit("modal.beforeShow", !0), n = this.options.beforeShow ? this.options.beforeShow(this) !== !1 : !0;
|
|
2410
2410
|
if (!r || !n) return this;
|
|
2411
2411
|
}
|
|
2412
|
-
this.lastFocused = document.activeElement ?? null, this.$backdrop && document.body.appendChild(this.$backdrop), document.body.appendChild(this.$modal), this.shouldLockBodyOnOpen() &&
|
|
2412
|
+
this.lastFocused = document.activeElement ?? null, this.$backdrop && document.body.appendChild(this.$backdrop), document.body.appendChild(this.$modal), this.shouldLockBodyOnOpen() && D.lockBodyScroll(), requestAnimationFrame(() => {
|
|
2413
2413
|
this.$backdrop?.classList.add("is-open"), this.$modal.classList.add("is-open"), this.applyAnimation(!0), this.focusFirst();
|
|
2414
|
-
}), document.addEventListener("keydown", this.onKeyDown),
|
|
2414
|
+
}), document.addEventListener("keydown", this.onKeyDown), D.push(this), this.isOpen = !0, this.options.onShow?.(this), this.emit(
|
|
2415
2415
|
"modal.show"
|
|
2416
2416
|
/* Show */
|
|
2417
2417
|
);
|
|
@@ -2468,7 +2468,7 @@ class pe {
|
|
|
2468
2468
|
const e = V.indexOf(this);
|
|
2469
2469
|
e !== -1 && V.splice(e, 1);
|
|
2470
2470
|
} else
|
|
2471
|
-
this.$backdrop?.parentElement && this.$backdrop.parentElement.removeChild(this.$backdrop), this.$modal?.parentElement && this.$modal.parentElement.removeChild(this.$modal),
|
|
2471
|
+
this.$backdrop?.parentElement && this.$backdrop.parentElement.removeChild(this.$backdrop), this.$modal?.parentElement && this.$modal.parentElement.removeChild(this.$modal), D.remove(this), this.shouldUnlockBodyOnClose() && D.unlockBodyScroll();
|
|
2472
2472
|
return this.isOpen = !1, this.lastFocused?.focus?.(), this.emit(
|
|
2473
2473
|
"modal.destroy"
|
|
2474
2474
|
/* Destroy */
|
|
@@ -2512,7 +2512,7 @@ class pe {
|
|
|
2512
2512
|
const t = this.get$icons();
|
|
2513
2513
|
t.innerHTML = "";
|
|
2514
2514
|
for (const r of e) {
|
|
2515
|
-
const n =
|
|
2515
|
+
const n = T("button", {
|
|
2516
2516
|
className: `ipe-modal-modal__icon ${r.className}`,
|
|
2517
2517
|
attrs: { type: "button" }
|
|
2518
2518
|
});
|
|
@@ -2536,7 +2536,7 @@ class pe {
|
|
|
2536
2536
|
return this;
|
|
2537
2537
|
}
|
|
2538
2538
|
generateButton(e) {
|
|
2539
|
-
const t = e.type ?? "button", r = t === "link" ?
|
|
2539
|
+
const t = e.type ?? "button", r = t === "link" ? T("a") : T("button", { attrs: { type: "button" } });
|
|
2540
2540
|
e.id && (r.id = e.id), r.className = `ipe-modal-btn ${e.className ?? ""}`.trim();
|
|
2541
2541
|
const n = ee(e.label ?? "OK");
|
|
2542
2542
|
if (r.append(n), t === "link" && e.href && (r.href = e.href), e.method && r.addEventListener("click", (s) => {
|
|
@@ -2630,7 +2630,7 @@ class pe {
|
|
|
2630
2630
|
t.length ? t[0].focus() : e.focus({ preventScroll: !0 });
|
|
2631
2631
|
}
|
|
2632
2632
|
onKeyDown(e) {
|
|
2633
|
-
if (
|
|
2633
|
+
if (D.top() !== this) return;
|
|
2634
2634
|
if (e.key === "Escape") {
|
|
2635
2635
|
e.preventDefault(), this.close();
|
|
2636
2636
|
return;
|
|
@@ -2657,19 +2657,19 @@ class pe {
|
|
|
2657
2657
|
}
|
|
2658
2658
|
/** Bring this modal to the top of the stack. */
|
|
2659
2659
|
bringToFront() {
|
|
2660
|
-
return
|
|
2660
|
+
return D.remove(this), D.push(this), this;
|
|
2661
2661
|
}
|
|
2662
2662
|
isAnimationDisabled() {
|
|
2663
2663
|
const e = this.options.modalAnimation ?? this.options.animation;
|
|
2664
2664
|
return e === !1 || e == null;
|
|
2665
2665
|
}
|
|
2666
2666
|
shouldLockBodyOnOpen() {
|
|
2667
|
-
return this.options.backdrop === !1 || this.options.bodyScroll !== !1 ? !1 : !
|
|
2667
|
+
return this.options.backdrop === !1 || this.options.bodyScroll !== !1 ? !1 : !D.stack.some(
|
|
2668
2668
|
(e) => e !== this && e.options.backdrop !== !1 && e.options.bodyScroll === !1
|
|
2669
2669
|
);
|
|
2670
2670
|
}
|
|
2671
2671
|
shouldUnlockBodyOnClose() {
|
|
2672
|
-
return this.options.backdrop === !1 || this.options.bodyScroll !== !1 ? !1 : !
|
|
2672
|
+
return this.options.backdrop === !1 || this.options.bodyScroll !== !1 ? !1 : !D.stack.some(
|
|
2673
2673
|
(e) => e !== this && e.options.backdrop !== !1 && e.options.bodyScroll === !1
|
|
2674
2674
|
);
|
|
2675
2675
|
}
|
|
@@ -2704,10 +2704,10 @@ class pe {
|
|
|
2704
2704
|
}
|
|
2705
2705
|
static close(e) {
|
|
2706
2706
|
if (!e) {
|
|
2707
|
-
const s =
|
|
2707
|
+
const s = D.top();
|
|
2708
2708
|
return s?.close(), s;
|
|
2709
2709
|
}
|
|
2710
|
-
const t = typeof e == "string" ? e : e.id, r =
|
|
2710
|
+
const t = typeof e == "string" ? e : e.id, r = D.stack.find((s) => s.modalId === t);
|
|
2711
2711
|
if (r)
|
|
2712
2712
|
return r.close(), r;
|
|
2713
2713
|
const n = V.find((s) => s.modalId === t);
|
|
@@ -2715,13 +2715,13 @@ class pe {
|
|
|
2715
2715
|
}
|
|
2716
2716
|
static closeAll(e, t) {
|
|
2717
2717
|
const r = new Set((Array.isArray(t) ? t : t ? [t] : []).map(String)), n = new Set((Array.isArray(e) ? e : e ? [e] : []).map(String));
|
|
2718
|
-
return
|
|
2718
|
+
return D.closeAll(e, t), [...V].forEach((s) => {
|
|
2719
2719
|
const o = s.modalId, a = n.size ? n.has(s.pluginName) : !0, f = r.has(o);
|
|
2720
2720
|
a && !f && s.close();
|
|
2721
|
-
}),
|
|
2721
|
+
}), D.top() ?? new pe();
|
|
2722
2722
|
}
|
|
2723
2723
|
static removeAll() {
|
|
2724
|
-
|
|
2724
|
+
D.removeAll(), [...V].forEach((e) => e.destroy());
|
|
2725
2725
|
}
|
|
2726
2726
|
static dialog(e, t) {
|
|
2727
2727
|
const r = new this({
|
|
@@ -2911,7 +2911,7 @@ const V = [];
|
|
|
2911
2911
|
function Vr(i = "top right") {
|
|
2912
2912
|
const e = "ipe-modal-toast-container", t = `${e}-${i.replace(/[\s-\.|\/]+/g, "-")}`;
|
|
2913
2913
|
let r = document.getElementById(t);
|
|
2914
|
-
return r || (r =
|
|
2914
|
+
return r || (r = T("div", {
|
|
2915
2915
|
className: `${e} ${i}`,
|
|
2916
2916
|
attrs: { id: t, "data-position": i }
|
|
2917
2917
|
}), document.body.appendChild(r)), r;
|
|
@@ -2996,18 +2996,18 @@ const Ht = (i) => {
|
|
|
2996
2996
|
n.set(o, a);
|
|
2997
2997
|
return r.search = n.toString(), r.hash = "", r;
|
|
2998
2998
|
};
|
|
2999
|
-
var Jr = Object.create, Je = Object.defineProperty,
|
|
2999
|
+
var Jr = Object.create, Je = Object.defineProperty, Qr = Object.getOwnPropertyDescriptor, qt = (i, e) => (e = Symbol[i]) ? e : /* @__PURE__ */ Symbol.for("Symbol." + i), Wt = (i) => {
|
|
3000
3000
|
throw TypeError(i);
|
|
3001
|
-
},
|
|
3001
|
+
}, Xr = (i, e, t) => e in i ? Je(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, Zr = (i, e) => Je(i, "name", { value: e, configurable: !0 }), en = (i) => [, , , Jr(i?.[qt("metadata")] ?? null)], tn = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], Gt = (i) => i !== void 0 && typeof i != "function" ? Wt("Function expected") : i, rn = (i, e, t, r, n) => ({ kind: tn[i], name: e, metadata: r, addInitializer: (s) => t._ ? Wt("Already initialized") : n.push(Gt(s || null)) }), nn = (i, e) => Xr(e, qt("metadata"), i[3]), sn = (i, e, t, r) => {
|
|
3002
3002
|
for (var n = 0, s = i[e >> 1], o = s && s.length; n < o; n++) s[n].call(t);
|
|
3003
3003
|
return r;
|
|
3004
3004
|
}, on = (i, e, t, r, n, s) => {
|
|
3005
|
-
var o, a, f, u = e & 7, p = !1, y = 0, _ = i[y] || (i[y] = []), g = u && (n = n.prototype, u < 5 && (u > 3 || !p) &&
|
|
3005
|
+
var o, a, f, u = e & 7, p = !1, y = 0, _ = i[y] || (i[y] = []), g = u && (n = n.prototype, u < 5 && (u > 3 || !p) && Qr(n, t));
|
|
3006
3006
|
Zr(n, t);
|
|
3007
3007
|
for (var w = r.length - 1; w >= 0; w--)
|
|
3008
3008
|
f = rn(u, t, a = {}, i[3], _), o = (0, r[w])(n, f), a._ = 1, Gt(o) && (n = o);
|
|
3009
3009
|
return nn(i, n), g && Je(n, t, g), p ? u ^ 4 ? s : g : n;
|
|
3010
|
-
}, Vt,
|
|
3010
|
+
}, Vt, Qe, Yt;
|
|
3011
3011
|
Vt = [F(["api", "storage"])];
|
|
3012
3012
|
class ge extends (Yt = z) {
|
|
3013
3013
|
constructor(e) {
|
|
@@ -3287,9 +3287,9 @@ class ge extends (Yt = z) {
|
|
|
3287
3287
|
} : null;
|
|
3288
3288
|
}
|
|
3289
3289
|
}
|
|
3290
|
-
|
|
3291
|
-
ge = on(
|
|
3292
|
-
sn(
|
|
3290
|
+
Qe = en(Yt);
|
|
3291
|
+
ge = on(Qe, 0, "WikiMetadataService", Vt, ge);
|
|
3292
|
+
sn(Qe, 1, ge);
|
|
3293
3293
|
const an = (() => {
|
|
3294
3294
|
const i = /* @__PURE__ */ Symbol.for("IPE.GlobalMemoryStorage");
|
|
3295
3295
|
return i in globalThis || (globalThis[i] = $i()), globalThis[i];
|
|
@@ -3780,10 +3780,12 @@ function fn(i) {
|
|
|
3780
3780
|
return Ae(o, i.darkClasses) || t.length > 0 && Ae(o, t) && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
3781
3781
|
},
|
|
3782
3782
|
startObserving(o) {
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3783
|
+
if (!r) {
|
|
3784
|
+
r = new MutationObserver(o);
|
|
3785
|
+
for (const a of wt(e))
|
|
3786
|
+
r.observe(a, { attributes: !0, attributeFilter: ["class"] });
|
|
3787
|
+
t.length > 0 && (n = window.matchMedia("(prefers-color-scheme: dark)"), s = o, n.addEventListener("change", s));
|
|
3788
|
+
}
|
|
3787
3789
|
},
|
|
3788
3790
|
stopObserving() {
|
|
3789
3791
|
r?.disconnect(), r = null, n && s && (n.removeEventListener("change", s), n = null, s = null);
|
|
@@ -3822,9 +3824,9 @@ const dn = [
|
|
|
3822
3824
|
target: "html"
|
|
3823
3825
|
}
|
|
3824
3826
|
];
|
|
3825
|
-
var pn = Object.create,
|
|
3827
|
+
var pn = Object.create, Xe = Object.defineProperty, gn = Object.getOwnPropertyDescriptor, Qt = (i, e) => (e = Symbol[i]) ? e : /* @__PURE__ */ Symbol.for("Symbol." + i), Xt = (i) => {
|
|
3826
3828
|
throw TypeError(i);
|
|
3827
|
-
}, mn = (i, e, t) => e in i ?
|
|
3829
|
+
}, mn = (i, e, t) => e in i ? Xe(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, yn = (i, e) => Xe(i, "name", { value: e, configurable: !0 }), wn = (i) => [, , , pn(i?.[Qt("metadata")] ?? null)], bn = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], Zt = (i) => i !== void 0 && typeof i != "function" ? Xt("Function expected") : i, vn = (i, e, t, r, n) => ({ kind: bn[i], name: e, metadata: r, addInitializer: (s) => t._ ? Xt("Already initialized") : n.push(Zt(s || null)) }), _n = (i, e) => mn(e, Qt("metadata"), i[3]), xn = (i, e, t, r) => {
|
|
3828
3830
|
for (var n = 0, s = i[e >> 1], o = s && s.length; n < o; n++) s[n].call(t);
|
|
3829
3831
|
return r;
|
|
3830
3832
|
}, kn = (i, e, t, r, n, s) => {
|
|
@@ -3832,7 +3834,7 @@ var pn = Object.create, Qe = Object.defineProperty, gn = Object.getOwnPropertyDe
|
|
|
3832
3834
|
yn(n, t);
|
|
3833
3835
|
for (var w = r.length - 1; w >= 0; w--)
|
|
3834
3836
|
f = vn(u, t, a = {}, i[3], _), o = (0, r[w])(n, f), a._ = 1, Zt(o) && (n = o);
|
|
3835
|
-
return _n(i, n), g &&
|
|
3837
|
+
return _n(i, n), g && Xe(n, t, g), p ? u ^ 4 ? s : g : n;
|
|
3836
3838
|
}, ei, Ze, ti;
|
|
3837
3839
|
ei = [F(["preferences"]), Jt(
|
|
3838
3840
|
$.object({
|
|
@@ -3846,7 +3848,7 @@ ei = [F(["preferences"]), Jt(
|
|
|
3846
3848
|
)];
|
|
3847
3849
|
class me extends (ti = z) {
|
|
3848
3850
|
constructor(e) {
|
|
3849
|
-
super(e, "theme", !1), this.ctx = e, this._mediaQueryList = null, this.adapters = [], this.activeAdapter = null, this._handleSystemThemeChange = this._onSystemThemeChange.bind(this);
|
|
3851
|
+
super(e, "theme", !1), this.ctx = e, this._mediaQueryList = null, this.adapters = [], this.activeAdapter = null, this._applyingTheme = !1, this._applyThemeQueued = !1, this._handleSystemThemeChange = this._onSystemThemeChange.bind(this);
|
|
3850
3852
|
}
|
|
3851
3853
|
async start() {
|
|
3852
3854
|
this._mediaQueryList = window.matchMedia("(prefers-color-scheme: dark)"), this._mediaQueryList.addEventListener("change", this._handleSystemThemeChange);
|
|
@@ -3875,10 +3877,19 @@ class me extends (ti = z) {
|
|
|
3875
3877
|
await this.applyTheme();
|
|
3876
3878
|
}
|
|
3877
3879
|
async applyTheme() {
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3880
|
+
if (this._applyingTheme) {
|
|
3881
|
+
this._applyThemeQueued = !0;
|
|
3882
|
+
return;
|
|
3883
|
+
}
|
|
3884
|
+
this._applyingTheme = !0;
|
|
3885
|
+
try {
|
|
3886
|
+
const e = await this.ctx.preferences.get("theme") || "auto";
|
|
3887
|
+
this.updateSiteObserver(e);
|
|
3888
|
+
const t = this.getTheme(e);
|
|
3889
|
+
this.applyThemeClass(t), this.ctx.emit("theme/changed", { ctx: this.ctx, theme: t });
|
|
3890
|
+
} finally {
|
|
3891
|
+
this._applyingTheme = !1, this._applyThemeQueued && (this._applyThemeQueued = !1, this.applyTheme());
|
|
3892
|
+
}
|
|
3882
3893
|
}
|
|
3883
3894
|
updateSiteObserver(e) {
|
|
3884
3895
|
e === "site" && this.activeAdapter ? this.activeAdapter.startObserving(() => this.applyTheme()) : this.activeAdapter?.stopObserving();
|
|
@@ -3888,7 +3899,7 @@ class me extends (ti = z) {
|
|
|
3888
3899
|
}
|
|
3889
3900
|
applyThemeClass(e) {
|
|
3890
3901
|
const t = document.body;
|
|
3891
|
-
e === "dark" ? (t.classList.add("ipe-theme-dark"), t.setAttribute("data-ipe-theme", "dark")) : (t.classList.remove("ipe-theme-dark"), t.setAttribute("data-ipe-theme", "light"));
|
|
3902
|
+
t.getAttribute("data-ipe-theme") !== e && (e === "dark" ? (t.classList.add("ipe-theme-dark"), t.setAttribute("data-ipe-theme", "dark")) : (t.classList.remove("ipe-theme-dark"), t.setAttribute("data-ipe-theme", "light")));
|
|
3892
3903
|
}
|
|
3893
3904
|
get currentTheme() {
|
|
3894
3905
|
return document.body.classList.contains("ipe-theme-dark") ? "dark" : "light";
|
|
@@ -4067,7 +4078,7 @@ var En = Object.create, tt = Object.defineProperty, An = Object.getOwnPropertyDe
|
|
|
4067
4078
|
}, Cn = (i, e, t) => e in i ? tt(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, On = (i, e) => tt(i, "name", { value: e, configurable: !0 }), Pn = (i) => [, , , En(i?.[ri("metadata")] ?? null)], In = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], si = (i) => i !== void 0 && typeof i != "function" ? ni("Function expected") : i, Ln = (i, e, t, r, n) => ({ kind: In[i], name: e, metadata: r, addInitializer: (s) => t._ ? ni("Already initialized") : n.push(si(s || null)) }), Rn = (i, e) => Cn(e, ri("metadata"), i[3]), jn = (i, e, t, r) => {
|
|
4068
4079
|
for (var n = 0, s = i[e >> 1], o = s && s.length; n < o; n++) s[n].call(t);
|
|
4069
4080
|
return r;
|
|
4070
|
-
},
|
|
4081
|
+
}, Tn = (i, e, t, r, n, s) => {
|
|
4071
4082
|
var o, a, f, u = e & 7, p = !1, y = 0, _ = i[y] || (i[y] = []), g = u && (n = n.prototype, u < 5 && (u > 3 || !p) && An(n, t));
|
|
4072
4083
|
On(n, t);
|
|
4073
4084
|
for (var w = r.length - 1; w >= 0; w--)
|
|
@@ -4189,17 +4200,17 @@ class ye extends (ai = z) {
|
|
|
4189
4200
|
}
|
|
4190
4201
|
}
|
|
4191
4202
|
it = Pn(ai);
|
|
4192
|
-
ye =
|
|
4203
|
+
ye = Tn(it, 0, "PreferencesService", oi, ye);
|
|
4193
4204
|
jn(it, 1, ye);
|
|
4194
4205
|
var rt = /* @__PURE__ */ ((i) => (i.ANALYTICS_API_BASE = "https://analytics.ipe.wiki/api/v6", i.ANALYTICS_DASH_URL = "https://analytics.ipe.wiki", i.GITHUB_URL = "https://github.com/inpageedit/inpageedit-next", i.GITHUB_OWNER = "inpageedit", i.GITHUB_REPO = "inpageedit-next", i.HOME_URL = "https://www.ipe.wiki/", i.UPDATE_LOGS_URL = "https://www.ipe.wiki/changelogs/", i.PLUGIN_REGISTRY_URL = "https://registry.ipe.wiki/registry.v1.json", i.I18N_INDEX_URL = "https://registry.ipe.wiki/i18n/index.json", i.QQ_GROUP_ID = "1026023666", i))(rt || {});
|
|
4195
|
-
const ci = "", li = "",
|
|
4206
|
+
const ci = "", li = "", Dn = /\\\{/g, Nn = /\\\}/g, Mn = new RegExp(ci, "g"), Bn = new RegExp(li, "g");
|
|
4196
4207
|
function bt(i) {
|
|
4197
4208
|
const e = i ? { ...i } : void 0;
|
|
4198
4209
|
return (r, ...n) => Un(e, r, ...n);
|
|
4199
4210
|
}
|
|
4200
4211
|
function Un(i, e, ...t) {
|
|
4201
4212
|
if (!e) return "";
|
|
4202
|
-
let r = String(e).replace(
|
|
4213
|
+
let r = String(e).replace(Dn, ci).replace(Nn, li), n = {}, s = [];
|
|
4203
4214
|
t.length === 1 && Array.isArray(t[0]) ? s = t[0] : t.length === 1 && Fn(t[0]) ? n = t[0] : t.length > 0 && (s = t);
|
|
4204
4215
|
const o = /* @__PURE__ */ Object.create(null);
|
|
4205
4216
|
if (s && s.length)
|
|
@@ -4481,15 +4492,15 @@ class Kn {
|
|
|
4481
4492
|
}
|
|
4482
4493
|
var qn = Object.create, nt = Object.defineProperty, Wn = Object.getOwnPropertyDescriptor, ui = (i, e) => (e = Symbol[i]) ? e : /* @__PURE__ */ Symbol.for("Symbol." + i), fi = (i) => {
|
|
4483
4494
|
throw TypeError(i);
|
|
4484
|
-
}, Gn = (i, e, t) => e in i ? nt(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, Vn = (i, e) => nt(i, "name", { value: e, configurable: !0 }), Yn = (i) => [, , , qn(i?.[ui("metadata")] ?? null)], Jn = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], di = (i) => i !== void 0 && typeof i != "function" ? fi("Function expected") : i,
|
|
4495
|
+
}, Gn = (i, e, t) => e in i ? nt(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, Vn = (i, e) => nt(i, "name", { value: e, configurable: !0 }), Yn = (i) => [, , , qn(i?.[ui("metadata")] ?? null)], Jn = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], di = (i) => i !== void 0 && typeof i != "function" ? fi("Function expected") : i, Qn = (i, e, t, r, n) => ({ kind: Jn[i], name: e, metadata: r, addInitializer: (s) => t._ ? fi("Already initialized") : n.push(di(s || null)) }), Xn = (i, e) => Gn(e, ui("metadata"), i[3]), Zn = (i, e, t, r) => {
|
|
4485
4496
|
for (var n = 0, s = i[e >> 1], o = s && s.length; n < o; n++) s[n].call(t);
|
|
4486
4497
|
return r;
|
|
4487
4498
|
}, es = (i, e, t, r, n, s) => {
|
|
4488
4499
|
var o, a, f, u = e & 7, p = !1, y = 0, _ = i[y] || (i[y] = []), g = u && (n = n.prototype, u < 5 && (u > 3 || !p) && Wn(n, t));
|
|
4489
4500
|
Vn(n, t);
|
|
4490
4501
|
for (var w = r.length - 1; w >= 0; w--)
|
|
4491
|
-
f =
|
|
4492
|
-
return
|
|
4502
|
+
f = Qn(u, t, a = {}, i[3], _), o = (0, r[w])(n, f), a._ = 1, di(o) && (n = o);
|
|
4503
|
+
return Xn(i, n), g && nt(n, t, g), p ? u ^ 4 ? s : g : n;
|
|
4493
4504
|
}, pi, st, gi;
|
|
4494
4505
|
const vt = new $(
|
|
4495
4506
|
$.object({
|
|
@@ -4883,7 +4894,7 @@ class ve extends M {
|
|
|
4883
4894
|
constructor(e) {
|
|
4884
4895
|
super({
|
|
4885
4896
|
name: "InPageEdit"
|
|
4886
|
-
}), this.version = "0.17.
|
|
4897
|
+
}), this.version = "0.17.1", this.Endpoints = rt, this.schema = $, this.config = Ci(ve.DEFAULT_CONFIG, e), this.logger = lr({
|
|
4887
4898
|
name: "IPE",
|
|
4888
4899
|
color: "#33aaff",
|
|
4889
4900
|
level: this.config.logLevel
|
|
@@ -4934,26 +4945,26 @@ class ve extends M {
|
|
|
4934
4945
|
// TODO: 这里不应该硬编码,暂时先这样
|
|
4935
4946
|
async #e() {
|
|
4936
4947
|
[
|
|
4937
|
-
import("./index-
|
|
4938
|
-
import("./index-
|
|
4948
|
+
import("./index-Dp_n8QEV.js").then(({ PluginAnalytics: t }) => t),
|
|
4949
|
+
import("./index-CxjH0_fO.js").then(
|
|
4939
4950
|
({ PluginInArticleLinks: t }) => t
|
|
4940
4951
|
),
|
|
4941
|
-
import("./index-
|
|
4942
|
-
import("./index-
|
|
4952
|
+
import("./index-QtXlz9l0.js").then(({ PluginPluginStore: t }) => t),
|
|
4953
|
+
import("./index-_Sydb5MZ.js").then(
|
|
4943
4954
|
({ PluginPreferencesUI: t }) => t
|
|
4944
4955
|
),
|
|
4945
|
-
import("./index-
|
|
4946
|
-
import("./index-
|
|
4947
|
-
import("./index-
|
|
4956
|
+
import("./index-h57rl1RH.js").then(({ PluginQuickEdit: t }) => t),
|
|
4957
|
+
import("./index-fa8d4Dv_.js").then(({ PluginQuickMove: t }) => t),
|
|
4958
|
+
import("./index-qbW7-LUD.js").then(
|
|
4948
4959
|
({ PluginQuickPreview: t }) => t
|
|
4949
4960
|
),
|
|
4950
|
-
import("./index
|
|
4951
|
-
import("./index-
|
|
4961
|
+
import("./index--IhZKYnh.js").then(({ PluginQuickDiff: t }) => t),
|
|
4962
|
+
import("./index-BuSA1t5R.js").then(
|
|
4952
4963
|
({ PluginQuickRedirect: t }) => t
|
|
4953
4964
|
),
|
|
4954
|
-
import("./index-
|
|
4955
|
-
import("./index-
|
|
4956
|
-
import("./index-
|
|
4965
|
+
import("./index-Bf6ewNGZ.js").then(({ PluginQuickUpload: t }) => t),
|
|
4966
|
+
import("./index-DSh05RaI.js").then(({ PluginQuickUsage: t }) => t),
|
|
4967
|
+
import("./index-Mi3qr9J0.js").then(({ PluginToolbox: t }) => t)
|
|
4957
4968
|
].forEach(async (t) => {
|
|
4958
4969
|
this.plugin(await t);
|
|
4959
4970
|
});
|
|
@@ -4988,9 +4999,9 @@ export {
|
|
|
4988
4999
|
be as W,
|
|
4989
5000
|
F as a,
|
|
4990
5001
|
Ot as b,
|
|
4991
|
-
|
|
5002
|
+
Xi as c,
|
|
4992
5003
|
z as d,
|
|
4993
|
-
|
|
5004
|
+
Qi as e,
|
|
4994
5005
|
lr as f,
|
|
4995
5006
|
_s as g,
|
|
4996
5007
|
vs as h,
|
|
@@ -5010,4 +5021,4 @@ export {
|
|
|
5010
5021
|
Sn as v,
|
|
5011
5022
|
et as w
|
|
5012
5023
|
};
|
|
5013
|
-
//# sourceMappingURL=index-
|
|
5024
|
+
//# sourceMappingURL=index-CaTtMzfu.js.map
|