UNPKG

yk-element-components-v2

Version:

1,501 lines 64.2 kB
function he(t, e) { return function() { return t.apply(e, arguments); }; } const { toString: me } = Object.prototype, { getPrototypeOf: Q } = Object, V = ((t) => (e) => { const r = me.call(e); return t[r] || (t[r] = r.slice(8, -1).toLowerCase()); })(/* @__PURE__ */ Object.create(null)), E = (t) => (t = t.toLowerCase(), (e) => V(e) === t), I = (t) => (e) => typeof e === t, { isArray: x } = Array, T = I("undefined"); function ze(t) { return t !== null && !T(t) && t.constructor !== null && !T(t.constructor) && O(t.constructor.isBuffer) && t.constructor.isBuffer(t); } const Ae = E("ArrayBuffer"); function Le(t) { let e; return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && Ae(t.buffer), e; } const De = I("string"), O = I("function"), ye = I("number"), Y = (t) => t !== null && typeof t == "object", Pe = (t) => t === !0 || t === !1, B = (t) => { if (V(t) !== "object") return !1; const e = Q(t); return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Symbol.toStringTag in t) && !(Symbol.iterator in t); }, He = E("Date"), Ie = E("File"), Je = E("Blob"), je = E("FileList"), Me = (t) => Y(t) && O(t.pipe), qe = (t) => { const e = "[object FormData]"; return t && (typeof FormData == "function" && t instanceof FormData || me.call(t) === e || O(t.toString) && t.toString() === e); }, We = E("URLSearchParams"), Ge = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); function _(t, e, { allOwnKeys: r = !1 } = {}) { if (t === null || typeof t > "u") return; let s, n; if (typeof t != "object" && (t = [t]), x(t)) for (s = 0, n = t.length; s < n; s++) e.call(null, t[s], s, t); else { const o = r ? Object.getOwnPropertyNames(t) : Object.keys(t), i = o.length; let c; for (s = 0; s < i; s++) c = o[s], e.call(null, t[c], c, t); } } function ge(t, e) { e = e.toLowerCase(); const r = Object.keys(t); let s = r.length, n; for (; s-- > 0; ) if (n = r[s], e === n.toLowerCase()) return n; return null; } const ve = typeof self > "u" ? typeof global > "u" ? globalThis : global : self, we = (t) => !T(t) && t !== ve; function G() { const { caseless: t } = we(this) && this || {}, e = {}, r = (s, n) => { const o = t && ge(e, n) || n; B(e[o]) && B(s) ? e[o] = G(e[o], s) : B(s) ? e[o] = G({}, s) : x(s) ? e[o] = s.slice() : e[o] = s; }; for (let s = 0, n = arguments.length; s < n; s++) arguments[s] && _(arguments[s], r); return e; } const Ke = (t, e, r, { allOwnKeys: s } = {}) => (_(e, (n, o) => { r && O(n) ? t[o] = he(n, r) : t[o] = n; }, { allOwnKeys: s }), t), Xe = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), Qe = (t, e, r, s) => { t.prototype = Object.create(e.prototype, s), t.prototype.constructor = t, Object.defineProperty(t, "super", { value: e.prototype }), r && Object.assign(t.prototype, r); }, Ve = (t, e, r, s) => { let n, o, i; const c = {}; if (e = e || {}, t == null) return e; do { for (n = Object.getOwnPropertyNames(t), o = n.length; o-- > 0; ) i = n[o], (!s || s(i, t, e)) && !c[i] && (e[i] = t[i], c[i] = !0); t = r !== !1 && Q(t); } while (t && (!r || r(t, e)) && t !== Object.prototype); return e; }, Ye = (t, e, r) => { t = String(t), (r === void 0 || r > t.length) && (r = t.length), r -= e.length; const s = t.indexOf(e, r); return s !== -1 && s === r; }, Ze = (t) => { if (!t) return null; if (x(t)) return t; let e = t.length; if (!ye(e)) return null; const r = new Array(e); for (; e-- > 0; ) r[e] = t[e]; return r; }, $e = ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && Q(Uint8Array)), et = (t, e) => { const s = (t && t[Symbol.iterator]).call(t); let n; for (; (n = s.next()) && !n.done; ) { const o = n.value; e.call(t, o[0], o[1]); } }, tt = (t, e) => { let r; const s = []; for (; (r = t.exec(e)) !== null; ) s.push(r); return s; }, rt = E("HTMLFormElement"), st = (t) => t.toLowerCase().replace( /[_-\s]([a-z\d])(\w*)/g, function(r, s, n) { return s.toUpperCase() + n; } ), se = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), nt = E("RegExp"), be = (t, e) => { const r = Object.getOwnPropertyDescriptors(t), s = {}; _(r, (n, o) => { e(n, o, t) !== !1 && (s[o] = n); }), Object.defineProperties(t, s); }, it = (t) => { be(t, (e, r) => { if (O(t) && ["arguments", "caller", "callee"].indexOf(r) !== -1) return !1; const s = t[r]; if (!!O(s)) { if (e.enumerable = !1, "writable" in e) { e.writable = !1; return; } e.set || (e.set = () => { throw Error("Can not rewrite read-only method '" + r + "'"); }); } }); }, ot = (t, e) => { const r = {}, s = (n) => { n.forEach((o) => { r[o] = !0; }); }; return x(t) ? s(t) : s(String(t).split(e)), r; }, at = () => { }, lt = (t, e) => (t = +t, Number.isFinite(t) ? t : e), ct = (t) => { const e = new Array(10), r = (s, n) => { if (Y(s)) { if (e.indexOf(s) >= 0) return; if (!("toJSON" in s)) { e[n] = s; const o = x(s) ? [] : {}; return _(s, (i, c) => { const u = r(i, n + 1); !T(u) && (o[c] = u); }), e[n] = void 0, o; } } return s; }; return r(t, 0); }, a = { isArray: x, isArrayBuffer: Ae, isBuffer: ze, isFormData: qe, isArrayBufferView: Le, isString: De, isNumber: ye, isBoolean: Pe, isObject: Y, isPlainObject: B, isUndefined: T, isDate: He, isFile: Ie, isBlob: Je, isRegExp: nt, isFunction: O, isStream: Me, isURLSearchParams: We, isTypedArray: $e, isFileList: je, forEach: _, merge: G, extend: Ke, trim: Ge, stripBOM: Xe, inherits: Qe, toFlatObject: Ve, kindOf: V, kindOfTest: E, endsWith: Ye, toArray: Ze, forEachEntry: et, matchAll: tt, isHTMLForm: rt, hasOwnProperty: se, hasOwnProp: se, reduceDescriptors: be, freezeMethods: it, toObjectSet: ot, toCamelCase: st, noop: at, toFiniteNumber: lt, findKey: ge, global: ve, isContextDefined: we, toJSONObject: ct }; function m(t, e, r, s, n) { Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", e && (this.code = e), r && (this.config = r), s && (this.request = s), n && (this.response = n); } a.inherits(m, Error, { toJSON: function() { return { message: this.message, name: this.name, description: this.description, number: this.number, fileName: this.fileName, lineNumber: this.lineNumber, columnNumber: this.columnNumber, stack: this.stack, config: a.toJSONObject(this.config), code: this.code, status: this.response && this.response.status ? this.response.status : null }; } }); const Se = m.prototype, Ee = {}; [ "ERR_BAD_OPTION_VALUE", "ERR_BAD_OPTION", "ECONNABORTED", "ETIMEDOUT", "ERR_NETWORK", "ERR_FR_TOO_MANY_REDIRECTS", "ERR_DEPRECATED", "ERR_BAD_RESPONSE", "ERR_BAD_REQUEST", "ERR_CANCELED", "ERR_NOT_SUPPORT", "ERR_INVALID_URL" ].forEach((t) => { Ee[t] = { value: t }; }); Object.defineProperties(m, Ee); Object.defineProperty(Se, "isAxiosError", { value: !0 }); m.from = (t, e, r, s, n, o) => { const i = Object.create(Se); return a.toFlatObject(t, i, function(u) { return u !== Error.prototype; }, (c) => c !== "isAxiosError"), m.call(i, t.message, e, r, s, n), i.cause = t, i.name = t.name, o && Object.assign(i, o), i; }; var ut = typeof self == "object" ? self.FormData : window.FormData; const dt = ut; function K(t) { return a.isPlainObject(t) || a.isArray(t); } function Ce(t) { return a.endsWith(t, "[]") ? t.slice(0, -2) : t; } function ne(t, e, r) { return t ? t.concat(e).map(function(n, o) { return n = Ce(n), !r && o ? "[" + n + "]" : n; }).join(r ? "." : "") : e; } function ft(t) { return a.isArray(t) && !t.some(K); } const pt = a.toFlatObject(a, {}, null, function(e) { return /^is[A-Z]/.test(e); }); function ht(t) { return t && a.isFunction(t.append) && t[Symbol.toStringTag] === "FormData" && t[Symbol.iterator]; } function J(t, e, r) { if (!a.isObject(t)) throw new TypeError("target must be an object"); e = e || new (dt || FormData)(), r = a.toFlatObject(r, { metaTokens: !0, dots: !1, indexes: !1 }, !1, function(h, w) { return !a.isUndefined(w[h]); }); const s = r.metaTokens, n = r.visitor || d, o = r.dots, i = r.indexes, u = (r.Blob || typeof Blob < "u" && Blob) && ht(e); if (!a.isFunction(n)) throw new TypeError("visitor must be a function"); function l(f) { if (f === null) return ""; if (a.isDate(f)) return f.toISOString(); if (!u && a.isBlob(f)) throw new m("Blob is not supported. Use a Buffer instead."); return a.isArrayBuffer(f) || a.isTypedArray(f) ? u && typeof Blob == "function" ? new Blob([f]) : Buffer.from(f) : f; } function d(f, h, w) { let v = f; if (f && !w && typeof f == "object") { if (a.endsWith(h, "{}")) h = s ? h : h.slice(0, -2), f = JSON.stringify(f); else if (a.isArray(f) && ft(f) || a.isFileList(f) || a.endsWith(h, "[]") && (v = a.toArray(f))) return h = Ce(h), v.forEach(function(N, Be) { !(a.isUndefined(N) || N === null) && e.append( i === !0 ? ne([h], Be, o) : i === null ? h : h + "[]", l(N) ); }), !1; } return K(f) ? !0 : (e.append(ne(w, h, o), l(f)), !1); } const p = [], A = Object.assign(pt, { defaultVisitor: d, convertValue: l, isVisitable: K }); function y(f, h) { if (!a.isUndefined(f)) { if (p.indexOf(f) !== -1) throw Error("Circular reference detected in " + h.join(".")); p.push(f), a.forEach(f, function(v, R) { (!(a.isUndefined(v) || v === null) && n.call( e, v, a.isString(R) ? R.trim() : R, h, A )) === !0 && y(v, h ? h.concat(R) : [R]); }), p.pop(); } } if (!a.isObject(t)) throw new TypeError("data must be an object"); return y(t), e; } function ie(t) { const e = { "!": "%21", "'": "%27", "(": "%28", ")": "%29", "~": "%7E", "%20": "+", "%00": "\0" }; return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g, function(s) { return e[s]; }); } function Z(t, e) { this._pairs = [], t && J(t, this, e); } const Oe = Z.prototype; Oe.append = function(e, r) { this._pairs.push([e, r]); }; Oe.toString = function(e) { const r = e ? function(s) { return e.call(this, s, ie); } : ie; return this._pairs.map(function(n) { return r(n[0]) + "=" + r(n[1]); }, "").join("&"); }; function mt(t) { return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); } function Re(t, e, r) { if (!e) return t; const s = r && r.encode || mt, n = r && r.serialize; let o; if (n ? o = n(e, r) : o = a.isURLSearchParams(e) ? e.toString() : new Z(e, r).toString(s), o) { const i = t.indexOf("#"); i !== -1 && (t = t.slice(0, i)), t += (t.indexOf("?") === -1 ? "?" : "&") + o; } return t; } class At { constructor() { this.handlers = []; } use(e, r, s) { return this.handlers.push({ fulfilled: e, rejected: r, synchronous: s ? s.synchronous : !1, runWhen: s ? s.runWhen : null }), this.handlers.length - 1; } eject(e) { this.handlers[e] && (this.handlers[e] = null); } clear() { this.handlers && (this.handlers = []); } forEach(e) { a.forEach(this.handlers, function(s) { s !== null && e(s); }); } } const oe = At, xe = { silentJSONParsing: !0, forcedJSONParsing: !0, clarifyTimeoutError: !1 }, yt = typeof URLSearchParams < "u" ? URLSearchParams : Z, gt = FormData, vt = (() => { let t; return typeof navigator < "u" && ((t = navigator.product) === "ReactNative" || t === "NativeScript" || t === "NS") ? !1 : typeof window < "u" && typeof document < "u"; })(), b = { isBrowser: !0, classes: { URLSearchParams: yt, FormData: gt, Blob }, isStandardBrowserEnv: vt, protocols: ["http", "https", "file", "blob", "url", "data"] }; function wt(t, e) { return J(t, new b.classes.URLSearchParams(), Object.assign({ visitor: function(r, s, n, o) { return b.isNode && a.isBuffer(r) ? (this.append(s, r.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments); } }, e)); } function bt(t) { return a.matchAll(/\w+|\[(\w*)]/g, t).map((e) => e[0] === "[]" ? "" : e[1] || e[0]); } function St(t) { const e = {}, r = Object.keys(t); let s; const n = r.length; let o; for (s = 0; s < n; s++) o = r[s], e[o] = t[o]; return e; } function Ue(t) { function e(r, s, n, o) { let i = r[o++]; const c = Number.isFinite(+i), u = o >= r.length; return i = !i && a.isArray(n) ? n.length : i, u ? (a.hasOwnProp(n, i) ? n[i] = [n[i], s] : n[i] = s, !c) : ((!n[i] || !a.isObject(n[i])) && (n[i] = []), e(r, s, n[i], o) && a.isArray(n[i]) && (n[i] = St(n[i])), !c); } if (a.isFormData(t) && a.isFunction(t.entries)) { const r = {}; return a.forEachEntry(t, (s, n) => { e(bt(s), n, r, 0); }), r; } return null; } const Et = { "Content-Type": void 0 }; function Ct(t, e, r) { if (a.isString(t)) try { return (e || JSON.parse)(t), a.trim(t); } catch (s) { if (s.name !== "SyntaxError") throw s; } return (r || JSON.stringify)(t); } const j = { transitional: xe, adapter: ["xhr", "http"], transformRequest: [function(e, r) { const s = r.getContentType() || "", n = s.indexOf("application/json") > -1, o = a.isObject(e); if (o && a.isHTMLForm(e) && (e = new FormData(e)), a.isFormData(e)) return n && n ? JSON.stringify(Ue(e)) : e; if (a.isArrayBuffer(e) || a.isBuffer(e) || a.isStream(e) || a.isFile(e) || a.isBlob(e)) return e; if (a.isArrayBufferView(e)) return e.buffer; if (a.isURLSearchParams(e)) return r.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString(); let c; if (o) { if (s.indexOf("application/x-www-form-urlencoded") > -1) return wt(e, this.formSerializer).toString(); if ((c = a.isFileList(e)) || s.indexOf("multipart/form-data") > -1) { const u = this.env && this.env.FormData; return J( c ? { "files[]": e } : e, u && new u(), this.formSerializer ); } } return o || n ? (r.setContentType("application/json", !1), Ct(e)) : e; }], transformResponse: [function(e) { const r = this.transitional || j.transitional, s = r && r.forcedJSONParsing, n = this.responseType === "json"; if (e && a.isString(e) && (s && !this.responseType || n)) { const i = !(r && r.silentJSONParsing) && n; try { return JSON.parse(e); } catch (c) { if (i) throw c.name === "SyntaxError" ? m.from(c, m.ERR_BAD_RESPONSE, this, null, this.response) : c; } } return e; }], timeout: 0, xsrfCookieName: "XSRF-TOKEN", xsrfHeaderName: "X-XSRF-TOKEN", maxContentLength: -1, maxBodyLength: -1, env: { FormData: b.classes.FormData, Blob: b.classes.Blob }, validateStatus: function(e) { return e >= 200 && e < 300; }, headers: { common: { Accept: "application/json, text/plain, */*" } } }; a.forEach(["delete", "get", "head"], function(e) { j.headers[e] = {}; }); a.forEach(["post", "put", "patch"], function(e) { j.headers[e] = a.merge(Et); }); const $ = j, Ot = a.toObjectSet([ "age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent" ]), Rt = (t) => { const e = {}; let r, s, n; return t && t.split(` `).forEach(function(i) { n = i.indexOf(":"), r = i.substring(0, n).trim().toLowerCase(), s = i.substring(n + 1).trim(), !(!r || e[r] && Ot[r]) && (r === "set-cookie" ? e[r] ? e[r].push(s) : e[r] = [s] : e[r] = e[r] ? e[r] + ", " + s : s); }), e; }, ae = Symbol("internals"); function U(t) { return t && String(t).trim().toLowerCase(); } function z(t) { return t === !1 || t == null ? t : a.isArray(t) ? t.map(z) : String(t); } function xt(t) { const e = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; let s; for (; s = r.exec(t); ) e[s[1]] = s[2]; return e; } function Ut(t) { return /^[-_a-zA-Z]+$/.test(t.trim()); } function le(t, e, r, s) { if (a.isFunction(s)) return s.call(this, e, r); if (!!a.isString(e)) { if (a.isString(s)) return e.indexOf(s) !== -1; if (a.isRegExp(s)) return s.test(e); } } function Tt(t) { return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, r, s) => r.toUpperCase() + s); } function Ft(t, e) { const r = a.toCamelCase(" " + e); ["get", "set", "has"].forEach((s) => { Object.defineProperty(t, s + r, { value: function(n, o, i) { return this[s].call(this, e, n, o, i); }, configurable: !0 }); }); } class M { constructor(e) { e && this.set(e); } set(e, r, s) { const n = this; function o(c, u, l) { const d = U(u); if (!d) throw new Error("header name must be a non-empty string"); const p = a.findKey(n, d); (!p || n[p] === void 0 || l === !0 || l === void 0 && n[p] !== !1) && (n[p || u] = z(c)); } const i = (c, u) => a.forEach(c, (l, d) => o(l, d, u)); return a.isPlainObject(e) || e instanceof this.constructor ? i(e, r) : a.isString(e) && (e = e.trim()) && !Ut(e) ? i(Rt(e), r) : e != null && o(r, e, s), this; } get(e, r) { if (e = U(e), e) { const s = a.findKey(this, e); if (s) { const n = this[s]; if (!r) return n; if (r === !0) return xt(n); if (a.isFunction(r)) return r.call(this, n, s); if (a.isRegExp(r)) return r.exec(n); throw new TypeError("parser must be boolean|regexp|function"); } } } has(e, r) { if (e = U(e), e) { const s = a.findKey(this, e); return !!(s && (!r || le(this, this[s], s, r))); } return !1; } delete(e, r) { const s = this; let n = !1; function o(i) { if (i = U(i), i) { const c = a.findKey(s, i); c && (!r || le(s, s[c], c, r)) && (delete s[c], n = !0); } } return a.isArray(e) ? e.forEach(o) : o(e), n; } clear() { return Object.keys(this).forEach(this.delete.bind(this)); } normalize(e) { const r = this, s = {}; return a.forEach(this, (n, o) => { const i = a.findKey(s, o); if (i) { r[i] = z(n), delete r[o]; return; } const c = e ? Tt(o) : String(o).trim(); c !== o && delete r[o], r[c] = z(n), s[c] = !0; }), this; } concat(...e) { return this.constructor.concat(this, ...e); } toJSON(e) { const r = /* @__PURE__ */ Object.create(null); return a.forEach(this, (s, n) => { s != null && s !== !1 && (r[n] = e && a.isArray(s) ? s.join(", ") : s); }), r; } [Symbol.iterator]() { return Object.entries(this.toJSON())[Symbol.iterator](); } toString() { return Object.entries(this.toJSON()).map(([e, r]) => e + ": " + r).join(` `); } get [Symbol.toStringTag]() { return "AxiosHeaders"; } static from(e) { return e instanceof this ? e : new this(e); } static concat(e, ...r) { const s = new this(e); return r.forEach((n) => s.set(n)), s; } static accessor(e) { const s = (this[ae] = this[ae] = { accessors: {} }).accessors, n = this.prototype; function o(i) { const c = U(i); s[c] || (Ft(n, i), s[c] = !0); } return a.isArray(e) ? e.forEach(o) : o(e), this; } } M.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent"]); a.freezeMethods(M.prototype); a.freezeMethods(M); const S = M; function q(t, e) { const r = this || $, s = e || r, n = S.from(s.headers); let o = s.data; return a.forEach(t, function(c) { o = c.call(r, o, n.normalize(), e ? e.status : void 0); }), n.normalize(), o; } function Te(t) { return !!(t && t.__CANCEL__); } function k(t, e, r) { m.call(this, t == null ? "canceled" : t, m.ERR_CANCELED, e, r), this.name = "CanceledError"; } a.inherits(k, m, { __CANCEL__: !0 }); const _t = null; function kt(t, e, r) { const s = r.config.validateStatus; !r.status || !s || s(r.status) ? t(r) : e(new m( "Request failed with status code " + r.status, [m.ERR_BAD_REQUEST, m.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4], r.config, r.request, r )); } const Nt = b.isStandardBrowserEnv ? function() { return { write: function(r, s, n, o, i, c) { const u = []; u.push(r + "=" + encodeURIComponent(s)), a.isNumber(n) && u.push("expires=" + new Date(n).toGMTString()), a.isString(o) && u.push("path=" + o), a.isString(i) && u.push("domain=" + i), c === !0 && u.push("secure"), document.cookie = u.join("; "); }, read: function(r) { const s = document.cookie.match(new RegExp("(^|;\\s*)(" + r + ")=([^;]*)")); return s ? decodeURIComponent(s[3]) : null; }, remove: function(r) { this.write(r, "", Date.now() - 864e5); } }; }() : function() { return { write: function() { }, read: function() { return null; }, remove: function() { } }; }(); function Bt(t) { return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t); } function zt(t, e) { return e ? t.replace(/\/+$/, "") + "/" + e.replace(/^\/+/, "") : t; } function Fe(t, e) { return t && !Bt(e) ? zt(t, e) : e; } const Lt = b.isStandardBrowserEnv ? function() { const e = /(msie|trident)/i.test(navigator.userAgent), r = document.createElement("a"); let s; function n(o) { let i = o; return e && (r.setAttribute("href", i), i = r.href), r.setAttribute("href", i), { href: r.href, protocol: r.protocol ? r.protocol.replace(/:$/, "") : "", host: r.host, search: r.search ? r.search.replace(/^\?/, "") : "", hash: r.hash ? r.hash.replace(/^#/, "") : "", hostname: r.hostname, port: r.port, pathname: r.pathname.charAt(0) === "/" ? r.pathname : "/" + r.pathname }; } return s = n(window.location.href), function(i) { const c = a.isString(i) ? n(i) : i; return c.protocol === s.protocol && c.host === s.host; }; }() : function() { return function() { return !0; }; }(); function Dt(t) { const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t); return e && e[1] || ""; } function Pt(t, e) { t = t || 10; const r = new Array(t), s = new Array(t); let n = 0, o = 0, i; return e = e !== void 0 ? e : 1e3, function(u) { const l = Date.now(), d = s[o]; i || (i = l), r[n] = u, s[n] = l; let p = o, A = 0; for (; p !== n; ) A += r[p++], p = p % t; if (n = (n + 1) % t, n === o && (o = (o + 1) % t), l - i < e) return; const y = d && l - d; return y ? Math.round(A * 1e3 / y) : void 0; }; } function ce(t, e) { let r = 0; const s = Pt(50, 250); return (n) => { const o = n.loaded, i = n.lengthComputable ? n.total : void 0, c = o - r, u = s(c), l = o <= i; r = o; const d = { loaded: o, total: i, progress: i ? o / i : void 0, bytes: c, rate: u || void 0, estimated: u && i && l ? (i - o) / u : void 0, event: n }; d[e ? "download" : "upload"] = !0, t(d); }; } const Ht = typeof XMLHttpRequest < "u", It = Ht && function(t) { return new Promise(function(r, s) { let n = t.data; const o = S.from(t.headers).normalize(), i = t.responseType; let c; function u() { t.cancelToken && t.cancelToken.unsubscribe(c), t.signal && t.signal.removeEventListener("abort", c); } a.isFormData(n) && b.isStandardBrowserEnv && o.setContentType(!1); let l = new XMLHttpRequest(); if (t.auth) { const y = t.auth.username || "", f = t.auth.password ? unescape(encodeURIComponent(t.auth.password)) : ""; o.set("Authorization", "Basic " + btoa(y + ":" + f)); } const d = Fe(t.baseURL, t.url); l.open(t.method.toUpperCase(), Re(d, t.params, t.paramsSerializer), !0), l.timeout = t.timeout; function p() { if (!l) return; const y = S.from( "getAllResponseHeaders" in l && l.getAllResponseHeaders() ), h = { data: !i || i === "text" || i === "json" ? l.responseText : l.response, status: l.status, statusText: l.statusText, headers: y, config: t, request: l }; kt(function(v) { r(v), u(); }, function(v) { s(v), u(); }, h), l = null; } if ("onloadend" in l ? l.onloadend = p : l.onreadystatechange = function() { !l || l.readyState !== 4 || l.status === 0 && !(l.responseURL && l.responseURL.indexOf("file:") === 0) || setTimeout(p); }, l.onabort = function() { !l || (s(new m("Request aborted", m.ECONNABORTED, t, l)), l = null); }, l.onerror = function() { s(new m("Network Error", m.ERR_NETWORK, t, l)), l = null; }, l.ontimeout = function() { let f = t.timeout ? "timeout of " + t.timeout + "ms exceeded" : "timeout exceeded"; const h = t.transitional || xe; t.timeoutErrorMessage && (f = t.timeoutErrorMessage), s(new m( f, h.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED, t, l )), l = null; }, b.isStandardBrowserEnv) { const y = (t.withCredentials || Lt(d)) && t.xsrfCookieName && Nt.read(t.xsrfCookieName); y && o.set(t.xsrfHeaderName, y); } n === void 0 && o.setContentType(null), "setRequestHeader" in l && a.forEach(o.toJSON(), function(f, h) { l.setRequestHeader(h, f); }), a.isUndefined(t.withCredentials) || (l.withCredentials = !!t.withCredentials), i && i !== "json" && (l.responseType = t.responseType), typeof t.onDownloadProgress == "function" && l.addEventListener("progress", ce(t.onDownloadProgress, !0)), typeof t.onUploadProgress == "function" && l.upload && l.upload.addEventListener("progress", ce(t.onUploadProgress)), (t.cancelToken || t.signal) && (c = (y) => { !l || (s(!y || y.type ? new k(null, t, l) : y), l.abort(), l = null); }, t.cancelToken && t.cancelToken.subscribe(c), t.signal && (t.signal.aborted ? c() : t.signal.addEventListener("abort", c))); const A = Dt(d); if (A && b.protocols.indexOf(A) === -1) { s(new m("Unsupported protocol " + A + ":", m.ERR_BAD_REQUEST, t)); return; } l.send(n || null); }); }, L = { http: _t, xhr: It }; a.forEach(L, (t, e) => { if (t) { try { Object.defineProperty(t, "name", { value: e }); } catch { } Object.defineProperty(t, "adapterName", { value: e }); } }); const Jt = { getAdapter: (t) => { t = a.isArray(t) ? t : [t]; const { length: e } = t; let r, s; for (let n = 0; n < e && (r = t[n], !(s = a.isString(r) ? L[r.toLowerCase()] : r)); n++) ; if (!s) throw s === !1 ? new m( `Adapter ${r} is not supported by the environment`, "ERR_NOT_SUPPORT" ) : new Error( a.hasOwnProp(L, r) ? `Adapter '${r}' is not available in the build` : `Unknown adapter '${r}'` ); if (!a.isFunction(s)) throw new TypeError("adapter is not a function"); return s; }, adapters: L }; function W(t) { if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted) throw new k(); } function ue(t) { return W(t), t.headers = S.from(t.headers), t.data = q.call( t, t.transformRequest ), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), Jt.getAdapter(t.adapter || $.adapter)(t).then(function(s) { return W(t), s.data = q.call( t, t.transformResponse, s ), s.headers = S.from(s.headers), s; }, function(s) { return Te(s) || (W(t), s && s.response && (s.response.data = q.call( t, t.transformResponse, s.response ), s.response.headers = S.from(s.response.headers))), Promise.reject(s); }); } const de = (t) => t instanceof S ? t.toJSON() : t; function F(t, e) { e = e || {}; const r = {}; function s(l, d, p) { return a.isPlainObject(l) && a.isPlainObject(d) ? a.merge.call({ caseless: p }, l, d) : a.isPlainObject(d) ? a.merge({}, d) : a.isArray(d) ? d.slice() : d; } function n(l, d, p) { if (a.isUndefined(d)) { if (!a.isUndefined(l)) return s(void 0, l, p); } else return s(l, d, p); } function o(l, d) { if (!a.isUndefined(d)) return s(void 0, d); } function i(l, d) { if (a.isUndefined(d)) { if (!a.isUndefined(l)) return s(void 0, l); } else return s(void 0, d); } function c(l, d, p) { if (p in e) return s(l, d); if (p in t) return s(void 0, l); } const u = { url: o, method: o, data: o, baseURL: i, transformRequest: i, transformResponse: i, paramsSerializer: i, timeout: i, timeoutMessage: i, withCredentials: i, adapter: i, responseType: i, xsrfCookieName: i, xsrfHeaderName: i, onUploadProgress: i, onDownloadProgress: i, decompress: i, maxContentLength: i, maxBodyLength: i, beforeRedirect: i, transport: i, httpAgent: i, httpsAgent: i, cancelToken: i, socketPath: i, responseEncoding: i, validateStatus: c, headers: (l, d) => n(de(l), de(d), !0) }; return a.forEach(Object.keys(t).concat(Object.keys(e)), function(d) { const p = u[d] || n, A = p(t[d], e[d], d); a.isUndefined(A) && p !== c || (r[d] = A); }), r; } const _e = "1.2.0", ee = {}; ["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => { ee[t] = function(s) { return typeof s === t || "a" + (e < 1 ? "n " : " ") + t; }; }); const fe = {}; ee.transitional = function(e, r, s) { function n(o, i) { return "[Axios v" + _e + "] Transitional option '" + o + "'" + i + (s ? ". " + s : ""); } return (o, i, c) => { if (e === !1) throw new m( n(i, " has been removed" + (r ? " in " + r : "")), m.ERR_DEPRECATED ); return r && !fe[i] && (fe[i] = !0, console.warn( n( i, " has been deprecated since v" + r + " and will be removed in the near future" ) )), e ? e(o, i, c) : !0; }; }; function jt(t, e, r) { if (typeof t != "object") throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE); const s = Object.keys(t); let n = s.length; for (; n-- > 0; ) { const o = s[n], i = e[o]; if (i) { const c = t[o], u = c === void 0 || i(c, o, t); if (u !== !0) throw new m("option " + o + " must be " + u, m.ERR_BAD_OPTION_VALUE); continue; } if (r !== !0) throw new m("Unknown option " + o, m.ERR_BAD_OPTION); } } const X = { assertOptions: jt, validators: ee }, C = X.validators; class P { constructor(e) { this.defaults = e, this.interceptors = { request: new oe(), response: new oe() }; } request(e, r) { typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r = F(this.defaults, r); const { transitional: s, paramsSerializer: n, headers: o } = r; s !== void 0 && X.assertOptions(s, { silentJSONParsing: C.transitional(C.boolean), forcedJSONParsing: C.transitional(C.boolean), clarifyTimeoutError: C.transitional(C.boolean) }, !1), n !== void 0 && X.assertOptions(n, { encode: C.function, serialize: C.function }, !0), r.method = (r.method || this.defaults.method || "get").toLowerCase(); let i; i = o && a.merge( o.common, o[r.method] ), i && a.forEach( ["delete", "get", "head", "post", "put", "patch", "common"], (f) => { delete o[f]; } ), r.headers = S.concat(i, o); const c = []; let u = !0; this.interceptors.request.forEach(function(h) { typeof h.runWhen == "function" && h.runWhen(r) === !1 || (u = u && h.synchronous, c.unshift(h.fulfilled, h.rejected)); }); const l = []; this.interceptors.response.forEach(function(h) { l.push(h.fulfilled, h.rejected); }); let d, p = 0, A; if (!u) { const f = [ue.bind(this), void 0]; for (f.unshift.apply(f, c), f.push.apply(f, l), A = f.length, d = Promise.resolve(r); p < A; ) d = d.then(f[p++], f[p++]); return d; } A = c.length; let y = r; for (p = 0; p < A; ) { const f = c[p++], h = c[p++]; try { y = f(y); } catch (w) { h.call(this, w); break; } } try { d = ue.call(this, y); } catch (f) { return Promise.reject(f); } for (p = 0, A = l.length; p < A; ) d = d.then(l[p++], l[p++]); return d; } getUri(e) { e = F(this.defaults, e); const r = Fe(e.baseURL, e.url); return Re(r, e.params, e.paramsSerializer); } } a.forEach(["delete", "get", "head", "options"], function(e) { P.prototype[e] = function(r, s) { return this.request(F(s || {}, { method: e, url: r, data: (s || {}).data })); }; }); a.forEach(["post", "put", "patch"], function(e) { function r(s) { return function(o, i, c) { return this.request(F(c || {}, { method: e, headers: s ? { "Content-Type": "multipart/form-data" } : {}, url: o, data: i })); }; } P.prototype[e] = r(), P.prototype[e + "Form"] = r(!0); }); const D = P; class te { constructor(e) { if (typeof e != "function") throw new TypeError("executor must be a function."); let r; this.promise = new Promise(function(o) { r = o; }); const s = this; this.promise.then((n) => { if (!s._listeners) return; let o = s._listeners.length; for (; o-- > 0; ) s._listeners[o](n); s._listeners = null; }), this.promise.then = (n) => { let o; const i = new Promise((c) => { s.subscribe(c), o = c; }).then(n); return i.cancel = function() { s.unsubscribe(o); }, i; }, e(function(o, i, c) { s.reason || (s.reason = new k(o, i, c), r(s.reason)); }); } throwIfRequested() { if (this.reason) throw this.reason; } subscribe(e) { if (this.reason) { e(this.reason); return; } this._listeners ? this._listeners.push(e) : this._listeners = [e]; } unsubscribe(e) { if (!this._listeners) return; const r = this._listeners.indexOf(e); r !== -1 && this._listeners.splice(r, 1); } static source() { let e; return { token: new te(function(n) { e = n; }), cancel: e }; } } const Mt = te; function qt(t) { return function(r) { return t.apply(null, r); }; } function Wt(t) { return a.isObject(t) && t.isAxiosError === !0; } function ke(t) { const e = new D(t), r = he(D.prototype.request, e); return a.extend(r, D.prototype, e, { allOwnKeys: !0 }), a.extend(r, e, null, { allOwnKeys: !0 }), r.create = function(n) { return ke(F(t, n)); }, r; } const g = ke($); g.Axios = D; g.CanceledError = k; g.CancelToken = Mt; g.isCancel = Te; g.VERSION = _e; g.toFormData = J; g.AxiosError = m; g.Cancel = g.CanceledError; g.all = function(e) { return Promise.all(e); }; g.spread = qt; g.isAxiosError = Wt; g.AxiosHeaders = S; g.formToJSON = (t) => Ue(a.isHTMLForm(t) ? new FormData(t) : t); g.default = g; const H = g; function re(t, e, r, s, n, o, i, c) { var u = typeof t == "function" ? t.options : t; e && (u.render = e, u.staticRenderFns = r, u._compiled = !0), s && (u.functional = !0), o && (u._scopeId = "data-v-" + o); var l; if (i ? (l = function(A) { A = A || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !A && typeof __VUE_SSR_CONTEXT__ < "u" && (A = __VUE_SSR_CONTEXT__), n && n.call(this, A), A && A._registeredComponents && A._registeredComponents.add(i); }, u._ssrRegister = l) : n && (l = c ? function() { n.call( this, (u.functional ? this.parent : this).$root.$options.shadowRoot ); } : n), l) if (u.functional) { u._injectStyles = l; var d = u.render; u.render = function(y, f) { return l.call(f), d(y, f); }; } else { var p = u.beforeCreate; u.beforeCreate = p ? [].concat(p, l) : [l]; } return { exports: t, options: u }; } const Gt = { props: { validateCover: { type: Boolean, default: !1 }, orCropper: { type: Boolean, default: !1 }, value: { type: Array, default() { return []; } }, accept: { type: String, default: ".jpg,.jpeg,.png" }, maxSize: { type: String, default: "300k" }, coverWidth: { type: Number, default: 750 }, coverHeight: { type: Number, default: 422 }, cropBoxResizable: { type: Boolean, default: !1 }, guides: { type: Boolean, default: !1 }, aspectRatio: { type: String, default: "750/422" }, getCoverUploadInfo: Function, uploadService: { type: String, default: "huawei" } }, data() { return { loading: null, fileList: [], uploadImgUrl: "", viewUrl: "", sendContentType: "", sendAuthorization: "", sendXAmzDate: "" }; }, mounted() { this.fileList = this.value; }, methods: { handleSize() { const t = this.maxSize.toLowerCase(); let e = 0; return t.indexOf("k") >= 0 && (e = Number(t.substr(0, t.indexOf("k")))), t.indexOf("m") >= 0 && (e = Number(t.substr(0, t.indexOf("m"))) * 1024), e; }, getPath(t) { let r = new URL(t).pathname; return r.substring(1, r.length); }, handleUploadSuccess(t, e) { this.fileList = [{ path: this.getPath(this.viewUrl), url: this.viewUrl, id: e.file.uid, name: e.file.name }], this.$emit("input", this.fileList), this.loading.close(); }, async handleBeforeUpload(t) { const r = this.accept.replaceAll(".", "").split(","); if (!r.find((u) => t.type.indexOf(u) != -1) && this.accept != "") { let u = ""; return r.forEach((l, d) => { u += d + 1 == r.length ? l : l + "/"; }), this.$message.error(`\u4E0A\u4F20\u89C6\u9891\u53EA\u80FD\u662F ${u} \u683C\u5F0F!`), !1; } const n = this.handleSize(); if (!(t.size / 1024 < n)) return this.$message.error(`\u4E0A\u4F20\u5C01\u9762\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC7${this.maxSize}!`), !1; if (this.validateCover) { let u = await this.getSize(t); if (u.width != this.coverWidth || u.height != this.coverHeight) return this.$message.error(`\u4E0A\u4F20\u5C01\u9762\u56FE\u7247\u7684\u5BBD\u9AD8\u5E94\u4E3A${this.coverWidth}*${this.coverHeight}\u50CF\u7D20!`), !1; } const i = t.type.replace("image/", ""), c = await this.getCoverUploadInfo(i, t); if (!c) return !1; this.uploadService === "huawei" ? (this.uploadImgUrl = c.data.signedUrl, this.viewUrl = c.data.viewUrl) : this.uploadService === "huayun" && (this.uploadImgUrl = c.data.viewUrl, this.viewUrl = c.data.viewUrl, this.sendContentType = c.data.contentType, this.sendAuthorization = c.data.amzSignature, this.sendXAmzDate = c.data.amzDate), this.loading = this.$loading({ lock: !0, text: "\u4E0A\u4F20\u4E2D", background: "rgba(0, 0, 0, 0.7)" }); }, handleUploadError() { this.$message({ type: "error", message: "\u5C01\u9762\u4E0A\u4F20\u5931\u8D25" }), this.loading.close(); }, upload(t) { if (this.uploadService === "huayun") { const e = { "Content-Type": this.sendContentType, Authorization: this.sendAuthorization, "x-chinac-date": this.sendXAmzDate }; H.put(this.uploadImgUrl, t.file, { headers: e }).then((r) => { this.handleUploadSuccess(r, t); }).catch(function(r) { console.log(r); }); } else this.uploadService === "huawei" && H.put(this.uploadImgUrl, t.file, { headers: { "Content-Type": t.file.type } }).then((e) => { this.loading.close(), this.handleUploadSuccess(e, t); }); }, async getSize(t) { return new Promise((e, r) => { const s = new FileReader(); s.onload = function(n) { const o = n.target.result, i = document.createElement("img"); i.src = o, i.onload = function() { e({ width: i.width, height: i.height }); }; }, s.readAsDataURL(t); }); } } }; var Kt = function() { var e = this, r = e._self._c; return r("div", { staticClass: "cover_upload_box" }, [r("yk-upload", { ref: "upload", attrs: { action: "#", "show-file-list": !1, "on-success": e.handleUploadSuccess, "before-upload": e.handleBeforeUpload, "on-error": e.handleUploadError, name: "file", "file-list": e.value, accept: e.accept, "or-cropper": e.orCropper, "http-request": e.upload, cropperWidth: e.coverWidth, cropperHeight: e.coverHeight, cropBoxResizable: e.cropBoxResizable, guides: e.guides, aspectRatio: e.aspectRatio } }, [r("div", { staticClass: "cover_upload_button" }, [r("i", { staticClass: "el-icon-upload2" }), e._v(" \u4E0A\u4F20\u89C6\u9891\u5C01\u9762 ")])])], 1); }, Xt = [], Qt = /* @__PURE__ */ re( Gt, Kt, Xt, !1, null, null, null, null ); const Vt = Qt.exports, Yt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABSCAYAAADD2VOmAAAAAXNSR0IArs4c6QAAAbZJREFUeF7t2jFKQ1EQheEzYGlhp42V7sKNuAFLV2PpBtyIu9DKRjsLS2EkoATB+xLumUyC/KkzeZPvnXnMDQnxsgTCqqZYAJohABBAU8AsJ4EAmgJmOQkE0BQwy0kggKaAWU4CATQFzHISeCiAmXkl6U7S+aCnF0m3EfFo9rxY3t1HWQIz80nSxQac54i43DF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ACV6Kwug5U4UAAAAASUVORK5CYII=", Zt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAP5JREFUWEftltEJwkAMhr84hvuIjiG4gTqGjiA4huJAbmHk4PpS7mwSsVehfTySP1/TP9cIjR9pXJ8ZYJodUNUlsAfuIvL4xiequgLWwFlEnn2tYgdU9QQcgBewE5FrBEJVt8AFWGSAoxUgUd9yYgiiVzxpbErdrHqgIGDuhCf3owk9Ql1rvTmDU+AR9MR2wIMAKdAibIkpGdkEMAQRLZ50zQA1iPxW3ai5J8YFUIFIx2nO3cXdHag4PR2Hiv8nQMFw432CkttHM+GnUfv5GFoKWGJCF5FH2BNruoojgt6caf6O8xrVbiGZwkrWdimNLKDRHPffMFqoljcDNO/AG+KX5CFfO43qAAAAAElFTkSuQmCC"; const $t = { props: { visible: { type: Boolean, default: !1 }, videoUrl: { type: String, default: "" }, videoPoster: { type: String, default: "" } }, computed: { orVisible() { return this.visible; } }, watch: { visible(t) { t && this.getVideoMsg(); } }, data() { return { palyIng: !0, sHeight: 0, sWidth: 0, progress: 0, duration: 0, currentTime: 0, timer: null, elevideo: null }; }, methods: { progressChange(t) { this.elevideo.currentTime = Math.round(this.elevideo.duration * (t / 100)); }, getVideoMsg() { this.$nextTick(() => { this.elevideo = document.getElementById("video_upload_video"), this.elevideo.addEventListener("loadedmetadata", () => { let t = 1200, e = 800, r = t / e, s = this.elevideo.videoWidth / this.elevideo.videoHeight; this.duration = this.elevideo.duration, s < r ? (this.sHeight = e, this.sWidth = e * s) : (this.sWidth = t, this.sHeight = t / s); }), this.elevideo.addEventListener("playing", () => { this.currentTime = Math.round(this.elevideo.currentTime), this.progress = Math.ceil(this.currentTime / this.duration * 100), this.timer = setInterval(() => { this.currentTime = Math.round(this.elevideo.currentTime), this.progress = Math.ceil(this.elevideo.currentTime / this.duration * 100) >= 99 ? 100 : Math.ceil(this.currentTime / this.duration * 100); }, 500); }), this.elevideo.addEventListener("pause", () => { clearInterval(this.timer); }), this.elevideo.addEventListener("ended", () => { clearInterval(this.timer), this.palyIng = !1; }, !1); }); }, getTime(t) { let e = parseInt(t / 60 % 60); e = e < 10 ? "0" + e : e; let r = parseInt(t % 60); return r = r < 10 ? "0" + r : r, e + ":" + r; }, close() { this.palyIng = !0, clearInterval(this.timer), this.$emit("update:visible", !1); }, pause() { var t = document.getElementById("video_upload_video"); t.paused ? (this.palyIng = !0, t.play()) : t.play() && (this.palyIng = !1, t.pause()); } } }; var er = function() { var e = this, r = e._self._c; return r("el-dialog", { attrs: { "custom-class": "video_upload_box", visible: e.orVisible, "show-close": !1, "append-to-body": "", "destroy-on-close": !0, width: e.sWidth + "px", height: e.sHeigh