UNPKG

steem-auth-vue

Version:

A Vue 3 authentication component for Steem blockchain and Echelon sidechain

1,028 lines 216 kB
import { reactive as Le, readonly as et, provide as at, inject as tt, defineComponent as Pe, ref as Q, openBlock as K, createElementBlock as N, createElementVNode as j, withModifiers as ge, withDirectives as ye, normalizeClass as ke, vModelText as Ae, toDisplayString as ne, createCommentVNode as ee, createTextVNode as qe, Fragment as we, renderList as _e, computed as it, watch as Se, nextTick as ut, withKeys as ze, onMounted as Je, unref as he, renderSlot as De, createVNode as lt, createBlock as Re, vModelCheckbox as ct, vModelRadio as Ke } from "vue"; import * as nt from "dsteem"; import { PrivateKey as Ye } from "dsteem"; var rt = { exports: {} }; (function(T, F) { (function(f, v) { T.exports = v(); })(window, function() { return function(f) { var v = {}; function e(n) { if (v[n]) return v[n].exports; var o = v[n] = { i: n, l: !1, exports: {} }; return f[n].call(o.exports, o, o.exports, e), o.l = !0, o.exports; } return e.m = f, e.c = v, e.d = function(n, o, c) { e.o(n, o) || Object.defineProperty(n, o, { enumerable: !0, get: c }); }, e.r = function(n) { typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(n, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(n, "__esModule", { value: !0 }); }, e.t = function(n, o) { if (1 & o && (n = e(n)), 8 & o || 4 & o && typeof n == "object" && n && n.__esModule) return n; var c = /* @__PURE__ */ Object.create(null); if (e.r(c), Object.defineProperty(c, "default", { enumerable: !0, value: n }), 2 & o && typeof n != "string") for (var h in n) e.d(c, h, (function(a) { return n[a]; }).bind(null, h)); return c; }, e.n = function(n) { var o = n && n.__esModule ? function() { return n.default; } : function() { return n; }; return e.d(o, "a", o), o; }, e.o = function(n, o) { return Object.prototype.hasOwnProperty.call(n, o); }, e.p = "", e(e.s = 52); }([function(f, v) { var e = f.exports = typeof window < "u" && window.Math == Math ? window : typeof self < "u" && self.Math == Math ? self : Function("return this")(); typeof __g == "number" && (__g = e); }, function(f, v) { var e = f.exports = { version: "2.6.5" }; typeof __e == "number" && (__e = e); }, function(f, v, e) { var n = e(24)("wks"), o = e(16), c = e(0).Symbol, h = typeof c == "function"; (f.exports = function(a) { return n[a] || (n[a] = h && c[a] || (h ? c : o)("Symbol." + a)); }).store = n; }, function(f, v, e) { var n = e(4), o = e(36), c = e(27), h = Object.defineProperty; v.f = e(5) ? Object.defineProperty : function(a, d, s) { if (n(a), d = c(d, !0), n(s), o) try { return h(a, d, s); } catch { } if ("get" in s || "set" in s) throw TypeError("Accessors not supported!"); return "value" in s && (a[d] = s.value), a; }; }, function(f, v, e) { var n = e(9); f.exports = function(o) { if (!n(o)) throw TypeError(o + " is not an object!"); return o; }; }, function(f, v, e) { f.exports = !e(13)(function() { return Object.defineProperty({}, "a", { get: function() { return 7; } }).a != 7; }); }, function(f, v) { var e = {}.hasOwnProperty; f.exports = function(n, o) { return e.call(n, o); }; }, function(f, v, e) { var n = e(0), o = e(1), c = e(17), h = e(8), a = e(6), d = function(s, y, g) { var m, k, I, E = s & d.F, U = s & d.G, C = s & d.S, P = s & d.P, A = s & d.B, l = s & d.W, w = U ? o : o[y] || (o[y] = {}), i = w.prototype, M = U ? n : C ? n[y] : (n[y] || {}).prototype; for (m in U && (g = y), g) (k = !E && M && M[m] !== void 0) && a(w, m) || (I = k ? M[m] : g[m], w[m] = U && typeof M[m] != "function" ? g[m] : A && k ? c(I, n) : l && M[m] == I ? function($) { var R = function(x, b, q) { if (this instanceof $) { switch (arguments.length) { case 0: return new $(); case 1: return new $(x); case 2: return new $(x, b); } return new $(x, b, q); } return $.apply(this, arguments); }; return R.prototype = $.prototype, R; }(I) : P && typeof I == "function" ? c(Function.call, I) : I, P && ((w.virtual || (w.virtual = {}))[m] = I, s & d.R && i && !i[m] && h(i, m, I))); }; d.F = 1, d.G = 2, d.S = 4, d.P = 8, d.B = 16, d.W = 32, d.U = 64, d.R = 128, f.exports = d; }, function(f, v, e) { var n = e(3), o = e(19); f.exports = e(5) ? function(c, h, a) { return n.f(c, h, o(1, a)); } : function(c, h, a) { return c[h] = a, c; }; }, function(f, v) { f.exports = function(e) { return typeof e == "object" ? e !== null : typeof e == "function"; }; }, function(f, v, e) { var n = e(56), o = e(21); f.exports = function(c) { return n(o(c)); }; }, function(f, v) { var e = {}.toString; f.exports = function(n) { return e.call(n).slice(8, -1); }; }, function(f, v) { f.exports = !0; }, function(f, v) { f.exports = function(e) { try { return !!e(); } catch { return !0; } }; }, function(f, v) { f.exports = {}; }, function(f, v, e) { var n = e(34), o = e(25); f.exports = Object.keys || function(c) { return n(c, o); }; }, function(f, v) { var e = 0, n = Math.random(); f.exports = function(o) { return "Symbol(".concat(o === void 0 ? "" : o, ")_", (++e + n).toString(36)); }; }, function(f, v, e) { var n = e(18); f.exports = function(o, c, h) { if (n(o), c === void 0) return o; switch (h) { case 1: return function(a) { return o.call(c, a); }; case 2: return function(a, d) { return o.call(c, a, d); }; case 3: return function(a, d, s) { return o.call(c, a, d, s); }; } return function() { return o.apply(c, arguments); }; }; }, function(f, v) { f.exports = function(e) { if (typeof e != "function") throw TypeError(e + " is not a function!"); return e; }; }, function(f, v) { f.exports = function(e, n) { return { enumerable: !(1 & e), configurable: !(2 & e), writable: !(4 & e), value: n }; }; }, function(f, v, e) { var n = e(3).f, o = e(6), c = e(2)("toStringTag"); f.exports = function(h, a, d) { h && !o(h = d ? h : h.prototype, c) && n(h, c, { configurable: !0, value: a }); }; }, function(f, v) { f.exports = function(e) { if (e == null) throw TypeError("Can't call method on " + e); return e; }; }, function(f, v) { var e = Math.ceil, n = Math.floor; f.exports = function(o) { return isNaN(o = +o) ? 0 : (o > 0 ? n : e)(o); }; }, function(f, v, e) { var n = e(24)("keys"), o = e(16); f.exports = function(c) { return n[c] || (n[c] = o(c)); }; }, function(f, v, e) { var n = e(1), o = e(0), c = o["__core-js_shared__"] || (o["__core-js_shared__"] = {}); (f.exports = function(h, a) { return c[h] || (c[h] = a !== void 0 ? a : {}); })("versions", []).push({ version: n.version, mode: e(12) ? "pure" : "global", copyright: "© 2019 Denis Pushkarev (zloirock.ru)" }); }, function(f, v) { f.exports = "constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","); }, function(f, v, e) { var n = e(9), o = e(0).document, c = n(o) && n(o.createElement); f.exports = function(h) { return c ? o.createElement(h) : {}; }; }, function(f, v, e) { var n = e(9); f.exports = function(o, c) { if (!n(o)) return o; var h, a; if (c && typeof (h = o.toString) == "function" && !n(a = h.call(o)) || typeof (h = o.valueOf) == "function" && !n(a = h.call(o)) || !c && typeof (h = o.toString) == "function" && !n(a = h.call(o))) return a; throw TypeError("Can't convert object to primitive value"); }; }, function(f, v, e) { v.f = e(2); }, function(f, v, e) { var n = e(0), o = e(1), c = e(12), h = e(28), a = e(3).f; f.exports = function(d) { var s = o.Symbol || (o.Symbol = c ? {} : n.Symbol || {}); d.charAt(0) == "_" || d in s || a(s, d, { value: h.f(d) }); }; }, function(f, v) { v.f = {}.propertyIsEnumerable; }, function(f, v, e) { var n = e(18); function o(c) { var h, a; this.promise = new c(function(d, s) { if (h !== void 0 || a !== void 0) throw TypeError("Bad Promise constructor"); h = d, a = s; }), this.resolve = n(h), this.reject = n(a); } f.exports.f = function(c) { return new o(c); }; }, function(f, v) { var e; e = function() { return this; }(); try { e = e || new Function("return this")(); } catch { typeof window == "object" && (e = window); } f.exports = e; }, function(f, v, e) { var n = e(21); f.exports = function(o) { return Object(n(o)); }; }, function(f, v, e) { var n = e(6), o = e(10), c = e(57)(!1), h = e(23)("IE_PROTO"); f.exports = function(a, d) { var s, y = o(a), g = 0, m = []; for (s in y) s != h && n(y, s) && m.push(s); for (; d.length > g; ) n(y, s = d[g++]) && (~c(m, s) || m.push(s)); return m; }; }, function(f, v, e) { var n = e(22), o = Math.min; f.exports = function(c) { return c > 0 ? o(n(c), 9007199254740991) : 0; }; }, function(f, v, e) { f.exports = !e(5) && !e(13)(function() { return Object.defineProperty(e(26)("div"), "a", { get: function() { return 7; } }).a != 7; }); }, function(f, v, e) { var n = e(63)(!0); e(38)(String, "String", function(o) { this._t = String(o), this._i = 0; }, function() { var o, c = this._t, h = this._i; return h >= c.length ? { value: void 0, done: !0 } : (o = n(c, h), this._i += o.length, { value: o, done: !1 }); }); }, function(f, v, e) { var n = e(12), o = e(7), c = e(39), h = e(8), a = e(14), d = e(64), s = e(20), y = e(66), g = e(2)("iterator"), m = !([].keys && "next" in [].keys()), k = function() { return this; }; f.exports = function(I, E, U, C, P, A, l) { d(U, E, C); var w, i, M, $ = function(z) { if (!m && z in q) return q[z]; switch (z) { case "keys": case "values": return function() { return new U(this, z); }; } return function() { return new U(this, z); }; }, R = E + " Iterator", x = P == "values", b = !1, q = I.prototype, D = q[g] || q["@@iterator"] || P && q[P], W = D || $(P), Y = P ? x ? $("entries") : W : void 0, B = E == "Array" && q.entries || D; if (B && (M = y(B.call(new I()))) !== Object.prototype && M.next && (s(M, R, !0), n || typeof M[g] == "function" || h(M, g, k)), x && D && D.name !== "values" && (b = !0, W = function() { return D.call(this); }), n && !l || !m && !b && q[g] || h(q, g, W), a[E] = W, a[R] = k, P) if (w = { values: x ? W : $("values"), keys: A ? W : $("keys"), entries: Y }, l) for (i in w) i in q || c(q, i, w[i]); else o(o.P + o.F * (m || b), E, w); return w; }; }, function(f, v, e) { f.exports = e(8); }, function(f, v, e) { var n = e(4), o = e(65), c = e(25), h = e(23)("IE_PROTO"), a = function() { }, d = function() { var s, y = e(26)("iframe"), g = c.length; for (y.style.display = "none", e(41).appendChild(y), y.src = "javascript:", (s = y.contentWindow.document).open(), s.write("<script>document.F=Object<\/script>"), s.close(), d = s.F; g--; ) delete d.prototype[c[g]]; return d(); }; f.exports = Object.create || function(s, y) { var g; return s !== null ? (a.prototype = n(s), g = new a(), a.prototype = null, g[h] = s) : g = d(), y === void 0 ? g : o(g, y); }; }, function(f, v, e) { var n = e(0).document; f.exports = n && n.documentElement; }, function(f, v, e) { e(67); for (var n = e(0), o = e(8), c = e(14), h = e(2)("toStringTag"), a = "CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","), d = 0; d < a.length; d++) { var s = a[d], y = n[s], g = y && y.prototype; g && !g[h] && o(g, h, s), c[s] = c.Array; } }, function(f, v) { v.f = Object.getOwnPropertySymbols; }, function(f, v, e) { var n = e(34), o = e(25).concat("length", "prototype"); v.f = Object.getOwnPropertyNames || function(c) { return n(c, o); }; }, function(f, v) { }, function(f, v, e) { var n = e(11), o = e(2)("toStringTag"), c = n(function() { return arguments; }()) == "Arguments"; f.exports = function(h) { var a, d, s; return h === void 0 ? "Undefined" : h === null ? "Null" : typeof (d = function(y, g) { try { return y[g]; } catch { } }(a = Object(h), o)) == "string" ? d : c ? n(a) : (s = n(a)) == "Object" && typeof a.callee == "function" ? "Arguments" : s; }; }, function(f, v, e) { var n = e(4), o = e(18), c = e(2)("species"); f.exports = function(h, a) { var d, s = n(h).constructor; return s === void 0 || (d = n(s)[c]) == null ? a : o(d); }; }, function(f, v, e) { var n, o, c, h = e(17), a = e(88), d = e(41), s = e(26), y = e(0), g = y.process, m = y.setImmediate, k = y.clearImmediate, I = y.MessageChannel, E = y.Dispatch, U = 0, C = {}, P = function() { var l = +this; if (C.hasOwnProperty(l)) { var w = C[l]; delete C[l], w(); } }, A = function(l) { P.call(l.data); }; m && k || (m = function(l) { for (var w = [], i = 1; arguments.length > i; ) w.push(arguments[i++]); return C[++U] = function() { a(typeof l == "function" ? l : Function(l), w); }, n(U), U; }, k = function(l) { delete C[l]; }, e(11)(g) == "process" ? n = function(l) { g.nextTick(h(P, l, 1)); } : E && E.now ? n = function(l) { E.now(h(P, l, 1)); } : I ? (c = (o = new I()).port2, o.port1.onmessage = A, n = h(c.postMessage, c, 1)) : y.addEventListener && typeof postMessage == "function" && !y.importScripts ? (n = function(l) { y.postMessage(l + "", "*"); }, y.addEventListener("message", A, !1)) : n = "onreadystatechange" in s("script") ? function(l) { d.appendChild(s("script")).onreadystatechange = function() { d.removeChild(this), P.call(l); }; } : function(l) { setTimeout(h(P, l, 1), 0); }), f.exports = { set: m, clear: k }; }, function(f, v) { f.exports = function(e) { try { return { e: !1, v: e() }; } catch (n) { return { e: !0, v: n }; } }; }, function(f, v, e) { var n = e(4), o = e(9), c = e(31); f.exports = function(h, a) { if (n(h), o(a) && a.constructor === h) return a; var d = c.f(h); return (0, d.resolve)(a), d.promise; }; }, function(f, v, e) { var n = e(109), o = e(111); function c() { this.protocol = null, this.slashes = null, this.auth = null, this.host = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.query = null, this.pathname = null, this.path = null, this.href = null; } v.parse = A, v.resolve = function(l, w) { return A(l, !1, !0).resolve(w); }, v.resolveObject = function(l, w) { return l ? A(l, !1, !0).resolveObject(w) : w; }, v.format = function(l) { return o.isString(l) && (l = A(l)), l instanceof c ? l.format() : c.prototype.format.call(l); }, v.Url = c; var h = /^([a-z0-9.+-]+:)/i, a = /:[0-9]*$/, d = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, s = ["{", "}", "|", "\\", "^", "`"].concat(["<", ">", '"', "`", " ", "\r", ` `, " "]), y = ["'"].concat(s), g = ["%", "/", "?", ";", "#"].concat(y), m = ["/", "?", "#"], k = /^[+a-z0-9A-Z_-]{0,63}$/, I = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, E = { javascript: !0, "javascript:": !0 }, U = { javascript: !0, "javascript:": !0 }, C = { http: !0, https: !0, ftp: !0, gopher: !0, file: !0, "http:": !0, "https:": !0, "ftp:": !0, "gopher:": !0, "file:": !0 }, P = e(112); function A(l, w, i) { if (l && o.isObject(l) && l instanceof c) return l; var M = new c(); return M.parse(l, w, i), M; } c.prototype.parse = function(l, w, i) { if (!o.isString(l)) throw new TypeError("Parameter 'url' must be a string, not " + typeof l); var M = l.indexOf("?"), $ = M !== -1 && M < l.indexOf("#") ? "?" : "#", R = l.split($); R[0] = R[0].replace(/\\/g, "/"); var x = l = R.join($); if (x = x.trim(), !i && l.split("#").length === 1) { var b = d.exec(x); if (b) return this.path = x, this.href = x, this.pathname = b[1], b[2] ? (this.search = b[2], this.query = w ? P.parse(this.search.substr(1)) : this.search.substr(1)) : w && (this.search = "", this.query = {}), this; } var q = h.exec(x); if (q) { var D = (q = q[0]).toLowerCase(); this.protocol = D, x = x.substr(q.length); } if (i || q || x.match(/^\/\/[^@\/]+@[^@\/]+/)) { var W = x.substr(0, 2) === "//"; !W || q && U[q] || (x = x.substr(2), this.slashes = !0); } if (!U[q] && (W || q && !C[q])) { for (var Y, B, z = -1, X = 0; X < m.length; X++) (se = x.indexOf(m[X])) !== -1 && (z === -1 || se < z) && (z = se); for ((B = z === -1 ? x.lastIndexOf("@") : x.lastIndexOf("@", z)) !== -1 && (Y = x.slice(0, B), x = x.slice(B + 1), this.auth = decodeURIComponent(Y)), z = -1, X = 0; X < g.length; X++) { var se; (se = x.indexOf(g[X])) !== -1 && (z === -1 || se < z) && (z = se); } z === -1 && (z = x.length), this.host = x.slice(0, z), x = x.slice(z), this.parseHost(), this.hostname = this.hostname || ""; var ae = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]"; if (!ae) for (var te = this.hostname.split(/\./), le = (X = 0, te.length); X < le; X++) { var O = te[X]; if (O && !O.match(k)) { for (var J = "", H = 0, fe = O.length; H < fe; H++) O.charCodeAt(H) > 127 ? J += "x" : J += O[H]; if (!J.match(k)) { var ie = te.slice(0, X), t = te.slice(X + 1), r = O.match(I); r && (ie.push(r[1]), t.unshift(r[2])), t.length && (x = "/" + t.join(".") + x), this.hostname = ie.join("."); break; } } } this.hostname.length > 255 ? this.hostname = "" : this.hostname = this.hostname.toLowerCase(), ae || (this.hostname = n.toASCII(this.hostname)); var u = this.port ? ":" + this.port : "", S = this.hostname || ""; this.host = S + u, this.href += this.host, ae && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), x[0] !== "/" && (x = "/" + x)); } if (!E[D]) for (X = 0, le = y.length; X < le; X++) { var p = y[X]; if (x.indexOf(p) !== -1) { var _ = encodeURIComponent(p); _ === p && (_ = escape(p)), x = x.split(p).join(_); } } var L = x.indexOf("#"); L !== -1 && (this.hash = x.substr(L), x = x.slice(0, L)); var G = x.indexOf("?"); if (G !== -1 ? (this.search = x.substr(G), this.query = x.substr(G + 1), w && (this.query = P.parse(this.query)), x = x.slice(0, G)) : w && (this.search = "", this.query = {}), x && (this.pathname = x), C[D] && this.hostname && !this.pathname && (this.pathname = "/"), this.pathname || this.search) { u = this.pathname || ""; var re = this.search || ""; this.path = u + re; } return this.href = this.format(), this; }, c.prototype.format = function() { var l = this.auth || ""; l && (l = (l = encodeURIComponent(l)).replace(/%3A/i, ":"), l += "@"); var w = this.protocol || "", i = this.pathname || "", M = this.hash || "", $ = !1, R = ""; this.host ? $ = l + this.host : this.hostname && ($ = l + (this.hostname.indexOf(":") === -1 ? this.hostname : "[" + this.hostname + "]"), this.port && ($ += ":" + this.port)), this.query && o.isObject(this.query) && Object.keys(this.query).length && (R = P.stringify(this.query)); var x = this.search || R && "?" + R || ""; return w && w.substr(-1) !== ":" && (w += ":"), this.slashes || (!w || C[w]) && $ !== !1 ? ($ = "//" + ($ || ""), i && i.charAt(0) !== "/" && (i = "/" + i)) : $ || ($ = ""), M && M.charAt(0) !== "#" && (M = "#" + M), x && x.charAt(0) !== "?" && (x = "?" + x), w + $ + (i = i.replace(/[?#]/g, function(b) { return encodeURIComponent(b); })) + (x = x.replace("#", "%23")) + M; }, c.prototype.resolve = function(l) { return this.resolveObject(A(l, !1, !0)).format(); }, c.prototype.resolveObject = function(l) { if (o.isString(l)) { var w = new c(); w.parse(l, !1, !0), l = w; } for (var i = new c(), M = Object.keys(this), $ = 0; $ < M.length; $++) { var R = M[$]; i[R] = this[R]; } if (i.hash = l.hash, l.href === "") return i.href = i.format(), i; if (l.slashes && !l.protocol) { for (var x = Object.keys(l), b = 0; b < x.length; b++) { var q = x[b]; q !== "protocol" && (i[q] = l[q]); } return C[i.protocol] && i.hostname && !i.pathname && (i.path = i.pathname = "/"), i.href = i.format(), i; } if (l.protocol && l.protocol !== i.protocol) { if (!C[l.protocol]) { for (var D = Object.keys(l), W = 0; W < D.length; W++) { var Y = D[W]; i[Y] = l[Y]; } return i.href = i.format(), i; } if (i.protocol = l.protocol, l.host || U[l.protocol]) i.pathname = l.pathname; else { for (var B = (l.pathname || "").split("/"); B.length && !(l.host = B.shift()); ) ; l.host || (l.host = ""), l.hostname || (l.hostname = ""), B[0] !== "" && B.unshift(""), B.length < 2 && B.unshift(""), i.pathname = B.join("/"); } if (i.search = l.search, i.query = l.query, i.host = l.host || "", i.auth = l.auth, i.hostname = l.hostname || l.host, i.port = l.port, i.pathname || i.search) { var z = i.pathname || "", X = i.search || ""; i.path = z + X; } return i.slashes = i.slashes || l.slashes, i.href = i.format(), i; } var se = i.pathname && i.pathname.charAt(0) === "/", ae = l.host || l.pathname && l.pathname.charAt(0) === "/", te = ae || se || i.host && l.pathname, le = te, O = i.pathname && i.pathname.split("/") || [], J = (B = l.pathname && l.pathname.split("/") || [], i.protocol && !C[i.protocol]); if (J && (i.hostname = "", i.port = null, i.host && (O[0] === "" ? O[0] = i.host : O.unshift(i.host)), i.host = "", l.protocol && (l.hostname = null, l.port = null, l.host && (B[0] === "" ? B[0] = l.host : B.unshift(l.host)), l.host = null), te = te && (B[0] === "" || O[0] === "")), ae) i.host = l.host || l.host === "" ? l.host : i.host, i.hostname = l.hostname || l.hostname === "" ? l.hostname : i.hostname, i.search = l.search, i.query = l.query, O = B; else if (B.length) O || (O = []), O.pop(), O = O.concat(B), i.search = l.search, i.query = l.query; else if (!o.isNullOrUndefined(l.search)) return J && (i.hostname = i.host = O.shift(), (r = !!(i.host && i.host.indexOf("@") > 0) && i.host.split("@")) && (i.auth = r.shift(), i.host = i.hostname = r.shift())), i.search = l.search, i.query = l.query, o.isNull(i.pathname) && o.isNull(i.search) || (i.path = (i.pathname ? i.pathname : "") + (i.search ? i.search : "")), i.href = i.format(), i; if (!O.length) return i.pathname = null, i.search ? i.path = "/" + i.search : i.path = null, i.href = i.format(), i; for (var H = O.slice(-1)[0], fe = (i.host || l.host || O.length > 1) && (H === "." || H === "..") || H === "", ie = 0, t = O.length; t >= 0; t--) (H = O[t]) === "." ? O.splice(t, 1) : H === ".." ? (O.splice(t, 1), ie++) : ie && (O.splice(t, 1), ie--); if (!te && !le) for (; ie--; ie) O.unshift(".."); !te || O[0] === "" || O[0] && O[0].charAt(0) === "/" || O.unshift(""), fe && O.join("/").substr(-1) !== "/" && O.push(""); var r, u = O[0] === "" || O[0] && O[0].charAt(0) === "/"; return J && (i.hostname = i.host = u ? "" : O.length ? O.shift() : "", (r = !!(i.host && i.host.indexOf("@") > 0) && i.host.split("@")) && (i.auth = r.shift(), i.host = i.hostname = r.shift())), (te = te || i.host && O.length) && !u && O.unshift(""), O.length ? i.pathname = O.join("/") : (i.pathname = null, i.path = null), o.isNull(i.pathname) && o.isNull(i.search) || (i.path = (i.pathname ? i.pathname : "") + (i.search ? i.search : "")), i.auth = l.auth || i.auth, i.slashes = i.slashes || l.slashes, i.href = i.format(), i; }, c.prototype.parseHost = function() { var l = this.host, w = a.exec(l); w && ((w = w[0]) !== ":" && (this.port = w.substr(1)), l = l.substr(0, l.length - w.length)), l && (this.hostname = l); }; }, function(f, v, e) { Object.defineProperty(v, "__esModule", { value: !0 }); var n = g(e(53)), o = g(e(60)), c = g(e(80)), h = g(e(96)), a = g(e(98)), d = g(e(99)), s = g(e(103)), y = e(104); function g(P) { return P && P.__esModule ? P : { default: P }; } var m = "https://steemlogin.com", k = function() { return typeof window < "u" && window; }, I = function() { return k() && window._steemconnect; }, E = function() { return k() && window.steem_keychain; }, U = function() { return !I() && E(); }, C = function() { function P(A) { (0, a.default)(this, P), this.apiURL = A.apiURL || "https://api.steemlogin.com", this.app = A.app, this.callbackURL = A.callbackURL, this.accessToken = A.accessToken, this.scope = A.scope || [], this.responseType = A.responseType; } return (0, d.default)(P, [{ key: "setBaseURL", value: function() { return console.warn('The function "setBaseUrl" is deprecated, the base URL is always "https://steemconnect.com", you can only change the API URL with "setApiURL"'), this; } }, { key: "setApiURL", value: function(A) { return this.apiURL = A, this; } }, { key: "setApp", value: function(A) { return this.app = A, this; } }, { key: "setCallbackURL", value: function(A) { return this.callbackURL = A, this; } }, { key: "setAccessToken", value: function(A) { return this.accessToken = A, this; } }, { key: "removeAccessToken", value: function() { return delete this.accessToken, this; } }, { key: "setScope", value: function(A) { return this.scope = A, this; } }, { key: "getLoginURL", value: function(A) { var l = encodeURIComponent(this.callbackURL), w = "https://steemlogin.com/oauth2/authorize?client_id=" + this.app + "&redirect_uri=" + l; return this.responseType === "code" && (w += "&response_type=" + this.responseType), this.scope && (w += "&scope=" + this.scope.join(",")), A && (w += "&state=" + encodeURIComponent(A)), w; } }, { key: "login", value: function(A, l) { if (I()) { var w = {}; this.app && (w.app = this.app), A.authority && (w.authority = A.authority), window._steemconnect.login(w, l); } else if (E() && A.username) { var i = { type: "login" }; this.app && (i.app = this.app); var M = parseInt((/* @__PURE__ */ new Date()).getTime() / 1e3, 10), $ = { signed_message: i, authors: [A.username], timestamp: M }; window.steem_keychain.requestSignBuffer(A.username, (0, h.default)($), "Posting", function(R) { if (R.error) return l(R.error); $.signatures = [R.result]; var x = btoa((0, h.default)($)); return l(null, x); }); } else k() && (window.location = this.getLoginURL(A.state)); } }, { key: "send", value: function(A, l, w, i) { var M = this.apiURL + "/api/" + A, $ = (0, s.default)(M, { method: l, headers: { Accept: "application/json, text/plain, */*", "Content-Type": "application/json", Authorization: this.accessToken }, body: (0, h.default)(w) }).then(function(R) { var x = R.json(); return R.status !== 200 ? x.then(function(b) { return c.default.reject(b); }) : x; }).then(function(R) { return R.error ? c.default.reject(R) : R; }); return i ? $.then(function(R) { return i(null, R); }).catch(function(R) { return i(R, null); }) : $; } }, { key: "me", value: function(A) { return this.send("me", "POST", {}, A); } }, { key: "broadcast", value: function(A, l) { if (I()) { var w = (0, y.encodeOps)(A); return window._steemconnect.sign(w, l); } return this.send("broadcast", "POST", { operations: A }, l); } }, { key: "vote", value: function(A, l, w, i, M) { if (U()) return window.steem_keychain.requestVote(A, w, l, i, function(R) { return R.error ? M(R.error) : M(null, R); }); var $ = { voter: A, author: l, permlink: w, weight: i }; return this.broadcast([["vote", $]], M); } }, { key: "comment", value: function(A, l, w, i, M, $, R, x) { if (U()) return window.steem_keychain.requestPost(w, M, $, l, A, R, i, "", function(q) { return q.error ? x(q.error) : x(null, q); }); var b = { parent_author: A, parent_permlink: l, author: w, permlink: i, title: M, body: $, json_metadata: (0, h.default)(R) }; return this.broadcast([["comment", b]], x); } }, { key: "deleteComment", value: function(A, l, w) { var i = { author: A, permlink: l }; return this.broadcast([["delete_comment", i]], w); } }, { key: "customJson", value: function(A, l, w, i, M) { if (U()) return window.steem_keychain.requestCustomJson(l[0], w, "Posting", i, "", function(R) { return R.error ? M(R.error) : M(null, R); }); var $ = { required_auths: A, required_posting_auths: l, id: w, json: i }; return this.broadcast([["custom_json", $]], M); } }, { key: "reblog", value: function(A, l, w, i) { var M = ["reblog", { account: A, author: l, permlink: w }]; return this.customJson([], [A], "follow", (0, h.default)(M), i); } }, { key: "follow", value: function(A, l, w) { var i = ["follow", { follower: A, following: l, what: ["blog"] }]; return this.customJson([], [A], "follow", (0, h.default)(i), w); } }, { key: "unfollow", value: function(A, l, w) { var i = ["follow", { follower: A, following: l, what: [] }]; return this.customJson([], [A], "follow", (0, h.default)(i), w); } }, { key: "ignore", value: function(A, l, w) { var i = ["follow", { follower: A, following: l, what: ["ignore"] }]; return this.customJson([], [A], "follow", (0, h.default)(i), w); } }, { key: "claimRewardBalance", value: function(A, l, w, i, M) { var $ = { account: A, reward_steem: l, reward_sbd: w, reward_vests: i }; return this.broadcast([["claim_reward_balance", $]], M); } }, { key: "revokeToken", value: function(A) { var l = this; return this.send("oauth2/token/revoke", "POST", { token: this.accessToken }, A).then(function() { return l.removeAccessToken(); }); } }, { key: "updateUserMetadata", value: function() { var A = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, l = arguments[1]; return console.warn('The function "updateUserMetadata" is deprecated.'), this.send("me", "PUT", { user_metadata: A }, l); } }]), P; }(); v.default = { Client: C, Initialize: function(P) { return console.warn('The function "Initialize" is deprecated, please use the class "Client" instead.'), new C(P); }, sign: function(P, A, l) { if (console.warn('The function "sign" is deprecated.'), typeof P != "string" || (A === void 0 ? "undefined" : (0, o.default)(A)) !== "object") return { error: "invalid_request", error_description: "Request has an invalid format" }; var w = "https://steemlogin.com/sign/" + P + "?"; return w += (0, n.default)(A).map(function(i) { return i + "=" + encodeURIComponent(A[i]); }).join("&"), w += l ? "&redirect_uri=" + encodeURIComponent(l) : ""; }, sendTransaction: function(P, A, l) { var w = (0, y.encodeTx)(P, A), i = w.replace("steem://", m + "/"); return I() ? window._steemconnect.sign(w, l) : l && k() ? window.open(i, "_blank").focus() : i; }, sendOperations: function(P, A, l) { var w = (0, y.encodeOps)(P, A), i = w.replace("steem://", m + "/"); return I() ? window._steemconnect.sign(w, l) : l && k() ? window.open(i, "_blank").focus() : i; }, sendOperation: function(P, A, l) { var w = (0, y.encodeOp)(P, A), i = w.replace("steem://", m + "/"); return I() ? window._steemconnect.sign(w, l) : l && k() ? window.open(i, "_blank").focus() : i; }, hasChromeExtension: I, hasSteemKeychain: E, useSteemKeychain: U }, f.exports = v.default; }, function(f, v, e) { f.exports = { default: e(54), __esModule: !0 }; }, function(f, v, e) { e(55), f.exports = e(1).Object.keys; }, function(f, v, e) { var n = e(33), o = e(15); e(59)("keys", function() { return function(c) { return o(n(c)); }; }); }, function(f, v, e) { var n = e(11); f.exports = Object("z").propertyIsEnumerable(0) ? Object : function(o) { return n(o) == "String" ? o.split("") : Object(o); }; }, function(f, v, e) { var n = e(10), o = e(35), c = e(58); f.exports = function(h) { return function(a, d, s) { var y, g = n(a), m = o(g.length), k = c(s, m); if (h && d != d) { for (; m > k; ) if ((y = g[k++]) != y) return !0; } else for (; m > k; k++) if ((h || k in g) && g[k] === d) return h || k || 0; return !h && -1; }; }; }, function(f, v, e) { var n = e(22), o = Math.max, c = Math.min; f.exports = function(h, a) { return (h = n(h)) < 0 ? o(h + a, 0) : c(h, a); }; }, function(f, v, e) { var n = e(7), o = e(1), c = e(13); f.exports = function(h, a) { var d = (o.Object || {})[h] || Object[h], s = {}; s[h] = a(d), n(n.S + n.F * c(function() { d(1); }), "Object", s); }; }, function(f, v, e) { v.__esModule = !0; var n = h(e(61)), o = h(e(70)), c = typeof o.default == "function" && typeof n.default == "symbol" ? function(a) { return typeof a; } : function(a) { return a && typeof o.default == "function" && a.constructor === o.default && a !== o.default.prototype ? "symbol" : typeof a; }; function h(a) { return a && a.__esModule ? a : { default: a }; } v.default = typeof o.default == "function" && c(n.default) === "symbol" ? function(a) { return a === void 0 ? "undefined" : c(a); } : function(a) { return a && typeof o.default == "function" && a.constructor === o.default && a !== o.default.prototype ? "symbol" : a === void 0 ? "undefined" : c(a); }; }, function(f, v, e) { f.exports = { default: e(62), __esModule: !0 }; }, function(f, v, e) { e(37), e(42), f.exports = e(28).f("iterator"); }, function(f, v, e) { var n = e(22), o = e(21); f.exports = function(c) { return function(h, a) { var d, s, y = String(o(h)), g = n(a), m = y.length; return g < 0 || g >= m ? c ? "" : void 0 : (d = y.charCodeAt(g)) < 55296 || d > 56319 || g + 1 === m || (s = y.charCodeAt(g + 1)) < 56320 || s > 57343 ? c ? y.charAt(g) : d : c ? y.slice(g, g + 2) : s - 56320 + (d - 55296 << 10) + 65536; }; }; }, function(f, v, e) { var n = e(40), o = e(19), c = e(20), h = {}; e(8)(h, e(2)("iterator"), function() { return this; }), f.exports = function(a, d, s) { a.prototype = n(h, { next: o(1, s) }), c(a, d + " Iterator"); }; }, function(f, v, e) { var n = e(3), o = e(4), c = e(15); f.exports = e(5) ? Object.defineProperties : function(h, a) { o(h); for (var d, s = c(a), y = s.length, g = 0; y > g; ) n.f(h, d = s[g++], a[d]); return h; }; }, function(f, v, e) { var n = e(6), o = e(33), c = e(23)("IE_PROTO"), h = Object.prototype; f.exports = Object.getPrototypeOf || function(a) { return a = o(a), n(a, c) ? a[c] : typeof a.constructor == "function" && a instanceof a.constructor ? a.constructor.prototype : a instanceof Object ? h : null; }; }, function(f, v, e) { var n = e(68), o = e(69), c = e(14), h = e(10); f.exports = e(38)(Array, "Array", function(a, d) { this._t = h(a), this._i = 0, this._k = d; }, function() { var a = this._t, d = this._k, s = this._i++; return !a || s >= a.length ? (this._t = void 0, o(1)) : o(0, d == "keys" ? s : d == "values" ? a[s] : [s, a[s]]); }, "values"), c.Arguments = c.Array, n("keys"), n("values"), n("entries"); }, function(f, v) { f.exports = function() { }; }, function(f, v) { f.exports = function(e, n) { return { value: n, done: !!e }; }; }, function(f, v, e) { f.exports = { default: e(71), __esModule: !0 }; }, function(f, v, e) { e(72), e(45), e(78), e(79), f.exports = e(1).Symbol; }, function(f, v, e) { var n = e(0), o = e(6), c = e(5), h = e(7), a = e(39), d = e(73).KEY, s = e(13), y = e(24), g = e(20), m = e(16), k = e(2), I = e(28), E = e(29), U = e(74), C = e(75), P = e(4), A = e(9), l = e(10), w = e(27), i = e(19), M = e(40), $ = e(76), R = e(77), x = e(3), b = e(15), q = R.f, D = x.f, W = $.f, Y = n.Symbol, B = n.JSON, z = B && B.stringify, X = k("_hidden"), se = k("toPrimitive"), ae = {}.propertyIsEnumerable, te = y("symbol-registry"), le = y("symbols"), O = y("op-symbols"), J = Object.prototype, H = typeof Y == "function", fe = n.QObject, ie = !fe || !fe.prototype || !fe.prototype.findChild, t = c && s(function() { return M(D({}, "a", { get: function() { return D(this, "a", { value: 7 }).a; } })).a != 7; }) ? function(V, Z, ce) { var de = q(J, Z); de && delete J[Z], D(V, Z, ce), de && V !== J && D(J, Z, de); } : D, r = function(V) { var Z = le[V] = M(Y.prototype); return Z._k = V, Z; }, u = H && typeof Y.iterator == "symbol" ? function(V) { return typeof V == "symbol"; } : function(V) { return V instanceof Y; }, S = function(V, Z, ce) { return V === J && S(O, Z, ce), P(V), Z = w(Z, !0), P(ce), o(le, Z) ? (ce.enumerable ? (o(V, X) && V[X][Z] && (V[X][Z] = !1), ce = M(ce, { enumerable: i(0, !1) })) : (o(V, X) || D(V, X, i(1, {})), V[X][Z] = !0), t(V, Z, ce)) : D(V, Z, ce); }, p = function(V, Z) { P(V); for (var ce, de = U(Z = l(Z)), me = 0, Oe = de.length; Oe > me; ) S(V, ce = de[me++], Z[ce]); return V; }, _ = function(V) { var Z = ae.call(this, V = w(V, !0)); return !(this === J && o(le, V) && !o(O, V)) && (!(Z || !o(this, V) || !o(le, V) || o(this, X) && this[X][V]) || Z); }, L = function(V, Z) { if (V = l(V), Z = w(Z, !0), V !== J || !o(le, Z) || o(O, Z)) { var ce = q(V, Z); return !ce || !o(le, Z) || o(V, X) && V[X][Z] || (ce.enumerable = !0), ce; } }, G = function(V) { for (var Z, ce = W(l(V)), de = [], me = 0; ce.length > me; ) o(le, Z = ce[me++]) || Z == X || Z == d || de.push(Z); return de; }, re = function(V) { for (var Z, ce = V === J, de = W(ce ? O : l(V)), me = [], Oe = 0; de.length > Oe; ) !o(le, Z = de[Oe++]) || ce && !o(J, Z) || me.push(le[Z]); return me; }; H || (a((Y = function() { if (this instanceof Y) throw TypeError("Symbol is not a constructor!"); var V = m(arguments.length > 0 ? arguments[0] : void 0), Z = function(ce) { this === J && Z.call(O, ce), o(this, X) && o(this[X], V) && (this[X][V] = !1), t(this, V, i(1, ce)); }; return c && ie && t(J, V, { configurable: !0, set: Z }), r(V); }).prototype, "toString", function() { return this._k; }), R.f = L, x.f = S, e(44).f = $.f = G, e(30).f = _, e(43).f = re, c && !e(12) && a(J, "propertyIsEnumerable", _, !0), I.f = function(V) { return r(k(V)); }), h(h.G + h.W + h.F * !H, { Symbol: Y }); for (var ue = "hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","), oe = 0; ue.length > oe; ) k(ue[oe++]); for (var pe = b(k.store), ve = 0; pe.length > ve; ) E(pe[ve++]); h(h.S + h.F * !H, "Symbol", { for: function(V) { return o(te, V += "") ? te[V] : te[V] = Y(V); }, keyFor: function(V) { if (!u(V)) throw TypeError(V + " is not a symbol!"); for (var Z in te) if (te[Z] === V) return Z; }, useSetter: function() { ie = !0; }, useSimple: function() { ie = !1; } }), h(h.S + h.F * !H, "Object", { create: function(V, Z) { return Z === void 0 ? M(V) : p(M(V), Z); }, defineProperty: S, defineProperties: p, getOwnPropertyDescriptor: L, getOwnPropertyNames: G, getOwnPropertySymbols: re }), B && h(h.S + h.F * (!H || s(function() { var V = Y(); return z([V]) != "[null]" || z({ a: V }) != "{}" || z(Object(V)) != "{}"; })), "JSON", { stringify: function(V) { for (var Z, ce, de = [V], me = 1; arguments.length > me; ) de.push(arguments[me++]); if (ce = Z = de[1], (A(Z) || V !== void 0) && !u(V)) return C(Z) || (Z = function(Oe, Me) { if (typeof ce == "function" && (Me = ce.call(this, Oe, Me)), !u(Me)) return Me; }), de[1] = Z, z.apply(B, de); } }), Y.prototype[se] || e(8)(Y.prototype, se, Y.prototype.valueOf), g(Y, "Symbol"), g(Math, "Math", !0), g(n.JSON, "JSON", !0); }, function(f, v, e) { var n = e(16)("meta"), o = e(9), c = e(6), h = e(3).f, a = 0, d = Object.isExtensible || function() { return !0; }, s = !e(13)(function() { return d(Object.preventExtensions({})); }), y = function(m) { h(m, n, { value: { i: "O" + ++a, w: {} } }); }, g = f.exports = { KEY: n, NEED: !1, fastKey: function(m, k) { if (!o(m)) return typeof m == "symbol" ? m : (typeof m == "string" ? "S" : "P") + m; if (!c(m, n)) { if (!d(m)) return "F"; if (!k) return "E"; y(m); } return m[n].i; }, getWeak: function(m, k) { if (!c(m, n)) { if (!d(m)) return !0; if (!k) return !1; y(m); } return m[n].w; }, onFreeze: function(m) { return s && g.NEED && d(m) && !c(m, n) && y(m), m; } }; }, function(f, v, e) { var n = e(15), o = e(43), c = e(30); f.exports = function(h) { var a = n(h), d = o.f; if (d) for (var s, y = d(h), g = c.f, m = 0; y.length > m; ) g.call(h, s = y[m++]) && a.push(s); return a; }; }, function(f, v, e) { var n = e(11); f.exports = Array.isArray || function(o) { return n(o) == "Array"; }; }, function(f, v, e) { var n = e(10), o = e(44).f, c = {}.toString, h = typeof window == "object" && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; f.exports.f = function(a) { return h && c.call(a) == "[object Window]" ? function(d) { try { return o(d); } catch { return h.slice(); } }(a) : o(n(a)); }; }, function(f, v, e) { var n = e(30), o = e(19), c = e(10), h = e(27), a = e(6), d = e(36), s = Object.getOwnPropertyDescriptor; v.f = e(5) ? s : function(y, g) { if (y = c(y), g = h(g, !0), d) try { return s(y, g); } catch { } if (a(y, g)) return o(!n.f.call(y, g), y[g]); }; }, function(f, v, e) { e(29)("asyncIterator"); }, function(f, v, e) { e(29)("observable"); }, function(f, v, e) { f.exports = { default: e(81), __esModule: !0 }; }, function(f, v, e) { e(45), e(37), e(42), e(82), e(94), e(95), f.exports = e(1).Promise; }, function(f, v, e) { var n, o, c, h, a = e(12), d = e(0), s = e(17), y = e(46), g = e(7), m = e(9), k = e(18), I = e(83), E = e(84), U = e(47), C = e(48).set, P = e(89)(), A = e(31), l = e(49), w = e(90), i = e(50), M = d.TypeError, $ = d.process, R = $ && $.versions, x = R && R.v8 || "", b = d.Promise, q = y($) == "process", D = function() { }, W = o = A.f, Y = !!function() { try { var O = b.resolve(1), J = (O.constructor = {})[e(2)("species")] = function(H) { H(D, D); }; return (q || typeof PromiseRejectionEvent == "function") && O.then(D) instanceof J && x.indexOf("6.6") !== 0 && w.indexOf("Chrome/66") === -1; } catch { } }(), B = function(O) { var J; return !(!m(O) || typeof (J = O.then) != "function") && J; }, z = function(O, J) { if (!O._n) { O._n = !0; var H = O._c; P(function() { for (var fe = O._v, ie = O._s == 1, t = 0, r = function(u) { var S, p, _, L = ie ? u.ok : u.fail, G = u.resolve, re = u.reject, ue = u.domain; try { L ? (ie || (O._h == 2 && ae(O), O._h = 1), L === !0 ? S = fe : (ue && ue.enter(), S = L(fe), ue && (ue.exit(), _ = !0)), S === u.promise ? re(M("Promise-chain cycle")) : (p = B(S)) ? p.call(S, G, re) : G(S)) : re(fe); } catch (oe) { ue && !_ && ue.exit(), re(oe); } }; H.length > t; ) r(H[t++]); O._c = [], O._n = !1, J && !O._h && X(O); }); } }, X = function(O) { C.call(d, function() { var J, H, fe, ie = O._v, t = se(O); if (t && (J = l(function() { q ? $.emit("unhandledRejection", ie, O) : (H = d.onunhandledrejection) ? H({ promise: O, reason: ie }) : (fe = d.console) && fe.error && fe.error("Unhandled promise rejection", ie); }), O._h = q || se(O) ? 2 : 1), O._a = void 0, t && J.e) throw J.v; }); }, se = function(O) { return O._h !== 1 && (O._a || O._c).length === 0; }, ae = function(O) { C.call(d, function() { var J; q ? $.emit("rejectionHandled", O) : (J = d.onrejectionhandled) && J({ promise: O, reason: O._v }); }); }, te = function(O) { var J = this; J._d || (J._d = !0, (J = J._w || J)._v = O, J._s = 2, J._a || (J._a = J._c.slice())