UNPKG

antdv-pro-modal

Version:

Ant Design Vue Pro Modal dialog box, can be dragged and resized.

1,614 lines 185 kB
import { Fragment as bt, isVNode as jr, Comment as Wr, Text as Bo, defineComponent as H, ref as F, computed as w, createVNode as b, Transition as St, withDirectives as zo, vShow as Ro, nextTick as ce, shallowRef as B, watch as ae, onBeforeUnmount as ve, watchEffect as Ae, provide as Ct, inject as Z, onBeforeMount as kr, onMounted as Ke, onUpdated as gn, Teleport as _o, h as Ee, getCurrentInstance as xt, reactive as $t, unref as je, triggerRef as Xr, render as Vt, mergeProps as Gr, createApp as Vr } from "vue"; import { Modal as Ur, Button as Bn } from "ant-design-vue"; import { createTypes as Kr } from "vue-types"; import { isEmpty as Lo } from "lodash-es"; import { FullscreenExitOutlined as Yr, FullscreenOutlined as qr, CloseOutlined as Qr } from "@ant-design/icons-vue"; const ft = function() { for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n]; return t; }, pn = (e) => { const t = e; return t.install = function(n) { n.component(t.displayName || t.name, e); }, e; }; function zn() { return { type: [Function, Array] }; } function oe(e) { return { type: Object, default: e }; } function we(e) { return { type: Boolean, default: e }; } function Ut(e, t) { const n = { validator: () => !0, default: e }; return n; } function Rn(e) { return { type: Array, default: e }; } function _n(e) { return { type: String, default: e }; } function Zr(e, t) { return e ? { type: e, default: t } : Ut(t); } function f() { return f = Object.assign ? Object.assign.bind() : function(e) { for (var t = 1; t < arguments.length; t++) { var n = arguments[t]; for (var o in n) ({}).hasOwnProperty.call(n, o) && (e[o] = n[o]); } return e; }, f.apply(null, arguments); } function We(e) { "@babel/helpers - typeof"; return We = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) { return typeof t; } : function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, We(e); } function Jr(e, t) { if (We(e) != "object" || !e) return e; var n = e[Symbol.toPrimitive]; if (n !== void 0) { var o = n.call(e, t); if (We(o) != "object") return o; throw new TypeError("@@toPrimitive must return a primitive value."); } return (t === "string" ? String : Number)(e); } function ea(e) { var t = Jr(e, "string"); return We(t) == "symbol" ? t : t + ""; } function ta(e, t, n) { return (t = ea(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e; } function Ln(e, t) { var n = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); t && (o = o.filter(function(r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), n.push.apply(n, o); } return n; } function I(e) { for (var t = 1; t < arguments.length; t++) { var n = arguments[t] != null ? arguments[t] : {}; t % 2 ? Ln(Object(n), !0).forEach(function(o) { ta(e, o, n[o]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Ln(Object(n)).forEach(function(o) { Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(n, o)); }); } return e; } const na = Array.isArray, oa = (e) => typeof e == "string", ra = (e) => e !== null && typeof e == "object"; function se() { const e = []; for (let t = 0; t < arguments.length; t++) { const n = t < 0 || arguments.length <= t ? void 0 : arguments[t]; if (n) { if (oa(n)) e.push(n); else if (na(n)) for (let o = 0; o < n.length; o++) { const r = se(n[o]); r && e.push(r); } else if (ra(n)) for (const o in n) n[o] && e.push(o); } } return e.join(" "); } function Do(e, t) { return e && e.contains ? e.contains(t) : !1; } const Dn = { /** * TAB */ TAB: 9, /** * ESC */ ESC: 27 }; function aa(e, t) { const n = f({}, e); for (let o = 0; o < t.length; o += 1) { const r = t[o]; delete n[r]; } return n; } const ia = `accept acceptcharset accesskey action allowfullscreen allowtransparency alt async autocomplete autofocus autoplay capture cellpadding cellspacing challenge charset checked classid classname colspan cols content contenteditable contextmenu controls coords crossorigin data datetime default defer dir disabled download draggable enctype form formaction formenctype formmethod formnovalidate formtarget frameborder headers height hidden high href hreflang htmlfor for httpequiv icon id inputmode integrity is keyparams keytype kind label lang list loop low manifest marginheight marginwidth max maxlength media mediagroup method min minlength multiple muted name novalidate nonce open optimum pattern placeholder poster preload radiogroup readonly rel required reversed role rowspan rows sandbox scope scoped scrolling seamless selected shape size sizes span spellcheck src srcdoc srclang srcset start step style summary tabindex target title type usemap value width wmode wrap`, la = `onCopy onCut onPaste onCompositionend onCompositionstart onCompositionupdate onKeydown onKeypress onKeyup onFocus onBlur onChange onInput onSubmit onClick onContextmenu onDoubleclick onDblclick onDrag onDragend onDragenter onDragexit onDragleave onDragover onDragstart onDrop onMousedown onMouseenter onMouseleave onMousemove onMouseout onMouseover onMouseup onSelect onTouchcancel onTouchend onTouchmove onTouchstart onTouchstartPassive onTouchmovePassive onScroll onWheel onAbort onCanplay onCanplaythrough onDurationchange onEmptied onEncrypted onEnded onError onLoadeddata onLoadedmetadata onLoadstart onPause onPlay onPlaying onProgress onRatechange onSeeked onSeeking onStalled onSuspend onTimeupdate onVolumechange onWaiting onLoad onError`, Nn = `${ia} ${la}`.split(/[\s\n]+/), ca = "aria-", sa = "data-"; function Fn(e, t) { return e.indexOf(t) === 0; } function ua(e) { let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, n; t === !1 ? n = { aria: !0, data: !0, attr: !0 } : t === !0 ? n = { aria: !0 } : n = f({}, t); const o = {}; return Object.keys(e).forEach((r) => { // Aria (n.aria && (r === "role" || Fn(r, ca)) || // Data n.data && Fn(r, sa) || // Attr n.attr && (Nn.includes(r) || Nn.includes(r.toLowerCase()))) && (o[r] = e[r]); }), o; } const da = (e) => e != null && e !== "", wt = (e, t) => { const n = f({}, e); return Object.keys(t).forEach((o) => { const r = n[o]; if (r) r.type || r.default ? r.default = t[o] : r.def ? r.def(t[o]) : n[o] = { type: r, default: t[o] }; else throw new Error(`not have ${o} prop`); }), n; }, fa = Symbol("skipFlatten"), ke = function() { let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; const n = Array.isArray(e) ? e : [e], o = []; return n.forEach((r) => { Array.isArray(r) ? o.push(...ke(r, t)) : r && r.type === bt ? r.key === fa ? o.push(r) : o.push(...ke(r.children, t)) : r && jr(r) ? t && !No(r) ? o.push(r) : t || o.push(r) : da(r) && o.push(r); }), o; }, Kt = (e) => { var t; let n = ((t = e == null ? void 0 : e.vnode) === null || t === void 0 ? void 0 : t.el) || e && (e.$el || e); for (; n && !n.tagName; ) n = n.nextSibling; return n; }; function No(e) { return e && (e.type === Wr || e.type === bt && e.children.length === 0 || e.type === Bo && e.children.trim() === ""); } function Fo() { let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : []; const t = []; return e.forEach((n) => { Array.isArray(n) ? t.push(...n) : (n == null ? void 0 : n.type) === bt ? t.push(...Fo(n.children)) : t.push(n); }), t.filter((n) => !No(n)); } ft("bottomLeft", "bottomRight", "topLeft", "topRight"); const jo = function(e) { let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; return f(e ? { name: e, appear: !0, // type: 'animation', // appearFromClass: `${transitionName}-appear ${transitionName}-appear-prepare`, // appearActiveClass: `antdv-base-transtion`, // appearToClass: `${transitionName}-appear ${transitionName}-appear-active`, enterFromClass: `${e}-enter ${e}-enter-prepare ${e}-enter-start`, enterActiveClass: `${e}-enter ${e}-enter-prepare`, enterToClass: `${e}-enter ${e}-enter-active`, leaveFromClass: ` ${e}-leave`, leaveActiveClass: `${e}-leave ${e}-leave-active`, leaveToClass: `${e}-leave ${e}-leave-active` } : { css: !1 }, t); }, jn = (e, t, n) => n !== void 0 ? n : `${e}-${t}`, A = Kr({ func: void 0, bool: void 0, string: void 0, number: void 0, array: void 0, object: void 0, integer: void 0 }); A.extend([{ name: "looseBool", getter: !0, type: Boolean, default: void 0 }, { name: "style", getter: !0, type: [String, Object], default: void 0 }, { name: "VueNode", getter: !0, type: null }]); function hn() { return { keyboard: { type: Boolean, default: void 0 }, mask: { type: Boolean, default: void 0 }, afterClose: Function, closable: { type: Boolean, default: void 0 }, maskClosable: { type: Boolean, default: void 0 }, visible: { type: Boolean, default: void 0 }, destroyOnClose: { type: Boolean, default: void 0 }, mousePosition: A.shape({ x: Number, y: Number }).loose, title: A.any, footer: A.any, transitionName: String, maskTransitionName: String, animation: A.any, maskAnimation: A.any, wrapStyle: { type: Object, default: void 0 }, bodyStyle: { type: Object, default: void 0 }, maskStyle: { type: Object, default: void 0 }, prefixCls: String, wrapClassName: String, rootClassName: String, width: [String, Number], height: [String, Number], zIndex: Number, bodyProps: A.any, maskProps: A.any, wrapProps: A.any, getContainer: A.any, dialogStyle: { type: Object, default: void 0 }, dialogClass: String, closeIcon: A.any, forceRender: { type: Boolean, default: void 0 }, getOpenCount: Function, // https://github.com/ant-design/ant-design/issues/19771 // https://github.com/react-component/dialog/issues/95 focusTriggerAfterClose: { type: Boolean, default: void 0 }, onClose: Function, modalRender: Function }; } function Wn(e, t, n) { let o = t; return !o && n && (o = `${e}-${n}`), o; } let kn = -1; function ma() { return kn += 1, kn; } function Xn(e, t) { let n = e[`page${t ? "Y" : "X"}Offset`]; const o = `scroll${t ? "Top" : "Left"}`; if (typeof n != "number") { const r = e.document; n = r.documentElement[o], typeof n != "number" && (n = r.body[o]); } return n; } function ga(e) { const t = e.getBoundingClientRect(), n = { left: t.left, top: t.top }, o = e.ownerDocument, r = o.defaultView || o.parentWindow; return n.left += Xn(r), n.top += Xn(r, !0), n; } const pa = { width: 0, height: 0, overflow: "hidden", outline: "none" }, ha = { outline: "none" }, va = H({ compatConfig: { MODE: 3 }, name: "DialogContent", inheritAttrs: !1, props: f(f({}, hn()), { motionName: String, ariaId: String, onVisibleChanged: Function, onMousedown: Function, onMouseup: Function }), setup(e, t) { let { expose: n, slots: o, attrs: r } = t; const a = F(), i = F(), l = F(); n({ focus: () => { var s; (s = a.value) === null || s === void 0 || s.focus({ preventScroll: !0 }); }, changeActive: (s) => { const { activeElement: p } = document; s && p === i.value ? a.value.focus({ preventScroll: !0 }) : !s && p === a.value && i.value.focus({ preventScroll: !0 }); } }); const c = F(), u = w(() => { const { width: s, height: p } = e, v = {}; return s !== void 0 && (v.width = typeof s == "number" ? `${s}px` : s), p !== void 0 && (v.height = typeof p == "number" ? `${p}px` : p), c.value && (v.transformOrigin = c.value), v; }), g = () => { ce(() => { if (l.value) { const s = ga(l.value); c.value = e.mousePosition ? `${e.mousePosition.x - s.left}px ${e.mousePosition.y - s.top}px` : ""; } }); }, d = (s) => { e.onVisibleChanged(s); }; return () => { var s, p, v, y; const { prefixCls: S, footer: h = (s = o.footer) === null || s === void 0 ? void 0 : s.call(o), title: C = (p = o.title) === null || p === void 0 ? void 0 : p.call(o), ariaId: x, closable: M, closeIcon: T = (v = o.closeIcon) === null || v === void 0 ? void 0 : v.call(o), onClose: P, bodyStyle: m, bodyProps: $, onMousedown: O, onMouseup: z, visible: _, modalRender: U = o.modalRender, destroyOnClose: Se, motionName: Ce } = e; let E; h && (E = b("div", { class: `${S}-footer` }, [h])); let D; C && (D = b("div", { class: `${S}-header` }, [b("div", { class: `${S}-title`, id: x }, [C])])); let W; M && (W = b("button", { type: "button", onClick: P, "aria-label": "Close", class: `${S}-close` }, [T || b("span", { class: `${S}-close-x` }, null)])); const j = b("div", { class: `${S}-content` }, [W, D, b("div", I({ class: `${S}-body`, style: m }, $), [(y = o.default) === null || y === void 0 ? void 0 : y.call(o)]), E]), ze = jo(Ce); return b(St, I(I({}, ze), {}, { onBeforeEnter: g, onAfterEnter: () => d(!0), onAfterLeave: () => d(!1) }), { default: () => [_ || !Se ? zo(b("div", I(I({}, r), {}, { ref: l, key: "dialog-element", role: "document", style: [u.value, r.style], class: [S, r.class], onMousedown: O, onMouseup: z }), [b("div", { tabindex: 0, ref: a, style: ha }, [U ? U({ originVNode: j }) : j]), b("div", { tabindex: 0, ref: i, style: pa }, null)]), [[Ro, _]]) : null] }); }; } }), ya = H({ compatConfig: { MODE: 3 }, name: "DialogMask", props: { prefixCls: String, visible: Boolean, motionName: String, maskProps: Object }, setup(e, t) { return () => { const { prefixCls: n, visible: o, maskProps: r, motionName: a } = e, i = jo(a); return b(St, i, { default: () => [zo(b("div", I({ class: `${n}-mask` }, r), null), [[Ro, o]])] }); }; } }), Gn = H({ compatConfig: { MODE: 3 }, name: "VcDialog", inheritAttrs: !1, props: wt(f(f({}, hn()), { getOpenCount: Function, scrollLocker: Object }), { mask: !0, visible: !1, keyboard: !0, closable: !0, maskClosable: !0, destroyOnClose: !1, prefixCls: "rc-dialog", getOpenCount: () => null, focusTriggerAfterClose: !0 }), setup(e, t) { let { attrs: n, slots: o } = t; const r = B(), a = B(), i = B(), l = B(e.visible), c = B(`vcDialogTitle${ma()}`), u = (h) => { var C, x; if (h) Do(a.value, document.activeElement) || (r.value = document.activeElement, (C = i.value) === null || C === void 0 || C.focus()); else { const M = l.value; if (l.value = !1, e.mask && r.value && e.focusTriggerAfterClose) { try { r.value.focus({ preventScroll: !0 }); } catch { } r.value = null; } M && ((x = e.afterClose) === null || x === void 0 || x.call(e)); } }, g = (h) => { var C; (C = e.onClose) === null || C === void 0 || C.call(e, h); }, d = B(!1), s = B(), p = () => { clearTimeout(s.value), d.value = !0; }, v = () => { s.value = setTimeout(() => { d.value = !1; }); }, y = (h) => { if (!e.maskClosable) return null; d.value ? d.value = !1 : a.value === h.target && g(h); }, S = (h) => { if (e.keyboard && h.keyCode === Dn.ESC) { h.stopPropagation(), g(h); return; } e.visible && h.keyCode === Dn.TAB && i.value.changeActive(!h.shiftKey); }; return ae(() => e.visible, () => { e.visible && (l.value = !0); }, { flush: "post" }), ve(() => { var h; clearTimeout(s.value), (h = e.scrollLocker) === null || h === void 0 || h.unLock(); }), Ae(() => { var h, C; (h = e.scrollLocker) === null || h === void 0 || h.unLock(), l.value && ((C = e.scrollLocker) === null || C === void 0 || C.lock()); }), () => { const { prefixCls: h, mask: C, visible: x, maskTransitionName: M, maskAnimation: T, zIndex: P, wrapClassName: m, rootClassName: $, wrapStyle: O, closable: z, maskProps: _, maskStyle: U, transitionName: Se, animation: Ce, wrapProps: E, title: D = o.title } = e, { style: W, class: j } = n; return b("div", I({ class: [`${h}-root`, $] }, ua(e, { data: !0 })), [b(ya, { prefixCls: h, visible: C && x, motionName: Wn(h, M, T), style: f({ zIndex: P }, U), maskProps: _ }, null), b("div", I({ tabIndex: -1, onKeydown: S, class: se(`${h}-wrap`, m), ref: a, onClick: y, role: "dialog", "aria-labelledby": D ? c.value : null, style: f(f({ zIndex: P }, O), { display: l.value ? null : "none" }) }, E), [b(va, I(I({}, aa(e, ["scrollLocker"])), {}, { style: W, class: j, onMousedown: p, onMouseup: v, ref: i, closable: z, ariaId: c.value, prefixCls: h, visible: x, onClose: g, onVisibleChanged: u, motionName: Wn(h, Se, Ce) }), o)])]); }; } }), Wo = Symbol("PortalContextKey"), ko = function(e) { let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : { inTriggerContext: !0 }; Ct(Wo, { inTriggerContext: t.inTriggerContext, shouldRender: w(() => { const { sPopupVisible: n, popupRef: o, forceRender: r, autoDestroy: a } = e || {}; let i = !1; return (n || o || r) && (i = !0), !n && a && (i = !1), i; }) }); }, ba = () => { ko({}, { inTriggerContext: !1 }); const e = Z(Wo, { shouldRender: w(() => !1), inTriggerContext: !1 }); return { shouldRender: w(() => e.shouldRender.value || e.inTriggerContext === !1) }; }, Sa = H({ compatConfig: { MODE: 3 }, name: "Portal", inheritAttrs: !1, props: { getContainer: A.func.isRequired, didUpdate: Function }, setup(e, t) { let { slots: n } = t, o = !0, r; const { shouldRender: a } = ba(); function i() { a.value && (r = e.getContainer()); } kr(() => { o = !1, i(); }), Ke(() => { r || i(); }); const l = ae(a, () => { a.value && !r && (r = e.getContainer()), r && l(); }); return gn(() => { ce(() => { var c; a.value && ((c = e.didUpdate) === null || c === void 0 || c.call(e, e)); }); }), () => { var c; return a.value ? o ? (c = n.default) === null || c === void 0 ? void 0 : c.call(n) : r ? b(_o, { to: r }, n) : null : null; }; } }); function ee() { return !!(typeof window < "u" && window.document && window.document.createElement); } let Xo = (e) => setTimeout(e, 16), Go = (e) => clearTimeout(e); typeof window < "u" && "requestAnimationFrame" in window && (Xo = (e) => window.requestAnimationFrame(e), Go = (e) => window.cancelAnimationFrame(e)); let Vn = 0; const vn = /* @__PURE__ */ new Map(); function Vo(e) { vn.delete(e); } function Xe(e) { let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1; Vn += 1; const n = Vn; function o(r) { if (r === 0) Vo(n), e(); else { const a = Xo(() => { o(r - 1); }); vn.set(n, a); } } return o(t), n; } Xe.cancel = (e) => { const t = vn.get(e); return Vo(t), Go(t); }; const Un = "data-vc-order", Ca = "vc-util-key", Yt = /* @__PURE__ */ new Map(); function Uo() { let { mark: e } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; return e ? e.startsWith("data-") ? e : `data-${e}` : Ca; } function Tt(e) { return e.attachTo ? e.attachTo : document.querySelector("head") || document.body; } function xa(e) { return e === "queue" ? "prependQueue" : e ? "prepend" : "append"; } function Ko(e) { return Array.from((Yt.get(e) || e).children).filter((t) => t.tagName === "STYLE"); } function Yo(e) { let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; if (!ee()) return null; const { csp: n, prepend: o } = t, r = document.createElement("style"); r.setAttribute(Un, xa(o)), n != null && n.nonce && (r.nonce = n == null ? void 0 : n.nonce), r.innerHTML = e; const a = Tt(t), { firstChild: i } = a; if (o) { if (o === "queue") { const l = Ko(a).filter((c) => ["prepend", "prependQueue"].includes(c.getAttribute(Un))); if (l.length) return a.insertBefore(r, l[l.length - 1].nextSibling), r; } a.insertBefore(r, i); } else a.appendChild(r); return r; } function qo(e) { let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; const n = Tt(t); return Ko(n).find((o) => o.getAttribute(Uo(t)) === e); } function mt(e) { let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; const n = qo(e, t); n && Tt(t).removeChild(n); } function $a(e, t) { const n = Yt.get(e); if (!n || !Do(document, n)) { const o = Yo("", t), { parentNode: r } = o; Yt.set(e, r), e.removeChild(o); } } function gt(e, t) { let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; var o, r, a; const i = Tt(n); $a(i, n); const l = qo(t, n); if (l) return !((o = n.csp) === null || o === void 0) && o.nonce && l.nonce !== ((r = n.csp) === null || r === void 0 ? void 0 : r.nonce) && (l.nonce = (a = n.csp) === null || a === void 0 ? void 0 : a.nonce), l.innerHTML !== e && (l.innerHTML = e), l; const c = Yo(e, n); return c.setAttribute(Uo(n), t), c; } let zt; function wa(e) { if (typeof document > "u") return 0; if (zt === void 0) { const t = document.createElement("div"); t.style.width = "100%", t.style.height = "200px"; const n = document.createElement("div"), o = n.style; o.position = "absolute", o.top = "0", o.left = "0", o.pointerEvents = "none", o.visibility = "hidden", o.width = "200px", o.height = "150px", o.overflow = "hidden", n.appendChild(t), document.body.appendChild(n); const r = t.offsetWidth; n.style.overflow = "scroll"; let a = t.offsetWidth; r === a && (a = n.clientWidth), document.body.removeChild(n), zt = r - a; } return zt; } const Ta = `vc-util-locker-${Date.now()}`; let Kn = 0; function Ma() { return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight) && window.innerWidth > document.body.offsetWidth; } function Ea(e) { const t = w(() => !!e && !!e.value); Kn += 1; const n = `${Ta}_${Kn}`; Ae((o) => { if (ee()) { if (t.value) { const r = wa(), a = Ma(); gt(` html body { overflow-y: hidden; ${a ? `width: calc(100% - ${r}px);` : ""} }`, n); } else mt(n); o(() => { mt(n); }); } }, { flush: "post" }); } let de = 0; const it = ee(), Yn = (e) => { if (!it) return null; if (e) { if (typeof e == "string") return document.querySelectorAll(e)[0]; if (typeof e == "function") return e(); if (typeof e == "object" && e instanceof window.HTMLElement) return e; } return document.body; }, Pa = H({ compatConfig: { MODE: 3 }, name: "PortalWrapper", inheritAttrs: !1, props: { wrapperClassName: String, forceRender: { type: Boolean, default: void 0 }, getContainer: A.any, visible: { type: Boolean, default: void 0 }, autoLock: we(), didUpdate: Function }, setup(e, t) { let { slots: n } = t; const o = B(), r = B(), a = B(), i = B(1), l = ee() && document.createElement("div"), c = () => { var p, v; o.value === l && ((v = (p = o.value) === null || p === void 0 ? void 0 : p.parentNode) === null || v === void 0 || v.removeChild(o.value)), o.value = null; }; let u = null; const g = function() { return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1) || o.value && !o.value.parentNode ? (u = Yn(e.getContainer), u ? (u.appendChild(o.value), !0) : !1) : !0; }, d = () => it ? (o.value || (o.value = l, g(!0)), s(), o.value) : null, s = () => { const { wrapperClassName: p } = e; o.value && p && p !== o.value.className && (o.value.className = p); }; return gn(() => { s(), g(); }), Ea(w(() => e.autoLock && e.visible && ee() && (o.value === document.body || o.value === l))), Ke(() => { let p = !1; ae([() => e.visible, () => e.getContainer], (v, y) => { let [S, h] = v, [C, x] = y; it && (u = Yn(e.getContainer), u === document.body && (S && !C ? de += 1 : p && (de -= 1))), p && (typeof h == "function" && typeof x == "function" ? h.toString() !== x.toString() : h !== x) && c(), p = !0; }, { immediate: !0, flush: "post" }), ce(() => { g() || (a.value = Xe(() => { i.value += 1; })); }); }), ve(() => { const { visible: p } = e; it && u === document.body && (de = p && de ? de - 1 : de), c(), Xe.cancel(a.value); }), () => { const { forceRender: p, visible: v } = e; let y = null; const S = { getOpenCount: () => de, getContainer: d }; return i.value && (p || v || r.value) && (y = b(Sa, { getContainer: d, ref: r, didUpdate: e.didUpdate }, { default: () => { var h; return (h = n.default) === null || h === void 0 ? void 0 : h.call(n, S); } })), y; }; } }), Oa = hn(), Ia = H({ compatConfig: { MODE: 3 }, name: "DialogWrap", inheritAttrs: !1, props: wt(Oa, { visible: !1 }), setup(e, t) { let { attrs: n, slots: o } = t; const r = F(e.visible); return ko({}, { inTriggerContext: !1 }), ae(() => e.visible, () => { e.visible && (r.value = !0); }, { flush: "post" }), () => { const { visible: a, getContainer: i, forceRender: l, destroyOnClose: c = !1, afterClose: u } = e; let g = f(f(f({}, e), n), { ref: "_component", key: "dialog" }); return i === !1 ? b(Gn, I(I({}, g), {}, { getOpenCount: () => 2 }), o) : !l && c && !r.value ? null : b(Pa, { autoLock: !0, visible: a, forceRender: l, getContainer: i }, { default: (d) => (g = f(f(f({}, g), d), { afterClose: () => { u == null || u(), r.value = !1; } }), b(Gn, g, o)) }); }; } }); function Aa(e, t, n, o) { if (e && e.addEventListener) { let r = o; e.addEventListener(t, n, r); } return { remove: () => { e && e.removeEventListener && e.removeEventListener(t, n); } }; } var Ha = { icon: { tag: "svg", attrs: { "fill-rule": "evenodd", viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z" } }] }, name: "close", theme: "outlined" }; function N(e, t) { Ba(e) && (e = "100%"); var n = za(e); return e = t === 360 ? e : Math.min(t, Math.max(0, parseFloat(e))), n && (e = parseInt(String(e * t), 10) / 100), Math.abs(e - t) < 1e-6 ? 1 : (t === 360 ? e = (e < 0 ? e % t + t : e % t) / parseFloat(String(t)) : e = e % t / parseFloat(String(t)), e); } function Je(e) { return Math.min(1, Math.max(0, e)); } function Ba(e) { return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1; } function za(e) { return typeof e == "string" && e.indexOf("%") !== -1; } function Qo(e) { return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e; } function et(e) { return e <= 1 ? "".concat(Number(e) * 100, "%") : e; } function ge(e) { return e.length === 1 ? "0" + e : String(e); } function Ra(e, t, n) { return { r: N(e, 255) * 255, g: N(t, 255) * 255, b: N(n, 255) * 255 }; } function qn(e, t, n) { e = N(e, 255), t = N(t, 255), n = N(n, 255); var o = Math.max(e, t, n), r = Math.min(e, t, n), a = 0, i = 0, l = (o + r) / 2; if (o === r) i = 0, a = 0; else { var c = o - r; switch (i = l > 0.5 ? c / (2 - o - r) : c / (o + r), o) { case e: a = (t - n) / c + (t < n ? 6 : 0); break; case t: a = (n - e) / c + 2; break; case n: a = (e - t) / c + 4; break; } a /= 6; } return { h: a, s: i, l }; } function Rt(e, t, n) { return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + (t - e) * (6 * n) : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e; } function _a(e, t, n) { var o, r, a; if (e = N(e, 360), t = N(t, 100), n = N(n, 100), t === 0) r = n, a = n, o = n; else { var i = n < 0.5 ? n * (1 + t) : n + t - n * t, l = 2 * n - i; o = Rt(l, i, e + 1 / 3), r = Rt(l, i, e), a = Rt(l, i, e - 1 / 3); } return { r: o * 255, g: r * 255, b: a * 255 }; } function qt(e, t, n) { e = N(e, 255), t = N(t, 255), n = N(n, 255); var o = Math.max(e, t, n), r = Math.min(e, t, n), a = 0, i = o, l = o - r, c = o === 0 ? 0 : l / o; if (o === r) a = 0; else { switch (o) { case e: a = (t - n) / l + (t < n ? 6 : 0); break; case t: a = (n - e) / l + 2; break; case n: a = (e - t) / l + 4; break; } a /= 6; } return { h: a, s: c, v: i }; } function La(e, t, n) { e = N(e, 360) * 6, t = N(t, 100), n = N(n, 100); var o = Math.floor(e), r = e - o, a = n * (1 - t), i = n * (1 - r * t), l = n * (1 - (1 - r) * t), c = o % 6, u = [n, i, a, a, l, n][c], g = [l, n, n, i, a, a][c], d = [a, a, l, n, n, i][c]; return { r: u * 255, g: g * 255, b: d * 255 }; } function Qt(e, t, n, o) { var r = [ ge(Math.round(e).toString(16)), ge(Math.round(t).toString(16)), ge(Math.round(n).toString(16)) ]; return o && r[0].startsWith(r[0].charAt(1)) && r[1].startsWith(r[1].charAt(1)) && r[2].startsWith(r[2].charAt(1)) ? r[0].charAt(0) + r[1].charAt(0) + r[2].charAt(0) : r.join(""); } function Da(e, t, n, o, r) { var a = [ ge(Math.round(e).toString(16)), ge(Math.round(t).toString(16)), ge(Math.round(n).toString(16)), ge(Na(o)) ]; return r && a[0].startsWith(a[0].charAt(1)) && a[1].startsWith(a[1].charAt(1)) && a[2].startsWith(a[2].charAt(1)) && a[3].startsWith(a[3].charAt(1)) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) + a[3].charAt(0) : a.join(""); } function Na(e) { return Math.round(parseFloat(e) * 255).toString(16); } function Qn(e) { return V(e) / 255; } function V(e) { return parseInt(e, 16); } function Fa(e) { return { r: e >> 16, g: (e & 65280) >> 8, b: e & 255 }; } var Zt = { aliceblue: "#f0f8ff", antiquewhite: "#faebd7", aqua: "#00ffff", aquamarine: "#7fffd4", azure: "#f0ffff", beige: "#f5f5dc", bisque: "#ffe4c4", black: "#000000", blanchedalmond: "#ffebcd", blue: "#0000ff", blueviolet: "#8a2be2", brown: "#a52a2a", burlywood: "#deb887", cadetblue: "#5f9ea0", chartreuse: "#7fff00", chocolate: "#d2691e", coral: "#ff7f50", cornflowerblue: "#6495ed", cornsilk: "#fff8dc", crimson: "#dc143c", cyan: "#00ffff", darkblue: "#00008b", darkcyan: "#008b8b", darkgoldenrod: "#b8860b", darkgray: "#a9a9a9", darkgreen: "#006400", darkgrey: "#a9a9a9", darkkhaki: "#bdb76b", darkmagenta: "#8b008b", darkolivegreen: "#556b2f", darkorange: "#ff8c00", darkorchid: "#9932cc", darkred: "#8b0000", darksalmon: "#e9967a", darkseagreen: "#8fbc8f", darkslateblue: "#483d8b", darkslategray: "#2f4f4f", darkslategrey: "#2f4f4f", darkturquoise: "#00ced1", darkviolet: "#9400d3", deeppink: "#ff1493", deepskyblue: "#00bfff", dimgray: "#696969", dimgrey: "#696969", dodgerblue: "#1e90ff", firebrick: "#b22222", floralwhite: "#fffaf0", forestgreen: "#228b22", fuchsia: "#ff00ff", gainsboro: "#dcdcdc", ghostwhite: "#f8f8ff", goldenrod: "#daa520", gold: "#ffd700", gray: "#808080", green: "#008000", greenyellow: "#adff2f", grey: "#808080", honeydew: "#f0fff0", hotpink: "#ff69b4", indianred: "#cd5c5c", indigo: "#4b0082", ivory: "#fffff0", khaki: "#f0e68c", lavenderblush: "#fff0f5", lavender: "#e6e6fa", lawngreen: "#7cfc00", lemonchiffon: "#fffacd", lightblue: "#add8e6", lightcoral: "#f08080", lightcyan: "#e0ffff", lightgoldenrodyellow: "#fafad2", lightgray: "#d3d3d3", lightgreen: "#90ee90", lightgrey: "#d3d3d3", lightpink: "#ffb6c1", lightsalmon: "#ffa07a", lightseagreen: "#20b2aa", lightskyblue: "#87cefa", lightslategray: "#778899", lightslategrey: "#778899", lightsteelblue: "#b0c4de", lightyellow: "#ffffe0", lime: "#00ff00", limegreen: "#32cd32", linen: "#faf0e6", magenta: "#ff00ff", maroon: "#800000", mediumaquamarine: "#66cdaa", mediumblue: "#0000cd", mediumorchid: "#ba55d3", mediumpurple: "#9370db", mediumseagreen: "#3cb371", mediumslateblue: "#7b68ee", mediumspringgreen: "#00fa9a", mediumturquoise: "#48d1cc", mediumvioletred: "#c71585", midnightblue: "#191970", mintcream: "#f5fffa", mistyrose: "#ffe4e1", moccasin: "#ffe4b5", navajowhite: "#ffdead", navy: "#000080", oldlace: "#fdf5e6", olive: "#808000", olivedrab: "#6b8e23", orange: "#ffa500", orangered: "#ff4500", orchid: "#da70d6", palegoldenrod: "#eee8aa", palegreen: "#98fb98", paleturquoise: "#afeeee", palevioletred: "#db7093", papayawhip: "#ffefd5", peachpuff: "#ffdab9", peru: "#cd853f", pink: "#ffc0cb", plum: "#dda0dd", powderblue: "#b0e0e6", purple: "#800080", rebeccapurple: "#663399", red: "#ff0000", rosybrown: "#bc8f8f", royalblue: "#4169e1", saddlebrown: "#8b4513", salmon: "#fa8072", sandybrown: "#f4a460", seagreen: "#2e8b57", seashell: "#fff5ee", sienna: "#a0522d", silver: "#c0c0c0", skyblue: "#87ceeb", slateblue: "#6a5acd", slategray: "#708090", slategrey: "#708090", snow: "#fffafa", springgreen: "#00ff7f", steelblue: "#4682b4", tan: "#d2b48c", teal: "#008080", thistle: "#d8bfd8", tomato: "#ff6347", turquoise: "#40e0d0", violet: "#ee82ee", wheat: "#f5deb3", white: "#ffffff", whitesmoke: "#f5f5f5", yellow: "#ffff00", yellowgreen: "#9acd32" }; function xe(e) { var t = { r: 0, g: 0, b: 0 }, n = 1, o = null, r = null, a = null, i = !1, l = !1; return typeof e == "string" && (e = ka(e)), typeof e == "object" && (te(e.r) && te(e.g) && te(e.b) ? (t = Ra(e.r, e.g, e.b), i = !0, l = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : te(e.h) && te(e.s) && te(e.v) ? (o = et(e.s), r = et(e.v), t = La(e.h, o, r), i = !0, l = "hsv") : te(e.h) && te(e.s) && te(e.l) && (o = et(e.s), a = et(e.l), t = _a(e.h, o, a), i = !0, l = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = Qo(n), { ok: i, format: e.format || l, r: Math.min(255, Math.max(t.r, 0)), g: Math.min(255, Math.max(t.g, 0)), b: Math.min(255, Math.max(t.b, 0)), a: n }; } var ja = "[-\\+]?\\d+%?", Wa = "[-\\+]?\\d*\\.\\d+%?", ie = "(?:".concat(Wa, ")|(?:").concat(ja, ")"), _t = "[\\s|\\(]+(".concat(ie, ")[,|\\s]+(").concat(ie, ")[,|\\s]+(").concat(ie, ")\\s*\\)?"), Lt = "[\\s|\\(]+(".concat(ie, ")[,|\\s]+(").concat(ie, ")[,|\\s]+(").concat(ie, ")[,|\\s]+(").concat(ie, ")\\s*\\)?"), q = { CSS_UNIT: new RegExp(ie), rgb: new RegExp("rgb" + _t), rgba: new RegExp("rgba" + Lt), hsl: new RegExp("hsl" + _t), hsla: new RegExp("hsla" + Lt), hsv: new RegExp("hsv" + _t), hsva: new RegExp("hsva" + Lt), hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/, hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/ }; function ka(e) { if (e = e.trim().toLowerCase(), e.length === 0) return !1; var t = !1; if (Zt[e]) e = Zt[e], t = !0; else if (e === "transparent") return { r: 0, g: 0, b: 0, a: 0, format: "name" }; var n = q.rgb.exec(e); return n ? { r: n[1], g: n[2], b: n[3] } : (n = q.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = q.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = q.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = q.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = q.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = q.hex8.exec(e), n ? { r: V(n[1]), g: V(n[2]), b: V(n[3]), a: Qn(n[4]), format: t ? "name" : "hex8" } : (n = q.hex6.exec(e), n ? { r: V(n[1]), g: V(n[2]), b: V(n[3]), format: t ? "name" : "hex" } : (n = q.hex4.exec(e), n ? { r: V(n[1] + n[1]), g: V(n[2] + n[2]), b: V(n[3] + n[3]), a: Qn(n[4] + n[4]), format: t ? "name" : "hex8" } : (n = q.hex3.exec(e), n ? { r: V(n[1] + n[1]), g: V(n[2] + n[2]), b: V(n[3] + n[3]), format: t ? "name" : "hex" } : !1))))))))); } function te(e) { return !!q.CSS_UNIT.exec(String(e)); } var k = ( /** @class */ (function() { function e(t, n) { t === void 0 && (t = ""), n === void 0 && (n = {}); var o; if (t instanceof e) return t; typeof t == "number" && (t = Fa(t)), this.originalInput = t; var r = xe(t); this.originalInput = t, this.r = r.r, this.g = r.g, this.b = r.b, this.a = r.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (o = n.format) !== null && o !== void 0 ? o : r.format, this.gradientType = n.gradientType, this.r < 1 && (this.r = Math.round(this.r)), this.g < 1 && (this.g = Math.round(this.g)), this.b < 1 && (this.b = Math.round(this.b)), this.isValid = r.ok; } return e.prototype.isDark = function() { return this.getBrightness() < 128; }, e.prototype.isLight = function() { return !this.isDark(); }, e.prototype.getBrightness = function() { var t = this.toRgb(); return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3; }, e.prototype.getLuminance = function() { var t = this.toRgb(), n, o, r, a = t.r / 255, i = t.g / 255, l = t.b / 255; return a <= 0.03928 ? n = a / 12.92 : n = Math.pow((a + 0.055) / 1.055, 2.4), i <= 0.03928 ? o = i / 12.92 : o = Math.pow((i + 0.055) / 1.055, 2.4), l <= 0.03928 ? r = l / 12.92 : r = Math.pow((l + 0.055) / 1.055, 2.4), 0.2126 * n + 0.7152 * o + 0.0722 * r; }, e.prototype.getAlpha = function() { return this.a; }, e.prototype.setAlpha = function(t) { return this.a = Qo(t), this.roundA = Math.round(100 * this.a) / 100, this; }, e.prototype.isMonochrome = function() { var t = this.toHsl().s; return t === 0; }, e.prototype.toHsv = function() { var t = qt(this.r, this.g, this.b); return { h: t.h * 360, s: t.s, v: t.v, a: this.a }; }, e.prototype.toHsvString = function() { var t = qt(this.r, this.g, this.b), n = Math.round(t.h * 360), o = Math.round(t.s * 100), r = Math.round(t.v * 100); return this.a === 1 ? "hsv(".concat(n, ", ").concat(o, "%, ").concat(r, "%)") : "hsva(".concat(n, ", ").concat(o, "%, ").concat(r, "%, ").concat(this.roundA, ")"); }, e.prototype.toHsl = function() { var t = qn(this.r, this.g, this.b); return { h: t.h * 360, s: t.s, l: t.l, a: this.a }; }, e.prototype.toHslString = function() { var t = qn(this.r, this.g, this.b), n = Math.round(t.h * 360), o = Math.round(t.s * 100), r = Math.round(t.l * 100); return this.a === 1 ? "hsl(".concat(n, ", ").concat(o, "%, ").concat(r, "%)") : "hsla(".concat(n, ", ").concat(o, "%, ").concat(r, "%, ").concat(this.roundA, ")"); }, e.prototype.toHex = function(t) { return t === void 0 && (t = !1), Qt(this.r, this.g, this.b, t); }, e.prototype.toHexString = function(t) { return t === void 0 && (t = !1), "#" + this.toHex(t); }, e.prototype.toHex8 = function(t) { return t === void 0 && (t = !1), Da(this.r, this.g, this.b, this.a, t); }, e.prototype.toHex8String = function(t) { return t === void 0 && (t = !1), "#" + this.toHex8(t); }, e.prototype.toHexShortString = function(t) { return t === void 0 && (t = !1), this.a === 1 ? this.toHexString(t) : this.toHex8String(t); }, e.prototype.toRgb = function() { return { r: Math.round(this.r), g: Math.round(this.g), b: Math.round(this.b), a: this.a }; }, e.prototype.toRgbString = function() { var t = Math.round(this.r), n = Math.round(this.g), o = Math.round(this.b); return this.a === 1 ? "rgb(".concat(t, ", ").concat(n, ", ").concat(o, ")") : "rgba(".concat(t, ", ").concat(n, ", ").concat(o, ", ").concat(this.roundA, ")"); }, e.prototype.toPercentageRgb = function() { var t = function(n) { return "".concat(Math.round(N(n, 255) * 100), "%"); }; return { r: t(this.r), g: t(this.g), b: t(this.b), a: this.a }; }, e.prototype.toPercentageRgbString = function() { var t = function(n) { return Math.round(N(n, 255) * 100); }; return this.a === 1 ? "rgb(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%)") : "rgba(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%, ").concat(this.roundA, ")"); }, e.prototype.toName = function() { if (this.a === 0) return "transparent"; if (this.a < 1) return !1; for (var t = "#" + Qt(this.r, this.g, this.b, !1), n = 0, o = Object.entries(Zt); n < o.length; n++) { var r = o[n], a = r[0], i = r[1]; if (t === i) return a; } return !1; }, e.prototype.toString = function(t) { var n = !!t; t = t ?? this.format; var o = !1, r = this.a < 1 && this.a >= 0, a = !n && r && (t.startsWith("hex") || t === "name"); return a ? t === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (t === "rgb" && (o = this.toRgbString()), t === "prgb" && (o = this.toPercentageRgbString()), (t === "hex" || t === "hex6") && (o = this.toHexString()), t === "hex3" && (o = this.toHexString(!0)), t === "hex4" && (o = this.toHex8String(!0)), t === "hex8" && (o = this.toHex8String()), t === "name" && (o = this.toName()), t === "hsl" && (o = this.toHslString()), t === "hsv" && (o = this.toHsvString()), o || this.toHexString()); }, e.prototype.toNumber = function() { return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b); }, e.prototype.clone = function() { return new e(this.toString()); }, e.prototype.lighten = function(t) { t === void 0 && (t = 10); var n = this.toHsl(); return n.l += t / 100, n.l = Je(n.l), new e(n); }, e.prototype.brighten = function(t) { t === void 0 && (t = 10); var n = this.toRgb(); return n.r = Math.max(0, Math.min(255, n.r - Math.round(255 * -(t / 100)))), n.g = Math.max(0, Math.min(255, n.g - Math.round(255 * -(t / 100)))), n.b = Math.max(0, Math.min(255, n.b - Math.round(255 * -(t / 100)))), new e(n); }, e.prototype.darken = function(t) { t === void 0 && (t = 10); var n = this.toHsl(); return n.l -= t / 100, n.l = Je(n.l), new e(n); }, e.prototype.tint = function(t) { return t === void 0 && (t = 10), this.mix("white", t); }, e.prototype.shade = function(t) { return t === void 0 && (t = 10), this.mix("black", t); }, e.prototype.desaturate = function(t) { t === void 0 && (t = 10); var n = this.toHsl(); return n.s -= t / 100, n.s = Je(n.s), new e(n); }, e.prototype.saturate = function(t) { t === void 0 && (t = 10); var n = this.toHsl(); return n.s += t / 100, n.s = Je(n.s), new e(n); }, e.prototype.greyscale = function() { return this.desaturate(100); }, e.prototype.spin = function(t) { var n = this.toHsl(), o = (n.h + t) % 360; return n.h = o < 0 ? 360 + o : o, new e(n); }, e.prototype.mix = function(t, n) { n === void 0 && (n = 50); var o = this.toRgb(), r = new e(t).toRgb(), a = n / 100, i = { r: (r.r - o.r) * a + o.r, g: (r.g - o.g) * a + o.g, b: (r.b - o.b) * a + o.b, a: (r.a - o.a) * a + o.a }; return new e(i); }, e.prototype.analogous = function(t, n) { t === void 0 && (t = 6), n === void 0 && (n = 30); var o = this.toHsl(), r = 360 / n, a = [this]; for (o.h = (o.h - (r * t >> 1) + 720) % 360; --t; ) o.h = (o.h + r) % 360, a.push(new e(o)); return a; }, e.prototype.complement = function() { var t = this.toHsl(); return t.h = (t.h + 180) % 360, new e(t); }, e.prototype.monochromatic = function(t) { t === void 0 && (t = 6); for (var n = this.toHsv(), o = n.h, r = n.s, a = n.v, i = [], l = 1 / t; t--; ) i.push(new e({ h: o, s: r, v: a })), a = (a + l) % 1; return i; }, e.prototype.splitcomplement = function() { var t = this.toHsl(), n = t.h; return [ this, new e({ h: (n + 72) % 360, s: t.s, l: t.l }), new e({ h: (n + 216) % 360, s: t.s, l: t.l }) ]; }, e.prototype.onBackground = function(t) { var n = this.toRgb(), o = new e(t).toRgb(), r = n.a + o.a * (1 - n.a); return new e({ r: (n.r * n.a + o.r * o.a * (1 - n.a)) / r, g: (n.g * n.a + o.g * o.a * (1 - n.a)) / r, b: (n.b * n.a + o.b * o.a * (1 - n.a)) / r, a: r }); }, e.prototype.triad = function() { return this.polyad(3); }, e.prototype.tetrad = function() { return this.polyad(4); }, e.prototype.polyad = function(t) { for (var n = this.toHsl(), o = n.h, r = [this], a = 360 / t, i = 1; i < t; i++) r.push(new e({ h: (o + i * a) % 360, s: n.s, l: n.l })); return r; }, e.prototype.equals = function(t) { return this.toRgbString() === new e(t).toRgbString(); }, e; })() ), tt = 2, Zn = 0.16, Xa = 0.05, Ga = 0.05, Va = 0.15, Zo = 5, Jo = 4, Ua = [{ index: 7, opacity: 0.15 }, { index: 6, opacity: 0.25 }, { index: 5, opacity: 0.3 }, { index: 5, opacity: 0.45 }, { index: 5, opacity: 0.65 }, { index: 5, opacity: 0.85 }, { index: 4, opacity: 0.9 }, { index: 3, opacity: 0.95 }, { index: 2, opacity: 0.97 }, { index: 1, opacity: 0.98 }]; function Jn(e) { var t = e.r, n = e.g, o = e.b, r = qt(t, n, o); return { h: r.h * 360, s: r.s, v: r.v }; } function nt(e) { var t = e.r, n = e.g, o = e.b; return "#".concat(Qt(t, n, o, !1)); } function Ka(e, t, n) { var o = n / 100, r = { r: (t.r - e.r) * o + e.r, g: (t.g - e.g) * o + e.g, b: (t.b - e.b) * o + e.b }; return r; } function eo(e, t, n) { var o; return Math.round(e.h) >= 60 && Math.round(e.h) <= 240 ? o = n ? Math.round(e.h) - tt * t : Math.round(e.h) + tt * t : o = n ? Math.round(e.h) + tt * t : Math.round(e.h) - tt * t, o < 0 ? o += 360 : o >= 360 && (o -= 360), o; } function to(e, t, n) { if (e.h === 0 && e.s === 0) return e.s; var o; return n ? o = e.s - Zn * t : t === Jo ? o = e.s + Zn : o = e.s + Xa * t, o > 1 && (o = 1), n && t === Zo && o > 0.1 && (o = 0.1), o < 0.06 && (o = 0.06), Number(o.toFixed(2)); } function no(e, t, n) { var o; return n ? o = e.v + Ga * t : o = e.v - Va * t, o > 1 && (o = 1), Number(o.toFixed(2)); } function Ge(e) { for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = [], o = xe(e), r = Zo; r > 0; r -= 1) { var a = Jn(o), i = nt(xe