User:Funforme3/vector.js
/*! For license information please see bsicon-bundle.js.LICENSE.txt */ !(function (
t,
e,
) {
"object" == typeof exports && "object" == typeof module
? (module.exports = e())
: "function" == typeof define && define.amd
? define([], e)
: "object" == typeof exports
? (exports.bsicon = e())
: (t.bsicon = e());
})(self, () =>
(() => {
"use strict";
var t = {
249(t, e, n) {
n.d(e, {
A: () => c,
});
var r = n(601),
o = n.n(r),
i = n(314),
a = n.n(i)()(o());
a.push([
t.id,
".bsicon-overlay{\n position:fixed;left:0;top:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,0.5);z-index:99999;\n}\n.bsicon-dialog{background:#fff;padding:12px;border-radius:6px;max-width:920px;width:90%;max-height:80%;overflow:auto;box-shadow:0 6px 24px rgba(0,0,0,0.3)}\n.bsicon-header{font-size:16px;margin-bottom:8px}\n.bsicon-controls{margin-bottom:8px}\n.bsicon-grid{display:flex;flex-wrap:wrap;gap:6px}\n.bsicon-grid.loading{opacity:0.6}\n.bsicon-item{width:72px;height:72px;border:1px solid #ddd;display:flex;align-items:center;justify-content:center;background:#fafafa;padding:4px;cursor:grab}\n.bsicon-item img{max-width:100%;max-height:100%;display:block}\n.bsicon-footer{margin-top:8px;display:flex;gap:8px;justify-content:flex-end}\n",
"",
]);
const c = a;
},
314(t) {
t.exports = function (t) {
var e = [];
return (
(e.toString = function () {
return this.map(function (e) {
var n = "",
r = void 0 !== e[5];
return (
e[4] && (n += "@supports (".concat(e[4], ") {")),
e[2] && (n += "@media ".concat(e[2], " {")),
r &&
(n += "@layer".concat(
e[5].length > 0 ? " ".concat(e[5]) : "",
" {",
)),
(n += t(e)),
r && (n += "}"),
e[2] && (n += "}"),
e[4] && (n += "}"),
n
);
}).join("");
}),
(e.i = function (t, n, r, o, i) {
"string" == typeof t && (t = [[null, t, void 0]]);
var a = {};
if (r)
for (var c = 0; c < this.length; c++) {
var u = this[c][0];
null != u && (a[u] = !0);
}
for (var s = 0; s < t.length; s++) {
var l = [].concat(t[s]);
(r && a[l[0]]) ||
(void 0 !== i &&
(void 0 === l[5] ||
(l[1] = "@layer"
.concat(l[5].length > 0 ? " ".concat(l[5]) : "", " {")
.concat(l[1], "}")),
(l[5] = i)),
n &&
(l[2]
? ((l[1] = "@media "
.concat(l[2], " {")
.concat(l[1], "}")),
(l[2] = n))
: (l[2] = n)),
o &&
(l[4]
? ((l[1] = "@supports ("
.concat(l[4], ") {")
.concat(l[1], "}")),
(l[4] = o))
: (l[4] = "".concat(o))),
e.push(l));
}
}),
e
);
};
},
601(t) {
t.exports = function (t) {
return t[1];
};
},
72(t) {
var e = [];
function n(t) {
for (var n = -1, r = 0; r < e.length; r++)
if (e[r].identifier === t) {
n = r;
break;
}
return n;
}
function r(t, r) {
for (var i = {}, a = [], c = 0; c < t.length; c++) {
var u = t[c],
s = r.base ? u[0] + r.base : u[0],
l = i[s] || 0,
f = "".concat(s, " ").concat(l);
i[s] = l + 1;
var p = n(f),
d = {
css: u[1],
media: u[2],
sourceMap: u[3],
supports: u[4],
layer: u[5],
};
if (-1 !== p) (e[p].references++, e[p].updater(d));
else {
var v = o(d, r);
((r.byIndex = c),
e.splice(c, 0, {
identifier: f,
updater: v,
references: 1,
}));
}
a.push(f);
}
return a;
}
function o(t, e) {
var n = e.domAPI(e);
return (
n.update(t),
function (e) {
if (e) {
if (
e.css === t.css &&
e.media === t.media &&
e.sourceMap === t.sourceMap &&
e.supports === t.supports &&
e.layer === t.layer
)
return;
n.update((t = e));
} else n.remove();
}
);
}
t.exports = function (t, o) {
var i = r((t = t || []), (o = o || {}));
return function (t) {
t = t || [];
for (var a = 0; a < i.length; a++) {
var c = n(i[a]);
e[c].references--;
}
for (var u = r(t, o), s = 0; s < i.length; s++) {
var l = n(i[s]);
0 === e[l].references && (e[l].updater(), e.splice(l, 1));
}
i = u;
};
};
},
659(t) {
var e = {};
t.exports = function (t, n) {
var r = (function (t) {
if (void 0 === e[t]) {
var n = document.querySelector(t);
if (
window.HTMLIFrameElement &&
n instanceof window.HTMLIFrameElement
)
try {
n = n.contentDocument.head;
} catch (t) {
n = null;
}
e[t] = n;
}
return e[t];
})(t);
if (!r)
throw new Error(
"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.",
);
r.appendChild(n);
};
},
540(t) {
t.exports = function (t) {
var e = document.createElement("style");
return (
t.setAttributes(e, t.attributes),
t.insert(e, t.options),
e
);
};
},
56(t, e, n) {
t.exports = function (t) {
var e = n.nc;
e && t.setAttribute("nonce", e);
};
},
825(t) {
t.exports = function (t) {
if ("undefined" == typeof document)
return {
update: function () {},
remove: function () {},
};
var e = t.insertStyleElement(t);
return {
update: function (n) {
!(function (t, e, n) {
var r = "";
(n.supports && (r += "@supports (".concat(n.supports, ") {")),
n.media && (r += "@media ".concat(n.media, " {")));
var o = void 0 !== n.layer;
(o &&
(r += "@layer".concat(
n.layer.length > 0 ? " ".concat(n.layer) : "",
" {",
)),
(r += n.css),
o && (r += "}"),
n.media && (r += "}"),
n.supports && (r += "}"));
var i = n.sourceMap;
(i &&
"undefined" != typeof btoa &&
(r +=
"\n/*# sourceMappingURL=data:application/json;base64,".concat(
btoa(unescape(encodeURIComponent(JSON.stringify(i)))),
" */",
)),
e.styleTagTransform(r, t, e.options));
})(e, t, n);
},
remove: function () {
!(function (t) {
if (null === t.parentNode) return !1;
t.parentNode.removeChild(t);
})(e);
},
};
};
},
113(t) {
t.exports = function (t, e) {
if (e.styleSheet) e.styleSheet.cssText = t;
else {
for (; e.firstChild; ) e.removeChild(e.firstChild);
e.appendChild(document.createTextNode(t));
}
};
},
},
e = {};
function n(r) {
var o = e[r];
if (void 0 !== o) return o.exports;
var i = (e[r] = {
id: r,
exports: {},
});
return (t[r](i, i.exports, n), i.exports);
}
((n.n = (t) => {
var e = t && t.__esModule ? () => t.default : () => t;
return (
n.d(e, {
a: e,
}),
e
);
}),
(n.d = (t, e) => {
for (var r in e)
n.o(e, r) &&
!n.o(t, r) &&
Object.defineProperty(t, r, {
enumerable: !0,
get: e[r],
});
}),
(n.o = (t, e) => Object.prototype.hasOwnProperty.call(t, e)),
(n.r = (t) => {
("undefined" != typeof Symbol &&
Symbol.toStringTag &&
Object.defineProperty(t, Symbol.toStringTag, {
value: "Module",
}),
Object.defineProperty(t, "__esModule", {
value: !0,
}));
}),
(n.nc = void 0));
var r = {};
function o() {
var t,
e,
n = "function" == typeof Symbol ? Symbol : {},
r = n.iterator || "@@iterator",
a = n.toStringTag || "@@toStringTag";
function c(n, r, o, a) {
var c = r && r.prototype instanceof s ? r : s,
l = Object.create(c.prototype);
return (
i(
l,
"_invoke",
(function (n, r, o) {
var i,
a,
c,
s = 0,
l = o || [],
f = !1,
p = {
p: 0,
n: 0,
v: t,
a: d,
f: d.bind(t, 4),
d: function (e, n) {
return ((i = e), (a = 0), (c = t), (p.n = n), u);
},
};
function d(n, r) {
for (a = n, c = r, e = 0; !f && s && !o && e < l.length; e++) {
var o,
i = l[e],
d = p.p,
v = i[2];
n > 3
? (o = v === r) &&
((c = i[(a = i[4]) ? 5 : ((a = 3), 3)]),
(i[4] = i[5] = t))
: i[0] <= d &&
((o = n < 2 && d < i[1])
? ((a = 0), (p.v = r), (p.n = i[1]))
: d < v &&
(o = n < 3 || i[0] > r || r > v) &&
((i[4] = n), (i[5] = r), (p.n = v), (a = 0)));
}
if (o || n > 1) return u;
throw ((f = !0), r);
}
return function (o, l, v) {
if (s > 1) throw TypeError("Generator is already running");
for (
f && 1 === l && d(l, v), a = l, c = v;
(e = a < 2 ? t : c) || !f;
) {
i ||
(a
? a < 3
? (a > 1 && (p.n = -1), d(a, c))
: (p.n = c)
: (p.v = c));
try {
if (((s = 2), i)) {
if ((a || (o = "next"), (e = i[o]))) {
if (!(e = e.call(i, c)))
throw TypeError("iterator result is not an object");
if (!e.done) return e;
((c = e.value), a < 2 && (a = 0));
} else
(1 === a && (e = i.return) && e.call(i),
a < 2 &&
((c = TypeError(
"The iterator does not provide a '" +
o +
"' method",
)),
(a = 1)));
i = t;
} else if ((e = (f = p.n < 0) ? c : n.call(r, p)) !== u)
break;
} catch (e) {
((i = t), (a = 1), (c = e));
} finally {
s = 1;
}
}
return {
value: e,
done: f,
};
};
})(n, o, a),
!0,
),
l
);
}
var u = {};
function s() {}
function l() {}
function f() {}
e = Object.getPrototypeOf;
var p = [][r]
? e(e([][r]()))
: (i((e = {}), r, function () {
return this;
}),
e),
d = (f.prototype = s.prototype = Object.create(p));
function v(t) {
return (
Object.setPrototypeOf
? Object.setPrototypeOf(t, f)
: ((t.__proto__ = f), i(t, a, "GeneratorFunction")),
(t.prototype = Object.create(d)),
t
);
}
return (
(l.prototype = f),
i(d, "constructor", f),
i(f, "constructor", l),
(l.displayName = "GeneratorFunction"),
i(f, a, "GeneratorFunction"),
i(d),
i(d, a, "Generator"),
i(d, r, function () {
return this;
}),
i(d, "toString", function () {
return "[object Generator]";
}),
(o = function () {
return {
w: c,
m: v,
};
})()
);
}
function i(t, e, n, r) {
var o = Object.defineProperty;
try {
o({}, "", {});
} catch (t) {
o = 0;
}
((i = function (t, e, n, r) {
function a(e, n) {
i(t, e, function (t) {
return this._invoke(e, n, t);
});
}
e
? o
? o(t, e, {
value: n,
enumerable: !r,
configurable: !r,
writable: !r,
})
: (t[e] = n)
: (a("next", 0), a("throw", 1), a("return", 2));
}),
i(t, e, n, r));
}
function a(t, e, n, r, o, i, a) {
try {
var c = t[i](a),
u = c.value;
} catch (t) {
return void n(t);
}
c.done ? e(u) : Promise.resolve(u).then(r, o);
}
function c(t) {
return function () {
var e = this,
n = arguments;
return new Promise(function (r, o) {
var i = t.apply(e, n);
function c(t) {
a(i, r, o, c, u, "next", t);
}
function u(t) {
a(i, r, o, c, u, "throw", t);
}
c(void 0);
});
};
}
function u(t) {
var e = new URL("https://commons.wikimedia.org/w/api.php?origin=*");
return (
Object.keys(t).forEach(function (n) {
return e.searchParams.append(n, t[n]);
}),
fetch(e.toString(), {
method: "GET",
}).then(function (t) {
return t.json();
})
);
}
function s() {
return (
(s = c(
o().m(function t(e) {
var n,
r,
i = arguments;
return o().w(function (t) {
for (;;)
switch (t.n) {
case 0:
return (
(n = i.length > 1 && void 0 !== i[1] ? i[1] : 50),
(t.n = 1),
u({
action: "query",
list: "categorymembers",
cmtitle: "Category:".concat(e),
cmlimit: n,
format: "json",
})
);
case 1:
return (
(r = t.v),
t.a(
2,
r.query && r.query.categorymembers
? r.query.categorymembers
: [],
)
);
}
}, t);
}),
)),
s.apply(this, arguments)
);
}
function l() {
return (l = c(
o().m(function t(e) {
var n, r, i;
return o().w(function (t) {
for (;;)
switch (t.n) {
case 0:
return (
(t.n = 1),
u({
action: "query",
titles: "File:".concat(e),
prop: "imageinfo",
iiprop: "url|mime|size",
format: "json",
})
);
case 1:
if ((n = t.v).query && n.query.pages) {
t.n = 2;
break;
}
return t.a(2, null);
case 2:
if (
((r = n.query.pages),
(i = Object.values(r)[0]) && i.imageinfo)
) {
t.n = 3;
break;
}
return t.a(2, null);
case 3:
return t.a(
2,
Object.assign(
{
pageid: i.pageid,
title: i.title,
},
i.imageinfo[0],
),
);
}
}, t);
}),
)).apply(this, arguments);
}
function f() {
return (
(f = c(
o().m(function t(e) {
var n,
r,
i = arguments;
return o().w(function (t) {
for (;;)
switch (t.n) {
case 0:
return (
(n = i.length > 1 && void 0 !== i[1] ? i[1] : 50),
(t.n = 1),
u({
action: "query",
list: "search",
srsearch: "intitle:".concat(e),
srlimit: n,
format: "json",
})
);
case 1:
return (
(r = t.v),
t.a(2, r.query && r.query.search ? r.query.search : [])
);
}
}, t);
}),
)),
f.apply(this, arguments)
);
}
(n.r(r),
n.d(r, {
default: () => D,
}));
const p = {
getCategoryMembers: function (t) {
return s.apply(this, arguments);
},
getImageInfoByTitle: function (t) {
return l.apply(this, arguments);
},
searchFiles: function (t) {
return f.apply(this, arguments);
},
};
function d() {
var t,
e,
n = "function" == typeof Symbol ? Symbol : {},
r = n.iterator || "@@iterator",
o = n.toStringTag || "@@toStringTag";
function i(n, r, o, i) {
var u = r && r.prototype instanceof c ? r : c,
s = Object.create(u.prototype);
return (
v(
s,
"_invoke",
(function (n, r, o) {
var i,
c,
u,
s = 0,
l = o || [],
f = !1,
p = {
p: 0,
n: 0,
v: t,
a: d,
f: d.bind(t, 4),
d: function (e, n) {
return ((i = e), (c = 0), (u = t), (p.n = n), a);
},
};
function d(n, r) {
for (c = n, u = r, e = 0; !f && s && !o && e < l.length; e++) {
var o,
i = l[e],
d = p.p,
v = i[2];
n > 3
? (o = v === r) &&
((u = i[(c = i[4]) ? 5 : ((c = 3), 3)]),
(i[4] = i[5] = t))
: i[0] <= d &&
((o = n < 2 && d < i[1])
? ((c = 0), (p.v = r), (p.n = i[1]))
: d < v &&
(o = n < 3 || i[0] > r || r > v) &&
((i[4] = n), (i[5] = r), (p.n = v), (c = 0)));
}
if (o || n > 1) return a;
throw ((f = !0), r);
}
return function (o, l, v) {
if (s > 1) throw TypeError("Generator is already running");
for (
f && 1 === l && d(l, v), c = l, u = v;
(e = c < 2 ? t : u) || !f;
) {
i ||
(c
? c < 3
? (c > 1 && (p.n = -1), d(c, u))
: (p.n = u)
: (p.v = u));
try {
if (((s = 2), i)) {
if ((c || (o = "next"), (e = i[o]))) {
if (!(e = e.call(i, u)))
throw TypeError("iterator result is not an object");
if (!e.done) return e;
((u = e.value), c < 2 && (c = 0));
} else
(1 === c && (e = i.return) && e.call(i),
c < 2 &&
((u = TypeError(
"The iterator does not provide a '" +
o +
"' method",
)),
(c = 1)));
i = t;
} else if ((e = (f = p.n < 0) ? u : n.call(r, p)) !== a)
break;
} catch (e) {
((i = t), (c = 1), (u = e));
} finally {
s = 1;
}
}
return {
value: e,
done: f,
};
};
})(n, o, i),
!0,
),
s
);
}
var a = {};
function c() {}
function u() {}
function s() {}
e = Object.getPrototypeOf;
var l = [][r]
? e(e([][r]()))
: (v((e = {}), r, function () {
return this;
}),
e),
f = (s.prototype = c.prototype = Object.create(l));
function p(t) {
return (
Object.setPrototypeOf
? Object.setPrototypeOf(t, s)
: ((t.__proto__ = s), v(t, o, "GeneratorFunction")),
(t.prototype = Object.create(f)),
t
);
}
return (
(u.prototype = s),
v(f, "constructor", s),
v(s, "constructor", u),
(u.displayName = "GeneratorFunction"),
v(s, o, "GeneratorFunction"),
v(f),
v(f, o, "Generator"),
v(f, r, function () {
return this;
}),
v(f, "toString", function () {
return "[object Generator]";
}),
(d = function () {
return {
w: i,
m: p,
};
})()
);
}
function v(t, e, n, r) {
var o = Object.defineProperty;
try {
o({}, "", {});
} catch (t) {
o = 0;
}
((v = function (t, e, n, r) {
function i(e, n) {
v(t, e, function (t) {
return this._invoke(e, n, t);
});
}
e
? o
? o(t, e, {
value: n,
enumerable: !r,
configurable: !r,
writable: !r,
})
: (t[e] = n)
: (i("next", 0), i("throw", 1), i("return", 2));
}),
v(t, e, n, r));
}
function y(t, e) {
var n =
("undefined" != typeof Symbol && t[Symbol.iterator]) || t["@@iterator"];
if (!n) {
if (
Array.isArray(t) ||
(n = (function (t, e) {
if (t) {
if ("string" == typeof t) return m(t, e);
var n = {}.toString.call(t).slice(8, -1);
return (
"Object" === n && t.constructor && (n = t.constructor.name),
"Map" === n || "Set" === n
? Array.from(t)
: "Arguments" === n ||
/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)
? m(t, e)
: void 0
);
}
})(t)) ||
(e && t && "number" == typeof t.length)
) {
n && (t = n);
var r = 0,
o = function () {};
return {
s: o,
n: function () {
return r >= t.length
? {
done: !0,
}
: {
done: !1,
value: t[r++],
};
},
e: function (t) {
throw t;
},
f: o,
};
}
throw new TypeError(
"Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.",
);
}
var i,
a = !0,
c = !1;
return {
s: function () {
n = n.call(t);
},
n: function () {
var t = n.next();
return ((a = t.done), t);
},
e: function (t) {
((c = !0), (i = t));
},
f: function () {
try {
a || null == n.return || n.return();
} finally {
if (c) throw i;
}
},
};
}
function m(t, e) {
(null == e || e > t.length) && (e = t.length);
for (var n = 0, r = Array(e); n < e; n++) r[n] = t[n];
return r;
}
function h(t, e, n, r, o, i, a) {
try {
var c = t[i](a),
u = c.value;
} catch (t) {
return void n(t);
}
c.done ? e(u) : Promise.resolve(u).then(r, o);
}
function b(t) {
return g.apply(this, arguments);
}
function g() {
var t;
return (
(t = d().m(function t(e) {
var n,
r,
o,
i,
a,
c,
u,
s,
l,
f = arguments;
return d().w(
function (t) {
for (;;)
switch ((t.p = t.n)) {
case 0:
return (
(n = f.length > 1 && void 0 !== f[1] ? f[1] : 50),
(t.n = 1),
p.getCategoryMembers(e, n)
);
case 1:
((r = t.v), (o = []), (i = y(r)), (t.p = 2), i.s());
case 3:
if ((a = i.n()).done) {
t.n = 6;
break;
}
return (
(c = a.value),
(u = c.title
? c.title.replace(/^File:\s*/i, "").trim()
: c.title || c.pageid),
(t.n = 4),
p.getImageInfoByTitle(u)
);
case 4:
(s = t.v) &&
s.url &&
o.push({
title: s.title,
url: s.url,
width: s.width,
height: s.height,
});
case 5:
t.n = 3;
break;
case 6:
t.n = 8;
break;
case 7:
((t.p = 7), (l = t.v), i.e(l));
case 8:
return ((t.p = 8), i.f(), t.f(8));
case 9:
return t.a(2, o);
}
},
t,
null,
[[2, 7, 8, 9]],
);
})),
(g = function () {
var e = this,
n = arguments;
return new Promise(function (r, o) {
var i = t.apply(e, n);
function a(t) {
h(i, r, o, a, c, "next", t);
}
function c(t) {
h(i, r, o, a, c, "throw", t);
}
a(void 0);
});
}),
g.apply(this, arguments)
);
}
function w() {
var t,
e,
n = "function" == typeof Symbol ? Symbol : {},
r = n.iterator || "@@iterator",
o = n.toStringTag || "@@toStringTag";
function i(n, r, o, i) {
var u = r && r.prototype instanceof c ? r : c,
s = Object.create(u.prototype);
return (
x(
s,
"_invoke",
(function (n, r, o) {
var i,
c,
u,
s = 0,
l = o || [],
f = !1,
p = {
p: 0,
n: 0,
v: t,
a: d,
f: d.bind(t, 4),
d: function (e, n) {
return ((i = e), (c = 0), (u = t), (p.n = n), a);
},
};
function d(n, r) {
for (c = n, u = r, e = 0; !f && s && !o && e < l.length; e++) {
var o,
i = l[e],
d = p.p,
v = i[2];
n > 3
? (o = v === r) &&
((u = i[(c = i[4]) ? 5 : ((c = 3), 3)]),
(i[4] = i[5] = t))
: i[0] <= d &&
((o = n < 2 && d < i[1])
? ((c = 0), (p.v = r), (p.n = i[1]))
: d < v &&
(o = n < 3 || i[0] > r || r > v) &&
((i[4] = n), (i[5] = r), (p.n = v), (c = 0)));
}
if (o || n > 1) return a;
throw ((f = !0), r);
}
return function (o, l, v) {
if (s > 1) throw TypeError("Generator is already running");
for (
f && 1 === l && d(l, v), c = l, u = v;
(e = c < 2 ? t : u) || !f;
) {
i ||
(c
? c < 3
? (c > 1 && (p.n = -1), d(c, u))
: (p.n = u)
: (p.v = u));
try {
if (((s = 2), i)) {
if ((c || (o = "next"), (e = i[o]))) {
if (!(e = e.call(i, u)))
throw TypeError("iterator result is not an object");
if (!e.done) return e;
((u = e.value), c < 2 && (c = 0));
} else
(1 === c && (e = i.return) && e.call(i),
c < 2 &&
((u = TypeError(
"The iterator does not provide a '" +
o +
"' method",
)),
(c = 1)));
i = t;
} else if ((e = (f = p.n < 0) ? u : n.call(r, p)) !== a)
break;
} catch (e) {
((i = t), (c = 1), (u = e));
} finally {
s = 1;
}
}
return {
value: e,
done: f,
};
};
})(n, o, i),
!0,
),
s
);
}
var a = {};
function c() {}
function u() {}
function s() {}
e = Object.getPrototypeOf;
var l = [][r]
? e(e([][r]()))
: (x((e = {}), r, function () {
return this;
}),
e),
f = (s.prototype = c.prototype = Object.create(l));
function p(t) {
return (
Object.setPrototypeOf
? Object.setPrototypeOf(t, s)
: ((t.__proto__ = s), x(t, o, "GeneratorFunction")),
(t.prototype = Object.create(f)),
t
);
}
return (
(u.prototype = s),
x(f, "constructor", s),
x(s, "constructor", u),
(u.displayName = "GeneratorFunction"),
x(s, o, "GeneratorFunction"),
x(f),
x(f, o, "Generator"),
x(f, r, function () {
return this;
}),
x(f, "toString", function () {
return "[object Generator]";
}),
(w = function () {
return {
w: i,
m: p,
};
})()
);
}
function x(t, e, n, r) {
var o = Object.defineProperty;
try {
o({}, "", {});
} catch (t) {
o = 0;
}
((x = function (t, e, n, r) {
function i(e, n) {
x(t, e, function (t) {
return this._invoke(e, n, t);
});
}
e
? o
? o(t, e, {
value: n,
enumerable: !r,
configurable: !r,
writable: !r,
})
: (t[e] = n)
: (i("next", 0), i("throw", 1), i("return", 2));
}),
x(t, e, n, r));
}
function j(t, e) {
var n =
("undefined" != typeof Symbol && t[Symbol.iterator]) || t["@@iterator"];
if (!n) {
if (
Array.isArray(t) ||
(n = (function (t, e) {
if (t) {
if ("string" == typeof t) return S(t, e);
var n = {}.toString.call(t).slice(8, -1);
return (
"Object" === n && t.constructor && (n = t.constructor.name),
"Map" === n || "Set" === n
? Array.from(t)
: "Arguments" === n ||
/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)
? S(t, e)
: void 0
);
}
})(t)) ||
(e && t && "number" == typeof t.length)
) {
n && (t = n);
var r = 0,
o = function () {};
return {
s: o,
n: function () {
return r >= t.length
? {
done: !0,
}
: {
done: !1,
value: t[r++],
};
},
e: function (t) {
throw t;
},
f: o,
};
}
throw new TypeError(
"Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.",
);
}
var i,
a = !0,
c = !1;
return {
s: function () {
n = n.call(t);
},
n: function () {
var t = n.next();
return ((a = t.done), t);
},
e: function (t) {
((c = !0), (i = t));
},
f: function () {
try {
a || null == n.return || n.return();
} finally {
if (c) throw i;
}
},
};
}
function S(t, e) {
(null == e || e > t.length) && (e = t.length);
for (var n = 0, r = Array(e); n < e; n++) r[n] = t[n];
return r;
}
function O(t, e, n, r, o, i, a) {
try {
var c = t[i](a),
u = c.value;
} catch (t) {
return void n(t);
}
c.done ? e(u) : Promise.resolve(u).then(r, o);
}
function T(t) {
return function () {
var e = this,
n = arguments;
return new Promise(function (r, o) {
var i = t.apply(e, n);
function a(t) {
O(i, r, o, a, c, "next", t);
}
function c(t) {
O(i, r, o, a, c, "throw", t);
}
a(void 0);
});
};
}
function E() {
var t = document.createElement("div");
t.className = "bsicon-overlay";
var e = document.createElement("div");
((e.className = "bsicon-dialog"), t.appendChild(e));
var n = document.createElement("div");
((n.className = "bsicon-header"),
(n.innerHTML = "<strong>BSicon Picker</strong>"),
e.appendChild(n));
var r = document.createElement("div");
((r.className = "bsicon-controls"),
(r.innerHTML =
'<input class="bsicon-category" placeholder="Category (e.g. BSicon)"/>'),
e.appendChild(r));
var o = document.createElement("div");
((o.className = "bsicon-grid"), e.appendChild(o));
var i = document.createElement("div");
i.className = "bsicon-footer";
var a = document.createElement("button");
((a.textContent = "Insert into VE"), i.appendChild(a));
var c = document.createElement("button");
return (
(c.textContent = "Close"),
i.appendChild(c),
e.appendChild(i),
{
overlay: t,
dialog: e,
grid: o,
insertBtn: a,
closeBtn: c,
controls: r,
}
);
}
function C(t) {
var e = null;
(t.addEventListener("dragstart", function (t) {
var n = t.target.closest(".bsicon-item");
n && ((e = n), (t.dataTransfer.effectAllowed = "move"));
}),
t.addEventListener("dragover", function (n) {
n.preventDefault();
var r = n.target.closest(".bsicon-item");
r && e && r !== e && t.insertBefore(e, r.nextSibling);
}));
}
function k() {
return (
(k = T(
w().m(function t(e) {
var n, r, o, i, a, c, u, s, l;
return w().w(function (t) {
for (;;)
switch (t.n) {
case 0:
return (
(l = function () {
return (l = T(
w().m(function t() {
var e, n, r, i, a, c;
return w().w(function (t) {
for (;;)
switch (t.n) {
case 0:
return (
(o.innerHTML = ""),
o.classList.add("loading"),
(t.n = 1),
b(u.value || "BSicon", 100)
);
case 1:
((e = t.v),
o.classList.remove("loading"),
(n = j(e)));
try {
for (n.s(); !(r = n.n()).done; )
((i = r.value),
((a =
document.createElement(
"div",
)).className = "bsicon-item"),
(a.draggable = !0),
((c =
document.createElement("img")).src =
i.url),
(c.alt = i.title),
a.appendChild(c),
(a.dataset.title = i.title),
o.appendChild(a));
} catch (t) {
n.e(t);
} finally {
n.f();
}
case 2:
return t.a(2);
}
}, t);
}),
)).apply(this, arguments);
}),
(s = function () {
return l.apply(this, arguments);
}),
(n = E()),
(r = n.overlay),
(o = n.grid),
(i = n.insertBtn),
(a = n.closeBtn),
(c = n.controls),
document.body.appendChild(r),
((u = c.querySelector(".bsicon-category")).value =
"BSicon"),
C(o),
(t.n = 1),
s()
);
case 1:
(i.addEventListener("click", function () {
var t = Array.from(
o.querySelectorAll(".bsicon-item"),
).map(function (t) {
return t.dataset.title.replace(/^File:/i, "").trim();
});
(e && e(t), r.remove());
}),
a.addEventListener("click", function () {
r.remove();
}));
case 2:
return t.a(2);
}
}, t);
}),
)),
k.apply(this, arguments)
);
}
function A() {
!(function (t) {
k.apply(this, arguments);
})(function (t) {
var e = t
.map(function (t) {
return "[[File:".concat(t, "|frameless|100px]]");
})
.join(" "),
n = '<table class="bsicon-grid"><tr><td>'.concat(
e,
"</td></tr></table>",
);
try {
var r =
ve && ve.init && ve.init.target
? ve.init.target.getSurface()
: null;
if (r)
return void r.getModel().execute({
type: "insertContent",
content: n,
});
} catch (t) {
console.warn("VE insert failed, falling back to clipboard:", t);
}
navigator.clipboard && navigator.clipboard.writeText
? (navigator.clipboard.writeText(n),
alert("Wikitext copied to clipboard — paste into your editor"))
: prompt("Copy wikitext (Ctrl+C):", n);
});
}
var P = n(72),
_ = n.n(P),
G = n(825),
M = n.n(G),
I = n(659),
q = n.n(I),
F = n(56),
B = n.n(F),
L = n(540),
N = n.n(L),
H = n(113),
U = n.n(H),
$ = n(249),
z = {};
function R() {
if (!window.bsicon || !window.bsicon._inited) {
((window.bsicon = window.bsicon || {}), (window.bsicon._inited = !0));
try {
mw.loader
.using([
"ext.visualEditor.desktopArticleTarget.init",
"oojs-ui-widgets",
])
.then(function () {
mw.hook("ve.activationComplete").add(function () {
var t = new OO.ui.ButtonWidget({
label: "BSicon",
icon: "picture",
});
t.on("click", function () {
A();
});
var e = document.querySelector(
".ve-init-mw-desktopArticleTarget-toolbar",
);
e && t.$element && e.appendChild(t.$element[0]);
});
})
.catch(function () {
var t = document.body,
e = document.createElement("button");
((e.textContent = "BSicon (test)"),
(e.style.position = "fixed"),
(e.style.bottom = "10px"),
(e.style.right = "10px"),
e.addEventListener("click", A),
t.appendChild(e));
});
} catch (t) {
console.error("bsicon init error", t);
}
}
}
((z.styleTagTransform = U()),
(z.setAttributes = B()),
(z.insert = q().bind(null, "head")),
(z.domAPI = M()),
(z.insertStyleElement = N()),
_()($.A, z),
$.A && $.A.locals && $.A.locals);
const D = {
init: R,
};
((window.bsicon = window.bsicon || {}), (window.bsicon.init = R));
try {
"undefined" != typeof window &&
window.bsicon &&
"function" == typeof window.bsicon.init &&
window.bsicon.init();
} catch (t) {}
return r;
})(),
);
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.